From 4235c5a0c249b0632c094077755b7b25b186dad8 Mon Sep 17 00:00:00 2001 From: Carmine Date: Tue, 3 Apr 2018 14:27:15 +0200 Subject: [PATCH 01/24] BoundsMaterialTypes: Read colours from materialfx.dat --- CodeWalker.Core/GameFiles/Resources/Bounds.cs | 69 +++++++++++++------ Rendering/Renderable.cs | 2 +- 2 files changed, 49 insertions(+), 22 deletions(-) diff --git a/CodeWalker.Core/GameFiles/Resources/Bounds.cs b/CodeWalker.Core/GameFiles/Resources/Bounds.cs index 658e823..705dad5 100644 --- a/CodeWalker.Core/GameFiles/Resources/Bounds.cs +++ b/CodeWalker.Core/GameFiles/Resources/Bounds.cs @@ -1283,7 +1283,7 @@ namespace CodeWalker.GameFiles public string HeatsTyre { get; set; } public string Material { get; set; } - public Color4 Colour { get; set; } + public Color Colour { get; set; } public override string ToString() { @@ -1293,14 +1293,19 @@ namespace CodeWalker.GameFiles public static class BoundsMaterialTypes { - private static Dictionary ColourDict; + private static Dictionary ColourDict; private static List Materials; public static void Init(GameFileCache gameFileCache) { var rpfman = gameFileCache.RpfMan; - InitColours(); + var dic = new Dictionary(); + string filename2 = "common.rpf\\data\\effects\\materialfx.dat"; + string txt2 = rpfman.GetFileUTF8Text(filename2); + AddMaterialfxDat(txt2, dic); + + ColourDict = dic; var list = new List(); string filename = "common.rpf\\data\\materials\\materials.dat"; @@ -1314,25 +1319,47 @@ namespace CodeWalker.GameFiles Materials = list; } - private static void InitColours() + //Only gets the colors + private static void AddMaterialfxDat(string txt, Dictionary dic) { - var dict = new Dictionary(); - string txt = File.ReadAllText("Materials.txt"); - string[] lines = txt.Split(new[] { '\n' }, StringSplitOptions.RemoveEmptyEntries); - for (int i = 0; i < lines.Length; i++) + dic.Clear(); + if (txt == null) return; + + string[] lines = txt.Split('\n'); + string startLine = "MTLFX_TABLE_START"; + string endLine = "MTLFX_TABLE_END"; + + for (int i = 1; i < lines.Length; i++) { var line = lines[i]; - if (line.Length < 10) continue; + if (line[0] == '#') continue; + if (line.StartsWith(startLine)) continue; + if (line.StartsWith(endLine)) break; + string[] parts = line.Split(new[] { '\t', ' ' }, StringSplitOptions.RemoveEmptyEntries); - if (parts.Length != 2) continue; - string name = parts[0].Trim(); - string cstr = parts[1].Trim(); - uint cval = Convert.ToUInt32(cstr, 16); - Color4 c = new Color4(cval); - dict[name] = c; + + if (parts.Length < 5) continue; // FXGroup R G B ... + + int cp = 0; + Color c = new Color(); + c.A = 0xFF; + string fxgroup = string.Empty; + for (int p = 0; p < parts.Length; p++) + { + string part = parts[p].Trim(); + if (string.IsNullOrWhiteSpace(part)) continue; + switch (cp) + { + case 0: fxgroup = part; break; + case 1: c.R = byte.Parse(part); break; + case 2: c.G = byte.Parse(part); break; + case 3: c.B = byte.Parse(part); break; + } + cp++; + } + dic.Add(fxgroup, c); } - ColourDict = dict; } private static void AddMaterialsDat(string txt, List list) @@ -1384,14 +1411,14 @@ namespace CodeWalker.GameFiles if (cp != 23) { } - Color4 c; - if ((ColourDict != null) && (ColourDict.TryGetValue(d.Name, out c))) + Color c; + if ((ColourDict != null) && (ColourDict.TryGetValue(d.FXGroup, out c))) { d.Colour = c; } else { - d.Colour = new Color4(0xFFCCCCCC); + d.Colour = new Color(0xFFCCCCCC); } @@ -1423,10 +1450,10 @@ namespace CodeWalker.GameFiles return m.Name; } - public static Color4 GetMaterialColour(BoundsMaterialType type) + public static Color GetMaterialColour(BoundsMaterialType type) { var m = GetMaterial(type); - if (m == null) return new Color4(0xFFCCCCCC); + if (m == null) return new Color(0xFFCCCCCC); return m.Colour; } } diff --git a/Rendering/Renderable.cs b/Rendering/Renderable.cs index 1e29636..b8c3c6d 100644 --- a/Rendering/Renderable.cs +++ b/Rendering/Renderable.cs @@ -1406,7 +1406,7 @@ namespace CodeWalker.Rendering if (poly == null) continue; byte matind = ((bgeom.PolygonMaterialIndices != null) && (i < bgeom.PolygonMaterialIndices.Length)) ? bgeom.PolygonMaterialIndices[i] : (byte)0; BoundMaterial_s mat = ((bgeom.Materials != null) && (matind < bgeom.Materials.Length)) ? bgeom.Materials[matind] : new BoundMaterial_s(); - Color4 color = BoundsMaterialTypes.GetMaterialColour(mat.Type); + Color color = BoundsMaterialTypes.GetMaterialColour(mat.Type); Vector3 p1, p2, p3, p4, a1, n1;//, n2, n3, p5, p7, p8; Vector3 norm = Vector3.Zero; uint colour = (uint)color.ToRgba(); From d7fce98f75752a956f757e96c2c8c2a7539a4dc6 Mon Sep 17 00:00:00 2001 From: PNWParksFan Date: Mon, 23 Apr 2018 01:18:50 -0700 Subject: [PATCH 02/24] Added sanity check to saving path node files --- Project/ProjectForm.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Project/ProjectForm.cs b/Project/ProjectForm.cs index e88895a..24d7e59 100644 --- a/Project/ProjectForm.cs +++ b/Project/ProjectForm.cs @@ -1871,6 +1871,17 @@ namespace CodeWalker.Project { if ((CurrentYndFile == null) && (CurrentPathNode != null)) CurrentYndFile = CurrentPathNode.Ynd; if (CurrentYndFile == null) return; + + // Check that vehicle nodes and ped nodes add up to total nodes + if(CurrentYndFile.NodeDictionary != null && (CurrentYndFile.NodeDictionary.NodesCountPed + CurrentYndFile.NodeDictionary.NodesCountVehicle != CurrentYndFile.NodeDictionary.NodesCount)) + { + var result = MessageBox.Show($"YND Area {CurrentYndFile.AreaID}: The total number of nodes ({CurrentYndFile.NodeDictionary.NodesCount}) does not match the total number of ped ({CurrentYndFile.NodeDictionary.NodesCountPed}) and vehicle ({CurrentYndFile.NodeDictionary.NodesCountVehicle}) nodes. You should manually adjust the number of nodes on the YND screen.\n\nDo you want to continue saving the YND file? Some of your nodes may not work in game.", $"Node count mismatch in Area {CurrentYndFile.AreaID}", MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2); + if(result == DialogResult.Cancel) + { + return; + } + } + string yndname = CurrentYndFile.Name; string filepath = CurrentYndFile.FilePath; if (string.IsNullOrEmpty(filepath)) From 945bf410cc6194055ae100936686564a16dfb837 Mon Sep 17 00:00:00 2001 From: dexyfex Date: Tue, 1 May 2018 13:20:39 +1000 Subject: [PATCH 03/24] Staging random bug fixes --- .../GameFiles/MetaTypes/MetaNames.cs | 17 +++- CodeWalker.Core/GameFiles/MetaTypes/Pso.cs | 89 +++++++++++++++++++ .../GameFiles/MetaTypes/XmlMeta.cs | 3 + CodeWalker.Core/GameFiles/RpfFile.cs | 1 + CodeWalker.Core/World/Space.cs | 14 +-- ExploreForm.cs | 5 ++ 6 files changed, 121 insertions(+), 8 deletions(-) diff --git a/CodeWalker.Core/GameFiles/MetaTypes/MetaNames.cs b/CodeWalker.Core/GameFiles/MetaTypes/MetaNames.cs index 73a63b5..f97d892 100644 --- a/CodeWalker.Core/GameFiles/MetaTypes/MetaNames.cs +++ b/CodeWalker.Core/GameFiles/MetaTypes/MetaNames.cs @@ -538,6 +538,7 @@ namespace CodeWalker.GameFiles CExtensionDefSpawnPointOverride = 2716862120, CExtensionDefWindDisturbance = 569228403, CFiringPatternInfo = 4139644871, + CFiringPatternInfoManager = 3698419088, CGrabHelper__Tunables = 1898505781, Chances = 3434267272, changeSetName = 3618800523, @@ -1605,6 +1606,7 @@ namespace CodeWalker.GameFiles VEHICLE_LAYOUTS_FILE = 2004032454, VEHICLE_METADATA_FILE = 4125139733, VEHICLE_POPULATION_FILE = 4010054647, + VEHICLE_RESPONSE_DEFAULT = 3986150789, VEHICLE_RESPONSE_ARMY_BASE = 317362887, VEHICLE_RESPONSE_COUNTRYSIDE = 2467847847, VEHICLE_SHOP_DLC_FILE = 3203173146, @@ -1621,6 +1623,13 @@ namespace CodeWalker.GameFiles VFXINTERIORINFO_FILE = 354822867, VFXPEDINFO_FILE = 962370952, VFXREGIONINFO_FILE = 3633596549, + vfxregioninfo_default = 526963733, + vfxregioninfo_desert = 1202232026, + vfxregioninfo_beach = 4239901007, + vfxregioninfo_slum = 4267832995, + vfxregioninfo_woodland = 1397181648, + vfxregioninfo_mountain = 3282595980, + vfxregioninfo_countryside = 2691334223, vfxTagHashName = 1944993828, VFXVEHICLEINFO_FILE = 1918258814, vfxVehicleInfos = 1829968483, @@ -3528,9 +3537,15 @@ namespace CodeWalker.GameFiles spName = 4254542050, - //from rubidium + //from rubidium / dav90 PSO XML / zonebind mpName = 2031203854, zoneName = 257000, + vfxRegion = 3384955624, + vehDirtMin = 1831590592, + vehDirtMax = 625824556, + vehDirtGrowScale = 2919812941, + pedDirtMin = 1861946207, + pedDirtMax = 3150688023, diff --git a/CodeWalker.Core/GameFiles/MetaTypes/Pso.cs b/CodeWalker.Core/GameFiles/MetaTypes/Pso.cs index 821b323..d35c189 100644 --- a/CodeWalker.Core/GameFiles/MetaTypes/Pso.cs +++ b/CodeWalker.Core/GameFiles/MetaTypes/Pso.cs @@ -23,6 +23,95 @@ //shamelessly stolen and mangled + + + + +/* + +Regarding saving PSO files: + +[for checksum - use whole file] +Brick - Today +uint32_t joaat_checksum(const void* memory, const size_t length) +{ + uint32_t hash = 0x3FAC7125; + + for (size_t i = 0; i < length; ++i) + { + hash += static_cast(memory)[i]; + hash += hash << 10; + hash ^= hash >> 6; + } + + hash += hash << 3; + hash ^= hash >> 11; + hash += hash << 15; + + return hash; +} + + +[before doing checksum for file:] + v12->Checksum = 0; + v12->FileSize = 0; + v12->Magic = 'SKHC'; + v12->Size = 0x14000000; + v22 = v12; + LOBYTE(v12->Platform) = platformChar[0]; + + + + + + + +Brick - Today +This is a table i made a while ago for the pso types btw +| Index | Type | Size | Align | Name | Serialization +| 0 | Simple | 1 | 1 | bool | +| 1 | Simple | 1 | 1 | s8 | +| 2 | Simple | 1 | 1 | u8 | +| 3 | Simple | 2 | 2 | s16 | +| 4 | Simple | 2 | 2 | u16 | +| 5 | Simple | 4 | 4 | s32 | +| 6 | Simple | 4 | 4 | u32 | +| 7 | Simple | 4 | 4 | f32 | +| 8 | Vector | 8 | 4 | vec2 | +| 9 | Vector | 16 | 16 | vec3 | +| 10 | Vector | 16 | 16 | vec4 | +| 11 | String | 0 | 0 | string | +| 12 | Struct | 0 | 0 | struct | +| 13 | Array | 0 | 0 | array | +| 14 | Enum | 0 | 0 | enum | +| 15 | Bitset | 0 | 0 | bitset | +| 16 | Map | 0 | 0 | map | +| 17 | Matrix | 64 | 16 | matrix43 | shuffled +| 18 | Matrix | 64 | 16 | matrix44 | shuffled +| 19 | Vector | 16 | 16 | vec4 | x, y, x, x +| 20 | Vector | 16 | 16 | vec4 | x, y, z, x +| 21 | Vector | 16 | 16 | vec4 | x, y, z, w +| 22 | Matrix | 48 | 16 | matrix34 | +| 23 | Matrix | 64 | 16 | matrix43 | +| 24 | Matrix | 64 | 16 | matrix44 | +| 25 | Simple | 16 | 16 | f32_vec4 | fill all with f32 +| 26 | Simple | 16 | 16 | bool_int4 | fill all with 0x00000000 or 0xFFFFFFFF depending on bool +| 27 | Vector | 16 | 16 | bool4_int4 | fill each with 0x00000000 or 0xFFFFFFFF depending on bools +| 28 | Simple | 8 | 8 | s32_i64 | sign extended s32 +| 29 | Simple | 8 | 8 | s32_u64 | sign extended s32 +| 30 | Simple | 2 | 2 | f16 | f64 converted to f16 +| 31 | Simple | 8 | 8 | s64 | +| 32 | Simple | 8 | 8 | u64 | +| 33 | Simple | 8 | 8 | f64 | + + + + */ + + + + + using System; using System.Collections.Generic; using System.ComponentModel; diff --git a/CodeWalker.Core/GameFiles/MetaTypes/XmlMeta.cs b/CodeWalker.Core/GameFiles/MetaTypes/XmlMeta.cs index 18da11c..eb266b9 100644 --- a/CodeWalker.Core/GameFiles/MetaTypes/XmlMeta.cs +++ b/CodeWalker.Core/GameFiles/MetaTypes/XmlMeta.cs @@ -687,6 +687,9 @@ namespace CodeWalker.GameFiles private static int GetEnumInt(MetaName type, string enumString) { + + //BUG: needs to handle multiple flags!!! + var enumName = (MetaName)(uint)GetHash(enumString); var infos = MetaTypes.GetEnumInfo(type); diff --git a/CodeWalker.Core/GameFiles/RpfFile.cs b/CodeWalker.Core/GameFiles/RpfFile.cs index f4c1e21..0ab4f45 100644 --- a/CodeWalker.Core/GameFiles/RpfFile.cs +++ b/CodeWalker.Core/GameFiles/RpfFile.cs @@ -626,6 +626,7 @@ namespace CodeWalker.GameFiles RpfFileEntry entry = CreateResourceFileEntry(ref data, 0); if ((data != null) && (entry != null)) { + data = ResourceBuilder.Decompress(data); file = new T(); file.Load(data, entry); } diff --git a/CodeWalker.Core/World/Space.cs b/CodeWalker.Core/World/Space.cs index b1f962d..1505c0a 100644 --- a/CodeWalker.Core/World/Space.cs +++ b/CodeWalker.Core/World/Space.cs @@ -420,13 +420,6 @@ namespace CodeWalker.World { AddRpfYnds(rpffile, yndentries); } - foreach (var dlcrpf in GameFileCache.DlcActiveRpfs) //load nodes from current dlc rpfs - { - foreach (var rpffile in dlcrpf.Children) - { - AddRpfYnds(rpffile, yndentries); - } - } var updrpf = rpfman.FindRpfFile("update\\update.rpf"); //load nodes from patch area... if (updrpf != null) { @@ -435,6 +428,13 @@ namespace CodeWalker.World AddRpfYnds(rpffile, yndentries); } } + foreach (var dlcrpf in GameFileCache.DlcActiveRpfs) //load nodes from current dlc rpfs + { + foreach (var rpffile in dlcrpf.Children) + { + AddRpfYnds(rpffile, yndentries); + } + } Vector3 corner = new Vector3(-8192, -8192, -2048); diff --git a/ExploreForm.cs b/ExploreForm.cs index 48a31be..352e3b9 100644 --- a/ExploreForm.cs +++ b/ExploreForm.cs @@ -2201,7 +2201,9 @@ namespace CodeWalker var fpaths = OpenFileDialog.FileNames; foreach (var fpath in fpaths) { +#if !DEBUG try +#endif { if (!File.Exists(fpath)) { @@ -2254,10 +2256,13 @@ namespace CodeWalker RpfFile.CreateFile(parentrpffldr, fname, data); } +#if !DEBUG catch (Exception ex) { MessageBox.Show(ex.Message, "Unable to import file"); } +#endif + } CurrentFolder.ListItems = null; From 6ae802a910c8cc02e1dbfd13660d0b18d055154b Mon Sep 17 00:00:00 2001 From: dexyfex Date: Tue, 1 May 2018 15:03:35 +1000 Subject: [PATCH 04/24] Fixed XmlMeta and MetaXML flags/hash conversion bugs. --- .../GameFiles/MetaTypes/MetaXml.cs | 7 +- .../GameFiles/MetaTypes/XmlMeta.cs | 148 ++++++++++++------ 2 files changed, 105 insertions(+), 50 deletions(-) diff --git a/CodeWalker.Core/GameFiles/MetaTypes/MetaXml.cs b/CodeWalker.Core/GameFiles/MetaTypes/MetaXml.cs index 0c7966e..18613a1 100644 --- a/CodeWalker.Core/GameFiles/MetaTypes/MetaXml.cs +++ b/CodeWalker.Core/GameFiles/MetaTypes/MetaXml.cs @@ -1646,7 +1646,12 @@ namespace CodeWalker.GameFiles public static string FormatHash(MetaHash h) //for use with WriteItemArray { - return h.ToString(); + var str = JenkIndex.TryGetString(h); + if (!string.IsNullOrEmpty(str)) return str; + str = GlobalText.TryGetString(h); + if (!string.IsNullOrEmpty(str)) return str; + return HashString(h);// "hash_" + h.Hex; + //return h.ToString(); } public static string FormatVector2(Vector2 v) //for use with WriteItemArray { diff --git a/CodeWalker.Core/GameFiles/MetaTypes/XmlMeta.cs b/CodeWalker.Core/GameFiles/MetaTypes/XmlMeta.cs index eb266b9..f09b353 100644 --- a/CodeWalker.Core/GameFiles/MetaTypes/XmlMeta.cs +++ b/CodeWalker.Core/GameFiles/MetaTypes/XmlMeta.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Globalization; using System.Text.RegularExpressions; using System.Xml; using SharpDX; @@ -182,7 +183,7 @@ namespace CodeWalker.GameFiles mb.AddEnumInfo(_infos.EnumNameHash); - int val = GetEnumInt(entry.ReferenceKey, cnode.InnerText); + int val = GetEnumInt(entry.ReferenceKey, cnode.InnerText, entry.DataType); Write(val, data, entry.DataOffset); break; } @@ -193,7 +194,7 @@ namespace CodeWalker.GameFiles mb.AddEnumInfo(_infos.EnumNameHash); - int val = GetEnumInt(entry.ReferenceKey, cnode.InnerText); + int val = GetEnumInt(entry.ReferenceKey, cnode.InnerText, entry.DataType); Write((short)val, data, entry.DataOffset); break; } @@ -296,11 +297,16 @@ namespace CodeWalker.GameFiles private static void GetParsedArrayOfBytes(XmlNode node, byte[] data, MetaStructureEntryInfo_s entry, MetaStructureEntryInfo_s arrEntry) { int offset = entry.DataOffset; - string[] split; + + var ns = NumberStyles.Any; + var ic = CultureInfo.InvariantCulture; + var sa = new[] { ' ' }; + var so = StringSplitOptions.RemoveEmptyEntries; + var split = node.InnerText.Trim().Split(sa, so); //split = Split(node.InnerText, 2); to read as unsplitted HEX switch (arrEntry.DataType) { - default: + default: //expecting hex string. split = Split(node.InnerText, 2); for (int j = 0; j < split.Length; j++) { @@ -309,67 +315,81 @@ namespace CodeWalker.GameFiles offset += sizeof(byte); } break; - case MetaStructureEntryDataType.SignedByte: - split = node.InnerText.Split(); //split = Split(node.InnerText, 2); to read as unsplitted HEX + case MetaStructureEntryDataType.SignedByte: //expecting space-separated array. for (int j = 0; j < split.Length; j++) { - sbyte val = Convert.ToSByte(split[j], 10); - data[offset] = (byte)val; - offset += sizeof(sbyte); + sbyte val;// = Convert.ToSByte(split[j], 10); + if (sbyte.TryParse(split[j].Trim(), ns, ic, out val)) + { + data[offset] = (byte)val; + offset += sizeof(sbyte); + } } break; - case MetaStructureEntryDataType.UnsignedByte: - split = node.InnerText.Split(); + case MetaStructureEntryDataType.UnsignedByte: //expecting space-separated array. for (int j = 0; j < split.Length; j++) { - byte val = Convert.ToByte(split[j], 10); - data[offset] = val; - offset += sizeof(byte); + byte val;// = Convert.ToByte(split[j], 10); + if (byte.TryParse(split[j].Trim(), ns, ic, out val)) + { + data[offset] = val; + offset += sizeof(byte); + } } break; - case MetaStructureEntryDataType.SignedShort: - split = node.InnerText.Split(); + case MetaStructureEntryDataType.SignedShort: //expecting space-separated array. for (int j = 0; j < split.Length; j++) { - short val = Convert.ToInt16(split[j], 10); - Write(val, data, offset); - offset += sizeof(short); + short val;// = Convert.ToInt16(split[j], 10); + if (short.TryParse(split[j].Trim(), ns, ic, out val)) + { + Write(val, data, offset); + offset += sizeof(short); + } } break; - case MetaStructureEntryDataType.UnsignedShort: - split = node.InnerText.Split(); + case MetaStructureEntryDataType.UnsignedShort: //expecting space-separated array. for (int j = 0; j < split.Length; j++) { - ushort val = Convert.ToUInt16(split[j], 10); - Write(val, data, offset); - offset += sizeof(ushort); + ushort val;// = Convert.ToUInt16(split[j], 10); + if (ushort.TryParse(split[j].Trim(), ns, ic, out val)) + { + Write(val, data, offset); + offset += sizeof(ushort); + } } break; - case MetaStructureEntryDataType.SignedInt: - split = node.InnerText.Split(); + case MetaStructureEntryDataType.SignedInt: //expecting space-separated array. for (int j = 0; j < split.Length; j++) { - int val = Convert.ToInt32(split[j], 10); - Write(val, data, offset); - offset += sizeof(int); + int val;// = Convert.ToInt32(split[j], 10); + if (int.TryParse(split[j].Trim(), ns, ic, out val)) + { + Write(val, data, offset); + offset += sizeof(int); + } } break; - case MetaStructureEntryDataType.UnsignedInt: - split = node.InnerText.Split(); + case MetaStructureEntryDataType.UnsignedInt: //expecting space-separated array. for (int j = 0; j < split.Length; j++) { - uint val = Convert.ToUInt32(split[j], 10); - Write(val, data, offset); - offset += sizeof(uint); + uint val;// = Convert.ToUInt32(split[j], 10); + if (uint.TryParse(split[j].Trim(), ns, ic, out val)) + { + Write(val, data, offset); + offset += sizeof(uint); + } } break; - case MetaStructureEntryDataType.Float: - split = node.InnerText.Split(); + case MetaStructureEntryDataType.Float: //expecting space-separated array. for (int j = 0; j < split.Length; j++) { - float val = FloatUtil.Parse(split[j]); - Write(val, data, offset); - offset += sizeof(float); + float val;// = FloatUtil.Parse(split[j]); + if (FloatUtil.TryParse(split[j].Trim(), out val)) + { + Write(val, data, offset); + offset += sizeof(float); + } } break; } @@ -685,12 +705,8 @@ namespace CodeWalker.GameFiles return chunks.ToArray(); } - private static int GetEnumInt(MetaName type, string enumString) + private static int GetEnumInt(MetaName type, string enumString, MetaStructureEntryDataType dataType) { - - //BUG: needs to handle multiple flags!!! - - var enumName = (MetaName)(uint)GetHash(enumString); var infos = MetaTypes.GetEnumInfo(type); if (infos == null) @@ -698,13 +714,47 @@ namespace CodeWalker.GameFiles return 0; } - for (int j = 0; j < infos.Entries.Length; j++) - { - var entry = infos.Entries[j]; - if (entry.EntryNameHash == enumName) + bool isFlags = (dataType == MetaStructureEntryDataType.IntFlags1) || + (dataType == MetaStructureEntryDataType.IntFlags2);// || + //(dataType == MetaStructureEntryDataType.ShortFlags); + + if (isFlags) + { + //flags enum. (multiple values, comma-separated) + var split = enumString.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries); + int enumVal = 0; + + for (int i = 0; i < split.Length; i++) { - return entry.EntryValue; + var enumName = (MetaName)(uint)GetHash(split[i].Trim()); + + for (int j = 0; j < infos.Entries.Length; j++) + { + var entry = infos.Entries[j]; + if (entry.EntryNameHash == enumName) + { + enumVal += (1 << entry.EntryValue); + } + } + } + + return enumVal; + } + else + { + //single value enum. + + var enumName = (MetaName)(uint)GetHash(enumString); + + for (int j = 0; j < infos.Entries.Length; j++) + { + var entry = infos.Entries[j]; + + if (entry.EntryNameHash == enumName) + { + return entry.EntryValue; + } } } From a56e87d64a39d07f5f5e7b3cf664b73cb1122831 Mon Sep 17 00:00:00 2001 From: dexyfex Date: Tue, 1 May 2018 15:11:08 +1000 Subject: [PATCH 05/24] R30_dev1 --- CodeWalker.Core/GameFiles/MetaTypes/XmlMeta.cs | 1 + Todo.txt | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/CodeWalker.Core/GameFiles/MetaTypes/XmlMeta.cs b/CodeWalker.Core/GameFiles/MetaTypes/XmlMeta.cs index f09b353..bc3ba05 100644 --- a/CodeWalker.Core/GameFiles/MetaTypes/XmlMeta.cs +++ b/CodeWalker.Core/GameFiles/MetaTypes/XmlMeta.cs @@ -735,6 +735,7 @@ namespace CodeWalker.GameFiles if (entry.EntryNameHash == enumName) { enumVal += (1 << entry.EntryValue); + break; } } } diff --git a/Todo.txt b/Todo.txt index 20139e1..ccf7e6a 100644 --- a/Todo.txt +++ b/Todo.txt @@ -99,6 +99,12 @@ Audio stuff - do more work on .rel format (see https://github.com/CamxxCore/Rag done: +[v.30] +Bug fixes for XML/Meta conversion +Collision meshes now using R* colours +Vehicle rendering improvements + + [v.29] Nav mesh editing (YNV) - polys, points, portals New Project Window From 4c46a850f49413d3210a470c79d7974358ffcfde Mon Sep 17 00:00:00 2001 From: dexyfex Date: Tue, 1 May 2018 18:03:20 +1000 Subject: [PATCH 06/24] Improved rendering for nav poly selection, path shader now batches selection lines and tris --- Rendering/Renderer.cs | 67 +++++++++++++++++++++++++++++++- Rendering/Shaders/PathShader.cs | 60 +++++++++++++++++++++-------- WorldForm.cs | 68 ++------------------------------- 3 files changed, 113 insertions(+), 82 deletions(-) diff --git a/Rendering/Renderer.cs b/Rendering/Renderer.cs index 4792f59..aa74391 100644 --- a/Rendering/Renderer.cs +++ b/Rendering/Renderer.cs @@ -757,7 +757,7 @@ namespace CodeWalker.Rendering public void RenderSelectionNavPoly(YnvPoly poly) { ////draw poly triangles - var pcolour = new Color4(0.6f, 0.95f, 0.6f, 1.0f); + var pcolour = new Color4(1.0f, 1.0f, 1.0f, 0.2f); var colourval = (uint)pcolour.ToRgba(); var ynv = poly.Ynv; var ic = poly._RawData.IndexCount; @@ -792,6 +792,71 @@ namespace CodeWalker.Rendering } } + public void RenderSelectionNavPolyOutline(YnvPoly poly, uint colourval) + { + //var colourval = (uint)colour.ToRgba(); + var ynv = poly.Ynv; + var ic = poly._RawData.IndexCount; + var startid = poly._RawData.IndexID; + var endid = startid + ic; + var lastid = endid - 1; + var vc = ynv.Vertices.Count; + var startind = ynv.Indices[startid]; + + ////draw poly outline + VertexTypePC v = new VertexTypePC(); + v.Colour = colourval; + VertexTypePC v0 = new VertexTypePC(); + for (int id = startid; id < endid; id++) + { + var ind = ynv.Indices[id]; + if (ind >= vc) + { continue; } + + v.Position = ynv.Vertices[ind]; + SelectionLineVerts.Add(v); + if (id == startid) + { + v0 = v; + } + else + { + SelectionLineVerts.Add(v); + } + if (id == lastid) + { + SelectionLineVerts.Add(v0); + } + } + + + ////draw poly triangles + //VertexTypePC v0 = new VertexTypePC(); + //VertexTypePC v1 = new VertexTypePC(); + //VertexTypePC v2 = new VertexTypePC(); + //v0.Position = ynv.Vertices[startind]; + //v0.Colour = colourval; + //v1.Colour = colourval; + //v2.Colour = colourval; + //int tricount = ic - 2; + //for (int t = 0; t < tricount; t++) + //{ + // int tid = startid + t; + // int ind1 = ynv.Indices[tid + 1]; + // int ind2 = ynv.Indices[tid + 2]; + // if ((ind1 >= vc) || (ind2 >= vc)) + // { continue; } + // v1.Position = ynv.Vertices[ind1]; + // v2.Position = ynv.Vertices[ind2]; + // Renderer.SelectionTriVerts.Add(v0); + // Renderer.SelectionTriVerts.Add(v1); + // Renderer.SelectionTriVerts.Add(v2); + // Renderer.SelectionTriVerts.Add(v0); + // Renderer.SelectionTriVerts.Add(v2); + // Renderer.SelectionTriVerts.Add(v1); + //} + } + public void RenderSelectionGeometry(MapSelectionMode mode) { diff --git a/Rendering/Shaders/PathShader.cs b/Rendering/Shaders/PathShader.cs index 72d1e65..45732e4 100644 --- a/Rendering/Shaders/PathShader.cs +++ b/Rendering/Shaders/PathShader.cs @@ -178,16 +178,31 @@ namespace CodeWalker.Rendering SetInputLayout(context, VertexType.PC); SetSceneVars(context, camera, null, lights); - vertices.Clear(); - foreach (var vert in verts) + int drawn = 0; + int tricount = verts.Count / 3; + int maxcount = vertices.StructCount / 3; + while (drawn < tricount) { - vertices.Add(vert); - } - vertices.Update(context); - vertices.SetVSResource(context, 0); + vertices.Clear(); + + int offset = drawn*3; + int bcount = Math.Min(tricount - drawn, maxcount); + for (int i = 0; i < bcount; i++) + { + int t = offset + (i * 3); + vertices.Add(verts[t + 0]); + vertices.Add(verts[t + 1]); + vertices.Add(verts[t + 2]); + } + drawn += bcount; + + vertices.Update(context); + vertices.SetVSResource(context, 0); + + context.InputAssembler.PrimitiveTopology = SharpDX.Direct3D.PrimitiveTopology.TriangleList; + context.Draw(vertices.CurrentCount, 0); + } - context.InputAssembler.PrimitiveTopology = SharpDX.Direct3D.PrimitiveTopology.TriangleList; - context.Draw(vertices.CurrentCount, 0); } public void RenderLines(DeviceContext context, List verts, Camera camera, ShaderGlobalLights lights) @@ -197,16 +212,29 @@ namespace CodeWalker.Rendering SetInputLayout(context, VertexType.PC); SetSceneVars(context, camera, null, lights); - vertices.Clear(); - foreach (var vert in verts) + int drawn = 0; + int linecount = verts.Count / 2; + int maxcount = vertices.StructCount / 2; + while (drawn < linecount) { - vertices.Add(vert); - } - vertices.Update(context); - vertices.SetVSResource(context, 0); + vertices.Clear(); - context.InputAssembler.PrimitiveTopology = SharpDX.Direct3D.PrimitiveTopology.LineList; - context.Draw(vertices.CurrentCount, 0); + int offset = drawn * 2; + int bcount = Math.Min(linecount - drawn, maxcount); + for (int i = 0; i < bcount; i++) + { + int t = offset + (i * 2); + vertices.Add(verts[t + 0]); + vertices.Add(verts[t + 1]); + } + drawn += bcount; + + vertices.Update(context); + vertices.SetVSResource(context, 0); + + context.InputAssembler.PrimitiveTopology = SharpDX.Direct3D.PrimitiveTopology.LineList; + context.Draw(vertices.CurrentCount, 0); + } } diff --git a/WorldForm.cs b/WorldForm.cs index 6219a66..c39cf6f 100644 --- a/WorldForm.cs +++ b/WorldForm.cs @@ -1435,7 +1435,8 @@ namespace CodeWalker if (selectionItem.NavPoly != null) { Renderer.RenderSelectionNavPoly(selectionItem.NavPoly); - //return;//don't render a selection box for nav mesh? + Renderer.RenderSelectionNavPolyOutline(selectionItem.NavPoly, cgrn); + return;//don't render a selection box for nav poly } if (selectionItem.NavPoint != null) { @@ -2717,70 +2718,7 @@ namespace CodeWalker if ((CurMouseHit.NavPoly != null) && MouseSelectEnabled) { - var colour = Color4.White; - var colourval = (uint)colour.ToRgba(); - var poly = CurMouseHit.NavPoly; - var ynv = poly.Ynv; - var ic = poly._RawData.IndexCount; - var startid = poly._RawData.IndexID; - var endid = startid + ic; - var lastid = endid - 1; - var vc = ynv.Vertices.Count; - var startind = ynv.Indices[startid]; - - ////draw poly outline - VertexTypePC v = new VertexTypePC(); - v.Colour = colourval; - VertexTypePC v0 = new VertexTypePC(); - for (int id = startid; id < endid; id++) - { - var ind = ynv.Indices[id]; - if (ind >= vc) - { continue; } - - v.Position = ynv.Vertices[ind]; - Renderer.SelectionLineVerts.Add(v); - if (id == startid) - { - v0 = v; - } - else - { - Renderer.SelectionLineVerts.Add(v); - } - if (id == lastid) - { - Renderer.SelectionLineVerts.Add(v0); - } - } - - - ////draw poly triangles - //VertexTypePC v0 = new VertexTypePC(); - //VertexTypePC v1 = new VertexTypePC(); - //VertexTypePC v2 = new VertexTypePC(); - //v0.Position = ynv.Vertices[startind]; - //v0.Colour = colourval; - //v1.Colour = colourval; - //v2.Colour = colourval; - //int tricount = ic - 2; - //for (int t = 0; t < tricount; t++) - //{ - // int tid = startid + t; - // int ind1 = ynv.Indices[tid + 1]; - // int ind2 = ynv.Indices[tid + 2]; - // if ((ind1 >= vc) || (ind2 >= vc)) - // { continue; } - // v1.Position = ynv.Vertices[ind1]; - // v2.Position = ynv.Vertices[ind2]; - // Renderer.SelectionTriVerts.Add(v0); - // Renderer.SelectionTriVerts.Add(v1); - // Renderer.SelectionTriVerts.Add(v2); - // Renderer.SelectionTriVerts.Add(v0); - // Renderer.SelectionTriVerts.Add(v2); - // Renderer.SelectionTriVerts.Add(v1); - //} - + Renderer.RenderSelectionNavPolyOutline(CurMouseHit.NavPoly, 0xFFFFFFFF); } } From bab66680212031947cd0a723aad03ebfc75a0b6a Mon Sep 17 00:00:00 2001 From: dexyfex Date: Tue, 1 May 2018 22:34:52 +1000 Subject: [PATCH 07/24] Nav mesh progress --- .../GameFiles/FileTypes/YnvFile.cs | 183 ++++++++++-------- CodeWalker.Core/GameFiles/Resources/Nav.cs | 33 ++-- 2 files changed, 120 insertions(+), 96 deletions(-) diff --git a/CodeWalker.Core/GameFiles/FileTypes/YnvFile.cs b/CodeWalker.Core/GameFiles/FileTypes/YnvFile.cs index 8118c79..7658eed 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/YnvFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/YnvFile.cs @@ -14,7 +14,7 @@ namespace CodeWalker.GameFiles public List Vertices { get; set; } public List Indices { get; set; } - public List AdjPolys { get; set; } + public List Edges { get; set; } public List Polys { get; set; } public List Portals { get; set; } public List Points { get; set; } @@ -101,9 +101,9 @@ namespace CodeWalker.GameFiles { Indices = Nav.Indices.GetFullList(); } - if (Nav.AdjPolys != null) + if (Nav.Edges != null) { - AdjPolys = Nav.AdjPolys.GetFullList(); + Edges = Nav.Edges.GetFullList(); } if (Nav.Polys != null) { @@ -114,7 +114,6 @@ namespace CodeWalker.GameFiles YnvPoly poly = new YnvPoly(); poly.Init(this, polys[i]); poly.Index = i; - poly.CalculatePosition(); //calc poly center for display purposes.. Polys.Add(poly); if (poly.PortalType > 0) @@ -209,23 +208,46 @@ namespace CodeWalker.GameFiles Vector3 aabbsizeinv = 1.0f / aabbsize; var vertlist = new List(); - if (Vertices != null) - { - for (int i = 0; i < Vertices.Count; i++) - { - vertlist.Add(NavMeshVertex.Create((Vertices[i] - posoffset) * aabbsizeinv)); - } - } + var indslist = new List(); + var edgelist = new List(); var polylist = new List(); - if (Polys != null) + var portallist = new List(); + + var vertdict = new Dictionary(); + var blankedgepart1 = new NavMeshEdgePart() { Value = 0x0FFFE1 };//1, -, 1, 0 + var blankedgepart2 = new NavMeshEdgePart() { Value = 0x2FFFE1 };//1, -, 1, 1 + var blankedge = new NavMeshEdge() { Unknown_0h = blankedgepart1, Unknown_4h = blankedgepart2 }; + + if (Polys != null) //rebuild vertices, indices, edges and polys lists from poly data. { for (int i = 0; i < Polys.Count; i++) { - Polys[i].Index = i; - polylist.Add(Polys[i].RawData); + var poly = Polys[i]; + var vc = poly.Vertices?.Length ?? 0; + for (int n = 0; n < vc; n++) + { + Vector3 v = poly.Vertices[n]; + NavMeshEdge e = ((poly.Edges != null) && (n < poly.Edges.Length)) ? poly.Edges[n] : blankedge; + ushort ind; + if (!vertdict.TryGetValue(v, out ind)) + { + ind = (ushort)vertlist.Count; + vertdict[v] = ind; + vertlist.Add(NavMeshVertex.Create((v - posoffset) * aabbsizeinv)); + } + if ((poly.Indices != null) && (n < poly.Indices.Length)) + { + poly.Indices[n] = ind; + } + indslist.Add(ind); + edgelist.Add(e); + } + poly._RawData.IndexCount = vc; + poly.Index = i;//this should be redundant... + polylist.Add(poly.RawData); } } - var portallist = new List(); + if (Portals != null) { for (int i = 0; i < Portals.Count; i++) @@ -238,7 +260,7 @@ namespace CodeWalker.GameFiles } } - if (Points != null) + if (Points != null) //points will be built into the sector tree { for (int i = 0; i < Points.Count; i++) { @@ -259,10 +281,10 @@ namespace CodeWalker.GameFiles Nav.Indices = new NavMeshList(); Nav.Indices.VFT = 1080158424; } - if (Nav.AdjPolys == null) + if (Nav.Edges == null) { - Nav.AdjPolys = new NavMeshList(); - Nav.AdjPolys.VFT = 1080158440; + Nav.Edges = new NavMeshList(); + Nav.Edges.VFT = 1080158440; } if (Nav.Polys == null) { @@ -273,9 +295,9 @@ namespace CodeWalker.GameFiles Nav.Vertices.RebuildList(vertlist); - Nav.Indices.RebuildList(Indices); + Nav.Indices.RebuildList(indslist); - Nav.AdjPolys.RebuildList(AdjPolys); + Nav.Edges.RebuildList(edgelist); Nav.Polys.RebuildList(polylist); @@ -474,67 +496,39 @@ namespace CodeWalker.GameFiles //go through the nav mesh polys and generate verts to render... - if ((Vertices == null) || (Vertices.Count == 0)) return; - if ((Indices == null) || (Indices.Count == 0)) return; if ((Polys == null) || (Polys.Count == 0)) return; int vc = Vertices.Count; List rverts = new List(); + EditorVertex p0 = new EditorVertex(); + EditorVertex p1 = new EditorVertex(); + EditorVertex p2 = new EditorVertex(); foreach (var ypoly in Polys) { - var poly = ypoly.RawData; + if ((ypoly.Vertices == null) || (ypoly.Vertices.Length < 3)) + { continue; } + var colour = ypoly.GetColour(); var colourval = (uint)colour.ToRgba(); - var ic = poly.IndexCount; - var startid = poly.IndexID; - var endid = startid + ic; - if (startid >= Indices.Count) - { continue; } - if (endid > Indices.Count) - { continue; } - - - if(ic<3) - { continue; }//not enough verts to make a triangle... - - if (ic > 15) - { } - - - EditorVertex p0 = new EditorVertex(); - EditorVertex p1 = new EditorVertex(); - EditorVertex p2 = new EditorVertex(); p0.Colour = colourval; p1.Colour = colourval; p2.Colour = colourval; - var startind = Indices[startid]; - if (startind >= vc) - { continue; } - - p0.Position = Vertices[startind]; + p0.Position = ypoly.Vertices[0]; //build triangles for the poly. - int tricount = ic - 2; + int tricount = ypoly.Vertices.Length - 2; for (int t = 0; t < tricount; t++) { - int tid = startid + t; - int ind1 = Indices[tid + 1]; - int ind2 = Indices[tid + 2]; - if ((ind1 >= vc) || (ind2 >= vc)) - { continue; } - - p1.Position = Vertices[ind1]; - p2.Position = Vertices[ind2]; - + p1.Position = ypoly.Vertices[t + 1]; + p2.Position = ypoly.Vertices[t + 2]; rverts.Add(p0); rverts.Add(p1); rverts.Add(p2); } - } TriangleVerts = rverts.ToArray(); @@ -624,14 +618,58 @@ namespace CodeWalker.GameFiles public Vector3 Position { get; set; } public int Index { get; set; } + public ushort[] Indices { get; set; } + public Vector3[] Vertices { get; set; } + public NavMeshEdge[] Edges { get; set; } + public void Init(YnvFile ynv, NavMeshPoly poly) { Ynv = ynv; RawData = poly; + LoadIndices(); + CalculatePosition(); //calc poly center for display purposes.. } + + public void LoadIndices() + { + //load indices, vertices and edges + var indices = Ynv.Indices; + var vertices = Ynv.Vertices; + var edges = Ynv.Edges; + 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; } + if (endid > indices.Count) + { return; } + if (endid > edges.Count) + { return; } + + Indices = new ushort[ic]; + Vertices = new Vector3[ic]; + Edges = new NavMeshEdge[ic]; + + int i = 0; + for (int id = startid; id < endid; id++) + { + var ind = indices[id]; + + Indices[i] = ind; + Vertices[i] = (ind < vc) ? vertices[ind] : Vector3.Zero; + Edges[i] = edges[id]; + + i++; + } + } + + public void SetPosition(Vector3 pos) { Vector3 delta = pos - Position; @@ -709,30 +747,15 @@ namespace CodeWalker.GameFiles public void CalculatePosition() { //calc poly center for display purposes. - var indices = Ynv.Indices; - var vertices = Ynv.Vertices; - if ((indices == null) || (vertices == null)) - { return; } - var vc = vertices.Count; - var ic = _RawData.IndexCount; - var startid = _RawData.IndexID; - var endid = startid + ic; - if (startid >= indices.Count) - { return; } - if (endid > indices.Count) - { return; } Vector3 pcenter = Vector3.Zero; - float pcount = 0.0f; - for (int id = startid; id < endid; id++) + if (Vertices != null) { - var ind = indices[id]; - if (ind >= vc) - { continue; } - - pcenter += vertices[ind]; - pcount += 1.0f; + for (int i = 0; i < Vertices.Length; i++) + { + pcenter += Vertices[i]; + } } - Position = pcenter * (1.0f / pcount); + Position = pcenter * (1.0f / ((float)Vertices?.Length)); } diff --git a/CodeWalker.Core/GameFiles/Resources/Nav.cs b/CodeWalker.Core/GameFiles/Resources/Nav.cs index 8f0e0c7..d28ef25 100644 --- a/CodeWalker.Core/GameFiles/Resources/Nav.cs +++ b/CodeWalker.Core/GameFiles/Resources/Nav.cs @@ -54,8 +54,8 @@ namespace CodeWalker.GameFiles public uint Unused_078h { get; set; } // 0x00000000 public uint Unused_07Ch { get; set; } // 0x00000000 public ulong IndicesPointer { get; set; } - public ulong AdjPolysPointer { get; set; } - public uint AdjPolysIndicesCount { get; set; } + public ulong EdgesPointer { get; set; } + public uint EdgesIndicesCount { get; set; } public NavMeshUintArray AdjAreaIDs { get; set; } public ulong PolysPointer { get; set; } public ulong SectorTreePointer { get; set; } @@ -79,7 +79,7 @@ namespace CodeWalker.GameFiles public NavMeshList Vertices { get; set; } public NavMeshList Indices { get; set; } - public NavMeshList AdjPolys { get; set; } + public NavMeshList Edges { get; set; } public NavMeshList Polys { get; set; } public NavMeshSector SectorTree { get; set; } public NavMeshPortal[] Portals { get; set; } @@ -109,8 +109,8 @@ namespace CodeWalker.GameFiles Unused_078h = reader.ReadUInt32(); Unused_07Ch = reader.ReadUInt32(); IndicesPointer = reader.ReadUInt64(); - AdjPolysPointer = reader.ReadUInt64(); - AdjPolysIndicesCount = reader.ReadUInt32(); + EdgesPointer = reader.ReadUInt64(); + EdgesIndicesCount = reader.ReadUInt32(); AdjAreaIDs = reader.ReadStruct(); PolysPointer = reader.ReadUInt64(); SectorTreePointer = reader.ReadUInt64(); @@ -135,7 +135,7 @@ namespace CodeWalker.GameFiles Vertices = reader.ReadBlockAt>(VerticesPointer); Indices = reader.ReadBlockAt>(IndicesPointer); - AdjPolys = reader.ReadBlockAt>(AdjPolysPointer); + Edges = reader.ReadBlockAt>(EdgesPointer); Polys = reader.ReadBlockAt>(PolysPointer); SectorTree = reader.ReadBlockAt(SectorTreePointer); Portals = reader.ReadStructsAt(PortalsPointer, PortalsCount); @@ -150,7 +150,7 @@ namespace CodeWalker.GameFiles VerticesPointer = (ulong)(Vertices != null ? Vertices.FilePosition : 0); IndicesPointer = (ulong)(Indices != null ? Indices.FilePosition : 0); - AdjPolysPointer = (ulong)(AdjPolys != null ? AdjPolys.FilePosition : 0); + EdgesPointer = (ulong)(Edges != null ? Edges.FilePosition : 0); PolysPointer = (ulong)(Polys != null ? Polys.FilePosition : 0); SectorTreePointer = (ulong)(SectorTree != null ? SectorTree.FilePosition : 0); PortalsPointer = (ulong)(PortalsBlock?.FilePosition ?? 0); @@ -169,8 +169,8 @@ namespace CodeWalker.GameFiles writer.Write(Unused_078h); writer.Write(Unused_07Ch); writer.Write(IndicesPointer); - writer.Write(AdjPolysPointer); - writer.Write(AdjPolysIndicesCount); + writer.Write(EdgesPointer); + writer.Write(EdgesIndicesCount); writer.WriteStruct(AdjAreaIDs); writer.Write(PolysPointer); writer.Write(SectorTreePointer); @@ -198,7 +198,7 @@ namespace CodeWalker.GameFiles var list = new List(base.GetReferences()); if (Vertices != null) list.Add(Vertices); if (Indices != null) list.Add(Indices); - if (AdjPolys != null) list.Add(AdjPolys); + if (Edges != null) list.Add(Edges); if (Polys != null) list.Add(Polys); if (SectorTree != null) list.Add(SectorTree); @@ -592,10 +592,10 @@ namespace CodeWalker.GameFiles - [TypeConverter(typeof(ExpandableObjectConverter))] public struct NavMeshAdjPoly + [TypeConverter(typeof(ExpandableObjectConverter))] public struct NavMeshEdge { - public NavMeshAdjPolyPart Unknown_0h { get; set; } - public NavMeshAdjPolyPart Unknown_4h { get; set; } + public NavMeshEdgePart Unknown_0h { get; set; } + public NavMeshEdgePart Unknown_4h { get; set; } public override string ToString() { @@ -604,7 +604,7 @@ namespace CodeWalker.GameFiles } } - [TypeConverter(typeof(ExpandableObjectConverter))] public struct NavMeshAdjPolyPart + [TypeConverter(typeof(ExpandableObjectConverter))] public struct NavMeshEdgePart { public uint Value { get; set; } @@ -623,7 +623,8 @@ namespace CodeWalker.GameFiles public override string ToString() { - return AreaIDInd.ToString() + ", " + PolyID.ToString() + ", " + Unk2.ToString() + ", " + Unk3.ToString(); + string pid = (PolyID == 0x3FFF) ? "-" : PolyID.ToString(); + return AreaIDInd.ToString() + ", " + pid + ", " + Unk2.ToString() + ", " + Unk3.ToString(); } } @@ -647,7 +648,7 @@ namespace CodeWalker.GameFiles //public int IndexUnk { get { return (IndexFlags >> 0) & 31; } } //always 0 - public int IndexCount { get { return (IndexFlags >> 5); } } + public int IndexCount { 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 = (ushort)((PartFlags & 0xF00F) | ((value & 0xFF) << 4)); } } From b18b1e76725d4fab653968c14fb73daa2577559c Mon Sep 17 00:00:00 2001 From: dexyfex Date: Wed, 2 May 2018 00:28:47 +1000 Subject: [PATCH 08/24] Nav mesh progress --- .../GameFiles/FileTypes/YnvFile.cs | 50 ++++++++++++++----- CodeWalker.Core/GameFiles/Resources/Nav.cs | 10 ++-- Project/Panels/EditYnvPolyPanel.Designer.cs | 30 +++++------ Project/Panels/EditYnvPolyPanel.cs | 12 ++--- 4 files changed, 64 insertions(+), 38 deletions(-) diff --git a/CodeWalker.Core/GameFiles/FileTypes/YnvFile.cs b/CodeWalker.Core/GameFiles/FileTypes/YnvFile.cs index 7658eed..f24ceb0 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/YnvFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/YnvFile.cs @@ -115,14 +115,6 @@ namespace CodeWalker.GameFiles poly.Init(this, polys[i]); poly.Index = i; Polys.Add(poly); - - if (poly.PortalType > 0) - { - if (poly.PortalType != 2) //seems to be what portal links need to understand.. - { } - - } - } } if (Nav.Portals != null) @@ -212,6 +204,7 @@ namespace CodeWalker.GameFiles var edgelist = new List(); var polylist = new List(); var portallist = new List(); + var portallinks = new List(); var vertdict = new Dictionary(); var blankedgepart1 = new NavMeshEdgePart() { Value = 0x0FFFE1 };//1, -, 1, 0 @@ -243,6 +236,12 @@ namespace CodeWalker.GameFiles edgelist.Add(e); } poly._RawData.IndexCount = vc; + poly._RawData.PortalLinkID = (uint)portallinks.Count;//these shouldn't be directly editable! + poly._RawData.PortalLinkCount = (byte)(poly.PortalLinks?.Length ?? 0); + if (poly.PortalLinks != null) + { + portallinks.AddRange(poly.PortalLinks); + } poly.Index = i;//this should be redundant... polylist.Add(poly.RawData); } @@ -303,7 +302,8 @@ namespace CodeWalker.GameFiles Nav.Portals = (portallist.Count > 0) ? portallist.ToArray() : null; Nav.PortalsCount = (uint)(Nav.Portals?.Length ?? 0); - //TODO: update portal links data..... + Nav.PortalLinks = (portallinks.Count > 0) ? portallinks.ToArray() : null; + Nav.PortalLinksCount = (uint)(Nav.PortalLinks?.Length ?? 0); for (int i = 0; i < Nav.Polys.ListParts.Count; i++) //reassign part id's on all the polys... @@ -572,8 +572,8 @@ namespace CodeWalker.GameFiles public ushort AreaID { get { return _RawData.AreaID; } set { _RawData.AreaID = value; } } public ushort PartID { get { return _RawData.PartID; } set { _RawData.PartID = value; } } - public ushort PortalLinkID { get { return _RawData.PortalLinkID; } set { _RawData.PortalLinkID = value; } } - public byte PortalType { get { return _RawData.PortalType; } set { _RawData.PortalType = value; } } + public uint PortalLinkID { get { return _RawData.PortalLinkID; } set { _RawData.PortalLinkID = value; } } + public byte PortalLinkCount { get { return _RawData.PortalLinkCount; } set { _RawData.PortalLinkCount = value; } } public byte Flags1 { get { return (byte)(_RawData.Unknown_00h & 0xFF); } set { _RawData.Unknown_00h = (ushort)((_RawData.Unknown_00h & 0xFF00) | (value & 0xFF)); } } public byte Flags2 { get { return (byte)((_RawData.Unknown_24h.Value >> 0) & 0xFF); } set { _RawData.Unknown_24h = ((_RawData.Unknown_24h.Value & 0xFFFFFF00u) | ((value & 0xFFu) << 0)); } } public byte Flags3 { get { return (byte)((_RawData.Unknown_24h.Value >> 9) & 0xFF); } set { _RawData.Unknown_24h = ((_RawData.Unknown_24h.Value & 0xFFFE01FFu) | ((value & 0xFFu) << 9)); } } @@ -621,6 +621,7 @@ namespace CodeWalker.GameFiles public ushort[] Indices { get; set; } public Vector3[] Vertices { get; set; } public NavMeshEdge[] Edges { get; set; } + public ushort[] PortalLinks { get; set; } public void Init(YnvFile ynv, NavMeshPoly poly) @@ -629,6 +630,7 @@ namespace CodeWalker.GameFiles RawData = poly; LoadIndices(); + LoadPortalLinks(); CalculatePosition(); //calc poly center for display purposes.. } @@ -669,6 +671,30 @@ namespace CodeWalker.GameFiles } } + public void LoadPortalLinks() + { + if (PortalLinkCount == 0) + { return; } + var links = Ynv.Nav?.PortalLinks; + if (links == null) + { return; } + + var ll = links.Length; + + PortalLinks = new ushort[PortalLinkCount]; + + int offset = (int)PortalLinkID; + for (int i = 0; i < PortalLinkCount; i++) + { + int idx = offset + i; + PortalLinks[i] = (idx < ll) ? links[idx] : (ushort)0; + } + + if (PortalLinkCount != 2) + { }//debug + + } + public void SetPosition(Vector3 pos) { @@ -725,7 +751,7 @@ namespace CodeWalker.GameFiles //if ((u5 & 8388608) > 0) colour.Red += 1.0f; //slope facing -X,-Y (southwest) //if (u5 >= 16777216) { } //other bits unused - var u1 = _RawData.PortalType; + var u1 = _RawData.PortalLinkCount; //if ((u1 & 1) > 0) colour.Red += 1.0f; //portal - don't interact? //if ((u1 & 2) > 0) colour.Green += 1.0f; //portal - ladder/fence interaction? //if ((u1 & 4) > 0) colour.Blue += 1.0f; //portal - fence interaction / go away from? diff --git a/CodeWalker.Core/GameFiles/Resources/Nav.cs b/CodeWalker.Core/GameFiles/Resources/Nav.cs index d28ef25..95aa63b 100644 --- a/CodeWalker.Core/GameFiles/Resources/Nav.cs +++ b/CodeWalker.Core/GameFiles/Resources/Nav.cs @@ -643,16 +643,16 @@ namespace CodeWalker.GameFiles public NavMeshAABB CellAABB { get; set; } public FlagsUint Unknown_24h { get; set; } public FlagsUint Unknown_28h { get; set; } - public ushort PartFlags { get; set; } - public ushort PortalLinkID { get; set; } + public uint PartFlags { get; set; } //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 PartUnk1 { get { return (PartFlags >> 0) & 0xF; } } //always 0 - public ushort PartID { get { return (ushort)((PartFlags >> 4) & 0xFF); } set { PartFlags = (ushort)((PartFlags & 0xF00F) | ((value & 0xFF) << 4)); } } - public byte PortalType { get { return (byte)((PartFlags >> 12) & 0xF); } set { PartFlags = (ushort)((PartFlags & 0x0FFF) | ((value & 0xF) << 12)); } } + 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 Unknown_28h_16 { get { return (ushort)((Unknown_28h.Value & 0xFFFF)); } set { Unknown_28h = (Unknown_28h.Value & 0xFFFF0000) | (value & 0xFFFFu); } } @@ -673,7 +673,7 @@ namespace CodeWalker.GameFiles Unknown_28h.Hex + ", " + //PartFlags.ToString() + ", " + //PartUnk1.ToString() + ", " + PartID.ToString() + ", " + - PortalType.ToString() + ", " + + PortalLinkCount.ToString() + ", " + PortalLinkID.ToString(); } } diff --git a/Project/Panels/EditYnvPolyPanel.Designer.cs b/Project/Panels/EditYnvPolyPanel.Designer.cs index 4830cec..6d7bf3a 100644 --- a/Project/Panels/EditYnvPolyPanel.Designer.cs +++ b/Project/Panels/EditYnvPolyPanel.Designer.cs @@ -46,14 +46,14 @@ this.label4 = new System.Windows.Forms.Label(); this.DeletePolyButton = new System.Windows.Forms.Button(); this.AddToProjectButton = new System.Windows.Forms.Button(); - this.PortalTypeUpDown = new System.Windows.Forms.NumericUpDown(); + this.PortalCountUpDown = new System.Windows.Forms.NumericUpDown(); this.label6 = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.AreaIDUpDown)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.PartIDUpDown)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.PortalIDUpDown)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.UnkXUpDown)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.UnkYUpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.PortalTypeUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.PortalCountUpDown)).BeginInit(); this.SuspendLayout(); // // AreaIDUpDown @@ -273,34 +273,34 @@ this.AddToProjectButton.UseVisualStyleBackColor = true; this.AddToProjectButton.Click += new System.EventHandler(this.AddToProjectButton_Click); // - // PortalTypeUpDown + // PortalCountUpDown // - this.PortalTypeUpDown.Location = new System.Drawing.Point(495, 12); - this.PortalTypeUpDown.Maximum = new decimal(new int[] { + this.PortalCountUpDown.Location = new System.Drawing.Point(495, 12); + this.PortalCountUpDown.Maximum = new decimal(new int[] { 15, 0, 0, 0}); - this.PortalTypeUpDown.Name = "PortalTypeUpDown"; - this.PortalTypeUpDown.Size = new System.Drawing.Size(57, 20); - this.PortalTypeUpDown.TabIndex = 8; - this.PortalTypeUpDown.ValueChanged += new System.EventHandler(this.PortalTypeUpDown_ValueChanged); + this.PortalCountUpDown.Name = "PortalCountUpDown"; + this.PortalCountUpDown.Size = new System.Drawing.Size(57, 20); + this.PortalCountUpDown.TabIndex = 8; + this.PortalCountUpDown.ValueChanged += new System.EventHandler(this.PortalCountUpDown_ValueChanged); // // label6 // this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(429, 14); + this.label6.Location = new System.Drawing.Point(424, 14); this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(60, 13); + this.label6.Size = new System.Drawing.Size(67, 13); this.label6.TabIndex = 7; - this.label6.Text = "Portal type:"; + this.label6.Text = "Portal count:"; // // EditYnvPolyPanel // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(562, 404); - this.Controls.Add(this.PortalTypeUpDown); + this.Controls.Add(this.PortalCountUpDown); this.Controls.Add(this.label6); this.Controls.Add(this.DeletePolyButton); this.Controls.Add(this.AddToProjectButton); @@ -327,7 +327,7 @@ ((System.ComponentModel.ISupportInitialize)(this.PortalIDUpDown)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.UnkXUpDown)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.UnkYUpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.PortalTypeUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.PortalCountUpDown)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -352,7 +352,7 @@ private System.Windows.Forms.Label label4; private System.Windows.Forms.Button DeletePolyButton; private System.Windows.Forms.Button AddToProjectButton; - private System.Windows.Forms.NumericUpDown PortalTypeUpDown; + private System.Windows.Forms.NumericUpDown PortalCountUpDown; private System.Windows.Forms.Label label6; } } \ No newline at end of file diff --git a/Project/Panels/EditYnvPolyPanel.cs b/Project/Panels/EditYnvPolyPanel.cs index 595fc73..17b54d2 100644 --- a/Project/Panels/EditYnvPolyPanel.cs +++ b/Project/Panels/EditYnvPolyPanel.cs @@ -48,7 +48,7 @@ namespace CodeWalker.Project.Panels AreaIDUpDown.Value = 0; PartIDUpDown.Value = 0; PortalIDUpDown.Value = 0; - PortalTypeUpDown.Value = 0; + PortalCountUpDown.Value = 0; SetCheckedListBoxValues(FlagsCheckedListBox1, 0); SetCheckedListBoxValues(FlagsCheckedListBox2, 0); SetCheckedListBoxValues(FlagsCheckedListBox3, 0); @@ -65,7 +65,7 @@ namespace CodeWalker.Project.Panels AreaIDUpDown.Value = YnvPoly.AreaID; PartIDUpDown.Value = YnvPoly.PartID; PortalIDUpDown.Value = YnvPoly.PortalLinkID; - PortalTypeUpDown.Value = YnvPoly.PortalType; + PortalCountUpDown.Value = YnvPoly.PortalLinkCount; SetCheckedListBoxValues(FlagsCheckedListBox1, YnvPoly.Flags1); SetCheckedListBoxValues(FlagsCheckedListBox2, YnvPoly.Flags2); SetCheckedListBoxValues(FlagsCheckedListBox3, YnvPoly.Flags3); @@ -152,16 +152,16 @@ namespace CodeWalker.Project.Panels } } - private void PortalTypeUpDown_ValueChanged(object sender, EventArgs e) + private void PortalCountUpDown_ValueChanged(object sender, EventArgs e) { if (populatingui) return; if (YnvPoly == null) return; - byte portalunk = (byte)PortalTypeUpDown.Value; + byte portalcount = (byte)PortalCountUpDown.Value; lock (ProjectForm.ProjectSyncRoot) { - if (YnvPoly.PortalType != portalunk) + if (YnvPoly.PortalLinkCount != portalcount) { - YnvPoly.PortalType = portalunk; + YnvPoly.PortalLinkCount = portalcount; ProjectForm.SetYnvHasChanged(true); } } From bab1bee46097b8d07bcf50b13f1301b4b7b3f0aa Mon Sep 17 00:00:00 2001 From: dexyfex Date: Sat, 5 May 2018 01:58:23 +1000 Subject: [PATCH 09/24] Nav mesh progress --- CodeWalker.Core/CodeWalker.Core.csproj | 2 + .../FileTypes/Builders/YndBuilder.cs | 12 + .../FileTypes/Builders/YnvBuilder.cs | 443 ++++++++++++++++++ .../GameFiles/FileTypes/YnvFile.cs | 174 ++++++- CodeWalker.Core/GameFiles/Resources/Nav.cs | 116 ++++- CodeWalker.Core/World/Space.cs | 15 +- 6 files changed, 738 insertions(+), 24 deletions(-) create mode 100644 CodeWalker.Core/GameFiles/FileTypes/Builders/YndBuilder.cs create mode 100644 CodeWalker.Core/GameFiles/FileTypes/Builders/YnvBuilder.cs diff --git a/CodeWalker.Core/CodeWalker.Core.csproj b/CodeWalker.Core/CodeWalker.Core.csproj index 943760a..e613082 100644 --- a/CodeWalker.Core/CodeWalker.Core.csproj +++ b/CodeWalker.Core/CodeWalker.Core.csproj @@ -48,6 +48,8 @@ + + diff --git a/CodeWalker.Core/GameFiles/FileTypes/Builders/YndBuilder.cs b/CodeWalker.Core/GameFiles/FileTypes/Builders/YndBuilder.cs new file mode 100644 index 0000000..fba7708 --- /dev/null +++ b/CodeWalker.Core/GameFiles/FileTypes/Builders/YndBuilder.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CodeWalker.Core.GameFiles.FileTypes.Builders +{ + public class YndBuilder + { + } +} diff --git a/CodeWalker.Core/GameFiles/FileTypes/Builders/YnvBuilder.cs b/CodeWalker.Core/GameFiles/FileTypes/Builders/YnvBuilder.cs new file mode 100644 index 0000000..1173ae4 --- /dev/null +++ b/CodeWalker.Core/GameFiles/FileTypes/Builders/YnvBuilder.cs @@ -0,0 +1,443 @@ +using CodeWalker.GameFiles; +using CodeWalker.World; +using SharpDX; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CodeWalker.Core.GameFiles.FileTypes.Builders +{ + public class YnvBuilder + { + + + private List PolyList = new List(); + + private SpaceNavGrid NavGrid = null; + private List YnvFiles = null; + + public YnvPoly AddPoly(Vector3[] verts) + { + if ((verts == null) || (verts.Length < 3)) + { return null; } + + YnvPoly poly = new YnvPoly(); + poly.AreaID = 0x3FFF; + poly.Index = PolyList.Count; + poly.Vertices = verts; + + PolyList.Add(poly); + + return poly; + } + + + + + + + public List Build(bool forVehicle) + { + NavGrid = new SpaceNavGrid(); + YnvFiles = new List(); + + if (forVehicle) //for vehicle YNV, only need a single ynv, no splitting + { + //TODO! + } + else //for static world ynv, need to split polys and generate a set of ynv's. + { + //1: split polys going over nav grid borders, first by X then by Y + var splitpolysX = SplitPolys(PolyList, true); + var splitpolysY = SplitPolys(splitpolysX, false); + + //2: assign polys into their new ynv's + AddPolysIntoGrid(splitpolysY); + + + //3: fix up generated ynv's + FinalizeYnvs(YnvFiles); + + } + + return YnvFiles; + } + + + + + + private List SplitPolys(List polys, bool xaxis) + { + var newpolys = new List(); + + var verts1 = new List(); + var verts2 = new List(); + var edges1 = new List(); + var edges2 = new List(); + + var polysplits = new Dictionary(); + + foreach (var poly in polys) //split along borders + { + var verts = poly.Vertices; + if (verts == null) + { continue; }//ignore empty polys.. + if (verts.Length < 3) + { continue; }//not enough verts for a triangle! + + Vector2I gprev = NavGrid.GetCellPos(verts[0]); + int split1 = 0; + int split2 = 0; + for (int i = 1; i < verts.Length; i++) + { + Vector2I g = NavGrid.GetCellPos(verts[i]); + int g1 = xaxis ? g.X : g.Y; + int g2 = xaxis ? gprev.X : gprev.Y; + if (g1 != g2) //this poly is crossing a border + { + if (split1 == 0) { split1 = i; } + else { split2 = i; break; } + } + gprev = g; + } + if (split1 > 0) + { + var split2beg = (split2 > 0) ? split2 - 1 : verts.Length - 1; + var split2end = split2beg + 1; + var sv11 = verts[split1 - 1]; + var sv12 = verts[split1]; + var sv21 = verts[split2beg]; + var sv22 = verts[split2]; + var sp1 = GetSplitPos(sv11, sv12, xaxis); + var sp2 = GetSplitPos(sv21, sv22, xaxis); + + //if ((sp1 == sp2) || (sp1 == sv11) || (sp1 == sv12) || (sp2 == sv21) || (sp2 == sv22)) + if (!IsValidSplit(sp1, sp2, sv11, sv12, sv21, sv22)) + { + //split did nothing, just leave this poly alone + newpolys.Add(poly); + } + else + { + //split it! + var poly1 = new YnvPoly(); + var poly2 = new YnvPoly(); + poly1.RawData = poly.RawData; + poly2.RawData = poly.RawData; + verts1.Clear(); + verts2.Clear(); + + 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]); + + verts2.Add(sp1); + for (int i = split1; i < split2end; i++) verts2.Add(verts[i]); + verts2.Add(sp2); + + poly1.Vertices = verts1.ToArray(); + poly2.Vertices = verts2.ToArray(); + + + //save this information for the edge splitting pass + var polysplit = new YnvPolySplit(); + polysplit.Orig = poly; + polysplit.New1 = poly1; + polysplit.New2 = poly2; + polysplit.Split1 = split1; + polysplit.Split2 = split2end; + polysplits[poly] = polysplit; + + + newpolys.Add(poly1); + newpolys.Add(poly2); + } + } + else + { + //no need to split + newpolys.Add(poly); + } + } + + + foreach (var polysplit in polysplits.Values) //build new edges for split polys + { + //the two edges that were split each need to be turned into two new edges (1 for each poly). + //also, the split itself needs to be added as a new edge to the original poly. + + var poly = polysplit.Orig; + var poly1 = polysplit.New1; + var poly2 = polysplit.New2; + var edges = poly.Edges; + var verts = poly.Vertices; + var ec = edges?.Length ?? 0; + if (ec <= 0) + { continue; }//shouldn't happen - no edges? + if (ec != poly.Vertices?.Length) + { continue; }//shouldn't happen + + var split1beg = polysplit.Split1 - 1; + var split1end = polysplit.Split1; + var split2beg = polysplit.Split2 - 1; + var split2end = polysplit.Split2; + + edges1.Clear(); + edges2.Clear(); + + var se1 = edges[split1beg]; //the two original edges that got split + var se2 = edges[split2beg]; + var sp1 = TryGetSplit(polysplits, se1.Poly1);//could use Poly2, but they should be the same.. + var sp2 = TryGetSplit(polysplits, se2.Poly1); + var sv1a = verts[split1beg]; + var sv2a = verts[split2beg]; + var sp1a = sp1?.GetNearest(sv1a); + var sp1b = sp1?.GetOther(sp1a); + var sp2b = sp2?.GetNearest(sv2a); + var sp2a = sp2?.GetOther(sp2b); + var edge1a = new YnvEdge(se1, sp1a); + var edge1b = new YnvEdge(se1, sp1b); + var edge2a = new YnvEdge(se2, sp2a); + var edge2b = new YnvEdge(se2, sp2b); + var splita = new YnvEdge(se1, poly2); + var splitb = new YnvEdge(se1, poly1); + + for (int i = 0; i < split1beg; i++) edges1.Add(edges[i]);//untouched edges + edges1.Add(edge1a); + edges1.Add(splita); + edges1.Add(edge2a); + for (int i = split2end; i < ec; i++) edges1.Add(edges[i]);//untouched edges + + edges2.Add(edge1b); + for (int i = split1end; i < split2beg; i++) edges2.Add(edges[i]);//untouched edges + edges2.Add(edge2b); + edges2.Add(splitb); + + + poly1.Edges = edges1.ToArray(); + poly2.Edges = edges2.ToArray(); + + if (poly1.Edges.Length != poly1.Vertices.Length) + { }//debug + if (poly2.Edges.Length != poly2.Vertices.Length) + { }//debug + + } + + 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?) + 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 + if (edge.Poly1 != edge.Poly2) + { continue; }//shouldn't happen? + if (edge.Poly1 == null) + { continue; }//probably this edge joins to nothing + + + YnvPolySplit polysplit; + if (polysplits.TryGetValue(edge.Poly1, out polysplit)) + { + var newpoly = polysplit.GetNearest(vert); + if (newpoly == null) + { }//debug + edge.Poly1 = newpoly; + edge.Poly2 = newpoly; + } + + } + } + + + return newpolys; + } + + private Vector3 GetSplitPos(Vector3 a, Vector3 b, bool xaxis) + { + Vector3 ca = NavGrid.GetCellRel(a); + Vector3 cb = NavGrid.GetCellRel(b); + float fa = xaxis ? ca.X : ca.Y; + float fb = xaxis ? cb.X : cb.Y; + float f = 0; + if (fb > fa) + { + float ib = (float)Math.Floor(fb); + f = (ib - fa) / (fb - fa); + } + else + { + float ia = (float)Math.Floor(fa); + f = (fa - ia) / (fa - fb); + } + if (f < 0.0f) + { }//debug + if (f > 1.0f) + { }//debug + 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) + { + 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; + return true; + } + + private bool XYEqual(Vector3 v1, Vector3 v2) + { + return ((v1.X == v2.X) && (v1.Y == v2.Y)); + } + + private class YnvPolySplit + { + public YnvPoly Orig; + public YnvPoly New1; + public YnvPoly New2; + public int Split1; + public int Split2; + public YnvPoly GetNearest(Vector3 v) + { + if (New1?.Vertices == null) return New2; + if (New2?.Vertices == null) return New1; + float len1 = float.MaxValue; + float len2 = float.MaxValue; + for (int i = 0; i < New1.Vertices.Length; i++) + { + len1 = Math.Min(len1, (v - New1.Vertices[i]).LengthSquared()); + } + if (len1 == 0.0f) return New1; + for (int i = 0; i < New2.Vertices.Length; i++) + { + len2 = Math.Min(len2, (v - New2.Vertices[i]).LengthSquared()); + } + if (len2 == 0.0f) return New2; + return (len1 <= len2) ? New1 : New2; + } + public YnvPoly GetOther(YnvPoly p) + { + if (p == New1) return New2; + return New1; + } + } + private YnvPolySplit TryGetSplit(Dictionary polysplits, YnvPoly poly) + { + if (poly == null) return null; + YnvPolySplit r = null; + polysplits.TryGetValue(poly, out r); + return r; + } + + + + private void AddPolysIntoGrid(List polys) + { + foreach (var poly in polys) + { + poly.CalculatePosition(); + var pos = poly.Position; + var cell = NavGrid.GetCell(pos); + + var ynv = cell.Ynv; + if (ynv == null) + { + ynv = new YnvFile(); + ynv.Name = "navmesh[" + cell.FileX.ToString() + "][" + cell.FileY.ToString() + "]"; + ynv.Nav = new NavMesh(); + ynv.Nav.SetDefaults(false); + ynv.Nav.AABBSize = new Vector3(NavGrid.CellSize, NavGrid.CellSize, 0.0f); + ynv.Nav.SectorTree = new NavMeshSector(); + ynv.Nav.SectorTree.AABBMin = new Vector4(NavGrid.GetCellMin(cell), 0.0f); + ynv.Nav.SectorTree.AABBMax = new Vector4(NavGrid.GetCellMax(cell), 0.0f); + ynv.AreaID = cell.X + cell.Y * 100; + ynv.Polys = new List(); + cell.Ynv = ynv; + YnvFiles.Add(ynv); + } + + poly.AreaID = (ushort)ynv.AreaID; + poly.Index = ynv.Polys.Count; + poly.Ynv = ynv; + ynv.Polys.Add(poly); + + } + } + + private void FinalizeYnvs(List ynvs) + { + + foreach (var ynv in ynvs) + { + //find zmin and zmax and update AABBSize and SectorTree root + float zmin = float.MaxValue; + float zmax = float.MinValue; + foreach (var poly in ynv.Polys) + { + foreach (var vert in poly.Vertices) + { + zmin = Math.Min(zmin, vert.Z); + zmax = Math.Max(zmax, vert.Z); + } + } + var yn = ynv.Nav; + var ys = yn.SectorTree; + yn.AABBSize = new Vector3(yn.AABBSize.X, yn.AABBSize.Y, zmax - zmin); + ys.AABBMin = new Vector4(ys.AABBMin.X, ys.AABBMin.Y, zmin, 0.0f); + ys.AABBMax = new Vector4(ys.AABBMax.X, ys.AABBMax.Y, zmax, 0.0f); + + + ynv.UpdateContentFlags(false); + + + + //fix up flags on edges that cross ynv borders + foreach (var poly in ynv.Polys) + { + bool border = false; + if (poly.Edges == null) + { continue; } + foreach (var edge in poly.Edges) + { + if (edge.Poly1 != null) + { + if (edge.Poly1.AreaID != poly.AreaID) + { + //edge._RawData._Poly2.Unk3 = 4;// edge._RawData._Poly2.Unk3 | 4; + + //DEBUG don't join edges + edge.Poly1 = null; + edge.Poly2 = null; + edge.AreaID1 = 0x3FFF; + edge.AreaID2 = 0x3FFF; + edge._RawData._Poly1.PolyID = 0x3FFF; + edge._RawData._Poly2.PolyID = 0x3FFF; + edge._RawData._Poly1.Unk2 = 1; + edge._RawData._Poly2.Unk2 = 1; + edge._RawData._Poly1.Unk3 = 0; + edge._RawData._Poly2.Unk3 = 0; + + //border = true; + } + } + } + poly.B19_IsCellEdge = border; + } + + + } + + } + + } +} diff --git a/CodeWalker.Core/GameFiles/FileTypes/YnvFile.cs b/CodeWalker.Core/GameFiles/FileTypes/YnvFile.cs index f24ceb0..5118acb 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/YnvFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/YnvFile.cs @@ -14,7 +14,7 @@ namespace CodeWalker.GameFiles public List Vertices { get; set; } public List Indices { get; set; } - public List Edges { get; set; } + public List Edges { get; set; } public List Polys { get; set; } public List Portals { get; set; } public List Points { get; set; } @@ -103,7 +103,14 @@ namespace CodeWalker.GameFiles } if (Nav.Edges != null) { - Edges = Nav.Edges.GetFullList(); + var edges = Nav.Edges.GetFullList(); + Edges = new List(edges.Count); + for (int i = 0; i < edges.Count; i++) + { + YnvEdge edge = new YnvEdge(); + edge.Init(this, edges[i]); + Edges.Add(edge); + } } if (Nav.Polys != null) { @@ -207,9 +214,8 @@ namespace CodeWalker.GameFiles var portallinks = new List(); var vertdict = new Dictionary(); - var blankedgepart1 = new NavMeshEdgePart() { Value = 0x0FFFE1 };//1, -, 1, 0 - var blankedgepart2 = new NavMeshEdgePart() { Value = 0x2FFFE1 };//1, -, 1, 1 - var blankedge = new NavMeshEdge() { Unknown_0h = blankedgepart1, Unknown_4h = blankedgepart2 }; + var areadict = new Dictionary(); + var arealist = new List(); if (Polys != null) //rebuild vertices, indices, edges and polys lists from poly data. { @@ -217,10 +223,12 @@ namespace CodeWalker.GameFiles { var poly = Polys[i]; var vc = poly.Vertices?.Length ?? 0; + //poly.AreaID = (ushort)Nav.AreaID; + poly._RawData.IndexID = (ushort)indslist.Count; for (int n = 0; n < vc; n++) { Vector3 v = poly.Vertices[n]; - NavMeshEdge e = ((poly.Edges != null) && (n < poly.Edges.Length)) ? poly.Edges[n] : blankedge; + YnvEdge e = ((poly.Edges != null) && (n < poly.Edges.Length)) ? poly.Edges[n] : null; ushort ind; if (!vertdict.TryGetValue(v, out ind)) { @@ -233,7 +241,40 @@ namespace CodeWalker.GameFiles poly.Indices[n] = ind; } indslist.Add(ind); - edgelist.Add(e); + + NavMeshEdge edge; + if (e != null) + { + if (e.Poly1 != null) + { + e.PolyID1 = (uint)e.Poly1.Index; + e.AreaID1 = e.Poly1.AreaID; + if (e.AreaID1 == 0x3FFF) + { }//debug + } + if (e.Poly2 != null) + { + e.PolyID2 = (uint)e.Poly2.Index; + e.AreaID2 = e.Poly2.AreaID; + if (e.AreaID2 == 0x3FFF) + { }//debug + } + if ((e.AreaID1 == 0) || (e.AreaID2 == 0)) + { }//debug + e._RawData._Poly1.AreaIDInd = EnsureEdgeAreaID(e.AreaID1, areadict, arealist); + e._RawData._Poly2.AreaIDInd = EnsureEdgeAreaID(e.AreaID2, areadict, arealist); + edge = e.RawData; + } + else + { + var areaind = EnsureEdgeAreaID(0x3FFF, areadict, arealist); + edge = new NavMeshEdge();//create an empty edge + edge._Poly1.PolyID = 0x3FFF; + edge._Poly2.PolyID = 0x3FFF; + edge._Poly1.AreaIDInd = areaind; + edge._Poly2.AreaIDInd = areaind; + } + edgelist.Add(edge); } poly._RawData.IndexCount = vc; poly._RawData.PortalLinkID = (uint)portallinks.Count;//these shouldn't be directly editable! @@ -243,6 +284,7 @@ namespace CodeWalker.GameFiles portallinks.AddRange(poly.PortalLinks); } poly.Index = i;//this should be redundant... + poly.CalculateAABB();//make sure this is up to date! polylist.Add(poly.RawData); } } @@ -293,18 +335,25 @@ namespace CodeWalker.GameFiles Nav.Vertices.RebuildList(vertlist); + Nav.VerticesCount = Nav.Vertices.ItemCount; Nav.Indices.RebuildList(indslist); Nav.Edges.RebuildList(edgelist); + Nav.EdgesIndicesCount = Nav.Indices.ItemCount; Nav.Polys.RebuildList(polylist); + Nav.PolysCount = Nav.Polys.ItemCount; Nav.Portals = (portallist.Count > 0) ? portallist.ToArray() : null; Nav.PortalsCount = (uint)(Nav.Portals?.Length ?? 0); Nav.PortalLinks = (portallinks.Count > 0) ? portallinks.ToArray() : null; Nav.PortalLinksCount = (uint)(Nav.PortalLinks?.Length ?? 0); + var adjAreaIds = new NavMeshUintArray(); + adjAreaIds.Set(arealist.ToArray()); + Nav.AdjAreaIDs = adjAreaIds; + for (int i = 0; i < Nav.Polys.ListParts.Count; i++) //reassign part id's on all the polys... { @@ -337,12 +386,27 @@ namespace CodeWalker.GameFiles } + private uint EnsureEdgeAreaID(uint areaid, Dictionary areadict, List arealist) + { + uint ind; + if (!areadict.TryGetValue(areaid, out ind)) + { + ind = (uint)arealist.Count; + areadict[areaid] = ind; + arealist.Add(areaid); + } + return ind; + } + + private void BuildSectorTree(NavMeshSector node, int depth, ref uint pointindex) { Vector3 min = node.AABBMin.XYZ(); Vector3 max = node.AABBMax.XYZ(); Vector3 cen = (min + max) * 0.5f; + //totbytes += (uint)node.BlockLength; + if (depth <= 0) { //go through polys and points and create new lists for this node @@ -351,6 +415,8 @@ namespace CodeWalker.GameFiles data.PointsStartID = pointindex; + //totbytes += (uint)data.BlockLength; + if (Polys != null) { List polyids = new List(); @@ -367,6 +433,7 @@ namespace CodeWalker.GameFiles { data.PolyIDs = polyids.ToArray(); } + //totbytes += (uint)(polyids.Count * 2); } if (Points != null) @@ -385,6 +452,7 @@ namespace CodeWalker.GameFiles data.Points = points.ToArray(); pointindex += (uint)points.Count; } + //totbytes += (uint)(points.Count * 8); } } @@ -441,6 +509,18 @@ namespace CodeWalker.GameFiles + public void UpdateContentFlags(bool vehicle) + { + NavMeshFlags f = NavMeshFlags.None; + //if (Nav.VerticesCount > 0) f = f | NavMeshFlags.Vertices; + //if (Nav.PortalsCount > 0) f = f | NavMeshFlags.Portals; + if (Polys?.Count > 0) f = f | NavMeshFlags.Vertices; + if (Portals?.Count > 0) f = f | NavMeshFlags.Portals; + if (vehicle) f = f | NavMeshFlags.Vehicle; + else f = f | NavMeshFlags.Unknown8; + Nav.ContentFlags = f; + } + public void UpdateAllNodePositions() @@ -566,9 +646,9 @@ namespace CodeWalker.GameFiles [TypeConverter(typeof(ExpandableObjectConverter))] public class YnvPoly { public NavMeshPoly _RawData; + public NavMeshPoly RawData { get { return _RawData; } set { _RawData = value; } } public YnvFile Ynv { get; set; } - public NavMeshPoly RawData { get { return _RawData; } set { _RawData = value; } } public ushort AreaID { get { return _RawData.AreaID; } set { _RawData.AreaID = value; } } public ushort PartID { get { return _RawData.PartID; } set { _RawData.PartID = value; } } @@ -620,7 +700,7 @@ namespace CodeWalker.GameFiles public ushort[] Indices { get; set; } public Vector3[] Vertices { get; set; } - public NavMeshEdge[] Edges { get; set; } + public YnvEdge[] Edges { get; set; } public ushort[] PortalLinks { get; set; } @@ -656,7 +736,7 @@ namespace CodeWalker.GameFiles Indices = new ushort[ic]; Vertices = new Vector3[ic]; - Edges = new NavMeshEdge[ic]; + Edges = new YnvEdge[ic]; int i = 0; for (int id = startid; id < endid; id++) @@ -781,9 +861,28 @@ namespace CodeWalker.GameFiles pcenter += Vertices[i]; } } - Position = pcenter * (1.0f / ((float)Vertices?.Length)); + float c = ((float)Vertices?.Length); + if (c == 0.0f) c = 1.0f; + Position = pcenter * (1.0f / c); } + public void CalculateAABB() + { + Vector3 min = Vector3.Zero; + Vector3 max = Vector3.Zero; + if ((Vertices != 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]); + } + } + + _RawData.CellAABB = new NavMeshAABB() { Min = min, Max = max }; + } public override string ToString() @@ -919,4 +1018,57 @@ namespace CodeWalker.GameFiles } + + + [TypeConverter(typeof(ExpandableObjectConverter))] public class YnvEdge + { + public NavMeshEdge _RawData; + public NavMeshEdge RawData { get { return _RawData; } set { _RawData = value; } } + public YnvFile Ynv { get; set; } + + + public uint AreaID1 { get; set; } + public uint AreaID2 { get; set; } + public uint PolyID1 { get { return _RawData._Poly1.PolyID; } set { _RawData._Poly1.PolyID = value; } } + public uint PolyID2 { get { return _RawData._Poly2.PolyID; } set { _RawData._Poly2.PolyID = value; } } + public YnvPoly Poly1 { get; set; } + public YnvPoly Poly2 { get; set; } + + + public YnvEdge() { } + public YnvEdge(YnvEdge copy, YnvPoly poly) + { + _RawData = copy._RawData; + _RawData._Poly1.PolyID = 0x3FFF; + _RawData._Poly2.PolyID = 0x3FFF; + Poly1 = poly; + Poly2 = poly; + AreaID1 = 0x3FFF; + AreaID2 = 0x3FFF; + } + + public void Init(YnvFile ynv, NavMeshEdge edge) + { + Ynv = ynv; + RawData = edge; + + if (ynv.Nav == null) return; + var n = ynv.Nav; + + 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(); + } + + } } diff --git a/CodeWalker.Core/GameFiles/Resources/Nav.cs b/CodeWalker.Core/GameFiles/Resources/Nav.cs index 95aa63b..cf5bd53 100644 --- a/CodeWalker.Core/GameFiles/Resources/Nav.cs +++ b/CodeWalker.Core/GameFiles/Resources/Nav.cs @@ -158,6 +158,39 @@ namespace CodeWalker.GameFiles + //uint totbytes = 0; + //Stack sectorstack = new Stack(); + //if (SectorTree != null) sectorstack.Push(SectorTree); + //while (sectorstack.Count > 0) + //{ + // var sector = sectorstack.Pop(); + // if (sector.SubTree1 != null) sectorstack.Push(sector.SubTree1); + // if (sector.SubTree2 != null) sectorstack.Push(sector.SubTree2); + // if (sector.SubTree3 != null) sectorstack.Push(sector.SubTree3); + // if (sector.SubTree4 != null) sectorstack.Push(sector.SubTree4); + // if (sector.Data != null) + // { + // var sdata = sector.Data; + // totbytes += (uint)(sdata.PolyIDsBlock?.BlockLength ?? 0); + // totbytes += (uint)(sdata.PointsBlock?.BlockLength ?? 0); + // } + //} + //totbytes += PadSize(VerticesCount * (uint)Vertices.ItemSize); + //totbytes += PadSize(EdgesIndicesCount * (uint)Indices.ItemSize); + //totbytes += PadSize(EdgesIndicesCount * (uint)Edges.ItemSize); + //totbytes += PadSize(PolysCount * (uint)Polys.ItemSize); + ////totbytes += (uint)BlockLength; + //totbytes += (uint)Vertices.ListParts.BlockLength;//Vertices.ListPartsCount * 16; + //totbytes += (uint)Indices.ListParts.BlockLength;//Indices.ListPartsCount * 16; + //totbytes += (uint)Edges.ListParts.BlockLength;//Edges.ListPartsCount * 16; + //totbytes += (uint)Polys.ListParts.BlockLength;//Polys.ListPartsCount * 16; + //totbytes += (uint)(PortalsBlock?.BlockLength ?? 0);//PortalsCount * 28; + //totbytes += (uint)(PortalLinksBlock?.BlockLength ?? 0);//PortalLinksCount * 2; + //int remaining = ((int)TotalBytes) - ((int)totbytes); + //if (totbytes != TotalBytes) + //{ } + + writer.Write((uint)ContentFlags); writer.Write(VersionUnk1); writer.Write(Unused_018h); @@ -192,6 +225,12 @@ namespace CodeWalker.GameFiles writer.Write(Unused_16Ch); } + private uint PadSize(uint s) + { + const uint align = 16; + if ((s % align) != 0) s += (align - (s % align)); + return s; + } public override IResourceBlock[] GetReferences() { @@ -221,6 +260,15 @@ namespace CodeWalker.GameFiles } + + public void SetDefaults(bool vehicle) + { + VersionUnk1 = 0x00010011; + VersionUnk2 = vehicle ? 0 : 0x85CB3561; + Transform = Matrix.Identity; + } + + public override string ToString() { return "(Size: " + FloatUtil.GetVector3String(AABBSize) + ")"; @@ -325,6 +373,50 @@ namespace CodeWalker.GameFiles } } + public uint Get(uint i) + { + switch (i) + { + 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; + } + } + + public void Set(uint[] arr) + { + Values = arr; + } public override string ToString() { @@ -459,7 +551,7 @@ namespace CodeWalker.GameFiles } ListParts = parts; ListOffsets = offsets.ToArray(); - + ItemCount = (uint)items.Count; } @@ -594,13 +686,15 @@ namespace CodeWalker.GameFiles [TypeConverter(typeof(ExpandableObjectConverter))] public struct NavMeshEdge { - public NavMeshEdgePart Unknown_0h { get; set; } - public NavMeshEdgePart Unknown_4h { get; set; } + 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 override string ToString() { - return //Unknown_0h.Bin + " | " + Unknown_4h.Bin + " | " + - Unknown_0h.ToString() + " | " + Unknown_4h.ToString(); + return //Poly1.Bin + " | " + Poly2.Bin + " | " + + _Poly1.ToString() + " | " + _Poly2.ToString(); } } @@ -616,10 +710,10 @@ namespace CodeWalker.GameFiles } } - public uint AreaIDInd { get { return (Value >> 0) & 0x1F; } } - public uint PolyID { get { return (Value >> 5) & 0x3FFF; } } - public uint Unk2 { get { return (Value >> 19) & 0x3; } } - public uint Unk3 { get { return (Value >> 21) & 0x7FF; } } + 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 override string ToString() { @@ -791,8 +885,8 @@ namespace CodeWalker.GameFiles public ushort[] PolyIDs { get; set; } public NavMeshPoint[] Points { get; set; } - private ResourceSystemStructBlock PolyIDsBlock = null; - private ResourceSystemStructBlock PointsBlock = null; + public ResourceSystemStructBlock PolyIDsBlock = null; + public ResourceSystemStructBlock PointsBlock = null; public override void Read(ResourceDataReader reader, params object[] parameters) { diff --git a/CodeWalker.Core/World/Space.cs b/CodeWalker.Core/World/Space.cs index 1505c0a..fbad2a2 100644 --- a/CodeWalker.Core/World/Space.cs +++ b/CodeWalker.Core/World/Space.cs @@ -2043,7 +2043,10 @@ namespace CodeWalker.World } - + public Vector3 GetCellRel(Vector3 p)//float value in cell coords + { + return (p - new Vector3(CornerX, CornerY, 0)) * CellSizeInv; + } public Vector2I GetCellPos(Vector3 p) { Vector3 ind = (p - new Vector3(CornerX, CornerY, 0)) * CellSizeInv; @@ -2069,7 +2072,15 @@ namespace CodeWalker.World } - + public Vector3 GetCellMin(SpaceNavGridCell cell) + { + Vector3 c = new Vector3(cell.X, cell.Y, 0); + return new Vector3(CornerX, CornerY, 0) + (c * CellSize); + } + public Vector3 GetCellMax(SpaceNavGridCell cell) + { + return GetCellMin(cell) + new Vector3(CellSize, CellSize, 0.0f); + } } public class SpaceNavGridCell From 4c131fa0af74ea74a1ab3540dfd03c48ea664ff1 Mon Sep 17 00:00:00 2001 From: dexyfex Date: Sun, 6 May 2018 14:55:54 +1000 Subject: [PATCH 10/24] Nav mesh progress --- .../FileTypes/Builders/YnvBuilder.cs | 52 ++++++++++++++----- .../GameFiles/FileTypes/YnvFile.cs | 19 +++++++ 2 files changed, 58 insertions(+), 13 deletions(-) diff --git a/CodeWalker.Core/GameFiles/FileTypes/Builders/YnvBuilder.cs b/CodeWalker.Core/GameFiles/FileTypes/Builders/YnvBuilder.cs index 1173ae4..9bba059 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/Builders/YnvBuilder.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/Builders/YnvBuilder.cs @@ -11,6 +11,30 @@ namespace CodeWalker.Core.GameFiles.FileTypes.Builders { public class YnvBuilder { + /* + * + * YnvBuilder by dexyfex + * + * This class allows for conversion of navmesh data in a generic format into .ynv files. + * The usage is to call AddPoly() with an array of vertex positions for each polygon. + * Polygons should be wound in an anticlockwise direction. + * The returned YnvPoly object needs to have its Edges array set by the importer. + * YnvPoly.Edges is an array of YnvEdge, with one edge for each vertex in the poly. + * The first edge should join the first and second vertices, and the last edge should + * join the last and first vertices. + * The YnvEdge Poly1 and Poly2 both need to be set to the same value, which is the + * corresponding YnvPoly object that was returned by AddPoly. + * Flags values on the polygons and edges also need to be set by the importer. + * + * Once the polygons and edges have all been added, the Build() method should be called, + * which will return a list of YnvFile objects. Call the Save() method on each of those + * to get the byte array for the .ynv file. The correct filename is given by the + * YnvFile.Name property. + * Note that the .ynv building process will split polygons that cross .ynv area borders, + * and assign all the new polygons into the correct .ynv's. + * + */ + private List PolyList = new List(); @@ -413,21 +437,23 @@ namespace CodeWalker.Core.GameFiles.FileTypes.Builders { if (edge.Poly1.AreaID != poly.AreaID) { - //edge._RawData._Poly2.Unk3 = 4;// edge._RawData._Poly2.Unk3 | 4; + edge._RawData._Poly1.Unk2 = 0;//crash without this + edge._RawData._Poly2.Unk2 = 0;//crash without this + edge._RawData._Poly2.Unk3 = 4;////// edge._RawData._Poly2.Unk3 | 4; + border = true; - //DEBUG don't join edges - edge.Poly1 = null; - edge.Poly2 = null; - edge.AreaID1 = 0x3FFF; - edge.AreaID2 = 0x3FFF; - edge._RawData._Poly1.PolyID = 0x3FFF; - edge._RawData._Poly2.PolyID = 0x3FFF; - edge._RawData._Poly1.Unk2 = 1; - edge._RawData._Poly2.Unk2 = 1; - edge._RawData._Poly1.Unk3 = 0; - edge._RawData._Poly2.Unk3 = 0; + ////DEBUG don't join edges + //edge.Poly1 = null; + //edge.Poly2 = null; + //edge.AreaID1 = 0x3FFF; + //edge.AreaID2 = 0x3FFF; + //edge._RawData._Poly1.PolyID = 0x3FFF; + //edge._RawData._Poly2.PolyID = 0x3FFF; + //edge._RawData._Poly1.Unk2 = 1; + //edge._RawData._Poly2.Unk2 = 1; + //edge._RawData._Poly1.Unk3 = 0; + //edge._RawData._Poly2.Unk3 = 0; - //border = true; } } } diff --git a/CodeWalker.Core/GameFiles/FileTypes/YnvFile.cs b/CodeWalker.Core/GameFiles/FileTypes/YnvFile.cs index 5118acb..d36254c 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/YnvFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/YnvFile.cs @@ -48,6 +48,16 @@ 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 YnvFile() : base(null, GameFileType.Ynv) { @@ -216,6 +226,15 @@ namespace CodeWalker.GameFiles var vertdict = new Dictionary(); var areadict = new Dictionary(); var arealist = new List(); + var areaid = Nav.AreaID; + EnsureEdgeAreaID(areaid, areadict, arealist); + EnsureEdgeAreaID(0x3FFF, areadict, arealist); + EnsureEdgeAreaID(areaid - 100, areadict, arealist); + EnsureEdgeAreaID(areaid - 1, areadict, arealist); + EnsureEdgeAreaID(areaid + 1, areadict, arealist); + EnsureEdgeAreaID(areaid + 100, areadict, arealist); + + if (Polys != null) //rebuild vertices, indices, edges and polys lists from poly data. { From 0b6432ceffe1a6d9ac6ab5525a499a0f16dd13ef Mon Sep 17 00:00:00 2001 From: dexyfex Date: Sat, 2 Jun 2018 02:25:12 +1000 Subject: [PATCH 11/24] GenerateNavMeshPanel WIP --- .../FileTypes/Builders/YnvBuilder.cs | 4 + .../GameFiles/FileTypes/YnvFile.cs | 2 +- CodeWalker.Core/Utils/Utils.cs | 30 +- CodeWalker.Core/World/Space.cs | 19 +- CodeWalker.csproj | 9 + .../Panels/GenerateNavMeshPanel.Designer.cs | 146 ++ Project/Panels/GenerateNavMeshPanel.cs | 1253 +++++++++++++++++ Project/Panels/GenerateNavMeshPanel.resx | 418 ++++++ Project/ProjectForm.Designer.cs | 1015 ++++++------- Project/ProjectForm.cs | 11 + WorldForm.cs | 1 + 11 files changed, 2395 insertions(+), 513 deletions(-) create mode 100644 Project/Panels/GenerateNavMeshPanel.Designer.cs create mode 100644 Project/Panels/GenerateNavMeshPanel.cs create mode 100644 Project/Panels/GenerateNavMeshPanel.resx diff --git a/CodeWalker.Core/GameFiles/FileTypes/Builders/YnvBuilder.cs b/CodeWalker.Core/GameFiles/FileTypes/Builders/YnvBuilder.cs index 9bba059..557b8b6 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/Builders/YnvBuilder.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/Builders/YnvBuilder.cs @@ -386,6 +386,10 @@ namespace CodeWalker.Core.GameFiles.FileTypes.Builders ynv.Nav.SectorTree.AABBMax = new Vector4(NavGrid.GetCellMax(cell), 0.0f); ynv.AreaID = cell.X + cell.Y * 100; ynv.Polys = new List(); + ynv.HasChanged = true;//mark it for the project window + ynv.RpfFileEntry = new RpfResourceFileEntry(); + ynv.RpfFileEntry.Name = ynv.Name + ".ynv"; + ynv.RpfFileEntry.Path = string.Empty; cell.Ynv = ynv; YnvFiles.Add(ynv); } diff --git a/CodeWalker.Core/GameFiles/FileTypes/YnvFile.cs b/CodeWalker.Core/GameFiles/FileTypes/YnvFile.cs index d36254c..3a75d8d 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/YnvFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/YnvFile.cs @@ -253,7 +253,7 @@ namespace CodeWalker.GameFiles { ind = (ushort)vertlist.Count; vertdict[v] = ind; - vertlist.Add(NavMeshVertex.Create((v - posoffset) * aabbsizeinv)); + vertlist.Add(NavMeshVertex.Create(Vector3.Clamp((v - posoffset) * aabbsizeinv, Vector3.Zero, Vector3.One))); } if ((poly.Indices != null) && (n < poly.Indices.Length)) { diff --git a/CodeWalker.Core/Utils/Utils.cs b/CodeWalker.Core/Utils/Utils.cs index 35d94eb..08b9204 100644 --- a/CodeWalker.Core/Utils/Utils.cs +++ b/CodeWalker.Core/Utils/Utils.cs @@ -140,21 +140,37 @@ namespace CodeWalker return string.Format("x=\"{0}\" y=\"{1}\" z=\"{2}\" w=\"{3}\"", q.X.ToString(c), q.Y.ToString(c), q.Z.ToString(c), q.W.ToString(c)); } + + public static Vector2 ParseVector2String(string s) + { + Vector2 p = new Vector2(0.0f); + string[] ss = s.Split(','); + if (ss.Length > 0) + { + TryParse(ss[0].Trim(), out p.X); + } + if (ss.Length > 1) + { + TryParse(ss[1].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) { - FloatUtil.TryParse(ss[0].Trim(), out p.X); + TryParse(ss[0].Trim(), out p.X); } if (ss.Length > 1) { - FloatUtil.TryParse(ss[1].Trim(), out p.Y); + TryParse(ss[1].Trim(), out p.Y); } if (ss.Length > 2) { - FloatUtil.TryParse(ss[2].Trim(), out p.Z); + TryParse(ss[2].Trim(), out p.Z); } return p; } @@ -172,19 +188,19 @@ namespace CodeWalker string[] ss = s.Split(','); if (ss.Length > 0) { - FloatUtil.TryParse(ss[0].Trim(), out p.X); + TryParse(ss[0].Trim(), out p.X); } if (ss.Length > 1) { - FloatUtil.TryParse(ss[1].Trim(), out p.Y); + TryParse(ss[1].Trim(), out p.Y); } if (ss.Length > 2) { - FloatUtil.TryParse(ss[2].Trim(), out p.Z); + TryParse(ss[2].Trim(), out p.Z); } if (ss.Length > 3) { - FloatUtil.TryParse(ss[3].Trim(), out p.W); + TryParse(ss[3].Trim(), out p.W); } return p; } diff --git a/CodeWalker.Core/World/Space.cs b/CodeWalker.Core/World/Space.cs index fbad2a2..44ec6db 100644 --- a/CodeWalker.Core/World/Space.cs +++ b/CodeWalker.Core/World/Space.cs @@ -1199,7 +1199,7 @@ namespace CodeWalker.World } - public SpaceRayIntersectResult RayIntersect(Ray ray, float maxdist = float.MaxValue) + public SpaceRayIntersectResult RayIntersect(Ray ray, float maxdist = float.MaxValue, bool[] layers = null) { var res = new SpaceRayIntersectResult(); if (GameFileCache == null) return res; @@ -1225,6 +1225,7 @@ namespace CodeWalker.World float polyhittestdist = 0; bool hit = false; BoundPolygon hitpoly = null; + BoundMaterial_s hitmat = new BoundMaterial_s(); Vector3 hitnorm = Vector3.Zero; Vector3 hitpos = Vector3.Zero; while (cell != null) @@ -1233,6 +1234,12 @@ namespace CodeWalker.World { foreach (var bound in cell.BoundsList) { + uint l = bound.Layer; + if ((layers != null) && (l < 3)) + { + if (!layers[l]) continue; + } + box.Minimum = bound.Min; box.Maximum = bound.Max; float boxhitdisttest; @@ -1395,6 +1402,10 @@ namespace CodeWalker.World hit = true; hitnorm = n1; hitpoly = polygon; + + byte matind = ((bgeom.PolygonMaterialIndices != null) && (p < bgeom.PolygonMaterialIndices.Length)) ? bgeom.PolygonMaterialIndices[p] : (byte)0; + BoundMaterial_s mat = ((bgeom.Materials != null) && (matind < bgeom.Materials.Length)) ? bgeom.Materials[matind] : new BoundMaterial_s(); + hitmat = mat; } polytestcount++; } @@ -1474,6 +1485,7 @@ namespace CodeWalker.World res.Hit = hit; res.HitDist = itemhitdist; res.HitPolygon = hitpoly; + res.Material = hitmat; res.Position = hitpos; res.Normal = hitnorm; @@ -1731,7 +1743,7 @@ namespace CodeWalker.World public const int CellCount = 500; //cells along a side, total cell count is this squared public const int LastCell = CellCount - 1; //the last cell index in the array public const float WorldSize = 10000.0f; //max world grid size +/- 10000 units - public const float CellSize = 2.0f * WorldSize / (float)CellCount;//20.0f; //size of a cell + public const float CellSize = 2.0f * WorldSize / (float)CellCount;//40.0f; //size of a cell public const float CellSizeInv = 1.0f / CellSize; //inverse of the cell size. public const float CellSizeHalf = CellSize * 0.5f; //half the cell size @@ -2013,7 +2025,7 @@ namespace CodeWalker.World public float CellSizeInv; //inverse of the cell size. public int CellCountX = 100; public int CellCountY = 100; - public float CornerX = -6000.0f; + public float CornerX = -6000.0f;//max = -6000+(100*150) = 9000 public float CornerY = -6000.0f; public SpaceNavGrid() @@ -2117,6 +2129,7 @@ namespace CodeWalker.World public int TestedNodeCount; public int TestedPolyCount; public bool TestComplete; + public BoundMaterial_s Material; } public struct SpaceSphereIntersectResult { diff --git a/CodeWalker.csproj b/CodeWalker.csproj index 6d2938e..3c3fb47 100644 --- a/CodeWalker.csproj +++ b/CodeWalker.csproj @@ -388,6 +388,12 @@ EditYtypPanel.cs + + Form + + + GenerateNavMeshPanel.cs + Form @@ -626,6 +632,9 @@ EditYtypPanel.cs + + GenerateNavMeshPanel.cs + ProjectExplorerPanel.cs diff --git a/Project/Panels/GenerateNavMeshPanel.Designer.cs b/Project/Panels/GenerateNavMeshPanel.Designer.cs new file mode 100644 index 0000000..270ce69 --- /dev/null +++ b/Project/Panels/GenerateNavMeshPanel.Designer.cs @@ -0,0 +1,146 @@ +namespace CodeWalker.Project.Panels +{ + partial class GenerateNavMeshPanel + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(GenerateNavMeshPanel)); + this.MinTextBox = new System.Windows.Forms.TextBox(); + this.label81 = new System.Windows.Forms.Label(); + this.MaxTextBox = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.GenerateButton = new System.Windows.Forms.Button(); + this.label3 = new System.Windows.Forms.Label(); + this.StatusLabel = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // MinTextBox + // + this.MinTextBox.Location = new System.Drawing.Point(87, 131); + this.MinTextBox.Name = "MinTextBox"; + this.MinTextBox.Size = new System.Drawing.Size(177, 20); + this.MinTextBox.TabIndex = 46; + this.MinTextBox.Text = "0, 0"; + // + // label81 + // + this.label81.AutoSize = true; + this.label81.Location = new System.Drawing.Point(22, 134); + this.label81.Name = "label81"; + this.label81.Size = new System.Drawing.Size(56, 13); + this.label81.TabIndex = 47; + this.label81.Text = "Min: (X, Y)"; + // + // MaxTextBox + // + this.MaxTextBox.Location = new System.Drawing.Point(87, 157); + this.MaxTextBox.Name = "MaxTextBox"; + this.MaxTextBox.Size = new System.Drawing.Size(177, 20); + this.MaxTextBox.TabIndex = 48; + this.MaxTextBox.Text = "100, 100"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(22, 160); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(59, 13); + this.label1.TabIndex = 49; + this.label1.Text = "Max: (X, Y)"; + // + // label2 + // + this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label2.Location = new System.Drawing.Point(12, 9); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(598, 119); + this.label2.TabIndex = 50; + this.label2.Text = resources.GetString("label2.Text"); + // + // GenerateButton + // + this.GenerateButton.Location = new System.Drawing.Point(87, 196); + this.GenerateButton.Name = "GenerateButton"; + this.GenerateButton.Size = new System.Drawing.Size(75, 23); + this.GenerateButton.TabIndex = 51; + this.GenerateButton.Text = "Generate"; + this.GenerateButton.UseVisualStyleBackColor = true; + this.GenerateButton.Click += new System.EventHandler(this.GenerateButton_Click); + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(279, 146); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(235, 13); + this.label3.TabIndex = 52; + this.label3.Text = "(Nav meshes will only be generated for this area)"; + // + // StatusLabel + // + this.StatusLabel.AutoSize = true; + this.StatusLabel.Location = new System.Drawing.Point(84, 247); + this.StatusLabel.Name = "StatusLabel"; + this.StatusLabel.Size = new System.Drawing.Size(95, 13); + this.StatusLabel.TabIndex = 53; + this.StatusLabel.Text = "Ready to generate"; + // + // GenerateNavMeshPanel + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(622, 340); + this.Controls.Add(this.StatusLabel); + this.Controls.Add(this.label3); + this.Controls.Add(this.GenerateButton); + this.Controls.Add(this.label2); + this.Controls.Add(this.MaxTextBox); + this.Controls.Add(this.label1); + this.Controls.Add(this.MinTextBox); + this.Controls.Add(this.label81); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Name = "GenerateNavMeshPanel"; + this.Text = "Generate Nav Meshes"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.TextBox MinTextBox; + private System.Windows.Forms.Label label81; + private System.Windows.Forms.TextBox MaxTextBox; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Button GenerateButton; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label StatusLabel; + } +} \ No newline at end of file diff --git a/Project/Panels/GenerateNavMeshPanel.cs b/Project/Panels/GenerateNavMeshPanel.cs new file mode 100644 index 0000000..b140713 --- /dev/null +++ b/Project/Panels/GenerateNavMeshPanel.cs @@ -0,0 +1,1253 @@ +using CodeWalker.Core.GameFiles.FileTypes.Builders; +using CodeWalker.GameFiles; +using CodeWalker.World; +using SharpDX; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; +using WeifenLuo.WinFormsUI.Docking; + +namespace CodeWalker.Project.Panels +{ + public partial class GenerateNavMeshPanel : ProjectPanel + { + public ProjectForm ProjectForm { get; set; } + public ProjectFile CurrentProjectFile { get; set; } + + public GenerateNavMeshPanel(ProjectForm projectForm) + { + ProjectForm = projectForm; + InitializeComponent(); + Tag = "GenerateNavMeshPanel"; + + if (ProjectForm?.WorldForm == null) + { + //could happen in some other startup mode - world form is required for this.. + GenerateButton.Enabled = false; + UpdateStatus("Unable to generate - World View not available!"); + } + } + + public void SetProject(ProjectFile project) + { + CurrentProjectFile = project; + + + + } + + private void GenerateButton_Click(object sender, EventArgs e) + { + var space = ProjectForm?.WorldForm?.Space; + if (space == null) return; + var gameFileCache = ProjectForm?.WorldForm?.GameFileCache; + if (gameFileCache == null) return; + + Vector2 min = FloatUtil.ParseVector2String(MinTextBox.Text); + Vector2 max = FloatUtil.ParseVector2String(MaxTextBox.Text); + + if (min == max) + { + MessageBox.Show("Unable to generate - No valid area was specified!\nMake sure Min and Max form a box around the area you want to generate the nav meshes for."); + return; + } + + if ((min.X < -6000) || (min.Y < -6000) || (max.X > 9000) || (max.Y > 9000))//it's over 9000 + { + if (MessageBox.Show("Warning: min/max goes outside the possible navmesh area - valid range is from -6000 to 9000 (X and Y).\nDo you want to continue anyway?", "Warning - specified area out of range", MessageBoxButtons.YesNo) != DialogResult.Yes) + { + return; + } + } + + //if (string.IsNullOrEmpty(ProjectForm?.CurrentProjectFile?.Filepath)) + //{ + // MessageBox.Show("Please save the current project first. Generated navmeshes will be placed in the project folder."); + // return; + //} + + var path = ProjectForm.CurrentProjectFile.GetFullFilePath("navmeshes") + "\\"; + + GenerateButton.Enabled = false; + + + + float density = 0.5f; //distance between vertices for the initial grid + //float clipdz = 0.5f; //any polygons with greater steepness should be removed + + Vector2I imin = space.Grid.GetCellPos(new Vector3(min, 0)); + Vector2I imax = space.Grid.GetCellPos(new Vector3(max, 0)); + + //Vector2 vertexCounts = (max - min) / density; + //int vertexCountX = (int)vertexCounts.X; + //int vertexCountY = (int)vertexCounts.Y; + //int vertexCountTot = vertexCountX * vertexCountY; + + var layers = new[] { true, false, false }; //collision layers to use + + int hitTestCount = 0; //statistic for number of hit tests done + int hitCount = 0;//statistic for total ray hits + int newCount = 0;//statistic for total new control vertices + + Task.Run(() => + { + + + //find vertices in one world cell at a time, by raycasting in a grid pattern. + //then filter those based on polygon slope deltas (and materials) to reduce the detail. + //then add the generated verts for the cell into a master quadtree/bvh/grid + //after all verts are generated, do voronoi tessellation with those to generate the nav polys. + //finally, remove any polys that are steeper than the threshold. + + + var vgrid = new VertexGrid(); + var vert = new GenVertex(); + var builder = new YnvBuilder(); + + for (int x = imin.X; x <= imax.X; x++) //generate verts for each world cell + { + for (int y = imin.Y; y <= imax.Y; y++) + { + Vector2I gi = new Vector2I(x, y); + var cell = space.Grid.GetCell(gi); + var cellstr = gi.ToString(); + var cellmin = space.Grid.GetWorldPos(gi); + var cellmax = cellmin + SpaceGrid.CellSize; + var vertexCountXY = (cellmax - cellmin) / density; + int vertexCountX = (int)vertexCountXY.X; + int vertexCountY = (int)vertexCountXY.Y; + //int vertexCountTot = vertexCountX * vertexCountY; + vgrid.BeginGrid(vertexCountX, vertexCountY); + cellmin.Z = 0.0f;//min probably not needed here + cellmax.Z = 0.0f; + Ray ray = new Ray(Vector3.Zero, new Vector3(0, 0, -1));//for casting with + + UpdateStatus("Loading cell " + cellstr + " ..."); + + //pre-warm the bounds cache for this cell, and find the min/max Z + if (cell.BoundsList != null) + { + foreach (var boundsitem in cell.BoundsList) + { + YbnFile ybn = gameFileCache.GetYbn(boundsitem.Name); + if (ybn == null) + { continue; } //ybn not found? + if (!ybn.Loaded) //ybn not loaded yet... + { + UpdateStatus("Loading ybn: " + boundsitem.Name.ToString() + " ..."); + int waitCount = 0; + while (!ybn.Loaded) + { + waitCount++; + if (waitCount > 10000) + { + UpdateStatus("Timeout waiting for ybn " + boundsitem.Name.ToString() + " to load!"); + Thread.Sleep(1000); //just to let the message display for a second... + break; + } + Thread.Sleep(20);//~50fps should be fine + } + } + if (ybn.Loaded && (ybn.Bounds != null)) + { + cellmin.Z = Math.Min(cellmin.Z, ybn.Bounds.BoundingBoxMin.Z); + cellmax.Z = Math.Max(cellmax.Z, ybn.Bounds.BoundingBoxMax.Z); + } + } + } + + + + //ray-cast each XY vertex position, and find the height and surface from ybn's + //continue casting down to find more surfaces... + + UpdateStatus("Processing cell " + cellstr + " ..."); + + for (int vx = 0; vx < vertexCountX; vx++) + { + for (int vy = 0; vy < vertexCountY; vy++) + { + vgrid.BeginCell(vx, vy); + var vcoffset = new Vector3(vx, vy, 0) * density; + ray.Position = cellmin + vcoffset; + ray.Position.Z = cellmax.Z + 1.0f;//start the ray at the top of the cell + var intres = space.RayIntersect(ray, float.MaxValue, layers); + hitTestCount++; + while (intres.Hit && (intres.HitDist > 0)) + { + hitCount++; + vert.Position = intres.Position; + vert.Normal = intres.Normal; + vert.Material = intres.Material.Type; + vert.PolyFlags = intres.Material.PolyFlags; + vert.PrevIDX = -1; + vert.PrevIDY = -1; + vert.NextIDX = -1; + vert.NextIDY = -1; + vert.CompPrevX = false; + vert.CompPrevY = false; + vert.CompNextX = false; + vert.CompNextY = false; + vert.PolyID = -1; + vgrid.AddVertex(ref vert); + + //continue down until no more hits..... step by 3m + if (vgrid.CurVertexCount > 15) //too many hits? + { break; } + ray.Position.Z = intres.Position.Z - 3.0f; + intres = space.RayIntersect(ray, float.MaxValue, layers); + } + vgrid.EndCell(vx, vy); + } + } + + vgrid.EndGrid(); //build vertex array + + + + + + vgrid.ConnectVertices(); + + + var polys = vgrid.GenPolys(); + newCount += polys.Count; + + foreach (var poly in polys) + { + if (poly.Vertices == null) continue; + + var ypoly = builder.AddPoly(poly.Vertices); + + + ypoly.B02_IsFootpath = (poly.Material.Index == 1); + + ypoly.B18_IsRoad = (poly.Material.Index == 4);//4,5,6 + + + } + + } + } + + + + + var ynvs = builder.Build(false);//todo:vehicles! + + + foreach (var ynv in ynvs) + { + var bytes = ynv.Save(); + var fpath = path + ynv.Name + ".ynv"; + //File.WriteAllBytes(fpath, bytes); + + YnvFile nynv = new YnvFile(); + nynv.RpfFileEntry = new RpfResourceFileEntry(); + nynv.RpfFileEntry.Name = ynv.Name + ".ynv"; + nynv.FilePath = fpath; + nynv.Name = ynv.RpfFileEntry.Name; + nynv.Load(bytes); + + + ProjectForm.Invoke((MethodInvoker) delegate + { + ProjectForm.AddYnvToProject(nynv); + }); + } + + + + var statf = "{0} hit tests, {1} hits, {2} new polys"; + var stats = string.Format(statf, hitTestCount, hitCount, newCount); + UpdateStatus("Process complete. " + stats); + GenerateComplete(); + }); + } + + + + + private struct GenVertex + { + public Vector3 Position; + public Vector3 Normal; + public BoundsMaterialType Material; + public ushort PolyFlags; + + public int PrevIDX; + public int PrevIDY; + public int NextIDX; + public int NextIDY; + public bool CompPrevX; + public bool CompPrevY; + public bool CompNextX; + public bool CompNextY; + public int PolyID; + + } + + private class GenEdge + { + //public GenPoly From; + //public GenPoly To; + } + + private class GenPoly + { + public int Index; + public Vector3 Normal; + public BoundsMaterialType Material; + public ushort PolyFlags; + + public int[] CornerIndices; + public Vector3[] Vertices; + //public GenEdge[] Edges; + } + + private class VertexGrid + { + public List VertexList = new List(); + public GenVertex[] Vertices; + public int[,] VertexOffsets; + public int[,] VertexCounts; + public int VertexCountX; + public int VertexCountY; + public int CurVertexCount; + + private List CornersB = new List(); + private List CornersT = new List(); + + + public void BeginGrid(int vertexCountX, int vertexCountY) + { + VertexList.Clear(); + Vertices = null; + VertexOffsets = new int[vertexCountX, vertexCountY]; + VertexCounts = new int[vertexCountX, vertexCountY]; + VertexCountX = vertexCountX; + VertexCountY = vertexCountY; + } + public void EndGrid() + { + Vertices = VertexList.ToArray(); + } + + public void BeginCell(int x, int y) + { + VertexOffsets[x, y] = VertexList.Count; + CurVertexCount = 0; + } + public void EndCell(int x, int y) + { + VertexCounts[x, y] = CurVertexCount; + } + + public void AddVertex(ref GenVertex v) + { + VertexList.Add(v); + CurVertexCount++; + } + + public int FindVertex(int x, int y, float z, float thresh) + { + //return the index of the closest vertex in the x,y cell that is within the Z threshold + + int offset = VertexOffsets[x, y]; + int count = VertexCounts[x, y]; + int lasti = offset + count; + + float minz = float.MaxValue; + int mini = -1; + for (int i = offset; i < lasti; i++) + { + float vz = Vertices[i].Position.Z; + float dz = Math.Abs(vz - z); + if ((dz < thresh) && (dz < minz)) + { + minz = dz; + mini = i; + } + } + + return mini; + } + + + + public bool CompareVertexTypes(int i1, int i2) + { + if (Vertices[i1].Material.Index != Vertices[i2].Material.Index) return false; + if (Vertices[i1].PolyFlags != Vertices[i2].PolyFlags) return false; + return true; + } + + + + + + public void ConnectVertices() + { + var connectThresh = 0.2f; + var density = 0.5f;//to match vertex density (x/y distance) + for (int vx = 1; vx < VertexCountX; vx++) + { + int px = vx - 1; + for (int vy = 1; vy < VertexCountY; vy++) + { + int py = vy - 1; + int imin = VertexOffsets[vx, vy]; + int imax = VertexCounts[vx, vy] + imin; + for (int i = imin; i < imax; i++) + { + var vz = Vertices[i].Position.Z; + var vn = Vertices[i].Normal; + var vxz = vz + (vn.X / Math.Max(vn.Z, 1e-5f)) * density; + var vyz = vz + (vn.Y / Math.Max(vn.Z, 1e-5f)) * density; + var prevIDX = FindVertex(px, vy, vxz, connectThresh); + var prevIDY = FindVertex(vx, py, vyz, connectThresh); + var compPrevX = (prevIDX < 0) ? false : CompareVertexTypes(i, prevIDX); + var compPrevY = (prevIDY < 0) ? false : CompareVertexTypes(i, prevIDY); + Vertices[i].PrevIDX = prevIDX; + Vertices[i].PrevIDY = prevIDY; + Vertices[i].CompPrevX = compPrevX; + Vertices[i].CompPrevY = compPrevY; + if (prevIDX >= 0) + { + Vertices[prevIDX].NextIDX = i; + Vertices[prevIDX].CompNextX = compPrevX; + } + if (prevIDY >= 0) + { + Vertices[prevIDY].NextIDY = i; + Vertices[prevIDY].CompNextY = compPrevY; + } + } + } + } + + } + + + + + public List GenPolys() + { + List polys = new List(); + + //find new polygon edges and assign grid vertices + for (int vx = 0; vx < VertexCountX; vx++) + { + for (int vy = 0; vy < VertexCountY; vy++) + { + int imin = VertexOffsets[vx, vy]; + int imax = VertexCounts[vx, vy] + imin; + for (int i = imin; i < imax; i++) + { + if (Vertices[i].PolyID >= 0) continue; //already assigned + + if ((Vertices[i].PrevIDX < 0) && (Vertices[i].PrevIDY < 0) && (Vertices[i].NextIDX < 0) && (Vertices[i].NextIDY < 0)) continue; //(not connected to anything) + + //if (!(Vertices[i].CompPrevX || Vertices[i].CompPrevY || Vertices[i].CompNextX || Vertices[i].CompNextY)) //continue; //all joins are different - discard this vertex + + + + + + GenPoly poly = new GenPoly(); //start a new poly + poly.Index = polys.Count; + poly.Normal = Vertices[i].Normal; + poly.Material = Vertices[i].Material; + poly.PolyFlags = Vertices[i].PolyFlags; + //polys.Add(poly); + //poly.AddGenVert(i); + //Vertices[i].PolyID = poly.Index; + Plane vplane = new Plane(Vertices[i].Position, Vertices[i].Normal); + float plthresh = 0.25f; //threshold for plane dist test + + int dpx = FindPolyEdgeDist(ref vplane, plthresh, i, 0); + int dpy = FindPolyEdgeDist(ref vplane, plthresh, i, 1); + int dnx = FindPolyEdgeDist(ref vplane, plthresh, i, 2); + int dny = FindPolyEdgeDist(ref vplane, plthresh, i, 3); + + bool addpoly = true; + + int qnx = 0, qny = 0, qpy = 0, qdir = 0; + if ((dpx == 0) && (dpy == 0) && (dnx == 0) && (dny == 0)) + { + //single vertex poly... connect to something else? currently remove + addpoly = false; + } + else if ((dpx >= dnx) && (dpx >= dpy) && (dpx >= dny)) + { + //dpx is largest, move along -X (dpx, dpy, dny, 0) + qnx = dpx; + qny = dpy; + qpy = dny; + qdir = 0; + } + else if ((dpy >= dnx) && (dpy >= dny)) + { + //dpy is largest, move along -Y (dpy, dnx, dpx, 1) + qnx = dpy; + qny = dnx; + qpy = dpx; + qdir = 1; + } + else if ((dnx >= dny)) + { + //dnx is largest, move along +X (dnx, dny, dpy, 2) + qnx = dnx; + qny = dny; + qpy = dpy; + qdir = 2; + } + else + { + //dny is largest, move along +Y (dny, dpx, dnx, 3) + qnx = dny; + qny = dpx; + qpy = dnx; + qdir = 3; + } + if (addpoly) + { + AssignVertices2(ref vplane, plthresh, i, qnx, qny, qpy, qdir, poly); + if (poly.CornerIndices?.Length > 2) + { + polys.Add(poly); + } + } + + + + //if (dnx > 0) //can move along +X + //{ + // AssignVertices(ref vplane, plthresh, i, dnx, dny, dpy, 2, poly); + //} + //else if (dny > 0) //can move along +Y + //{ + // AssignVertices(ref vplane, plthresh, i, dny, dpx, dnx, 3, poly); + //} + //else if (dpx > 0) //can move along -X + //{ + // AssignVertices(ref vplane, plthresh, i, dpx, dpy, dny, 0, poly); + //} + //else if (dpy > 0) //can move along -Y + //{ + // AssignVertices(ref vplane, plthresh, i, dpy, dnx, dpx, 1, poly); + //} + //else //single vertex poly... connected to something else + //{ + // addpolys = false; + //} + //if (addpolys) + //{ + // polys.Add(poly); + //} + + + + + } + } + + } + + + //create corner vertex vectors and edges for the new polys + foreach (var poly in polys) + { + if (poly.CornerIndices == null) continue; + if (poly.CornerIndices.Length < 3) continue; + + var verts = new Vector3[poly.CornerIndices.Length]; + + for (int i = 0; i < poly.CornerIndices.Length; i++) + { + int id = poly.CornerIndices[i]; + + verts[i] = Vertices[id].Position;//TODO: find actual corners + } + + poly.Vertices = verts; + + } + + + return polys; + } + + + private void AssignVertices(ref Plane vpl, float plt, int i, int dnx, int dny, int dpy, int dir, GenPoly poly) + { + int pid = poly.Index; + int qi = i; + int maxdnx = Math.Min(dnx, 40); + int maxdpy = 50;// dpy;// + int maxdny = 50;// dny;// + int cdpy = dpy; + int cdny = dny; + int vertexCountP = 0; + int vertexCountN = 0; + int lastqx = 0; + int lastqi = i; + CornersB.Clear(); + CornersT.Clear(); + + + int dirpy, dirny; + switch (dir) //lookup perpendicular directions + { + default: + case 0: dirpy = 3; dirny = 1; break; + case 1: dirpy = 0; dirny = 2; break; + case 2: dirpy = 1; dirny = 3; break; + case 3: dirpy = 2; dirny = 0; break; + } + + + for (int qx = 0; qx <= maxdnx; qx++)//go along the row until the next poly is hit... + { + lastqi = qi; + int qipy = qi;//bottom vertex id for this column + int qiny = qi;//top vertex id for this column + for (int qy = 0; qy <= cdpy; qy++)//assign this row of verts to the poly + { + Vertices[qipy].PolyID = pid; + vertexCountP++; + + if (qy < cdpy) qipy = GetNextID(qipy, dirpy); + } + for (int qy = 0; qy <= cdny; qy++) + { + Vertices[qiny].PolyID = pid; + vertexCountN++; + + if (qy < cdny) qiny = GetNextID(qiny, dirny); + } + + qi = GetNextID(qi, dir); //move on to the next column... + + if (qx == dnx)//last column + { + if (qipy != lastqi) CornersB.Add(qipy);//lastqi will be added anyway, don't duplicate it + if (qiny != lastqi) CornersT.Add(qiny); + break; + } + if (qi < 0)//can't go any further.. most likely hit the end + { break; }//(shouldn't hit here because of above break) + + if (Vertices[qi].PolyID >= 0) //already assigned to a poly.. stop! + { break; }//(shouldn't hit here because maxdnx shouldn't go that far!) + + int ndpy = FindPolyEdgeDist(ref vpl, plt, qi, dirpy);//height for the next col.. + int ndny = FindPolyEdgeDist(ref vpl, plt, qi, dirny); + int ddpy = ndpy - cdpy; + int ddny = ndny - cdny; + + //TODO: step further along to find slope fraction if eg ddpy==0 + if (ddpy > maxdpy/*+1*/) ddpy = maxdpy/*+1*/;//########### BAD + else if (ddpy < maxdpy) //bottom corner vertex + { + maxdpy = ddpy; + CornersB.Add(qipy); + } + if (ddny > maxdny/*+1*/) ddny = maxdny/*+1*/;//########### BAD + else if (ddny < maxdny) //top corner vertex.. + { + maxdny = ddny; + CornersT.Add(qiny); + } + cdpy = cdpy + ddpy; //update comparison distances with limits, for next loop + cdny = cdny + ddny; + if ((cdpy < 0) || (cdny < 0))//can't go any further.. limit slope hit the axis + { + if (qipy != lastqi) CornersB.Add(qipy);//lastqi will be added anyway, don't duplicate it + if (qiny != lastqi) CornersT.Add(qiny); + break; + } + + + lastqx = qx; + } + + var totverts = vertexCountN + vertexCountP; + var fracused = (float)(lastqx+1) / dnx; + + CornersB.Add(lastqi); + int cc = CornersB.Count + CornersT.Count - 1; + int[] corners = new int[cc]; + int ci = 0; + for (int c = 0; c < CornersB.Count; c++) + { + corners[ci] = CornersB[c]; ci++; + } + for (int c = CornersT.Count - 1; c > 0; c--) + { + corners[ci] = CornersT[c]; ci++; + } + poly.CornerIndices = corners; + if (corners.Length < 3) + { }//debug + } + + + private void AssignVertices2(ref Plane vpl, float plt, int i, int dnx, int dny, int dpy, int dir, GenPoly poly) + { + int pid = poly.Index; + int qi = i; + //int maxdnx = Math.Min(dnx, 40); + //int maxdpy = 50;// dpy;// + //int maxdny = 50;// dny;// + //int cdpy = dpy; + //int cdny = dny; + //int vertexCountP = 0; + //int vertexCountN = 0; + //int lastqx = 0; + //int lastqi = i; + CornersB.Clear(); + CornersT.Clear(); + + + int dirpy, dirny, dirpx; + switch (dir) //lookup perpendicular directions + { + default: + case 0: dirpy = 3; dirny = 1; dirpx = 2; break; + case 1: dirpy = 0; dirny = 2; dirpx = 3; break; + case 2: dirpy = 1; dirny = 3; dirpx = 0; break; + case 3: dirpy = 2; dirny = 0; dirpx = 1; break; + } + + int ti = i; + while (CanPolyIncludeNext(ref vpl, plt, ti, dirpx, out ti)) + { + qi = ti; //make sure to start at the leftmost point... + } + + + + //loop until top and bottom lines intersect, or moved more than max dist + + float slopeb = FindSlope(ref vpl, plt, qi, dir, dirpy, dirny, 100); + float slopet = FindSlope(ref vpl, plt, qi, dir, dirny, dirpy, 100); + int syb = MaxOffsetFromSlope(slopeb); + int syt = MaxOffsetFromSlope(slopet); + int ony = 0; + int ldyb = 0; + int ldyt = 0; + int corndxb = 0; + int corndxt = 0; + + for (int x = 0; x < 50; x++) + { + + + //fill the column (assign the verts to this poly) + int qib = qi; + int qit = qi; + int dyb = 0; + int dyt = 0; + int nyb = ldyb + syb; + int nyt = ldyt + syt; + for (int yb = 0; yb <= nyb; yb++) + { + if (!CanPolyIncludeNext(ref vpl, plt, qib, dirpy, out ti)) break; + Vertices[ti].PolyID = pid; + qib = ti; + dyb++; + } + for (int yt = 0; yt <= nyt; yt++) + { + if (!CanPolyIncludeNext(ref vpl, plt, qit, dirny, out ti)) break; + Vertices[ti].PolyID = pid; + qit = ti; + dyt++; + } + + + //move on to the next column + //find the start point (and y offset) for the next column + //if none found, can't go further + + int nxi = qi; + bool cgx = CanPolyIncludeNext(ref vpl, plt, qi, dir, out nxi); + if (!cgx) + { + int ybi = qi; + for (int yb = 0; yb <= dyb; yb++) + { + ybi = GetNextID(ybi, dirpy); + ony--; + if (CanPolyIncludeNext(ref vpl, plt, ybi, dir, out nxi)) + { + cgx = true; + break; + } + } + } + if (!cgx) + { + int yti = qi; + for (int yt = 0; yt <= dyt; yt++) + { + yti = GetNextID(yti, dirny); + ony++; + if (CanPolyIncludeNext(ref vpl, plt, yti, dir, out nxi)) + { + cgx = true; + break; + } + } + } + if (!cgx) + { + //can't go further... end of the poly + break; + } + if (nxi < 0) + { break; }//shouldn't happen? + + + int nextyb; + int nextyt; + int nextib = FindPolyEdgeID(ref vpl, plt, nxi, dirpy, out nextyb); + int nextit = FindPolyEdgeID(ref vpl, plt, nxi, dirny, out nextyt); + + //int remyb = nyb - dyb; + //int remyt = nyt - dyt; + //int compyb = nextyb - ony; + //int compyt = nextyt + ony; + //int predyb = dyb + syb + ony; + //int predyt = dyt + syt - ony; + + int nextsyb = nextyb - ony - dyb; + int nextsyt = nextyt + ony - dyt; + + corndxb++; + corndxt++; + + bool iscornerb = false; + + if (slopeb > 1) + { + if (nextsyb < syb) iscornerb = true; + if (nextsyb > syb) nextsyb = syb; + } + else if (slopeb == 1) + { + if (nextsyb < syb) iscornerb = true; + if (nextsyb > 1) nextsyb = 1; + } + else if (slopeb > 0) + { + + } + else if (slopeb == 0) + { + if (nextsyb < 0) iscornerb = true; + if (nextsyb > 0) nextsyb = 0; + } + else if (slopeb > -1) + { + } + else if (slopeb == -1) + { + } + else // (slopeb < -1) + { + if (nextsyb < syb) iscornerb = true; + if (nextsyb > syb) nextsyb = syb; + } + + + + + + qi = nxi; + syb = nextsyb;// nextyb - dyb; + syt = nextsyt;// nextyt - dyt; + ldyb = dyb; + ldyt = dyt; + + //find top/bottom max dists and limit them according to slope + //check if slopes intersect at this column, stop if they do + + + } + + + + + } + + + + private int MaxOffsetFromSlope(float s) + { + if (s >= 1) return (int)s; + if (s > 0) return 1; + if (s > -1) return 0; + return -1; + + //return ((s>=1)||(s<=-1))?(int)s : (s>0)?1 : (s<0)?-1 : 0; + } + + + private int GetNextID(int i, int dir) + { + switch (dir) + { + default: + case 0: return Vertices[i].PrevIDX; + case 1: return Vertices[i].PrevIDY; + case 2: return Vertices[i].NextIDX; + case 3: return Vertices[i].NextIDY; + } + } + private bool CanPolyIncludeNext(ref Plane vplane, float plthresh, int i, int dir, out int ni) + { + bool ct; + switch (dir) + { + default: + case 0: ni = Vertices[i].PrevIDX; ct = Vertices[i].CompPrevX; break; + case 1: ni = Vertices[i].PrevIDY; ct = Vertices[i].CompPrevY; break; + case 2: ni = Vertices[i].NextIDX; ct = Vertices[i].CompNextX; break; + case 3: ni = Vertices[i].NextIDY; ct = Vertices[i].CompNextY; break; + } + if (ni < 0) return false; //not connected + if (!ct) return false; //next one is a different type + + if (Vertices[ni].PolyID >= 0) + { return false; } //already assigned a poly.. + + var npdist = Math.Abs(Plane.DotCoordinate(vplane, Vertices[ni].Position)); + return (npdist <= plthresh); + } + + private int FindPolyEdgeDist(ref Plane vplane, float plthresh, int i, int dir) + { + //d: 0=prevX, 1=prevY, 2=nextX, 3=nextY + + //find how many cells are between given vertex(id) and the edge of a poly, + //in the specified direction + + int dist = 0; + int ci = i; + + while (dist < 100) + { + int ni; + if (!CanPolyIncludeNext(ref vplane, plthresh, ci, dir, out ni)) break; + ci = ni; + dist++; + } + + return dist; + } + private int FindPolyEdgeID(ref Plane vplane, float plthresh, int i, int dir) + { + //d: 0=prevX, 1=prevY, 2=nextX, 3=nextY + + //find the last id of a vertex contained in this poly, starting from i, + //in the specified direction + + int dist = 0; + int ci = i; + + while (dist < 100) + { + int ni; + if (!CanPolyIncludeNext(ref vplane, plthresh, ci, dir, out ni)) break; + ci = ni; + dist++; + } + + return ci; + } + private int FindPolyEdgeID(ref Plane vplane, float plthresh, int i, int dir, out int dist) + { + //d: 0=prevX, 1=prevY, 2=nextX, 3=nextY + + //find how many cells are between given vertex(id) and the edge of a poly, + //in the specified direction + + dist = 0; + int ci = i; + + while (dist < 100) + { + int ni; + if (!CanPolyIncludeNext(ref vplane, plthresh, ci, dir, out ni)) break; + ci = ni; + dist++; + } + + return ci; + } + + + + private float FindSlope(ref Plane vpl, float plt, int i, int dirnx, int dirny, int dirpy, float maxslope) + { + //find a slope from the given corner/start point that's less than the max slope + + int ti = i; + int qi = i; + float slope = maxslope; + //int diry = (maxslope > 0) ? dirny : dirpy; + //int incy = (maxslope > 0) ? 1 : -1; + int sy = (int)Math.Abs(slope); + + + bool cgx = CanPolyIncludeNext(ref vpl, plt, i, dirnx, out ti); + + + if (cgx && (slope >= 0)) //new slope should be >=0 + { + int dy0 = FindPolyEdgeDist(ref vpl, plt, qi, dirny); + int dy1 = FindPolyEdgeDist(ref vpl, plt, ti, dirny); + int dy = dy1 - dy0; + + if (dy1 > 1) + { + if (dy < 0) return Math.Min(slope, dy1); //can move up to next max + if (dy0 > dy) return Math.Min(slope, dy0);//first step was steepest + if (dy >= 1) return Math.Min(slope, dy);//second step steeper + //only (dy==0)&&(dy0==0) case remaining, shouldn't be possible here + } + if (dy1 == 1) return Math.Min(slope, 1);//can only go +1Y or slope limit + if (dy1 == 0) + { + //step +X until can't go further, or can step +Y + int dx = 1; + int xi = ti;//starting from y1 + while (CanPolyIncludeNext(ref vpl, plt, xi, dirnx, out ti)) + { + xi = ti; + dx++; + if (CanPolyIncludeNext(ref vpl, plt, xi, dirny, out ti)) + { + //can move +Y now, calc new slope which is >0, <1 + return Math.Min(slope, 1.0f / dx); + } + } + + //couldn't go further +X or +Y... + //needs a corner at this next point at slope=0 + //or could be "trapped" in a corner + return Math.Min(slope, 0);//should always return 0.. + } + } + else //new slope must be <0 + { + + if (!CanPolyIncludeNext(ref vpl, plt, i, dirpy, out ti)) + { + return Math.Min(slope, 0); //can't move -Y.. could only happen at the end + } + + int dx0 = FindPolyEdgeDist(ref vpl, plt, qi, dirnx); + int dx1 = FindPolyEdgeDist(ref vpl, plt, ti, dirnx); + int dx = dx1 - dx0; + + if (dx1 > 1) + { + if (dx < 0) return Math.Min(slope, 0); //end corner, next slope is going backwards + if (dx0 > dx) return Math.Min(slope, -1.0f / dx0);//first step went furthest + if (dx >= 1) return Math.Min(slope, -1.0f / dx);//second step furthest + //only (dx==0)&&(dy0==0) case remaining, shouldn't be possible here + } + if (dx1 == 1) return Math.Min(slope, -1); + if (dx1 == 0) + { + //step -Y until can't go further, or can step +X + int dy = 1; + int yi = ti; + while(CanPolyIncludeNext(ref vpl, plt, yi, dirpy, out ti)) + { + yi = ti; + dy++; + if (CanPolyIncludeNext(ref vpl, plt, yi, dirnx, out ti)) + { + //can move +X now, calc new slope for <=-1 + return Math.Min(slope, -dy); + } + } + + //couldn't go further +Y or +X + //slope should be negative vertical + return Math.Min(slope, -100); + + } + + } + + + return slope; + } + + + private int FindNextCornerID(ref Plane vpl, float plt, int i, int dirnx, int dirny, int dirpy, float slope, out int dx, out int dy) + { + dx = 0; + dy = 0; + + //try to step along the slope until can't go further + int ti = i; + int qi = i; + int mx = 0; + int my = 0; + int diry = (slope > 0) ? dirny : dirpy; + int incy = (slope > 0) ? 1 : -1; + if ((slope >= 1) || (slope <= -1)) + { + int sy = (int)Math.Abs(slope); + while (my < sy) + { + if (CanPolyIncludeNext(ref vpl, plt, qi, diry, out ti)) + { + qi = ti; + my++; + dy += incy; + + if (my == sy) + { + if (CanPolyIncludeNext(ref vpl, plt, qi, dirnx, out ti)) + { + qi = ti; + my = 0; + mx++; + dx++; + } + else//can't go further! + { + return qi; + } + } + } + else if ((mx == 0) && (CanPolyIncludeNext(ref vpl, plt, qi, dirnx, out ti))) + { + //second chance to make beginning of the line + qi = ti; + my = 0; + mx++; + dx++; + } + else//can't go further! + { + return qi; + } + } + return qi;//shouldn't get here? + } + else if (slope != 0) + { + int sx = (int)Math.Abs(1.0f / slope); + while (mx < sx) + { + if (CanPolyIncludeNext(ref vpl, plt, qi, dirnx, out ti)) + { + qi = ti; + mx++; + dx++; + + if (mx == sx) + { + if (CanPolyIncludeNext(ref vpl, plt, qi, diry, out ti)) + { + qi = ti; + mx = 0; + my++; + dy += incy; + } + else//can't go further! + { + return qi; + } + } + } + else if ((my == 0) && CanPolyIncludeNext(ref vpl, plt, qi, diry, out ti)) + { + //second chance to make beginning of the line + qi = ti; + mx = 0; + my++; + dy += incy; + } + else//can't go further! + { + return qi; + } + } + return qi;//shouldn't get here? + } + else //slope==0 + { + for (int x = 0; x < 50; x++) //just try go +X until there's a hit. + { + if (CanPolyIncludeNext(ref vpl, plt, qi, dirnx, out ti)) + { + qi = ti; + dx++; + } + else + { + return qi; + } + } + return qi;//could go further, but don't.. + } + } + } + + + + + + private void GenerateComplete() + { + try + { + if (InvokeRequired) + { + Invoke(new Action(() => { GenerateComplete(); })); + } + else + { + GenerateButton.Enabled = true; + } + } + catch { } + } + + + private void UpdateStatus(string text) + { + try + { + if (InvokeRequired) + { + Invoke(new Action(() => { UpdateStatus(text); })); + } + else + { + StatusLabel.Text = text; + } + } + catch { } + } + + + } +} diff --git a/Project/Panels/GenerateNavMeshPanel.resx b/Project/Panels/GenerateNavMeshPanel.resx new file mode 100644 index 0000000..469e2e3 --- /dev/null +++ b/Project/Panels/GenerateNavMeshPanel.resx @@ -0,0 +1,418 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + This tool allows for generating GTAV nav meshes (.ynv) for a specified area. + +Generation requires static collision meshes for the area to be loadable by CodeWalker World View. The usual approach to this is to add the collision meshes into a DLC, and then enable mods and DLC. +The collision material and flags will be used in generating the new nav mesh. Polygons with the "Ped" flag set will be marked as footpaths in the nav meshes, to spawn ambient peds. +Generated .ynv files will be saved into the project folder and added to the project. +Note: existing .ynv files in the project folder will be overwritten! + + + + + + AAABAAMAICAAAAAAGACoDAAANgAAABAQAAAAABgAaAMAAN4MAABAQAAAAAAYACgyAABGEAAAKAAAACAA + AABAAAAAAQAYAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPv8/u3v+Pn6//7+/wAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP3+//r7//v8//7+/wAAAAAAAAAA + APb4/7/F84eP0e/0//7+/wAAAAAAAP7+//z9//v8//3+/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPz9//b5//X4//v8/wAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////////////w////4 + P///+D////g8//D4MH/geCB/4Dggf+A4IH/wOCD/+DAB//hgAf//gAP//wAAB/AAAAPwAAAD8AAAA/AA + AAfjAAEHgYADAQPgBwEDEAEBAghgAQwIIEH8CCB//Bggf/wYMH/8ODD///h/////////////KAAAABAA + AAAgAAAAAQAYAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///+vv/fL1/v///wAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///4+Vx7/F5v///wAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAP///4CHtrS62////////////////////wAAAAAAAAAAAP////H0/vf6/v// + /////////4yTwrrB4f///+zw+7rA6P39/////wAAAAAAAAAAAP///56l2BkcguXr/P///////42Uw8jO + 6P///ysvjWVqtP///////wAAAAAAAAAAAP////D0/0hPpsDG6////////6y02d7k8////3qAx+/z/f// + /wAAAAAAAAAAAAAAAAAAAP///////////////8zT8V5ns1Rcrdzh9f///////////wAAAAAAAAAAAAAA + AAAAAP////////7+/6ix3nmBxFthtmdwu09WqbC54/v9//r8//j6//39/wAAAAAAAAAAAOjt/H6I0FJc + skpSqHF+wRMahFZhs4iT1AsNc1pgrm52v2RsuO/z/gAAAP////////L2/cLJ7rrD64+V4DY+ozU+mYmU + 0X2Hy1hfss7V8urv/PP2/v///wAAAP///+Pp+d/k9////////+Pp/4uR3ysymW14xYOM0fD0/P///+Xq + +ri/6Pj6/wAAAOrv/j5DnbS75P////////////X4/+/0/ubr+/r7/////////9rh+hgZhKGo2QAAAPDz + /eLn+f////j6/2Nqttrg9////+Hn+P3+//3+/1hescLJ6/////L2/eru/AAAAAAAAAAAAP///8rR70tR + p/3+//v8/zY6jNPY7////09WqWpwu////wAAAAAAAAAAAAAAAAAAAAAAAPb4/vr7//////v8/5Wd1eHm + +P////v8//T3/wAAAAAAAAAAAAAAAP//AAD8PwAA/D8AAPwDAACAAwAAgAMAAIAHAADABwAAwAEAAMAB + AAAAAQAAAAEAAAABAAAAAQAAwAcAAOAPAAAoAAAAQAAAAIAAAAABABgAAAAAAAAwAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAA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3//v7/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/v7//f7/ + /f3//P3//f7//v7//v//AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//////// + ///////4D/////////AH////////8Af////////wB/////////AH////////8Af////////wB/////// + //AH////////8Af////////wB/////////AH////////8AfwP//////wB8Af//+Af/AHgB///wA/8AcA + H///AB/wBgAf//8AD/AGAB///wAH8AYAH///AAPwBAAf//8AA/AEAD///wAD8AQAP///AAPwBAB///+A + A/AEAP///8AD4AAA////4AcAAAH////wDgAAAf/////8AAAH//////gAAAf/////4AAAAf/////gAAAA + /f//+AAAAAAAD//AAAAAAAAH/4AAAAAAAAf/gAAAAAAAB/+AAAAAAAAH/4AAAAAAAAf/gAAAAAAAB/+A + AAAAAAAP/4AAAAAAAB//wAAAAABAf/4HwAAAAYAf8APAAAADgA/gA+AAAAMAA8AD8AAABwADgAP8AAAf + AAOAA/4AAB8AA4ADAAAAAQADgAIAcA4AgAOABgBwDgBAA4AMAGAMADADwDwAYAwAOAfg+ABgBAAeH//4 + AEAEAB////gAwAYAH///+ADABgAf///4AcAGAB////gBwAcAH///+APAB4A////8B+AHwH//////4A// + ///////gD/////////Af//////////////8= + + + \ No newline at end of file diff --git a/Project/ProjectForm.Designer.cs b/Project/ProjectForm.Designer.cs index be220cc..2c6e06b 100644 --- a/Project/ProjectForm.Designer.cs +++ b/Project/ProjectForm.Designer.cs @@ -58,6 +58,14 @@ this.FileSaveItemMenu = new System.Windows.Forms.ToolStripMenuItem(); this.FileSaveItemAsMenu = new System.Windows.Forms.ToolStripMenuItem(); this.EditMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.EditUndoMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.EditRedoMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator(); + this.EditCutMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.EditCopyMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.EditPasteMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.EditCloneMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.EditDeleteMenu = new System.Windows.Forms.ToolStripMenuItem(); this.ViewMenu = new System.Windows.Forms.ToolStripMenuItem(); this.ViewProjectExplorerMenu = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); @@ -65,8 +73,57 @@ this.ViewThemeBlueMenu = new System.Windows.Forms.ToolStripMenuItem(); this.ViewThemeLightMenu = new System.Windows.Forms.ToolStripMenuItem(); this.ViewThemeDarkMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.YmapMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.YmapNameMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator11 = new System.Windows.Forms.ToolStripSeparator(); + this.YmapNewEntityMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.YmapNewCarGenMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator12 = new System.Windows.Forms.ToolStripSeparator(); + this.YmapAddToProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.YmapRemoveFromProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.YtypMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.YtypNameMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator13 = new System.Windows.Forms.ToolStripSeparator(); + this.YtypNewArchetypeMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator15 = new System.Windows.Forms.ToolStripSeparator(); + this.YtypAddToProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.YtypRemoveFromProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.YndMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.YndNameMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator14 = new System.Windows.Forms.ToolStripSeparator(); + this.YndNewNodeMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator16 = new System.Windows.Forms.ToolStripSeparator(); + this.YndAddToProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.YndRemoveFromProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.YnvMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.YnvNameMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator17 = new System.Windows.Forms.ToolStripSeparator(); + this.YnvNewPolygonMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator18 = new System.Windows.Forms.ToolStripSeparator(); + this.YnvAddToProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.YnvRemoveFromProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.TrainsMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.TrainsNameMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator19 = new System.Windows.Forms.ToolStripSeparator(); + this.TrainsNewNodeMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator20 = new System.Windows.Forms.ToolStripSeparator(); + this.TrainsAddToProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.TrainsRemoveFromProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.ScenarioMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.ScenarioNameMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator21 = new System.Windows.Forms.ToolStripSeparator(); + this.ScenarioNewPointMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.ScenarioNewPointFromSelectedMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.ScenarioNewEntityOverrideMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.ScenarioNewChainMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.ScenarioNewClusterMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.ScenarioImportChainMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator22 = new System.Windows.Forms.ToolStripSeparator(); + this.ScenarioAddToProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.ScenarioRemoveFromProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); this.ToolsMenu = new System.Windows.Forms.ToolStripMenuItem(); this.ToolsManifestGeneratorMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.ToolsNavMeshGeneratorMenu = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); this.ToolsImportMenyooXmlMenu = new System.Windows.Forms.ToolStripMenuItem(); this.RenderMenu = new System.Windows.Forms.ToolStripMenuItem(); @@ -98,62 +155,6 @@ this.ToolbarSaveButton = new System.Windows.Forms.ToolStripButton(); this.ToolbarSaveAllButton = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator(); - this.EditUndoMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.EditRedoMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator(); - this.EditCutMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.EditCopyMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.EditPasteMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.EditDeleteMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.EditCloneMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.YmapMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.YtypMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.YndMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.YnvMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.TrainsMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.ScenarioMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.YmapNameMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator11 = new System.Windows.Forms.ToolStripSeparator(); - this.YmapNewEntityMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.YmapNewCarGenMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator12 = new System.Windows.Forms.ToolStripSeparator(); - this.YmapAddToProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.YmapRemoveFromProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.YtypNameMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator13 = new System.Windows.Forms.ToolStripSeparator(); - this.YtypNewArchetypeMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.YndNameMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator14 = new System.Windows.Forms.ToolStripSeparator(); - this.toolStripSeparator15 = new System.Windows.Forms.ToolStripSeparator(); - this.YtypAddToProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.YtypRemoveFromProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.YndNewNodeMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator16 = new System.Windows.Forms.ToolStripSeparator(); - this.YndAddToProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.YndRemoveFromProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.YnvNameMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator17 = new System.Windows.Forms.ToolStripSeparator(); - this.YnvNewPolygonMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator18 = new System.Windows.Forms.ToolStripSeparator(); - this.YnvAddToProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.YnvRemoveFromProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.TrainsNameMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator19 = new System.Windows.Forms.ToolStripSeparator(); - this.TrainsNewNodeMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator20 = new System.Windows.Forms.ToolStripSeparator(); - this.TrainsAddToProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.TrainsRemoveFromProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.ScenarioNameMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator21 = new System.Windows.Forms.ToolStripSeparator(); - this.ScenarioNewPointMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.ScenarioNewPointFromSelectedMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.ScenarioNewEntityOverrideMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.ScenarioNewChainMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.ScenarioNewClusterMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.ScenarioImportChainMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator22 = new System.Windows.Forms.ToolStripSeparator(); - this.ScenarioAddToProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.ScenarioRemoveFromProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); this.MainMenu.SuspendLayout(); this.MainToolbar.SuspendLayout(); this.SuspendLayout(); @@ -399,6 +400,66 @@ this.EditMenu.Size = new System.Drawing.Size(39, 20); this.EditMenu.Text = "Edit"; // + // EditUndoMenu + // + this.EditUndoMenu.Enabled = false; + this.EditUndoMenu.Name = "EditUndoMenu"; + this.EditUndoMenu.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Z))); + this.EditUndoMenu.Size = new System.Drawing.Size(190, 22); + this.EditUndoMenu.Text = "Undo"; + // + // EditRedoMenu + // + this.EditRedoMenu.Enabled = false; + this.EditRedoMenu.Name = "EditRedoMenu"; + this.EditRedoMenu.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Y))); + this.EditRedoMenu.Size = new System.Drawing.Size(190, 22); + this.EditRedoMenu.Text = "Redo"; + // + // toolStripSeparator10 + // + this.toolStripSeparator10.Name = "toolStripSeparator10"; + this.toolStripSeparator10.Size = new System.Drawing.Size(187, 6); + // + // EditCutMenu + // + this.EditCutMenu.Enabled = false; + this.EditCutMenu.Name = "EditCutMenu"; + this.EditCutMenu.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.X))); + this.EditCutMenu.Size = new System.Drawing.Size(190, 22); + this.EditCutMenu.Text = "Cut Item"; + // + // EditCopyMenu + // + this.EditCopyMenu.Enabled = false; + this.EditCopyMenu.Name = "EditCopyMenu"; + this.EditCopyMenu.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.C))); + this.EditCopyMenu.Size = new System.Drawing.Size(190, 22); + this.EditCopyMenu.Text = "Copy Item"; + // + // EditPasteMenu + // + this.EditPasteMenu.Enabled = false; + this.EditPasteMenu.Name = "EditPasteMenu"; + this.EditPasteMenu.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.V))); + this.EditPasteMenu.Size = new System.Drawing.Size(190, 22); + this.EditPasteMenu.Text = "Paste Item"; + // + // EditCloneMenu + // + this.EditCloneMenu.Enabled = false; + this.EditCloneMenu.Name = "EditCloneMenu"; + this.EditCloneMenu.Size = new System.Drawing.Size(190, 22); + this.EditCloneMenu.Text = "Clone Item"; + // + // EditDeleteMenu + // + this.EditDeleteMenu.Enabled = false; + this.EditDeleteMenu.Name = "EditDeleteMenu"; + this.EditDeleteMenu.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Shift | System.Windows.Forms.Keys.Delete))); + this.EditDeleteMenu.Size = new System.Drawing.Size(190, 22); + this.EditDeleteMenu.Text = "Delete Item"; + // // ViewMenu // this.ViewMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { @@ -454,10 +515,395 @@ this.ViewThemeDarkMenu.Text = "Dark"; this.ViewThemeDarkMenu.Click += new System.EventHandler(this.ViewThemeDarkMenu_Click); // + // YmapMenu + // + this.YmapMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.YmapNameMenu, + this.toolStripSeparator11, + this.YmapNewEntityMenu, + this.YmapNewCarGenMenu, + this.toolStripSeparator12, + this.YmapAddToProjectMenu, + this.YmapRemoveFromProjectMenu}); + this.YmapMenu.Name = "YmapMenu"; + this.YmapMenu.Size = new System.Drawing.Size(49, 20); + this.YmapMenu.Text = "Ymap"; + this.YmapMenu.Visible = false; + // + // YmapNameMenu + // + this.YmapNameMenu.Enabled = false; + this.YmapNameMenu.Name = "YmapNameMenu"; + this.YmapNameMenu.Size = new System.Drawing.Size(199, 22); + this.YmapNameMenu.Text = "(No .ymap file selected)"; + // + // toolStripSeparator11 + // + this.toolStripSeparator11.Name = "toolStripSeparator11"; + this.toolStripSeparator11.Size = new System.Drawing.Size(196, 6); + // + // YmapNewEntityMenu + // + this.YmapNewEntityMenu.Enabled = false; + this.YmapNewEntityMenu.Name = "YmapNewEntityMenu"; + this.YmapNewEntityMenu.Size = new System.Drawing.Size(199, 22); + this.YmapNewEntityMenu.Text = "New Entity"; + this.YmapNewEntityMenu.Click += new System.EventHandler(this.YmapNewEntityMenu_Click); + // + // YmapNewCarGenMenu + // + this.YmapNewCarGenMenu.Enabled = false; + this.YmapNewCarGenMenu.Name = "YmapNewCarGenMenu"; + this.YmapNewCarGenMenu.Size = new System.Drawing.Size(199, 22); + this.YmapNewCarGenMenu.Text = "New Car Generator"; + this.YmapNewCarGenMenu.Click += new System.EventHandler(this.YmapNewCarGenMenu_Click); + // + // toolStripSeparator12 + // + this.toolStripSeparator12.Name = "toolStripSeparator12"; + this.toolStripSeparator12.Size = new System.Drawing.Size(196, 6); + // + // YmapAddToProjectMenu + // + this.YmapAddToProjectMenu.Enabled = false; + this.YmapAddToProjectMenu.Name = "YmapAddToProjectMenu"; + this.YmapAddToProjectMenu.Size = new System.Drawing.Size(199, 22); + this.YmapAddToProjectMenu.Text = "Add to Project"; + this.YmapAddToProjectMenu.Click += new System.EventHandler(this.YmapAddToProjectMenu_Click); + // + // YmapRemoveFromProjectMenu + // + this.YmapRemoveFromProjectMenu.Enabled = false; + this.YmapRemoveFromProjectMenu.Name = "YmapRemoveFromProjectMenu"; + this.YmapRemoveFromProjectMenu.Size = new System.Drawing.Size(199, 22); + this.YmapRemoveFromProjectMenu.Text = "Remove from Project"; + this.YmapRemoveFromProjectMenu.Click += new System.EventHandler(this.YmapRemoveFromProjectMenu_Click); + // + // YtypMenu + // + this.YtypMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.YtypNameMenu, + this.toolStripSeparator13, + this.YtypNewArchetypeMenu, + this.toolStripSeparator15, + this.YtypAddToProjectMenu, + this.YtypRemoveFromProjectMenu}); + this.YtypMenu.Name = "YtypMenu"; + this.YtypMenu.Size = new System.Drawing.Size(43, 20); + this.YtypMenu.Text = "Ytyp"; + this.YtypMenu.Visible = false; + // + // YtypNameMenu + // + this.YtypNameMenu.Enabled = false; + this.YtypNameMenu.Name = "YtypNameMenu"; + this.YtypNameMenu.Size = new System.Drawing.Size(192, 22); + this.YtypNameMenu.Text = "(No .ytyp file selected)"; + // + // toolStripSeparator13 + // + this.toolStripSeparator13.Name = "toolStripSeparator13"; + this.toolStripSeparator13.Size = new System.Drawing.Size(189, 6); + // + // YtypNewArchetypeMenu + // + this.YtypNewArchetypeMenu.Enabled = false; + this.YtypNewArchetypeMenu.Name = "YtypNewArchetypeMenu"; + this.YtypNewArchetypeMenu.Size = new System.Drawing.Size(192, 22); + this.YtypNewArchetypeMenu.Text = "New Archetype"; + this.YtypNewArchetypeMenu.Click += new System.EventHandler(this.YtypNewArchetypeMenu_Click); + // + // toolStripSeparator15 + // + this.toolStripSeparator15.Name = "toolStripSeparator15"; + this.toolStripSeparator15.Size = new System.Drawing.Size(189, 6); + // + // YtypAddToProjectMenu + // + this.YtypAddToProjectMenu.Enabled = false; + this.YtypAddToProjectMenu.Name = "YtypAddToProjectMenu"; + this.YtypAddToProjectMenu.Size = new System.Drawing.Size(192, 22); + this.YtypAddToProjectMenu.Text = "Add to Project"; + this.YtypAddToProjectMenu.Click += new System.EventHandler(this.YtypAddToProjectMenu_Click); + // + // YtypRemoveFromProjectMenu + // + this.YtypRemoveFromProjectMenu.Enabled = false; + this.YtypRemoveFromProjectMenu.Name = "YtypRemoveFromProjectMenu"; + this.YtypRemoveFromProjectMenu.Size = new System.Drawing.Size(192, 22); + this.YtypRemoveFromProjectMenu.Text = "Remove from Project"; + this.YtypRemoveFromProjectMenu.Click += new System.EventHandler(this.YtypRemoveFromProjectMenu_Click); + // + // YndMenu + // + this.YndMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.YndNameMenu, + this.toolStripSeparator14, + this.YndNewNodeMenu, + this.toolStripSeparator16, + this.YndAddToProjectMenu, + this.YndRemoveFromProjectMenu}); + this.YndMenu.Name = "YndMenu"; + this.YndMenu.Size = new System.Drawing.Size(39, 20); + this.YndMenu.Text = "Ynd"; + this.YndMenu.Visible = false; + // + // YndNameMenu + // + this.YndNameMenu.Enabled = false; + this.YndNameMenu.Name = "YndNameMenu"; + this.YndNameMenu.Size = new System.Drawing.Size(189, 22); + this.YndNameMenu.Text = "(No .ynd file selected)"; + // + // toolStripSeparator14 + // + this.toolStripSeparator14.Name = "toolStripSeparator14"; + this.toolStripSeparator14.Size = new System.Drawing.Size(186, 6); + // + // YndNewNodeMenu + // + this.YndNewNodeMenu.Enabled = false; + this.YndNewNodeMenu.Name = "YndNewNodeMenu"; + this.YndNewNodeMenu.Size = new System.Drawing.Size(189, 22); + this.YndNewNodeMenu.Text = "New Node"; + this.YndNewNodeMenu.Click += new System.EventHandler(this.YndNewNodeMenu_Click); + // + // toolStripSeparator16 + // + this.toolStripSeparator16.Name = "toolStripSeparator16"; + this.toolStripSeparator16.Size = new System.Drawing.Size(186, 6); + // + // YndAddToProjectMenu + // + this.YndAddToProjectMenu.Enabled = false; + this.YndAddToProjectMenu.Name = "YndAddToProjectMenu"; + this.YndAddToProjectMenu.Size = new System.Drawing.Size(189, 22); + this.YndAddToProjectMenu.Text = "Add to Project"; + this.YndAddToProjectMenu.Click += new System.EventHandler(this.YndAddToProjectMenu_Click); + // + // YndRemoveFromProjectMenu + // + this.YndRemoveFromProjectMenu.Enabled = false; + this.YndRemoveFromProjectMenu.Name = "YndRemoveFromProjectMenu"; + this.YndRemoveFromProjectMenu.Size = new System.Drawing.Size(189, 22); + this.YndRemoveFromProjectMenu.Text = "Remove from Project"; + this.YndRemoveFromProjectMenu.Click += new System.EventHandler(this.YndRemoveFromProjectMenu_Click); + // + // YnvMenu + // + this.YnvMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.YnvNameMenu, + this.toolStripSeparator17, + this.YnvNewPolygonMenu, + this.toolStripSeparator18, + this.YnvAddToProjectMenu, + this.YnvRemoveFromProjectMenu}); + this.YnvMenu.Name = "YnvMenu"; + this.YnvMenu.Size = new System.Drawing.Size(38, 20); + this.YnvMenu.Text = "Ynv"; + this.YnvMenu.Visible = false; + // + // YnvNameMenu + // + this.YnvNameMenu.Enabled = false; + this.YnvNameMenu.Name = "YnvNameMenu"; + this.YnvNameMenu.Size = new System.Drawing.Size(188, 22); + this.YnvNameMenu.Text = "(No .ynv file selected)"; + // + // toolStripSeparator17 + // + this.toolStripSeparator17.Name = "toolStripSeparator17"; + this.toolStripSeparator17.Size = new System.Drawing.Size(185, 6); + // + // YnvNewPolygonMenu + // + this.YnvNewPolygonMenu.Enabled = false; + this.YnvNewPolygonMenu.Name = "YnvNewPolygonMenu"; + this.YnvNewPolygonMenu.Size = new System.Drawing.Size(188, 22); + this.YnvNewPolygonMenu.Text = "New Polygon"; + this.YnvNewPolygonMenu.Click += new System.EventHandler(this.YnvNewPolygonMenu_Click); + // + // toolStripSeparator18 + // + this.toolStripSeparator18.Name = "toolStripSeparator18"; + this.toolStripSeparator18.Size = new System.Drawing.Size(185, 6); + // + // YnvAddToProjectMenu + // + this.YnvAddToProjectMenu.Enabled = false; + this.YnvAddToProjectMenu.Name = "YnvAddToProjectMenu"; + this.YnvAddToProjectMenu.Size = new System.Drawing.Size(188, 22); + this.YnvAddToProjectMenu.Text = "Add to Project"; + this.YnvAddToProjectMenu.Click += new System.EventHandler(this.YnvAddToProjectMenu_Click); + // + // YnvRemoveFromProjectMenu + // + this.YnvRemoveFromProjectMenu.Enabled = false; + this.YnvRemoveFromProjectMenu.Name = "YnvRemoveFromProjectMenu"; + this.YnvRemoveFromProjectMenu.Size = new System.Drawing.Size(188, 22); + this.YnvRemoveFromProjectMenu.Text = "Remove from Project"; + this.YnvRemoveFromProjectMenu.Click += new System.EventHandler(this.YnvRemoveFromProjectMenu_Click); + // + // TrainsMenu + // + this.TrainsMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.TrainsNameMenu, + this.toolStripSeparator19, + this.TrainsNewNodeMenu, + this.toolStripSeparator20, + this.TrainsAddToProjectMenu, + this.TrainsRemoveFromProjectMenu}); + this.TrainsMenu.Name = "TrainsMenu"; + this.TrainsMenu.Size = new System.Drawing.Size(50, 20); + this.TrainsMenu.Text = "Trains"; + this.TrainsMenu.Visible = false; + // + // TrainsNameMenu + // + this.TrainsNameMenu.Enabled = false; + this.TrainsNameMenu.Name = "TrainsNameMenu"; + this.TrainsNameMenu.Size = new System.Drawing.Size(200, 22); + this.TrainsNameMenu.Text = "(No train track selected)"; + // + // toolStripSeparator19 + // + this.toolStripSeparator19.Name = "toolStripSeparator19"; + this.toolStripSeparator19.Size = new System.Drawing.Size(197, 6); + // + // TrainsNewNodeMenu + // + this.TrainsNewNodeMenu.Enabled = false; + this.TrainsNewNodeMenu.Name = "TrainsNewNodeMenu"; + this.TrainsNewNodeMenu.Size = new System.Drawing.Size(200, 22); + this.TrainsNewNodeMenu.Text = "New Node"; + this.TrainsNewNodeMenu.Click += new System.EventHandler(this.TrainsNewNodeMenu_Click); + // + // toolStripSeparator20 + // + this.toolStripSeparator20.Name = "toolStripSeparator20"; + this.toolStripSeparator20.Size = new System.Drawing.Size(197, 6); + // + // TrainsAddToProjectMenu + // + this.TrainsAddToProjectMenu.Enabled = false; + this.TrainsAddToProjectMenu.Name = "TrainsAddToProjectMenu"; + this.TrainsAddToProjectMenu.Size = new System.Drawing.Size(200, 22); + this.TrainsAddToProjectMenu.Text = "Add to Project"; + this.TrainsAddToProjectMenu.Click += new System.EventHandler(this.TrainsAddToProjectMenu_Click); + // + // TrainsRemoveFromProjectMenu + // + this.TrainsRemoveFromProjectMenu.Enabled = false; + this.TrainsRemoveFromProjectMenu.Name = "TrainsRemoveFromProjectMenu"; + this.TrainsRemoveFromProjectMenu.Size = new System.Drawing.Size(200, 22); + this.TrainsRemoveFromProjectMenu.Text = "Remove from Project"; + this.TrainsRemoveFromProjectMenu.Click += new System.EventHandler(this.TrainsRemoveFromProjectMenu_Click); + // + // ScenarioMenu + // + this.ScenarioMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.ScenarioNameMenu, + this.toolStripSeparator21, + this.ScenarioNewPointMenu, + this.ScenarioNewPointFromSelectedMenu, + this.ScenarioNewEntityOverrideMenu, + this.ScenarioNewChainMenu, + this.ScenarioNewClusterMenu, + this.ScenarioImportChainMenu, + this.toolStripSeparator22, + this.ScenarioAddToProjectMenu, + this.ScenarioRemoveFromProjectMenu}); + this.ScenarioMenu.Name = "ScenarioMenu"; + this.ScenarioMenu.Size = new System.Drawing.Size(64, 20); + this.ScenarioMenu.Text = "Scenario"; + this.ScenarioMenu.Visible = false; + // + // ScenarioNameMenu + // + this.ScenarioNameMenu.Enabled = false; + this.ScenarioNameMenu.Name = "ScenarioNameMenu"; + this.ScenarioNameMenu.Size = new System.Drawing.Size(228, 22); + this.ScenarioNameMenu.Text = "(No scenario region selected)"; + // + // toolStripSeparator21 + // + this.toolStripSeparator21.Name = "toolStripSeparator21"; + this.toolStripSeparator21.Size = new System.Drawing.Size(225, 6); + // + // ScenarioNewPointMenu + // + this.ScenarioNewPointMenu.Enabled = false; + this.ScenarioNewPointMenu.Name = "ScenarioNewPointMenu"; + this.ScenarioNewPointMenu.Size = new System.Drawing.Size(228, 22); + this.ScenarioNewPointMenu.Text = "New Point (Blank)"; + this.ScenarioNewPointMenu.Click += new System.EventHandler(this.ScenarioNewPointMenu_Click); + // + // ScenarioNewPointFromSelectedMenu + // + this.ScenarioNewPointFromSelectedMenu.Enabled = false; + this.ScenarioNewPointFromSelectedMenu.Name = "ScenarioNewPointFromSelectedMenu"; + this.ScenarioNewPointFromSelectedMenu.Size = new System.Drawing.Size(228, 22); + this.ScenarioNewPointFromSelectedMenu.Text = "New Point (from Selected)"; + this.ScenarioNewPointFromSelectedMenu.Click += new System.EventHandler(this.ScenarioNewPointFromSelectedMenu_Click); + // + // ScenarioNewEntityOverrideMenu + // + this.ScenarioNewEntityOverrideMenu.Enabled = false; + this.ScenarioNewEntityOverrideMenu.Name = "ScenarioNewEntityOverrideMenu"; + this.ScenarioNewEntityOverrideMenu.Size = new System.Drawing.Size(228, 22); + this.ScenarioNewEntityOverrideMenu.Text = "New Entity Override"; + this.ScenarioNewEntityOverrideMenu.Click += new System.EventHandler(this.ScenarioNewEntityOverrideMenu_Click); + // + // ScenarioNewChainMenu + // + this.ScenarioNewChainMenu.Enabled = false; + this.ScenarioNewChainMenu.Name = "ScenarioNewChainMenu"; + this.ScenarioNewChainMenu.Size = new System.Drawing.Size(228, 22); + this.ScenarioNewChainMenu.Text = "New Chain"; + this.ScenarioNewChainMenu.Click += new System.EventHandler(this.ScenarioNewChainMenu_Click); + // + // ScenarioNewClusterMenu + // + this.ScenarioNewClusterMenu.Enabled = false; + this.ScenarioNewClusterMenu.Name = "ScenarioNewClusterMenu"; + this.ScenarioNewClusterMenu.Size = new System.Drawing.Size(228, 22); + this.ScenarioNewClusterMenu.Text = "New Cluster"; + this.ScenarioNewClusterMenu.Click += new System.EventHandler(this.ScenarioNewClusterMenu_Click); + // + // ScenarioImportChainMenu + // + this.ScenarioImportChainMenu.Enabled = false; + this.ScenarioImportChainMenu.Name = "ScenarioImportChainMenu"; + this.ScenarioImportChainMenu.Size = new System.Drawing.Size(228, 22); + this.ScenarioImportChainMenu.Text = "Import Chain..."; + this.ScenarioImportChainMenu.Click += new System.EventHandler(this.ScenarioImportChainMenu_Click); + // + // toolStripSeparator22 + // + this.toolStripSeparator22.Name = "toolStripSeparator22"; + this.toolStripSeparator22.Size = new System.Drawing.Size(225, 6); + // + // ScenarioAddToProjectMenu + // + this.ScenarioAddToProjectMenu.Enabled = false; + this.ScenarioAddToProjectMenu.Name = "ScenarioAddToProjectMenu"; + this.ScenarioAddToProjectMenu.Size = new System.Drawing.Size(228, 22); + this.ScenarioAddToProjectMenu.Text = "Add to Project"; + this.ScenarioAddToProjectMenu.Click += new System.EventHandler(this.ScenarioAddToProjectMenu_Click); + // + // ScenarioRemoveFromProjectMenu + // + this.ScenarioRemoveFromProjectMenu.Enabled = false; + this.ScenarioRemoveFromProjectMenu.Name = "ScenarioRemoveFromProjectMenu"; + this.ScenarioRemoveFromProjectMenu.Size = new System.Drawing.Size(228, 22); + this.ScenarioRemoveFromProjectMenu.Text = "Remove from Project"; + this.ScenarioRemoveFromProjectMenu.Click += new System.EventHandler(this.ScenarioRemoveFromProjectMenu_Click); + // // ToolsMenu // this.ToolsMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.ToolsManifestGeneratorMenu, + this.ToolsNavMeshGeneratorMenu, this.toolStripSeparator2, this.ToolsImportMenyooXmlMenu}); this.ToolsMenu.Name = "ToolsMenu"; @@ -471,6 +917,14 @@ this.ToolsManifestGeneratorMenu.Text = "Manifest Generator..."; this.ToolsManifestGeneratorMenu.Click += new System.EventHandler(this.ToolsManifestGeneratorMenu_Click); // + // ToolsNavMeshGeneratorMenu + // + this.ToolsNavMeshGeneratorMenu.Name = "ToolsNavMeshGeneratorMenu"; + this.ToolsNavMeshGeneratorMenu.Size = new System.Drawing.Size(193, 22); + this.ToolsNavMeshGeneratorMenu.Text = "Nav Mesh Generator..."; + this.ToolsNavMeshGeneratorMenu.Visible = false; + this.ToolsNavMeshGeneratorMenu.Click += new System.EventHandler(this.ToolsNavMeshGeneratorMenu_Click); + // // toolStripSeparator2 // this.toolStripSeparator2.Name = "toolStripSeparator2"; @@ -720,451 +1174,7 @@ this.toolStripSeparator5.Name = "toolStripSeparator5"; this.toolStripSeparator5.Size = new System.Drawing.Size(6, 25); // - // EditUndoMenu - // - this.EditUndoMenu.Enabled = false; - this.EditUndoMenu.Name = "EditUndoMenu"; - this.EditUndoMenu.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Z))); - this.EditUndoMenu.Size = new System.Drawing.Size(190, 22); - this.EditUndoMenu.Text = "Undo"; - // - // EditRedoMenu - // - this.EditRedoMenu.Enabled = false; - this.EditRedoMenu.Name = "EditRedoMenu"; - this.EditRedoMenu.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Y))); - this.EditRedoMenu.Size = new System.Drawing.Size(190, 22); - this.EditRedoMenu.Text = "Redo"; - // - // toolStripSeparator10 - // - this.toolStripSeparator10.Name = "toolStripSeparator10"; - this.toolStripSeparator10.Size = new System.Drawing.Size(187, 6); - // - // EditCutMenu - // - this.EditCutMenu.Enabled = false; - this.EditCutMenu.Name = "EditCutMenu"; - this.EditCutMenu.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.X))); - this.EditCutMenu.Size = new System.Drawing.Size(190, 22); - this.EditCutMenu.Text = "Cut Item"; - // - // EditCopyMenu - // - this.EditCopyMenu.Enabled = false; - this.EditCopyMenu.Name = "EditCopyMenu"; - this.EditCopyMenu.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.C))); - this.EditCopyMenu.Size = new System.Drawing.Size(190, 22); - this.EditCopyMenu.Text = "Copy Item"; - // - // EditPasteMenu - // - this.EditPasteMenu.Enabled = false; - this.EditPasteMenu.Name = "EditPasteMenu"; - this.EditPasteMenu.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.V))); - this.EditPasteMenu.Size = new System.Drawing.Size(190, 22); - this.EditPasteMenu.Text = "Paste Item"; - // - // EditDeleteMenu - // - this.EditDeleteMenu.Enabled = false; - this.EditDeleteMenu.Name = "EditDeleteMenu"; - this.EditDeleteMenu.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Shift | System.Windows.Forms.Keys.Delete))); - this.EditDeleteMenu.Size = new System.Drawing.Size(190, 22); - this.EditDeleteMenu.Text = "Delete Item"; - // - // EditCloneMenu - // - this.EditCloneMenu.Enabled = false; - this.EditCloneMenu.Name = "EditCloneMenu"; - this.EditCloneMenu.Size = new System.Drawing.Size(190, 22); - this.EditCloneMenu.Text = "Clone Item"; - // - // YmapMenu - // - this.YmapMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.YmapNameMenu, - this.toolStripSeparator11, - this.YmapNewEntityMenu, - this.YmapNewCarGenMenu, - this.toolStripSeparator12, - this.YmapAddToProjectMenu, - this.YmapRemoveFromProjectMenu}); - this.YmapMenu.Name = "YmapMenu"; - this.YmapMenu.Size = new System.Drawing.Size(49, 20); - this.YmapMenu.Text = "Ymap"; - this.YmapMenu.Visible = false; - // - // YtypMenu - // - this.YtypMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.YtypNameMenu, - this.toolStripSeparator13, - this.YtypNewArchetypeMenu, - this.toolStripSeparator15, - this.YtypAddToProjectMenu, - this.YtypRemoveFromProjectMenu}); - this.YtypMenu.Name = "YtypMenu"; - this.YtypMenu.Size = new System.Drawing.Size(43, 20); - this.YtypMenu.Text = "Ytyp"; - this.YtypMenu.Visible = false; - // - // YndMenu - // - this.YndMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.YndNameMenu, - this.toolStripSeparator14, - this.YndNewNodeMenu, - this.toolStripSeparator16, - this.YndAddToProjectMenu, - this.YndRemoveFromProjectMenu}); - this.YndMenu.Name = "YndMenu"; - this.YndMenu.Size = new System.Drawing.Size(39, 20); - this.YndMenu.Text = "Ynd"; - this.YndMenu.Visible = false; - // - // YnvMenu - // - this.YnvMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.YnvNameMenu, - this.toolStripSeparator17, - this.YnvNewPolygonMenu, - this.toolStripSeparator18, - this.YnvAddToProjectMenu, - this.YnvRemoveFromProjectMenu}); - this.YnvMenu.Name = "YnvMenu"; - this.YnvMenu.Size = new System.Drawing.Size(38, 20); - this.YnvMenu.Text = "Ynv"; - this.YnvMenu.Visible = false; - // - // TrainsMenu - // - this.TrainsMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.TrainsNameMenu, - this.toolStripSeparator19, - this.TrainsNewNodeMenu, - this.toolStripSeparator20, - this.TrainsAddToProjectMenu, - this.TrainsRemoveFromProjectMenu}); - this.TrainsMenu.Name = "TrainsMenu"; - this.TrainsMenu.Size = new System.Drawing.Size(50, 20); - this.TrainsMenu.Text = "Trains"; - this.TrainsMenu.Visible = false; - // - // ScenarioMenu - // - this.ScenarioMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.ScenarioNameMenu, - this.toolStripSeparator21, - this.ScenarioNewPointMenu, - this.ScenarioNewPointFromSelectedMenu, - this.ScenarioNewEntityOverrideMenu, - this.ScenarioNewChainMenu, - this.ScenarioNewClusterMenu, - this.ScenarioImportChainMenu, - this.toolStripSeparator22, - this.ScenarioAddToProjectMenu, - this.ScenarioRemoveFromProjectMenu}); - this.ScenarioMenu.Name = "ScenarioMenu"; - this.ScenarioMenu.Size = new System.Drawing.Size(64, 20); - this.ScenarioMenu.Text = "Scenario"; - this.ScenarioMenu.Visible = false; - // - // YmapNameMenu - // - this.YmapNameMenu.Enabled = false; - this.YmapNameMenu.Name = "YmapNameMenu"; - this.YmapNameMenu.Size = new System.Drawing.Size(199, 22); - this.YmapNameMenu.Text = "(No .ymap file selected)"; - // - // toolStripSeparator11 - // - this.toolStripSeparator11.Name = "toolStripSeparator11"; - this.toolStripSeparator11.Size = new System.Drawing.Size(196, 6); - // - // YmapNewEntityMenu - // - this.YmapNewEntityMenu.Enabled = false; - this.YmapNewEntityMenu.Name = "YmapNewEntityMenu"; - this.YmapNewEntityMenu.Size = new System.Drawing.Size(199, 22); - this.YmapNewEntityMenu.Text = "New Entity"; - this.YmapNewEntityMenu.Click += new System.EventHandler(this.YmapNewEntityMenu_Click); - // - // YmapNewCarGenMenu - // - this.YmapNewCarGenMenu.Enabled = false; - this.YmapNewCarGenMenu.Name = "YmapNewCarGenMenu"; - this.YmapNewCarGenMenu.Size = new System.Drawing.Size(199, 22); - this.YmapNewCarGenMenu.Text = "New Car Generator"; - this.YmapNewCarGenMenu.Click += new System.EventHandler(this.YmapNewCarGenMenu_Click); - // - // toolStripSeparator12 - // - this.toolStripSeparator12.Name = "toolStripSeparator12"; - this.toolStripSeparator12.Size = new System.Drawing.Size(196, 6); - // - // YmapAddToProjectMenu - // - this.YmapAddToProjectMenu.Enabled = false; - this.YmapAddToProjectMenu.Name = "YmapAddToProjectMenu"; - this.YmapAddToProjectMenu.Size = new System.Drawing.Size(199, 22); - this.YmapAddToProjectMenu.Text = "Add to Project"; - this.YmapAddToProjectMenu.Click += new System.EventHandler(this.YmapAddToProjectMenu_Click); - // - // YmapRemoveFromProjectMenu - // - this.YmapRemoveFromProjectMenu.Enabled = false; - this.YmapRemoveFromProjectMenu.Name = "YmapRemoveFromProjectMenu"; - this.YmapRemoveFromProjectMenu.Size = new System.Drawing.Size(199, 22); - this.YmapRemoveFromProjectMenu.Text = "Remove from Project"; - this.YmapRemoveFromProjectMenu.Click += new System.EventHandler(this.YmapRemoveFromProjectMenu_Click); - // - // YtypNameMenu - // - this.YtypNameMenu.Enabled = false; - this.YtypNameMenu.Name = "YtypNameMenu"; - this.YtypNameMenu.Size = new System.Drawing.Size(192, 22); - this.YtypNameMenu.Text = "(No .ytyp file selected)"; - // - // toolStripSeparator13 - // - this.toolStripSeparator13.Name = "toolStripSeparator13"; - this.toolStripSeparator13.Size = new System.Drawing.Size(189, 6); - // - // YtypNewArchetypeMenu - // - this.YtypNewArchetypeMenu.Enabled = false; - this.YtypNewArchetypeMenu.Name = "YtypNewArchetypeMenu"; - this.YtypNewArchetypeMenu.Size = new System.Drawing.Size(192, 22); - this.YtypNewArchetypeMenu.Text = "New Archetype"; - this.YtypNewArchetypeMenu.Click += new System.EventHandler(this.YtypNewArchetypeMenu_Click); - // - // YndNameMenu - // - this.YndNameMenu.Enabled = false; - this.YndNameMenu.Name = "YndNameMenu"; - this.YndNameMenu.Size = new System.Drawing.Size(189, 22); - this.YndNameMenu.Text = "(No .ynd file selected)"; - // - // toolStripSeparator14 - // - this.toolStripSeparator14.Name = "toolStripSeparator14"; - this.toolStripSeparator14.Size = new System.Drawing.Size(186, 6); - // - // toolStripSeparator15 - // - this.toolStripSeparator15.Name = "toolStripSeparator15"; - this.toolStripSeparator15.Size = new System.Drawing.Size(189, 6); - // - // YtypAddToProjectMenu - // - this.YtypAddToProjectMenu.Enabled = false; - this.YtypAddToProjectMenu.Name = "YtypAddToProjectMenu"; - this.YtypAddToProjectMenu.Size = new System.Drawing.Size(192, 22); - this.YtypAddToProjectMenu.Text = "Add to Project"; - this.YtypAddToProjectMenu.Click += new System.EventHandler(this.YtypAddToProjectMenu_Click); - // - // YtypRemoveFromProjectMenu - // - this.YtypRemoveFromProjectMenu.Enabled = false; - this.YtypRemoveFromProjectMenu.Name = "YtypRemoveFromProjectMenu"; - this.YtypRemoveFromProjectMenu.Size = new System.Drawing.Size(192, 22); - this.YtypRemoveFromProjectMenu.Text = "Remove from Project"; - this.YtypRemoveFromProjectMenu.Click += new System.EventHandler(this.YtypRemoveFromProjectMenu_Click); - // - // YndNewNodeMenu - // - this.YndNewNodeMenu.Enabled = false; - this.YndNewNodeMenu.Name = "YndNewNodeMenu"; - this.YndNewNodeMenu.Size = new System.Drawing.Size(189, 22); - this.YndNewNodeMenu.Text = "New Node"; - this.YndNewNodeMenu.Click += new System.EventHandler(this.YndNewNodeMenu_Click); - // - // toolStripSeparator16 - // - this.toolStripSeparator16.Name = "toolStripSeparator16"; - this.toolStripSeparator16.Size = new System.Drawing.Size(186, 6); - // - // YndAddToProjectMenu - // - this.YndAddToProjectMenu.Enabled = false; - this.YndAddToProjectMenu.Name = "YndAddToProjectMenu"; - this.YndAddToProjectMenu.Size = new System.Drawing.Size(189, 22); - this.YndAddToProjectMenu.Text = "Add to Project"; - this.YndAddToProjectMenu.Click += new System.EventHandler(this.YndAddToProjectMenu_Click); - // - // YndRemoveFromProjectMenu - // - this.YndRemoveFromProjectMenu.Enabled = false; - this.YndRemoveFromProjectMenu.Name = "YndRemoveFromProjectMenu"; - this.YndRemoveFromProjectMenu.Size = new System.Drawing.Size(189, 22); - this.YndRemoveFromProjectMenu.Text = "Remove from Project"; - this.YndRemoveFromProjectMenu.Click += new System.EventHandler(this.YndRemoveFromProjectMenu_Click); - // - // YnvNameMenu - // - this.YnvNameMenu.Enabled = false; - this.YnvNameMenu.Name = "YnvNameMenu"; - this.YnvNameMenu.Size = new System.Drawing.Size(188, 22); - this.YnvNameMenu.Text = "(No .ynv file selected)"; - // - // toolStripSeparator17 - // - this.toolStripSeparator17.Name = "toolStripSeparator17"; - this.toolStripSeparator17.Size = new System.Drawing.Size(185, 6); - // - // YnvNewPolygonMenu - // - this.YnvNewPolygonMenu.Enabled = false; - this.YnvNewPolygonMenu.Name = "YnvNewPolygonMenu"; - this.YnvNewPolygonMenu.Size = new System.Drawing.Size(188, 22); - this.YnvNewPolygonMenu.Text = "New Polygon"; - this.YnvNewPolygonMenu.Click += new System.EventHandler(this.YnvNewPolygonMenu_Click); - // - // toolStripSeparator18 - // - this.toolStripSeparator18.Name = "toolStripSeparator18"; - this.toolStripSeparator18.Size = new System.Drawing.Size(185, 6); - // - // YnvAddToProjectMenu - // - this.YnvAddToProjectMenu.Enabled = false; - this.YnvAddToProjectMenu.Name = "YnvAddToProjectMenu"; - this.YnvAddToProjectMenu.Size = new System.Drawing.Size(188, 22); - this.YnvAddToProjectMenu.Text = "Add to Project"; - this.YnvAddToProjectMenu.Click += new System.EventHandler(this.YnvAddToProjectMenu_Click); - // - // YnvRemoveFromProjectMenu - // - this.YnvRemoveFromProjectMenu.Enabled = false; - this.YnvRemoveFromProjectMenu.Name = "YnvRemoveFromProjectMenu"; - this.YnvRemoveFromProjectMenu.Size = new System.Drawing.Size(188, 22); - this.YnvRemoveFromProjectMenu.Text = "Remove from Project"; - this.YnvRemoveFromProjectMenu.Click += new System.EventHandler(this.YnvRemoveFromProjectMenu_Click); - // - // TrainsNameMenu - // - this.TrainsNameMenu.Enabled = false; - this.TrainsNameMenu.Name = "TrainsNameMenu"; - this.TrainsNameMenu.Size = new System.Drawing.Size(200, 22); - this.TrainsNameMenu.Text = "(No train track selected)"; - // - // toolStripSeparator19 - // - this.toolStripSeparator19.Name = "toolStripSeparator19"; - this.toolStripSeparator19.Size = new System.Drawing.Size(197, 6); - // - // TrainsNewNodeMenu - // - this.TrainsNewNodeMenu.Enabled = false; - this.TrainsNewNodeMenu.Name = "TrainsNewNodeMenu"; - this.TrainsNewNodeMenu.Size = new System.Drawing.Size(200, 22); - this.TrainsNewNodeMenu.Text = "New Node"; - this.TrainsNewNodeMenu.Click += new System.EventHandler(this.TrainsNewNodeMenu_Click); - // - // toolStripSeparator20 - // - this.toolStripSeparator20.Name = "toolStripSeparator20"; - this.toolStripSeparator20.Size = new System.Drawing.Size(197, 6); - // - // TrainsAddToProjectMenu - // - this.TrainsAddToProjectMenu.Enabled = false; - this.TrainsAddToProjectMenu.Name = "TrainsAddToProjectMenu"; - this.TrainsAddToProjectMenu.Size = new System.Drawing.Size(200, 22); - this.TrainsAddToProjectMenu.Text = "Add to Project"; - this.TrainsAddToProjectMenu.Click += new System.EventHandler(this.TrainsAddToProjectMenu_Click); - // - // TrainsRemoveFromProjectMenu - // - this.TrainsRemoveFromProjectMenu.Enabled = false; - this.TrainsRemoveFromProjectMenu.Name = "TrainsRemoveFromProjectMenu"; - this.TrainsRemoveFromProjectMenu.Size = new System.Drawing.Size(200, 22); - this.TrainsRemoveFromProjectMenu.Text = "Remove from Project"; - this.TrainsRemoveFromProjectMenu.Click += new System.EventHandler(this.TrainsRemoveFromProjectMenu_Click); - // - // ScenarioNameMenu - // - this.ScenarioNameMenu.Enabled = false; - this.ScenarioNameMenu.Name = "ScenarioNameMenu"; - this.ScenarioNameMenu.Size = new System.Drawing.Size(228, 22); - this.ScenarioNameMenu.Text = "(No scenario region selected)"; - // - // toolStripSeparator21 - // - this.toolStripSeparator21.Name = "toolStripSeparator21"; - this.toolStripSeparator21.Size = new System.Drawing.Size(225, 6); - // - // ScenarioNewPointMenu - // - this.ScenarioNewPointMenu.Enabled = false; - this.ScenarioNewPointMenu.Name = "ScenarioNewPointMenu"; - this.ScenarioNewPointMenu.Size = new System.Drawing.Size(228, 22); - this.ScenarioNewPointMenu.Text = "New Point (Blank)"; - this.ScenarioNewPointMenu.Click += new System.EventHandler(this.ScenarioNewPointMenu_Click); - // - // ScenarioNewPointFromSelectedMenu - // - this.ScenarioNewPointFromSelectedMenu.Enabled = false; - this.ScenarioNewPointFromSelectedMenu.Name = "ScenarioNewPointFromSelectedMenu"; - this.ScenarioNewPointFromSelectedMenu.Size = new System.Drawing.Size(228, 22); - this.ScenarioNewPointFromSelectedMenu.Text = "New Point (from Selected)"; - this.ScenarioNewPointFromSelectedMenu.Click += new System.EventHandler(this.ScenarioNewPointFromSelectedMenu_Click); - // - // ScenarioNewEntityOverrideMenu - // - this.ScenarioNewEntityOverrideMenu.Enabled = false; - this.ScenarioNewEntityOverrideMenu.Name = "ScenarioNewEntityOverrideMenu"; - this.ScenarioNewEntityOverrideMenu.Size = new System.Drawing.Size(228, 22); - this.ScenarioNewEntityOverrideMenu.Text = "New Entity Override"; - this.ScenarioNewEntityOverrideMenu.Click += new System.EventHandler(this.ScenarioNewEntityOverrideMenu_Click); - // - // ScenarioNewChainMenu - // - this.ScenarioNewChainMenu.Enabled = false; - this.ScenarioNewChainMenu.Name = "ScenarioNewChainMenu"; - this.ScenarioNewChainMenu.Size = new System.Drawing.Size(228, 22); - this.ScenarioNewChainMenu.Text = "New Chain"; - this.ScenarioNewChainMenu.Click += new System.EventHandler(this.ScenarioNewChainMenu_Click); - // - // ScenarioNewClusterMenu - // - this.ScenarioNewClusterMenu.Enabled = false; - this.ScenarioNewClusterMenu.Name = "ScenarioNewClusterMenu"; - this.ScenarioNewClusterMenu.Size = new System.Drawing.Size(228, 22); - this.ScenarioNewClusterMenu.Text = "New Cluster"; - this.ScenarioNewClusterMenu.Click += new System.EventHandler(this.ScenarioNewClusterMenu_Click); - // - // ScenarioImportChainMenu - // - this.ScenarioImportChainMenu.Enabled = false; - this.ScenarioImportChainMenu.Name = "ScenarioImportChainMenu"; - this.ScenarioImportChainMenu.Size = new System.Drawing.Size(228, 22); - this.ScenarioImportChainMenu.Text = "Import Chain..."; - this.ScenarioImportChainMenu.Click += new System.EventHandler(this.ScenarioImportChainMenu_Click); - // - // toolStripSeparator22 - // - this.toolStripSeparator22.Name = "toolStripSeparator22"; - this.toolStripSeparator22.Size = new System.Drawing.Size(225, 6); - // - // ScenarioAddToProjectMenu - // - this.ScenarioAddToProjectMenu.Enabled = false; - this.ScenarioAddToProjectMenu.Name = "ScenarioAddToProjectMenu"; - this.ScenarioAddToProjectMenu.Size = new System.Drawing.Size(228, 22); - this.ScenarioAddToProjectMenu.Text = "Add to Project"; - this.ScenarioAddToProjectMenu.Click += new System.EventHandler(this.ScenarioAddToProjectMenu_Click); - // - // ScenarioRemoveFromProjectMenu - // - this.ScenarioRemoveFromProjectMenu.Enabled = false; - this.ScenarioRemoveFromProjectMenu.Name = "ScenarioRemoveFromProjectMenu"; - this.ScenarioRemoveFromProjectMenu.Size = new System.Drawing.Size(228, 22); - this.ScenarioRemoveFromProjectMenu.Text = "Remove from Project"; - this.ScenarioRemoveFromProjectMenu.Click += new System.EventHandler(this.ScenarioRemoveFromProjectMenu_Click); - // - // ProjectForm2 + // ProjectForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; @@ -1175,7 +1185,7 @@ this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.IsMdiContainer = true; this.MainMenuStrip = this.MainMenu; - this.Name = "ProjectForm2"; + this.Name = "ProjectForm"; this.Text = "Project - CodeWalker by dexyfex"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ProjectForm_FormClosing); this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.ProjectForm_FormClosed); @@ -1314,5 +1324,6 @@ private System.Windows.Forms.ToolStripSeparator toolStripSeparator22; private System.Windows.Forms.ToolStripMenuItem ScenarioAddToProjectMenu; private System.Windows.Forms.ToolStripMenuItem ScenarioRemoveFromProjectMenu; + private System.Windows.Forms.ToolStripMenuItem ToolsNavMeshGeneratorMenu; } } \ No newline at end of file diff --git a/Project/ProjectForm.cs b/Project/ProjectForm.cs index 24d7e59..47014eb 100644 --- a/Project/ProjectForm.cs +++ b/Project/ProjectForm.cs @@ -318,6 +318,13 @@ namespace CodeWalker.Project (panel) => { panel.SetProject(CurrentProjectFile); }, //updateFunc (panel) => { return true; }); //findFunc } + private void ShowGenerateNavMeshPanel(bool promote) + { + ShowPanel(promote, + () => { return new GenerateNavMeshPanel(this); }, //createFunc + (panel) => { panel.SetProject(CurrentProjectFile); }, //updateFunc + (panel) => { return true; }); //findFunc + } private void ShowEditYmapPanel(bool promote) { ShowPanel(promote, @@ -5411,6 +5418,10 @@ namespace CodeWalker.Project { ShowEditProjectManifestPanel(false); } + private void ToolsNavMeshGeneratorMenu_Click(object sender, EventArgs e) + { + ShowGenerateNavMeshPanel(false); + } private void ToolsImportMenyooXmlMenu_Click(object sender, EventArgs e) { ImportMenyooXml(); diff --git a/WorldForm.cs b/WorldForm.cs index c39cf6f..1e586dd 100644 --- a/WorldForm.cs +++ b/WorldForm.cs @@ -42,6 +42,7 @@ namespace CodeWalker PopZones popzones = new PopZones(); AudioZones audiozones = new AudioZones(); + public Space Space { get { return space; } } bool MouseLButtonDown = false; bool MouseRButtonDown = false; From f00ff338785dc6c16056276ffcb910726729d155 Mon Sep 17 00:00:00 2001 From: dexyfex Date: Thu, 7 Jun 2018 13:40:06 +1000 Subject: [PATCH 12/24] Added CodeWalker.ErrorReport standalone tool --- CodeWalker.ErrorReport/App.config | 6 + CodeWalker.ErrorReport/CW.ico | Bin 0 -> 17006 bytes .../CodeWalker.ErrorReport.csproj | 88 ++++ CodeWalker.ErrorReport/Program.cs | 22 + .../Properties/AssemblyInfo.cs | 36 ++ .../Properties/Resources.Designer.cs | 71 +++ .../Properties/Resources.resx | 117 +++++ .../Properties/Settings.Designer.cs | 30 ++ .../Properties/Settings.settings | 7 + CodeWalker.ErrorReport/ReportForm.Designer.cs | 80 ++++ CodeWalker.ErrorReport/ReportForm.cs | 59 +++ CodeWalker.ErrorReport/ReportForm.resx | 409 ++++++++++++++++++ CodeWalker.sln | 14 + 13 files changed, 939 insertions(+) create mode 100644 CodeWalker.ErrorReport/App.config create mode 100644 CodeWalker.ErrorReport/CW.ico create mode 100644 CodeWalker.ErrorReport/CodeWalker.ErrorReport.csproj create mode 100644 CodeWalker.ErrorReport/Program.cs create mode 100644 CodeWalker.ErrorReport/Properties/AssemblyInfo.cs create mode 100644 CodeWalker.ErrorReport/Properties/Resources.Designer.cs create mode 100644 CodeWalker.ErrorReport/Properties/Resources.resx create mode 100644 CodeWalker.ErrorReport/Properties/Settings.Designer.cs create mode 100644 CodeWalker.ErrorReport/Properties/Settings.settings create mode 100644 CodeWalker.ErrorReport/ReportForm.Designer.cs create mode 100644 CodeWalker.ErrorReport/ReportForm.cs create mode 100644 CodeWalker.ErrorReport/ReportForm.resx diff --git a/CodeWalker.ErrorReport/App.config b/CodeWalker.ErrorReport/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/CodeWalker.ErrorReport/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/CodeWalker.ErrorReport/CW.ico b/CodeWalker.ErrorReport/CW.ico new file mode 100644 index 0000000000000000000000000000000000000000..6c7a70df7aecc591c7f1367ab52fcc797235a36b GIT binary patch literal 17006 zcmeHP30PD|wyqWhR1_67u7PM0jmFU-ipC@^$z;rE+>ILJzC4YH5k)~k(p#QoDBidZ`v6si+${l3({RA>^O9*9Vuz_#25o5!$Ifp!>i3sgo;< zORH;YsZvS*a1@kErL0PMConlZTP9ch3H&K7Dy>^;IE`Pg>`cloVx0p zT2=EK{(!5Ah$)n`PRLCmc>3Mb2XS!a#ky%--z6+qFl{70~Q6y2m7BnTLvTFJ) zvG!SFU73v5qX++#teSowTb%VsmQ^wSs416GZ-0qSCwsqONp)>~ks3;vQ$)MIw^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6KR$Tzsn+KuiOwH=mW*H=B|3pd z_$`sGM8^(iGD4z5*x5*;tvc(g&pPU}mZZ6=o}EX4PV;Qbev^cHN@<{$SoLcXu?~I% zfon-yex`E#VhPu@T73o?yH9Z@_-PEP@zJM&s7Ygn@))r*e*L04qd)wk2fJouWn28Z!%mx>M{3#Wk$HM#pjP1L z>^xLQTutURC+`|T-jOOis!5;e!9ILQO}k6KJbaSZ!DF3;P + + + + Debug + AnyCPU + {47A2C383-99B4-4447-94D9-0685E6D7E2DA} + WinExe + CodeWalker.ErrorReport + CodeWalker.ErrorReport + v4.5.2 + 512 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + CW.ico + + + + + + + + + + + + + + + + + Form + + + ReportForm.cs + + + + + ReportForm.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + + + \ No newline at end of file diff --git a/CodeWalker.ErrorReport/Program.cs b/CodeWalker.ErrorReport/Program.cs new file mode 100644 index 0000000..f24675e --- /dev/null +++ b/CodeWalker.ErrorReport/Program.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace CodeWalker.ErrorReport +{ + static class Program + { + ///

+ /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new ReportForm()); + } + } +} diff --git a/CodeWalker.ErrorReport/Properties/AssemblyInfo.cs b/CodeWalker.ErrorReport/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..6481af3 --- /dev/null +++ b/CodeWalker.ErrorReport/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("CodeWalker.ErrorReport")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("CodeWalker.ErrorReport")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("47a2c383-99b4-4447-94d9-0685e6d7e2da")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/CodeWalker.ErrorReport/Properties/Resources.Designer.cs b/CodeWalker.ErrorReport/Properties/Resources.Designer.cs new file mode 100644 index 0000000..c53a407 --- /dev/null +++ b/CodeWalker.ErrorReport/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace CodeWalker.ErrorReport.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CodeWalker.ErrorReport.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/CodeWalker.ErrorReport/Properties/Resources.resx b/CodeWalker.ErrorReport/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/CodeWalker.ErrorReport/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/CodeWalker.ErrorReport/Properties/Settings.Designer.cs b/CodeWalker.ErrorReport/Properties/Settings.Designer.cs new file mode 100644 index 0000000..f7cede3 --- /dev/null +++ b/CodeWalker.ErrorReport/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace CodeWalker.ErrorReport.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/CodeWalker.ErrorReport/Properties/Settings.settings b/CodeWalker.ErrorReport/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/CodeWalker.ErrorReport/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/CodeWalker.ErrorReport/ReportForm.Designer.cs b/CodeWalker.ErrorReport/ReportForm.Designer.cs new file mode 100644 index 0000000..7aa62bf --- /dev/null +++ b/CodeWalker.ErrorReport/ReportForm.Designer.cs @@ -0,0 +1,80 @@ +namespace CodeWalker.ErrorReport +{ + partial class ReportForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ReportForm)); + this.label1 = new System.Windows.Forms.Label(); + this.ErrorTextBox = new System.Windows.Forms.TextBox(); + this.SuspendLayout(); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(12, 9); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(136, 13); + this.label1.TabIndex = 0; + this.label1.Text = "Last CodeWalker.exe error:"; + // + // ErrorTextBox + // + this.ErrorTextBox.AcceptsReturn = true; + this.ErrorTextBox.AcceptsTab = true; + this.ErrorTextBox.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.ErrorTextBox.Location = new System.Drawing.Point(12, 36); + this.ErrorTextBox.Multiline = true; + this.ErrorTextBox.Name = "ErrorTextBox"; + this.ErrorTextBox.Size = new System.Drawing.Size(630, 329); + this.ErrorTextBox.TabIndex = 1; + // + // ReportForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(654, 377); + this.Controls.Add(this.ErrorTextBox); + this.Controls.Add(this.label1); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Name = "ReportForm"; + this.Text = "CodeWalker Error Report Tool"; + this.Load += new System.EventHandler(this.ReportForm_Load); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox ErrorTextBox; + } +} + diff --git a/CodeWalker.ErrorReport/ReportForm.cs b/CodeWalker.ErrorReport/ReportForm.cs new file mode 100644 index 0000000..692d00b --- /dev/null +++ b/CodeWalker.ErrorReport/ReportForm.cs @@ -0,0 +1,59 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Diagnostics; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace CodeWalker.ErrorReport +{ + public partial class ReportForm : Form + { + public ReportForm() + { + InitializeComponent(); + } + + private void ReportForm_Load(object sender, EventArgs e) + { + EventLog myLog = new EventLog(); + myLog.Log = "Application"; + //myLog.Source = ".NET Runtime"; + + var lastEntry = myLog.Entries[myLog.Entries.Count - 1]; + var last_error_Message = lastEntry.Message; + + bool found = false; + + for (int index = myLog.Entries.Count - 1; index > 0; index--) + { + var errLastEntry = myLog.Entries[index]; + if (errLastEntry.EntryType == EventLogEntryType.Error) + { + if (errLastEntry.Source == ".NET Runtime") + { + var msg = errLastEntry.Message; + var lines = msg.Split('\n'); + if ((lines.Length > 0) && (lines[0].Contains("CodeWalker.exe"))) + { + ErrorTextBox.Text = msg.Replace("\n", "\r\n"); + found = true; + break; + } + } + } + } + + if (!found) + { + ErrorTextBox.Text = "Event Log entry not found!"; + MessageBox.Show("Unable to find the last CodeWalker.exe error in the Event Log."); + } + + } + } +} diff --git a/CodeWalker.ErrorReport/ReportForm.resx b/CodeWalker.ErrorReport/ReportForm.resx new file mode 100644 index 0000000..1431f6b --- /dev/null +++ b/CodeWalker.ErrorReport/ReportForm.resx @@ -0,0 +1,409 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + AAABAAMAICAAAAAAGACoDAAANgAAABAQAAAAABgAaAMAAN4MAABAQAAAAAAYACgyAABGEAAAKAAAACAA + AABAAAAAAQAYAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAA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AAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///4+Vx7/F5v///wAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAP///4CHtrS62////////////////////wAAAAAAAAAAAP////H0/vf6/v// + /////////4yTwrrB4f///+zw+7rA6P39/////wAAAAAAAAAAAP///56l2BkcguXr/P///////42Uw8jO + 6P///ysvjWVqtP///////wAAAAAAAAAAAP////D0/0hPpsDG6////////6y02d7k8////3qAx+/z/f// + /wAAAAAAAAAAAAAAAAAAAP///////////////8zT8V5ns1Rcrdzh9f///////////wAAAAAAAAAAAAAA + AAAAAP////////7+/6ix3nmBxFthtmdwu09WqbC54/v9//r8//j6//39/wAAAAAAAAAAAOjt/H6I0FJc + skpSqHF+wRMahFZhs4iT1AsNc1pgrm52v2RsuO/z/gAAAP////////L2/cLJ7rrD64+V4DY+ozU+mYmU + 0X2Hy1hfss7V8urv/PP2/v///wAAAP///+Pp+d/k9////////+Pp/4uR3ysymW14xYOM0fD0/P///+Xq + +ri/6Pj6/wAAAOrv/j5DnbS75P////////////X4/+/0/ubr+/r7/////////9rh+hgZhKGo2QAAAPDz + /eLn+f////j6/2Nqttrg9////+Hn+P3+//3+/1hescLJ6/////L2/eru/AAAAAAAAAAAAP///8rR70tR + p/3+//v8/zY6jNPY7////09WqWpwu////wAAAAAAAAAAAAAAAAAAAAAAAPb4/vr7//////v8/5Wd1eHm + +P////v8//T3/wAAAAAAAAAAAAAAAP//AAD8PwAA/D8AAPwDAACAAwAAgAMAAIAHAADABwAAwAEAAMAB + AAAAAQAAAAEAAAABAAAAAQAAwAcAAOAPAAAoAAAAQAAAAIAAAAABABgAAAAAAAAwAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/v7//P3/+fv/+fv/+vv/+Pr/+vv/ + /P3//v7/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/v7//f7/ + /f3//P3//f7//v7//v//AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//////// + ///////4D/////////AH////////8Af////////wB/////////AH////////8Af////////wB/////// + //AH////////8Af////////wB/////////AH////////8AfwP//////wB8Af//+Af/AHgB///wA/8AcA + H///AB/wBgAf//8AD/AGAB///wAH8AYAH///AAPwBAAf//8AA/AEAD///wAD8AQAP///AAPwBAB///+A + A/AEAP///8AD4AAA////4AcAAAH////wDgAAAf/////8AAAH//////gAAAf/////4AAAAf/////gAAAA + /f//+AAAAAAAD//AAAAAAAAH/4AAAAAAAAf/gAAAAAAAB/+AAAAAAAAH/4AAAAAAAAf/gAAAAAAAB/+A + AAAAAAAP/4AAAAAAAB//wAAAAABAf/4HwAAAAYAf8APAAAADgA/gA+AAAAMAA8AD8AAABwADgAP8AAAf + AAOAA/4AAB8AA4ADAAAAAQADgAIAcA4AgAOABgBwDgBAA4AMAGAMADADwDwAYAwAOAfg+ABgBAAeH//4 + AEAEAB////gAwAYAH///+ADABgAf///4AcAGAB////gBwAcAH///+APAB4A////8B+AHwH//////4A// + ///////gD/////////Af//////////////8= + + + \ No newline at end of file diff --git a/CodeWalker.sln b/CodeWalker.sln index eafff3b..c22e80d 100644 --- a/CodeWalker.sln +++ b/CodeWalker.sln @@ -15,6 +15,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeWalker.WinForms", "Code EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeWalker.Core", "CodeWalker.Core\CodeWalker.Core.csproj", "{DE50D3A6-B49E-47A0-ABE6-101473A00759}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeWalker.ErrorReport", "CodeWalker.ErrorReport\CodeWalker.ErrorReport.csproj", "{47A2C383-99B4-4447-94D9-0685E6D7E2DA}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -73,6 +75,18 @@ Global {DE50D3A6-B49E-47A0-ABE6-101473A00759}.Release|x64.Build.0 = Release|Any CPU {DE50D3A6-B49E-47A0-ABE6-101473A00759}.Release|x86.ActiveCfg = Release|Any CPU {DE50D3A6-B49E-47A0-ABE6-101473A00759}.Release|x86.Build.0 = Release|Any CPU + {47A2C383-99B4-4447-94D9-0685E6D7E2DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {47A2C383-99B4-4447-94D9-0685E6D7E2DA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {47A2C383-99B4-4447-94D9-0685E6D7E2DA}.Debug|x64.ActiveCfg = Debug|Any CPU + {47A2C383-99B4-4447-94D9-0685E6D7E2DA}.Debug|x64.Build.0 = Debug|Any CPU + {47A2C383-99B4-4447-94D9-0685E6D7E2DA}.Debug|x86.ActiveCfg = Debug|Any CPU + {47A2C383-99B4-4447-94D9-0685E6D7E2DA}.Debug|x86.Build.0 = Debug|Any CPU + {47A2C383-99B4-4447-94D9-0685E6D7E2DA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {47A2C383-99B4-4447-94D9-0685E6D7E2DA}.Release|Any CPU.Build.0 = Release|Any CPU + {47A2C383-99B4-4447-94D9-0685E6D7E2DA}.Release|x64.ActiveCfg = Release|Any CPU + {47A2C383-99B4-4447-94D9-0685E6D7E2DA}.Release|x64.Build.0 = Release|Any CPU + {47A2C383-99B4-4447-94D9-0685E6D7E2DA}.Release|x86.ActiveCfg = Release|Any CPU + {47A2C383-99B4-4447-94D9-0685E6D7E2DA}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE From b971beb5bf3797d04a0f1d85ea75ba0f8499b6dc Mon Sep 17 00:00:00 2001 From: Soloman N Date: Thu, 7 Jun 2018 12:42:41 -0400 Subject: [PATCH 13/24] added grass painting --- CodeWalker.Core/CodeWalker.Core.csproj | 1 + .../GameFiles/FileTypes/YmapFile.cs | 494 +++++++- CodeWalker.Core/GameFiles/MetaTypes/Meta.cs | 4 + CodeWalker.Core/GameFiles/Resources/Bounds.cs | 7 + CodeWalker.Core/Utils/BoundingBoxes.cs | 34 + CodeWalker.Core/Utils/Vectors.cs | 4 +- Project/Panels/EditProjectManifestPanel.cs | 12 + Project/Panels/EditYmapGrassPanel.Designer.cs | 688 ++++++++++- Project/Panels/EditYmapGrassPanel.cs | 277 ++++- Project/Panels/EditYmapGrassPanel.resx | 3 + Project/Panels/ProjectExplorerPanel.cs | 54 + Project/ProjectForm.Designer.cs | 1015 +++++++++-------- Project/ProjectForm.cs | 182 ++- Rendering/RenderableCache.cs | 8 + Rendering/Renderer.cs | 5 + Rendering/Shaders/BasicShader.cs | 4 + WorldForm.cs | 184 ++- 17 files changed, 2390 insertions(+), 586 deletions(-) create mode 100644 CodeWalker.Core/Utils/BoundingBoxes.cs diff --git a/CodeWalker.Core/CodeWalker.Core.csproj b/CodeWalker.Core/CodeWalker.Core.csproj index e613082..3e40522 100644 --- a/CodeWalker.Core/CodeWalker.Core.csproj +++ b/CodeWalker.Core/CodeWalker.Core.csproj @@ -114,6 +114,7 @@ True Resources.resx
+ diff --git a/CodeWalker.Core/GameFiles/FileTypes/YmapFile.cs b/CodeWalker.Core/GameFiles/FileTypes/YmapFile.cs index 7e61049..34fdb8c 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/YmapFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/YmapFile.cs @@ -7,6 +7,8 @@ using System.Linq; using System.Runtime.InteropServices; using System.Text; using System.Threading.Tasks; +using CodeWalker.Core.Utils; +using CodeWalker.World; namespace CodeWalker.GameFiles { @@ -925,6 +927,7 @@ namespace CodeWalker.GameFiles GrassInstanceBatches = batches.ToArray(); HasChanged = true; + UpdateGrassPhysDict(true); } public bool RemoveGrassBatch(YmapGrassInstanceBatch batch) @@ -949,6 +952,10 @@ namespace CodeWalker.GameFiles } } + if (batches.Count <= 0) + { + UpdateGrassPhysDict(false); + } GrassInstanceBatches = batches.ToArray(); @@ -1137,6 +1144,27 @@ namespace CodeWalker.GameFiles } + 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(); + } + private static uint SetBit(uint value, int bit) { @@ -1493,6 +1521,8 @@ namespace CodeWalker.GameFiles [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 { get; set; } public rage__fwGrassInstanceListDef__InstanceData[] Instances { get; set; } @@ -1504,10 +1534,473 @@ namespace CodeWalker.GameFiles public float Distance; //used for rendering public YmapFile Ymap { get; set; } + public bool BrushEnabled; + public bool HasChanged; + public override string ToString() { return Batch.ToString(); } + + public void UpdateInstanceCount() + { + var b = Batch; + var ins = b.InstanceList; + ins.Count1 = (ushort)Instances.Length; + b.InstanceList = ins; + Batch = b; + } + + public bool EraseInstancesAtMouse( + YmapGrassInstanceBatch batch, + SpaceRayIntersectResult mouseRay, + float radius) + { + // some inits + var instances = batch.Instances; + + var delInstances = new List(); + + 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) + foreach (var instance in instances) + { + var grassPos = new Vector3 + { + X = instance.Position.u0, + Y = instance.Position.u1, + Z = instance.Position.u2 + }; + // get the world pos + var worldPos = oldInstanceBounds.Minimum + oldInstanceBounds.Size() * (grassPos * BatchVertMultiplier); + + // create a boundary around the instance. + var instanceBounds = new BoundingBox(worldPos - (Vector3.One * 1.5f), worldPos + (Vector3.One * 1.5f)); + + // 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 + } + } + if (delInstances.Count <= 0) + return false; + + // now we need to recalculate the bounds. + var insList = instances.ToList(); + foreach (var inst in delInstances) + { + if (insList.Contains(inst)) + { + insList.Remove(inst); + } + } + GetNewGrassBounds(insList, oldInstanceBounds, out var min, out var max); + var newBounds = new BoundingBox(min, max); + + // 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) + { + 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()); + + // Begin the spawn bounds. + var grassBound = positions.Count <= 0 + ? new BoundingBox(Vector3.Zero, Vector3.Zero) + : new BoundingBox(positions[0] - (Vector3.One * 1.5f), positions[0] + (Vector3.One * 1.5f)); + 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(); + } + + // 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 null; + } + + // 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 + GetNewGrassBounds(grassList, oldInstanceBounds, out var min, out var max); + var newInstanceBounds = new BoundingBox(min, max); + + // 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 + GetNewGrassBounds(mb, batchAABB, out var min, out var max); + var radius = (max - min).Length() * 0.5F; // get the 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. + GetNewGrassBounds(points, batchAABB, out var min, out var max); + var m = new BoundingBox(min, max); + + // 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 void GetNewGrassBounds(IReadOnlyList newGrass, BoundingBox oldAABB, + out Vector3 min, out Vector3 max) + { + if (newGrass.Count <= 0) + { + min = Vector3.Zero; + max = Vector3.Zero; + return; + } + var grassWorldPos = GetGrassWorldPos(newGrass[0].Position, oldAABB); + var bounds = new BoundingBox(grassWorldPos - (Vector3.One * 1.5f), grassWorldPos + (Vector3.One * 1.5f)); + foreach (var point in newGrass) + { + var worldPos = GetGrassWorldPos(point.Position, oldAABB); + var tempBounds = new BoundingBox(worldPos - (Vector3.One * 1.5f), worldPos + (Vector3.One * 1.5f)); + bounds = bounds.Encapsulate(tempBounds); + } + min = bounds.Minimum; + max = bounds.Maximum; + } + + 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) + { + //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; + } + + private rage__fwGrassInstanceListDef RecalcBatch(BoundingBox newInstanceBounds, YmapGrassInstanceBatch batch) + { + 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; + } + + private void GetSpawns( + Vector3 origin, Func spawnRayFunc, + ICollection positions, + ICollection 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); + var posOffset = origin + new Vector3(randX, randY, 2f); + var spaceRay = spawnRayFunc.Invoke(posOffset); + if (!spaceRay.Hit) 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(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 - (Vector3.One * 1.5f), pos + (Vector3.One * 1.5f)); + bounds = bounds.Encapsulate(posBounds); + } + return bounds; + } + + 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 + }; + } + + private static Vector3 GetGrassWorldPos(ArrayOfUshorts3 grassPos, BoundingBox batchAABB) + { + return batchAABB.Minimum + batchAABB.Size() * (grassPos.XYZ() * BatchVertMultiplier); + } } [TypeConverter(typeof(ExpandableObjectConverter))] @@ -1548,7 +2041,6 @@ namespace CodeWalker.GameFiles } } - [TypeConverter(typeof(ExpandableObjectConverter))] public class YmapTimeCycleModifier { diff --git a/CodeWalker.Core/GameFiles/MetaTypes/Meta.cs b/CodeWalker.Core/GameFiles/MetaTypes/Meta.cs index 7ee83cc..c617940 100644 --- a/CodeWalker.Core/GameFiles/MetaTypes/Meta.cs +++ b/CodeWalker.Core/GameFiles/MetaTypes/Meta.cs @@ -935,6 +935,10 @@ namespace CodeWalker.GameFiles [TC(typeof(EXP))] public struct ArrayOfUshorts3 //array of 3 ushorts { public ushort u0, u1, u2; + public Vector3 XYZ() + { + return new Vector3(u0, u1, u2); + } public override string ToString() { return u0.ToString() + ", " + u1.ToString() + ", " + u2.ToString(); diff --git a/CodeWalker.Core/GameFiles/Resources/Bounds.cs b/CodeWalker.Core/GameFiles/Resources/Bounds.cs index 705dad5..1f25591 100644 --- a/CodeWalker.Core/GameFiles/Resources/Bounds.cs +++ b/CodeWalker.Core/GameFiles/Resources/Bounds.cs @@ -1443,6 +1443,13 @@ namespace CodeWalker.GameFiles return Materials[type.Index]; } + public static BoundsMaterialData GetMaterial(byte index) + { + if (Materials == null) return null; + if ((int)index >= Materials.Count) return null; + return Materials[index]; + } + public static string GetMaterialName(BoundsMaterialType type) { var m = GetMaterial(type); diff --git a/CodeWalker.Core/Utils/BoundingBoxes.cs b/CodeWalker.Core/Utils/BoundingBoxes.cs new file mode 100644 index 0000000..2486ca6 --- /dev/null +++ b/CodeWalker.Core/Utils/BoundingBoxes.cs @@ -0,0 +1,34 @@ +using System; +using SharpDX; + +namespace CodeWalker.Core.Utils +{ + public static class BoundingBoxExtensions + { + public static Vector3 Size(this BoundingBox bounds) + { + return new Vector3( + Math.Abs(bounds.Maximum.X - bounds.Minimum.X), + Math.Abs(bounds.Maximum.Y - bounds.Minimum.Y), + Math.Abs(bounds.Maximum.Z - bounds.Minimum.Z)); + } + + public static Vector3 Center(this BoundingBox bounds) + { + return (bounds.Minimum + bounds.Maximum) * 0.5F; + } + + public static BoundingBox Encapsulate(this BoundingBox box, BoundingBox bounds) + { + box.Minimum = Vector3.Min(box.Minimum, bounds.Minimum); + box.Maximum = Vector3.Max(box.Maximum, bounds.Maximum); + return box; + } + + public static float Radius(this BoundingBox box) + { + var extents = (box.Maximum - box.Minimum) * 0.5F; + return extents.Length(); + } + } +} diff --git a/CodeWalker.Core/Utils/Vectors.cs b/CodeWalker.Core/Utils/Vectors.cs index b953850..19b354e 100644 --- a/CodeWalker.Core/Utils/Vectors.cs +++ b/CodeWalker.Core/Utils/Vectors.cs @@ -4,18 +4,17 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using CodeWalker.GameFiles; namespace CodeWalker { public static class Vectors { - public static Vector3 XYZ(this Vector4 v) { return new Vector3(v.X, v.Y, v.Z); } - public static Vector3 Round(this Vector3 v) { return new Vector3((float)Math.Round(v.X), (float)Math.Round(v.Y), (float)Math.Round(v.Z)); @@ -25,7 +24,6 @@ namespace CodeWalker { return new Vector4((float)Math.Floor(v.X), (float)Math.Floor(v.Y), (float)Math.Floor(v.Z), (float)Math.Floor(v.W)); } - } diff --git a/Project/Panels/EditProjectManifestPanel.cs b/Project/Panels/EditProjectManifestPanel.cs index d15cb87..a253983 100644 --- a/Project/Panels/EditProjectManifestPanel.cs +++ b/Project/Panels/EditProjectManifestPanel.cs @@ -138,6 +138,18 @@ namespace CodeWalker.Project.Panels } } + if (ymap.GrassInstanceBatches != null) + { + foreach (var batch in ymap.GrassInstanceBatches) + { + var ytyp = batch.Archetype?.Ytyp; + var ytypname = getYtypName(ytyp); + if (ytyp != null) + { + mapdeps[ytypname] = ytyp; + } + } + } sb.AppendLine(" "); sb.AppendLine(" " + ymapname + ""); diff --git a/Project/Panels/EditYmapGrassPanel.Designer.cs b/Project/Panels/EditYmapGrassPanel.Designer.cs index 824c62a..f4d8076 100644 --- a/Project/Panels/EditYmapGrassPanel.Designer.cs +++ b/Project/Panels/EditYmapGrassPanel.Designer.cs @@ -28,35 +28,711 @@ /// private void InitializeComponent() { + this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EditYmapGrassPanel)); + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.GrassBatchTab = new System.Windows.Forms.TabPage(); + this.label17 = new System.Windows.Forms.Label(); + this.OptmizationThresholdNumericUpDown = new System.Windows.Forms.NumericUpDown(); + this.textBox5 = new System.Windows.Forms.TextBox(); + this.OptimizeBatchButton = new System.Windows.Forms.Button(); + this.label14 = new System.Windows.Forms.Label(); + this.textBox4 = new System.Windows.Forms.TextBox(); + this.label13 = new System.Windows.Forms.Label(); + this.HashLabel = new System.Windows.Forms.Label(); + this.ArchetypeNameTextBox = new System.Windows.Forms.TextBox(); + this.label7 = new System.Windows.Forms.Label(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.label12 = new System.Windows.Forms.Label(); + this.label11 = new System.Windows.Forms.Label(); + this.OrientToTerrainNumericUpDown = new System.Windows.Forms.NumericUpDown(); + this.ScaleRangeTextBox = new System.Windows.Forms.TextBox(); + this.label10 = new System.Windows.Forms.Label(); + this.LodFadeRangeNumericUpDown = new System.Windows.Forms.NumericUpDown(); + this.label9 = new System.Windows.Forms.Label(); + this.LodFadeStartDistanceNumericUpDown = new System.Windows.Forms.NumericUpDown(); + this.label6 = new System.Windows.Forms.Label(); + this.LodDistNumericUpDown = new System.Windows.Forms.NumericUpDown(); + this.PositionTextBox = new System.Windows.Forms.TextBox(); this.label1 = new System.Windows.Forms.Label(); + this.GrassGoToButton = new System.Windows.Forms.Button(); + this.GrassDeleteButton = new System.Windows.Forms.Button(); + this.GrassAddToProjectButton = new System.Windows.Forms.Button(); + this.BrushTab = new System.Windows.Forms.TabPage(); + this.label16 = new System.Windows.Forms.Label(); + this.label8 = new System.Windows.Forms.Label(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.GrassColorLabel = new System.Windows.Forms.Label(); + this.label15 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.AoNumericUpDown = new System.Windows.Forms.NumericUpDown(); + this.PadTextBox = new System.Windows.Forms.TextBox(); + this.ScaleNumericUpDown = new System.Windows.Forms.NumericUpDown(); + this.label2 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.RandomizeScaleCheckBox = new System.Windows.Forms.CheckBox(); + this.BrushModeCheckBox = new System.Windows.Forms.CheckBox(); + this.brushSettingsGroupBox = new System.Windows.Forms.GroupBox(); + this.DensityNumericUpDown = new System.Windows.Forms.NumericUpDown(); + this.RadiusNumericUpDown = new System.Windows.Forms.NumericUpDown(); + this.label5 = new System.Windows.Forms.Label(); + this.radiusLabel = new System.Windows.Forms.Label(); + this.label18 = new System.Windows.Forms.Label(); + this.OptimizeBatchButtonTooltip = new System.Windows.Forms.ToolTip(this.components); + this.tabControl1.SuspendLayout(); + this.GrassBatchTab.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.OptmizationThresholdNumericUpDown)).BeginInit(); + this.groupBox1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.OrientToTerrainNumericUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.LodFadeRangeNumericUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.LodFadeStartDistanceNumericUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.LodDistNumericUpDown)).BeginInit(); + this.BrushTab.SuspendLayout(); + this.groupBox2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.AoNumericUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.ScaleNumericUpDown)).BeginInit(); + this.brushSettingsGroupBox.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.DensityNumericUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.RadiusNumericUpDown)).BeginInit(); this.SuspendLayout(); // + // tabControl1 + // + this.tabControl1.Controls.Add(this.GrassBatchTab); + this.tabControl1.Controls.Add(this.BrushTab); + this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tabControl1.Location = new System.Drawing.Point(0, 0); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(554, 355); + this.tabControl1.TabIndex = 37; + // + // GrassBatchTab + // + this.GrassBatchTab.Controls.Add(this.label18); + this.GrassBatchTab.Controls.Add(this.label17); + this.GrassBatchTab.Controls.Add(this.OptmizationThresholdNumericUpDown); + this.GrassBatchTab.Controls.Add(this.textBox5); + this.GrassBatchTab.Controls.Add(this.OptimizeBatchButton); + this.GrassBatchTab.Controls.Add(this.label14); + this.GrassBatchTab.Controls.Add(this.textBox4); + this.GrassBatchTab.Controls.Add(this.label13); + this.GrassBatchTab.Controls.Add(this.HashLabel); + this.GrassBatchTab.Controls.Add(this.ArchetypeNameTextBox); + this.GrassBatchTab.Controls.Add(this.label7); + this.GrassBatchTab.Controls.Add(this.groupBox1); + this.GrassBatchTab.Controls.Add(this.PositionTextBox); + this.GrassBatchTab.Controls.Add(this.label1); + this.GrassBatchTab.Controls.Add(this.GrassGoToButton); + this.GrassBatchTab.Controls.Add(this.GrassDeleteButton); + this.GrassBatchTab.Controls.Add(this.GrassAddToProjectButton); + this.GrassBatchTab.Location = new System.Drawing.Point(4, 22); + this.GrassBatchTab.Name = "GrassBatchTab"; + this.GrassBatchTab.Padding = new System.Windows.Forms.Padding(3); + this.GrassBatchTab.Size = new System.Drawing.Size(546, 329); + this.GrassBatchTab.TabIndex = 0; + this.GrassBatchTab.Text = "Grass Batch"; + this.GrassBatchTab.UseVisualStyleBackColor = true; + // + // label17 + // + this.label17.AutoSize = true; + this.label17.Location = new System.Drawing.Point(400, 241); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(54, 13); + this.label17.TabIndex = 51; + this.label17.Text = "Threshold"; + // + // OptmizationThresholdNumericUpDown + // + this.OptmizationThresholdNumericUpDown.Location = new System.Drawing.Point(460, 236); + this.OptmizationThresholdNumericUpDown.Maximum = new decimal(new int[] { + 999999, + 0, + 0, + 0}); + this.OptmizationThresholdNumericUpDown.Name = "OptmizationThresholdNumericUpDown"; + this.OptmizationThresholdNumericUpDown.Size = new System.Drawing.Size(66, 20); + this.OptmizationThresholdNumericUpDown.TabIndex = 50; + this.OptmizationThresholdNumericUpDown.Value = new decimal(new int[] { + 5, + 0, + 0, + 0}); + // + // textBox5 + // + this.textBox5.Location = new System.Drawing.Point(93, 237); + this.textBox5.Name = "textBox5"; + this.textBox5.ReadOnly = true; + this.textBox5.Size = new System.Drawing.Size(282, 20); + this.textBox5.TabIndex = 49; + this.textBox5.Text = "TODO!"; + // + // OptimizeBatchButton + // + this.OptimizeBatchButton.Location = new System.Drawing.Point(403, 207); + this.OptimizeBatchButton.Name = "OptimizeBatchButton"; + this.OptimizeBatchButton.Size = new System.Drawing.Size(123, 24); + this.OptimizeBatchButton.TabIndex = 50; + this.OptimizeBatchButton.Text = "Optimize Batch"; + this.OptimizeBatchButtonTooltip.SetToolTip(this.OptimizeBatchButton, "Will split your batch into multiple different batches based on the threshold. If " + + "your threshold is 5.0 then each batch will have a size of 5.0 meters."); + this.OptimizeBatchButton.UseVisualStyleBackColor = true; + this.OptimizeBatchButton.Click += new System.EventHandler(this.OptimizeBatchButton_Click); + // + // label14 + // + this.label14.AutoSize = true; + this.label14.Location = new System.Drawing.Point(22, 240); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(68, 13); + this.label14.TabIndex = 48; + this.label14.Text = "Extents Max:"; + // + // textBox4 + // + this.textBox4.Location = new System.Drawing.Point(93, 210); + this.textBox4.Name = "textBox4"; + this.textBox4.ReadOnly = true; + this.textBox4.Size = new System.Drawing.Size(282, 20); + this.textBox4.TabIndex = 47; + this.textBox4.Text = "TODO!"; + // + // label13 + // + this.label13.AutoSize = true; + this.label13.Location = new System.Drawing.Point(22, 213); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(65, 13); + this.label13.TabIndex = 46; + this.label13.Text = "Extents Min:"; + // + // HashLabel + // + this.HashLabel.AutoSize = true; + this.HashLabel.Location = new System.Drawing.Point(211, 16); + this.HashLabel.Name = "HashLabel"; + this.HashLabel.Size = new System.Drawing.Size(35, 13); + this.HashLabel.TabIndex = 45; + this.HashLabel.Text = "Hash:"; + // + // ArchetypeNameTextBox + // + this.ArchetypeNameTextBox.Location = new System.Drawing.Point(61, 13); + this.ArchetypeNameTextBox.Name = "ArchetypeNameTextBox"; + this.ArchetypeNameTextBox.Size = new System.Drawing.Size(144, 20); + this.ArchetypeNameTextBox.TabIndex = 44; + this.ArchetypeNameTextBox.TextChanged += new System.EventHandler(this.ArchetypeNameTextBox_TextChanged); + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(11, 16); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(35, 13); + this.label7.TabIndex = 43; + this.label7.Text = "Name"; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.label12); + this.groupBox1.Controls.Add(this.label11); + this.groupBox1.Controls.Add(this.OrientToTerrainNumericUpDown); + this.groupBox1.Controls.Add(this.ScaleRangeTextBox); + this.groupBox1.Controls.Add(this.label10); + this.groupBox1.Controls.Add(this.LodFadeRangeNumericUpDown); + this.groupBox1.Controls.Add(this.label9); + this.groupBox1.Controls.Add(this.LodFadeStartDistanceNumericUpDown); + this.groupBox1.Controls.Add(this.label6); + this.groupBox1.Controls.Add(this.LodDistNumericUpDown); + this.groupBox1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.groupBox1.Location = new System.Drawing.Point(14, 67); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(384, 132); + this.groupBox1.TabIndex = 42; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "Batch"; + // + // label12 + // + this.label12.AutoSize = true; + this.label12.Location = new System.Drawing.Point(197, 24); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(69, 13); + this.label12.TabIndex = 47; + this.label12.Text = "Scale Range"; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.Location = new System.Drawing.Point(8, 102); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(87, 13); + this.label11.TabIndex = 7; + this.label11.Text = "Orient To Terrain"; + // + // OrientToTerrainNumericUpDown + // + this.OrientToTerrainNumericUpDown.DecimalPlaces = 1; + this.OrientToTerrainNumericUpDown.Location = new System.Drawing.Point(121, 100); + this.OrientToTerrainNumericUpDown.Maximum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.OrientToTerrainNumericUpDown.Name = "OrientToTerrainNumericUpDown"; + this.OrientToTerrainNumericUpDown.Size = new System.Drawing.Size(61, 20); + this.OrientToTerrainNumericUpDown.TabIndex = 6; + this.OrientToTerrainNumericUpDown.ValueChanged += new System.EventHandler(this.OrientToTerrainNumericUpDown_ValueChanged); + // + // ScaleRangeTextBox + // + this.ScaleRangeTextBox.Location = new System.Drawing.Point(270, 21); + this.ScaleRangeTextBox.Name = "ScaleRangeTextBox"; + this.ScaleRangeTextBox.Size = new System.Drawing.Size(104, 20); + this.ScaleRangeTextBox.TabIndex = 46; + this.ScaleRangeTextBox.TextChanged += new System.EventHandler(this.ScaleRangeTextBox_TextChanged); + // + // label10 + // + this.label10.AutoSize = true; + this.label10.Location = new System.Drawing.Point(8, 76); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(107, 13); + this.label10.TabIndex = 5; + this.label10.Text = "Lod Inst Fade Range"; + // + // LodFadeRangeNumericUpDown + // + this.LodFadeRangeNumericUpDown.DecimalPlaces = 4; + this.LodFadeRangeNumericUpDown.Increment = new decimal(new int[] { + 1, + 0, + 0, + 65536}); + this.LodFadeRangeNumericUpDown.Location = new System.Drawing.Point(121, 74); + this.LodFadeRangeNumericUpDown.Maximum = new decimal(new int[] { + 99999, + 0, + 0, + 0}); + this.LodFadeRangeNumericUpDown.Name = "LodFadeRangeNumericUpDown"; + this.LodFadeRangeNumericUpDown.Size = new System.Drawing.Size(61, 20); + this.LodFadeRangeNumericUpDown.TabIndex = 4; + this.LodFadeRangeNumericUpDown.ValueChanged += new System.EventHandler(this.LodFadeRangeNumericUpDown_ValueChanged); + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(8, 50); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(98, 13); + this.label9.TabIndex = 3; + this.label9.Text = "Lod Fade Start Dist"; + // + // LodFadeStartDistanceNumericUpDown + // + this.LodFadeStartDistanceNumericUpDown.DecimalPlaces = 4; + this.LodFadeStartDistanceNumericUpDown.Location = new System.Drawing.Point(121, 48); + this.LodFadeStartDistanceNumericUpDown.Maximum = new decimal(new int[] { + 99999, + 0, + 0, + 0}); + this.LodFadeStartDistanceNumericUpDown.Name = "LodFadeStartDistanceNumericUpDown"; + this.LodFadeStartDistanceNumericUpDown.Size = new System.Drawing.Size(61, 20); + this.LodFadeStartDistanceNumericUpDown.TabIndex = 2; + this.LodFadeStartDistanceNumericUpDown.ValueChanged += new System.EventHandler(this.LodFadeStartDistanceNumericUpDown_ValueChanged); + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(8, 24); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(39, 13); + this.label6.TabIndex = 1; + this.label6.Text = "lodDist"; + // + // LodDistNumericUpDown + // + this.LodDistNumericUpDown.Location = new System.Drawing.Point(121, 22); + this.LodDistNumericUpDown.Maximum = new decimal(new int[] { + 99999, + 0, + 0, + 0}); + this.LodDistNumericUpDown.Name = "LodDistNumericUpDown"; + this.LodDistNumericUpDown.Size = new System.Drawing.Size(61, 20); + this.LodDistNumericUpDown.TabIndex = 0; + this.LodDistNumericUpDown.ValueChanged += new System.EventHandler(this.LodDistNumericUpDown_ValueChanged); + // + // PositionTextBox + // + this.PositionTextBox.Location = new System.Drawing.Point(61, 40); + this.PositionTextBox.Name = "PositionTextBox"; + this.PositionTextBox.ReadOnly = true; + this.PositionTextBox.Size = new System.Drawing.Size(185, 20); + this.PositionTextBox.TabIndex = 41; + // // label1 // this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(52, 52); + this.label1.Location = new System.Drawing.Point(11, 43); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(105, 13); - this.label1.TabIndex = 0; - this.label1.Text = "Grass editing TODO!"; + this.label1.Size = new System.Drawing.Size(44, 13); + this.label1.TabIndex = 40; + this.label1.Text = "Position"; + // + // GrassGoToButton + // + this.GrassGoToButton.Location = new System.Drawing.Point(252, 38); + this.GrassGoToButton.Name = "GrassGoToButton"; + this.GrassGoToButton.Size = new System.Drawing.Size(56, 23); + this.GrassGoToButton.TabIndex = 39; + this.GrassGoToButton.Text = "Go To"; + this.GrassGoToButton.UseVisualStyleBackColor = true; + this.GrassGoToButton.Click += new System.EventHandler(this.GrassGoToButton_Click); + // + // GrassDeleteButton + // + this.GrassDeleteButton.Location = new System.Drawing.Point(278, 298); + this.GrassDeleteButton.Name = "GrassDeleteButton"; + this.GrassDeleteButton.Size = new System.Drawing.Size(95, 23); + this.GrassDeleteButton.TabIndex = 38; + this.GrassDeleteButton.Text = "Delete Batch"; + this.GrassDeleteButton.UseVisualStyleBackColor = true; + this.GrassDeleteButton.Click += new System.EventHandler(this.GrassDeleteButton_Click); + // + // GrassAddToProjectButton + // + this.GrassAddToProjectButton.Location = new System.Drawing.Point(180, 298); + this.GrassAddToProjectButton.Name = "GrassAddToProjectButton"; + this.GrassAddToProjectButton.Size = new System.Drawing.Size(95, 23); + this.GrassAddToProjectButton.TabIndex = 37; + this.GrassAddToProjectButton.Text = "Add to Project"; + this.GrassAddToProjectButton.UseVisualStyleBackColor = true; + this.GrassAddToProjectButton.Click += new System.EventHandler(this.GrassAddToProjectButton_Click); + // + // BrushTab + // + this.BrushTab.Controls.Add(this.label16); + this.BrushTab.Controls.Add(this.label8); + this.BrushTab.Controls.Add(this.groupBox2); + this.BrushTab.Controls.Add(this.BrushModeCheckBox); + this.BrushTab.Controls.Add(this.brushSettingsGroupBox); + this.BrushTab.Location = new System.Drawing.Point(4, 22); + this.BrushTab.Name = "BrushTab"; + this.BrushTab.Padding = new System.Windows.Forms.Padding(3); + this.BrushTab.Size = new System.Drawing.Size(546, 329); + this.BrushTab.TabIndex = 1; + this.BrushTab.Text = " Brush"; + this.BrushTab.UseVisualStyleBackColor = true; + // + // label16 + // + this.label16.AutoSize = true; + this.label16.Location = new System.Drawing.Point(9, 224); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(114, 13); + this.label16.TabIndex = 40; + this.label16.Text = "SHIFT + CTRL - Erase"; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(9, 202); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(68, 13); + this.label8.TabIndex = 21; + this.label8.Text = "CTRL - Paint"; + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.GrassColorLabel); + this.groupBox2.Controls.Add(this.label15); + this.groupBox2.Controls.Add(this.label4); + this.groupBox2.Controls.Add(this.AoNumericUpDown); + this.groupBox2.Controls.Add(this.PadTextBox); + this.groupBox2.Controls.Add(this.ScaleNumericUpDown); + this.groupBox2.Controls.Add(this.label2); + this.groupBox2.Controls.Add(this.label3); + this.groupBox2.Controls.Add(this.RandomizeScaleCheckBox); + this.groupBox2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.groupBox2.Location = new System.Drawing.Point(259, 3); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(279, 153); + this.groupBox2.TabIndex = 39; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "Instance Settings"; + // + // GrassColorLabel + // + this.GrassColorLabel.BackColor = System.Drawing.Color.White; + this.GrassColorLabel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.GrassColorLabel.Location = new System.Drawing.Point(50, 22); + this.GrassColorLabel.Name = "GrassColorLabel"; + this.GrassColorLabel.Size = new System.Drawing.Size(119, 21); + this.GrassColorLabel.TabIndex = 12; + this.GrassColorLabel.Click += new System.EventHandler(this.GrassColorLabel_Click); + // + // label15 + // + this.label15.AutoSize = true; + this.label15.Location = new System.Drawing.Point(9, 106); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(26, 13); + this.label15.TabIndex = 46; + this.label15.Text = "Pad"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(9, 79); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(34, 13); + this.label4.TabIndex = 16; + this.label4.Text = "Scale"; + // + // AoNumericUpDown + // + this.AoNumericUpDown.Location = new System.Drawing.Point(50, 51); + this.AoNumericUpDown.Maximum = new decimal(new int[] { + 255, + 0, + 0, + 0}); + this.AoNumericUpDown.Name = "AoNumericUpDown"; + this.AoNumericUpDown.Size = new System.Drawing.Size(120, 20); + this.AoNumericUpDown.TabIndex = 15; + this.AoNumericUpDown.Value = new decimal(new int[] { + 255, + 0, + 0, + 0}); + // + // PadTextBox + // + this.PadTextBox.Location = new System.Drawing.Point(49, 103); + this.PadTextBox.Name = "PadTextBox"; + this.PadTextBox.Size = new System.Drawing.Size(120, 20); + this.PadTextBox.TabIndex = 45; + this.PadTextBox.Text = "0, 0, 0"; + // + // ScaleNumericUpDown + // + this.ScaleNumericUpDown.Location = new System.Drawing.Point(49, 77); + this.ScaleNumericUpDown.Maximum = new decimal(new int[] { + 255, + 0, + 0, + 0}); + this.ScaleNumericUpDown.Name = "ScaleNumericUpDown"; + this.ScaleNumericUpDown.Size = new System.Drawing.Size(120, 20); + this.ScaleNumericUpDown.TabIndex = 17; + this.ScaleNumericUpDown.Value = new decimal(new int[] { + 255, + 0, + 0, + 0}); + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(9, 53); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(20, 13); + this.label2.TabIndex = 14; + this.label2.Text = "Ao"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(9, 26); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(31, 13); + this.label3.TabIndex = 13; + this.label3.Text = "Color"; + // + // RandomizeScaleCheckBox + // + this.RandomizeScaleCheckBox.AutoSize = true; + this.RandomizeScaleCheckBox.Location = new System.Drawing.Point(176, 79); + this.RandomizeScaleCheckBox.Name = "RandomizeScaleCheckBox"; + this.RandomizeScaleCheckBox.Size = new System.Drawing.Size(79, 17); + this.RandomizeScaleCheckBox.TabIndex = 18; + this.RandomizeScaleCheckBox.Text = "Randomize"; + this.RandomizeScaleCheckBox.UseVisualStyleBackColor = true; + // + // BrushModeCheckBox + // + this.BrushModeCheckBox.AutoSize = true; + this.BrushModeCheckBox.Location = new System.Drawing.Point(8, 174); + this.BrushModeCheckBox.Name = "BrushModeCheckBox"; + this.BrushModeCheckBox.Size = new System.Drawing.Size(83, 17); + this.BrushModeCheckBox.TabIndex = 39; + this.BrushModeCheckBox.Text = "Brush Mode"; + this.BrushModeCheckBox.UseVisualStyleBackColor = true; + this.BrushModeCheckBox.CheckedChanged += new System.EventHandler(this.BrushModeCheckBox_CheckedChanged); + // + // brushSettingsGroupBox + // + this.brushSettingsGroupBox.Controls.Add(this.DensityNumericUpDown); + this.brushSettingsGroupBox.Controls.Add(this.RadiusNumericUpDown); + this.brushSettingsGroupBox.Controls.Add(this.label5); + this.brushSettingsGroupBox.Controls.Add(this.radiusLabel); + this.brushSettingsGroupBox.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.brushSettingsGroupBox.Location = new System.Drawing.Point(8, 3); + this.brushSettingsGroupBox.Name = "brushSettingsGroupBox"; + this.brushSettingsGroupBox.Size = new System.Drawing.Size(245, 153); + this.brushSettingsGroupBox.TabIndex = 38; + this.brushSettingsGroupBox.TabStop = false; + this.brushSettingsGroupBox.Text = "Brush Settings"; + // + // DensityNumericUpDown + // + this.DensityNumericUpDown.Location = new System.Drawing.Point(109, 57); + this.DensityNumericUpDown.Maximum = new decimal(new int[] { + 128, + 0, + 0, + 0}); + this.DensityNumericUpDown.Name = "DensityNumericUpDown"; + this.DensityNumericUpDown.Size = new System.Drawing.Size(120, 20); + this.DensityNumericUpDown.TabIndex = 20; + this.DensityNumericUpDown.Value = new decimal(new int[] { + 28, + 0, + 0, + 0}); + // + // RadiusNumericUpDown + // + this.RadiusNumericUpDown.DecimalPlaces = 2; + this.RadiusNumericUpDown.Increment = new decimal(new int[] { + 1, + 0, + 0, + 131072}); + this.RadiusNumericUpDown.Location = new System.Drawing.Point(109, 31); + this.RadiusNumericUpDown.Name = "RadiusNumericUpDown"; + this.RadiusNumericUpDown.Size = new System.Drawing.Size(120, 20); + this.RadiusNumericUpDown.TabIndex = 11; + this.RadiusNumericUpDown.Value = new decimal(new int[] { + 5, + 0, + 0, + 0}); + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(21, 59); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(42, 13); + this.label5.TabIndex = 19; + this.label5.Text = "Density"; + // + // radiusLabel + // + this.radiusLabel.AutoSize = true; + this.radiusLabel.Location = new System.Drawing.Point(21, 33); + this.radiusLabel.Name = "radiusLabel"; + this.radiusLabel.Size = new System.Drawing.Size(40, 13); + this.radiusLabel.TabIndex = 10; + this.radiusLabel.Text = "Radius"; + // + // label18 + // + this.label18.Location = new System.Drawing.Point(400, 259); + this.label18.Name = "label18"; + this.label18.Size = new System.Drawing.Size(126, 53); + this.label18.TabIndex = 52; + this.label18.Text = "* The higher the threshold, the larger each batch will be when they are split."; // // EditYmapGrassPanel // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(554, 355); - this.Controls.Add(this.label1); + this.Controls.Add(this.tabControl1); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Name = "EditYmapGrassPanel"; this.Text = "Grass Batch"; + this.tabControl1.ResumeLayout(false); + this.GrassBatchTab.ResumeLayout(false); + this.GrassBatchTab.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.OptmizationThresholdNumericUpDown)).EndInit(); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.OrientToTerrainNumericUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.LodFadeRangeNumericUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.LodFadeStartDistanceNumericUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.LodDistNumericUpDown)).EndInit(); + this.BrushTab.ResumeLayout(false); + this.BrushTab.PerformLayout(); + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.AoNumericUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.ScaleNumericUpDown)).EndInit(); + this.brushSettingsGroupBox.ResumeLayout(false); + this.brushSettingsGroupBox.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.DensityNumericUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.RadiusNumericUpDown)).EndInit(); this.ResumeLayout(false); - this.PerformLayout(); } #endregion + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabPage GrassBatchTab; + private System.Windows.Forms.TextBox PositionTextBox; private System.Windows.Forms.Label label1; + private System.Windows.Forms.Button GrassGoToButton; + private System.Windows.Forms.Button GrassDeleteButton; + private System.Windows.Forms.Button GrassAddToProjectButton; + private System.Windows.Forms.TabPage BrushTab; + private System.Windows.Forms.GroupBox brushSettingsGroupBox; + private System.Windows.Forms.NumericUpDown RadiusNumericUpDown; + private System.Windows.Forms.Label radiusLabel; + private System.Windows.Forms.NumericUpDown DensityNumericUpDown; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.CheckBox BrushModeCheckBox; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.NumericUpDown LodDistNumericUpDown; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.TextBox ArchetypeNameTextBox; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.Label HashLabel; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.NumericUpDown LodFadeStartDistanceNumericUpDown; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.NumericUpDown LodFadeRangeNumericUpDown; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.NumericUpDown OrientToTerrainNumericUpDown; + private System.Windows.Forms.TextBox textBox4; + private System.Windows.Forms.Label label13; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.TextBox ScaleRangeTextBox; + private System.Windows.Forms.TextBox textBox5; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.TextBox PadTextBox; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label GrassColorLabel; + private System.Windows.Forms.CheckBox RandomizeScaleCheckBox; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.NumericUpDown ScaleNumericUpDown; + private System.Windows.Forms.NumericUpDown AoNumericUpDown; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.Button OptimizeBatchButton; + private System.Windows.Forms.Label label17; + private System.Windows.Forms.NumericUpDown OptmizationThresholdNumericUpDown; + private System.Windows.Forms.Label label18; + private System.Windows.Forms.ToolTip OptimizeBatchButtonTooltip; } } \ No newline at end of file diff --git a/Project/Panels/EditYmapGrassPanel.cs b/Project/Panels/EditYmapGrassPanel.cs index 702ecb1..761475f 100644 --- a/Project/Panels/EditYmapGrassPanel.cs +++ b/Project/Panels/EditYmapGrassPanel.cs @@ -1,22 +1,27 @@ -using CodeWalker.GameFiles; -using System; +using System; using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Windows.Forms; +using CodeWalker.GameFiles; +using CodeWalker.Utils; +using CodeWalker.World; +using SharpDX; + +// THINGS TODO +// - COMPLETED -- Better gizmo for grass brush (like a circle with a little line in the middle sticking upwards) +// - COMPLETED -- Remove grass instances using CTRL + SHIFT + LMB + +// - Maybe some kind of auto coloring system? I've noticed that mostly all grass in GTA inherits it's color from the surface it's on. +// - Grass area fill (generate grass on ydr based on colision materials?) + +// As far as everything else goes, the brush works just fine. No issues so far besides the UpdateGraphics() method. (causes flicker sometimes) + namespace CodeWalker.Project.Panels { public partial class EditYmapGrassPanel : ProjectPanel { public ProjectForm ProjectForm; - public YmapGrassInstanceBatch CurrentBatch { get; set; } - - //private bool populatingui = false; public EditYmapGrassPanel(ProjectForm owner) { @@ -24,12 +29,41 @@ namespace CodeWalker.Project.Panels InitializeComponent(); } + public YmapGrassInstanceBatch CurrentBatch { get; set; } + + #region Form + public void SetBatch(YmapGrassInstanceBatch batch) { CurrentBatch = batch; Tag = batch; - LoadGrassBatch(); UpdateFormTitle(); + UpdateControls(); + } + + private void UpdateControls() + { + if (ProjectForm?.CurrentProjectFile == null) return; + if (ProjectForm.GrassBatchExistsInProject(CurrentBatch)) + { + GrassAddToProjectButton.Enabled = false; + GrassDeleteButton.Enabled = true; + } + else + { + GrassAddToProjectButton.Enabled = true; + GrassDeleteButton.Enabled = false; + } + + ArchetypeNameTextBox.Text = CurrentBatch.Batch.archetypeName.ToString(); + PositionTextBox.Text = FloatUtil.GetVector3String(CurrentBatch.Position); + LodDistNumericUpDown.Value = CurrentBatch.Batch.lodDist; + LodFadeRangeNumericUpDown.Value = (decimal) CurrentBatch.Batch.LodInstFadeRange; + LodFadeStartDistanceNumericUpDown.Value = (decimal) CurrentBatch.Batch.LodFadeStartDist; + ScaleRangeTextBox.Text = FloatUtil.GetVector3String(CurrentBatch.Batch.ScaleRange); + OrientToTerrainNumericUpDown.Value = (decimal)CurrentBatch.Batch.OrientToTerrain; + OptmizationThresholdNumericUpDown.Value = 15; + BrushModeCheckBox.Checked = CurrentBatch.BrushEnabled; } private void UpdateFormTitle() @@ -37,11 +71,228 @@ namespace CodeWalker.Project.Panels Text = CurrentBatch?.Batch.archetypeName.ToString() ?? "Grass Batch"; } + #endregion + #region Events - private void LoadGrassBatch() + #region BrushSettings + + private void GrassGoToButton_Click(object sender, EventArgs e) { + if (CurrentBatch == null) return; + ProjectForm.WorldForm?.GoToPosition(CurrentBatch.Position, CurrentBatch.AABBMax - CurrentBatch.AABBMin); } + private void GrassAddToProjectButton_Click(object sender, EventArgs e) + { + ProjectForm.SetProjectItem(CurrentBatch); + ProjectForm.AddGrassBatchToProject(); + } + + private void GrassDeleteButton_Click(object sender, EventArgs e) + { + ProjectForm.SetProjectItem(CurrentBatch); + var ymap = CurrentBatch?.Ymap; + if (!ProjectForm.DeleteGrassBatch()) return; + + ymap?.CalcExtents(); // Recalculate the extents after deleting the grass batch. + ProjectForm.WorldForm.SelectItem(); + } + + private void GrassColorLabel_Click(object sender, EventArgs e) + { + var colDiag = new ColorDialog {Color = GrassColorLabel.BackColor}; + if (colDiag.ShowDialog(this) == DialogResult.OK) + GrassColorLabel.BackColor = colDiag.Color; + } + + private void BrushModeCheckBox_CheckedChanged(object sender, EventArgs e) + { + if (CurrentBatch == null) return; + CurrentBatch.BrushEnabled = BrushModeCheckBox.Checked; + } + #endregion + + #region Batch Settings + + private void ArchetypeNameTextBox_TextChanged(object sender, EventArgs e) + { + var archetypeHash = JenkHash.GenHash(ArchetypeNameTextBox.Text); + var archetype = ProjectForm.GameFileCache.GetArchetype(archetypeHash); + if (archetype == null) + { + HashLabel.Text = $@"Hash: {archetypeHash} (invalid)"; + return; + } + CurrentBatch.Archetype = archetype; + var b = CurrentBatch.Batch; + b.archetypeName = archetypeHash; + CurrentBatch.Batch = b; + ProjectForm.WorldForm.UpdateGrassBatchGraphics(CurrentBatch); + HashLabel.Text = $@"Hash: {archetypeHash}"; + UpdateFormTitle(); + CurrentBatch.HasChanged = true; + ProjectForm.SetGrassBatchHasChanged(false); + ProjectForm.SetYmapHasChanged(true); + } + + private void LodDistNumericUpDown_ValueChanged(object sender, EventArgs e) + { + var batch = CurrentBatch.Batch; + batch.lodDist = (uint) LodDistNumericUpDown.Value; + CurrentBatch.Batch = batch; + ProjectForm.WorldForm.UpdateGrassBatchGraphics(CurrentBatch); + ProjectForm.SetYmapHasChanged(true); + } + + private void LodFadeStartDistanceNumericUpDown_ValueChanged(object sender, EventArgs e) + { + var batch = CurrentBatch.Batch; + batch.LodFadeStartDist = (float) LodFadeStartDistanceNumericUpDown.Value; + CurrentBatch.Batch = batch; + ProjectForm.WorldForm.UpdateGrassBatchGraphics(CurrentBatch); + ProjectForm.SetYmapHasChanged(true); + } + + private void LodFadeRangeNumericUpDown_ValueChanged(object sender, EventArgs e) + { + var batch = CurrentBatch.Batch; + batch.LodInstFadeRange = (float) LodFadeRangeNumericUpDown.Value; + CurrentBatch.Batch = batch; + ProjectForm.WorldForm.UpdateGrassBatchGraphics(CurrentBatch); + ProjectForm.SetYmapHasChanged(true); + } + + private void OrientToTerrainNumericUpDown_ValueChanged(object sender, EventArgs e) + { + var batch = CurrentBatch.Batch; + batch.OrientToTerrain = (float) OrientToTerrainNumericUpDown.Value; + CurrentBatch.Batch = batch; + ProjectForm.WorldForm.UpdateGrassBatchGraphics(CurrentBatch); + ProjectForm.SetYmapHasChanged(true); + } + + private void ScaleRangeTextBox_TextChanged(object sender, EventArgs e) + { + var batch = CurrentBatch.Batch; + var v = FloatUtil.ParseVector3String(ScaleRangeTextBox.Text); + batch.ScaleRange = v; + CurrentBatch.Batch = batch; + ProjectForm.WorldForm.UpdateGrassBatchGraphics(CurrentBatch); + ProjectForm.SetYmapHasChanged(true); + } + + private void OptimizeBatchButton_Click(object sender, EventArgs e) + { + if (CurrentBatch.Instances == null || CurrentBatch.Instances.Length <= 0) return; + lock (ProjectForm.WorldForm.RenderSyncRoot) + { + var newBatches = CurrentBatch?.OptimizeInstances(CurrentBatch, (float)OptmizationThresholdNumericUpDown.Value); + if (newBatches == null || newBatches.Length <= 0) return; + + // Remove our batch from the ymap + CurrentBatch.Ymap.RemoveGrassBatch(CurrentBatch); + foreach (var batch in newBatches) + { + var b = batch.Batch; + b.lodDist = CurrentBatch.Batch.lodDist; + b.LodInstFadeRange = CurrentBatch.Batch.LodInstFadeRange; + b.LodFadeStartDist = CurrentBatch.Batch.LodFadeStartDist; + b.ScaleRange = CurrentBatch.Batch.ScaleRange; + b.OrientToTerrain = CurrentBatch.Batch.OrientToTerrain; + b.archetypeName = CurrentBatch.Batch.archetypeName; + batch.Batch = b; + batch.Archetype = CurrentBatch.Archetype; + batch.UpdateInstanceCount(); + ProjectForm.NewGrassBatch(batch); + } + CurrentBatch.Ymap.CalcExtents(); + CurrentBatch.Ymap.Save(); + + // TODO: Select the last grass batch in the new list on the project explorer. + ProjectForm.ProjectExplorer.TrySelectGrassBatchTreeNode(CurrentBatch.Ymap.GrassInstanceBatches[0]); + } + } + + #endregion + + #endregion + + #region Publics + + public void CreateInstancesAtMouse(SpaceRayIntersectResult mouseRay) + { + var wf = ProjectForm.WorldForm; + if (wf == null) return; + + lock (wf.RenderSyncRoot) + { + CurrentBatch.CreateInstancesAtMouse( + CurrentBatch, + mouseRay, + (float) RadiusNumericUpDown.Value, + (int) DensityNumericUpDown.Value, + SpawnRayFunc, + new Color(GrassColorLabel.BackColor.R, GrassColorLabel.BackColor.G, GrassColorLabel.BackColor.B), + (int) AoNumericUpDown.Value, + (int) ScaleNumericUpDown.Value, + FloatUtil.ParseVector3String(PadTextBox.Text), + RandomizeScaleCheckBox.Checked + ); + wf.UpdateGrassBatchGraphics(CurrentBatch); + } + + BatchChanged(); + } + + public void EraseInstancesAtMouse(SpaceRayIntersectResult mouseRay) + { + var wf = ProjectForm.WorldForm; + if (wf == null) return; + var changed = false; + lock (wf.RenderSyncRoot) + { + if (CurrentBatch.EraseInstancesAtMouse( + CurrentBatch, + mouseRay, + (float) RadiusNumericUpDown.Value + )) + { + wf.UpdateGrassBatchGraphics(CurrentBatch); + changed = true; + } + } + + if (changed) BatchChanged(); + } + + #endregion + + #region Privates + + private SpaceRayIntersectResult SpawnRayFunc(Vector3 spawnPos) + { + var res = ProjectForm.WorldForm.Raycast(new Ray(spawnPos, -Vector3.UnitZ)); + + //if (res.HitBounds != null) // shouldn't happen but just in case.. + //{ + // var mat = BoundsMaterialTypes.GetMaterial(res.HitBounds.MaterialIndex); + // if (mat.Name != "DEFAULT") + // { + // var c = mat.Colour; + // } + //} + return res; + } + + private void BatchChanged() + { + UpdateControls(); + CurrentBatch.UpdateInstanceCount(); + CurrentBatch.HasChanged = true; + ProjectForm.SetGrassBatchHasChanged(false); + } + + #endregion } -} +} \ No newline at end of file diff --git a/Project/Panels/EditYmapGrassPanel.resx b/Project/Panels/EditYmapGrassPanel.resx index 1431f6b..6a9df94 100644 --- a/Project/Panels/EditYmapGrassPanel.resx +++ b/Project/Panels/EditYmapGrassPanel.resx @@ -117,6 +117,9 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 17, 17 + diff --git a/Project/Panels/ProjectExplorerPanel.cs b/Project/Panels/ProjectExplorerPanel.cs index f83fc13..027b2e4 100644 --- a/Project/Panels/ProjectExplorerPanel.cs +++ b/Project/Panels/ProjectExplorerPanel.cs @@ -641,6 +641,20 @@ namespace CodeWalker.Project.Panels } } } + public void SetGrassBatchHasChanged(YmapGrassInstanceBatch batch, bool changed) + { + if (ProjectTreeView.Nodes.Count > 0) + { + var gbnode = FindGrassTreeNode(batch); + if (gbnode == null) return; + string changestr = changed ? "*" : ""; + if (gbnode.Tag == batch) + { + string name = batch.ToString(); + gbnode.Text = changestr + name; + } + } + } @@ -698,6 +712,21 @@ namespace CodeWalker.Project.Panels } return null; } + public TreeNode FindGrassTreeNode(YmapGrassInstanceBatch batch) + { + if (batch == null) return null; + TreeNode ymapnode = FindYmapTreeNode(batch.Ymap); + if (ymapnode == null) return null; + var batchnode = GetChildTreeNode(ymapnode, "GrassBatches"); + if (batchnode == null) return null; + for (int i = 0; i < batchnode.Nodes.Count; i++) + { + TreeNode grassnode = batchnode.Nodes[i]; + if (grassnode.Tag == batch) return grassnode; + } + return null; + } + public TreeNode FindYndTreeNode(YndFile ynd) { if (ProjectTreeView.Nodes.Count <= 0) return null; @@ -930,6 +959,21 @@ namespace CodeWalker.Project.Panels } } } + public void TrySelectGrassBatchTreeNode(YmapGrassInstanceBatch grassBatch) + { + TreeNode grassNode = FindGrassTreeNode(grassBatch); + if (grassNode != null) + { + if (ProjectTreeView.SelectedNode == grassNode) + { + OnItemSelected?.Invoke(grassNode); + } + else + { + ProjectTreeView.SelectedNode = grassNode; + } + } + } public void TrySelectPathNodeTreeNode(YndNode node) { TreeNode tnode = FindPathNodeTreeNode(node); @@ -1240,6 +1284,16 @@ namespace CodeWalker.Project.Panels tn.Parent.Nodes.Remove(tn); } } + + public void RemoveGrassBatchTreeNode(YmapGrassInstanceBatch batch) + { + var tn = FindGrassTreeNode(batch); + if ((tn != null) && (tn.Parent != null)) + { + tn.Parent.Text = "Grass Batches (" + batch.Ymap.GrassInstanceBatches.Length.ToString() + ")"; + tn.Parent.Nodes.Remove(tn); + } + } public void RemovePathNodeTreeNode(YndNode node) { var tn = FindPathNodeTreeNode(node); diff --git a/Project/ProjectForm.Designer.cs b/Project/ProjectForm.Designer.cs index be220cc..00e8469 100644 --- a/Project/ProjectForm.Designer.cs +++ b/Project/ProjectForm.Designer.cs @@ -58,6 +58,14 @@ this.FileSaveItemMenu = new System.Windows.Forms.ToolStripMenuItem(); this.FileSaveItemAsMenu = new System.Windows.Forms.ToolStripMenuItem(); this.EditMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.EditUndoMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.EditRedoMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator(); + this.EditCutMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.EditCopyMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.EditPasteMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.EditCloneMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.EditDeleteMenu = new System.Windows.Forms.ToolStripMenuItem(); this.ViewMenu = new System.Windows.Forms.ToolStripMenuItem(); this.ViewProjectExplorerMenu = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); @@ -65,6 +73,55 @@ this.ViewThemeBlueMenu = new System.Windows.Forms.ToolStripMenuItem(); this.ViewThemeLightMenu = new System.Windows.Forms.ToolStripMenuItem(); this.ViewThemeDarkMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.YmapMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.YmapNameMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator11 = new System.Windows.Forms.ToolStripSeparator(); + this.YmapNewEntityMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.YmapNewCarGenMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.YmapNewGrassBatchMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator12 = new System.Windows.Forms.ToolStripSeparator(); + this.YmapAddToProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.YmapRemoveFromProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.YtypMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.YtypNameMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator13 = new System.Windows.Forms.ToolStripSeparator(); + this.YtypNewArchetypeMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator15 = new System.Windows.Forms.ToolStripSeparator(); + this.YtypAddToProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.YtypRemoveFromProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.YndMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.YndNameMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator14 = new System.Windows.Forms.ToolStripSeparator(); + this.YndNewNodeMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator16 = new System.Windows.Forms.ToolStripSeparator(); + this.YndAddToProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.YndRemoveFromProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.YnvMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.YnvNameMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator17 = new System.Windows.Forms.ToolStripSeparator(); + this.YnvNewPolygonMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator18 = new System.Windows.Forms.ToolStripSeparator(); + this.YnvAddToProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.YnvRemoveFromProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.TrainsMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.TrainsNameMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator19 = new System.Windows.Forms.ToolStripSeparator(); + this.TrainsNewNodeMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator20 = new System.Windows.Forms.ToolStripSeparator(); + this.TrainsAddToProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.TrainsRemoveFromProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.ScenarioMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.ScenarioNameMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator21 = new System.Windows.Forms.ToolStripSeparator(); + this.ScenarioNewPointMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.ScenarioNewPointFromSelectedMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.ScenarioNewEntityOverrideMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.ScenarioNewChainMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.ScenarioNewClusterMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.ScenarioImportChainMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator22 = new System.Windows.Forms.ToolStripSeparator(); + this.ScenarioAddToProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.ScenarioRemoveFromProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); this.ToolsMenu = new System.Windows.Forms.ToolStripMenuItem(); this.ToolsManifestGeneratorMenu = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); @@ -98,62 +155,6 @@ this.ToolbarSaveButton = new System.Windows.Forms.ToolStripButton(); this.ToolbarSaveAllButton = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator(); - this.EditUndoMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.EditRedoMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator(); - this.EditCutMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.EditCopyMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.EditPasteMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.EditDeleteMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.EditCloneMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.YmapMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.YtypMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.YndMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.YnvMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.TrainsMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.ScenarioMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.YmapNameMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator11 = new System.Windows.Forms.ToolStripSeparator(); - this.YmapNewEntityMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.YmapNewCarGenMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator12 = new System.Windows.Forms.ToolStripSeparator(); - this.YmapAddToProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.YmapRemoveFromProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.YtypNameMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator13 = new System.Windows.Forms.ToolStripSeparator(); - this.YtypNewArchetypeMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.YndNameMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator14 = new System.Windows.Forms.ToolStripSeparator(); - this.toolStripSeparator15 = new System.Windows.Forms.ToolStripSeparator(); - this.YtypAddToProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.YtypRemoveFromProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.YndNewNodeMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator16 = new System.Windows.Forms.ToolStripSeparator(); - this.YndAddToProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.YndRemoveFromProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.YnvNameMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator17 = new System.Windows.Forms.ToolStripSeparator(); - this.YnvNewPolygonMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator18 = new System.Windows.Forms.ToolStripSeparator(); - this.YnvAddToProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.YnvRemoveFromProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.TrainsNameMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator19 = new System.Windows.Forms.ToolStripSeparator(); - this.TrainsNewNodeMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator20 = new System.Windows.Forms.ToolStripSeparator(); - this.TrainsAddToProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.TrainsRemoveFromProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.ScenarioNameMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator21 = new System.Windows.Forms.ToolStripSeparator(); - this.ScenarioNewPointMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.ScenarioNewPointFromSelectedMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.ScenarioNewEntityOverrideMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.ScenarioNewChainMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.ScenarioNewClusterMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.ScenarioImportChainMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator22 = new System.Windows.Forms.ToolStripSeparator(); - this.ScenarioAddToProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.ScenarioRemoveFromProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); this.MainMenu.SuspendLayout(); this.MainToolbar.SuspendLayout(); this.SuspendLayout(); @@ -399,6 +400,66 @@ this.EditMenu.Size = new System.Drawing.Size(39, 20); this.EditMenu.Text = "Edit"; // + // EditUndoMenu + // + this.EditUndoMenu.Enabled = false; + this.EditUndoMenu.Name = "EditUndoMenu"; + this.EditUndoMenu.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Z))); + this.EditUndoMenu.Size = new System.Drawing.Size(190, 22); + this.EditUndoMenu.Text = "Undo"; + // + // EditRedoMenu + // + this.EditRedoMenu.Enabled = false; + this.EditRedoMenu.Name = "EditRedoMenu"; + this.EditRedoMenu.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Y))); + this.EditRedoMenu.Size = new System.Drawing.Size(190, 22); + this.EditRedoMenu.Text = "Redo"; + // + // toolStripSeparator10 + // + this.toolStripSeparator10.Name = "toolStripSeparator10"; + this.toolStripSeparator10.Size = new System.Drawing.Size(187, 6); + // + // EditCutMenu + // + this.EditCutMenu.Enabled = false; + this.EditCutMenu.Name = "EditCutMenu"; + this.EditCutMenu.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.X))); + this.EditCutMenu.Size = new System.Drawing.Size(190, 22); + this.EditCutMenu.Text = "Cut Item"; + // + // EditCopyMenu + // + this.EditCopyMenu.Enabled = false; + this.EditCopyMenu.Name = "EditCopyMenu"; + this.EditCopyMenu.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.C))); + this.EditCopyMenu.Size = new System.Drawing.Size(190, 22); + this.EditCopyMenu.Text = "Copy Item"; + // + // EditPasteMenu + // + this.EditPasteMenu.Enabled = false; + this.EditPasteMenu.Name = "EditPasteMenu"; + this.EditPasteMenu.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.V))); + this.EditPasteMenu.Size = new System.Drawing.Size(190, 22); + this.EditPasteMenu.Text = "Paste Item"; + // + // EditCloneMenu + // + this.EditCloneMenu.Enabled = false; + this.EditCloneMenu.Name = "EditCloneMenu"; + this.EditCloneMenu.Size = new System.Drawing.Size(190, 22); + this.EditCloneMenu.Text = "Clone Item"; + // + // EditDeleteMenu + // + this.EditDeleteMenu.Enabled = false; + this.EditDeleteMenu.Name = "EditDeleteMenu"; + this.EditDeleteMenu.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Shift | System.Windows.Forms.Keys.Delete))); + this.EditDeleteMenu.Size = new System.Drawing.Size(190, 22); + this.EditDeleteMenu.Text = "Delete Item"; + // // ViewMenu // this.ViewMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { @@ -454,6 +515,399 @@ this.ViewThemeDarkMenu.Text = "Dark"; this.ViewThemeDarkMenu.Click += new System.EventHandler(this.ViewThemeDarkMenu_Click); // + // YmapMenu + // + this.YmapMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.YmapNameMenu, + this.toolStripSeparator11, + this.YmapNewEntityMenu, + this.YmapNewCarGenMenu, + this.YmapNewGrassBatchMenu, + this.toolStripSeparator12, + this.YmapAddToProjectMenu, + this.YmapRemoveFromProjectMenu}); + this.YmapMenu.Name = "YmapMenu"; + this.YmapMenu.Size = new System.Drawing.Size(49, 20); + this.YmapMenu.Text = "Ymap"; + this.YmapMenu.Visible = false; + // + // YmapNameMenu + // + this.YmapNameMenu.Enabled = false; + this.YmapNameMenu.Name = "YmapNameMenu"; + this.YmapNameMenu.Size = new System.Drawing.Size(199, 22); + this.YmapNameMenu.Text = "(No .ymap file selected)"; + // + // toolStripSeparator11 + // + this.toolStripSeparator11.Name = "toolStripSeparator11"; + this.toolStripSeparator11.Size = new System.Drawing.Size(196, 6); + // + // YmapNewEntityMenu + // + this.YmapNewEntityMenu.Enabled = false; + this.YmapNewEntityMenu.Name = "YmapNewEntityMenu"; + this.YmapNewEntityMenu.Size = new System.Drawing.Size(199, 22); + this.YmapNewEntityMenu.Text = "New Entity"; + this.YmapNewEntityMenu.Click += new System.EventHandler(this.YmapNewEntityMenu_Click); + // + // YmapNewCarGenMenu + // + this.YmapNewCarGenMenu.Enabled = false; + this.YmapNewCarGenMenu.Name = "YmapNewCarGenMenu"; + this.YmapNewCarGenMenu.Size = new System.Drawing.Size(199, 22); + this.YmapNewCarGenMenu.Text = "New Car Generator"; + this.YmapNewCarGenMenu.Click += new System.EventHandler(this.YmapNewCarGenMenu_Click); + // + // YmapNewGrassBatchMenu + // + this.YmapNewGrassBatchMenu.Enabled = false; + this.YmapNewGrassBatchMenu.Name = "YmapNewGrassBatchMenu"; + this.YmapNewGrassBatchMenu.Size = new System.Drawing.Size(199, 22); + this.YmapNewGrassBatchMenu.Text = "New Grass Batch"; + this.YmapNewGrassBatchMenu.Click += new System.EventHandler(this.YmapNewGrassBatchMenu_Click); + // + // toolStripSeparator12 + // + this.toolStripSeparator12.Name = "toolStripSeparator12"; + this.toolStripSeparator12.Size = new System.Drawing.Size(196, 6); + // + // YmapAddToProjectMenu + // + this.YmapAddToProjectMenu.Enabled = false; + this.YmapAddToProjectMenu.Name = "YmapAddToProjectMenu"; + this.YmapAddToProjectMenu.Size = new System.Drawing.Size(199, 22); + this.YmapAddToProjectMenu.Text = "Add to Project"; + this.YmapAddToProjectMenu.Click += new System.EventHandler(this.YmapAddToProjectMenu_Click); + // + // YmapRemoveFromProjectMenu + // + this.YmapRemoveFromProjectMenu.Enabled = false; + this.YmapRemoveFromProjectMenu.Name = "YmapRemoveFromProjectMenu"; + this.YmapRemoveFromProjectMenu.Size = new System.Drawing.Size(199, 22); + this.YmapRemoveFromProjectMenu.Text = "Remove from Project"; + this.YmapRemoveFromProjectMenu.Click += new System.EventHandler(this.YmapRemoveFromProjectMenu_Click); + // + // YtypMenu + // + this.YtypMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.YtypNameMenu, + this.toolStripSeparator13, + this.YtypNewArchetypeMenu, + this.toolStripSeparator15, + this.YtypAddToProjectMenu, + this.YtypRemoveFromProjectMenu}); + this.YtypMenu.Name = "YtypMenu"; + this.YtypMenu.Size = new System.Drawing.Size(43, 20); + this.YtypMenu.Text = "Ytyp"; + this.YtypMenu.Visible = false; + // + // YtypNameMenu + // + this.YtypNameMenu.Enabled = false; + this.YtypNameMenu.Name = "YtypNameMenu"; + this.YtypNameMenu.Size = new System.Drawing.Size(192, 22); + this.YtypNameMenu.Text = "(No .ytyp file selected)"; + // + // toolStripSeparator13 + // + this.toolStripSeparator13.Name = "toolStripSeparator13"; + this.toolStripSeparator13.Size = new System.Drawing.Size(189, 6); + // + // YtypNewArchetypeMenu + // + this.YtypNewArchetypeMenu.Enabled = false; + this.YtypNewArchetypeMenu.Name = "YtypNewArchetypeMenu"; + this.YtypNewArchetypeMenu.Size = new System.Drawing.Size(192, 22); + this.YtypNewArchetypeMenu.Text = "New Archetype"; + this.YtypNewArchetypeMenu.Click += new System.EventHandler(this.YtypNewArchetypeMenu_Click); + // + // toolStripSeparator15 + // + this.toolStripSeparator15.Name = "toolStripSeparator15"; + this.toolStripSeparator15.Size = new System.Drawing.Size(189, 6); + // + // YtypAddToProjectMenu + // + this.YtypAddToProjectMenu.Enabled = false; + this.YtypAddToProjectMenu.Name = "YtypAddToProjectMenu"; + this.YtypAddToProjectMenu.Size = new System.Drawing.Size(192, 22); + this.YtypAddToProjectMenu.Text = "Add to Project"; + this.YtypAddToProjectMenu.Click += new System.EventHandler(this.YtypAddToProjectMenu_Click); + // + // YtypRemoveFromProjectMenu + // + this.YtypRemoveFromProjectMenu.Enabled = false; + this.YtypRemoveFromProjectMenu.Name = "YtypRemoveFromProjectMenu"; + this.YtypRemoveFromProjectMenu.Size = new System.Drawing.Size(192, 22); + this.YtypRemoveFromProjectMenu.Text = "Remove from Project"; + this.YtypRemoveFromProjectMenu.Click += new System.EventHandler(this.YtypRemoveFromProjectMenu_Click); + // + // YndMenu + // + this.YndMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.YndNameMenu, + this.toolStripSeparator14, + this.YndNewNodeMenu, + this.toolStripSeparator16, + this.YndAddToProjectMenu, + this.YndRemoveFromProjectMenu}); + this.YndMenu.Name = "YndMenu"; + this.YndMenu.Size = new System.Drawing.Size(39, 20); + this.YndMenu.Text = "Ynd"; + this.YndMenu.Visible = false; + // + // YndNameMenu + // + this.YndNameMenu.Enabled = false; + this.YndNameMenu.Name = "YndNameMenu"; + this.YndNameMenu.Size = new System.Drawing.Size(189, 22); + this.YndNameMenu.Text = "(No .ynd file selected)"; + // + // toolStripSeparator14 + // + this.toolStripSeparator14.Name = "toolStripSeparator14"; + this.toolStripSeparator14.Size = new System.Drawing.Size(186, 6); + // + // YndNewNodeMenu + // + this.YndNewNodeMenu.Enabled = false; + this.YndNewNodeMenu.Name = "YndNewNodeMenu"; + this.YndNewNodeMenu.Size = new System.Drawing.Size(189, 22); + this.YndNewNodeMenu.Text = "New Node"; + this.YndNewNodeMenu.Click += new System.EventHandler(this.YndNewNodeMenu_Click); + // + // toolStripSeparator16 + // + this.toolStripSeparator16.Name = "toolStripSeparator16"; + this.toolStripSeparator16.Size = new System.Drawing.Size(186, 6); + // + // YndAddToProjectMenu + // + this.YndAddToProjectMenu.Enabled = false; + this.YndAddToProjectMenu.Name = "YndAddToProjectMenu"; + this.YndAddToProjectMenu.Size = new System.Drawing.Size(189, 22); + this.YndAddToProjectMenu.Text = "Add to Project"; + this.YndAddToProjectMenu.Click += new System.EventHandler(this.YndAddToProjectMenu_Click); + // + // YndRemoveFromProjectMenu + // + this.YndRemoveFromProjectMenu.Enabled = false; + this.YndRemoveFromProjectMenu.Name = "YndRemoveFromProjectMenu"; + this.YndRemoveFromProjectMenu.Size = new System.Drawing.Size(189, 22); + this.YndRemoveFromProjectMenu.Text = "Remove from Project"; + this.YndRemoveFromProjectMenu.Click += new System.EventHandler(this.YndRemoveFromProjectMenu_Click); + // + // YnvMenu + // + this.YnvMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.YnvNameMenu, + this.toolStripSeparator17, + this.YnvNewPolygonMenu, + this.toolStripSeparator18, + this.YnvAddToProjectMenu, + this.YnvRemoveFromProjectMenu}); + this.YnvMenu.Name = "YnvMenu"; + this.YnvMenu.Size = new System.Drawing.Size(38, 20); + this.YnvMenu.Text = "Ynv"; + this.YnvMenu.Visible = false; + // + // YnvNameMenu + // + this.YnvNameMenu.Enabled = false; + this.YnvNameMenu.Name = "YnvNameMenu"; + this.YnvNameMenu.Size = new System.Drawing.Size(188, 22); + this.YnvNameMenu.Text = "(No .ynv file selected)"; + // + // toolStripSeparator17 + // + this.toolStripSeparator17.Name = "toolStripSeparator17"; + this.toolStripSeparator17.Size = new System.Drawing.Size(185, 6); + // + // YnvNewPolygonMenu + // + this.YnvNewPolygonMenu.Enabled = false; + this.YnvNewPolygonMenu.Name = "YnvNewPolygonMenu"; + this.YnvNewPolygonMenu.Size = new System.Drawing.Size(188, 22); + this.YnvNewPolygonMenu.Text = "New Polygon"; + this.YnvNewPolygonMenu.Click += new System.EventHandler(this.YnvNewPolygonMenu_Click); + // + // toolStripSeparator18 + // + this.toolStripSeparator18.Name = "toolStripSeparator18"; + this.toolStripSeparator18.Size = new System.Drawing.Size(185, 6); + // + // YnvAddToProjectMenu + // + this.YnvAddToProjectMenu.Enabled = false; + this.YnvAddToProjectMenu.Name = "YnvAddToProjectMenu"; + this.YnvAddToProjectMenu.Size = new System.Drawing.Size(188, 22); + this.YnvAddToProjectMenu.Text = "Add to Project"; + this.YnvAddToProjectMenu.Click += new System.EventHandler(this.YnvAddToProjectMenu_Click); + // + // YnvRemoveFromProjectMenu + // + this.YnvRemoveFromProjectMenu.Enabled = false; + this.YnvRemoveFromProjectMenu.Name = "YnvRemoveFromProjectMenu"; + this.YnvRemoveFromProjectMenu.Size = new System.Drawing.Size(188, 22); + this.YnvRemoveFromProjectMenu.Text = "Remove from Project"; + this.YnvRemoveFromProjectMenu.Click += new System.EventHandler(this.YnvRemoveFromProjectMenu_Click); + // + // TrainsMenu + // + this.TrainsMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.TrainsNameMenu, + this.toolStripSeparator19, + this.TrainsNewNodeMenu, + this.toolStripSeparator20, + this.TrainsAddToProjectMenu, + this.TrainsRemoveFromProjectMenu}); + this.TrainsMenu.Name = "TrainsMenu"; + this.TrainsMenu.Size = new System.Drawing.Size(50, 20); + this.TrainsMenu.Text = "Trains"; + this.TrainsMenu.Visible = false; + // + // TrainsNameMenu + // + this.TrainsNameMenu.Enabled = false; + this.TrainsNameMenu.Name = "TrainsNameMenu"; + this.TrainsNameMenu.Size = new System.Drawing.Size(200, 22); + this.TrainsNameMenu.Text = "(No train track selected)"; + // + // toolStripSeparator19 + // + this.toolStripSeparator19.Name = "toolStripSeparator19"; + this.toolStripSeparator19.Size = new System.Drawing.Size(197, 6); + // + // TrainsNewNodeMenu + // + this.TrainsNewNodeMenu.Enabled = false; + this.TrainsNewNodeMenu.Name = "TrainsNewNodeMenu"; + this.TrainsNewNodeMenu.Size = new System.Drawing.Size(200, 22); + this.TrainsNewNodeMenu.Text = "New Node"; + this.TrainsNewNodeMenu.Click += new System.EventHandler(this.TrainsNewNodeMenu_Click); + // + // toolStripSeparator20 + // + this.toolStripSeparator20.Name = "toolStripSeparator20"; + this.toolStripSeparator20.Size = new System.Drawing.Size(197, 6); + // + // TrainsAddToProjectMenu + // + this.TrainsAddToProjectMenu.Enabled = false; + this.TrainsAddToProjectMenu.Name = "TrainsAddToProjectMenu"; + this.TrainsAddToProjectMenu.Size = new System.Drawing.Size(200, 22); + this.TrainsAddToProjectMenu.Text = "Add to Project"; + this.TrainsAddToProjectMenu.Click += new System.EventHandler(this.TrainsAddToProjectMenu_Click); + // + // TrainsRemoveFromProjectMenu + // + this.TrainsRemoveFromProjectMenu.Enabled = false; + this.TrainsRemoveFromProjectMenu.Name = "TrainsRemoveFromProjectMenu"; + this.TrainsRemoveFromProjectMenu.Size = new System.Drawing.Size(200, 22); + this.TrainsRemoveFromProjectMenu.Text = "Remove from Project"; + this.TrainsRemoveFromProjectMenu.Click += new System.EventHandler(this.TrainsRemoveFromProjectMenu_Click); + // + // ScenarioMenu + // + this.ScenarioMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.ScenarioNameMenu, + this.toolStripSeparator21, + this.ScenarioNewPointMenu, + this.ScenarioNewPointFromSelectedMenu, + this.ScenarioNewEntityOverrideMenu, + this.ScenarioNewChainMenu, + this.ScenarioNewClusterMenu, + this.ScenarioImportChainMenu, + this.toolStripSeparator22, + this.ScenarioAddToProjectMenu, + this.ScenarioRemoveFromProjectMenu}); + this.ScenarioMenu.Name = "ScenarioMenu"; + this.ScenarioMenu.Size = new System.Drawing.Size(64, 20); + this.ScenarioMenu.Text = "Scenario"; + this.ScenarioMenu.Visible = false; + // + // ScenarioNameMenu + // + this.ScenarioNameMenu.Enabled = false; + this.ScenarioNameMenu.Name = "ScenarioNameMenu"; + this.ScenarioNameMenu.Size = new System.Drawing.Size(228, 22); + this.ScenarioNameMenu.Text = "(No scenario region selected)"; + // + // toolStripSeparator21 + // + this.toolStripSeparator21.Name = "toolStripSeparator21"; + this.toolStripSeparator21.Size = new System.Drawing.Size(225, 6); + // + // ScenarioNewPointMenu + // + this.ScenarioNewPointMenu.Enabled = false; + this.ScenarioNewPointMenu.Name = "ScenarioNewPointMenu"; + this.ScenarioNewPointMenu.Size = new System.Drawing.Size(228, 22); + this.ScenarioNewPointMenu.Text = "New Point (Blank)"; + this.ScenarioNewPointMenu.Click += new System.EventHandler(this.ScenarioNewPointMenu_Click); + // + // ScenarioNewPointFromSelectedMenu + // + this.ScenarioNewPointFromSelectedMenu.Enabled = false; + this.ScenarioNewPointFromSelectedMenu.Name = "ScenarioNewPointFromSelectedMenu"; + this.ScenarioNewPointFromSelectedMenu.Size = new System.Drawing.Size(228, 22); + this.ScenarioNewPointFromSelectedMenu.Text = "New Point (from Selected)"; + this.ScenarioNewPointFromSelectedMenu.Click += new System.EventHandler(this.ScenarioNewPointFromSelectedMenu_Click); + // + // ScenarioNewEntityOverrideMenu + // + this.ScenarioNewEntityOverrideMenu.Enabled = false; + this.ScenarioNewEntityOverrideMenu.Name = "ScenarioNewEntityOverrideMenu"; + this.ScenarioNewEntityOverrideMenu.Size = new System.Drawing.Size(228, 22); + this.ScenarioNewEntityOverrideMenu.Text = "New Entity Override"; + this.ScenarioNewEntityOverrideMenu.Click += new System.EventHandler(this.ScenarioNewEntityOverrideMenu_Click); + // + // ScenarioNewChainMenu + // + this.ScenarioNewChainMenu.Enabled = false; + this.ScenarioNewChainMenu.Name = "ScenarioNewChainMenu"; + this.ScenarioNewChainMenu.Size = new System.Drawing.Size(228, 22); + this.ScenarioNewChainMenu.Text = "New Chain"; + this.ScenarioNewChainMenu.Click += new System.EventHandler(this.ScenarioNewChainMenu_Click); + // + // ScenarioNewClusterMenu + // + this.ScenarioNewClusterMenu.Enabled = false; + this.ScenarioNewClusterMenu.Name = "ScenarioNewClusterMenu"; + this.ScenarioNewClusterMenu.Size = new System.Drawing.Size(228, 22); + this.ScenarioNewClusterMenu.Text = "New Cluster"; + this.ScenarioNewClusterMenu.Click += new System.EventHandler(this.ScenarioNewClusterMenu_Click); + // + // ScenarioImportChainMenu + // + this.ScenarioImportChainMenu.Enabled = false; + this.ScenarioImportChainMenu.Name = "ScenarioImportChainMenu"; + this.ScenarioImportChainMenu.Size = new System.Drawing.Size(228, 22); + this.ScenarioImportChainMenu.Text = "Import Chain..."; + this.ScenarioImportChainMenu.Click += new System.EventHandler(this.ScenarioImportChainMenu_Click); + // + // toolStripSeparator22 + // + this.toolStripSeparator22.Name = "toolStripSeparator22"; + this.toolStripSeparator22.Size = new System.Drawing.Size(225, 6); + // + // ScenarioAddToProjectMenu + // + this.ScenarioAddToProjectMenu.Enabled = false; + this.ScenarioAddToProjectMenu.Name = "ScenarioAddToProjectMenu"; + this.ScenarioAddToProjectMenu.Size = new System.Drawing.Size(228, 22); + this.ScenarioAddToProjectMenu.Text = "Add to Project"; + this.ScenarioAddToProjectMenu.Click += new System.EventHandler(this.ScenarioAddToProjectMenu_Click); + // + // ScenarioRemoveFromProjectMenu + // + this.ScenarioRemoveFromProjectMenu.Enabled = false; + this.ScenarioRemoveFromProjectMenu.Name = "ScenarioRemoveFromProjectMenu"; + this.ScenarioRemoveFromProjectMenu.Size = new System.Drawing.Size(228, 22); + this.ScenarioRemoveFromProjectMenu.Text = "Remove from Project"; + this.ScenarioRemoveFromProjectMenu.Click += new System.EventHandler(this.ScenarioRemoveFromProjectMenu_Click); + // // ToolsMenu // this.ToolsMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { @@ -720,451 +1174,7 @@ this.toolStripSeparator5.Name = "toolStripSeparator5"; this.toolStripSeparator5.Size = new System.Drawing.Size(6, 25); // - // EditUndoMenu - // - this.EditUndoMenu.Enabled = false; - this.EditUndoMenu.Name = "EditUndoMenu"; - this.EditUndoMenu.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Z))); - this.EditUndoMenu.Size = new System.Drawing.Size(190, 22); - this.EditUndoMenu.Text = "Undo"; - // - // EditRedoMenu - // - this.EditRedoMenu.Enabled = false; - this.EditRedoMenu.Name = "EditRedoMenu"; - this.EditRedoMenu.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Y))); - this.EditRedoMenu.Size = new System.Drawing.Size(190, 22); - this.EditRedoMenu.Text = "Redo"; - // - // toolStripSeparator10 - // - this.toolStripSeparator10.Name = "toolStripSeparator10"; - this.toolStripSeparator10.Size = new System.Drawing.Size(187, 6); - // - // EditCutMenu - // - this.EditCutMenu.Enabled = false; - this.EditCutMenu.Name = "EditCutMenu"; - this.EditCutMenu.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.X))); - this.EditCutMenu.Size = new System.Drawing.Size(190, 22); - this.EditCutMenu.Text = "Cut Item"; - // - // EditCopyMenu - // - this.EditCopyMenu.Enabled = false; - this.EditCopyMenu.Name = "EditCopyMenu"; - this.EditCopyMenu.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.C))); - this.EditCopyMenu.Size = new System.Drawing.Size(190, 22); - this.EditCopyMenu.Text = "Copy Item"; - // - // EditPasteMenu - // - this.EditPasteMenu.Enabled = false; - this.EditPasteMenu.Name = "EditPasteMenu"; - this.EditPasteMenu.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.V))); - this.EditPasteMenu.Size = new System.Drawing.Size(190, 22); - this.EditPasteMenu.Text = "Paste Item"; - // - // EditDeleteMenu - // - this.EditDeleteMenu.Enabled = false; - this.EditDeleteMenu.Name = "EditDeleteMenu"; - this.EditDeleteMenu.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Shift | System.Windows.Forms.Keys.Delete))); - this.EditDeleteMenu.Size = new System.Drawing.Size(190, 22); - this.EditDeleteMenu.Text = "Delete Item"; - // - // EditCloneMenu - // - this.EditCloneMenu.Enabled = false; - this.EditCloneMenu.Name = "EditCloneMenu"; - this.EditCloneMenu.Size = new System.Drawing.Size(190, 22); - this.EditCloneMenu.Text = "Clone Item"; - // - // YmapMenu - // - this.YmapMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.YmapNameMenu, - this.toolStripSeparator11, - this.YmapNewEntityMenu, - this.YmapNewCarGenMenu, - this.toolStripSeparator12, - this.YmapAddToProjectMenu, - this.YmapRemoveFromProjectMenu}); - this.YmapMenu.Name = "YmapMenu"; - this.YmapMenu.Size = new System.Drawing.Size(49, 20); - this.YmapMenu.Text = "Ymap"; - this.YmapMenu.Visible = false; - // - // YtypMenu - // - this.YtypMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.YtypNameMenu, - this.toolStripSeparator13, - this.YtypNewArchetypeMenu, - this.toolStripSeparator15, - this.YtypAddToProjectMenu, - this.YtypRemoveFromProjectMenu}); - this.YtypMenu.Name = "YtypMenu"; - this.YtypMenu.Size = new System.Drawing.Size(43, 20); - this.YtypMenu.Text = "Ytyp"; - this.YtypMenu.Visible = false; - // - // YndMenu - // - this.YndMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.YndNameMenu, - this.toolStripSeparator14, - this.YndNewNodeMenu, - this.toolStripSeparator16, - this.YndAddToProjectMenu, - this.YndRemoveFromProjectMenu}); - this.YndMenu.Name = "YndMenu"; - this.YndMenu.Size = new System.Drawing.Size(39, 20); - this.YndMenu.Text = "Ynd"; - this.YndMenu.Visible = false; - // - // YnvMenu - // - this.YnvMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.YnvNameMenu, - this.toolStripSeparator17, - this.YnvNewPolygonMenu, - this.toolStripSeparator18, - this.YnvAddToProjectMenu, - this.YnvRemoveFromProjectMenu}); - this.YnvMenu.Name = "YnvMenu"; - this.YnvMenu.Size = new System.Drawing.Size(38, 20); - this.YnvMenu.Text = "Ynv"; - this.YnvMenu.Visible = false; - // - // TrainsMenu - // - this.TrainsMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.TrainsNameMenu, - this.toolStripSeparator19, - this.TrainsNewNodeMenu, - this.toolStripSeparator20, - this.TrainsAddToProjectMenu, - this.TrainsRemoveFromProjectMenu}); - this.TrainsMenu.Name = "TrainsMenu"; - this.TrainsMenu.Size = new System.Drawing.Size(50, 20); - this.TrainsMenu.Text = "Trains"; - this.TrainsMenu.Visible = false; - // - // ScenarioMenu - // - this.ScenarioMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.ScenarioNameMenu, - this.toolStripSeparator21, - this.ScenarioNewPointMenu, - this.ScenarioNewPointFromSelectedMenu, - this.ScenarioNewEntityOverrideMenu, - this.ScenarioNewChainMenu, - this.ScenarioNewClusterMenu, - this.ScenarioImportChainMenu, - this.toolStripSeparator22, - this.ScenarioAddToProjectMenu, - this.ScenarioRemoveFromProjectMenu}); - this.ScenarioMenu.Name = "ScenarioMenu"; - this.ScenarioMenu.Size = new System.Drawing.Size(64, 20); - this.ScenarioMenu.Text = "Scenario"; - this.ScenarioMenu.Visible = false; - // - // YmapNameMenu - // - this.YmapNameMenu.Enabled = false; - this.YmapNameMenu.Name = "YmapNameMenu"; - this.YmapNameMenu.Size = new System.Drawing.Size(199, 22); - this.YmapNameMenu.Text = "(No .ymap file selected)"; - // - // toolStripSeparator11 - // - this.toolStripSeparator11.Name = "toolStripSeparator11"; - this.toolStripSeparator11.Size = new System.Drawing.Size(196, 6); - // - // YmapNewEntityMenu - // - this.YmapNewEntityMenu.Enabled = false; - this.YmapNewEntityMenu.Name = "YmapNewEntityMenu"; - this.YmapNewEntityMenu.Size = new System.Drawing.Size(199, 22); - this.YmapNewEntityMenu.Text = "New Entity"; - this.YmapNewEntityMenu.Click += new System.EventHandler(this.YmapNewEntityMenu_Click); - // - // YmapNewCarGenMenu - // - this.YmapNewCarGenMenu.Enabled = false; - this.YmapNewCarGenMenu.Name = "YmapNewCarGenMenu"; - this.YmapNewCarGenMenu.Size = new System.Drawing.Size(199, 22); - this.YmapNewCarGenMenu.Text = "New Car Generator"; - this.YmapNewCarGenMenu.Click += new System.EventHandler(this.YmapNewCarGenMenu_Click); - // - // toolStripSeparator12 - // - this.toolStripSeparator12.Name = "toolStripSeparator12"; - this.toolStripSeparator12.Size = new System.Drawing.Size(196, 6); - // - // YmapAddToProjectMenu - // - this.YmapAddToProjectMenu.Enabled = false; - this.YmapAddToProjectMenu.Name = "YmapAddToProjectMenu"; - this.YmapAddToProjectMenu.Size = new System.Drawing.Size(199, 22); - this.YmapAddToProjectMenu.Text = "Add to Project"; - this.YmapAddToProjectMenu.Click += new System.EventHandler(this.YmapAddToProjectMenu_Click); - // - // YmapRemoveFromProjectMenu - // - this.YmapRemoveFromProjectMenu.Enabled = false; - this.YmapRemoveFromProjectMenu.Name = "YmapRemoveFromProjectMenu"; - this.YmapRemoveFromProjectMenu.Size = new System.Drawing.Size(199, 22); - this.YmapRemoveFromProjectMenu.Text = "Remove from Project"; - this.YmapRemoveFromProjectMenu.Click += new System.EventHandler(this.YmapRemoveFromProjectMenu_Click); - // - // YtypNameMenu - // - this.YtypNameMenu.Enabled = false; - this.YtypNameMenu.Name = "YtypNameMenu"; - this.YtypNameMenu.Size = new System.Drawing.Size(192, 22); - this.YtypNameMenu.Text = "(No .ytyp file selected)"; - // - // toolStripSeparator13 - // - this.toolStripSeparator13.Name = "toolStripSeparator13"; - this.toolStripSeparator13.Size = new System.Drawing.Size(189, 6); - // - // YtypNewArchetypeMenu - // - this.YtypNewArchetypeMenu.Enabled = false; - this.YtypNewArchetypeMenu.Name = "YtypNewArchetypeMenu"; - this.YtypNewArchetypeMenu.Size = new System.Drawing.Size(192, 22); - this.YtypNewArchetypeMenu.Text = "New Archetype"; - this.YtypNewArchetypeMenu.Click += new System.EventHandler(this.YtypNewArchetypeMenu_Click); - // - // YndNameMenu - // - this.YndNameMenu.Enabled = false; - this.YndNameMenu.Name = "YndNameMenu"; - this.YndNameMenu.Size = new System.Drawing.Size(189, 22); - this.YndNameMenu.Text = "(No .ynd file selected)"; - // - // toolStripSeparator14 - // - this.toolStripSeparator14.Name = "toolStripSeparator14"; - this.toolStripSeparator14.Size = new System.Drawing.Size(186, 6); - // - // toolStripSeparator15 - // - this.toolStripSeparator15.Name = "toolStripSeparator15"; - this.toolStripSeparator15.Size = new System.Drawing.Size(189, 6); - // - // YtypAddToProjectMenu - // - this.YtypAddToProjectMenu.Enabled = false; - this.YtypAddToProjectMenu.Name = "YtypAddToProjectMenu"; - this.YtypAddToProjectMenu.Size = new System.Drawing.Size(192, 22); - this.YtypAddToProjectMenu.Text = "Add to Project"; - this.YtypAddToProjectMenu.Click += new System.EventHandler(this.YtypAddToProjectMenu_Click); - // - // YtypRemoveFromProjectMenu - // - this.YtypRemoveFromProjectMenu.Enabled = false; - this.YtypRemoveFromProjectMenu.Name = "YtypRemoveFromProjectMenu"; - this.YtypRemoveFromProjectMenu.Size = new System.Drawing.Size(192, 22); - this.YtypRemoveFromProjectMenu.Text = "Remove from Project"; - this.YtypRemoveFromProjectMenu.Click += new System.EventHandler(this.YtypRemoveFromProjectMenu_Click); - // - // YndNewNodeMenu - // - this.YndNewNodeMenu.Enabled = false; - this.YndNewNodeMenu.Name = "YndNewNodeMenu"; - this.YndNewNodeMenu.Size = new System.Drawing.Size(189, 22); - this.YndNewNodeMenu.Text = "New Node"; - this.YndNewNodeMenu.Click += new System.EventHandler(this.YndNewNodeMenu_Click); - // - // toolStripSeparator16 - // - this.toolStripSeparator16.Name = "toolStripSeparator16"; - this.toolStripSeparator16.Size = new System.Drawing.Size(186, 6); - // - // YndAddToProjectMenu - // - this.YndAddToProjectMenu.Enabled = false; - this.YndAddToProjectMenu.Name = "YndAddToProjectMenu"; - this.YndAddToProjectMenu.Size = new System.Drawing.Size(189, 22); - this.YndAddToProjectMenu.Text = "Add to Project"; - this.YndAddToProjectMenu.Click += new System.EventHandler(this.YndAddToProjectMenu_Click); - // - // YndRemoveFromProjectMenu - // - this.YndRemoveFromProjectMenu.Enabled = false; - this.YndRemoveFromProjectMenu.Name = "YndRemoveFromProjectMenu"; - this.YndRemoveFromProjectMenu.Size = new System.Drawing.Size(189, 22); - this.YndRemoveFromProjectMenu.Text = "Remove from Project"; - this.YndRemoveFromProjectMenu.Click += new System.EventHandler(this.YndRemoveFromProjectMenu_Click); - // - // YnvNameMenu - // - this.YnvNameMenu.Enabled = false; - this.YnvNameMenu.Name = "YnvNameMenu"; - this.YnvNameMenu.Size = new System.Drawing.Size(188, 22); - this.YnvNameMenu.Text = "(No .ynv file selected)"; - // - // toolStripSeparator17 - // - this.toolStripSeparator17.Name = "toolStripSeparator17"; - this.toolStripSeparator17.Size = new System.Drawing.Size(185, 6); - // - // YnvNewPolygonMenu - // - this.YnvNewPolygonMenu.Enabled = false; - this.YnvNewPolygonMenu.Name = "YnvNewPolygonMenu"; - this.YnvNewPolygonMenu.Size = new System.Drawing.Size(188, 22); - this.YnvNewPolygonMenu.Text = "New Polygon"; - this.YnvNewPolygonMenu.Click += new System.EventHandler(this.YnvNewPolygonMenu_Click); - // - // toolStripSeparator18 - // - this.toolStripSeparator18.Name = "toolStripSeparator18"; - this.toolStripSeparator18.Size = new System.Drawing.Size(185, 6); - // - // YnvAddToProjectMenu - // - this.YnvAddToProjectMenu.Enabled = false; - this.YnvAddToProjectMenu.Name = "YnvAddToProjectMenu"; - this.YnvAddToProjectMenu.Size = new System.Drawing.Size(188, 22); - this.YnvAddToProjectMenu.Text = "Add to Project"; - this.YnvAddToProjectMenu.Click += new System.EventHandler(this.YnvAddToProjectMenu_Click); - // - // YnvRemoveFromProjectMenu - // - this.YnvRemoveFromProjectMenu.Enabled = false; - this.YnvRemoveFromProjectMenu.Name = "YnvRemoveFromProjectMenu"; - this.YnvRemoveFromProjectMenu.Size = new System.Drawing.Size(188, 22); - this.YnvRemoveFromProjectMenu.Text = "Remove from Project"; - this.YnvRemoveFromProjectMenu.Click += new System.EventHandler(this.YnvRemoveFromProjectMenu_Click); - // - // TrainsNameMenu - // - this.TrainsNameMenu.Enabled = false; - this.TrainsNameMenu.Name = "TrainsNameMenu"; - this.TrainsNameMenu.Size = new System.Drawing.Size(200, 22); - this.TrainsNameMenu.Text = "(No train track selected)"; - // - // toolStripSeparator19 - // - this.toolStripSeparator19.Name = "toolStripSeparator19"; - this.toolStripSeparator19.Size = new System.Drawing.Size(197, 6); - // - // TrainsNewNodeMenu - // - this.TrainsNewNodeMenu.Enabled = false; - this.TrainsNewNodeMenu.Name = "TrainsNewNodeMenu"; - this.TrainsNewNodeMenu.Size = new System.Drawing.Size(200, 22); - this.TrainsNewNodeMenu.Text = "New Node"; - this.TrainsNewNodeMenu.Click += new System.EventHandler(this.TrainsNewNodeMenu_Click); - // - // toolStripSeparator20 - // - this.toolStripSeparator20.Name = "toolStripSeparator20"; - this.toolStripSeparator20.Size = new System.Drawing.Size(197, 6); - // - // TrainsAddToProjectMenu - // - this.TrainsAddToProjectMenu.Enabled = false; - this.TrainsAddToProjectMenu.Name = "TrainsAddToProjectMenu"; - this.TrainsAddToProjectMenu.Size = new System.Drawing.Size(200, 22); - this.TrainsAddToProjectMenu.Text = "Add to Project"; - this.TrainsAddToProjectMenu.Click += new System.EventHandler(this.TrainsAddToProjectMenu_Click); - // - // TrainsRemoveFromProjectMenu - // - this.TrainsRemoveFromProjectMenu.Enabled = false; - this.TrainsRemoveFromProjectMenu.Name = "TrainsRemoveFromProjectMenu"; - this.TrainsRemoveFromProjectMenu.Size = new System.Drawing.Size(200, 22); - this.TrainsRemoveFromProjectMenu.Text = "Remove from Project"; - this.TrainsRemoveFromProjectMenu.Click += new System.EventHandler(this.TrainsRemoveFromProjectMenu_Click); - // - // ScenarioNameMenu - // - this.ScenarioNameMenu.Enabled = false; - this.ScenarioNameMenu.Name = "ScenarioNameMenu"; - this.ScenarioNameMenu.Size = new System.Drawing.Size(228, 22); - this.ScenarioNameMenu.Text = "(No scenario region selected)"; - // - // toolStripSeparator21 - // - this.toolStripSeparator21.Name = "toolStripSeparator21"; - this.toolStripSeparator21.Size = new System.Drawing.Size(225, 6); - // - // ScenarioNewPointMenu - // - this.ScenarioNewPointMenu.Enabled = false; - this.ScenarioNewPointMenu.Name = "ScenarioNewPointMenu"; - this.ScenarioNewPointMenu.Size = new System.Drawing.Size(228, 22); - this.ScenarioNewPointMenu.Text = "New Point (Blank)"; - this.ScenarioNewPointMenu.Click += new System.EventHandler(this.ScenarioNewPointMenu_Click); - // - // ScenarioNewPointFromSelectedMenu - // - this.ScenarioNewPointFromSelectedMenu.Enabled = false; - this.ScenarioNewPointFromSelectedMenu.Name = "ScenarioNewPointFromSelectedMenu"; - this.ScenarioNewPointFromSelectedMenu.Size = new System.Drawing.Size(228, 22); - this.ScenarioNewPointFromSelectedMenu.Text = "New Point (from Selected)"; - this.ScenarioNewPointFromSelectedMenu.Click += new System.EventHandler(this.ScenarioNewPointFromSelectedMenu_Click); - // - // ScenarioNewEntityOverrideMenu - // - this.ScenarioNewEntityOverrideMenu.Enabled = false; - this.ScenarioNewEntityOverrideMenu.Name = "ScenarioNewEntityOverrideMenu"; - this.ScenarioNewEntityOverrideMenu.Size = new System.Drawing.Size(228, 22); - this.ScenarioNewEntityOverrideMenu.Text = "New Entity Override"; - this.ScenarioNewEntityOverrideMenu.Click += new System.EventHandler(this.ScenarioNewEntityOverrideMenu_Click); - // - // ScenarioNewChainMenu - // - this.ScenarioNewChainMenu.Enabled = false; - this.ScenarioNewChainMenu.Name = "ScenarioNewChainMenu"; - this.ScenarioNewChainMenu.Size = new System.Drawing.Size(228, 22); - this.ScenarioNewChainMenu.Text = "New Chain"; - this.ScenarioNewChainMenu.Click += new System.EventHandler(this.ScenarioNewChainMenu_Click); - // - // ScenarioNewClusterMenu - // - this.ScenarioNewClusterMenu.Enabled = false; - this.ScenarioNewClusterMenu.Name = "ScenarioNewClusterMenu"; - this.ScenarioNewClusterMenu.Size = new System.Drawing.Size(228, 22); - this.ScenarioNewClusterMenu.Text = "New Cluster"; - this.ScenarioNewClusterMenu.Click += new System.EventHandler(this.ScenarioNewClusterMenu_Click); - // - // ScenarioImportChainMenu - // - this.ScenarioImportChainMenu.Enabled = false; - this.ScenarioImportChainMenu.Name = "ScenarioImportChainMenu"; - this.ScenarioImportChainMenu.Size = new System.Drawing.Size(228, 22); - this.ScenarioImportChainMenu.Text = "Import Chain..."; - this.ScenarioImportChainMenu.Click += new System.EventHandler(this.ScenarioImportChainMenu_Click); - // - // toolStripSeparator22 - // - this.toolStripSeparator22.Name = "toolStripSeparator22"; - this.toolStripSeparator22.Size = new System.Drawing.Size(225, 6); - // - // ScenarioAddToProjectMenu - // - this.ScenarioAddToProjectMenu.Enabled = false; - this.ScenarioAddToProjectMenu.Name = "ScenarioAddToProjectMenu"; - this.ScenarioAddToProjectMenu.Size = new System.Drawing.Size(228, 22); - this.ScenarioAddToProjectMenu.Text = "Add to Project"; - this.ScenarioAddToProjectMenu.Click += new System.EventHandler(this.ScenarioAddToProjectMenu_Click); - // - // ScenarioRemoveFromProjectMenu - // - this.ScenarioRemoveFromProjectMenu.Enabled = false; - this.ScenarioRemoveFromProjectMenu.Name = "ScenarioRemoveFromProjectMenu"; - this.ScenarioRemoveFromProjectMenu.Size = new System.Drawing.Size(228, 22); - this.ScenarioRemoveFromProjectMenu.Text = "Remove from Project"; - this.ScenarioRemoveFromProjectMenu.Click += new System.EventHandler(this.ScenarioRemoveFromProjectMenu_Click); - // - // ProjectForm2 + // ProjectForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; @@ -1175,7 +1185,7 @@ this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.IsMdiContainer = true; this.MainMenuStrip = this.MainMenu; - this.Name = "ProjectForm2"; + this.Name = "ProjectForm"; this.Text = "Project - CodeWalker by dexyfex"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ProjectForm_FormClosing); this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.ProjectForm_FormClosed); @@ -1314,5 +1324,6 @@ private System.Windows.Forms.ToolStripSeparator toolStripSeparator22; private System.Windows.Forms.ToolStripMenuItem ScenarioAddToProjectMenu; private System.Windows.Forms.ToolStripMenuItem ScenarioRemoveFromProjectMenu; + private System.Windows.Forms.ToolStripMenuItem YmapNewGrassBatchMenu; } } \ No newline at end of file diff --git a/Project/ProjectForm.cs b/Project/ProjectForm.cs index 24d7e59..9a28851 100644 --- a/Project/ProjectForm.cs +++ b/Project/ProjectForm.cs @@ -104,7 +104,6 @@ namespace CodeWalker.Project RpfMan = GameFileCache.RpfMan; })).Start(); } - } private void UpdateStatus(string text) @@ -1270,6 +1269,10 @@ namespace CodeWalker.Project { ProjectExplorer?.TrySelectCarGenTreeNode(CurrentCarGen); } + else if (CurrentGrassBatch != null) + { + ProjectExplorer?.TrySelectGrassBatchTreeNode(CurrentGrassBatch); + } } public void RemoveYmapFromProject() { @@ -1435,6 +1438,155 @@ namespace CodeWalker.Project return CurrentEntity == ent; } + public void NewGrassBatch(YmapGrassInstanceBatch copy = null) + { + if (CurrentYmapFile == null) return; + + rage__fwGrassInstanceListDef fwBatch = new rage__fwGrassInstanceListDef(); + rage__fwGrassInstanceListDef__InstanceData[] instances = new rage__fwGrassInstanceListDef__InstanceData[0]; + + if (copy != null) + { + fwBatch = copy.Batch; + instances = copy.Instances; + } + else + { + fwBatch.archetypeName = new MetaHash(JenkHash.GenHash("proc_grasses01")); + fwBatch.lodDist = 120; + fwBatch.LodFadeStartDist = 15; + fwBatch.LodInstFadeRange = 0.75f; + fwBatch.OrientToTerrain = 1.0f; + fwBatch.ScaleRange = new Vector3(0.3f, 0.2f, 0.7f); + } + + YmapGrassInstanceBatch batch = new YmapGrassInstanceBatch + { + AABBMin = fwBatch.BatchAABB.min.XYZ(), + AABBMax = fwBatch.BatchAABB.max.XYZ(), + Archetype = GameFileCache.GetArchetype(fwBatch.archetypeName), + Batch = fwBatch, + Instances = instances + }; + + batch.Position = (batch.AABBMin + batch.AABBMax) * 0.5f; + batch.Radius = (batch.AABBMax - batch.AABBMin).Length() * 0.5f; + batch.Ymap = CurrentYmapFile; + + if (WorldForm != null) + { + lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... + { + CurrentYmapFile.AddGrassBatch(batch); + } + } + else + { + CurrentYmapFile.AddGrassBatch(batch); + } + + LoadProjectTree(); + + ProjectExplorer?.TrySelectGrassBatchTreeNode(batch); + CurrentGrassBatch = batch; + ShowEditYmapGrassBatchPanel(false); + } + public void AddGrassBatchToProject() + { + if (CurrentGrassBatch == null) return; + + CurrentYmapFile = CurrentGrassBatch.Ymap; + if (!YmapExistsInProject(CurrentYmapFile)) + { + var grassBatch = CurrentGrassBatch; + CurrentYmapFile.HasChanged = true; + AddYmapToProject(CurrentYmapFile); + + CurrentGrassBatch = grassBatch; //bug fix for some reason the treeview selects the project node here. + CurrentYmapFile = grassBatch.Ymap; + ProjectExplorer?.TrySelectGrassBatchTreeNode(grassBatch); + } + } + public bool DeleteGrassBatch() + { + if (CurrentYmapFile == null) return false; + if (CurrentGrassBatch == null) return false; + if (CurrentGrassBatch.Ymap != CurrentYmapFile) return false; + if (CurrentYmapFile.GrassInstanceBatches == null) return false; //nothing to delete.. + + if (MessageBox.Show("Are you sure you want to delete this grass batch?\n" + CurrentGrassBatch.ToString() + "\n\nThis operation cannot be undone. Continue?", "Confirm delete", MessageBoxButtons.YesNo) != DialogResult.Yes) + { + return true; + } + + bool res = false; + if (WorldForm != null) + { + lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... + { + res = CurrentYmapFile.RemoveGrassBatch(CurrentGrassBatch); + //WorldForm.SelectItem(null, null, null); + } + } + else + { + res = CurrentYmapFile.RemoveGrassBatch(CurrentGrassBatch); + } + if (!res) + { + MessageBox.Show("Unable to delete the grass batch. This shouldn't happen!"); + } + + var delbatch = CurrentGrassBatch; + + ProjectExplorer?.RemoveGrassBatchTreeNode(CurrentGrassBatch); + ProjectExplorer?.SetYmapHasChanged(CurrentYmapFile, true); + + ClosePanel((EditYmapGrassPanel p) => { return p.Tag == delbatch; }); + + CurrentGrassBatch = null; + + return true; + } + public void PaintGrass(SpaceRayIntersectResult mouseRay, bool erase) + { + try + { + if (InvokeRequired) + { + Invoke(new Action(() => { PaintGrass(mouseRay, erase); })); + return; + } + + if (!mouseRay.Hit || !mouseRay.TestComplete) return; + if (CurrentGrassBatch == null || (!CurrentGrassBatch.BrushEnabled)) return; // brush isn't enabled right now + EditYmapGrassPanel panel = FindPanel(x => x.CurrentBatch == CurrentGrassBatch); + if (panel == null) return; // no panels with this batch + + // TODO: Maybe move these functions into the batch instead of the grass panel? + // although, the panel does have the brush settings. + if (!erase) + panel.CreateInstancesAtMouse(mouseRay); + else panel.EraseInstancesAtMouse(mouseRay); + } + catch { } + } + public bool GrassBatchExistsInProject(YmapGrassInstanceBatch batch) + { + if (CurrentProjectFile?.YmapFiles == null) return false; + if (CurrentProjectFile.YmapFiles.Count <= 0) return false; + foreach (var ymapFile in CurrentProjectFile.YmapFiles) + { + if (ymapFile.GrassInstanceBatches == null) continue; + foreach (var b in ymapFile.GrassInstanceBatches) + { + if (batch == b) + return true; + } + } + return false; + } + public void NewCarGen(YmapCarGen copy = null, bool copyPosition = false) { if (CurrentYmapFile == null) return; @@ -3820,9 +3972,11 @@ namespace CodeWalker.Project for (int i = 0; i < CurrentProjectFile.YmapFiles.Count; i++) { var ymap = CurrentProjectFile.YmapFiles[i]; + // make sure we're not hiding ymaps that have been added by the end-user. + var isnew = ymap.RpfFileEntry.ShortNameHash == 0; if (ymap.Loaded) { - ymaps[ymap._CMapData.name] = ymap; + ymaps[isnew ? JenkHash.GenHash(ymap.Name) : ymap.RpfFileEntry.ShortNameHash] = ymap; } } } @@ -4026,6 +4180,11 @@ namespace CodeWalker.Project { ProjectExplorer?.TrySelectCarGenTreeNode(cargen); } + if (grassbatch != CurrentGrassBatch) + { + ProjectExplorer?.TrySelectGrassBatchTreeNode(grassbatch); + } + } else if (YndExistsInProject(ynd)) { @@ -4699,7 +4858,19 @@ namespace CodeWalker.Project PromoteIfPreviewPanelActive(); } + public void SetGrassBatchHasChanged(bool changed) + { + if (CurrentGrassBatch == null) return; + bool changechange = changed != CurrentGrassBatch.HasChanged; + if (!changechange) return; + + CurrentGrassBatch.HasChanged = true; + + ProjectExplorer?.SetGrassBatchHasChanged(CurrentGrassBatch, changed); + + PromoteIfPreviewPanelActive(); + } @@ -4877,6 +5048,7 @@ namespace CodeWalker.Project YmapNewEntityMenu.Enabled = enable && inproj; YmapNewCarGenMenu.Enabled = enable && inproj; + YmapNewGrassBatchMenu.Enabled = enable && inproj; if (CurrentYmapFile != null) { @@ -5103,7 +5275,7 @@ namespace CodeWalker.Project FileSaveItemAsMenu.Text = "Save As..."; ToolbarSaveButton.Text = "Save"; } - + FileSaveItemMenu.Tag = filename; FileSaveItemAsMenu.Tag = filename; @@ -5312,6 +5484,10 @@ namespace CodeWalker.Project { NewCarGen(); } + private void YmapNewGrassBatchMenu_Click(object sender, EventArgs e) + { + NewGrassBatch(); + } private void YmapAddToProjectMenu_Click(object sender, EventArgs e) { AddYmapToProject(CurrentYmapFile); diff --git a/Rendering/RenderableCache.cs b/Rendering/RenderableCache.cs index 6add1c4..301e971 100644 --- a/Rendering/RenderableCache.cs +++ b/Rendering/RenderableCache.cs @@ -195,6 +195,14 @@ namespace CodeWalker.Rendering } } + public void Invalidate(YmapGrassInstanceBatch batch) + { + lock (updateSyncRoot) + { + instbatches.Invalidate(batch); + } + } + } diff --git a/Rendering/Renderer.cs b/Rendering/Renderer.cs index aa74391..3119b56 100644 --- a/Rendering/Renderer.cs +++ b/Rendering/Renderer.cs @@ -380,6 +380,11 @@ namespace CodeWalker.Rendering renderableCache.Invalidate(path); } + public void Invalidate(YmapGrassInstanceBatch batch) + { + renderableCache.Invalidate(batch); + } + public void UpdateSelectionDrawFlags(DrawableModel model, DrawableGeometry geom, bool rem) { diff --git a/Rendering/Shaders/BasicShader.cs b/Rendering/Shaders/BasicShader.cs index ae1ea37..e7b85e8 100644 --- a/Rendering/Shaders/BasicShader.cs +++ b/Rendering/Shaders/BasicShader.cs @@ -695,6 +695,10 @@ namespace CodeWalker.Rendering { var gb = batch.Key; + // sanity check + if (batch.GrassInstanceBuffer == null) + return; + VSEntityVars.Vars.CamRel = new Vector4(gb.CamRel, 0.0f); VSEntityVars.Vars.Orientation = Quaternion.Identity; VSEntityVars.Vars.Scale = Vector3.One; diff --git a/WorldForm.cs b/WorldForm.cs index c39cf6f..abb7125 100644 --- a/WorldForm.cs +++ b/WorldForm.cs @@ -75,6 +75,10 @@ namespace CodeWalker bool ControlFireToggle = false; + + int ControlBrushTimer = 0; + bool ControlBrushEnabled; + Entity camEntity = new Entity(); PedEntity pedEntity = new PedEntity(); @@ -98,7 +102,7 @@ namespace CodeWalker - + @@ -486,7 +490,7 @@ namespace CodeWalker } - if (ControlMode == WorldControlMode.Free) + if (ControlMode == WorldControlMode.Free || ControlBrushEnabled) { if (Input.ShiftPressed) { @@ -1824,6 +1828,14 @@ namespace CodeWalker } } + public void UpdateGrassBatchGraphics(YmapGrassInstanceBatch grassBatch) + { + lock (Renderer.RenderSyncRoot) + { + Renderer.Invalidate(grassBatch); + } + } + public Vector3 GetCameraPosition() { @@ -2049,8 +2061,8 @@ namespace CodeWalker if (mode == ControlMode) return; - bool wasfree = (ControlMode == WorldControlMode.Free); - bool isfree = (mode == WorldControlMode.Free); + bool wasfree = (ControlMode == WorldControlMode.Free || ControlBrushEnabled); + bool isfree = (mode == WorldControlMode.Free || ControlBrushEnabled); if (isfree && !wasfree) { @@ -2105,16 +2117,17 @@ namespace CodeWalker CurMouseHit.Clear(); - MouseRayCollisionEnabled = Input.CtrlPressed; //temporary...! - if (MouseRayCollisionEnabled) + //MouseRayCollisionEnabled = Input.CtrlPressed; //temporary...! + if (Input.CtrlPressed) { - if (space.Inited && space.Grid != null) - { - Ray mray = new Ray(); - mray.Position = camera.MouseRay.Position + camera.Position; - mray.Direction = camera.MouseRay.Direction; - MouseRayCollision = space.RayIntersect(mray); - } + ControlBrushEnabled = true; + MouseRayCollisionEnabled = true; + MouseRayCollision = GetSpaceMouseRay(); + } + else if (MouseRayCollisionEnabled) + { + ControlBrushEnabled = false; + MouseRayCollisionEnabled = false; } @@ -2127,6 +2140,24 @@ namespace CodeWalker } + public SpaceRayIntersectResult GetSpaceMouseRay() + { + SpaceRayIntersectResult ret = new SpaceRayIntersectResult(); + if (space.Inited && space.Grid != null) + { + Ray mray = new Ray(); + mray.Position = camera.MouseRay.Position + camera.Position; + mray.Direction = camera.MouseRay.Direction; + return space.RayIntersect(mray); + } + return ret; + } + + public SpaceRayIntersectResult Raycast(Ray ray) + { + return space.RayIntersect(ray); + } + private void UpdateMouseHitsFromRenderer() { foreach (var rd in Renderer.RenderedDrawables) @@ -4318,6 +4349,11 @@ namespace CodeWalker { camera.FollowEntity.Position = p; } + public void GoToPosition(Vector3 p, Vector3 bound) + { + camera.FollowEntity.Position = p; + camera.TargetDistance = bound.Length(); + } private MapMarker AddMarker(Vector3 pos, string name, bool addtotxtbox = false) { @@ -5898,7 +5934,7 @@ namespace CodeWalker MouseDownPoint = e.Location; MouseLastPoint = MouseDownPoint; - if (ControlMode == WorldControlMode.Free) + if (ControlMode == WorldControlMode.Free && !ControlBrushEnabled) { if (MouseLButtonDown) { @@ -5997,6 +6033,7 @@ namespace CodeWalker SelectedMarker = null; HideMarkerSelectionInfo(); } + ControlBrushTimer = 0; } } @@ -6011,47 +6048,11 @@ namespace CodeWalker dy = -dy; } - if (ControlMode == WorldControlMode.Free) + if (ControlMode == WorldControlMode.Free && !ControlBrushEnabled) { if (MouseLButtonDown) { - if (GrabbedMarker == null) - { - if (GrabbedWidget == null) - { - if (MapViewEnabled == false) - { - camera.MouseRotate(dx, dy); - } - else - { - //need to move the camera entity XY with mouse in mapview mode... - MapViewDragX += dx; - MapViewDragY += dy; - } - } - else - { - //grabbed widget will move itself in Update() when IsDragging==true - } - } - else - { - //move the grabbed marker... - //float uptx = (CurrentMap != null) ? CurrentMap.UnitsPerTexelX : 1.0f; - //float upty = (CurrentMap != null) ? CurrentMap.UnitsPerTexelY : 1.0f; - //Vector3 wpos = GrabbedMarker.WorldPos; - //wpos.X += dx * uptx; - //wpos.Y += dy * upty; - //GrabbedMarker.WorldPos = wpos; - //UpdateMarkerTexturePos(GrabbedMarker); - //if (GrabbedMarker == LocatorMarker) - //{ - // LocateTextBox.Text = LocatorMarker.ToString(); - // WorldCoordTextBox.Text = LocatorMarker.Get2DWorldPosString(); - // TextureCoordTextBox.Text = LocatorMarker.Get2DTexturePosString(); - //} - } + RotateCam(dx, dy); } if (MouseRButtonDown) { @@ -6075,11 +6076,31 @@ namespace CodeWalker } } - MouseX = e.X; - MouseY = e.Y; - MouseLastPoint = e.Location; + UpdateMousePosition(e); } + else if (ControlBrushEnabled) + { + if (MouseRButtonDown) + { + RotateCam(dx, dy); + } + + UpdateMousePosition(e); + + ControlBrushTimer++; + if (ControlBrushTimer > (Input.ShiftPressed ? 5 : 10)) + { + lock (Renderer.RenderSyncRoot) + { + if (ProjectForm != null && MouseLButtonDown) + { + ProjectForm.PaintGrass(MouseRayCollision, Input.ShiftPressed); + } + ControlBrushTimer = 0; + } + } + } else { lock (MouseControlSyncRoot) @@ -6120,11 +6141,59 @@ namespace CodeWalker } } + private void UpdateMousePosition(MouseEventArgs e) + { + MouseX = e.X; + MouseY = e.Y; + MouseLastPoint = e.Location; + } + + private void RotateCam(int dx, int dy) + { + if (GrabbedMarker == null) + { + if (GrabbedWidget == null) + { + if (MapViewEnabled == false) + { + camera.MouseRotate(dx, dy); + } + else + { + //need to move the camera entity XY with mouse in mapview mode... + MapViewDragX += dx; + MapViewDragY += dy; + } + } + else + { + //grabbed widget will move itself in Update() when IsDragging==true + } + } + else + { + //move the grabbed marker... + //float uptx = (CurrentMap != null) ? CurrentMap.UnitsPerTexelX : 1.0f; + //float upty = (CurrentMap != null) ? CurrentMap.UnitsPerTexelY : 1.0f; + //Vector3 wpos = GrabbedMarker.WorldPos; + //wpos.X += dx * uptx; + //wpos.Y += dy * upty; + //GrabbedMarker.WorldPos = wpos; + //UpdateMarkerTexturePos(GrabbedMarker); + //if (GrabbedMarker == LocatorMarker) + //{ + // LocateTextBox.Text = LocatorMarker.ToString(); + // WorldCoordTextBox.Text = LocatorMarker.Get2DWorldPosString(); + // TextureCoordTextBox.Text = LocatorMarker.Get2DTexturePosString(); + //} + } + } + private void WorldForm_MouseWheel(object sender, MouseEventArgs e) { if (e.Delta != 0) { - if (ControlMode == WorldControlMode.Free) + if (ControlMode == WorldControlMode.Free || ControlBrushEnabled) { camera.MouseZoom(e.Delta); } @@ -6254,7 +6323,7 @@ namespace CodeWalker } } - if (ControlMode != WorldControlMode.Free) + if (ControlMode != WorldControlMode.Free || ControlBrushEnabled) { e.Handled = true; } @@ -7555,7 +7624,6 @@ namespace CodeWalker } } - public enum WorldControlMode { Free = 0, From 6bce9acbcdec6b244224a45fda3bff69c29381b4 Mon Sep 17 00:00:00 2001 From: Soloman N Date: Sun, 10 Jun 2018 09:36:50 -0400 Subject: [PATCH 14/24] Some revisions to grass brush. - Made some changes to the way I check for deleting instances. - Added a new bounding box check for painting grass. - Made GetNewGrassBounds return a bounding box instead of our parameters - Added new Expand method to bounding box util - Added instance radius check and instance brush check to project form for possible future instance types (Props) - Added grass brush gizmo - Updated gui for grass instance batch panel - Fixed bug with GoToPosition (with bounds) --- .../GameFiles/FileTypes/YmapFile.cs | 125 ++--- CodeWalker.Core/Utils/BoundingBoxes.cs | 5 + Project/Panels/EditYmapGrassPanel.Designer.cs | 504 +++++++++--------- Project/Panels/EditYmapGrassPanel.cs | 33 +- Project/ProjectForm.cs | 19 + Rendering/Renderer.cs | 27 + WorldForm.cs | 12 +- 7 files changed, 385 insertions(+), 340 deletions(-) diff --git a/CodeWalker.Core/GameFiles/FileTypes/YmapFile.cs b/CodeWalker.Core/GameFiles/FileTypes/YmapFile.cs index 34fdb8c..839e411 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/YmapFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/YmapFile.cs @@ -1534,8 +1534,14 @@ namespace CodeWalker.GameFiles public float Distance; //used for rendering public YmapFile Ymap { get; set; } - public bool BrushEnabled; - public bool HasChanged; + private List 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() { @@ -1551,16 +1557,36 @@ namespace CodeWalker.GameFiles 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) + { + // 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) { - // some inits - var instances = batch.Instances; - - var delInstances = new List(); - rage__spdAABB batchAABB = batch.Batch.BatchAABB; var oldInstanceBounds = new BoundingBox ( @@ -1572,49 +1598,34 @@ namespace CodeWalker.GameFiles // 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) - foreach (var instance in instances) + var insList = new List(); + foreach (var instance in batch.Instances) { - var grassPos = new Vector3 - { - X = instance.Position.u0, - Y = instance.Position.u1, - Z = instance.Position.u2 - }; // get the world pos - var worldPos = oldInstanceBounds.Minimum + oldInstanceBounds.Size() * (grassPos * BatchVertMultiplier); + var worldPos = GetGrassWorldPos(instance.Position, oldInstanceBounds); // create a boundary around the instance. - var instanceBounds = new BoundingBox(worldPos - (Vector3.One * 1.5f), worldPos + (Vector3.One * 1.5f)); + 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 + //delInstances.Add(instance); // Add a copy of this instance + continue; } + insList.Add(instance); } - if (delInstances.Count <= 0) + if (insList.Count == Instances.Length) return false; - // now we need to recalculate the bounds. - var insList = instances.ToList(); - foreach (var inst in delInstances) - { - if (insList.Contains(inst)) - { - insList.Remove(inst); - } - } - GetNewGrassBounds(insList, oldInstanceBounds, out var min, out var max); - var newBounds = new BoundingBox(min, max); - + 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; } @@ -1630,6 +1641,8 @@ namespace CodeWalker.GameFiles Vector3 pad, bool randomScale) { + + ReInitializeBoundingCache(); var spawnPosition = mouseRay.Position; var positions = new List(); var normals = new List(); @@ -1647,10 +1660,11 @@ namespace CodeWalker.GameFiles // grass instances var oldInstanceBounds = new BoundingBox(batchAABB.min.XYZ(), batchAABB.max.XYZ()); + if (positions.Count <= 0) + return; + // Begin the spawn bounds. - var grassBound = positions.Count <= 0 - ? new BoundingBox(Vector3.Zero, Vector3.Zero) - : new BoundingBox(positions[0] - (Vector3.One * 1.5f), positions[0] + (Vector3.One * 1.5f)); + var grassBound = new BoundingBox(positions[0] - GrassMinMax, positions[0] + GrassMinMax); grassBound = EncapsulatePositions(positions, grassBound); // Calculate the new spawn bounds. @@ -1674,6 +1688,7 @@ namespace CodeWalker.GameFiles // Give back the new intsances batch.Instances = instances.ToArray(); + grassBounds.Clear(); } // bhv approach recommended by dexy. @@ -1688,7 +1703,7 @@ namespace CodeWalker.GameFiles if (oldInstanceBounds.Radius() < minRadius) { - return null; + return new [] { batch }; } // Get our optimized grassInstances @@ -1707,8 +1722,7 @@ namespace CodeWalker.GameFiles }; // Get the boundary of the grassInstances - GetNewGrassBounds(grassList, oldInstanceBounds, out var min, out var max); - var newInstanceBounds = new BoundingBox(min, max); + var newInstanceBounds = GetNewGrassBounds(grassList, oldInstanceBounds); // Recalculate the batch boundaries. var b = RecalcBatch(newInstanceBounds, newBatch); @@ -1741,8 +1755,7 @@ namespace CodeWalker.GameFiles continue; // Get the bounds of the grassInstances list - GetNewGrassBounds(mb, batchAABB, out var min, out var max); - var radius = (max - min).Length() * 0.5F; // get the radius + var radius = GetNewGrassBounds(mb, batchAABB).Radius(); // check if the radius of the grassInstances if (radius <= minRadius) @@ -1780,8 +1793,7 @@ namespace CodeWalker.GameFiles var pointGroup = new List[2]; // Calculate the bounds of these grassInstances. - GetNewGrassBounds(points, batchAABB, out var min, out var max); - var m = new BoundingBox(min, max); + var m = GetNewGrassBounds(points, batchAABB); // Get the center and size var mm = new Vector3 @@ -1833,25 +1845,10 @@ namespace CodeWalker.GameFiles return pointGroup; } - private static void GetNewGrassBounds(IReadOnlyList newGrass, BoundingBox oldAABB, - out Vector3 min, out Vector3 max) + private static BoundingBox GetNewGrassBounds(IReadOnlyList newGrass, BoundingBox oldAABB) { - if (newGrass.Count <= 0) - { - min = Vector3.Zero; - max = Vector3.Zero; - return; - } - var grassWorldPos = GetGrassWorldPos(newGrass[0].Position, oldAABB); - var bounds = new BoundingBox(grassWorldPos - (Vector3.One * 1.5f), grassWorldPos + (Vector3.One * 1.5f)); - foreach (var point in newGrass) - { - var worldPos = GetGrassWorldPos(point.Position, oldAABB); - var tempBounds = new BoundingBox(worldPos - (Vector3.One * 1.5f), worldPos + (Vector3.One * 1.5f)); - bounds = bounds.Encapsulate(tempBounds); - } - min = bounds.Minimum; - max = bounds.Maximum; + var grassPositions = newGrass.Select(x => GetGrassWorldPos(x.Position, oldAABB)).ToArray(); + return BoundingBox.FromPoints(grassPositions).Expand(1f); } private void SpawnInstances( @@ -1929,9 +1926,17 @@ namespace CodeWalker.GameFiles { 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); } @@ -1972,7 +1977,7 @@ namespace CodeWalker.GameFiles { foreach (var pos in positions) { - var posBounds = new BoundingBox(pos - (Vector3.One * 1.5f), pos + (Vector3.One * 1.5f)); + var posBounds = new BoundingBox(pos - (GrassMinMax + 0.1f), pos + (GrassMinMax + 0.1f)); bounds = bounds.Encapsulate(posBounds); } return bounds; diff --git a/CodeWalker.Core/Utils/BoundingBoxes.cs b/CodeWalker.Core/Utils/BoundingBoxes.cs index 2486ca6..d602c8f 100644 --- a/CodeWalker.Core/Utils/BoundingBoxes.cs +++ b/CodeWalker.Core/Utils/BoundingBoxes.cs @@ -30,5 +30,10 @@ namespace CodeWalker.Core.Utils var extents = (box.Maximum - box.Minimum) * 0.5F; return extents.Length(); } + + public static BoundingBox Expand(this BoundingBox b, float amount) + { + return new BoundingBox(b.Minimum - Vector3.One * amount, b.Maximum + Vector3.One * amount); + } } } diff --git a/Project/Panels/EditYmapGrassPanel.Designer.cs b/Project/Panels/EditYmapGrassPanel.Designer.cs index f4d8076..c281c66 100644 --- a/Project/Panels/EditYmapGrassPanel.Designer.cs +++ b/Project/Panels/EditYmapGrassPanel.Designer.cs @@ -32,16 +32,6 @@ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EditYmapGrassPanel)); this.tabControl1 = new System.Windows.Forms.TabControl(); this.GrassBatchTab = new System.Windows.Forms.TabPage(); - this.label17 = new System.Windows.Forms.Label(); - this.OptmizationThresholdNumericUpDown = new System.Windows.Forms.NumericUpDown(); - this.textBox5 = new System.Windows.Forms.TextBox(); - this.OptimizeBatchButton = new System.Windows.Forms.Button(); - this.label14 = new System.Windows.Forms.Label(); - this.textBox4 = new System.Windows.Forms.TextBox(); - this.label13 = new System.Windows.Forms.Label(); - this.HashLabel = new System.Windows.Forms.Label(); - this.ArchetypeNameTextBox = new System.Windows.Forms.TextBox(); - this.label7 = new System.Windows.Forms.Label(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.label12 = new System.Windows.Forms.Label(); this.label11 = new System.Windows.Forms.Label(); @@ -53,14 +43,7 @@ this.LodFadeStartDistanceNumericUpDown = new System.Windows.Forms.NumericUpDown(); this.label6 = new System.Windows.Forms.Label(); this.LodDistNumericUpDown = new System.Windows.Forms.NumericUpDown(); - this.PositionTextBox = new System.Windows.Forms.TextBox(); - this.label1 = new System.Windows.Forms.Label(); - this.GrassGoToButton = new System.Windows.Forms.Button(); - this.GrassDeleteButton = new System.Windows.Forms.Button(); - this.GrassAddToProjectButton = new System.Windows.Forms.Button(); this.BrushTab = new System.Windows.Forms.TabPage(); - this.label16 = new System.Windows.Forms.Label(); - this.label8 = new System.Windows.Forms.Label(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.GrassColorLabel = new System.Windows.Forms.Label(); this.label15 = new System.Windows.Forms.Label(); @@ -71,17 +54,31 @@ this.label2 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.RandomizeScaleCheckBox = new System.Windows.Forms.CheckBox(); - this.BrushModeCheckBox = new System.Windows.Forms.CheckBox(); this.brushSettingsGroupBox = new System.Windows.Forms.GroupBox(); this.DensityNumericUpDown = new System.Windows.Forms.NumericUpDown(); this.RadiusNumericUpDown = new System.Windows.Forms.NumericUpDown(); this.label5 = new System.Windows.Forms.Label(); this.radiusLabel = new System.Windows.Forms.Label(); - this.label18 = new System.Windows.Forms.Label(); this.OptimizeBatchButtonTooltip = new System.Windows.Forms.ToolTip(this.components); + this.OptimizeBatchButton = new System.Windows.Forms.Button(); + this.ExtentsMinTextBox = new System.Windows.Forms.TextBox(); + this.label14 = new System.Windows.Forms.Label(); + this.ExtentsMaxTextBox = new System.Windows.Forms.TextBox(); + this.label13 = new System.Windows.Forms.Label(); + this.GrassDeleteButton = new System.Windows.Forms.Button(); + this.GrassAddToProjectButton = new System.Windows.Forms.Button(); + this.HashLabel = new System.Windows.Forms.Label(); + this.ArchetypeNameTextBox = new System.Windows.Forms.TextBox(); + this.label7 = new System.Windows.Forms.Label(); + this.PositionTextBox = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.GrassGoToButton = new System.Windows.Forms.Button(); + this.label17 = new System.Windows.Forms.Label(); + this.OptmizationThresholdNumericUpDown = new System.Windows.Forms.NumericUpDown(); + this.BrushModeCheckBox = new System.Windows.Forms.CheckBox(); + this.label8 = new System.Windows.Forms.Label(); this.tabControl1.SuspendLayout(); this.GrassBatchTab.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.OptmizationThresholdNumericUpDown)).BeginInit(); this.groupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.OrientToTerrainNumericUpDown)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.LodFadeRangeNumericUpDown)).BeginInit(); @@ -94,146 +91,30 @@ this.brushSettingsGroupBox.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.DensityNumericUpDown)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.RadiusNumericUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.OptmizationThresholdNumericUpDown)).BeginInit(); this.SuspendLayout(); // // tabControl1 // this.tabControl1.Controls.Add(this.GrassBatchTab); this.tabControl1.Controls.Add(this.BrushTab); - this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill; - this.tabControl1.Location = new System.Drawing.Point(0, 0); + this.tabControl1.Location = new System.Drawing.Point(12, 65); this.tabControl1.Name = "tabControl1"; this.tabControl1.SelectedIndex = 0; - this.tabControl1.Size = new System.Drawing.Size(554, 355); + this.tabControl1.Size = new System.Drawing.Size(486, 181); this.tabControl1.TabIndex = 37; // // GrassBatchTab // - this.GrassBatchTab.Controls.Add(this.label18); - this.GrassBatchTab.Controls.Add(this.label17); - this.GrassBatchTab.Controls.Add(this.OptmizationThresholdNumericUpDown); - this.GrassBatchTab.Controls.Add(this.textBox5); - this.GrassBatchTab.Controls.Add(this.OptimizeBatchButton); - this.GrassBatchTab.Controls.Add(this.label14); - this.GrassBatchTab.Controls.Add(this.textBox4); - this.GrassBatchTab.Controls.Add(this.label13); - this.GrassBatchTab.Controls.Add(this.HashLabel); - this.GrassBatchTab.Controls.Add(this.ArchetypeNameTextBox); - this.GrassBatchTab.Controls.Add(this.label7); this.GrassBatchTab.Controls.Add(this.groupBox1); - this.GrassBatchTab.Controls.Add(this.PositionTextBox); - this.GrassBatchTab.Controls.Add(this.label1); - this.GrassBatchTab.Controls.Add(this.GrassGoToButton); - this.GrassBatchTab.Controls.Add(this.GrassDeleteButton); - this.GrassBatchTab.Controls.Add(this.GrassAddToProjectButton); this.GrassBatchTab.Location = new System.Drawing.Point(4, 22); this.GrassBatchTab.Name = "GrassBatchTab"; this.GrassBatchTab.Padding = new System.Windows.Forms.Padding(3); - this.GrassBatchTab.Size = new System.Drawing.Size(546, 329); + this.GrassBatchTab.Size = new System.Drawing.Size(478, 155); this.GrassBatchTab.TabIndex = 0; this.GrassBatchTab.Text = "Grass Batch"; this.GrassBatchTab.UseVisualStyleBackColor = true; // - // label17 - // - this.label17.AutoSize = true; - this.label17.Location = new System.Drawing.Point(400, 241); - this.label17.Name = "label17"; - this.label17.Size = new System.Drawing.Size(54, 13); - this.label17.TabIndex = 51; - this.label17.Text = "Threshold"; - // - // OptmizationThresholdNumericUpDown - // - this.OptmizationThresholdNumericUpDown.Location = new System.Drawing.Point(460, 236); - this.OptmizationThresholdNumericUpDown.Maximum = new decimal(new int[] { - 999999, - 0, - 0, - 0}); - this.OptmizationThresholdNumericUpDown.Name = "OptmizationThresholdNumericUpDown"; - this.OptmizationThresholdNumericUpDown.Size = new System.Drawing.Size(66, 20); - this.OptmizationThresholdNumericUpDown.TabIndex = 50; - this.OptmizationThresholdNumericUpDown.Value = new decimal(new int[] { - 5, - 0, - 0, - 0}); - // - // textBox5 - // - this.textBox5.Location = new System.Drawing.Point(93, 237); - this.textBox5.Name = "textBox5"; - this.textBox5.ReadOnly = true; - this.textBox5.Size = new System.Drawing.Size(282, 20); - this.textBox5.TabIndex = 49; - this.textBox5.Text = "TODO!"; - // - // OptimizeBatchButton - // - this.OptimizeBatchButton.Location = new System.Drawing.Point(403, 207); - this.OptimizeBatchButton.Name = "OptimizeBatchButton"; - this.OptimizeBatchButton.Size = new System.Drawing.Size(123, 24); - this.OptimizeBatchButton.TabIndex = 50; - this.OptimizeBatchButton.Text = "Optimize Batch"; - this.OptimizeBatchButtonTooltip.SetToolTip(this.OptimizeBatchButton, "Will split your batch into multiple different batches based on the threshold. If " + - "your threshold is 5.0 then each batch will have a size of 5.0 meters."); - this.OptimizeBatchButton.UseVisualStyleBackColor = true; - this.OptimizeBatchButton.Click += new System.EventHandler(this.OptimizeBatchButton_Click); - // - // label14 - // - this.label14.AutoSize = true; - this.label14.Location = new System.Drawing.Point(22, 240); - this.label14.Name = "label14"; - this.label14.Size = new System.Drawing.Size(68, 13); - this.label14.TabIndex = 48; - this.label14.Text = "Extents Max:"; - // - // textBox4 - // - this.textBox4.Location = new System.Drawing.Point(93, 210); - this.textBox4.Name = "textBox4"; - this.textBox4.ReadOnly = true; - this.textBox4.Size = new System.Drawing.Size(282, 20); - this.textBox4.TabIndex = 47; - this.textBox4.Text = "TODO!"; - // - // label13 - // - this.label13.AutoSize = true; - this.label13.Location = new System.Drawing.Point(22, 213); - this.label13.Name = "label13"; - this.label13.Size = new System.Drawing.Size(65, 13); - this.label13.TabIndex = 46; - this.label13.Text = "Extents Min:"; - // - // HashLabel - // - this.HashLabel.AutoSize = true; - this.HashLabel.Location = new System.Drawing.Point(211, 16); - this.HashLabel.Name = "HashLabel"; - this.HashLabel.Size = new System.Drawing.Size(35, 13); - this.HashLabel.TabIndex = 45; - this.HashLabel.Text = "Hash:"; - // - // ArchetypeNameTextBox - // - this.ArchetypeNameTextBox.Location = new System.Drawing.Point(61, 13); - this.ArchetypeNameTextBox.Name = "ArchetypeNameTextBox"; - this.ArchetypeNameTextBox.Size = new System.Drawing.Size(144, 20); - this.ArchetypeNameTextBox.TabIndex = 44; - this.ArchetypeNameTextBox.TextChanged += new System.EventHandler(this.ArchetypeNameTextBox_TextChanged); - // - // label7 - // - this.label7.AutoSize = true; - this.label7.Location = new System.Drawing.Point(11, 16); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(35, 13); - this.label7.TabIndex = 43; - this.label7.Text = "Name"; - // // groupBox1 // this.groupBox1.Controls.Add(this.label12); @@ -247,9 +128,9 @@ this.groupBox1.Controls.Add(this.label6); this.groupBox1.Controls.Add(this.LodDistNumericUpDown); this.groupBox1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.groupBox1.Location = new System.Drawing.Point(14, 67); + this.groupBox1.Location = new System.Drawing.Point(12, 6); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(384, 132); + this.groupBox1.Size = new System.Drawing.Size(460, 143); this.groupBox1.TabIndex = 42; this.groupBox1.TabStop = false; this.groupBox1.Text = "Batch"; @@ -290,7 +171,7 @@ // this.ScaleRangeTextBox.Location = new System.Drawing.Point(270, 21); this.ScaleRangeTextBox.Name = "ScaleRangeTextBox"; - this.ScaleRangeTextBox.Size = new System.Drawing.Size(104, 20); + this.ScaleRangeTextBox.Size = new System.Drawing.Size(166, 20); this.ScaleRangeTextBox.TabIndex = 46; this.ScaleRangeTextBox.TextChanged += new System.EventHandler(this.ScaleRangeTextBox_TextChanged); // @@ -367,86 +248,18 @@ this.LodDistNumericUpDown.TabIndex = 0; this.LodDistNumericUpDown.ValueChanged += new System.EventHandler(this.LodDistNumericUpDown_ValueChanged); // - // PositionTextBox - // - this.PositionTextBox.Location = new System.Drawing.Point(61, 40); - this.PositionTextBox.Name = "PositionTextBox"; - this.PositionTextBox.ReadOnly = true; - this.PositionTextBox.Size = new System.Drawing.Size(185, 20); - this.PositionTextBox.TabIndex = 41; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(11, 43); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(44, 13); - this.label1.TabIndex = 40; - this.label1.Text = "Position"; - // - // GrassGoToButton - // - this.GrassGoToButton.Location = new System.Drawing.Point(252, 38); - this.GrassGoToButton.Name = "GrassGoToButton"; - this.GrassGoToButton.Size = new System.Drawing.Size(56, 23); - this.GrassGoToButton.TabIndex = 39; - this.GrassGoToButton.Text = "Go To"; - this.GrassGoToButton.UseVisualStyleBackColor = true; - this.GrassGoToButton.Click += new System.EventHandler(this.GrassGoToButton_Click); - // - // GrassDeleteButton - // - this.GrassDeleteButton.Location = new System.Drawing.Point(278, 298); - this.GrassDeleteButton.Name = "GrassDeleteButton"; - this.GrassDeleteButton.Size = new System.Drawing.Size(95, 23); - this.GrassDeleteButton.TabIndex = 38; - this.GrassDeleteButton.Text = "Delete Batch"; - this.GrassDeleteButton.UseVisualStyleBackColor = true; - this.GrassDeleteButton.Click += new System.EventHandler(this.GrassDeleteButton_Click); - // - // GrassAddToProjectButton - // - this.GrassAddToProjectButton.Location = new System.Drawing.Point(180, 298); - this.GrassAddToProjectButton.Name = "GrassAddToProjectButton"; - this.GrassAddToProjectButton.Size = new System.Drawing.Size(95, 23); - this.GrassAddToProjectButton.TabIndex = 37; - this.GrassAddToProjectButton.Text = "Add to Project"; - this.GrassAddToProjectButton.UseVisualStyleBackColor = true; - this.GrassAddToProjectButton.Click += new System.EventHandler(this.GrassAddToProjectButton_Click); - // // BrushTab // - this.BrushTab.Controls.Add(this.label16); - this.BrushTab.Controls.Add(this.label8); this.BrushTab.Controls.Add(this.groupBox2); - this.BrushTab.Controls.Add(this.BrushModeCheckBox); this.BrushTab.Controls.Add(this.brushSettingsGroupBox); this.BrushTab.Location = new System.Drawing.Point(4, 22); this.BrushTab.Name = "BrushTab"; this.BrushTab.Padding = new System.Windows.Forms.Padding(3); - this.BrushTab.Size = new System.Drawing.Size(546, 329); + this.BrushTab.Size = new System.Drawing.Size(478, 155); this.BrushTab.TabIndex = 1; this.BrushTab.Text = " Brush"; this.BrushTab.UseVisualStyleBackColor = true; // - // label16 - // - this.label16.AutoSize = true; - this.label16.Location = new System.Drawing.Point(9, 224); - this.label16.Name = "label16"; - this.label16.Size = new System.Drawing.Size(114, 13); - this.label16.TabIndex = 40; - this.label16.Text = "SHIFT + CTRL - Erase"; - // - // label8 - // - this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(9, 202); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(68, 13); - this.label8.TabIndex = 21; - this.label8.Text = "CTRL - Paint"; - // // groupBox2 // this.groupBox2.Controls.Add(this.GrassColorLabel); @@ -459,9 +272,9 @@ this.groupBox2.Controls.Add(this.label3); this.groupBox2.Controls.Add(this.RandomizeScaleCheckBox); this.groupBox2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.groupBox2.Location = new System.Drawing.Point(259, 3); + this.groupBox2.Location = new System.Drawing.Point(191, 3); this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(279, 153); + this.groupBox2.Size = new System.Drawing.Size(281, 146); this.groupBox2.TabIndex = 39; this.groupBox2.TabStop = false; this.groupBox2.Text = "Instance Settings"; @@ -559,22 +372,11 @@ this.RandomizeScaleCheckBox.AutoSize = true; this.RandomizeScaleCheckBox.Location = new System.Drawing.Point(176, 79); this.RandomizeScaleCheckBox.Name = "RandomizeScaleCheckBox"; - this.RandomizeScaleCheckBox.Size = new System.Drawing.Size(79, 17); + this.RandomizeScaleCheckBox.Size = new System.Drawing.Size(66, 17); this.RandomizeScaleCheckBox.TabIndex = 18; - this.RandomizeScaleCheckBox.Text = "Randomize"; + this.RandomizeScaleCheckBox.Text = "Random"; this.RandomizeScaleCheckBox.UseVisualStyleBackColor = true; // - // BrushModeCheckBox - // - this.BrushModeCheckBox.AutoSize = true; - this.BrushModeCheckBox.Location = new System.Drawing.Point(8, 174); - this.BrushModeCheckBox.Name = "BrushModeCheckBox"; - this.BrushModeCheckBox.Size = new System.Drawing.Size(83, 17); - this.BrushModeCheckBox.TabIndex = 39; - this.BrushModeCheckBox.Text = "Brush Mode"; - this.BrushModeCheckBox.UseVisualStyleBackColor = true; - this.BrushModeCheckBox.CheckedChanged += new System.EventHandler(this.BrushModeCheckBox_CheckedChanged); - // // brushSettingsGroupBox // this.brushSettingsGroupBox.Controls.Add(this.DensityNumericUpDown); @@ -584,21 +386,21 @@ this.brushSettingsGroupBox.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.brushSettingsGroupBox.Location = new System.Drawing.Point(8, 3); this.brushSettingsGroupBox.Name = "brushSettingsGroupBox"; - this.brushSettingsGroupBox.Size = new System.Drawing.Size(245, 153); + this.brushSettingsGroupBox.Size = new System.Drawing.Size(177, 146); this.brushSettingsGroupBox.TabIndex = 38; this.brushSettingsGroupBox.TabStop = false; this.brushSettingsGroupBox.Text = "Brush Settings"; // // DensityNumericUpDown // - this.DensityNumericUpDown.Location = new System.Drawing.Point(109, 57); + this.DensityNumericUpDown.Location = new System.Drawing.Point(76, 57); this.DensityNumericUpDown.Maximum = new decimal(new int[] { 128, 0, 0, 0}); this.DensityNumericUpDown.Name = "DensityNumericUpDown"; - this.DensityNumericUpDown.Size = new System.Drawing.Size(120, 20); + this.DensityNumericUpDown.Size = new System.Drawing.Size(84, 20); this.DensityNumericUpDown.TabIndex = 20; this.DensityNumericUpDown.Value = new decimal(new int[] { 28, @@ -614,15 +416,16 @@ 0, 0, 131072}); - this.RadiusNumericUpDown.Location = new System.Drawing.Point(109, 31); + this.RadiusNumericUpDown.Location = new System.Drawing.Point(76, 31); this.RadiusNumericUpDown.Name = "RadiusNumericUpDown"; - this.RadiusNumericUpDown.Size = new System.Drawing.Size(120, 20); + this.RadiusNumericUpDown.Size = new System.Drawing.Size(84, 20); this.RadiusNumericUpDown.TabIndex = 11; this.RadiusNumericUpDown.Value = new decimal(new int[] { 5, 0, 0, 0}); + this.RadiusNumericUpDown.ValueChanged += new System.EventHandler(this.RadiusNumericUpDown_ValueChanged); // // label5 // @@ -642,27 +445,209 @@ this.radiusLabel.TabIndex = 10; this.radiusLabel.Text = "Radius"; // - // label18 + // OptimizeBatchButton // - this.label18.Location = new System.Drawing.Point(400, 259); - this.label18.Name = "label18"; - this.label18.Size = new System.Drawing.Size(126, 53); - this.label18.TabIndex = 52; - this.label18.Text = "* The higher the threshold, the larger each batch will be when they are split."; + this.OptimizeBatchButton.Location = new System.Drawing.Point(16, 280); + this.OptimizeBatchButton.Name = "OptimizeBatchButton"; + this.OptimizeBatchButton.Size = new System.Drawing.Size(108, 24); + this.OptimizeBatchButton.TabIndex = 70; + this.OptimizeBatchButton.Text = "Optimize Batch"; + this.OptimizeBatchButtonTooltip.SetToolTip(this.OptimizeBatchButton, "Will split your batch into multiple different batches based on the threshold. If " + + "your threshold is 5.0 then each batch will have a size of 5.0 meters."); + this.OptimizeBatchButton.UseVisualStyleBackColor = true; + this.OptimizeBatchButton.Click += new System.EventHandler(this.OptimizeBatchButton_Click); + // + // ExtentsMinTextBox + // + this.ExtentsMinTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.ExtentsMinTextBox.Location = new System.Drawing.Point(84, 319); + this.ExtentsMinTextBox.Name = "ExtentsMinTextBox"; + this.ExtentsMinTextBox.ReadOnly = true; + this.ExtentsMinTextBox.Size = new System.Drawing.Size(380, 20); + this.ExtentsMinTextBox.TabIndex = 55; + // + // label14 + // + this.label14.AutoSize = true; + this.label14.Location = new System.Drawing.Point(13, 349); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(68, 13); + this.label14.TabIndex = 54; + this.label14.Text = "Extents Max:"; + // + // ExtentsMaxTextBox + // + this.ExtentsMaxTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.ExtentsMaxTextBox.Location = new System.Drawing.Point(84, 345); + this.ExtentsMaxTextBox.Name = "ExtentsMaxTextBox"; + this.ExtentsMaxTextBox.ReadOnly = true; + this.ExtentsMaxTextBox.Size = new System.Drawing.Size(380, 20); + this.ExtentsMaxTextBox.TabIndex = 53; + // + // label13 + // + this.label13.AutoSize = true; + this.label13.Location = new System.Drawing.Point(13, 322); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(65, 13); + this.label13.TabIndex = 52; + this.label13.Text = "Extents Min:"; + // + // GrassDeleteButton + // + this.GrassDeleteButton.Anchor = System.Windows.Forms.AnchorStyles.Bottom; + this.GrassDeleteButton.Location = new System.Drawing.Point(257, 397); + this.GrassDeleteButton.Name = "GrassDeleteButton"; + this.GrassDeleteButton.Size = new System.Drawing.Size(95, 23); + this.GrassDeleteButton.TabIndex = 51; + this.GrassDeleteButton.Text = "Delete Batch"; + this.GrassDeleteButton.UseVisualStyleBackColor = true; + this.GrassDeleteButton.Click += new System.EventHandler(this.GrassDeleteButton_Click); + // + // GrassAddToProjectButton + // + this.GrassAddToProjectButton.Anchor = System.Windows.Forms.AnchorStyles.Bottom; + this.GrassAddToProjectButton.Location = new System.Drawing.Point(159, 397); + this.GrassAddToProjectButton.Name = "GrassAddToProjectButton"; + this.GrassAddToProjectButton.Size = new System.Drawing.Size(95, 23); + this.GrassAddToProjectButton.TabIndex = 50; + this.GrassAddToProjectButton.Text = "Add to Project"; + this.GrassAddToProjectButton.UseVisualStyleBackColor = true; + this.GrassAddToProjectButton.Click += new System.EventHandler(this.GrassAddToProjectButton_Click); + // + // HashLabel + // + this.HashLabel.AutoSize = true; + this.HashLabel.Location = new System.Drawing.Point(254, 14); + this.HashLabel.Name = "HashLabel"; + this.HashLabel.Size = new System.Drawing.Size(44, 13); + this.HashLabel.TabIndex = 61; + this.HashLabel.Text = "Hash: 0"; + // + // ArchetypeNameTextBox + // + this.ArchetypeNameTextBox.Location = new System.Drawing.Point(66, 12); + this.ArchetypeNameTextBox.Name = "ArchetypeNameTextBox"; + this.ArchetypeNameTextBox.Size = new System.Drawing.Size(144, 20); + this.ArchetypeNameTextBox.TabIndex = 60; + this.ArchetypeNameTextBox.TextChanged += new System.EventHandler(this.ArchetypeNameTextBox_TextChanged); + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(16, 15); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(35, 13); + this.label7.TabIndex = 59; + this.label7.Text = "Name"; + // + // PositionTextBox + // + this.PositionTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.PositionTextBox.Location = new System.Drawing.Point(66, 39); + this.PositionTextBox.Name = "PositionTextBox"; + this.PositionTextBox.ReadOnly = true; + this.PositionTextBox.Size = new System.Drawing.Size(275, 20); + this.PositionTextBox.TabIndex = 58; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(16, 42); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(44, 13); + this.label1.TabIndex = 57; + this.label1.Text = "Position"; + // + // GrassGoToButton + // + this.GrassGoToButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.GrassGoToButton.Location = new System.Drawing.Point(347, 36); + this.GrassGoToButton.Name = "GrassGoToButton"; + this.GrassGoToButton.Size = new System.Drawing.Size(56, 23); + this.GrassGoToButton.TabIndex = 56; + this.GrassGoToButton.Text = "Go To"; + this.GrassGoToButton.UseVisualStyleBackColor = true; + this.GrassGoToButton.Click += new System.EventHandler(this.GrassGoToButton_Click); + // + // label17 + // + this.label17.AutoSize = true; + this.label17.Location = new System.Drawing.Point(130, 286); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(54, 13); + this.label17.TabIndex = 71; + this.label17.Text = "Threshold"; + // + // OptmizationThresholdNumericUpDown + // + this.OptmizationThresholdNumericUpDown.Location = new System.Drawing.Point(190, 284); + this.OptmizationThresholdNumericUpDown.Maximum = new decimal(new int[] { + 999999, + 0, + 0, + 0}); + this.OptmizationThresholdNumericUpDown.Name = "OptmizationThresholdNumericUpDown"; + this.OptmizationThresholdNumericUpDown.Size = new System.Drawing.Size(51, 20); + this.OptmizationThresholdNumericUpDown.TabIndex = 69; + this.OptmizationThresholdNumericUpDown.Value = new decimal(new int[] { + 5, + 0, + 0, + 0}); + // + // BrushModeCheckBox + // + this.BrushModeCheckBox.AutoSize = true; + this.BrushModeCheckBox.Location = new System.Drawing.Point(16, 252); + this.BrushModeCheckBox.Name = "BrushModeCheckBox"; + this.BrushModeCheckBox.Size = new System.Drawing.Size(83, 17); + this.BrushModeCheckBox.TabIndex = 68; + this.BrushModeCheckBox.Text = "Brush Mode"; + this.BrushModeCheckBox.UseVisualStyleBackColor = true; + this.BrushModeCheckBox.CheckedChanged += new System.EventHandler(this.BrushModeCheckBox_CheckedChanged); + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(211, 14); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(24, 13); + this.label8.TabIndex = 72; + this.label8.Text = ".ydr"; + this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // EditYmapGrassPanel // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(554, 355); + this.ClientSize = new System.Drawing.Size(510, 443); + this.Controls.Add(this.label8); + this.Controls.Add(this.label17); + this.Controls.Add(this.OptmizationThresholdNumericUpDown); + this.Controls.Add(this.OptimizeBatchButton); + this.Controls.Add(this.BrushModeCheckBox); + this.Controls.Add(this.HashLabel); + this.Controls.Add(this.ExtentsMinTextBox); + this.Controls.Add(this.ArchetypeNameTextBox); + this.Controls.Add(this.ExtentsMaxTextBox); + this.Controls.Add(this.label7); + this.Controls.Add(this.PositionTextBox); + this.Controls.Add(this.label1); + this.Controls.Add(this.GrassGoToButton); + this.Controls.Add(this.label14); + this.Controls.Add(this.label13); + this.Controls.Add(this.GrassDeleteButton); this.Controls.Add(this.tabControl1); + this.Controls.Add(this.GrassAddToProjectButton); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Name = "EditYmapGrassPanel"; this.Text = "Grass Batch"; this.tabControl1.ResumeLayout(false); this.GrassBatchTab.ResumeLayout(false); - this.GrassBatchTab.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.OptmizationThresholdNumericUpDown)).EndInit(); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.OrientToTerrainNumericUpDown)).EndInit(); @@ -670,7 +655,6 @@ ((System.ComponentModel.ISupportInitialize)(this.LodFadeStartDistanceNumericUpDown)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.LodDistNumericUpDown)).EndInit(); this.BrushTab.ResumeLayout(false); - this.BrushTab.PerformLayout(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.AoNumericUpDown)).EndInit(); @@ -679,7 +663,9 @@ this.brushSettingsGroupBox.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.DensityNumericUpDown)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.RadiusNumericUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.OptmizationThresholdNumericUpDown)).EndInit(); this.ResumeLayout(false); + this.PerformLayout(); } @@ -687,36 +673,23 @@ private System.Windows.Forms.TabControl tabControl1; private System.Windows.Forms.TabPage GrassBatchTab; - private System.Windows.Forms.TextBox PositionTextBox; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Button GrassGoToButton; - private System.Windows.Forms.Button GrassDeleteButton; - private System.Windows.Forms.Button GrassAddToProjectButton; private System.Windows.Forms.TabPage BrushTab; private System.Windows.Forms.GroupBox brushSettingsGroupBox; private System.Windows.Forms.NumericUpDown RadiusNumericUpDown; private System.Windows.Forms.Label radiusLabel; private System.Windows.Forms.NumericUpDown DensityNumericUpDown; private System.Windows.Forms.Label label5; - private System.Windows.Forms.CheckBox BrushModeCheckBox; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.NumericUpDown LodDistNumericUpDown; private System.Windows.Forms.Label label6; - private System.Windows.Forms.TextBox ArchetypeNameTextBox; - private System.Windows.Forms.Label label7; - private System.Windows.Forms.Label HashLabel; private System.Windows.Forms.Label label9; private System.Windows.Forms.NumericUpDown LodFadeStartDistanceNumericUpDown; private System.Windows.Forms.Label label10; private System.Windows.Forms.NumericUpDown LodFadeRangeNumericUpDown; private System.Windows.Forms.Label label11; private System.Windows.Forms.NumericUpDown OrientToTerrainNumericUpDown; - private System.Windows.Forms.TextBox textBox4; - private System.Windows.Forms.Label label13; private System.Windows.Forms.Label label12; private System.Windows.Forms.TextBox ScaleRangeTextBox; - private System.Windows.Forms.TextBox textBox5; - private System.Windows.Forms.Label label14; private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.Label label15; private System.Windows.Forms.TextBox PadTextBox; @@ -727,12 +700,23 @@ private System.Windows.Forms.NumericUpDown ScaleNumericUpDown; private System.Windows.Forms.NumericUpDown AoNumericUpDown; private System.Windows.Forms.Label label4; - private System.Windows.Forms.Label label16; - private System.Windows.Forms.Label label8; - private System.Windows.Forms.Button OptimizeBatchButton; + private System.Windows.Forms.ToolTip OptimizeBatchButtonTooltip; + private System.Windows.Forms.TextBox ExtentsMinTextBox; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.TextBox ExtentsMaxTextBox; + private System.Windows.Forms.Label label13; + private System.Windows.Forms.Button GrassDeleteButton; + private System.Windows.Forms.Button GrassAddToProjectButton; + private System.Windows.Forms.Label HashLabel; + private System.Windows.Forms.TextBox ArchetypeNameTextBox; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.TextBox PositionTextBox; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Button GrassGoToButton; private System.Windows.Forms.Label label17; private System.Windows.Forms.NumericUpDown OptmizationThresholdNumericUpDown; - private System.Windows.Forms.Label label18; - private System.Windows.Forms.ToolTip OptimizeBatchButtonTooltip; + private System.Windows.Forms.Button OptimizeBatchButton; + private System.Windows.Forms.CheckBox BrushModeCheckBox; + private System.Windows.Forms.Label label8; } } \ No newline at end of file diff --git a/Project/Panels/EditYmapGrassPanel.cs b/Project/Panels/EditYmapGrassPanel.cs index 761475f..dedd9d1 100644 --- a/Project/Panels/EditYmapGrassPanel.cs +++ b/Project/Panels/EditYmapGrassPanel.cs @@ -1,21 +1,24 @@ using System; using System.Collections.Generic; -using System.Linq; using System.Windows.Forms; using CodeWalker.GameFiles; -using CodeWalker.Utils; using CodeWalker.World; using SharpDX; -// THINGS TODO -// - COMPLETED -- Better gizmo for grass brush (like a circle with a little line in the middle sticking upwards) +// TODO +// - COMPLETED -- Optimization feature. // - COMPLETED -- Remove grass instances using CTRL + SHIFT + LMB +// - Better gizmo for grass brush (like a circle with a little line in the middle sticking upwards) // - Maybe some kind of auto coloring system? I've noticed that mostly all grass in GTA inherits it's color from the surface it's on. // - Grass area fill (generate grass on ydr based on colision materials?) +// - Need to have a way to erase instances from other batches in the current batches ymap. +// if we optimize our instances, we'd have to go through each batch to erase, this is very monotonous. -// As far as everything else goes, the brush works just fine. No issues so far besides the UpdateGraphics() method. (causes flicker sometimes) - +// BUG +// - I've added a "zoom" kind of feature when hitting the goto button, but when the bounds of the +// grass batch are 0, the zoom of the camera is set to 0, which causes the end-user to have to scroll +// out a lot in order to use any movement controls. I will need to clamp that to a minimum value. namespace CodeWalker.Project.Panels { @@ -64,6 +67,9 @@ namespace CodeWalker.Project.Panels OrientToTerrainNumericUpDown.Value = (decimal)CurrentBatch.Batch.OrientToTerrain; OptmizationThresholdNumericUpDown.Value = 15; BrushModeCheckBox.Checked = CurrentBatch.BrushEnabled; + RadiusNumericUpDown.Value = (decimal)CurrentBatch.BrushRadius; + ExtentsMinTextBox.Text = FloatUtil.GetVector3String(CurrentBatch.AABBMin); + ExtentsMaxTextBox.Text = FloatUtil.GetVector3String(CurrentBatch.AABBMax); } private void UpdateFormTitle() @@ -111,6 +117,12 @@ namespace CodeWalker.Project.Panels if (CurrentBatch == null) return; CurrentBatch.BrushEnabled = BrushModeCheckBox.Checked; } + + private void RadiusNumericUpDown_ValueChanged(object sender, EventArgs e) + { + if (CurrentBatch == null) return; + CurrentBatch.BrushRadius = (float)RadiusNumericUpDown.Value; + } #endregion #region Batch Settings @@ -273,15 +285,6 @@ namespace CodeWalker.Project.Panels private SpaceRayIntersectResult SpawnRayFunc(Vector3 spawnPos) { var res = ProjectForm.WorldForm.Raycast(new Ray(spawnPos, -Vector3.UnitZ)); - - //if (res.HitBounds != null) // shouldn't happen but just in case.. - //{ - // var mat = BoundsMaterialTypes.GetMaterial(res.HitBounds.MaterialIndex); - // if (mat.Name != "DEFAULT") - // { - // var c = mat.Colour; - // } - //} return res; } diff --git a/Project/ProjectForm.cs b/Project/ProjectForm.cs index 9a28851..3a9b906 100644 --- a/Project/ProjectForm.cs +++ b/Project/ProjectForm.cs @@ -704,6 +704,25 @@ namespace CodeWalker.Project //######## Public methods + // Possibly future proofing for procedural prop instances + public bool CanPaintInstances() + { + if (CurrentGrassBatch != null) + { + if (CurrentGrassBatch.BrushEnabled) + return true; + } + + return false; + } + public float GetInstanceBrushRadius() + { + if (CurrentGrassBatch != null) + return CurrentGrassBatch.BrushRadius; + + return 0f; + } + public void NewProject() { if (CurrentProjectFile != null) diff --git a/Rendering/Renderer.cs b/Rendering/Renderer.cs index 3119b56..e499331 100644 --- a/Rendering/Renderer.cs +++ b/Rendering/Renderer.cs @@ -684,6 +684,33 @@ namespace CodeWalker.Rendering } + public void RenderBrushRadiusOutline(Vector3 position, Vector3 dir, Vector3 up, float radius, uint col) + { + const int Reso = 36; + const float MaxDeg = 360f; + const float DegToRad = 0.0174533f; + const float Ang = MaxDeg / Reso; + + var axis = Vector3.Cross(dir, up); + var c = new VertexTypePC[Reso]; + + for (var i = 0; i < Reso; i++) + { + var rDir = Quaternion.RotationAxis(dir, (i * Ang) * DegToRad).Multiply(axis); + c[i].Position = position + (rDir * radius); + c[i].Colour = col; + } + + for (var i = 0; i < c.Length; i++) + { + SelectionLineVerts.Add(c[i]); + SelectionLineVerts.Add(c[(i + 1) % c.Length]); + } + + SelectionLineVerts.Add(new VertexTypePC{Colour = col, Position = position}); + SelectionLineVerts.Add(new VertexTypePC { Colour = col, Position = position + dir * 2f}); + } + public void RenderSelectionArrowOutline(Vector3 pos, Vector3 dir, Vector3 up, Quaternion ori, float len, float rad, uint colour) { Vector3 ax = Vector3.Cross(dir, up); diff --git a/WorldForm.cs b/WorldForm.cs index abb7125..d032479 100644 --- a/WorldForm.cs +++ b/WorldForm.cs @@ -78,6 +78,7 @@ namespace CodeWalker int ControlBrushTimer = 0; bool ControlBrushEnabled; + float ControlBrushRadius; Entity camEntity = new Entity(); PedEntity pedEntity = new PedEntity(); @@ -1256,7 +1257,7 @@ namespace CodeWalker if (MouseRayCollision.Hit) { var arup = GetPerpVec(MouseRayCollision.Normal); - Renderer.RenderSelectionArrowOutline(MouseRayCollision.Position, MouseRayCollision.Normal, arup, Quaternion.Identity, 2.0f, 0.15f, cgrn); + Renderer.RenderBrushRadiusOutline(MouseRayCollision.Position, MouseRayCollision.Normal, arup, ProjectForm.GetInstanceBrushRadius(), cgrn); } } @@ -2116,9 +2117,8 @@ namespace CodeWalker //reset variables for beginning the mouse hit test CurMouseHit.Clear(); - - //MouseRayCollisionEnabled = Input.CtrlPressed; //temporary...! - if (Input.CtrlPressed) + // Get whether or not we can brush from the project form. + if (Input.CtrlPressed && ProjectForm != null && ProjectForm.CanPaintInstances()) { ControlBrushEnabled = true; MouseRayCollisionEnabled = true; @@ -2140,6 +2140,7 @@ namespace CodeWalker } + public SpaceRayIntersectResult GetSpaceMouseRay() { SpaceRayIntersectResult ret = new SpaceRayIntersectResult(); @@ -4352,7 +4353,8 @@ namespace CodeWalker public void GoToPosition(Vector3 p, Vector3 bound) { camera.FollowEntity.Position = p; - camera.TargetDistance = bound.Length(); + var bl = bound.Length(); + camera.TargetDistance = bl > 1f ? bl : 1f; } private MapMarker AddMarker(Vector3 pos, string name, bool addtotxtbox = false) From af930fa4ec8c43acf7179504fa70656f132ae783 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20N=27gadi?= Date: Thu, 26 Jul 2018 22:16:54 +0200 Subject: [PATCH 15/24] YtypFile - Add AddArchetype, RemoveArchetype and Save --- .../GameFiles/FileTypes/YtypFile.cs | 114 ++++++++++++++++++ .../GameFiles/MetaTypes/Archetype.cs | 4 + 2 files changed, 118 insertions(+) diff --git a/CodeWalker.Core/GameFiles/FileTypes/YtypFile.cs b/CodeWalker.Core/GameFiles/FileTypes/YtypFile.cs index f9d548e..08a312c 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/YtypFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/YtypFile.cs @@ -241,7 +241,121 @@ namespace CodeWalker.GameFiles } + public void AddArchetype(Archetype arch) + { + List allArchs = new List(); + if (AllArchetypes != null) + allArchs.AddRange(AllArchetypes); + + allArchs.Add(arch); + + AllArchetypes = allArchs.ToArray(); + } + + public void RemoveArchetype(Archetype arch) + { + List allArchs = new List(); + + if (AllArchetypes != null) + allArchs.AddRange(AllArchetypes); + + if (allArchs.Contains(arch)) + allArchs.Remove(arch); + + AllArchetypes = allArchs.ToArray(); + } + + public byte[] Save() + { + MetaBuilder mb = new MetaBuilder(); + + var mdb = mb.EnsureBlock(MetaName.CMapTypes); + + CMapTypes mapTypes = CMapTypes; + + if((AllArchetypes != null) && (AllArchetypes.Length > 0)) + { + MetaPOINTER[] archPtrs = new MetaPOINTER[AllArchetypes.Length]; + + for(int i=0; i 0)) + { + MetaPOINTER[] cetPtrs = new MetaPOINTER[CompositeEntityTypes.Length] ; + + for (int i = 0; i < cetPtrs.Length; i++) + { + var cet = CompositeEntityTypes[i]; + cetPtrs[i] = mb.AddItemPtr(MetaName.CCompositeEntityType, cet); + } + + mapTypes.compositeEntityTypes = mb.AddItemArrayPtr(MetaName.CCompositeEntityType, cetPtrs); + } + + mb.AddItem(MetaName.CMapTypes, mapTypes); + + mb.AddStructureInfo(MetaName.CMapTypes); + mb.AddStructureInfo(MetaName.CBaseArchetypeDef); + mb.AddStructureInfo(MetaName.CMloArchetypeDef); + mb.AddStructureInfo(MetaName.CTimeArchetypeDef); + mb.AddStructureInfo(MetaName.CMloRoomDef); + mb.AddStructureInfo(MetaName.CMloPortalDef); + mb.AddStructureInfo(MetaName.CMloEntitySet); + mb.AddStructureInfo(MetaName.CCompositeEntityType); + + mb.AddEnumInfo((MetaName)1991964615); + mb.AddEnumInfo((MetaName)1294270217); + mb.AddEnumInfo((MetaName)1264241711); + mb.AddEnumInfo((MetaName)648413703); + mb.AddEnumInfo((MetaName)3573596290); + mb.AddEnumInfo((MetaName)700327466); + mb.AddEnumInfo((MetaName)193194928); + mb.AddEnumInfo((MetaName)2266515059); + + Meta = mb.GetMeta(); + + byte[] data = ResourceBuilder.Build(Meta, 2); //ymap is version 2... + + return data; + + } } diff --git a/CodeWalker.Core/GameFiles/MetaTypes/Archetype.cs b/CodeWalker.Core/GameFiles/MetaTypes/Archetype.cs index d048d17..f9392c7 100644 --- a/CodeWalker.Core/GameFiles/MetaTypes/Archetype.cs +++ b/CodeWalker.Core/GameFiles/MetaTypes/Archetype.cs @@ -128,6 +128,9 @@ namespace CodeWalker.GameFiles { public override MetaName Type => MetaName.CMloArchetypeDef; + public CMloArchetypeDef _BaseMloArchetypeDef; + public CMloArchetypeDef BaseMloArchetypeDef { get { return _BaseMloArchetypeDef; } set { _BaseMloArchetypeDef = value; } } + public CMloArchetypeDefData _MloArchetypeDef; public CMloArchetypeDefData MloArchetypeDef { get { return _MloArchetypeDef; } set { _MloArchetypeDef = value; } } @@ -141,6 +144,7 @@ namespace CodeWalker.GameFiles { Ytyp = ytyp; InitVars(ref arch._BaseArchetypeDef); + BaseMloArchetypeDef = arch; MloArchetypeDef = arch.MloArchetypeDef; } From f27672d6ad4e5aab5dc60dfde4365b6524ca9ee2 Mon Sep 17 00:00:00 2001 From: Carmine Date: Sat, 11 Aug 2018 17:58:52 +0200 Subject: [PATCH 16/24] Added checkbox to disable rendering of drawables --- Rendering/Renderer.cs | 59 +++++++++++++++++++++++-------------------- WorldForm.Designer.cs | 26 +++++++++++++++---- WorldForm.cs | 5 ++++ 3 files changed, 57 insertions(+), 33 deletions(-) diff --git a/Rendering/Renderer.cs b/Rendering/Renderer.cs index aa74391..31e957f 100644 --- a/Rendering/Renderer.cs +++ b/Rendering/Renderer.cs @@ -98,7 +98,7 @@ namespace CodeWalker.Rendering public bool renderinteriors = true; public bool renderproxies = false; public bool renderchildents = false;//when rendering single ymap, render root only or not... - + public bool renderentities = true; public bool rendergrass = true; public bool renderdistlodlights = true; @@ -1537,41 +1537,44 @@ namespace CodeWalker.Rendering //if an entity is not fully loaded, set a flag for its parent, then traverse to root //until found an entity that is fully loaded. //on a second loop, build a final render list based on the flags. - - for (int i = 0; i < renderworldentities.Count; i++) + if(renderentities) { - var ent = renderworldentities[i]; - var arch = ent.Archetype; - var pent = ent.Parent; - var drawable = gameFileCache.TryGetDrawable(arch); - Renderable rndbl = TryGetRenderable(arch, drawable); - if ((rndbl != null) && rndbl.IsLoaded && (rndbl.AllTexturesLoaded || !waitforchildrentoload)) + + for (int i = 0; i < renderworldentities.Count; i++) { - RenderableEntity rent = new RenderableEntity(); - rent.Entity = ent; - rent.Renderable = rndbl; - renderworldrenderables.Add(rent); - } - else if (waitforchildrentoload) - { - //todo: render parent if children loading....... + var ent = renderworldentities[i]; + var arch = ent.Archetype; + var pent = ent.Parent; + var drawable = gameFileCache.TryGetDrawable(arch); + Renderable rndbl = TryGetRenderable(arch, drawable); + if ((rndbl != null) && rndbl.IsLoaded && (rndbl.AllTexturesLoaded || !waitforchildrentoload)) + { + RenderableEntity rent = new RenderableEntity(); + rent.Entity = ent; + rent.Renderable = rndbl; + renderworldrenderables.Add(rent); + } + else if (waitforchildrentoload) + { + //todo: render parent if children loading....... + } + + if (ent.IsMlo && rendercollisionmeshes && renderinteriors) + { + RenderInteriorCollisionMesh(ent); + } } - if (ent.IsMlo && rendercollisionmeshes && renderinteriors) + for (int i = 0; i < renderworldrenderables.Count; i++) { - RenderInteriorCollisionMesh(ent); + var rent = renderworldrenderables[i]; + var ent = rent.Entity; + var arch = ent.Archetype; + + RenderArchetype(arch, ent, rent.Renderable, false); } } - for (int i = 0; i < renderworldrenderables.Count; i++) - { - var rent = renderworldrenderables[i]; - var ent = rent.Entity; - var arch = ent.Archetype; - - RenderArchetype(arch, ent, rent.Renderable, false); - } - if (rendergrass) diff --git a/WorldForm.Designer.cs b/WorldForm.Designer.cs index f50fd73..11532c9 100644 --- a/WorldForm.Designer.cs +++ b/WorldForm.Designer.cs @@ -109,6 +109,7 @@ namespace CodeWalker this.tabPage4 = new System.Windows.Forms.TabPage(); this.OptionsTabControl = new System.Windows.Forms.TabControl(); this.tabPage8 = new System.Windows.Forms.TabPage(); + 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(); @@ -1295,6 +1296,7 @@ namespace CodeWalker // // tabPage8 // + this.tabPage8.Controls.Add(this.RenderEntitiesCheckBox); this.tabPage8.Controls.Add(this.AdvancedSettingsButton); this.tabPage8.Controls.Add(this.ControlSettingsButton); this.tabPage8.Controls.Add(this.MapViewDetailLabel); @@ -1327,6 +1329,19 @@ namespace CodeWalker this.tabPage8.Text = "General"; this.tabPage8.UseVisualStyleBackColor = true; // + // EntitiesCheckBox + // + this.RenderEntitiesCheckBox.AutoSize = true; + this.RenderEntitiesCheckBox.Checked = true; + this.RenderEntitiesCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; + this.RenderEntitiesCheckBox.Location = new System.Drawing.Point(10, 32); + this.RenderEntitiesCheckBox.Name = "EntitiesCheckBox"; + this.RenderEntitiesCheckBox.Size = new System.Drawing.Size(89, 17); + this.RenderEntitiesCheckBox.TabIndex = 67; + 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); @@ -1411,7 +1426,7 @@ namespace CodeWalker this.WaterQuadsCheckBox.AutoSize = true; this.WaterQuadsCheckBox.Checked = true; this.WaterQuadsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.WaterQuadsCheckBox.Location = new System.Drawing.Point(10, 104); + this.WaterQuadsCheckBox.Location = new System.Drawing.Point(10, 129); this.WaterQuadsCheckBox.Name = "WaterQuadsCheckBox"; this.WaterQuadsCheckBox.Size = new System.Drawing.Size(114, 17); this.WaterQuadsCheckBox.TabIndex = 39; @@ -1440,7 +1455,7 @@ namespace CodeWalker // TimedEntitiesAlwaysOnCheckBox // this.TimedEntitiesAlwaysOnCheckBox.AutoSize = true; - this.TimedEntitiesAlwaysOnCheckBox.Location = new System.Drawing.Point(131, 58); + this.TimedEntitiesAlwaysOnCheckBox.Location = new System.Drawing.Point(131, 83); this.TimedEntitiesAlwaysOnCheckBox.Name = "TimedEntitiesAlwaysOnCheckBox"; this.TimedEntitiesAlwaysOnCheckBox.Size = new System.Drawing.Size(58, 17); this.TimedEntitiesAlwaysOnCheckBox.TabIndex = 37; @@ -1453,7 +1468,7 @@ namespace CodeWalker this.GrassCheckBox.AutoSize = true; this.GrassCheckBox.Checked = true; this.GrassCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.GrassCheckBox.Location = new System.Drawing.Point(10, 35); + this.GrassCheckBox.Location = new System.Drawing.Point(10, 57); this.GrassCheckBox.Name = "GrassCheckBox"; this.GrassCheckBox.Size = new System.Drawing.Size(81, 17); this.GrassCheckBox.TabIndex = 35; @@ -1466,7 +1481,7 @@ namespace CodeWalker this.InteriorsCheckBox.AutoSize = true; this.InteriorsCheckBox.Checked = true; this.InteriorsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.InteriorsCheckBox.Location = new System.Drawing.Point(10, 81); + this.InteriorsCheckBox.Location = new System.Drawing.Point(10, 106); this.InteriorsCheckBox.Name = "InteriorsCheckBox"; this.InteriorsCheckBox.Size = new System.Drawing.Size(92, 17); this.InteriorsCheckBox.TabIndex = 38; @@ -1586,7 +1601,7 @@ namespace CodeWalker this.TimedEntitiesCheckBox.AutoSize = true; this.TimedEntitiesCheckBox.Checked = true; this.TimedEntitiesCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.TimedEntitiesCheckBox.Location = new System.Drawing.Point(10, 58); + this.TimedEntitiesCheckBox.Location = new System.Drawing.Point(10, 83); this.TimedEntitiesCheckBox.Name = "TimedEntitiesCheckBox"; this.TimedEntitiesCheckBox.Size = new System.Drawing.Size(117, 17); this.TimedEntitiesCheckBox.TabIndex = 36; @@ -3581,5 +3596,6 @@ namespace CodeWalker private System.Windows.Forms.ToolStripMenuItem ToolbarSnapToGroundGridButton; private System.Windows.Forms.NumericUpDown SnapGridSizeUpDown; private System.Windows.Forms.Label label26; + private System.Windows.Forms.CheckBox RenderEntitiesCheckBox; } } \ No newline at end of file diff --git a/WorldForm.cs b/WorldForm.cs index c39cf6f..f1ccbe8 100644 --- a/WorldForm.cs +++ b/WorldForm.cs @@ -7553,6 +7553,11 @@ namespace CodeWalker { SnapGridSize = (float)SnapGridSizeUpDown.Value; } + + private void RenderEntitiesCheckBox_CheckedChanged(object sender, EventArgs e) + { + Renderer.renderentities = RenderEntitiesCheckBox.Checked; + } } From 8caee271f7cfb87652a64b137cf9086d408e4a83 Mon Sep 17 00:00:00 2001 From: Carmine Date: Sat, 11 Aug 2018 18:13:52 +0200 Subject: [PATCH 17/24] Renamed some fields in Bone --- .../GameFiles/Resources/Drawable.cs | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/CodeWalker.Core/GameFiles/Resources/Drawable.cs b/CodeWalker.Core/GameFiles/Resources/Drawable.cs index f229e0b..bc74416 100644 --- a/CodeWalker.Core/GameFiles/Resources/Drawable.cs +++ b/CodeWalker.Core/GameFiles/Resources/Drawable.cs @@ -718,16 +718,16 @@ namespace CodeWalker.GameFiles //public float TranslationX { get; set; } //public float TranslationY { get; set; } //public float TranslationZ { get; set; } - public uint Unknown_1Ch { get; set; } // 0x00000000 - public float Unknown_20h { get; set; } // 1.0 - public float Unknown_24h { get; set; } // 1.0 - public float Unknown_28h { get; set; } // 1.0 - public float Unknown_2Ch { get; set; } // 1.0 - public ushort Unknown_30h { get; set; } //limb end index? IK chain? + public uint Unknown_1Ch { get; set; } // 0x00000000 RHW? + public float ScaleX { get; set; } // 1.0 + public float ScaleY { get; set; } // 1.0 + public float ScaleZ { get; set; } // 1.0 + public float Unknown_2Ch { get; set; } // 1.0 RHW? + public ushort NextSiblingIndex { get; set; } //limb end index? IK chain? public short ParentIndex { get; set; } public uint Unknown_34h { get; set; } // 0x00000000 public ulong NamePointer { get; set; } - public ushort Unknown_40h { get; set; } + public ushort Flags { get; set; } public ushort Unknown_42h { get; set; } public ushort Id { get; set; } public ushort Unknown_46h { get; set; } @@ -756,15 +756,15 @@ namespace CodeWalker.GameFiles //this.TranslationY = reader.ReadSingle(); //this.TranslationZ = reader.ReadSingle(); this.Unknown_1Ch = reader.ReadUInt32(); - this.Unknown_20h = reader.ReadSingle(); - this.Unknown_24h = reader.ReadSingle(); - this.Unknown_28h = reader.ReadSingle(); + this.ScaleX = reader.ReadSingle(); + this.ScaleY = reader.ReadSingle(); + this.ScaleZ = reader.ReadSingle(); this.Unknown_2Ch = reader.ReadSingle(); - this.Unknown_30h = reader.ReadUInt16(); + this.NextSiblingIndex = reader.ReadUInt16(); this.ParentIndex = reader.ReadInt16(); this.Unknown_34h = reader.ReadUInt32(); this.NamePointer = reader.ReadUInt64(); - this.Unknown_40h = reader.ReadUInt16(); + this.Flags = reader.ReadUInt16(); this.Unknown_42h = reader.ReadUInt16(); this.Id = reader.ReadUInt16(); this.Unknown_46h = reader.ReadUInt16(); @@ -796,15 +796,15 @@ namespace CodeWalker.GameFiles //writer.Write(this.TranslationY); //writer.Write(this.TranslationZ); writer.Write(this.Unknown_1Ch); - writer.Write(this.Unknown_20h); - writer.Write(this.Unknown_24h); - writer.Write(this.Unknown_28h); + writer.Write(this.ScaleX); + writer.Write(this.ScaleY); + writer.Write(this.ScaleZ); writer.Write(this.Unknown_2Ch); - writer.Write(this.Unknown_30h); + writer.Write(this.NextSiblingIndex); writer.Write(this.ParentIndex); writer.Write(this.Unknown_34h); writer.Write(this.NamePointer); - writer.Write(this.Unknown_40h); + writer.Write(this.Flags); writer.Write(this.Unknown_42h); writer.Write(this.Id); writer.Write(this.Unknown_46h); From 1b94cd4f047c021f1b8b41f5b7df3b51c404e7da Mon Sep 17 00:00:00 2001 From: Carmine Date: Sat, 11 Aug 2018 18:15:23 +0200 Subject: [PATCH 18/24] Renamed Min and Max limits in JointRotationLimit_s --- CodeWalker.Core/GameFiles/Resources/Drawable.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CodeWalker.Core/GameFiles/Resources/Drawable.cs b/CodeWalker.Core/GameFiles/Resources/Drawable.cs index bc74416..d9c7c7a 100644 --- a/CodeWalker.Core/GameFiles/Resources/Drawable.cs +++ b/CodeWalker.Core/GameFiles/Resources/Drawable.cs @@ -968,12 +968,12 @@ namespace CodeWalker.GameFiles public float Unknown_50h { get; set; } // -pi public float Unknown_54h { get; set; } // pi public float Unknown_58h { get; set; } // 1.0 - public float Unknown_5Ch { get; set; } - public float Unknown_60h { get; set; } - public float Unknown_64h { get; set; } - public float Unknown_68h { get; set; } - public float Unknown_6Ch { get; set; } - public float Unknown_70h { get; set; } + public float MinX { get; set; } + public float MinY { get; set; } + public float MinZ { get; set; } + public float MaxX { get; set; } + public float MaxY { get; set; } + public float MaxZ { get; set; } public float Unknown_74h { get; set; } // pi public float Unknown_78h { get; set; } // -pi public float Unknown_7Ch { get; set; } // pi From aec2426d7b21fae8e2067c14a4a1badca63da6fb Mon Sep 17 00:00:00 2001 From: Carmine Date: Sun, 12 Aug 2018 18:04:34 +0200 Subject: [PATCH 19/24] Moved renderentities check --- Rendering/Renderer.cs | 48 +++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/Rendering/Renderer.cs b/Rendering/Renderer.cs index 31e957f..7abd0cb 100644 --- a/Rendering/Renderer.cs +++ b/Rendering/Renderer.cs @@ -1537,34 +1537,34 @@ namespace CodeWalker.Rendering //if an entity is not fully loaded, set a flag for its parent, then traverse to root //until found an entity that is fully loaded. //on a second loop, build a final render list based on the flags. - if(renderentities) + + for (int i = 0; i < renderworldentities.Count; i++) { - - for (int i = 0; i < renderworldentities.Count; i++) + var ent = renderworldentities[i]; + var arch = ent.Archetype; + var pent = ent.Parent; + var drawable = gameFileCache.TryGetDrawable(arch); + Renderable rndbl = TryGetRenderable(arch, drawable); + if ((rndbl != null) && rndbl.IsLoaded && (rndbl.AllTexturesLoaded || !waitforchildrentoload)) { - var ent = renderworldentities[i]; - var arch = ent.Archetype; - var pent = ent.Parent; - var drawable = gameFileCache.TryGetDrawable(arch); - Renderable rndbl = TryGetRenderable(arch, drawable); - if ((rndbl != null) && rndbl.IsLoaded && (rndbl.AllTexturesLoaded || !waitforchildrentoload)) - { - RenderableEntity rent = new RenderableEntity(); - rent.Entity = ent; - rent.Renderable = rndbl; - renderworldrenderables.Add(rent); - } - else if (waitforchildrentoload) - { - //todo: render parent if children loading....... - } - - if (ent.IsMlo && rendercollisionmeshes && renderinteriors) - { - RenderInteriorCollisionMesh(ent); - } + RenderableEntity rent = new RenderableEntity(); + rent.Entity = ent; + rent.Renderable = rndbl; + renderworldrenderables.Add(rent); + } + else if (waitforchildrentoload) + { + //todo: render parent if children loading....... } + if (ent.IsMlo && rendercollisionmeshes && renderinteriors) + { + RenderInteriorCollisionMesh(ent); + } + } + + if(renderentities) + { for (int i = 0; i < renderworldrenderables.Count; i++) { var rent = renderworldrenderables[i]; From b3069321e1c8e4506ae02a03651fa7216ef1c532 Mon Sep 17 00:00:00 2001 From: Carmine Date: Tue, 14 Aug 2018 12:15:52 +0200 Subject: [PATCH 20/24] Replaced floats with Vector3 for JointRotationLimit_s Min and Max --- CodeWalker.Core/GameFiles/Resources/Drawable.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/CodeWalker.Core/GameFiles/Resources/Drawable.cs b/CodeWalker.Core/GameFiles/Resources/Drawable.cs index d9c7c7a..72acf0b 100644 --- a/CodeWalker.Core/GameFiles/Resources/Drawable.cs +++ b/CodeWalker.Core/GameFiles/Resources/Drawable.cs @@ -968,12 +968,8 @@ namespace CodeWalker.GameFiles public float Unknown_50h { get; set; } // -pi public float Unknown_54h { get; set; } // pi public float Unknown_58h { get; set; } // 1.0 - public float MinX { get; set; } - public float MinY { get; set; } - public float MinZ { get; set; } - public float MaxX { get; set; } - public float MaxY { get; set; } - public float MaxZ { get; set; } + public Vector3 Min { get; set; } + public Vector3 Max { get; set; } public float Unknown_74h { get; set; } // pi public float Unknown_78h { get; set; } // -pi public float Unknown_7Ch { get; set; } // pi From 13449c81d1d3f9f03030a2ac69066bc871ca7949 Mon Sep 17 00:00:00 2001 From: dexyfex Date: Mon, 3 Dec 2018 19:39:42 +1100 Subject: [PATCH 21/24] GenerateNavMeshPanel WIP --- .../Panels/EditYmapEntityPanel.Designer.cs | 30 ++--- Project/Panels/GenerateNavMeshPanel.cs | 122 +++++++++++++++--- 2 files changed, 116 insertions(+), 36 deletions(-) diff --git a/Project/Panels/EditYmapEntityPanel.Designer.cs b/Project/Panels/EditYmapEntityPanel.Designer.cs index f33c0e7..d12ebea 100644 --- a/Project/Panels/EditYmapEntityPanel.Designer.cs +++ b/Project/Panels/EditYmapEntityPanel.Designer.cs @@ -71,6 +71,7 @@ this.EntityNumChildrenTextBox = new System.Windows.Forms.TextBox(); this.label25 = new System.Windows.Forms.Label(); this.EntityExtensionsTabPage = new System.Windows.Forms.TabPage(); + this.label1 = new System.Windows.Forms.Label(); this.EntityPivotTabPage = new System.Windows.Forms.TabPage(); this.label95 = new System.Windows.Forms.Label(); this.EntityPivotEditCheckBox = new System.Windows.Forms.CheckBox(); @@ -79,7 +80,6 @@ this.EntityPivotRotationNormalizeButton = new System.Windows.Forms.Button(); this.label94 = new System.Windows.Forms.Label(); this.EntityPivotRotationTextBox = new System.Windows.Forms.TextBox(); - this.label1 = new System.Windows.Forms.Label(); this.EntityTabControl.SuspendLayout(); this.EntityGeneralTabPage.SuspendLayout(); this.EntityLodTabPage.SuspendLayout(); @@ -153,12 +153,12 @@ this.EntityFlagsCheckedListBox.CheckOnClick = true; this.EntityFlagsCheckedListBox.FormattingEnabled = true; this.EntityFlagsCheckedListBox.Items.AddRange(new object[] { - "1 - Unk01", + "1 - Allow full rotation", "2 - Unk02", "4 - Unk03", "8 - Unk04", "16 - Unk05", - "32 - Unk06", + "32 - Static entity", "64 - Unk07", "128 - Unk08", "256 - Unk09", @@ -178,11 +178,11 @@ "4194304 - Unk23", "8388608 - Unk24", "16777216 - Unk25", - "33554432 - Unk26", + "33554432 - Interior proxy", "67108864 - Unk27", - "134217728 - Unk28", + "134217728 - Reflection proxy", "268435456 - Unk29", - "536870912 - Unk30", + "536870912 - Mirror proxy", "1073741824 - Unk31", "2147483648 - Unk32"}); this.EntityFlagsCheckedListBox.Location = new System.Drawing.Point(348, 113); @@ -575,6 +575,15 @@ this.EntityExtensionsTabPage.Text = "Extensions"; this.EntityExtensionsTabPage.UseVisualStyleBackColor = true; // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(27, 27); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(157, 13); + this.label1.TabIndex = 0; + this.label1.Text = "Entity extensions editing TODO!"; + // // EntityPivotTabPage // this.EntityPivotTabPage.Controls.Add(this.label95); @@ -660,15 +669,6 @@ this.EntityPivotRotationTextBox.TabIndex = 25; this.EntityPivotRotationTextBox.TextChanged += new System.EventHandler(this.EntityPivotRotationTextBox_TextChanged); // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(27, 27); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(157, 13); - this.label1.TabIndex = 0; - this.label1.Text = "Entity extensions editing TODO!"; - // // EditYmapEntityPanel // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); diff --git a/Project/Panels/GenerateNavMeshPanel.cs b/Project/Panels/GenerateNavMeshPanel.cs index b140713..2745394 100644 --- a/Project/Panels/GenerateNavMeshPanel.cs +++ b/Project/Panels/GenerateNavMeshPanel.cs @@ -325,7 +325,8 @@ namespace CodeWalker.Project.Panels private List CornersB = new List(); private List CornersT = new List(); - + private List VerticesB = new List(); + private List VerticesT = new List(); public void BeginGrid(int vertexCountX, int vertexCountY) { @@ -529,6 +530,7 @@ namespace CodeWalker.Project.Panels + { //if (dnx > 0) //can move along +X //{ // AssignVertices(ref vplane, plthresh, i, dnx, dny, dpy, 2, poly); @@ -553,7 +555,7 @@ namespace CodeWalker.Project.Panels //{ // polys.Add(poly); //} - + } @@ -705,15 +707,6 @@ namespace CodeWalker.Project.Panels { int pid = poly.Index; int qi = i; - //int maxdnx = Math.Min(dnx, 40); - //int maxdpy = 50;// dpy;// - //int maxdny = 50;// dny;// - //int cdpy = dpy; - //int cdny = dny; - //int vertexCountP = 0; - //int vertexCountN = 0; - //int lastqx = 0; - //int lastqi = i; CornersB.Clear(); CornersT.Clear(); @@ -745,8 +738,8 @@ namespace CodeWalker.Project.Panels int ony = 0; int ldyb = 0; int ldyt = 0; - int corndxb = 0; - int corndxt = 0; + //int corndxb = 0; + //int corndxt = 0; for (int x = 0; x < 50; x++) { @@ -833,8 +826,8 @@ namespace CodeWalker.Project.Panels int nextsyb = nextyb - ony - dyb; int nextsyt = nextyt + ony - dyt; - corndxb++; - corndxt++; + //corndxb++; + //corndxt++; bool iscornerb = false; @@ -869,7 +862,7 @@ namespace CodeWalker.Project.Panels if (nextsyb > syb) nextsyb = syb; } - + if (iscornerb) { } @@ -891,6 +884,93 @@ namespace CodeWalker.Project.Panels } + private void AssignVertices3(ref Plane vpl, float plt, int i, int dir, GenPoly poly) + { + int pid = poly.Index; + int qi = i; + CornersB.Clear(); + CornersT.Clear(); + VerticesB.Clear(); + VerticesT.Clear(); + + + int dirpy, dirny, dirpx; + switch (dir) //lookup perpendicular directions + { + default: + case 0: dirpy = 3; dirny = 1; dirpx = 2; break; + case 1: dirpy = 0; dirny = 2; dirpx = 3; break; + case 2: dirpy = 1; dirny = 3; dirpx = 0; break; + case 3: dirpy = 2; dirny = 0; dirpx = 1; break; + } + + int ti = i; + while (CanPolyIncludeNext(ref vpl, plt, ti, dirpx, out ti)) + { + qi = ti; //make sure to start at the leftmost point... + } + + + //find the bottom and top leftmost points to start the first col, and fill the col + int qib = qi; + int qit = qi; + int dyb = 0; + int dyt = 0; + while (CanPolyIncludeNext(ref vpl, plt, qib, dirpy, out ti)) + { + Vertices[ti].PolyID = pid; + qib = ti; + dyb++; + } + while (CanPolyIncludeNext(ref vpl, plt, qit, dirny, out ti)) + { + Vertices[ti].PolyID = pid; + qit = ti; + dyt++; + } + int dy = dyb + dyt; //total distance between bottom and top + + CornersB.Add(qib); + CornersT.Add(qit); + + + + //find bottom and top slopes + float slopeb = FindSlope(ref vpl, plt, qib, dir, dirpy, dirny, dyb > 0 ? dyb : 100); + float slopet = FindSlope(ref vpl, plt, qit, dir, dirny, dirpy, dyt > 0 ? dyt : 100); + int syob = MaxOffsetFromSlope(slopeb); + int syot = MaxOffsetFromSlope(slopet); + + //find the next bottom and top indexes, step by the max offset + int nqib = qib; + int nqit = qit; + int ndyb = 0; + int ndyt = 0; + + + + + } + + + + private int FindNextID(ref Plane vpl, float plt, int i, int dirnx, int dirny, int dirpy, float slope, out int dx, out int dy) + { + //find the next vertex along the slope in the given direction + + int ti = i; + int qi = i; + + bool cgx = CanPolyIncludeNext(ref vpl, plt, i, dirnx, out ti); + + + + + dx = 0; + dy = 0; + return i; + } + private int MaxOffsetFromSlope(float s) { @@ -916,6 +996,11 @@ namespace CodeWalker.Project.Panels } private bool CanPolyIncludeNext(ref Plane vplane, float plthresh, int i, int dir, out int ni) { + if ((i < 0) || (i >= Vertices.Length)) + { + ni = -1; + return false; + } bool ct; switch (dir) { @@ -1005,14 +1090,9 @@ namespace CodeWalker.Project.Panels int ti = i; int qi = i; float slope = maxslope; - //int diry = (maxslope > 0) ? dirny : dirpy; - //int incy = (maxslope > 0) ? 1 : -1; - int sy = (int)Math.Abs(slope); - bool cgx = CanPolyIncludeNext(ref vpl, plt, i, dirnx, out ti); - if (cgx && (slope >= 0)) //new slope should be >=0 { int dy0 = FindPolyEdgeDist(ref vpl, plt, qi, dirny); From 462e464c2ff34c04c5aff46448cb78992e037bd0 Mon Sep 17 00:00:00 2001 From: Soloman Date: Mon, 3 Dec 2018 03:54:04 -0500 Subject: [PATCH 22/24] Ability to edit YTYP files and MLO Entity Defintions + Revisions to grass brush (#33) * - Add ability to edit/add ytyp files to project. - Add ability to edit/add ytyp archetype files to ytyp. - Add ability to add/remove entities from mlo archetype defs. - Add ability to save ytyp files. - Add dialog popup before optimizing grass batches. - Fix grass batches not being selected when chaning selection in project explorer. - Merged with upstream/master. - Squashed last 4 commits for PR cleanliness. * Fixed windows forms reference error. * - Added error checking to deleting mlo entities. - Fixed various bugs with deleting mlo entities. - Fixed edit archetype panel Asset Type box. - Removed redundant/unnecessary. - Removed backwards references between MCEntityDef and YmapEntityDef. All ymap entity to mcentity references are grabbed using indecies in the MloInstanceData class. - Fixed "YmapMenu" not showing when selecting entities/mlo entities in project form. Current bugs: - Loading a ytyp file -- mlo entities are not editiable, and are created in the world. - entitysets are not editable (properly). - Removing an mloinstancedef from a ymap does not delete the mlo instance's gizmo from the world, and it's still selectable. (Although all references are lost, and I believe collected by the GC?) * - Moved archetype initialization methods YmapFile.InitYmapEntityArchetypes(GameFileCache gfc) and MloInstanceData.InitYmapEntityArchetypes(GameFileCache gfc) - Added ability to load mlo instance defs through ymap files. - Fixed add method for mlo archetypes. * - Removed SetOrientationInv. - Removed unreachable code + updated comment. - Renamed CreateEntity to CreateYmapEntity, and renamed params for consistency. * Split calls to CreateYmapEntity() and MloArchetype.AddEntity(). * Fixed redundant rotation inversions. * - Added ability to select rooms. - Changed tree view grouping for mlo entities. - Fixed projectexplorer selection bugs. - Added ability to toggle mlo entity sets. - Fixed some change events when editing archetypes. --- .../GameFiles/FileTypes/YmapFile.cs | 174 +++-- .../GameFiles/FileTypes/YtypFile.cs | 247 +++---- CodeWalker.Core/GameFiles/GameFileCache.cs | 115 +--- .../GameFiles/MetaTypes/Archetype.cs | 426 +++++++++++- .../GameFiles/MetaTypes/MetaTypes.cs | 23 +- CodeWalker.Core/Utils/Vectors.cs | 5 + CodeWalker.csproj | 18 + .../Panels/EditYmapEntityPanel.Designer.cs | 20 +- Project/Panels/EditYmapEntityPanel.cs | 131 +++- Project/Panels/EditYmapGrassPanel.cs | 8 + .../EditYtypArchetypeMloRoomPanel.Designer.cs | 173 +++++ .../Panels/EditYtypArchetypeMloRoomPanel.cs | 137 ++++ .../Panels/EditYtypArchetypeMloRoomPanel.resx | 409 ++++++++++++ .../Panels/EditYtypArchetypePanel.Designer.cs | 632 ++++++++++++++++++ Project/Panels/EditYtypArchetypePanel.cs | 353 ++++++++++ Project/Panels/EditYtypArchetypePanel.resx | 140 ++++ Project/Panels/EditYtypPanel.Designer.cs | 16 +- Project/Panels/ProjectExplorerPanel.cs | 220 +++++- Project/ProjectFile.cs | 3 +- Project/ProjectForm.Designer.cs | 37 +- Project/ProjectForm.cs | 593 ++++++++++++++-- Project/ProjectFormOLD.cs | 6 +- Rendering/Renderer.cs | 59 +- Utils/MapUtils.cs | 18 +- WorldForm.cs | 62 +- 25 files changed, 3559 insertions(+), 466 deletions(-) create mode 100644 Project/Panels/EditYtypArchetypeMloRoomPanel.Designer.cs create mode 100644 Project/Panels/EditYtypArchetypeMloRoomPanel.cs create mode 100644 Project/Panels/EditYtypArchetypeMloRoomPanel.resx create mode 100644 Project/Panels/EditYtypArchetypePanel.Designer.cs create mode 100644 Project/Panels/EditYtypArchetypePanel.cs create mode 100644 Project/Panels/EditYtypArchetypePanel.resx diff --git a/CodeWalker.Core/GameFiles/FileTypes/YmapFile.cs b/CodeWalker.Core/GameFiles/FileTypes/YmapFile.cs index 839e411..81b440b 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/YmapFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/YmapFile.cs @@ -1165,6 +1165,41 @@ namespace CodeWalker.GameFiles 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) { @@ -1194,7 +1229,7 @@ namespace CodeWalker.GameFiles public bool IsMlo { get; set; } public MloInstanceData MloInstance { get; set; } public YmapEntityDef MloParent { get; set; } - public MCMloEntitySet MloEntitySet { get; set; } + public MloInstanceEntitySet MloEntitySet { get; set; } public Vector3 MloRefPosition { get; set; } public Quaternion MloRefOrientation { get; set; } public MetaWrapper[] Extensions { get; set; } @@ -1297,56 +1332,57 @@ namespace CodeWalker.GameFiles { MloInstance = new MloInstanceData(); } - MloInstance.CreateYmapEntities(this, mloa); + if (mloa != null) + { + if (!IsMlo) + { + IsMlo = true; + MloInstance._Instance = new CMloInstanceDef { CEntityDef = _CEntityDef }; + + List mloEntities = Ymap.MloEntities?.ToList() ?? new List(); + mloEntities.Add(this); + Ymap.MloEntities = mloEntities.ToArray(); + } + + MloInstance.CreateYmapEntities(this, mloa); + } if (BSRadius == 0.0f) { BSRadius = CEntityDef.lodDist;//need something so it doesn't get culled... } } + 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) { - //TODO: SetPosition for interior entities! - Position = pos; - var inst = MloParent.MloInstance; - if (inst != null) - { - //transform world position into mlo space - //MloRefPosition = ... - //MloRefOrientation = ... - } + _CEntityDef.position = Quaternion.Normalize(Quaternion.Invert(MloParent.Orientation)).Multiply(pos - MloParent.Position); + MloRefPosition = _CEntityDef.position; + UpdateBB(); + UpdateMloArchetype(); } else { - Position = pos; _CEntityDef.position = pos; - - if (Archetype != null) - { - BSCenter = Orientation.Multiply(Archetype.BSCenter) * Scale; - } - if ((Archetype != null) && (Orientation == Quaternion.Identity)) - { - BBMin = (Archetype.BBMin * Scale) + Position; - BBMax = (Archetype.BBMax * Scale) + Position; - } - else - { - BBMin = Position - (BSRadius); - BBMax = Position + (BSRadius); - ////not ideal: should transform all 8 corners! - } - - - - UpdateWidgetPosition(); + UpdateBB(); } @@ -1356,40 +1392,51 @@ namespace CodeWalker.GameFiles MloInstance.UpdateEntities(); } + UpdateWidgetPosition(); } - public void SetOrientation(Quaternion ori) + private void UpdateBB() { - Quaternion inv = Quaternion.Normalize(Quaternion.Invert(ori)); - Orientation = ori; - _CEntityDef.rotation = new Vector4(inv.X, inv.Y, inv.Z, inv.W); - - if (MloInstance != null) - { - MloInstance.SetOrientation(ori); - } - - if (Archetype != null) { BSCenter = Orientation.Multiply(Archetype.BSCenter) * Scale; } - - UpdateWidgetPosition(); - UpdateWidgetOrientation(); + if ((Archetype != null) && (Orientation == Quaternion.Identity)) + { + BBMin = (Archetype.BBMin * Scale) + Position; + BBMax = (Archetype.BBMax * Scale) + Position; + } + else + { + BBMin = Position - (BSRadius); + BBMax = Position + (BSRadius); + ////not ideal: should transform all 8 corners! + } } - public void SetOrientationInv(Quaternion inv) + + public void SetOrientation(Quaternion ori, bool inverse = false) { - Quaternion ori = Quaternion.Normalize(Quaternion.Invert(inv)); - Orientation = ori; - _CEntityDef.rotation = new Vector4(inv.X, inv.Y, inv.Z, inv.W); + 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 + { + Quaternion inv = inverse ? ori : Quaternion.Normalize(Quaternion.Invert(ori)); + ori = inverse ? Quaternion.Normalize(Quaternion.Invert(ori)) : ori; + Orientation = ori; + _CEntityDef.rotation = inv.ToVector4(); + } if (MloInstance != null) { MloInstance.SetOrientation(ori); } - if (Archetype != null) { BSCenter = Orientation.Multiply(Archetype.BSCenter) * Scale; @@ -1404,14 +1451,35 @@ namespace CodeWalker.GameFiles 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; + if (Index >= mloArchetype.entities.Length) return; + + MCEntityDef entity = mloArchetype.entities[Index]; + entity._Data.position = _CEntityDef.position; + entity._Data.rotation = _CEntityDef.rotation; + } public void SetPivotPosition(Vector3 pos) @@ -1787,7 +1855,7 @@ namespace CodeWalker.GameFiles } private List[] SplitGrass( - IReadOnlyList points, + IReadOnlyList points, BoundingBox batchAABB) { var pointGroup = new List[2]; diff --git a/CodeWalker.Core/GameFiles/FileTypes/YtypFile.cs b/CodeWalker.Core/GameFiles/FileTypes/YtypFile.cs index 08a312c..7160363 100644 --- a/CodeWalker.Core/GameFiles/FileTypes/YtypFile.cs +++ b/CodeWalker.Core/GameFiles/FileTypes/YtypFile.cs @@ -21,8 +21,8 @@ namespace CodeWalker.GameFiles public uint NameHash { get; set; } public string[] Strings { get; set; } - - public CMapTypes CMapTypes { get; set; } + public CMapTypes _CMapTypes; + public CMapTypes CMapTypes { get { return _CMapTypes; } set { _CMapTypes = value; } } public Archetype[] AllArchetypes { get; set; } @@ -50,6 +50,111 @@ namespace CodeWalker.GameFiles return (RpfFileEntry != null) ? RpfFileEntry.Name : string.Empty; } + public byte[] Save() + { + MetaBuilder mb = new MetaBuilder(); + + var mdb = mb.EnsureBlock(MetaName.CMapTypes); + + CMapTypes mapTypes = _CMapTypes; + + if (Extensions == null || Extensions.Length <= 0) + mapTypes.extensions = new Array_StructurePointer(); + else + mapTypes.extensions = mb.AddWrapperArrayPtr(Extensions); + + if ((AllArchetypes != null) && (AllArchetypes.Length > 0)) + { + for (int i = 0; i < AllArchetypes.Length; i++) + { + 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); + break; + case MloArchetype m: + try + { + m._MloArchetypeDef._MloArchetypeDef.entities = mb.AddWrapperArrayPtr(m.entities); + m._MloArchetypeDef._MloArchetypeDef.rooms = mb.AddWrapperArray(m.rooms); + m._MloArchetypeDef._MloArchetypeDef.portals = mb.AddWrapperArray(m.portals); + m._MloArchetypeDef._MloArchetypeDef.entitySets = mb.AddWrapperArray(m.entitySets); + m._MloArchetypeDef._MloArchetypeDef.timeCycleModifiers = mb.AddItemArrayPtr(MetaName.CTimeCycleModifier, m.timeCycleModifiers); + } + catch/* (Exception e)*/ + { + //todo: log save error. + } + ptrs[i] = mb.AddItemPtr(MetaName.CMloArchetypeDef, m._MloArchetypeDef); + break; + case Archetype a: + ptrs[i] = mb.AddItemPtr(MetaName.CBaseArchetypeDef, a._BaseArchetypeDef); + break; + } + } + mapTypes.archetypes = mb.AddPointerArray(ptrs); + } + else + { + mapTypes.archetypes = new Array_StructurePointer(); + } + + if (CompositeEntityTypes != null && 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); + } + mapTypes.compositeEntityTypes = mb.AddItemArrayPtr(MetaName.CCompositeEntityType, cptrs); + } + + mapTypes.name = NameHash; + mapTypes.dependencies = new Array_uint(); // is this never used? possibly a todo? + + mb.AddStructureInfo(MetaName.CMapTypes); + mb.AddStructureInfo(MetaName.CBaseArchetypeDef); + mb.AddStructureInfo(MetaName.CMloArchetypeDef); + mb.AddStructureInfo(MetaName.CTimeArchetypeDef); + mb.AddStructureInfo(MetaName.CCompositeEntityType); + mb.AddStructureInfo(MetaName.CMloRoomDef); + mb.AddStructureInfo(MetaName.CMloPortalDef); + mb.AddStructureInfo(MetaName.CMloEntitySet); + + if ((AllArchetypes != null && AllArchetypes.Length > 0)) + { + mb.AddEnumInfo((MetaName)1991964615); // ASSET_TYPE_ + } + + if ((AllArchetypes != null) && (AllArchetypes.Any(x => x is MloArchetype m && m.entities.Length > 0))) + { + mb.AddStructureInfo(MetaName.CEntityDef); + mb.AddEnumInfo((MetaName)1264241711); //LODTYPES_ + mb.AddEnumInfo((MetaName)648413703); //PRI_ + } + + mb.AddItem(MetaName.CMapTypes, mapTypes); + + Meta meta = mb.GetMeta(); + byte[] data = ResourceBuilder.Build(meta, 2); + + HasChanged = false; + + return data; + } public void Load(byte[] data) { @@ -94,12 +199,12 @@ namespace CodeWalker.GameFiles Meta = rd.ReadBlock(); - CMapTypes = MetaTypes.GetTypedData(Meta, MetaName.CMapTypes); + _CMapTypes = MetaTypes.GetTypedData(Meta, MetaName.CMapTypes); List allarchs = new List(); - var ptrs = MetaTypes.GetPointerArray(Meta, CMapTypes.archetypes); + var ptrs = MetaTypes.GetPointerArray(Meta, _CMapTypes.archetypes); if (ptrs != null) { for (int i = 0; i < ptrs.Length; i++) @@ -151,7 +256,8 @@ namespace CodeWalker.GameFiles AllArchetypes = allarchs.ToArray(); - Extensions = MetaTypes.GetExtensions(Meta, CMapTypes.extensions); + Extensions = MetaTypes.GetExtensions(Meta, _CMapTypes.extensions); + if (Extensions != null) { } @@ -163,11 +269,11 @@ namespace CodeWalker.GameFiles //CEntityDefs = MetaTypes.GetTypedDataArray(Meta, MetaName.CEntityDef); - CompositeEntityTypes = MetaTypes.ConvertDataArray(Meta, MetaName.CCompositeEntityType, CMapTypes.compositeEntityTypes); + CompositeEntityTypes = MetaTypes.ConvertDataArray(Meta, MetaName.CCompositeEntityType, _CMapTypes.compositeEntityTypes); if (CompositeEntityTypes != null) { } - NameHash = CMapTypes.name; + NameHash = _CMapTypes.name; if (NameHash == 0) { int ind = entry.NameLower.LastIndexOf('.'); @@ -241,122 +347,39 @@ namespace CodeWalker.GameFiles } - public void AddArchetype(Archetype arch) + + public void AddArchetype(Archetype archetype) { - List allArchs = new List(); + if (AllArchetypes == null) + AllArchetypes = new Archetype[0]; - if (AllArchetypes != null) - allArchs.AddRange(AllArchetypes); - - allArchs.Add(arch); - - AllArchetypes = allArchs.ToArray(); + List archetypes = AllArchetypes.ToList(); + archetype.Ytyp = this; + archetypes.Add(archetype); + AllArchetypes = archetypes.ToArray(); } - public void RemoveArchetype(Archetype arch) + public Archetype AddArchetype() { - List allArchs = new List(); - - if (AllArchetypes != null) - allArchs.AddRange(AllArchetypes); - - if (allArchs.Contains(arch)) - allArchs.Remove(arch); - - AllArchetypes = allArchs.ToArray(); + var a = new Archetype(); + a._BaseArchetypeDef.assetType = Unk_1991964615.ASSET_TYPE_DRAWABLE; + a._BaseArchetypeDef.lodDist = 60; + a._BaseArchetypeDef.hdTextureDist = 15; + a.Ytyp = this; + AddArchetype(a); + return a; } - public byte[] Save() + public bool RemoveArchetype(Archetype archetype) { - MetaBuilder mb = new MetaBuilder(); - - var mdb = mb.EnsureBlock(MetaName.CMapTypes); - - CMapTypes mapTypes = CMapTypes; - - if((AllArchetypes != null) && (AllArchetypes.Length > 0)) + List archetypes = AllArchetypes.ToList(); + if (archetypes.Remove(archetype)) { - MetaPOINTER[] archPtrs = new MetaPOINTER[AllArchetypes.Length]; - - for(int i=0; i 0)) - { - MetaPOINTER[] cetPtrs = new MetaPOINTER[CompositeEntityTypes.Length] ; - - for (int i = 0; i < cetPtrs.Length; i++) - { - var cet = CompositeEntityTypes[i]; - cetPtrs[i] = mb.AddItemPtr(MetaName.CCompositeEntityType, cet); - } - - mapTypes.compositeEntityTypes = mb.AddItemArrayPtr(MetaName.CCompositeEntityType, cetPtrs); - } - - mb.AddItem(MetaName.CMapTypes, mapTypes); - - mb.AddStructureInfo(MetaName.CMapTypes); - mb.AddStructureInfo(MetaName.CBaseArchetypeDef); - mb.AddStructureInfo(MetaName.CMloArchetypeDef); - mb.AddStructureInfo(MetaName.CTimeArchetypeDef); - mb.AddStructureInfo(MetaName.CMloRoomDef); - mb.AddStructureInfo(MetaName.CMloPortalDef); - mb.AddStructureInfo(MetaName.CMloEntitySet); - mb.AddStructureInfo(MetaName.CCompositeEntityType); - - mb.AddEnumInfo((MetaName)1991964615); - mb.AddEnumInfo((MetaName)1294270217); - mb.AddEnumInfo((MetaName)1264241711); - mb.AddEnumInfo((MetaName)648413703); - mb.AddEnumInfo((MetaName)3573596290); - mb.AddEnumInfo((MetaName)700327466); - mb.AddEnumInfo((MetaName)193194928); - mb.AddEnumInfo((MetaName)2266515059); - - Meta = mb.GetMeta(); - - byte[] data = ResourceBuilder.Build(Meta, 2); //ymap is version 2... - - return data; - + return false; } - } diff --git a/CodeWalker.Core/GameFiles/GameFileCache.cs b/CodeWalker.Core/GameFiles/GameFileCache.cs index 7e052ec..253f40f 100644 --- a/CodeWalker.Core/GameFiles/GameFileCache.cs +++ b/CodeWalker.Core/GameFiles/GameFileCache.cs @@ -1804,116 +1804,6 @@ namespace CodeWalker.GameFiles } - public void InitYmapEntityArchetypes(YmapFile file) - { - if (file == null) return; - if (file.AllEntities != null) - { - for (int i = 0; i < file.AllEntities.Length; i++) - { - var ent = file.AllEntities[i]; - var arch = GetArchetype(ent.CEntityDef.archetypeName); - ent.SetArchetype(arch); - - if (ent.MloInstance != null) - { - var entities = ent.MloInstance.Entities; - if (entities != null) - { - for (int j = 0; j < entities.Length; j++) - { - var ient = entities[j]; - var iarch = GetArchetype(ient.CEntityDef.archetypeName); - ient.SetArchetype(iarch); - if (iarch == null) - { } //can't find archetype - des stuff eg {des_prologue_door} - } - - - //update archetype room AABB's.. bad to have this here? where else to put it? - var mloa = arch as MloArchetype; - if (mloa != null) - { - Vector3 mlobbmin = Vector3.Zero; - Vector3 mlobbmax = Vector3.Zero; - Vector3[] c = new Vector3[8]; - var rooms = mloa.rooms; - if (rooms != null) - { - for (int j = 0; j < rooms.Length; j++) - { - var room = rooms[j]; - if ((room.AttachedObjects == null) || (room.AttachedObjects.Length == 0)) continue; - Vector3 min = new Vector3(float.MaxValue); - Vector3 max = new Vector3(float.MinValue); - for (int k = 0; k < room.AttachedObjects.Length; k++) - { - var objid = room.AttachedObjects[k]; - if (objid < entities.Length) - { - var rooment = entities[objid]; - if ((rooment != null) && (rooment.Archetype != null)) - { - var earch = rooment.Archetype; - var pos = rooment._CEntityDef.position; - var ori = rooment.Orientation; - Vector3 abmin = earch.BBMin * rooment.Scale; //entity box - Vector3 abmax = earch.BBMax * rooment.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; - for (int n = 0; n < 8; n++) - { - Vector3 corn = ori.Multiply(c[n]) + pos; - min = Vector3.Min(min, corn); - max = Vector3.Max(max, corn); - } - } - } - } - room.BBMin_CW = min; - room.BBMax_CW = max; - mlobbmin = Vector3.Min(mlobbmin, min); - mlobbmax = Vector3.Max(mlobbmax, max); - } - } - mloa.BBMin = mlobbmin; - mloa.BBMax = mlobbmax; - } - } - } - - - } - } - if (file.GrassInstanceBatches != null) - { - for (int i = 0; i < file.GrassInstanceBatches.Length; i++) - { - var batch = file.GrassInstanceBatches[i]; - batch.Archetype = GetArchetype(batch.Batch.archetypeName); - } - } - - if (file.TimeCycleModifiers != null) - { - for (int i = 0; i < file.TimeCycleModifiers.Length; i++) - { - var tcm = file.TimeCycleModifiers[i]; - World.TimecycleMod wtcm; - if (TimeCycleModsDict.TryGetValue(tcm.CTimeCycleModifier.name.Hash, out wtcm)) - { - tcm.TimeCycleModData = wtcm; - } - } - } - - } @@ -1955,8 +1845,9 @@ namespace CodeWalker.GameFiles if (req.Loaded) AddTextureLookups(req as YtdFile); break; case GameFileType.Ymap: - req.Loaded = LoadFile(req as YmapFile); - if (req.Loaded) InitYmapEntityArchetypes(req as YmapFile); + YmapFile y = req as YmapFile; + req.Loaded = LoadFile(y); + if (req.Loaded) y.InitYmapEntityArchetypes(this); break; case GameFileType.Yft: req.Loaded = LoadFile(req as YftFile); diff --git a/CodeWalker.Core/GameFiles/MetaTypes/Archetype.cs b/CodeWalker.Core/GameFiles/MetaTypes/Archetype.cs index f9392c7..ebd4de1 100644 --- a/CodeWalker.Core/GameFiles/MetaTypes/Archetype.cs +++ b/CodeWalker.Core/GameFiles/MetaTypes/Archetype.cs @@ -14,7 +14,7 @@ namespace CodeWalker.GameFiles public virtual MetaName Type => MetaName.CBaseArchetypeDef; public CBaseArchetypeDef _BaseArchetypeDef; - public CBaseArchetypeDef BaseArchetypeDef { get { return _BaseArchetypeDef; } set { _BaseArchetypeDef = value; } } + public CBaseArchetypeDef BaseArchetypeDef => _BaseArchetypeDef; // for browsing. public MetaHash Hash { get; set; } public YtypFile Ytyp { get; set; } @@ -31,16 +31,16 @@ namespace CodeWalker.GameFiles - public string Name + public string Name { - get + get { return _BaseArchetypeDef.name.ToString(); } } - public string AssetName + public string AssetName { - get + get { return _BaseArchetypeDef.assetName.ToString(); } @@ -49,7 +49,7 @@ namespace CodeWalker.GameFiles protected void InitVars(ref CBaseArchetypeDef arch) { - BaseArchetypeDef = arch; + _BaseArchetypeDef = arch; Hash = arch.assetName; if (Hash.Hash == 0) Hash = arch.name; DrawableDict = arch.drawableDictionary; @@ -83,10 +83,8 @@ namespace CodeWalker.GameFiles public class TimeArchetype : Archetype { public override MetaName Type => MetaName.CTimeArchetypeDef; - - public CTimeArchetypeDefData _TimeArchetypeDef; - public CTimeArchetypeDefData TimeArchetypeDef { get { return _TimeArchetypeDef; } set { _TimeArchetypeDef = value; } } - + public CTimeArchetypeDef _TimeArchetypeDef; + public CTimeArchetypeDef TimeArchetypeDef => _TimeArchetypeDef; // for browsing. public uint TimeFlags { get; set; } public bool[] ActiveHours { get; set; } @@ -98,9 +96,9 @@ namespace CodeWalker.GameFiles { Ytyp = ytyp; InitVars(ref arch._BaseArchetypeDef); - TimeArchetypeDef = arch.TimeArchetypeDef; + _TimeArchetypeDef = arch; - TimeFlags = _TimeArchetypeDef.timeFlags; + TimeFlags = arch.TimeArchetypeDef.timeFlags; ActiveHours = new bool[24]; ActiveHoursText = new string[24]; for (int i = 0; i < 24; i++) @@ -128,11 +126,10 @@ namespace CodeWalker.GameFiles { public override MetaName Type => MetaName.CMloArchetypeDef; - public CMloArchetypeDef _BaseMloArchetypeDef; - public CMloArchetypeDef BaseMloArchetypeDef { get { return _BaseMloArchetypeDef; } set { _BaseMloArchetypeDef = value; } } - public CMloArchetypeDefData _MloArchetypeDef; - public CMloArchetypeDefData MloArchetypeDef { get { return _MloArchetypeDef; } set { _MloArchetypeDef = value; } } + public CMloArchetypeDef MloArchetypeDef => _MloArchetypeDef; // for browsing. + public CMloArchetypeDef _MloArchetypeDef; + public CMloArchetypeDefData _MloArchetypeDefData; public MCEntityDef[] entities { get; set; } public MCMloRoomDef[] rooms { get; set; } @@ -140,37 +137,147 @@ namespace CodeWalker.GameFiles public MCMloEntitySet[] entitySets { get; set; } public CMloTimeCycleModifier[] timeCycleModifiers { get; set; } + public void Init(YtypFile ytyp, ref CMloArchetypeDef arch) { Ytyp = ytyp; InitVars(ref arch._BaseArchetypeDef); - BaseMloArchetypeDef = arch; - MloArchetypeDef = arch.MloArchetypeDef; + _MloArchetypeDef = arch; + _MloArchetypeDefData = arch.MloArchetypeDef; + } + + public bool AddEntity(YmapEntityDef ent, int roomIndex) + { + if (ent == null) return false; + + // entity already exists in our array. so we'll just add + // it to the instanced entities list and continue. + MloInstanceData mloInstance = ent.MloParent?.MloInstance; + MCEntityDef ymcent = mloInstance?.TryGetArchetypeEntity(ent); + if (ymcent != null) + { + return true; + } + + if (roomIndex > rooms.Length) + { + throw new ArgumentOutOfRangeException($"Room index {roomIndex} exceeds the amount of rooms in {Name}."); + } + + var mcEntityDef = new MCEntityDef(ref ent._CEntityDef, this); + + // Add the new entity def to the entities list. + AddEntity(ent, mcEntityDef); + + // Update the attached objects in the room index specified. + AttachEntityToRoom(ent, roomIndex); + return true; + } + + // attaches the specified ymap entity index to the room at roomIndex. + private void AttachEntityToRoom(YmapEntityDef ent, int roomIndex) + { + if (roomIndex > rooms.Length) + { + return; // the room index is bigger than the rooms we have... + } + var attachedObjs = rooms[roomIndex].AttachedObjects?.ToList() ?? new List(); + attachedObjs.Add((uint)ent.Index); + rooms[roomIndex].AttachedObjects = attachedObjs.ToArray(); + } + + // Adds an entity to the entities array and then set's the index of the + // ymap entity to the index of the new MCEntityDef. + private void AddEntity(YmapEntityDef ent, MCEntityDef mcEntityDef) + { + if (ent == null || mcEntityDef == null) return; // no entity?... + // initialize the array. + if (entities == null) entities = new MCEntityDef[0]; + + List entList = entities.ToList(); + entList.Add(mcEntityDef); + ent.Index = entList.IndexOf(mcEntityDef); + entities = entList.ToArray(); + } + + public bool RemoveEntity(YmapEntityDef ent) + { + if (ent.Index >= entities.Length) return false; + + MCEntityDef delent = entities[ent.Index]; + MloInstanceData inst = ent.MloParent?.MloInstance; + if (inst == null) return false; + + if (delent != null) + { + MCEntityDef[] newentities = new MCEntityDef[entities.Length - 1]; + bool didDel = false; + int index = 0; + int delIndex = 0; + for (int i = 0; i < entities.Length; i++) + { + if (entities[i] == delent) + { + delIndex = i; + didDel = true; + continue; + } + + newentities[index] = entities[i]; + YmapEntityDef ymapEntityDef = inst.TryGetYmapEntity(newentities[index]); + if (ymapEntityDef != null) ymapEntityDef.Index = index; + index++; + } + entities = newentities; + + if (didDel) FixRoomIndexes(delIndex); + return didDel; + } + + return false; + } + + private void FixRoomIndexes(int deletedIndex) + { + foreach (var room in rooms) + { + List newAttachedObjects = new List(); + if (room.AttachedObjects == null) + continue; + foreach (var objIndex in room.AttachedObjects) + { + 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. + } + room.AttachedObjects = newAttachedObjects.ToArray(); + } } public void LoadChildren(Meta meta) { - var centities = MetaTypes.ConvertDataArray(meta, MetaName.CEntityDef, _MloArchetypeDef.entities); + var centities = MetaTypes.ConvertDataArray(meta, MetaName.CEntityDef, _MloArchetypeDefData.entities); if (centities != null) { entities = new MCEntityDef[centities.Length]; for (int i = 0; i < centities.Length; i++) { - entities[i] = new MCEntityDef(meta, centities[i]); + entities[i] = new MCEntityDef(meta, ref centities[i]) { Archetype = this }; } } - var crooms = MetaTypes.ConvertDataArray(meta, MetaName.CMloRoomDef, _MloArchetypeDef.rooms); + var crooms = MetaTypes.ConvertDataArray(meta, MetaName.CMloRoomDef, _MloArchetypeDefData.rooms); if (crooms != null) { rooms = new MCMloRoomDef[crooms.Length]; for (int i = 0; i < crooms.Length; i++) { - rooms[i] = new MCMloRoomDef(meta, crooms[i]); + rooms[i] = new MCMloRoomDef(meta, crooms[i]) { Archetype = this, Index = i }; } } - var cportals = MetaTypes.ConvertDataArray(meta, MetaName.CMloPortalDef, _MloArchetypeDef.portals); + var cportals = MetaTypes.ConvertDataArray(meta, MetaName.CMloPortalDef, _MloArchetypeDefData.portals); if (cportals != null) { portals = new MCMloPortalDef[cportals.Length]; @@ -180,7 +287,7 @@ namespace CodeWalker.GameFiles } } - var centitySets = MetaTypes.ConvertDataArray(meta, MetaName.CMloEntitySet, _MloArchetypeDef.entitySets); + var centitySets = MetaTypes.ConvertDataArray(meta, MetaName.CMloEntitySet, _MloArchetypeDefData.entitySets); if (centitySets != null) { entitySets = new MCMloEntitySet[centitySets.Length]; @@ -191,14 +298,44 @@ namespace CodeWalker.GameFiles } - timeCycleModifiers = MetaTypes.ConvertDataArray(meta, MetaName.CMloTimeCycleModifier, _MloArchetypeDef.timeCycleModifiers); + timeCycleModifiers = MetaTypes.ConvertDataArray(meta, MetaName.CMloTimeCycleModifier, _MloArchetypeDefData.timeCycleModifiers); } + public MCMloRoomDef GetEntityRoom(MCEntityDef ent) + { + int objectIndex = -1; + for (int i = 0; i < entities.Length; i++) + { + MCEntityDef e = entities[i]; + if (e == ent) + { + objectIndex = i; + break; + } + } + if (objectIndex == -1) return null; + + MCMloRoomDef room = null; + for (int i = 0; i < rooms.Length; i++) + { + MCMloRoomDef r = rooms[i]; + for (int j = 0; j < r.AttachedObjects.Length; j++) + { + uint ind = r.AttachedObjects[j]; + if (ind == objectIndex) + { + room = r; + break; + } + } + if (room != null) break; + } + + return room; + } } - - [TypeConverter(typeof(ExpandableObjectConverter))] public class MloInstanceData { @@ -208,7 +345,12 @@ namespace CodeWalker.GameFiles public uint[] defaultEntitySets { get; set; } public YmapEntityDef[] Entities { get; set; } + public Dictionary EntitySets { get; set; } + public MloInstanceData() + { + EntitySets = new Dictionary(); + } public void CreateYmapEntities(YmapEntityDef owner, MloArchetype mloa) { @@ -234,27 +376,182 @@ namespace CodeWalker.GameFiles var entitySet = entitySets[i]; if (entitySet.Entities != null) { + EntitySets[entitySet._Data.name] = new MloInstanceEntitySet(entitySet, this); + MloInstanceEntitySet instset = EntitySets[entitySet._Data.name]; for (int j = 0; j < entitySet.Entities.Length; j++) { YmapEntityDef e = CreateYmapEntity(owner, entitySet.Entities[j], lasti); - e.MloEntitySet = entitySet; - entlist.Add(e); + EntitySets[entitySet._Data.name].Entities.Add(e); + e.MloEntitySet = instset; lasti++; } } } } - if (defaultEntitySets != null) + if ((defaultEntitySets != null) && (entitySets != null)) { + for (var i = 0; i < defaultEntitySets.Length; i++) + { + uint index = defaultEntitySets[i]; + if (index >= entitySets.Length) continue; + MCMloEntitySet set = entitySets[index]; + MloInstanceEntitySet instset = EntitySets[set._Data.name]; + instset.Visible = true; + } } Entities = entlist.ToArray(); } - private YmapEntityDef CreateYmapEntity(YmapEntityDef owner, MCEntityDef ment, int i) + public void InitYmapEntityArchetypes(GameFileCache gfc) { - YmapEntityDef e = new YmapEntityDef(null, i, ref ment._Data); + if (Owner == null) return; + var arch = Owner.Archetype; + + if (Entities != null) + { + for (int j = 0; j < Entities.Length; j++) + { + var ient = Entities[j]; + var iarch = gfc.GetArchetype(ient.CEntityDef.archetypeName); + ient.SetArchetype(iarch); + + if (iarch == null) + { } //can't find archetype - des stuff eg {des_prologue_door} + } + + UpdateBBs(arch); + } + + if (EntitySets != null) + { + foreach (var entitySet in EntitySets) + { + var entities = entitySet.Value.Entities; + if (entities == 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) + { } //can't find archetype - des stuff eg {des_prologue_door} + } + } + } + } + + 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) + { + Vector3 mlobbmin = Vector3.Zero; + Vector3 mlobbmax = Vector3.Zero; + Vector3[] c = new Vector3[8]; + var rooms = mloa.rooms; + if (rooms != null) + { + for (int j = 0; j < rooms.Length; j++) + { + var room = rooms[j]; + if ((room.AttachedObjects == null) || (room.AttachedObjects.Length == 0)) continue; + Vector3 min = new Vector3(float.MaxValue); + Vector3 max = new Vector3(float.MinValue); + for (int k = 0; k < room.AttachedObjects.Length; k++) + { + var objid = room.AttachedObjects[k]; + if (objid < Entities.Length) + { + var rooment = Entities[objid]; + if ((rooment != null) && (rooment.Archetype != null)) + { + var earch = rooment.Archetype; + var pos = rooment._CEntityDef.position; + var ori = rooment.Orientation; + Vector3 abmin = earch.BBMin * rooment.Scale; //entity box + Vector3 abmax = earch.BBMax * rooment.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; + for (int n = 0; n < 8; n++) + { + Vector3 corn = ori.Multiply(c[n]) + pos; + min = Vector3.Min(min, corn); + max = Vector3.Max(max, corn); + } + } + } + } + room.BBMin_CW = min; + room.BBMax_CW = max; + mlobbmin = Vector3.Min(mlobbmin, min); + mlobbmax = Vector3.Max(mlobbmax, max); + } + } + mloa.BBMin = mlobbmin; + mloa.BBMax = mlobbmax; + } + } + + public bool DeleteEntity(YmapEntityDef ent) + { + if (Entities == 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) + { + 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."); + } + + int index = 0; + YmapEntityDef[] newentities = new YmapEntityDef[Entities.Length - 1]; + YmapEntityDef delentity = Entities[ent.Index]; + bool del = false; + + for (int i = 0; i < Entities.Length; i++) + { + if (Entities[i] == delentity) + { + del = true; + continue; + } + newentities[index] = Entities[i]; + newentities[index].Index = index; + index++; + } + if (!del) + throw new ArgumentException("The entity specified was not found in this MloInstance. It cannot be deleted."); + + if (Owner.Archetype is MloArchetype arch) + { + if (arch.RemoveEntity(ent)) + { + if (ent.MloEntitySet != null) + if (!ent.MloEntitySet.Entities.Remove(ent)) + return false; + // Delete was successful... + Entities = newentities; + return true; + } + } + throw new InvalidCastException("The owner of this archetype's archetype definition is not an MloArchetype."); + } + + public YmapEntityDef CreateYmapEntity(YmapEntityDef owner, MCEntityDef ment, int index) + { + YmapEntityDef e = new YmapEntityDef(null, index, ref ment._Data); e.Extensions = ment.Extensions; e.MloRefPosition = e.Position; e.MloRefOrientation = e.Orientation; @@ -263,9 +560,31 @@ namespace CodeWalker.GameFiles e.Orientation = Quaternion.Multiply(owner.Orientation, e.MloRefOrientation); e.UpdateWidgetPosition(); e.UpdateWidgetOrientation(); + return e; } + 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.Index >= mloa.entities.Length) return null; + + var entity = mloa.entities[ymapEntity.Index]; + return entity; + } + + public YmapEntityDef TryGetYmapEntity(MCEntityDef mcEntity) + { + if (mcEntity == null) return null; + if (Owner?.Archetype == null) return null; + if (!(Owner.Archetype is MloArchetype mloa)) return null; + + var index = Array.FindIndex(mloa.entities, x => x == mcEntity); + if (index == -1 || index >= Entities.Length) return null; + return Entities[index]; + } public void SetPosition(Vector3 pos) { @@ -289,17 +608,52 @@ namespace CodeWalker.GameFiles for (int i = 0; i < Entities.Length; i++) { YmapEntityDef e = Entities[i]; - e.Position = Owner.Position + Owner.Orientation.Multiply(e.MloRefPosition); - e.Orientation = Quaternion.Multiply(Owner.Orientation, e.MloRefOrientation); - e.UpdateWidgetPosition(); - e.UpdateWidgetOrientation(); + UpdateEntity(e); } } + public void UpdateEntity(YmapEntityDef e) + { + e.Position = Owner.Position + Owner.Orientation.Multiply(e.MloRefPosition); + e.Orientation = Quaternion.Multiply(Owner.Orientation, e.MloRefOrientation); + e.UpdateWidgetPosition(); + e.UpdateWidgetOrientation(); + } + public void AddEntity(YmapEntityDef e) + { + if (e == null) return; + if (Entities == null) Entities = new YmapEntityDef[0]; + var entities = Entities.ToList(); + entities.Add(e); + Entities = entities.ToArray(); + } } + [TypeConverter(typeof(ExpandableObjectConverter))] + public class MloInstanceEntitySet + { + public MloInstanceEntitySet(MCMloEntitySet entSet, MloInstanceData instance) + { + EntitySet = entSet; + Entities = new List(); + Instance = instance; + } + + public MCMloEntitySet EntitySet { get; set; } + public List Entities { get; set; } + public MloInstanceData Instance { get; set; } + + public uint[] Locations + { + get { return EntitySet?.Locations; } + set { if (EntitySet != null) EntitySet.Locations = value; } + } + + public bool Visible { get; set; } + } + } diff --git a/CodeWalker.Core/GameFiles/MetaTypes/MetaTypes.cs b/CodeWalker.Core/GameFiles/MetaTypes/MetaTypes.cs index 3013d08..0d407b1 100644 --- a/CodeWalker.Core/GameFiles/MetaTypes/MetaTypes.cs +++ b/CodeWalker.Core/GameFiles/MetaTypes/MetaTypes.cs @@ -2428,7 +2428,9 @@ namespace CodeWalker.GameFiles public Vector3 BBMax { get { return (_Data.bbMax); } } public Vector3 BBMin_CW { get; set; } public Vector3 BBMax_CW { get; set; } - + + public MloArchetype Archetype { get; set; } + public int Index { get; set; } public MCMloRoomDef() { } public MCMloRoomDef(Meta meta, CMloRoomDef data) @@ -2610,7 +2612,7 @@ namespace CodeWalker.GameFiles Entities = new MCEntityDef[ents.Length]; for (int i = 0; i < ents.Length; i++) { - Entities[i] = new MCEntityDef(meta, ents[i]); + Entities[i] = new MCEntityDef(meta, ref ents[i]); } } } @@ -2750,23 +2752,26 @@ namespace CodeWalker.GameFiles [TC(typeof(EXP))] public class MCEntityDef : MetaWrapper { public CEntityDef _Data; - public CEntityDef Data { get { return _Data; } } + public CEntityDef Data { get { return _Data; } set { _Data = value; } } public MetaWrapper[] Extensions { get; set; } - public MCEntityDef() { } + public MloArchetype Archetype { get; set; } // for browsing/reference purposes + public MCEntityDef(MCEntityDef copy) { - if (copy != null) - { - _Data = copy.Data; - } + if (copy != null) _Data = copy.Data; } - public MCEntityDef(Meta meta, CEntityDef d) + public MCEntityDef(Meta meta, ref CEntityDef d) { _Data = d; Extensions = MetaTypes.GetExtensions(meta, _Data.extensions); } + public MCEntityDef(ref CEntityDef d, MloArchetype arch) + { + _Data = d; + Archetype = arch; + } public override void Load(Meta meta, MetaPOINTER ptr) { diff --git a/CodeWalker.Core/Utils/Vectors.cs b/CodeWalker.Core/Utils/Vectors.cs index 19b354e..1e748d7 100644 --- a/CodeWalker.Core/Utils/Vectors.cs +++ b/CodeWalker.Core/Utils/Vectors.cs @@ -24,6 +24,11 @@ namespace CodeWalker { 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 Quaternion ToQuaternion(this Vector4 v) + { + return new Quaternion(v); + } } diff --git a/CodeWalker.csproj b/CodeWalker.csproj index 6d2938e..fa9fd96 100644 --- a/CodeWalker.csproj +++ b/CodeWalker.csproj @@ -328,6 +328,12 @@ EditYmapCarGenPanel.cs + + Form + + + EditYtypArchetypeMloRoomPanel.cs + Form @@ -382,6 +388,12 @@ EditYnvPortalPanel.cs + + Form + + + EditYtypArchetypePanel.cs + Form @@ -596,6 +608,9 @@ EditYmapCarGenPanel.cs + + EditYtypArchetypeMloRoomPanel.cs + EditYmapEntityPanel.cs @@ -623,6 +638,9 @@ EditYnvPortalPanel.cs + + EditYtypArchetypePanel.cs + EditYtypPanel.cs diff --git a/Project/Panels/EditYmapEntityPanel.Designer.cs b/Project/Panels/EditYmapEntityPanel.Designer.cs index f33c0e7..6d1b070 100644 --- a/Project/Panels/EditYmapEntityPanel.Designer.cs +++ b/Project/Panels/EditYmapEntityPanel.Designer.cs @@ -71,6 +71,7 @@ this.EntityNumChildrenTextBox = new System.Windows.Forms.TextBox(); this.label25 = new System.Windows.Forms.Label(); this.EntityExtensionsTabPage = new System.Windows.Forms.TabPage(); + this.label1 = new System.Windows.Forms.Label(); this.EntityPivotTabPage = new System.Windows.Forms.TabPage(); this.label95 = new System.Windows.Forms.Label(); this.EntityPivotEditCheckBox = new System.Windows.Forms.CheckBox(); @@ -79,7 +80,6 @@ this.EntityPivotRotationNormalizeButton = new System.Windows.Forms.Button(); this.label94 = new System.Windows.Forms.Label(); this.EntityPivotRotationTextBox = new System.Windows.Forms.TextBox(); - this.label1 = new System.Windows.Forms.Label(); this.EntityTabControl.SuspendLayout(); this.EntityGeneralTabPage.SuspendLayout(); this.EntityLodTabPage.SuspendLayout(); @@ -575,6 +575,15 @@ this.EntityExtensionsTabPage.Text = "Extensions"; this.EntityExtensionsTabPage.UseVisualStyleBackColor = true; // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(27, 27); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(157, 13); + this.label1.TabIndex = 0; + this.label1.Text = "Entity extensions editing TODO!"; + // // EntityPivotTabPage // this.EntityPivotTabPage.Controls.Add(this.label95); @@ -660,15 +669,6 @@ this.EntityPivotRotationTextBox.TabIndex = 25; this.EntityPivotRotationTextBox.TextChanged += new System.EventHandler(this.EntityPivotRotationTextBox_TextChanged); // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(27, 27); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(157, 13); - this.label1.TabIndex = 0; - this.label1.Text = "Entity extensions editing TODO!"; - // // EditYmapEntityPanel // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); diff --git a/Project/Panels/EditYmapEntityPanel.cs b/Project/Panels/EditYmapEntityPanel.cs index 30f351b..b286963 100644 --- a/Project/Panels/EditYmapEntityPanel.cs +++ b/Project/Panels/EditYmapEntityPanel.cs @@ -1,13 +1,6 @@ using CodeWalker.GameFiles; using SharpDX; using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Windows.Forms; namespace CodeWalker.Project.Panels @@ -16,6 +9,7 @@ namespace CodeWalker.Project.Panels { public ProjectForm ProjectForm; public YmapEntityDef CurrentEntity { get; set; } + public MCEntityDef CurrentMCEntity { get; set; } private bool populatingui = false; @@ -29,6 +23,8 @@ namespace CodeWalker.Project.Panels public void SetEntity(YmapEntityDef entity) { CurrentEntity = entity; + MloInstanceData instance = entity?.MloParent?.MloInstance; + CurrentMCEntity = instance?.TryGetArchetypeEntity(entity); Tag = entity; LoadEntity(); UpdateFormTitle(); @@ -94,10 +90,10 @@ namespace CodeWalker.Project.Panels else { populatingui = true; - var e = CurrentEntity.CEntityDef; + var e = CurrentEntity._CEntityDef; var po = CurrentEntity.PivotOrientation; //EntityPanel.Enabled = true; - EntityAddToProjectButton.Enabled = !ProjectForm.YmapExistsInProject(CurrentEntity.Ymap); + EntityAddToProjectButton.Enabled = CurrentEntity.Ymap != null ? !ProjectForm.YmapExistsInProject(CurrentEntity.Ymap) : !ProjectForm.YtypExistsInProject(CurrentEntity.MloParent?.Archetype?.Ytyp); EntityDeleteButton.Enabled = !EntityAddToProjectButton.Enabled; EntityArchetypeTextBox.Text = e.archetypeName.ToString(); EntityArchetypeHashLabel.Text = "Hash: " + e.archetypeName.Hash.ToString(); @@ -176,21 +172,53 @@ namespace CodeWalker.Project.Panels { tn.Text = name; } + else + { + tn = ProjectForm.ProjectExplorer?.FindMloEntityTreeNode(CurrentMCEntity); + if (tn != null) + { + tn.Text = name; + } + } if (CurrentEntity != null) { lock (ProjectForm.ProjectSyncRoot) { CurrentEntity._CEntityDef.archetypeName = new MetaHash(hash); + + if (CurrentMCEntity != null) + { + CurrentMCEntity._Data.archetypeName = new MetaHash(hash); + } + if (CurrentEntity.Archetype != arch) { CurrentEntity.SetArchetype(arch); - ProjectForm.SetYmapHasChanged(true); + + if (CurrentEntity.IsMlo) + { + CurrentEntity.MloInstance.InitYmapEntityArchetypes(ProjectForm.GameFileCache); + } + + ProjectItemChanged(); } } } } + private void ProjectItemChanged() + { + if (CurrentEntity.Ymap != null) + { + ProjectForm.SetYmapHasChanged(true); + } + else if (CurrentEntity.MloParent?.Archetype?.Ytyp != null) + { + ProjectForm.SetYtypHasChanged(true); + } + } + private void EntityFlagsTextBox_TextChanged(object sender, EventArgs e) { if (populatingui) return; @@ -209,7 +237,9 @@ namespace CodeWalker.Project.Panels if (CurrentEntity._CEntityDef.flags != flags) { CurrentEntity._CEntityDef.flags = flags; - ProjectForm.SetYmapHasChanged(true); + if (CurrentMCEntity != null) + CurrentMCEntity._Data.flags = flags; + ProjectItemChanged(); } } } @@ -244,7 +274,9 @@ namespace CodeWalker.Project.Panels if (CurrentEntity._CEntityDef.flags != flags) { CurrentEntity._CEntityDef.flags = flags; - ProjectForm.SetYmapHasChanged(true); + if (CurrentMCEntity != null) + CurrentMCEntity._Data.flags = flags; + ProjectItemChanged(); } } } @@ -260,7 +292,9 @@ namespace CodeWalker.Project.Panels if (CurrentEntity._CEntityDef.guid != guid) { CurrentEntity._CEntityDef.guid = guid; - ProjectForm.SetYmapHasChanged(true); + if (CurrentMCEntity != null) + CurrentMCEntity._Data.guid = guid; + ProjectItemChanged(); } } } @@ -274,14 +308,16 @@ namespace CodeWalker.Project.Panels { if (CurrentEntity.MloParent != null) { - //TODO: positioning for interior entities! + v = CurrentEntity.MloParent.Position + CurrentEntity.MloParent.Orientation.Multiply(v); + CurrentEntity.SetPosition(v); + ProjectItemChanged(); } else { if (CurrentEntity.Position != v) { CurrentEntity.SetPosition(v); - ProjectForm.SetYmapHasChanged(true); + ProjectItemChanged(); var wf = ProjectForm.WorldForm; if (wf != null) { @@ -304,17 +340,24 @@ namespace CodeWalker.Project.Panels { if (CurrentEntity._CEntityDef.rotation != v) { - Quaternion q = new Quaternion(v); - CurrentEntity.SetOrientationInv(q); - ProjectForm.SetYmapHasChanged(true); + Quaternion q = v.ToQuaternion(); var wf = ProjectForm.WorldForm; - if (wf != null) + + if (CurrentEntity.MloParent != null) { - wf.BeginInvoke(new Action(() => - { - wf.SetWidgetRotation(CurrentEntity.WidgetOrientation, true); - })); + var world = Quaternion.Normalize(Quaternion.Multiply(q, CurrentEntity.MloParent.Orientation)); + CurrentEntity.SetOrientation(world); } + else + { + CurrentEntity.SetOrientation(q, true); + } + + ProjectItemChanged(); + wf?.BeginInvoke(new Action(() => + { + wf.SetWidgetRotation(CurrentEntity.WidgetOrientation, true); + })); } } } @@ -331,7 +374,7 @@ namespace CodeWalker.Project.Panels { Vector3 newscale = new Vector3(sxy, sxy, CurrentEntity.Scale.Z); CurrentEntity.SetScale(newscale); - ProjectForm.SetYmapHasChanged(true); + ProjectItemChanged(); var wf = ProjectForm.WorldForm; if (wf != null) { @@ -356,7 +399,7 @@ namespace CodeWalker.Project.Panels { Vector3 newscale = new Vector3(CurrentEntity.Scale.X, CurrentEntity.Scale.Y, sz); CurrentEntity.SetScale(newscale); - ProjectForm.SetYmapHasChanged(true); + ProjectItemChanged(); var wf = ProjectForm.WorldForm; if (wf != null) { @@ -380,7 +423,9 @@ namespace CodeWalker.Project.Panels if (CurrentEntity._CEntityDef.parentIndex != pind) { CurrentEntity._CEntityDef.parentIndex = pind; //Needs more work for LOD linking! - ProjectForm.SetYmapHasChanged(true); + if (CurrentMCEntity != null) + CurrentMCEntity._Data.parentIndex = pind; + ProjectItemChanged(); } } } @@ -396,7 +441,9 @@ namespace CodeWalker.Project.Panels if (CurrentEntity._CEntityDef.lodDist != lodDist) { CurrentEntity._CEntityDef.lodDist = lodDist; - ProjectForm.SetYmapHasChanged(true); + if (CurrentMCEntity != null) + CurrentMCEntity._Data.lodDist = lodDist; + ProjectItemChanged(); } } } @@ -412,7 +459,9 @@ namespace CodeWalker.Project.Panels if (CurrentEntity._CEntityDef.childLodDist != childLodDist) { CurrentEntity._CEntityDef.childLodDist = childLodDist; - ProjectForm.SetYmapHasChanged(true); + if (CurrentMCEntity != null) + CurrentMCEntity._Data.childLodDist = childLodDist; + ProjectItemChanged(); } } } @@ -427,7 +476,9 @@ namespace CodeWalker.Project.Panels if (CurrentEntity._CEntityDef.lodLevel != lodLevel) { CurrentEntity._CEntityDef.lodLevel = lodLevel; - ProjectForm.SetYmapHasChanged(true); + if (CurrentMCEntity != null) + CurrentMCEntity._Data.lodLevel = lodLevel; + ProjectItemChanged(); } } } @@ -443,7 +494,9 @@ namespace CodeWalker.Project.Panels if (CurrentEntity._CEntityDef.numChildren != numChildren) { CurrentEntity._CEntityDef.numChildren = numChildren; - ProjectForm.SetYmapHasChanged(true); + if (CurrentMCEntity != null) + CurrentMCEntity._Data.numChildren = numChildren; + ProjectItemChanged(); } } } @@ -458,7 +511,9 @@ namespace CodeWalker.Project.Panels if (CurrentEntity._CEntityDef.priorityLevel != priorityLevel) { CurrentEntity._CEntityDef.priorityLevel = priorityLevel; - ProjectForm.SetYmapHasChanged(true); + if (CurrentMCEntity != null) + CurrentMCEntity._Data.priorityLevel = priorityLevel; + ProjectItemChanged(); } } } @@ -474,7 +529,9 @@ namespace CodeWalker.Project.Panels if (CurrentEntity._CEntityDef.ambientOcclusionMultiplier != aomult) { CurrentEntity._CEntityDef.ambientOcclusionMultiplier = aomult; - ProjectForm.SetYmapHasChanged(true); + if (CurrentMCEntity != null) + CurrentMCEntity._Data.ambientOcclusionMultiplier = aomult; + ProjectItemChanged(); } } } @@ -490,7 +547,9 @@ namespace CodeWalker.Project.Panels if (CurrentEntity._CEntityDef.artificialAmbientOcclusion != artao) { CurrentEntity._CEntityDef.artificialAmbientOcclusion = artao; - ProjectForm.SetYmapHasChanged(true); + if (CurrentMCEntity != null) + CurrentMCEntity._Data.artificialAmbientOcclusion = artao; + ProjectItemChanged(); } } } @@ -506,7 +565,9 @@ namespace CodeWalker.Project.Panels if (CurrentEntity._CEntityDef.tintValue != tintValue) { CurrentEntity._CEntityDef.tintValue = tintValue; - ProjectForm.SetYmapHasChanged(true); + if (CurrentMCEntity != null) + CurrentMCEntity._Data.tintValue = tintValue; + ProjectItemChanged(); } } } @@ -515,7 +576,7 @@ namespace CodeWalker.Project.Panels { if (CurrentEntity == null) return; if (ProjectForm.WorldForm == null) return; - ProjectForm.WorldForm.GoToPosition(CurrentEntity.Position); + ProjectForm.WorldForm.GoToPosition(CurrentEntity.Position, Vector3.One * CurrentEntity.BSRadius); } private void EntityNormalizeRotationButton_Click(object sender, EventArgs e) diff --git a/Project/Panels/EditYmapGrassPanel.cs b/Project/Panels/EditYmapGrassPanel.cs index dedd9d1..5e7f558 100644 --- a/Project/Panels/EditYmapGrassPanel.cs +++ b/Project/Panels/EditYmapGrassPanel.cs @@ -42,6 +42,7 @@ namespace CodeWalker.Project.Panels Tag = batch; UpdateFormTitle(); UpdateControls(); + ProjectForm.WorldForm?.SelectGrassBatch(batch); } private void UpdateControls() @@ -197,6 +198,13 @@ namespace CodeWalker.Project.Panels private void OptimizeBatchButton_Click(object sender, EventArgs e) { if (CurrentBatch.Instances == null || CurrentBatch.Instances.Length <= 0) return; + var d = MessageBox.Show( + @"You are about to split the selected batch into multiple parts. Are you sure you want to do this?", + @"Instance Optimizer", MessageBoxButtons.YesNo); + + if (d == DialogResult.No) + return; + lock (ProjectForm.WorldForm.RenderSyncRoot) { var newBatches = CurrentBatch?.OptimizeInstances(CurrentBatch, (float)OptmizationThresholdNumericUpDown.Value); diff --git a/Project/Panels/EditYtypArchetypeMloRoomPanel.Designer.cs b/Project/Panels/EditYtypArchetypeMloRoomPanel.Designer.cs new file mode 100644 index 0000000..0d30f09 --- /dev/null +++ b/Project/Panels/EditYtypArchetypeMloRoomPanel.Designer.cs @@ -0,0 +1,173 @@ +namespace CodeWalker.Project.Panels +{ + partial class EditYtypArchetypeMloRoomPanel + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EditYtypArchetypeMloRoomPanel)); + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.MinBoundsTextBox = new CodeWalker.WinForms.TextBoxFix(); + this.MaxBoundsTextBox = new CodeWalker.WinForms.TextBoxFix(); + this.label3 = new System.Windows.Forms.Label(); + this.RoomNameTextBox = new CodeWalker.WinForms.TextBoxFix(); + this.RoomFlagsCheckedListBox = new System.Windows.Forms.CheckedListBox(); + this.RoomFlagsTextBox = new System.Windows.Forms.TextBox(); + this.label14 = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(33, 69); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(27, 13); + this.label1.TabIndex = 0; + this.label1.Text = "Min:"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(30, 95); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(30, 13); + this.label2.TabIndex = 1; + this.label2.Text = "Max:"; + // + // MinBoundsTextBox + // + this.MinBoundsTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.MinBoundsTextBox.Location = new System.Drawing.Point(66, 66); + this.MinBoundsTextBox.Name = "MinBoundsTextBox"; + this.MinBoundsTextBox.Size = new System.Drawing.Size(275, 20); + this.MinBoundsTextBox.TabIndex = 2; + this.MinBoundsTextBox.TextChanged += new System.EventHandler(this.MinBoundsTextBox_TextChanged); + // + // MaxBoundsTextBox + // + this.MaxBoundsTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.MaxBoundsTextBox.Location = new System.Drawing.Point(66, 92); + this.MaxBoundsTextBox.Name = "MaxBoundsTextBox"; + this.MaxBoundsTextBox.Size = new System.Drawing.Size(275, 20); + this.MaxBoundsTextBox.TabIndex = 3; + this.MaxBoundsTextBox.TextChanged += new System.EventHandler(this.MaxBoundsTextBox_TextChanged); + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(19, 43); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(41, 13); + this.label3.TabIndex = 4; + this.label3.Text = "Name: "; + // + // RoomNameTextBox + // + this.RoomNameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.RoomNameTextBox.Location = new System.Drawing.Point(66, 40); + this.RoomNameTextBox.Name = "RoomNameTextBox"; + this.RoomNameTextBox.Size = new System.Drawing.Size(275, 20); + this.RoomNameTextBox.TabIndex = 5; + this.RoomNameTextBox.TextChanged += new System.EventHandler(this.RoomNameTextBox_TextChanged); + // + // RoomFlagsCheckedListBox + // + this.RoomFlagsCheckedListBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Right))); + this.RoomFlagsCheckedListBox.CheckOnClick = true; + this.RoomFlagsCheckedListBox.FormattingEnabled = true; + this.RoomFlagsCheckedListBox.Items.AddRange(new object[] { + "1 - Unk01", + "2 - Unk02", + "4 - Unk03", + "8 - Unk04", + "16 - Unk05", + "32 - Unk06", + "64 - Unk07"}); + this.RoomFlagsCheckedListBox.Location = new System.Drawing.Point(352, 62); + this.RoomFlagsCheckedListBox.Name = "RoomFlagsCheckedListBox"; + this.RoomFlagsCheckedListBox.Size = new System.Drawing.Size(201, 244); + this.RoomFlagsCheckedListBox.TabIndex = 35; + this.RoomFlagsCheckedListBox.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.RoomFlagsCheckedListBox_ItemCheck); + // + // RoomFlagsTextBox + // + this.RoomFlagsTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.RoomFlagsTextBox.Location = new System.Drawing.Point(406, 36); + this.RoomFlagsTextBox.Name = "RoomFlagsTextBox"; + this.RoomFlagsTextBox.Size = new System.Drawing.Size(147, 20); + this.RoomFlagsTextBox.TabIndex = 34; + this.RoomFlagsTextBox.TextChanged += new System.EventHandler(this.RoomFlagsTextBox_TextChanged); + // + // 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(365, 39); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(35, 13); + this.label14.TabIndex = 33; + this.label14.Text = "Flags:"; + // + // EditYtypArchetypeMloRoomPanel + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(565, 505); + this.Controls.Add(this.RoomFlagsCheckedListBox); + this.Controls.Add(this.RoomFlagsTextBox); + this.Controls.Add(this.label14); + this.Controls.Add(this.RoomNameTextBox); + this.Controls.Add(this.label3); + this.Controls.Add(this.MaxBoundsTextBox); + this.Controls.Add(this.MinBoundsTextBox); + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Name = "EditYtypArchetypeMloRoomPanel"; + this.Text = "Room"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private WinForms.TextBoxFix MinBoundsTextBox; + private WinForms.TextBoxFix MaxBoundsTextBox; + private System.Windows.Forms.Label label3; + private WinForms.TextBoxFix RoomNameTextBox; + private System.Windows.Forms.CheckedListBox RoomFlagsCheckedListBox; + private System.Windows.Forms.TextBox RoomFlagsTextBox; + private System.Windows.Forms.Label label14; + } +} \ No newline at end of file diff --git a/Project/Panels/EditYtypArchetypeMloRoomPanel.cs b/Project/Panels/EditYtypArchetypeMloRoomPanel.cs new file mode 100644 index 0000000..a7547c4 --- /dev/null +++ b/Project/Panels/EditYtypArchetypeMloRoomPanel.cs @@ -0,0 +1,137 @@ +using System; +using System.Windows.Forms; +using CodeWalker.GameFiles; +using SharpDX; + +namespace CodeWalker.Project.Panels +{ + public partial class EditYtypArchetypeMloRoomPanel : ProjectPanel + { + public ProjectForm ProjectForm; + public MCMloRoomDef CurrentRoom { get; set; } + + public EditYtypArchetypeMloRoomPanel(ProjectForm owner) + { + ProjectForm = owner; + InitializeComponent(); + } + + public void SetRoom(MCMloRoomDef room) + { + CurrentRoom = room; + Tag = room; + UpdateFormTitle(); + MloInstanceData instance = ProjectForm.TryGetMloInstance(room?.Archetype); + ProjectForm.WorldForm?.SelectMloRoom(room, instance); + UpdateControls(); + } + + private void UpdateControls() + { + if (CurrentRoom != null) + { + RoomNameTextBox.Text = CurrentRoom.RoomName; + MinBoundsTextBox.Text = FloatUtil.GetVector3String(CurrentRoom.BBMin); + MaxBoundsTextBox.Text = FloatUtil.GetVector3String(CurrentRoom.BBMax); + RoomFlagsTextBox.Text = CurrentRoom._Data.flags.ToString(); + } + } + + private void UpdateFormTitle() + { + Text = CurrentRoom?.RoomName ?? "Room"; + } + + private void RoomNameTextBox_TextChanged(object sender, EventArgs e) + { + if (CurrentRoom == null) return; + + if (CurrentRoom.RoomName != RoomNameTextBox.Text) + { + CurrentRoom.RoomName = RoomNameTextBox.Text; + + TreeNode tn = ProjectForm.ProjectExplorer?.FindMloRoomTreeNode(CurrentRoom); + if (tn != null) + { + tn.Text = CurrentRoom.RoomName; + } + + UpdateFormTitle(); + ProjectForm.SetYtypHasChanged(true); + } + } + + private void MinBoundsTextBox_TextChanged(object sender, EventArgs e) + { + if (CurrentRoom == null) return; + Vector3 bb = FloatUtil.ParseVector3String(MinBoundsTextBox.Text); + if (CurrentRoom._Data.bbMin != bb) + { + CurrentRoom._Data.bbMin = bb; + ProjectForm.SetYtypHasChanged(true); + } + } + + private void MaxBoundsTextBox_TextChanged(object sender, EventArgs e) + { + if (CurrentRoom == null) return; + Vector3 bb = FloatUtil.ParseVector3String(MaxBoundsTextBox.Text); + if (CurrentRoom._Data.bbMax != bb) + { + CurrentRoom._Data.bbMax = bb; + ProjectForm.SetYtypHasChanged(true); + } + } + + private void RoomFlagsTextBox_TextChanged(object sender, EventArgs e) + { + if (CurrentRoom == null) return; + uint.TryParse(RoomFlagsTextBox.Text, out uint flags); + for (int i = 0; i < RoomFlagsCheckedListBox.Items.Count; i++) + { + var c = ((flags & (1u << i)) > 0); + RoomFlagsCheckedListBox.SetItemCheckState(i, c ? CheckState.Checked : CheckState.Unchecked); + } + lock (ProjectForm.ProjectSyncRoot) + { + if (CurrentRoom._Data.flags != flags) + { + CurrentRoom._Data.flags = flags; + ProjectForm.SetYtypHasChanged(true); + } + } + } + + private void RoomFlagsCheckedListBox_ItemCheck(object sender, ItemCheckEventArgs e) + { + if (CurrentRoom == null) return; + uint flags = 0; + for (int i = 0; i < RoomFlagsCheckedListBox.Items.Count; i++) + { + if (e.Index == i) + { + if (e.NewValue == CheckState.Checked) + { + flags += (uint)(1 << i); + } + } + else + { + if (RoomFlagsCheckedListBox.GetItemChecked(i)) + { + flags += (uint)(1 << i); + } + } + } + RoomFlagsTextBox.Text = flags.ToString(); + lock (ProjectForm.ProjectSyncRoot) + { + if (CurrentRoom._Data.flags != flags) + { + CurrentRoom._Data.flags = flags; + ProjectForm.SetYtypHasChanged(true); + } + } + } + } +} diff --git a/Project/Panels/EditYtypArchetypeMloRoomPanel.resx b/Project/Panels/EditYtypArchetypeMloRoomPanel.resx new file mode 100644 index 0000000..1431f6b --- /dev/null +++ b/Project/Panels/EditYtypArchetypeMloRoomPanel.resx @@ -0,0 +1,409 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + AAABAAMAICAAAAAAGACoDAAANgAAABAQAAAAABgAaAMAAN4MAABAQAAAAAAYACgyAABGEAAAKAAAACAA + AABAAAAAAQAYAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAA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////KAAAABAA + AAAgAAAAAQAYAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///+vv/fL1/v///wAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///4+Vx7/F5v///wAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAP///4CHtrS62////////////////////wAAAAAAAAAAAP////H0/vf6/v// + /////////4yTwrrB4f///+zw+7rA6P39/////wAAAAAAAAAAAP///56l2BkcguXr/P///////42Uw8jO + 6P///ysvjWVqtP///////wAAAAAAAAAAAP////D0/0hPpsDG6////////6y02d7k8////3qAx+/z/f// + /wAAAAAAAAAAAAAAAAAAAP///////////////8zT8V5ns1Rcrdzh9f///////////wAAAAAAAAAAAAAA + AAAAAP////////7+/6ix3nmBxFthtmdwu09WqbC54/v9//r8//j6//39/wAAAAAAAAAAAOjt/H6I0FJc + skpSqHF+wRMahFZhs4iT1AsNc1pgrm52v2RsuO/z/gAAAP////////L2/cLJ7rrD64+V4DY+ozU+mYmU + 0X2Hy1hfss7V8urv/PP2/v///wAAAP///+Pp+d/k9////////+Pp/4uR3ysymW14xYOM0fD0/P///+Xq + +ri/6Pj6/wAAAOrv/j5DnbS75P////////////X4/+/0/ubr+/r7/////////9rh+hgZhKGo2QAAAPDz + /eLn+f////j6/2Nqttrg9////+Hn+P3+//3+/1hescLJ6/////L2/eru/AAAAAAAAAAAAP///8rR70tR + p/3+//v8/zY6jNPY7////09WqWpwu////wAAAAAAAAAAAAAAAAAAAAAAAPb4/vr7//////v8/5Wd1eHm + +P////v8//T3/wAAAAAAAAAAAAAAAP//AAD8PwAA/D8AAPwDAACAAwAAgAMAAIAHAADABwAAwAEAAMAB + AAAAAQAAAAEAAAABAAAAAQAAwAcAAOAPAAAoAAAAQAAAAIAAAAAB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////////wB/////// + //AH////////8Af////////wB/////////AH////////8AfwP//////wB8Af//+Af/AHgB///wA/8AcA + H///AB/wBgAf//8AD/AGAB///wAH8AYAH///AAPwBAAf//8AA/AEAD///wAD8AQAP///AAPwBAB///+A + A/AEAP///8AD4AAA////4AcAAAH////wDgAAAf/////8AAAH//////gAAAf/////4AAAAf/////gAAAA + /f//+AAAAAAAD//AAAAAAAAH/4AAAAAAAAf/gAAAAAAAB/+AAAAAAAAH/4AAAAAAAAf/gAAAAAAAB/+A + AAAAAAAP/4AAAAAAAB//wAAAAABAf/4HwAAAAYAf8APAAAADgA/gA+AAAAMAA8AD8AAABwADgAP8AAAf + AAOAA/4AAB8AA4ADAAAAAQADgAIAcA4AgAOABgBwDgBAA4AMAGAMADADwDwAYAwAOAfg+ABgBAAeH//4 + AEAEAB////gAwAYAH///+ADABgAf///4AcAGAB////gBwAcAH///+APAB4A////8B+AHwH//////4A// + ///////gD/////////Af//////////////8= + + + \ No newline at end of file diff --git a/Project/Panels/EditYtypArchetypePanel.Designer.cs b/Project/Panels/EditYtypArchetypePanel.Designer.cs new file mode 100644 index 0000000..6fbd3ff --- /dev/null +++ b/Project/Panels/EditYtypArchetypePanel.Designer.cs @@ -0,0 +1,632 @@ +namespace CodeWalker.Project.Panels +{ + partial class EditYtypArchetypePanel + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + 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.EntitySetsListBox = new System.Windows.Forms.CheckedListBox(); + this.label15 = new System.Windows.Forms.Label(); + 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.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; + // + // ArchetypeDeleteButton + // + this.ArchetypeDeleteButton.Anchor = System.Windows.Forms.AnchorStyles.Bottom; + this.ArchetypeDeleteButton.Location = new System.Drawing.Point(270, 450); + 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); + // + // label13 + // + this.label13.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label13.AutoSize = true; + this.label13.Location = new System.Drawing.Point(8, 411); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(57, 13); + this.label13.TabIndex = 78; + this.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, 408); + 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); + // + // 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, 382); + 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); + // + // 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, 356); + 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); + // + // 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, 330); + 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); + // + // ArchetypeNameTextBox + // + this.ArchetypeNameTextBox.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.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); + // + // 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); + // + // PhysicsDictionaryTextBox + // + this.PhysicsDictionaryTextBox.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.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); + // + // ClipDictionaryTextBox + // + this.ClipDictionaryTextBox.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.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); + // + // AssetNameTextBox + // + this.AssetNameTextBox.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.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); + // + // TextureDictTextBox + // + this.TextureDictTextBox.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.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); + // + // label12 + // + this.label12.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label12.AutoSize = true; + this.label12.Location = new System.Drawing.Point(8, 385); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(55, 13); + this.label12.TabIndex = 76; + this.label12.Text = "BSCenter:"; + // + // label11 + // + this.label11.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label11.AutoSize = true; + this.label11.Location = new System.Drawing.Point(19, 359); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(44, 13); + this.label11.TabIndex = 74; + this.label11.Text = "BBMax:"; + // + // label5 + // + this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(24, 333); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(41, 13); + this.label5.TabIndex = 72; + this.label5.Text = "BBMin:"; + // + // PhysicsDictHashLabel + // + this.PhysicsDictHashLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | 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:"; + // + // TextureDictHashLabel + // + this.TextureDictHashLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | 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:"; + // + // 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 - Unk07", + "128 - Unk08", + "256 - Unk09", + "512 - Unk10", + "1024 - Unk11", + "2048 - Unk12", + "4096 - Unk13", + "8192 - Unk14", + "16384 - Unk15", + "32768 - Unk16", + "65536 - Unk17", + "131072 - Unk18", + "262144 - Unk19", + "524288 - Unk20", + "1048576 - Unk21", + "2097152 - Unk22", + "4194304 - Unk23", + "8388608 - Unk24", + "16777216 - Unk25", + "33554432 - Unk26", + "67108864 - Unk27", + "134217728 - Unk28", + "268435456 - Unk29", + "536870912 - Unk30", + "1073741824 - Unk31", + "2147483648 - Unk32"}); + this.EntityFlagsCheckedListBox.Location = new System.Drawing.Point(422, 38); + this.EntityFlagsCheckedListBox.Name = "EntityFlagsCheckedListBox"; + this.EntityFlagsCheckedListBox.Size = new System.Drawing.Size(201, 274); + this.EntityFlagsCheckedListBox.TabIndex = 67; + this.EntityFlagsCheckedListBox.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.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:"; + // + // SpecialAttributeNumericUpDown + // + this.SpecialAttributeNumericUpDown.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.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); + // + // label10 + // + this.label10.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.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:"; + // + // label9 + // + this.label9.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.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:"; + // + // AssetTypeComboBox + // + this.AssetTypeComboBox.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.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; + // + // label8 + // + this.label8.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.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:"; + // + // label7 + // + this.label7.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.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:"; + // + // label6 + // + this.label6.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.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:"; + // + // label4 + // + this.label4.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.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:"; + // + // HDTextureDistNumericUpDown + // + this.HDTextureDistNumericUpDown.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.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); + // + // label3 + // + this.label3.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.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:"; + // + // LodDistNumericUpDown + // + this.LodDistNumericUpDown.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.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); + // + // label2 + // + this.label2.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.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:"; + // + // label1 + // + this.label1.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.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:"; + // + // TabControl + // + this.TabControl.Controls.Add(this.BaseArchetypeTabPage); + this.TabControl.Controls.Add(this.MloArchetypeTabPage); + 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; + // + // MloArchetypeTabPage + // + this.MloArchetypeTabPage.Controls.Add(this.EntitySetsListBox); + this.MloArchetypeTabPage.Controls.Add(this.label15); + 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; + // + // EntitySetsListBox + // + this.EntitySetsListBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.EntitySetsListBox.CheckOnClick = true; + this.EntitySetsListBox.FormattingEnabled = true; + this.EntitySetsListBox.Location = new System.Drawing.Point(11, 42); + this.EntitySetsListBox.Name = "EntitySetsListBox"; + this.EntitySetsListBox.Size = new System.Drawing.Size(603, 214); + this.EntitySetsListBox.TabIndex = 2; + this.EntitySetsListBox.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.EntitySetsListBox_ItemCheck); + // + // label15 + // + this.label15.AutoSize = true; + this.label15.Location = new System.Drawing.Point(8, 26); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(57, 13); + this.label15.TabIndex = 1; + this.label15.Text = "EntitySets:"; + // + // 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.MloArchetypeTabPage.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.TabPage BaseArchetypeTabPage; + private System.Windows.Forms.Button ArchetypeDeleteButton; + private System.Windows.Forms.Label label13; + private System.Windows.Forms.TextBox BSRadiusTextBox; + private System.Windows.Forms.TextBox BSCenterTextBox; + private System.Windows.Forms.TextBox BBMaxTextBox; + private System.Windows.Forms.TextBox BBMinTextBox; + private System.Windows.Forms.TextBox ArchetypeNameTextBox; + private System.Windows.Forms.TextBox ArchetypeFlagsTextBox; + private System.Windows.Forms.TextBox PhysicsDictionaryTextBox; + private System.Windows.Forms.TextBox ClipDictionaryTextBox; + private System.Windows.Forms.TextBox AssetNameTextBox; + private System.Windows.Forms.TextBox TextureDictTextBox; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label PhysicsDictHashLabel; + private System.Windows.Forms.Label TextureDictHashLabel; + private System.Windows.Forms.CheckedListBox EntityFlagsCheckedListBox; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.NumericUpDown SpecialAttributeNumericUpDown; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.ComboBox AssetTypeComboBox; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.NumericUpDown HDTextureDistNumericUpDown; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.NumericUpDown LodDistNumericUpDown; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TabControl TabControl; + private System.Windows.Forms.TabPage MloArchetypeTabPage; + private System.Windows.Forms.CheckedListBox EntitySetsListBox; + private System.Windows.Forms.Label label15; + } +} \ No newline at end of file diff --git a/Project/Panels/EditYtypArchetypePanel.cs b/Project/Panels/EditYtypArchetypePanel.cs new file mode 100644 index 0000000..79fc5a6 --- /dev/null +++ b/Project/Panels/EditYtypArchetypePanel.cs @@ -0,0 +1,353 @@ +using System; +using System.Globalization; +using System.Windows.Forms; +using CodeWalker.GameFiles; +using SharpDX; + +namespace CodeWalker.Project.Panels +{ + public partial class EditYtypArchetypePanel : ProjectPanel + { + public ProjectForm ProjectForm; + + private bool populatingui; + + public EditYtypArchetypePanel(ProjectForm owner) + { + InitializeComponent(); + + ProjectForm = owner; + } + + public Archetype CurrentArchetype { get; set; } + + private void EditYtypArchetypePanel_Load(object sender, EventArgs e) + { + AssetTypeComboBox.Items.AddRange(Enum.GetNames(typeof(Unk_1991964615))); + } + + public void SetArchetype(Archetype archetype) + { + CurrentArchetype = archetype; + Tag = archetype; + UpdateFormTitle(); + UpdateControls(); + } + + private void UpdateFormTitle() + { + Text = CurrentArchetype?.Name ?? "Edit Archetype"; + } + + private void UpdateControls() + { + if (CurrentArchetype != null) + { + 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; + ArchetypeFlagsTextBox.Text = CurrentArchetype._BaseArchetypeDef.flags.ToString(); + TextureDictTextBox.Text = CurrentArchetype._BaseArchetypeDef.textureDictionary.ToCleanString(); + ClipDictionaryTextBox.Text = CurrentArchetype._BaseArchetypeDef.clipDictionary.ToCleanString(); + PhysicsDictionaryTextBox.Text = CurrentArchetype._BaseArchetypeDef.physicsDictionary.ToCleanString(); + AssetTypeComboBox.Text = CurrentArchetype._BaseArchetypeDef.assetType.ToString(); + BBMinTextBox.Text = FloatUtil.GetVector3String(CurrentArchetype._BaseArchetypeDef.bbMin); + BBMaxTextBox.Text = FloatUtil.GetVector3String(CurrentArchetype._BaseArchetypeDef.bbMax); + BSCenterTextBox.Text = FloatUtil.GetVector3String(CurrentArchetype._BaseArchetypeDef.bsCentre); + BSRadiusTextBox.Text = CurrentArchetype._BaseArchetypeDef.bsRadius.ToString(CultureInfo.InvariantCulture); + + EntitySetsListBox.Items.Clear(); + if (CurrentArchetype is MloArchetype MloArchetype) + { + if (!TabControl.TabPages.Contains(MloArchetypeTabPage)) + { + TabControl.TabPages.Add(MloArchetypeTabPage); + } + + MloInstanceData mloinstance = ProjectForm.TryGetMloInstance(MloArchetype); + if (mloinstance != null) + { + EntitySetsListBox.Enabled = true; + foreach (var sets in mloinstance.EntitySets) + { + MloInstanceEntitySet set = sets.Value; + EntitySetsListBox.Items.Add(set.EntitySet.ToString(), set.Visible); + } + } + else EntitySetsListBox.Enabled = false; + } + else TabControl.TabPages.Remove(MloArchetypeTabPage); + } + } + + private void ArchetypeFlagsTextBox_TextChanged(object sender, EventArgs e) + { + if (populatingui) return; + if (CurrentArchetype == null) return; + uint flags = 0; + uint.TryParse(ArchetypeFlagsTextBox.Text, out flags); + populatingui = true; + for (int i = 0; i < EntityFlagsCheckedListBox.Items.Count; i++) + { + var c = ((flags & (1u << i)) > 0); + EntityFlagsCheckedListBox.SetItemCheckState(i, c ? CheckState.Checked : CheckState.Unchecked); + } + populatingui = false; + lock (ProjectForm.ProjectSyncRoot) + { + if (CurrentArchetype._BaseArchetypeDef.flags != flags) + { + CurrentArchetype._BaseArchetypeDef.flags = flags; + ProjectForm.SetYtypHasChanged(true); + } + } + } + + private void ArchetypeFlagsCheckedListBox_ItemCheck(object sender, ItemCheckEventArgs e) + { + if (populatingui) return; + if (CurrentArchetype == null) return; + uint flags = 0; + for (int i = 0; i < EntityFlagsCheckedListBox.Items.Count; i++) + { + if (e.Index == i) + { + if (e.NewValue == CheckState.Checked) + { + flags += (uint)(1 << i); + } + } + else + { + if (EntityFlagsCheckedListBox.GetItemChecked(i)) + { + flags += (uint)(1 << i); + } + } + } + populatingui = true; + ArchetypeFlagsTextBox.Text = flags.ToString(); + populatingui = false; + lock (ProjectForm.ProjectSyncRoot) + { + if (CurrentArchetype._BaseArchetypeDef.flags != flags) + { + CurrentArchetype._BaseArchetypeDef.flags = flags; + ProjectForm.SetYtypHasChanged(true); + } + } + } + + private void TextureDictTextBox_TextChanged(object sender, EventArgs e) + { + // Check that the form is not null before locking... + if (ProjectForm == null) + return; + + lock (ProjectForm.ProjectSyncRoot) + { + // Embedded... + if (TextureDictTextBox.Text == ArchetypeNameTextBox.Text) + { + TextureDictHashLabel.Text = "Embedded"; + CurrentArchetype._BaseArchetypeDef.textureDictionary = CurrentArchetype._BaseArchetypeDef.name; + return; + } + + var hash = JenkHash.GenHash(TextureDictTextBox.Text); + + if (CurrentArchetype._BaseArchetypeDef.textureDictionary != hash) + { + var ytd = ProjectForm.GameFileCache.GetYtd(hash); + if (ytd == null) + { + TextureDictHashLabel.Text = "Hash: " + hash.ToString() + " (invalid)"; + ProjectForm.SetYtypHasChanged(true); + return; + } + TextureDictHashLabel.Text = "Hash: " + hash.ToString(); + CurrentArchetype._BaseArchetypeDef.textureDictionary = hash; + ProjectForm.SetYtypHasChanged(true); + } + } + } + + private void PhysicsDictionaryTextBox_TextChanged(object sender, EventArgs e) + { + lock (ProjectForm.ProjectSyncRoot) + { + if (ProjectForm == null) + { + return; + } + + // Embedded... + if (PhysicsDictionaryTextBox.Text == ArchetypeNameTextBox.Text) + { + PhysicsDictHashLabel.Text = "Embedded"; + CurrentArchetype._BaseArchetypeDef.physicsDictionary = CurrentArchetype._BaseArchetypeDef.name; + return; + } + + var hash = JenkHash.GenHash(PhysicsDictionaryTextBox.Text); + + if (CurrentArchetype._BaseArchetypeDef.physicsDictionary != hash) + { + var ytd = ProjectForm.GameFileCache.GetYbn(hash); + if (ytd == null) + { + PhysicsDictHashLabel.Text = "Hash: " + hash.ToString() + " (invalid)"; + ProjectForm.SetYtypHasChanged(true); + return; + } + PhysicsDictHashLabel.Text = "Hash: " + hash.ToString(); + + CurrentArchetype._BaseArchetypeDef.physicsDictionary = hash; + ProjectForm.SetYtypHasChanged(true); + } + } + } + + private void ArchetypeNameTextBox_TextChanged(object sender, EventArgs e) + { + var hash = JenkHash.GenHash(ArchetypeNameTextBox.Text); + + if (CurrentArchetype._BaseArchetypeDef.name != hash) + { + CurrentArchetype._BaseArchetypeDef.name = hash; + UpdateFormTitle(); + + TreeNode tn = ProjectForm.ProjectExplorer?.FindArchetypeTreeNode(CurrentArchetype); + if (tn != null) + tn.Text = ArchetypeNameTextBox.Text ?? "0"; // using the text box text because the name may not be in the gfc. + + ProjectForm.SetYtypHasChanged(true); + } + } + + private void AssetNameTextBox_TextChanged(object sender, EventArgs e) + { + var hash = JenkHash.GenHash(AssetNameTextBox.Text); + + if (CurrentArchetype._BaseArchetypeDef.assetName != hash) + { + CurrentArchetype._BaseArchetypeDef.assetName = hash; + ProjectForm.SetYtypHasChanged(true); + } + } + + private void ClipDictionaryTextBox_TextChanged(object sender, EventArgs e) + { + var hash = JenkHash.GenHash(ClipDictionaryTextBox.Text); + + if (CurrentArchetype._BaseArchetypeDef.clipDictionary != hash) + { + CurrentArchetype._BaseArchetypeDef.clipDictionary = hash; + ProjectForm.SetYtypHasChanged(true); + } + } + + private void LodDistNumericUpDown_ValueChanged(object sender, EventArgs e) + { + var loddist = (float)LodDistNumericUpDown.Value; + if (!MathUtil.NearEqual(loddist, CurrentArchetype._BaseArchetypeDef.lodDist)) + { + CurrentArchetype._BaseArchetypeDef.lodDist = loddist; + ProjectForm.SetYtypHasChanged(true); + } + } + + private void HDTextureDistNumericUpDown_ValueChanged(object sender, EventArgs e) + { + var hddist = (float)HDTextureDistNumericUpDown.Value; + if (!MathUtil.NearEqual(hddist, CurrentArchetype._BaseArchetypeDef.hdTextureDist)) + { + CurrentArchetype._BaseArchetypeDef.hdTextureDist = hddist; + ProjectForm.SetYtypHasChanged(true); + } + } + + private void SpecialAttributeNumericUpDown_ValueChanged(object sender, EventArgs e) + { + var att = (uint)SpecialAttributeNumericUpDown.Value; + if (CurrentArchetype._BaseArchetypeDef.specialAttribute != att) + { + CurrentArchetype._BaseArchetypeDef.specialAttribute = att; + ProjectForm.SetYtypHasChanged(true); + } + } + + private void BBMinTextBox_TextChanged(object sender, EventArgs e) + { + Vector3 min = FloatUtil.ParseVector3String(BBMinTextBox.Text); + if (CurrentArchetype._BaseArchetypeDef.bbMin != min) + { + CurrentArchetype._BaseArchetypeDef.bbMin = min; + ProjectForm.SetYtypHasChanged(true); + } + } + + private void BBMaxTextBox_TextChanged(object sender, EventArgs e) + { + Vector3 max = FloatUtil.ParseVector3String(BBMaxTextBox.Text); + + if (CurrentArchetype._BaseArchetypeDef.bbMax != max) + { + CurrentArchetype._BaseArchetypeDef.bbMax = max; + ProjectForm.SetYtypHasChanged(true); + } + } + + private void BSCenterTextBox_TextChanged(object sender, EventArgs e) + { + Vector3 c = FloatUtil.ParseVector3String(BSCenterTextBox.Text); + + if (CurrentArchetype._BaseArchetypeDef.bsCentre != c) + { + CurrentArchetype._BaseArchetypeDef.bsCentre = c; + ProjectForm.SetYtypHasChanged(true); + } + } + + private void BSRadiusTextBox_TextChanged(object sender, EventArgs e) + { + if (float.TryParse(BSRadiusTextBox.Text, out float f)) + { + if (!MathUtil.NearEqual(CurrentArchetype._BaseArchetypeDef.bsRadius, f)) + { + CurrentArchetype._BaseArchetypeDef.bsRadius = f; + ProjectForm.SetYtypHasChanged(true); + } + } + else + { + CurrentArchetype._BaseArchetypeDef.bsRadius = 0f; + ProjectForm.SetYtypHasChanged(true); + } + } + + private void DeleteArchetypeButton_Click(object sender, EventArgs e) + { + ProjectForm.SetProjectItem(CurrentArchetype); + ProjectForm.DeleteArchetype(); + } + + private void EntitySetsListBox_ItemCheck(object sender, ItemCheckEventArgs e) + { + if (CurrentArchetype is MloArchetype MloArchetype) + { + var inst = ProjectForm.TryGetMloInstance(MloArchetype); + if (inst != null) + { + MloInstanceEntitySet mloInstanceEntitySet = inst.EntitySets[MloArchetype.entitySets[e.Index]._Data.name]; + mloInstanceEntitySet.Visible = e.NewValue == CheckState.Checked; + return; + } + } + e.NewValue = CheckState.Unchecked; + } + } +} diff --git a/Project/Panels/EditYtypArchetypePanel.resx b/Project/Panels/EditYtypArchetypePanel.resx new file mode 100644 index 0000000..2d9a79e --- /dev/null +++ b/Project/Panels/EditYtypArchetypePanel.resx @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + AAABAAEAEBAAAAAAGABoAwAAFgAAACgAAAAQAAAAIAAAAAEAGAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAD////r7/3y9f7///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///+P + lce/xeb///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///+Ah7a0utv///////// + //////////8AAAAAAAAAAAD////x9P73+v7///////////+Mk8K6weH////s8Pu6wOj9/f////8AAAAA + AAAAAAD///+epdgZHILl6/z///////+NlMPIzuj///8rL41larT///////8AAAAAAAAAAAD////w9P9I + T6bAxuv///////+stNne5PP///96gMfv8/3///8AAAAAAAAAAAAAAAAAAAD////////////////M0/Fe + Z7NUXK3c4fX///////////8AAAAAAAAAAAAAAAAAAAD////////+/v+osd55gcRbYbZncLtPVqmwueP7 + /f/6/P/4+v/9/f8AAAAAAAAAAADo7fx+iNBSXLJKUqhxfsETGoRWYbOIk9QLDXNaYK5udr9kbLjv8/4A + AAD////////y9v3Cye66w+uPleA2PqM1PpmJlNF9h8tYX7LO1fLq7/zz9v7///8AAAD////j6fnf5Pf/ + ///////j6f+Lkd8rMplteMWDjNHw9Pz////l6vq4v+j4+v8AAADq7/4+Q520u+T////////////1+P/v + 9P7m6/v6+//////////a4foYGYShqNkAAADw8/3i5/n////4+v9jarba4Pf////h5/j9/v/9/v9YXrHC + yev////y9v3q7vwAAAAAAAAAAAD////K0e9LUaf9/v/7/P82OozT2O////9PVqlqcLv///8AAAAAAAAA + AAAAAAAAAAAAAAD2+P76+//////7/P+VndXh5vj////7/P/09/8AAAAAAAAAAAAAAAD//wAA/D8AAPw/ + AAD8AwAAgAMAAIADAACABwAAwAcAAMABAADAAQAAAAEAAAABAAAAAQAAAAEAAMAHAADgDwAA + + + \ No newline at end of file diff --git a/Project/Panels/EditYtypPanel.Designer.cs b/Project/Panels/EditYtypPanel.Designer.cs index 8b545b4..ac6c8c5 100644 --- a/Project/Panels/EditYtypPanel.Designer.cs +++ b/Project/Panels/EditYtypPanel.Designer.cs @@ -29,34 +29,20 @@ private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EditYtypPanel)); - this.label1 = new System.Windows.Forms.Label(); this.SuspendLayout(); // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(58, 52); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(99, 13); - this.label1.TabIndex = 0; - this.label1.Text = "Ytyp editing TODO!"; - // // EditYtypPanel // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(469, 292); - this.Controls.Add(this.label1); + this.ClientSize = new System.Drawing.Size(599, 406); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Name = "EditYtypPanel"; this.Text = "Edit Ytyp"; this.ResumeLayout(false); - this.PerformLayout(); } #endregion - - private System.Windows.Forms.Label label1; } } \ No newline at end of file diff --git a/Project/Panels/ProjectExplorerPanel.cs b/Project/Panels/ProjectExplorerPanel.cs index 027b2e4..9fff95b 100644 --- a/Project/Panels/ProjectExplorerPanel.cs +++ b/Project/Panels/ProjectExplorerPanel.cs @@ -248,8 +248,53 @@ namespace CodeWalker.Project.Panels } } - private void LoadYtypTreeNodes(YtypFile ytyp, TreeNode node)//TODO! + private void LoadYtypTreeNodes(YtypFile ytyp, TreeNode node) { + if (ytyp == null) return; + + if (!string.IsNullOrEmpty(node.Name)) return; + + node.Nodes.Clear(); + + if ((ytyp.AllArchetypes != null) && (ytyp.AllArchetypes.Length > 0)) + { + var archetypesnode = node.Nodes.Add("Archetypes (" + ytyp.AllArchetypes.Length.ToString() + ")"); + archetypesnode.Name = "Archetypes"; + archetypesnode.Tag = ytyp; + var archetypes = ytyp.AllArchetypes; + for (int i = 0; i < archetypes.Length; i++) + { + var yarch = archetypes[i]; + var tarch = archetypesnode.Nodes.Add(yarch.Name); + tarch.Tag = yarch; + + if (yarch is MloArchetype mlo) + { + if ((mlo.entities.Length) > 0 && (mlo.rooms.Length > 0)) + { + MCEntityDef[] entities = mlo.entities; + var roomsnode = tarch.Nodes.Add("Rooms (" + mlo.rooms.Length.ToString() + ")"); + roomsnode.Name = "Rooms"; + for (int j = 0; j < mlo.rooms.Length; j++) + { + MCMloRoomDef room = mlo.rooms[j]; + var roomnode = roomsnode.Nodes.Add(room.RoomName); + roomnode.Tag = room; + var entitiesnode = roomnode.Nodes.Add("Attached Objects (" + room.AttachedObjects.Length + ")"); + entitiesnode.Name = "Attached Objects"; + + for (int k = 0; k < room.AttachedObjects.Length; k++) + { + uint attachedObject = room.AttachedObjects[k]; + MCEntityDef ent = entities[attachedObject]; + TreeNode entnode = entitiesnode.Nodes.Add(ent.ToString()); + entnode.Tag = ent; + } + } + } + } + } + } } private void LoadYndTreeNodes(YndFile ynd, TreeNode node) { @@ -726,7 +771,101 @@ namespace CodeWalker.Project.Panels } return null; } + public TreeNode FindYtypTreeNode(YtypFile ytyp) + { + if (ProjectTreeView.Nodes.Count <= 0) return null; + var projnode = ProjectTreeView.Nodes[0]; + var ytypsnode = GetChildTreeNode(projnode, "Ytyp"); + if (ytypsnode == null) return null; + for (int i = 0; i < ytypsnode.Nodes.Count; i++) + { + var ytypnode = ytypsnode.Nodes[i]; + if (ytypnode.Tag == ytyp) return ytypnode; + } + return null; + } + public TreeNode FindArchetypeTreeNode(Archetype archetype) + { + if (archetype == null) return null; + TreeNode ytypnode = FindYtypTreeNode(archetype.Ytyp); + if (ytypnode == null) return null; + var archetypenode = GetChildTreeNode(ytypnode, "Archetypes"); + if (archetypenode == null) return null; + for (int i = 0; i < archetypenode.Nodes.Count; i++) + { + TreeNode archnode = archetypenode.Nodes[i]; + if (archnode.Tag == archetype) return archnode; + } + return null; + } + public TreeNode FindMloRoomTreeNode(MCMloRoomDef room) + { + if (room == null) return null; + TreeNode ytypnode = FindYtypTreeNode(room.Archetype.Ytyp); + if (ytypnode == null) return null; + + TreeNode archetypesnode = GetChildTreeNode(ytypnode, "Archetypes"); + if (archetypesnode == null) return null; + + for (int i = 0; i < archetypesnode.Nodes.Count; i++) + { + TreeNode mloarchetypenode = archetypesnode.Nodes[i]; + if (mloarchetypenode.Tag == room.Archetype) + { + TreeNode roomsnode = GetChildTreeNode(mloarchetypenode, "Rooms"); + if (roomsnode == null) return null; + + for (int j = 0; j < roomsnode.Nodes.Count; j++) + { + TreeNode roomnode = roomsnode.Nodes[j]; + if (roomnode.Tag == room) return roomnode; + } + break; + } + } + return null; + } + public TreeNode FindMloEntityTreeNode(MCEntityDef ent) + { + MCMloRoomDef entityroom = ent?.Archetype?.GetEntityRoom(ent); + if (entityroom == null) return null; + + TreeNode ytypnode = FindYtypTreeNode(ent.Archetype.Ytyp); + if (ytypnode == null) return null; + + var archetypesnode = GetChildTreeNode(ytypnode, "Archetypes"); + if (archetypesnode == null) return null; + + for (int i = 0; i < archetypesnode.Nodes.Count; i++) + { + TreeNode mloarchetypenode = archetypesnode.Nodes[i]; + if (mloarchetypenode.Tag == ent.Archetype) + { + TreeNode roomsnode = GetChildTreeNode(mloarchetypenode, "Rooms"); + if (roomsnode == null) return null; + + for (int j = 0; j < roomsnode.Nodes.Count; j++) + { + TreeNode roomnode = roomsnode.Nodes[j]; + if (roomnode.Tag == entityroom) + { + TreeNode entitiesnode = GetChildTreeNode(roomnode, "Attached Objects"); + if (entitiesnode == null) return null; + + for (var k = 0; k < entitiesnode.Nodes.Count; k++) + { + TreeNode entitynode = entitiesnode.Nodes[k]; + if (entitynode.Tag == ent) return entitynode; + } + break; + } + } + break; + } + } + return null; + } public TreeNode FindYndTreeNode(YndFile ynd) { if (ProjectTreeView.Nodes.Count <= 0) return null; @@ -974,6 +1113,51 @@ namespace CodeWalker.Project.Panels } } } + public void TrySelectMloEntityTreeNode(MCEntityDef ent) + { + TreeNode entnode = FindMloEntityTreeNode(ent); + if (entnode != null) + { + if (ProjectTreeView.SelectedNode == entnode) + { + OnItemSelected?.Invoke(ent); + } + else + { + ProjectTreeView.SelectedNode = entnode; + } + } + } + public void TrySelectMloRoomTreeNode(MCMloRoomDef room) + { + TreeNode roomnode = FindMloRoomTreeNode(room); + if (roomnode != null) + { + if (ProjectTreeView.SelectedNode == roomnode) + { + OnItemSelected?.Invoke(room); + } + else + { + ProjectTreeView.SelectedNode = roomnode; + } + } + } + public void TrySelectArchetypeTreeNode(Archetype archetype) + { + TreeNode archetypenode = FindArchetypeTreeNode(archetype); + if (archetypenode != null) + { + if (ProjectTreeView.SelectedNode == archetypenode) + { + OnItemSelected?.Invoke(archetype); + } + else + { + ProjectTreeView.SelectedNode = archetypenode; + } + } + } public void TrySelectPathNodeTreeNode(YndNode node) { TreeNode tnode = FindPathNodeTreeNode(node); @@ -1195,6 +1379,16 @@ namespace CodeWalker.Project.Panels } } + + + public void UpdateArchetypeTreeNode(Archetype archetype) + { + var tn = FindArchetypeTreeNode(archetype); + if (tn != null) + { + tn.Text = archetype._BaseArchetypeDef.ToString(); + } + } public void UpdateCarGenTreeNode(YmapCarGen cargen) { var tn = FindCarGenTreeNode(cargen); @@ -1266,6 +1460,7 @@ namespace CodeWalker.Project.Panels } + public void RemoveEntityTreeNode(YmapEntityDef ent) { var tn = FindEntityTreeNode(ent); @@ -1275,6 +1470,7 @@ namespace CodeWalker.Project.Panels tn.Parent.Nodes.Remove(tn); } } + public void RemoveCarGenTreeNode(YmapCarGen cargen) { var tn = FindCarGenTreeNode(cargen); @@ -1294,6 +1490,28 @@ namespace CodeWalker.Project.Panels tn.Parent.Nodes.Remove(tn); } } + public void RemoveArchetypeTreeNode(Archetype archetype) + { + var tn = FindArchetypeTreeNode(archetype); + if ((tn != null) && (tn.Parent != null)) + { + tn.Parent.Text = "Archetypes (" + archetype.Ytyp.AllArchetypes.Length.ToString() + ")"; + tn.Parent.Nodes.Remove(tn); + } + } + public void RemoveMloEntityTreeNode(MCEntityDef ent) + { + var tn = FindMloEntityTreeNode(ent); + if ((tn != null) && (tn.Parent != null)) + { + var tnp = tn.Parent.Parent; + MCMloRoomDef room = null; + if (tnp != null) room = tnp.Tag as MCMloRoomDef; + + tn.Parent.Text = "Attached Objects (" + (room?.AttachedObjects.Length - 1 ?? 0) + ")"; + tn.Parent.Nodes.Remove(tn); + } + } public void RemovePathNodeTreeNode(YndNode node) { var tn = FindPathNodeTreeNode(node); diff --git a/Project/ProjectFile.cs b/Project/ProjectFile.cs index af5451e..9906b9f 100644 --- a/Project/ProjectFile.cs +++ b/Project/ProjectFile.cs @@ -59,10 +59,11 @@ namespace CodeWalker.Project Xml.AddChildWithInnerText(doc, ytypselem, "Item", ytypfilename); } + var yndselem = Xml.AddChild(doc, projelem, "YndFilenames"); foreach (string yndfilename in YndFilenames) { - Xml.AddChildWithInnerText(doc, yndselem, "Item", yndfilename); + Xml.AddChildWithInnerText(doc, ytypselem, "Item", yndfilename); } var ynvselem = Xml.AddChild(doc, projelem, "YnvFilenames"); diff --git a/Project/ProjectForm.Designer.cs b/Project/ProjectForm.Designer.cs index 00e8469..3faf152 100644 --- a/Project/ProjectForm.Designer.cs +++ b/Project/ProjectForm.Designer.cs @@ -155,6 +155,8 @@ this.ToolbarSaveButton = new System.Windows.Forms.ToolStripButton(); this.ToolbarSaveAllButton = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator(); + this.YtypMloToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.YtypMloNewEntityToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.MainMenu.SuspendLayout(); this.MainToolbar.SuspendLayout(); this.SuspendLayout(); @@ -282,54 +284,54 @@ // FileOpenProjectMenu // this.FileOpenProjectMenu.Name = "FileOpenProjectMenu"; - this.FileOpenProjectMenu.Size = new System.Drawing.Size(149, 22); + this.FileOpenProjectMenu.Size = new System.Drawing.Size(152, 22); this.FileOpenProjectMenu.Text = "Project..."; this.FileOpenProjectMenu.Click += new System.EventHandler(this.FileOpenProjectMenu_Click); // // toolStripSeparator9 // this.toolStripSeparator9.Name = "toolStripSeparator9"; - this.toolStripSeparator9.Size = new System.Drawing.Size(146, 6); + this.toolStripSeparator9.Size = new System.Drawing.Size(149, 6); // // FileOpenYmapMenu // this.FileOpenYmapMenu.Name = "FileOpenYmapMenu"; - this.FileOpenYmapMenu.Size = new System.Drawing.Size(149, 22); + this.FileOpenYmapMenu.Size = new System.Drawing.Size(152, 22); this.FileOpenYmapMenu.Text = "Ymap File..."; this.FileOpenYmapMenu.Click += new System.EventHandler(this.FileOpenYmapMenu_Click); // // FileOpenYtypMenu // this.FileOpenYtypMenu.Name = "FileOpenYtypMenu"; - this.FileOpenYtypMenu.Size = new System.Drawing.Size(149, 22); + this.FileOpenYtypMenu.Size = new System.Drawing.Size(152, 22); this.FileOpenYtypMenu.Text = "Ytyp File..."; this.FileOpenYtypMenu.Click += new System.EventHandler(this.FileOpenYtypMenu_Click); // // FileOpenYndMenu // this.FileOpenYndMenu.Name = "FileOpenYndMenu"; - this.FileOpenYndMenu.Size = new System.Drawing.Size(149, 22); + this.FileOpenYndMenu.Size = new System.Drawing.Size(152, 22); this.FileOpenYndMenu.Text = "Ynd File..."; this.FileOpenYndMenu.Click += new System.EventHandler(this.FileOpenYndMenu_Click); // // FileOpenYnvMenu // this.FileOpenYnvMenu.Name = "FileOpenYnvMenu"; - this.FileOpenYnvMenu.Size = new System.Drawing.Size(149, 22); + this.FileOpenYnvMenu.Size = new System.Drawing.Size(152, 22); this.FileOpenYnvMenu.Text = "Ynv File..."; this.FileOpenYnvMenu.Click += new System.EventHandler(this.FileOpenYnvMenu_Click); // // FileOpenTrainsMenu // this.FileOpenTrainsMenu.Name = "FileOpenTrainsMenu"; - this.FileOpenTrainsMenu.Size = new System.Drawing.Size(149, 22); + this.FileOpenTrainsMenu.Size = new System.Drawing.Size(152, 22); this.FileOpenTrainsMenu.Text = "Trains File..."; this.FileOpenTrainsMenu.Click += new System.EventHandler(this.FileOpenTrainsMenu_Click); // // FileOpenScenarioMenu // this.FileOpenScenarioMenu.Name = "FileOpenScenarioMenu"; - this.FileOpenScenarioMenu.Size = new System.Drawing.Size(149, 22); + this.FileOpenScenarioMenu.Size = new System.Drawing.Size(152, 22); this.FileOpenScenarioMenu.Text = "Scenario File..."; this.FileOpenScenarioMenu.Click += new System.EventHandler(this.FileOpenScenarioMenu_Click); // @@ -594,6 +596,7 @@ this.YtypNameMenu, this.toolStripSeparator13, this.YtypNewArchetypeMenu, + this.YtypMloToolStripMenuItem, this.toolStripSeparator15, this.YtypAddToProjectMenu, this.YtypRemoveFromProjectMenu}); @@ -1174,6 +1177,22 @@ this.toolStripSeparator5.Name = "toolStripSeparator5"; this.toolStripSeparator5.Size = new System.Drawing.Size(6, 25); // + // YtypMloToolStripMenuItem + // + this.YtypMloToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.YtypMloNewEntityToolStripMenuItem}); + this.YtypMloToolStripMenuItem.Enabled = false; + this.YtypMloToolStripMenuItem.Name = "YtypMloToolStripMenuItem"; + this.YtypMloToolStripMenuItem.Size = new System.Drawing.Size(192, 22); + this.YtypMloToolStripMenuItem.Text = "Mlo"; + // + // YtypMloNewEntityToolStripMenuItem + // + this.YtypMloNewEntityToolStripMenuItem.Name = "YtypMloNewEntityToolStripMenuItem"; + this.YtypMloNewEntityToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.YtypMloNewEntityToolStripMenuItem.Text = "New Entity"; + this.YtypMloNewEntityToolStripMenuItem.Click += new System.EventHandler(this.YtypMloNewEntityToolStripMenuItem_Click); + // // ProjectForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -1325,5 +1344,7 @@ private System.Windows.Forms.ToolStripMenuItem ScenarioAddToProjectMenu; private System.Windows.Forms.ToolStripMenuItem ScenarioRemoveFromProjectMenu; private System.Windows.Forms.ToolStripMenuItem YmapNewGrassBatchMenu; + private System.Windows.Forms.ToolStripMenuItem YtypMloToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem YtypMloNewEntityToolStripMenuItem; } } \ No newline at end of file diff --git a/Project/ProjectForm.cs b/Project/ProjectForm.cs index 3a9b906..5c3bdb2 100644 --- a/Project/ProjectForm.cs +++ b/Project/ProjectForm.cs @@ -42,7 +42,9 @@ namespace CodeWalker.Project private YmapGrassInstanceBatch CurrentGrassBatch; private YtypFile CurrentYtypFile; - //private Archetype CurrentArchetype; + private Archetype CurrentArchetype; + private MCEntityDef CurrentMloEntity; + private MCMloRoomDef CurrentMloRoom; private YndFile CurrentYndFile; private YndNode CurrentPathNode; @@ -76,6 +78,7 @@ namespace CodeWalker.Project private Dictionary visibleynvs = new Dictionary(); private Dictionary visibletrains = new Dictionary(); private Dictionary visiblescenarios = new Dictionary(); + private Dictionary visiblemloentities = new Dictionary(); private bool ShowProjectItemInProcess = false; @@ -352,6 +355,13 @@ namespace CodeWalker.Project (panel) => { panel.SetYtyp(CurrentYtypFile); }, //updateFunc (panel) => { return panel.Ytyp == CurrentYtypFile; }); //findFunc } + private void ShowEditArchetypePanel(bool promote) + { + ShowPanel(promote, + () => { return new EditYtypArchetypePanel(this); }, //createFunc + (panel) => { panel.SetArchetype(CurrentArchetype); }, //updateFunc + (panel) => { return panel.CurrentArchetype == CurrentArchetype; }); //findFunc + } private void ShowEditYndPanel(bool promote) { ShowPanel(promote, @@ -422,6 +432,13 @@ namespace CodeWalker.Project (panel) => { panel.SetScenarioNode(CurrentScenarioNode); }, //updateFunc (panel) => { return panel.CurrentScenarioNode == CurrentScenarioNode; }); //findFunc } + private void ShowEditYtypArchetypeMloRoomPanel(bool promote) + { + ShowPanel(promote, + () => { return new EditYtypArchetypeMloRoomPanel(this); }, //createFunc + (panel) => { panel.SetRoom(CurrentMloRoom); }, //updateFunc + (panel) => { return panel.CurrentRoom == CurrentMloRoom; }); //findFunc + } private void ShowEditAudioFilePanel(bool promote) //TODO { } @@ -440,10 +457,22 @@ namespace CodeWalker.Project private void ShowCurrentProjectItem(bool promote) { - if (CurrentEntity != null) + if (CurrentMloEntity != null) { ShowEditYmapEntityPanel(promote); } + else if (CurrentMloRoom != null) + { + ShowEditYtypArchetypeMloRoomPanel(promote); + } + else if (CurrentEntity != null) + { + ShowEditYmapEntityPanel(promote); + } + else if (CurrentArchetype != null) + { + ShowEditArchetypePanel(promote); + } else if (CurrentCarGen != null) { ShowEditYmapCarGenPanel(promote); @@ -456,7 +485,7 @@ namespace CodeWalker.Project { ShowEditYmapPanel(promote); } - if (CurrentYtypFile != null) + else if (CurrentYtypFile != null) { ShowEditYtypPanel(promote); } @@ -542,10 +571,12 @@ namespace CodeWalker.Project public void SetProjectItem(object item) { CurrentYmapFile = item as YmapFile; + CurrentMloEntity = item as MCEntityDef; CurrentEntity = item as YmapEntityDef; CurrentCarGen = item as YmapCarGen; CurrentGrassBatch = item as YmapGrassInstanceBatch; CurrentYtypFile = item as YtypFile; + CurrentArchetype = item as Archetype; CurrentYndFile = item as YndFile; CurrentPathNode = item as YndNode; CurrentYnvFile = item as YnvFile; @@ -562,10 +593,33 @@ namespace CodeWalker.Project CurrentAudioEmitter = item as AudioPlacement; if (CurrentAudioEmitter?.AudioEmitter == null) CurrentAudioEmitter = null; CurrentAudioZoneList = item as Dat151AmbientZoneList; CurrentAudioEmitterList = item as Dat151AmbientEmitterList; + CurrentMloRoom = item as MCMloRoomDef; - if (CurrentEntity != null) + if (CurrentMloEntity != null) { - CurrentYmapFile = CurrentEntity.Ymap; + MloInstanceData instance = TryGetMloInstance(CurrentMloEntity.Archetype); + + if (instance != null) + { + CurrentEntity = instance.TryGetYmapEntity(CurrentMloEntity); + + CurrentYmapFile = instance.Owner?.Ymap; + } + + CurrentArchetype = CurrentEntity?.MloParent?.Archetype; + } + else if (CurrentEntity != null) + { + if (CurrentEntity.MloParent != null) + { + CurrentArchetype = CurrentEntity?.MloParent?.Archetype; + } + else + { + CurrentArchetype = CurrentEntity.Archetype; + + CurrentYmapFile = CurrentEntity.Ymap; + } } else if (CurrentCarGen != null) { @@ -575,6 +629,10 @@ namespace CodeWalker.Project { CurrentYmapFile = CurrentGrassBatch.Ymap; } + if (CurrentArchetype != null) + { + CurrentYtypFile = CurrentEntity?.MloParent?.Archetype?.Ytyp ?? CurrentArchetype?.Ytyp; + } if (CurrentPathNode != null) { CurrentYndFile = CurrentPathNode.Ynd; @@ -1372,30 +1430,56 @@ namespace CodeWalker.Project } public void AddEntityToProject() { - if (CurrentEntity == null) return; - - if (CurrentEntity.Ymap == null) + try { - MessageBox.Show("Sorry, interior entities cannot currently be added to the project."); - return; - } + if (CurrentEntity == null) return; + if (CurrentEntity.Ymap == null) + { + CurrentYtypFile = CurrentEntity.MloParent?.Archetype?.Ytyp; - CurrentYmapFile = CurrentEntity.Ymap; - if (!YmapExistsInProject(CurrentYmapFile)) - { - var ent = CurrentEntity; - CurrentYmapFile.HasChanged = true; - AddYmapToProject(CurrentYmapFile); + if (!YtypExistsInProject(CurrentYtypFile)) + { + if (CurrentEntity.MloParent?.MloInstance != null) + { + var inst = CurrentEntity.MloParent.MloInstance; + var mcEntity = inst.TryGetArchetypeEntity(CurrentEntity); + if (mcEntity != null) + { + YmapEntityDef ent = CurrentEntity; + CurrentYtypFile.HasChanged = true; + AddYtypToProject(CurrentYtypFile); + CurrentEntity = ent; + CurrentYtypFile = ent.MloParent.Archetype.Ytyp; + ProjectExplorer?.TrySelectMloEntityTreeNode(mcEntity); + } + } + } + return; + } - CurrentEntity = ent; //bug fix for some reason the treeview selects the project node here. - CurrentYmapFile = ent.Ymap; - ProjectExplorer?.TrySelectEntityTreeNode(ent); + CurrentYmapFile = CurrentEntity.Ymap; + if (!YmapExistsInProject(CurrentYmapFile)) + { + YmapEntityDef ent = CurrentEntity; + CurrentYmapFile.HasChanged = true; + AddYmapToProject(CurrentYmapFile); + + CurrentEntity = ent; //bug fix for some reason the treeview selects the project node here. + CurrentYmapFile = ent.Ymap; + ProjectExplorer?.TrySelectEntityTreeNode(ent); + } } + catch + { } } public bool DeleteEntity() { - if (CurrentYmapFile == null) return false; if (CurrentEntity == null) return false; + return CurrentYmapFile != null ? DeleteYmapEntity() : DeleteMloArchetypeEntity(); + } + + 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.. @@ -1932,8 +2016,73 @@ namespace CodeWalker.Project } } - public void SaveYtyp(bool saveas = false) //TODO! + public void SaveYtyp(bool saveas = false) { + if (CurrentYtypFile == null) return; + string ytypname = CurrentYtypFile.Name; + string filepath = CurrentYtypFile.FilePath; + if (string.IsNullOrEmpty(filepath)) + { + filepath = ytypname; + } + string origfile = filepath; + if (!File.Exists(filepath)) + { + saveas = true; + } + + + byte[] data; + lock (projectsyncroot) //need to sync writes to ytyp objects... + { + saveas = saveas || string.IsNullOrEmpty(filepath); + if (saveas) + { + filepath = ShowSaveDialog("Ytyp files|*.ytyp", filepath); + if (string.IsNullOrEmpty(filepath)) + { return; } + + string newname = Path.GetFileNameWithoutExtension(filepath); + JenkIndex.Ensure(newname); + CurrentYtypFile.FilePath = filepath; + CurrentYtypFile.RpfFileEntry.Name = new FileInfo(filepath).Name; + CurrentYtypFile.Name = CurrentYtypFile.RpfFileEntry.Name; + CurrentYtypFile._CMapTypes.name = new MetaHash(JenkHash.GenHash(newname)); + } + + data = CurrentYtypFile.Save(); + } + + + if (data != null) + { + File.WriteAllBytes(filepath, data); + } + + SetYtypHasChanged(false); + + if (saveas) + { + if (CurrentProjectFile != null) + { + string origpath = CurrentProjectFile.GetRelativePath(origfile); + string newpath = CurrentProjectFile.GetRelativePath(CurrentYtypFile.FilePath); + + if (!CurrentProjectFile.RenameYtyp(origpath, newpath)) + { //couldn't rename it in the project? + MessageBox.Show("Couldn't rename ytyp in project! This shouldn't happen - check the project file XML."); + } + } + SetProjectHasChanged(true); + SetCurrentSaveItem(); + } + + if (CurrentYtypFile.SaveWarnings != null) + { + string w = string.Join("\n", CurrentYtypFile.SaveWarnings); + MessageBox.Show(CurrentYtypFile.SaveWarnings.Count.ToString() + " warnings were generated while saving the ytyp:\n" + w); + CurrentYtypFile.SaveWarnings = null;//clear it out for next time.. + } } public void AddYtypToProject(YtypFile ytyp) { @@ -1968,6 +2117,241 @@ namespace CodeWalker.Project return CurrentProjectFile.ContainsYtyp(ytyp); } + public void NewArchetype(Archetype copy = null, bool copyPosition = false) + { + if (CurrentYtypFile == null) return; + var archetype = CurrentYtypFile.AddArchetype(); + var archetypeDef = archetype._BaseArchetypeDef; + if (copy == null) + { + copy = CurrentArchetype; + archetype._BaseArchetypeDef.name = JenkHash.GenHash("prop_alien_egg_01"); + } + if (copy != null) + { + archetype.Init(CurrentYtypFile, ref copy._BaseArchetypeDef); + } + archetype._BaseArchetypeDef = archetypeDef; + + LoadProjectTree(); + ProjectExplorer?.TrySelectArchetypeTreeNode(archetype); + CurrentArchetype = archetype; + } + public void NewMloEntity(YmapEntityDef copy = null, bool copyTransform = false) + { + if ((CurrentArchetype == null) || !(CurrentArchetype is MloArchetype mloArch)) + { + var arch = CurrentEntity?.MloParent.Archetype ?? CurrentMloRoom?.Archetype; + if (arch == null) + return; + + mloArch = arch as MloArchetype; + if (mloArch == null) + return; + + CurrentArchetype = mloArch; + } + + if (CurrentMloRoom == null) CurrentMloRoom = mloArch?.GetEntityRoom(CurrentMloEntity); + if (CurrentMloRoom == null) + { + return; + } + + MloInstanceData mloInstance = TryGetMloInstance(mloArch); + if (mloInstance == null) return; + + if (mloArch.rooms.Length <= 0) + { + MessageBox.Show($@"Mlo {mloArch.Name} has no rooms! Cannot create entity."); + return; + } + + int roomIndex = CurrentMloRoom.Index; + if (roomIndex < 0) + { + MessageBox.Show(@"Invalid room index."); + return; + } + if (roomIndex >= mloArch.rooms.Length) + { + MessageBox.Show( + $@"Room at index {roomIndex} does not exist in {mloArch.Name}! {mloArch.Name} only has { + mloArch.rooms.Length + } rooms."); + return; + } + + float spawndist = 5.0f; //use archetype BSradius if starting with a copy... + if (copy != null) + { + spawndist = copy.BSRadius * 2.5f; + } + + bool cp = copyTransform && (copy != null); + Vector3 pos = cp ? copy.CEntityDef.position : GetSpawnPosRel(spawndist, mloInstance.Owner.Position, mloInstance.Owner.Orientation); + Quaternion rot = cp ? copy.CEntityDef.rotation.ToQuaternion() : Quaternion.Identity; + + + CEntityDef cent = new CEntityDef(); + + if (copy != null) + { + cent = copy.CEntityDef; + //TODO: copy entity extensions! + } + else + { + cent.archetypeName = new MetaHash(JenkHash.GenHash("prop_alien_egg_01")); + 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 = Unk_1264241711.LODTYPES_DEPTH_ORPHANHD; + cent.priorityLevel = Unk_648413703.PRI_REQUIRED; + cent.ambientOcclusionMultiplier = 255; + cent.artificialAmbientOcclusion = 255; + } + + cent.position = pos; + cent.rotation = rot.ToVector4(); + + var createindex = mloArch.entities.Length; + MCEntityDef ment = new MCEntityDef(ref cent, mloArch); + + YmapEntityDef outEnt; + try + { + if (WorldForm != null) + { + lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... + { + // Add the entity to the mlo instance and archetype. + outEnt = mloInstance.CreateYmapEntity(mloInstance.Owner, ment, createindex); + mloArch.AddEntity(outEnt, roomIndex); + } + } + else + { + outEnt = mloInstance.CreateYmapEntity(mloInstance.Owner, ment, createindex); + mloArch.AddEntity(outEnt, roomIndex); + } + } + catch(Exception e) + { + MessageBox.Show(this, e.Message, "Create MLO Entity Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + return; + } + + + mloInstance.AddEntity(outEnt); + outEnt.SetArchetype(GameFileCache.GetArchetype(cent.archetypeName)); + + LoadProjectTree(); + ProjectExplorer?.TrySelectMloEntityTreeNode(mloInstance.TryGetArchetypeEntity(outEnt)); + CurrentEntity = outEnt; + CurrentYtypFile = CurrentEntity.MloParent?.Archetype?.Ytyp; + } + private bool DeleteMloArchetypeEntity() + { + if (CurrentEntity?.MloParent?.Archetype?.Ytyp == null) return false; + if (CurrentEntity.MloParent.Archetype.Ytyp != CurrentYtypFile) return false; + if (!(CurrentEntity.MloParent.Archetype is MloArchetype mloArchetype)) return false; + if (mloArchetype.entities == null) return false; //nothing to delete.. + //if (mloArchetype.InstancedEntities == null) return false; //nothing to delete.. + + if (CurrentEntity._CEntityDef.numChildren != 0) + { + MessageBox.Show("This entity's numChildren is not 0 - deleting entities with children is not currently supported by CodeWalker."); + return true; + } + + if (MessageBox.Show("Are you sure you want to delete this entity?\n" + CurrentEntity._CEntityDef.archetypeName.ToString() + "\n" + CurrentEntity.Position.ToString() + "\n\nThis operation cannot be undone. Continue?", "Confirm delete", MessageBoxButtons.YesNo) != DialogResult.Yes) + { + return true; + } + MloInstanceData mloInstance = CurrentEntity.MloParent.MloInstance; + if (mloInstance == null) return false; + + var ent = CurrentEntity; + var mcEnt = mloInstance.TryGetArchetypeEntity(ent); + ProjectExplorer?.RemoveMloEntityTreeNode(mcEnt); + + try + { + if (WorldForm != null) + { + lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... + { + mloInstance.DeleteEntity(ent); + //WorldForm.SelectItem(null, null, null); + } + } + else + { + mloInstance.DeleteEntity(ent); + } + } + catch (Exception e) // various failures could happen so we'll use a trycatch for when an exception is thrown. + { + MessageBox.Show(this, "Cannot delete entity: " + Environment.NewLine + e.Message); + return false; + } + + var delent = ent; + var delytyp = delent.MloParent.Archetype.Ytyp; + + ProjectExplorer?.SetYtypHasChanged(delytyp, true); + + ClosePanel((EditYmapEntityPanel p) => { return p.Tag == delent; }); + CurrentEntity = null; + WorldForm.SelectItem(null); + + return true; + } + public bool DeleteArchetype() + { + if (CurrentArchetype == null) return false; + if (CurrentArchetype.Ytyp != CurrentYtypFile) return false; + + if (MessageBox.Show("Are you sure you want to delete this archetype?\n" + CurrentArchetype._BaseArchetypeDef.name.ToString() + "\n\nThis operation cannot be undone. Continue?", "Confirm delete", MessageBoxButtons.YesNo) != DialogResult.Yes) + { + return true; + } + + bool res = false; + if (WorldForm != null) + { + lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... + { + res = CurrentArchetype.Ytyp.RemoveArchetype(CurrentArchetype); + //WorldForm.SelectItem(null, null, null); + } + } + else + { + res = CurrentArchetype.Ytyp.RemoveArchetype(CurrentArchetype); + } + if (!res) + { + MessageBox.Show("Archetype couldn't be removed!"); + return false; + } + + var delarch = CurrentArchetype; + var delytyp = delarch.Ytyp; + + ProjectExplorer?.RemoveArchetypeTreeNode(delarch); + ProjectExplorer?.SetYtypHasChanged(delytyp, true); + + ClosePanel((EditYtypArchetypePanel p) => { return p.Tag == delarch; }); + + CurrentArchetype = null; + + return true; + } public void NewYnd() { @@ -3998,6 +4382,18 @@ namespace CodeWalker.Project ymaps[isnew ? JenkHash.GenHash(ymap.Name) : ymap.RpfFileEntry.ShortNameHash] = ymap; } } + + visiblemloentities.Clear(); + foreach (var kvp in ymaps) + { + var ymap = kvp.Value; + if (ymap.MloEntities == null) continue; + 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; + } + } } } } @@ -4158,6 +4554,18 @@ namespace CodeWalker.Project } + public MloInstanceData TryGetMloInstance(MloArchetype arch) + { + lock (projectsyncroot) + { + if (arch == null) return null; + MetaHash name = arch._BaseArchetypeDef.name; + if (name == 0) return null; + if (!visiblemloentities.ContainsKey(name)) return null; + return visiblemloentities[name]?.MloInstance; + } + } + public void OnWorldSelectionChanged(MapSelection sel) { @@ -4169,6 +4577,8 @@ namespace CodeWalker.Project } else { + var mlo = sel.MloEntityDef; + var room = sel.MloRoomDef; var ent = sel.EntityDef; var cargen = sel.CarGenerator; var grassbatch = sel.GrassBatch; @@ -4181,7 +4591,9 @@ namespace CodeWalker.Project var scenariond = sel.ScenarioNode; var scenarioedge = sel.ScenarioEdge; var audiopl = sel.Audio; - YmapFile ymap = ent?.Ymap ?? cargen?.Ymap ?? grassbatch?.Ymap; + Archetype arch = mlo?.Archetype ?? ent?.MloParent?.Archetype ?? ent?.Archetype; + YtypFile ytyp = mlo?.Archetype?.Ytyp ?? ent?.MloParent?.Archetype?.Ytyp ?? ent?.Archetype?.Ytyp ?? room?.Archetype?.Ytyp; + YmapFile ymap = ent?.Ymap ?? cargen?.Ymap ?? grassbatch?.Ymap ?? mlo?.Ymap; YndFile ynd = pathnode?.Ynd; YnvFile ynv = navpoly?.Ynv ?? navpoint?.Ynv ?? navportal?.Ynv; TrainTrack traintrack = trainnode?.Track; @@ -4205,6 +4617,26 @@ namespace CodeWalker.Project } } + else if (YtypExistsInProject(ytyp)) + { + if (arch != CurrentArchetype) + { + ProjectExplorer?.TrySelectArchetypeTreeNode(mlo?.Archetype); + } + if (ent != CurrentEntity) + { + MloInstanceData mloInstance = ent.MloParent?.MloInstance; + if (mloInstance != null) + { + MCEntityDef entityDef = mloInstance.TryGetArchetypeEntity(ent); + ProjectExplorer?.TrySelectMloEntityTreeNode(entityDef); + } + } + if (room != CurrentMloRoom) + { + ProjectExplorer?.TrySelectMloRoomTreeNode(room); + } + } else if (YndExistsInProject(ynd)) { if (pathnode != CurrentPathNode) @@ -4259,9 +4691,11 @@ namespace CodeWalker.Project showcurrent = true; } + CurrentMloRoom = room; CurrentYmapFile = ymap; - CurrentYtypFile = null;//TODO: interiors! - CurrentEntity = ent; + CurrentYtypFile = ytyp; + CurrentArchetype = arch; + CurrentEntity = ent ?? mlo; CurrentCarGen = cargen; CurrentGrassBatch = grassbatch; CurrentYndFile = ynd; @@ -4335,7 +4769,6 @@ namespace CodeWalker.Project OnWorldAudioPlacementModified(sel.Audio); } } - private void OnWorldEntityModified(YmapEntityDef ent) { try @@ -4346,7 +4779,7 @@ namespace CodeWalker.Project } else { - if ((ent.Ymap == null) || (ent.MloParent != null)) + if ((ent.Ymap == null) && (ent.MloParent == null)) { return;//TODO: properly handle interior entities! } @@ -4356,26 +4789,62 @@ namespace CodeWalker.Project NewProject(); } - if (!YmapExistsInProject(ent.Ymap)) + if (ent.MloParent == null && ent.Ymap != null) { - ent.Ymap.HasChanged = true; - AddYmapToProject(ent.Ymap); - ProjectExplorer?.TrySelectEntityTreeNode(ent); - } - - if (ent != CurrentEntity) - { - CurrentEntity = ent; - ProjectExplorer?.TrySelectEntityTreeNode(ent); - } - - if (ent == CurrentEntity) - { - ShowEditYmapEntityPanel(false); - - if (ent.Ymap != null) + if (!YmapExistsInProject(ent.Ymap)) { - SetYmapHasChanged(true); + ent.Ymap.HasChanged = true; + AddYmapToProject(ent.Ymap); + ProjectExplorer?.TrySelectEntityTreeNode(ent); + } + + if (ent != CurrentEntity) + { + CurrentEntity = ent; + ProjectExplorer?.TrySelectEntityTreeNode(ent); + } + + if (ent == CurrentEntity) + { + ShowEditYmapEntityPanel(false); + + if (ent.Ymap != null) + { + SetYmapHasChanged(true); + } + } + } + else if (ent.MloParent != null && ent.Ymap == null) + { + MloInstanceData mloInstance = ent.MloParent?.MloInstance; + if (mloInstance != null) + { + var mcEntity = mloInstance.TryGetArchetypeEntity(ent); + if (mcEntity != null) + { + if (!YtypExistsInProject(ent.MloParent.Archetype.Ytyp)) + { + ent.MloParent.Archetype.Ytyp.HasChanged = true; + AddYtypToProject(ent.MloParent.Archetype.Ytyp); + ProjectExplorer?.TrySelectMloEntityTreeNode(mcEntity); + } + + if (ent != CurrentEntity) + { + CurrentEntity = ent; + ProjectExplorer?.TrySelectMloEntityTreeNode(mcEntity); + } + } + } + + if (ent == CurrentEntity) + { + ShowEditYmapEntityPanel(false); + + if (ent.MloParent.Archetype.Ytyp != null) + { + SetYtypHasChanged(true); + } } } } @@ -4909,6 +5378,23 @@ namespace CodeWalker.Project return pos; } + public Vector3 GetSpawnPosRel(float dist, Vector3 relPos, Quaternion relRot) + { + Vector3 pos = Vector3.Zero; + if (WorldForm != null) + { + Vector3 campos = WorldForm.GetCameraPosition(); + Vector3 camdir = WorldForm.GetCameraViewDir(); + pos = campos + camdir * dist; + + Quaternion rot = Quaternion.Invert(relRot); + Vector3 delta = pos - relPos; + Vector3 relativePos = rot.Multiply(delta); + pos = relativePos; + } + return pos; + } + public RpfFileEntry FindParentYmapEntry(uint hash) { if (CurrentProjectFile != null) @@ -4944,7 +5430,7 @@ namespace CodeWalker.Project ymap.Load(data); - GameFileCache.InitYmapEntityArchetypes(ymap); //this needs to be done after calling YmapFile.Load() + ymap.InitYmapEntityArchetypes(GameFileCache); //this needs to be done after calling YmapFile.Load() } private void LoadYtypFromFile(YtypFile ytyp, string filename) { @@ -5117,8 +5603,11 @@ namespace CodeWalker.Project { bool enable = (CurrentYtypFile != null); bool inproj = YtypExistsInProject(CurrentYtypFile); + bool ismlo = ((CurrentEntity != null) && (CurrentEntity.MloParent != null) || (CurrentMloRoom != null)) || (CurrentArchetype is MloArchetype); YtypNewArchetypeMenu.Enabled = enable && inproj; + YtypMloToolStripMenuItem.Enabled = enable && inproj && ismlo; + YtypMloNewEntityToolStripMenuItem.Enabled = YtypMloToolStripMenuItem.Enabled; if (CurrentYtypFile != null) { @@ -5516,10 +6005,6 @@ namespace CodeWalker.Project RemoveYmapFromProject(); } - private void YtypNewArchetypeMenu_Click(object sender, EventArgs e) - { - //NewArchetype(); - } private void YtypAddToProjectMenu_Click(object sender, EventArgs e) { AddYtypToProject(CurrentYtypFile); @@ -5528,6 +6013,14 @@ namespace CodeWalker.Project { RemoveYtypFromProject(); } + private void YtypNewArchetypeMenu_Click(object sender, EventArgs e) + { + NewArchetype(); + } + private void YtypMloNewEntityToolStripMenuItem_Click(object sender, EventArgs e) + { + NewMloEntity(); + } private void YndNewNodeMenu_Click(object sender, EventArgs e) { diff --git a/Project/ProjectFormOLD.cs b/Project/ProjectFormOLD.cs index f244a99..aa95737 100644 --- a/Project/ProjectFormOLD.cs +++ b/Project/ProjectFormOLD.cs @@ -1262,7 +1262,7 @@ namespace CodeWalker ymap.Load(data); - GameFileCache.InitYmapEntityArchetypes(ymap); //this needs to be done after calling YmapFile.Load() + ymap.InitYmapEntityArchetypes(GameFileCache); //this needs to be done after calling YmapFile.Load() } private void LoadYmapTreeNodes(YmapFile ymap, TreeNode node) @@ -1282,7 +1282,7 @@ namespace CodeWalker for (int i = 0; i < ents.Length; i++) { var ent = ents[i]; - var edef = ent.CEntityDef; + var edef = ent._CEntityDef; var enode = entsnode.Nodes.Add(edef.archetypeName.ToString()); enode.Tag = ent; } @@ -7542,7 +7542,7 @@ namespace CodeWalker if (CurrentEntity._CEntityDef.rotation != v) { Quaternion q = new Quaternion(v); - CurrentEntity.SetOrientationInv(q); + CurrentEntity.SetOrientation(q, true); SetYmapHasChanged(true); if (WorldForm != null) { diff --git a/Rendering/Renderer.cs b/Rendering/Renderer.cs index e5a1d7e..c677095 100644 --- a/Rendering/Renderer.cs +++ b/Rendering/Renderer.cs @@ -1745,24 +1745,55 @@ namespace CodeWalker.Rendering if (renderinteriors && ent.IsMlo) //render Mlo child entities... { - if ((ent.MloInstance != null) && (ent.MloInstance.Entities != null)) + if ((ent.MloInstance != null)) { - for (int j = 0; j < ent.MloInstance.Entities.Length; j++) + if (ent.MloInstance.Entities != null) { - var intent = ent.MloInstance.Entities[j]; - if (intent.Archetype == null) continue; //missing archetype... - if (!RenderIsEntityFinalRender(intent)) continue; //proxy or something.. - - intent.IsVisible = true; - - var iebscent = intent.Position + intent.BSCenter - camera.Position; - float iebsrad = intent.BSRadius; - if (!camera.ViewFrustum.ContainsSphereNoClipNoOpt(ref iebscent, iebsrad)) + for (int j = 0; j < ent.MloInstance.Entities.Length; j++) { - continue; //frustum cull interior ents - } + var intent = ent.MloInstance.Entities[j]; + if (intent.Archetype == null) continue; //missing archetype... + if (!RenderIsEntityFinalRender(intent)) continue; //proxy or something.. - renderworldentities.Add(intent); + intent.IsVisible = true; + + var iebscent = intent.Position + intent.BSCenter - camera.Position; + float iebsrad = intent.BSRadius; + if (!camera.ViewFrustum.ContainsSphereNoClipNoOpt(ref iebscent, iebsrad)) + { + continue; //frustum cull interior ents + } + + renderworldentities.Add(intent); + } + } + if (ent.MloInstance.EntitySets != null) + { + foreach (var entitysets in ent.MloInstance.EntitySets) + { + var entityset = entitysets.Value; + if (!entityset.Visible) continue; + + var entities = entityset.Entities; + 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.. + + intent.IsVisible = true; + + var iebscent = intent.Position + intent.BSCenter - camera.Position; + float iebsrad = intent.BSRadius; + if (!camera.ViewFrustum.ContainsSphereNoClipNoOpt(ref iebscent, iebsrad)) + { + continue; //frustum cull interior ents + } + + renderworldentities.Add(intent); + + } + } } } } diff --git a/Utils/MapUtils.cs b/Utils/MapUtils.cs index fdadbca..196bf0a 100644 --- a/Utils/MapUtils.cs +++ b/Utils/MapUtils.cs @@ -182,6 +182,7 @@ namespace CodeWalker public YmapGrassInstanceBatch GrassBatch { get; set; } public YmapDistantLODLights DistantLodLights { get; set; } public YmapEntityDef MloEntityDef { get; set; } + public MCMloRoomDef MloRoomDef { get; set; } public WaterQuad WaterQuad { get; set; } public Bounds CollisionBounds { get; set; } public YnvPoly NavPoly { get; set; } @@ -227,7 +228,8 @@ namespace CodeWalker (DistantLodLights != null) || (MloEntityDef != null) || (ScenarioNode != null) || - (Audio != null); + (Audio != null) || + (MloRoomDef != null); } } @@ -257,7 +259,8 @@ namespace CodeWalker || (PathNode != mhit.PathNode) || (TrainTrackNode != mhit.TrainTrackNode) || (ScenarioNode != mhit.ScenarioNode) - || (Audio != mhit.Audio); + || (Audio != mhit.Audio) + || (MloRoomDef != mhit.MloRoomDef); } public bool CheckForChanges() { @@ -280,7 +283,8 @@ namespace CodeWalker || (PathLink != null) || (TrainTrackNode != null) || (ScenarioNode != null) - || (Audio != null); + || (Audio != null) + || (MloRoomDef != null); } @@ -386,6 +390,10 @@ namespace CodeWalker { name = Audio.ShortTypeName + " " + Audio.GetNameString();// FloatUtil.GetVector3String(Audio.InnerPos); } + if (MloRoomDef != null) + { + name = "MloRoomDef " + MloRoomDef.RoomName; + } return name; } @@ -460,6 +468,10 @@ namespace CodeWalker { name = Audio.ShortTypeName + " " + Audio.GetNameString();// + FloatUtil.GetVector3String(Audio.InnerPos); } + if (MloRoomDef != null) + { + name = "MloRoomDef " + MloRoomDef.RoomName; + } return name; } diff --git a/WorldForm.cs b/WorldForm.cs index 2cc588a..3e92106 100644 --- a/WorldForm.cs +++ b/WorldForm.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; @@ -3368,6 +3367,37 @@ namespace CodeWalker SelectItem(ms); } } + + public void SelectGrassBatch(YmapGrassInstanceBatch batch) + { + if (batch == null) + { + SelectItem(null); + } + else + { + MapSelection ms = new MapSelection(); + ms.GrassBatch = batch; + ms.AABB = new BoundingBox(batch.AABBMin, batch.AABBMax); + SelectItem(ms); + } + } + public void SelectMloRoom(MCMloRoomDef room, MloInstanceData instance) + { + if (room == null) + { + SelectItem(null); + } + else if (instance != null) + { + MapSelection ms = new MapSelection(); + ms.MloRoomDef = room; + Vector3 min = instance.Owner.Position + instance.Owner.Orientation.Multiply(room.BBMin_CW); + Vector3 max = instance.Owner.Position + instance.Owner.Orientation.Multiply(room.BBMax_CW); + ms.AABB = new BoundingBox(min, max); + SelectItem(ms); + } + } public void SelectNavPoly(YnvPoly poly) { if (poly == null) @@ -3915,6 +3945,7 @@ namespace CodeWalker { ProjectForm = new ProjectForm(this); ProjectForm.Show(this); + ProjectForm.OnWorldSelectionChanged(SelectedItem); // so that the project form isn't stuck on the welcome window. } else { @@ -5063,11 +5094,25 @@ namespace CodeWalker } else { - //project not open, or entity not selected there, just remove the entity from the ymap... + //project not open, or entity not selected there, just remove the entity from the ymap/nlo... var ymap = ent.Ymap; + var instance = ent.MloParent?.MloInstance; if (ymap == null) { - MessageBox.Show("Sorry, deleting interior entities is not currently supported."); + if (instance != null) + { + try + { + if (!instance.DeleteEntity(ent)) + { + SelectItem(null); + } + } + catch (Exception e) // various failures can happen here. + { + MessageBox.Show("Unable to remove entity..." + Environment.NewLine + e.Message); + } + } } else if (!ymap.RemoveEntity(ent)) { @@ -5088,7 +5133,16 @@ namespace CodeWalker { if (CopiedEntity == null) return; if (ProjectForm == null) return; - ProjectForm.NewEntity(CopiedEntity); + MloInstanceData instance = CopiedEntity.MloParent?.MloInstance; + MCEntityDef entdef = instance?.TryGetArchetypeEntity(CopiedEntity); + if (entdef != null) + { + ProjectForm.NewMloEntity(CopiedEntity, true); + } + else + { + ProjectForm.NewEntity(CopiedEntity, true); + } } private void CloneEntity() { From 6adb6b2cc4377a0596fe3a31473dea5ee20f4945 Mon Sep 17 00:00:00 2001 From: dexyfex Date: Mon, 3 Dec 2018 20:07:04 +1100 Subject: [PATCH 23/24] Removed ProjectFormOLD, fixed ProjectFile YND save bug --- CodeWalker.csproj | 9 - Project/ProjectFile.cs | 2 +- Project/ProjectFormOLD.Designer.cs | 8943 ---------------------- Project/ProjectFormOLD.cs | 10586 --------------------------- Project/ProjectFormOLD.resx | 436 -- 5 files changed, 1 insertion(+), 19975 deletions(-) delete mode 100644 Project/ProjectFormOLD.Designer.cs delete mode 100644 Project/ProjectFormOLD.cs delete mode 100644 Project/ProjectFormOLD.resx diff --git a/CodeWalker.csproj b/CodeWalker.csproj index 02e92d9..1b5eec7 100644 --- a/CodeWalker.csproj +++ b/CodeWalker.csproj @@ -487,12 +487,6 @@ - - Form - - - ProjectFormOLD.cs - Form @@ -681,9 +675,6 @@ SelectFolderForm.cs - - ProjectFormOLD.cs - SettingsForm.cs diff --git a/Project/ProjectFile.cs b/Project/ProjectFile.cs index 9906b9f..7589ba0 100644 --- a/Project/ProjectFile.cs +++ b/Project/ProjectFile.cs @@ -63,7 +63,7 @@ namespace CodeWalker.Project var yndselem = Xml.AddChild(doc, projelem, "YndFilenames"); foreach (string yndfilename in YndFilenames) { - Xml.AddChildWithInnerText(doc, ytypselem, "Item", yndfilename); + Xml.AddChildWithInnerText(doc, yndselem, "Item", yndfilename); } var ynvselem = Xml.AddChild(doc, projelem, "YnvFilenames"); diff --git a/Project/ProjectFormOLD.Designer.cs b/Project/ProjectFormOLD.Designer.cs deleted file mode 100644 index b57d476..0000000 --- a/Project/ProjectFormOLD.Designer.cs +++ /dev/null @@ -1,8943 +0,0 @@ -namespace CodeWalker -{ - partial class ProjectFormOLD - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ProjectFormOLD)); - this.splitContainer1 = new System.Windows.Forms.SplitContainer(); - this.ProjectTreeView = new System.Windows.Forms.TreeView(); - this.MainTabControl = new System.Windows.Forms.TabControl(); - this.ProjectTabPage = new System.Windows.Forms.TabPage(); - this.ProjectPanel = new System.Windows.Forms.Panel(); - this.ProjectTabControl = new System.Windows.Forms.TabControl(); - this.ProjectGeneralTabPage = new System.Windows.Forms.TabPage(); - this.ProjectNameTextBox = new System.Windows.Forms.TextBox(); - this.ProjectHideMapCheckBox = new System.Windows.Forms.CheckBox(); - this.ProjectVersionLabel = new System.Windows.Forms.Label(); - this.ProjectShowEntitiesCheckBox = new System.Windows.Forms.CheckBox(); - this.label1 = new System.Windows.Forms.Label(); - this.ProjectManifestTabPage = new System.Windows.Forms.TabPage(); - this.label162 = new System.Windows.Forms.Label(); - this.ProjectManifestGenerateButton = new System.Windows.Forms.Button(); - this.ProjectManifestTextBox = new FastColoredTextBoxNS.FastColoredTextBox(); - this.YmapTabPage = new System.Windows.Forms.TabPage(); - this.YmapTabControl = new System.Windows.Forms.TabControl(); - this.YmapYmapTabPage = new System.Windows.Forms.TabPage(); - this.YmapPanel = new System.Windows.Forms.Panel(); - this.tabControl1 = new System.Windows.Forms.TabControl(); - this.tabPage1 = new System.Windows.Forms.TabPage(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.YmapCFlagsGrassCheckBox = new System.Windows.Forms.CheckBox(); - this.YmapCFlagsCriticalCheckBox = new System.Windows.Forms.CheckBox(); - this.YmapCFlagsDistLightsCheckBox = new System.Windows.Forms.CheckBox(); - this.YmapCFlagsLODLightsCheckBox = new System.Windows.Forms.CheckBox(); - this.YmapCFlagsPhysicsCheckBox = new System.Windows.Forms.CheckBox(); - this.YmapCFlagsOcclusionCheckBox = new System.Windows.Forms.CheckBox(); - this.YmapCFlagsInteriorCheckBox = new System.Windows.Forms.CheckBox(); - this.YmapCFlagsSLODCheckBox = new System.Windows.Forms.CheckBox(); - this.YmapCFlagsSLOD2CheckBox = new System.Windows.Forms.CheckBox(); - this.YmapCFlagsLODCheckBox = new System.Windows.Forms.CheckBox(); - this.YmapCFlagsHDCheckBox = new System.Windows.Forms.CheckBox(); - this.YmapContentFlagsTextBox = new System.Windows.Forms.TextBox(); - this.label7 = new System.Windows.Forms.Label(); - this.YmapCalculateFlagsButton = new System.Windows.Forms.Button(); - this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.YmapFlagsLODCheckBox = new System.Windows.Forms.CheckBox(); - this.YmapFlagsScriptedCheckBox = new System.Windows.Forms.CheckBox(); - this.YmapFlagsTextBox = new System.Windows.Forms.TextBox(); - this.label6 = new System.Windows.Forms.Label(); - this.tabPage2 = new System.Windows.Forms.TabPage(); - this.label12 = new System.Windows.Forms.Label(); - this.YmapPhysicsDictionariesTextBox = new CodeWalker.WinForms.TextBoxFix(); - this.YmapProjectPathTextBox = new System.Windows.Forms.TextBox(); - this.label30 = new System.Windows.Forms.Label(); - this.YmapFileLocationTextBox = new System.Windows.Forms.TextBox(); - this.label29 = new System.Windows.Forms.Label(); - this.YmapCalculateExtentsButton = new System.Windows.Forms.Button(); - this.YmapStreamingExtentsMaxTextBox = new System.Windows.Forms.TextBox(); - this.label10 = new System.Windows.Forms.Label(); - this.YmapStreamingExtentsMinTextBox = new System.Windows.Forms.TextBox(); - this.label11 = new System.Windows.Forms.Label(); - this.YmapEntitiesExtentsMaxTextBox = new System.Windows.Forms.TextBox(); - this.label9 = new System.Windows.Forms.Label(); - this.YmapEntitiesExtentsMinTextBox = new System.Windows.Forms.TextBox(); - this.label8 = new System.Windows.Forms.Label(); - this.YmapParentHashLabel = new System.Windows.Forms.Label(); - this.YmapNameHashLabel = new System.Windows.Forms.Label(); - this.YmapParentTextBox = new System.Windows.Forms.TextBox(); - this.label4 = new System.Windows.Forms.Label(); - this.label5 = new System.Windows.Forms.Label(); - this.YmapNameTextBox = new System.Windows.Forms.TextBox(); - this.label3 = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); - this.YmapEntityTabPage = new System.Windows.Forms.TabPage(); - this.EntityPanel = new System.Windows.Forms.Panel(); - this.EntityTabControl = new System.Windows.Forms.TabControl(); - this.EntityGeneralTabPage = new System.Windows.Forms.TabPage(); - this.EntityFlagsCheckedListBox = new System.Windows.Forms.CheckedListBox(); - this.label13 = new System.Windows.Forms.Label(); - this.label28 = new System.Windows.Forms.Label(); - this.EntityDeleteButton = new System.Windows.Forms.Button(); - this.EntityTintValueTextBox = new System.Windows.Forms.TextBox(); - this.EntityAddToProjectButton = new System.Windows.Forms.Button(); - this.label27 = new System.Windows.Forms.Label(); - this.EntityArtificialAOTextBox = new System.Windows.Forms.TextBox(); - this.label26 = new System.Windows.Forms.Label(); - this.EntityAOMultiplierTextBox = new System.Windows.Forms.TextBox(); - this.EntityGuidTextBox = new System.Windows.Forms.TextBox(); - this.EntityPriorityLevelComboBox = new System.Windows.Forms.ComboBox(); - this.label24 = new System.Windows.Forms.Label(); - this.label15 = new System.Windows.Forms.Label(); - this.EntityFlagsTextBox = new System.Windows.Forms.TextBox(); - this.label18 = new System.Windows.Forms.Label(); - this.EntityLodLevelComboBox = new System.Windows.Forms.ComboBox(); - this.label14 = new System.Windows.Forms.Label(); - this.label23 = new System.Windows.Forms.Label(); - this.EntityScaleXYTextBox = new System.Windows.Forms.TextBox(); - this.label22 = new System.Windows.Forms.Label(); - this.EntityArchetypeHashLabel = new System.Windows.Forms.Label(); - this.EntityChildLodDistTextBox = new System.Windows.Forms.TextBox(); - this.label19 = new System.Windows.Forms.Label(); - this.label21 = new System.Windows.Forms.Label(); - this.EntityScaleZTextBox = new System.Windows.Forms.TextBox(); - this.EntityLodDistTextBox = new System.Windows.Forms.TextBox(); - this.EntityArchetypeTextBox = new System.Windows.Forms.TextBox(); - this.label16 = new System.Windows.Forms.Label(); - this.EntityPositionTextBox = new System.Windows.Forms.TextBox(); - this.EntityNormalizeRotationButton = new System.Windows.Forms.Button(); - this.EntityGoToButton = new System.Windows.Forms.Button(); - this.label17 = new System.Windows.Forms.Label(); - this.EntityRotationTextBox = new System.Windows.Forms.TextBox(); - this.EntityLodTabPage = new System.Windows.Forms.TabPage(); - this.label20 = new System.Windows.Forms.Label(); - this.EntityParentIndexTextBox = new System.Windows.Forms.TextBox(); - this.EntityNumChildrenTextBox = new System.Windows.Forms.TextBox(); - this.label25 = new System.Windows.Forms.Label(); - this.EntityExtensionsTabPage = new System.Windows.Forms.TabPage(); - this.EntityPivotTabPage = new System.Windows.Forms.TabPage(); - this.label95 = new System.Windows.Forms.Label(); - this.EntityPivotEditCheckBox = new System.Windows.Forms.CheckBox(); - this.label93 = new System.Windows.Forms.Label(); - this.EntityPivotPositionTextBox = new System.Windows.Forms.TextBox(); - this.EntityPivotRotationNormalizeButton = new System.Windows.Forms.Button(); - this.label94 = new System.Windows.Forms.Label(); - this.EntityPivotRotationTextBox = new System.Windows.Forms.TextBox(); - this.YmapCarGenTabPage = new System.Windows.Forms.TabPage(); - this.CarGenPanel = new System.Windows.Forms.Panel(); - this.CarFlagsCheckedListBox = new System.Windows.Forms.CheckedListBox(); - this.CarDeleteButton = new System.Windows.Forms.Button(); - this.CarAddToProjectButton = new System.Windows.Forms.Button(); - this.label44 = new System.Windows.Forms.Label(); - this.CarLiveryTextBox = new System.Windows.Forms.TextBox(); - this.label43 = new System.Windows.Forms.Label(); - this.CarBodyColorRemap4TextBox = new System.Windows.Forms.TextBox(); - this.label42 = new System.Windows.Forms.Label(); - this.CarBodyColorRemap3TextBox = new System.Windows.Forms.TextBox(); - this.label41 = new System.Windows.Forms.Label(); - this.CarBodyColorRemap2TextBox = new System.Windows.Forms.TextBox(); - this.CarPopGroupTextBox = new System.Windows.Forms.TextBox(); - this.label39 = new System.Windows.Forms.Label(); - this.CarPopGroupHashLabel = new System.Windows.Forms.Label(); - this.label38 = new System.Windows.Forms.Label(); - this.CarBodyColorRemap1TextBox = new System.Windows.Forms.TextBox(); - this.label37 = new System.Windows.Forms.Label(); - this.CarFlagsTextBox = new System.Windows.Forms.TextBox(); - this.CarPerpendicularLengthTextBox = new System.Windows.Forms.TextBox(); - this.label36 = new System.Windows.Forms.Label(); - this.CarOrientYTextBox = new System.Windows.Forms.TextBox(); - this.label34 = new System.Windows.Forms.Label(); - this.CarOrientXTextBox = new System.Windows.Forms.TextBox(); - this.label35 = new System.Windows.Forms.Label(); - this.CarModelTextBox = new System.Windows.Forms.TextBox(); - this.label32 = new System.Windows.Forms.Label(); - this.CarModelHashLabel = new System.Windows.Forms.Label(); - this.CarGoToButton = new System.Windows.Forms.Button(); - this.CarPositionTextBox = new System.Windows.Forms.TextBox(); - this.label31 = new System.Windows.Forms.Label(); - this.YmapMloInstanceTabPage = new System.Windows.Forms.TabPage(); - this.YmapTimecycleModifierTabPage = new System.Windows.Forms.TabPage(); - this.YndTabPage = new System.Windows.Forms.TabPage(); - this.YndTabControl = new System.Windows.Forms.TabControl(); - this.YndYndTabPage = new System.Windows.Forms.TabPage(); - this.YndPanel = new System.Windows.Forms.Panel(); - this.label88 = new System.Windows.Forms.Label(); - this.YndAreaIDYUpDown = new System.Windows.Forms.NumericUpDown(); - this.label87 = new System.Windows.Forms.Label(); - this.YndAreaIDXUpDown = new System.Windows.Forms.NumericUpDown(); - this.label48 = new System.Windows.Forms.Label(); - this.YndProjectPathTextBox = new System.Windows.Forms.TextBox(); - this.label46 = new System.Windows.Forms.Label(); - this.YndFilePathTextBox = new System.Windows.Forms.TextBox(); - this.label47 = new System.Windows.Forms.Label(); - this.YndTotalNodesLabel = new System.Windows.Forms.Label(); - this.YndPedNodesUpDown = new System.Windows.Forms.NumericUpDown(); - this.label45 = new System.Windows.Forms.Label(); - this.YndVehicleNodesUpDown = new System.Windows.Forms.NumericUpDown(); - this.label40 = new System.Windows.Forms.Label(); - this.YndAreaIDInfoLabel = new System.Windows.Forms.Label(); - this.label33 = new System.Windows.Forms.Label(); - this.YndRpfPathTextBox = new System.Windows.Forms.TextBox(); - this.YndNodeTabPage = new System.Windows.Forms.TabPage(); - this.YndNodePanel = new System.Windows.Forms.Panel(); - this.PathNodeTabControl = new System.Windows.Forms.TabControl(); - this.PathNodePropertiesTabPage = new System.Windows.Forms.TabPage(); - this.PathNodeFlags5GroupBox = new System.Windows.Forms.GroupBox(); - this.PathNodeFlags52CheckBox = new System.Windows.Forms.CheckBox(); - this.PathNodeFlags53CheckBox = new System.Windows.Forms.CheckBox(); - this.PathNodeFlags51CheckBox = new System.Windows.Forms.CheckBox(); - this.PathNodeFlags5UpDown = new System.Windows.Forms.NumericUpDown(); - this.PathNodeFlags4GroupBox = new System.Windows.Forms.GroupBox(); - this.PathNodeFlags45CheckBox = new System.Windows.Forms.CheckBox(); - this.PathNodeFlags46CheckBox = new System.Windows.Forms.CheckBox(); - this.PathNodeFlags47CheckBox = new System.Windows.Forms.CheckBox(); - this.PathNodeFlags48CheckBox = new System.Windows.Forms.CheckBox(); - this.PathNodeFlags42UpDown = new System.Windows.Forms.NumericUpDown(); - this.label71 = new System.Windows.Forms.Label(); - this.PathNodeFlags41CheckBox = new System.Windows.Forms.CheckBox(); - this.PathNodeFlags4UpDown = new System.Windows.Forms.NumericUpDown(); - this.PathNodeFlags4Label = new System.Windows.Forms.Label(); - this.PathNodeFlags3GroupBox = new System.Windows.Forms.GroupBox(); - this.PathNodeFlags32UpDown = new System.Windows.Forms.NumericUpDown(); - this.label70 = new System.Windows.Forms.Label(); - this.PathNodeFlags31CheckBox = new System.Windows.Forms.CheckBox(); - this.PathNodeFlags3UpDown = new System.Windows.Forms.NumericUpDown(); - this.PathNodeFlags3Label = new System.Windows.Forms.Label(); - this.PathNodeFlags2GroupBox = new System.Windows.Forms.GroupBox(); - this.PathNodeFlags21CheckBox = new System.Windows.Forms.CheckBox(); - this.PathNodeFlags28CheckBox = new System.Windows.Forms.CheckBox(); - this.PathNodeFlags22CheckBox = new System.Windows.Forms.CheckBox(); - this.PathNodeFlags27CheckBox = new System.Windows.Forms.CheckBox(); - this.PathNodeFlags23CheckBox = new System.Windows.Forms.CheckBox(); - this.PathNodeFlags26CheckBox = new System.Windows.Forms.CheckBox(); - this.PathNodeFlags24CheckBox = new System.Windows.Forms.CheckBox(); - this.PathNodeFlags25CheckBox = new System.Windows.Forms.CheckBox(); - this.PathNodeFlags2UpDown = new System.Windows.Forms.NumericUpDown(); - this.PathNodeFlags2Label = new System.Windows.Forms.Label(); - this.PathNodeFlags1GroupBox = new System.Windows.Forms.GroupBox(); - this.PathNodeFlags11CheckBox = new System.Windows.Forms.CheckBox(); - this.PathNodeFlags18CheckBox = new System.Windows.Forms.CheckBox(); - this.PathNodeFlags12CheckBox = new System.Windows.Forms.CheckBox(); - this.PathNodeFlags17CheckBox = new System.Windows.Forms.CheckBox(); - this.PathNodeFlags13CheckBox = new System.Windows.Forms.CheckBox(); - this.PathNodeFlags16CheckBox = new System.Windows.Forms.CheckBox(); - this.PathNodeFlags14CheckBox = new System.Windows.Forms.CheckBox(); - this.PathNodeFlags15CheckBox = new System.Windows.Forms.CheckBox(); - this.PathNodeFlags1UpDown = new System.Windows.Forms.NumericUpDown(); - this.PathNodeFlags1Label = new System.Windows.Forms.Label(); - this.PathNodeFlags0GroupBox = new System.Windows.Forms.GroupBox(); - this.PathNodeFlags01CheckBox = new System.Windows.Forms.CheckBox(); - this.PathNodeFlags08CheckBox = new System.Windows.Forms.CheckBox(); - this.PathNodeFlags02CheckBox = new System.Windows.Forms.CheckBox(); - this.PathNodeFlags07CheckBox = new System.Windows.Forms.CheckBox(); - this.PathNodeFlags03CheckBox = new System.Windows.Forms.CheckBox(); - this.PathNodeFlags06CheckBox = new System.Windows.Forms.CheckBox(); - this.PathNodeFlags04CheckBox = new System.Windows.Forms.CheckBox(); - this.PathNodeFlags05CheckBox = new System.Windows.Forms.CheckBox(); - this.PathNodeFlags0UpDown = new System.Windows.Forms.NumericUpDown(); - this.PathNodeFlags0Label = new System.Windows.Forms.Label(); - this.PathNodeDeleteButton = new System.Windows.Forms.Button(); - this.PathNodeAreaIDUpDown = new System.Windows.Forms.NumericUpDown(); - this.PathNodeAddToProjectButton = new System.Windows.Forms.Button(); - this.label49 = new System.Windows.Forms.Label(); - this.label50 = new System.Windows.Forms.Label(); - this.label68 = new System.Windows.Forms.Label(); - this.PathNodeNodeIDUpDown = new System.Windows.Forms.NumericUpDown(); - this.label52 = new System.Windows.Forms.Label(); - this.PathNodeStreetHashTextBox = new System.Windows.Forms.TextBox(); - this.PathNodeGoToButton = new System.Windows.Forms.Button(); - this.PathNodeStreetNameLabel = new System.Windows.Forms.Label(); - this.PathNodePositionTextBox = new System.Windows.Forms.TextBox(); - this.label55 = new System.Windows.Forms.Label(); - this.PathNodeLinksTabPage = new System.Windows.Forms.TabPage(); - this.splitContainer2 = new System.Windows.Forms.SplitContainer(); - this.PathNodeRemoveLinkButton = new System.Windows.Forms.Button(); - this.PathNodeAddLinkButton = new System.Windows.Forms.Button(); - this.PathNodeLinksListBox = new System.Windows.Forms.ListBox(); - this.PathNodeLinkCountLabel = new System.Windows.Forms.Label(); - this.PathNodeLinkPanel = new System.Windows.Forms.Panel(); - this.PathLinkFlags2GroupBox = new System.Windows.Forms.GroupBox(); - this.PathNodeLinkFlags21CheckBox = new System.Windows.Forms.CheckBox(); - this.PathNodeLinkFlags22CheckBox = new System.Windows.Forms.CheckBox(); - this.label53 = new System.Windows.Forms.Label(); - this.PathNodeLinkFwdLanesUpDown = new System.Windows.Forms.NumericUpDown(); - this.label56 = new System.Windows.Forms.Label(); - this.PathNodeLinkBackLanesUpDown = new System.Windows.Forms.NumericUpDown(); - this.PathNodeLinkFlags2UpDown = new System.Windows.Forms.NumericUpDown(); - this.PathNodeLinkFlags2Label = new System.Windows.Forms.Label(); - this.PathLinkFlags1GroupBox = new System.Windows.Forms.GroupBox(); - this.PathNodeLinkOffsetSizeUpDown = new System.Windows.Forms.NumericUpDown(); - this.label61 = new System.Windows.Forms.Label(); - this.PathNodeLinkFlags11CheckBox = new System.Windows.Forms.CheckBox(); - this.PathNodeLinkFlags18CheckBox = new System.Windows.Forms.CheckBox(); - this.PathNodeLinkFlags12CheckBox = new System.Windows.Forms.CheckBox(); - this.PathNodeLinkFlags13CheckBox = new System.Windows.Forms.CheckBox(); - this.PathNodeLinkFlags14CheckBox = new System.Windows.Forms.CheckBox(); - this.PathNodeLinkFlags1UpDown = new System.Windows.Forms.NumericUpDown(); - this.PathNodeLinkFlags1Label = new System.Windows.Forms.Label(); - this.PathLinkFlags0GroupBox = new System.Windows.Forms.GroupBox(); - this.PathNodeLinkFlags04UpDown = new System.Windows.Forms.NumericUpDown(); - this.label60 = new System.Windows.Forms.Label(); - this.PathNodeLinkFlags03UpDown = new System.Windows.Forms.NumericUpDown(); - this.label58 = new System.Windows.Forms.Label(); - this.PathNodeLinkFlags01CheckBox = new System.Windows.Forms.CheckBox(); - this.PathNodeLinkFlags02CheckBox = new System.Windows.Forms.CheckBox(); - this.PathNodeLinkFlags0UpDown = new System.Windows.Forms.NumericUpDown(); - this.PathNodeLinkFlags0Label = new System.Windows.Forms.Label(); - this.PathNodeLinkageStatusLabel = new System.Windows.Forms.Label(); - this.PathNodeLinkLengthUpDown = new System.Windows.Forms.NumericUpDown(); - this.label57 = new System.Windows.Forms.Label(); - this.PathNodeLinkNodeIDUpDown = new System.Windows.Forms.NumericUpDown(); - this.label51 = new System.Windows.Forms.Label(); - this.PathNodeLinkAreaIDUpDown = new System.Windows.Forms.NumericUpDown(); - this.label54 = new System.Windows.Forms.Label(); - this.PathNodeJunctionTabPage = new System.Windows.Forms.TabPage(); - this.label78 = new System.Windows.Forms.Label(); - this.PathNodeJunctionPanel = new System.Windows.Forms.Panel(); - this.PathNodeJunctionPosYUpDown = new System.Windows.Forms.NumericUpDown(); - this.label59 = new System.Windows.Forms.Label(); - this.PathNodeJunctionPosXUpDown = new System.Windows.Forms.NumericUpDown(); - this.label69 = new System.Windows.Forms.Label(); - this.PathNodeJunctionHeightmapBytesTextBox = new CodeWalker.WinForms.TextBoxFix(); - this.PathNodeJunctionHeightmapDimYUpDown = new System.Windows.Forms.NumericUpDown(); - this.label77 = new System.Windows.Forms.Label(); - this.PathNodeJunctionHeightmapDimXUpDown = new System.Windows.Forms.NumericUpDown(); - this.label76 = new System.Windows.Forms.Label(); - this.PathNodeJunctionMinZUpDown = new System.Windows.Forms.NumericUpDown(); - this.label67 = new System.Windows.Forms.Label(); - this.PathNodeJunctionMaxZUpDown = new System.Windows.Forms.NumericUpDown(); - this.label65 = new System.Windows.Forms.Label(); - this.PathNodeJunctionEnableCheckBox = new System.Windows.Forms.CheckBox(); - this.YnvTabPage = new System.Windows.Forms.TabPage(); - this.YnvTabControl = new System.Windows.Forms.TabControl(); - this.YnvYnvTabPage = new System.Windows.Forms.TabPage(); - this.YnvPanel = new System.Windows.Forms.Panel(); - this.YnvAABBSizeTextBox = new System.Windows.Forms.TextBox(); - this.label91 = new System.Windows.Forms.Label(); - this.label89 = new System.Windows.Forms.Label(); - this.YnvAreaIDYUpDown = new System.Windows.Forms.NumericUpDown(); - this.label90 = new System.Windows.Forms.Label(); - this.YnvAreaIDXUpDown = new System.Windows.Forms.NumericUpDown(); - this.YnvAreaIDInfoLabel = new System.Windows.Forms.Label(); - this.label92 = new System.Windows.Forms.Label(); - this.YnvPolyTabPage = new System.Windows.Forms.TabPage(); - this.YnvPolygonPanel = new System.Windows.Forms.Panel(); - this.YnvPortalTabPage = new System.Windows.Forms.TabPage(); - this.YnvPortalPanel = new System.Windows.Forms.Panel(); - this.TrainsTabPage = new System.Windows.Forms.TabPage(); - this.TrainsTabControl = new System.Windows.Forms.TabControl(); - this.TrainTrackTabPage = new System.Windows.Forms.TabPage(); - this.TrainTrackFilePanel = new System.Windows.Forms.Panel(); - this.TrainTrackInfoLabel = new System.Windows.Forms.Label(); - this.label86 = new System.Windows.Forms.Label(); - this.TrainTrackBrakingDistTextBox = new System.Windows.Forms.TextBox(); - this.label85 = new System.Windows.Forms.Label(); - this.TrainTrackSpeedTextBox = new System.Windows.Forms.TextBox(); - this.TrainTrackMPStopsAtStationsCheckBox = new System.Windows.Forms.CheckBox(); - this.TrainTrackStopsAtStationsCheckBox = new System.Windows.Forms.CheckBox(); - this.TrainTrackIsPingPongCheckBox = new System.Windows.Forms.CheckBox(); - this.label84 = new System.Windows.Forms.Label(); - this.TrainTrackConfigNameTextBox = new System.Windows.Forms.TextBox(); - this.label83 = new System.Windows.Forms.Label(); - this.TrainTrackFilenameTextBox = new System.Windows.Forms.TextBox(); - this.label74 = new System.Windows.Forms.Label(); - this.TrainTrackProjectPathTextBox = new System.Windows.Forms.TextBox(); - this.label79 = new System.Windows.Forms.Label(); - this.TrainTrackFilePathTextBox = new System.Windows.Forms.TextBox(); - this.label80 = new System.Windows.Forms.Label(); - this.TrainTrackRpfPathTextBox = new System.Windows.Forms.TextBox(); - this.TrainNodeTabPage = new System.Windows.Forms.TabPage(); - this.TrainNodePanel = new System.Windows.Forms.Panel(); - this.TrainNodeTypeComboBox = new System.Windows.Forms.ComboBox(); - this.label82 = new System.Windows.Forms.Label(); - this.TrainNodeDeleteButton = new System.Windows.Forms.Button(); - this.TrainNodeAddToProjectButton = new System.Windows.Forms.Button(); - this.TrainNodeGoToButton = new System.Windows.Forms.Button(); - this.TrainNodePositionTextBox = new System.Windows.Forms.TextBox(); - this.label81 = new System.Windows.Forms.Label(); - this.ScenarioTabPage = new System.Windows.Forms.TabPage(); - this.ScenarioTabControl = new System.Windows.Forms.TabControl(); - this.ScenarioYmtTabPage = new System.Windows.Forms.TabPage(); - this.ScenarioYmtPanel = new System.Windows.Forms.Panel(); - this.ScenarioYmtExtentsMaxTextBox = new System.Windows.Forms.TextBox(); - this.label103 = new System.Windows.Forms.Label(); - this.ScenarioYmtExtentsMinTextBox = new System.Windows.Forms.TextBox(); - this.label150 = new System.Windows.Forms.Label(); - this.ScenarioYmtGridInfoLabel = new System.Windows.Forms.Label(); - this.ScenarioYmtGridScaleTextBox = new System.Windows.Forms.TextBox(); - this.label96 = new System.Windows.Forms.Label(); - this.ScenarioYmtProjectPathTextBox = new System.Windows.Forms.TextBox(); - this.label66 = new System.Windows.Forms.Label(); - this.ScenarioYmtFileLocationTextBox = new System.Windows.Forms.TextBox(); - this.label72 = new System.Windows.Forms.Label(); - this.ScenarioYmtGridMaxTextBox = new System.Windows.Forms.TextBox(); - this.label73 = new System.Windows.Forms.Label(); - this.ScenarioYmtGridMinTextBox = new System.Windows.Forms.TextBox(); - this.label75 = new System.Windows.Forms.Label(); - this.ScenarioYmtVersionTextBox = new System.Windows.Forms.TextBox(); - this.label64 = new System.Windows.Forms.Label(); - this.ScenarioYmtNameTextBox = new System.Windows.Forms.TextBox(); - this.label63 = new System.Windows.Forms.Label(); - this.ScenarioPointTabPage = new System.Windows.Forms.TabPage(); - this.ScenarioPointOuterPanel = new System.Windows.Forms.Panel(); - this.ScenarioPointCheckBox = new System.Windows.Forms.CheckBox(); - this.ScenarioPointPanel = new System.Windows.Forms.Panel(); - this.ScenarioPointImapHashLabel = new System.Windows.Forms.Label(); - this.ScenarioPointImapTextBox = new System.Windows.Forms.TextBox(); - this.label110 = new System.Windows.Forms.Label(); - this.ScenarioPointGroupHashLabel = new System.Windows.Forms.Label(); - this.ScenarioPointGroupTextBox = new System.Windows.Forms.TextBox(); - this.label156 = new System.Windows.Forms.Label(); - this.ScenarioPointInteriorHashLabel = new System.Windows.Forms.Label(); - this.ScenarioPointFlagsCheckedListBox = new System.Windows.Forms.CheckedListBox(); - this.label111 = new System.Windows.Forms.Label(); - this.ScenarioPointDirectionTextBox = new System.Windows.Forms.TextBox(); - this.label97 = new System.Windows.Forms.Label(); - this.ScenarioPointFlagsValueUpDown = new System.Windows.Forms.NumericUpDown(); - this.label109 = new System.Windows.Forms.Label(); - this.ScenarioPointGoToButton = new System.Windows.Forms.Button(); - this.ScenarioPointWaitTimeUpDown = new System.Windows.Forms.NumericUpDown(); - this.ScenarioPointPositionTextBox = new System.Windows.Forms.TextBox(); - this.label62 = new System.Windows.Forms.Label(); - this.label108 = new System.Windows.Forms.Label(); - this.ScenarioPointRadiusUpDown = new System.Windows.Forms.NumericUpDown(); - this.label107 = new System.Windows.Forms.Label(); - this.ScenarioPointSpOnlyFlagUpDown = new System.Windows.Forms.NumericUpDown(); - this.label106 = new System.Windows.Forms.Label(); - this.ScenarioPointProbabilityUpDown = new System.Windows.Forms.NumericUpDown(); - this.ScenarioPointInteriorTextBox = new System.Windows.Forms.TextBox(); - this.label102 = new System.Windows.Forms.Label(); - this.label101 = new System.Windows.Forms.Label(); - this.ScenarioPointTimeEndUpDown = new System.Windows.Forms.NumericUpDown(); - this.ScenarioPointTimeStartUpDown = new System.Windows.Forms.NumericUpDown(); - this.label100 = new System.Windows.Forms.Label(); - this.ScenarioPointModelSetComboBox = new System.Windows.Forms.ComboBox(); - this.label99 = new System.Windows.Forms.Label(); - this.ScenarioPointTypeComboBox = new System.Windows.Forms.ComboBox(); - this.label98 = new System.Windows.Forms.Label(); - this.ScenarioPointDeleteButton = new System.Windows.Forms.Button(); - this.ScenarioPointAddToProjectButton = new System.Windows.Forms.Button(); - this.ScenarioEntityTabPage = new System.Windows.Forms.TabPage(); - this.ScenarioEntityDeleteButton = new System.Windows.Forms.Button(); - this.ScenarioEntityPanel = new System.Windows.Forms.Panel(); - this.label160 = new System.Windows.Forms.Label(); - this.ScenarioEntityAddPointButton = new System.Windows.Forms.Button(); - this.label161 = new System.Windows.Forms.Label(); - this.ScenarioEntityPointsListBox = new System.Windows.Forms.ListBox(); - this.ScenarioEntityInfoLabel = new System.Windows.Forms.Label(); - this.label114 = new System.Windows.Forms.Label(); - this.ScenarioEntityUnk2UpDown = new System.Windows.Forms.NumericUpDown(); - this.label113 = new System.Windows.Forms.Label(); - this.ScenarioEntityUnk1UpDown = new System.Windows.Forms.NumericUpDown(); - this.ScenarioEntityTypeHashLabel = new System.Windows.Forms.Label(); - this.ScenarioEntityTypeTextBox = new System.Windows.Forms.TextBox(); - this.label112 = new System.Windows.Forms.Label(); - this.ScenarioEntityGoToButton = new System.Windows.Forms.Button(); - this.ScenarioEntityPositionTextBox = new System.Windows.Forms.TextBox(); - this.label104 = new System.Windows.Forms.Label(); - this.ScenarioEntityAddToProjectButton = new System.Windows.Forms.Button(); - this.ScenarioEntityCheckBox = new System.Windows.Forms.CheckBox(); - this.ScenarioEntityPointTabPage = new System.Windows.Forms.TabPage(); - this.ScenarioEntityPointDeleteButton = new System.Windows.Forms.Button(); - this.ScenarioEntityPointAddToProjectButton = new System.Windows.Forms.Button(); - this.ScenarioEntityPointCheckBox = new System.Windows.Forms.CheckBox(); - this.ScenarioEntityPointPanel = new System.Windows.Forms.Panel(); - this.ScenarioEntityPointNameHashLabel = new System.Windows.Forms.Label(); - this.ScenarioEntityPointNameTextBox = new System.Windows.Forms.TextBox(); - this.ScenarioEntityPointFlagsCheckedListBox = new System.Windows.Forms.CheckedListBox(); - this.label135 = new System.Windows.Forms.Label(); - this.ScenarioEntityPointFlagsUpDown = new System.Windows.Forms.NumericUpDown(); - this.ScenarioEntityPointShortRangeCheckBox = new System.Windows.Forms.CheckBox(); - this.ScenarioEntityPointExtendedRangeCheckBox = new System.Windows.Forms.CheckBox(); - this.ScenarioEntityPointHighPriCheckBox = new System.Windows.Forms.CheckBox(); - this.label133 = new System.Windows.Forms.Label(); - this.ScenarioEntityPointEndUpDown = new System.Windows.Forms.NumericUpDown(); - this.ScenarioEntityPointStartUpDown = new System.Windows.Forms.NumericUpDown(); - this.label134 = new System.Windows.Forms.Label(); - this.ScenarioEntityPointRadiusTextBox = new System.Windows.Forms.TextBox(); - this.label132 = new System.Windows.Forms.Label(); - this.ScenarioEntityPointTimeTillPedLeavesTextBox = new System.Windows.Forms.TextBox(); - this.label131 = new System.Windows.Forms.Label(); - this.ScenarioEntityPointProbabilityTextBox = new System.Windows.Forms.TextBox(); - this.label130 = new System.Windows.Forms.Label(); - this.ScenarioEntityPointAvailableInMpSpComboBox = new System.Windows.Forms.ComboBox(); - this.label129 = new System.Windows.Forms.Label(); - this.ScenarioEntityPointRequiredImapHashLabel = new System.Windows.Forms.Label(); - this.ScenarioEntityPointRequiredImapTextBox = new System.Windows.Forms.TextBox(); - this.label128 = new System.Windows.Forms.Label(); - this.ScenarioEntityPointInteriorHashLabel = new System.Windows.Forms.Label(); - this.ScenarioEntityPointInteriorTextBox = new System.Windows.Forms.TextBox(); - this.label126 = new System.Windows.Forms.Label(); - this.ScenarioEntityPointGroupHashLabel = new System.Windows.Forms.Label(); - this.ScenarioEntityPointGroupTextBox = new System.Windows.Forms.TextBox(); - this.label124 = new System.Windows.Forms.Label(); - this.ScenarioEntityPointPedTypeHashLabel = new System.Windows.Forms.Label(); - this.ScenarioEntityPointPedTypeTextBox = new System.Windows.Forms.TextBox(); - this.label122 = new System.Windows.Forms.Label(); - this.ScenarioEntityPointSpawnTypeHashLabel = new System.Windows.Forms.Label(); - this.ScenarioEntityPointSpawnTypeTextBox = new System.Windows.Forms.TextBox(); - this.label120 = new System.Windows.Forms.Label(); - this.ScenarioEntityPointRotationTextBox = new System.Windows.Forms.TextBox(); - this.label118 = new System.Windows.Forms.Label(); - this.ScenarioEntityPointGoToButton = new System.Windows.Forms.Button(); - this.ScenarioEntityPointPositionTextBox = new System.Windows.Forms.TextBox(); - this.label117 = new System.Windows.Forms.Label(); - this.label116 = new System.Windows.Forms.Label(); - this.ScenarioChainTabPage = new System.Windows.Forms.TabPage(); - this.ScenarioChainDeleteButton = new System.Windows.Forms.Button(); - this.ScenarioChainAddToProjectButton = new System.Windows.Forms.Button(); - this.splitContainer3 = new System.Windows.Forms.SplitContainer(); - this.ScenarioChainMoveEdgeDownButton = new System.Windows.Forms.Button(); - this.ScenarioChainMoveEdgeUpButton = new System.Windows.Forms.Button(); - this.label138 = new System.Windows.Forms.Label(); - this.ScenarioChainUnk1UpDown = new System.Windows.Forms.NumericUpDown(); - this.ScenarioChainRemoveEdgeButton = new System.Windows.Forms.Button(); - this.ScenarioChainAddEdgeButton = new System.Windows.Forms.Button(); - this.ScenarioChainEdgesListBox = new System.Windows.Forms.ListBox(); - this.ScenarioChainEdgeCountLabel = new System.Windows.Forms.Label(); - this.ScenarioChainEdgePanel = new System.Windows.Forms.Panel(); - this.ScenarioChainEdgeNavSpeedComboBox = new System.Windows.Forms.ComboBox(); - this.label137 = new System.Windows.Forms.Label(); - this.ScenarioChainEdgeNavModeComboBox = new System.Windows.Forms.ComboBox(); - this.label136 = new System.Windows.Forms.Label(); - this.ScenarioChainEdgeActionComboBox = new System.Windows.Forms.ComboBox(); - this.label127 = new System.Windows.Forms.Label(); - this.ScenarioChainEdgeNodeIndexToUpDown = new System.Windows.Forms.NumericUpDown(); - this.ScenarioChainEdgeNodeIndexFromUpDown = new System.Windows.Forms.NumericUpDown(); - this.label125 = new System.Windows.Forms.Label(); - this.label121 = new System.Windows.Forms.Label(); - this.ScenarioChainNodeTabPage = new System.Windows.Forms.TabPage(); - this.ScenarioChainNodePanel = new System.Windows.Forms.Panel(); - this.ScenarioChainNodeTypeComboBox = new System.Windows.Forms.ComboBox(); - this.ScenarioChainNodeIndexTextBox = new System.Windows.Forms.TextBox(); - this.label115 = new System.Windows.Forms.Label(); - this.ScenarioChainNodeLastCheckBox = new System.Windows.Forms.CheckBox(); - this.ScenarioChainNodeFirstCheckBox = new System.Windows.Forms.CheckBox(); - this.label123 = new System.Windows.Forms.Label(); - this.ScenarioChainNodeUnk1HashLabel = new System.Windows.Forms.Label(); - this.ScenarioChainNodeUnk1TextBox = new System.Windows.Forms.TextBox(); - this.label119 = new System.Windows.Forms.Label(); - this.ScenarioChainNodeGoToButton = new System.Windows.Forms.Button(); - this.ScenarioChainNodePositionTextBox = new System.Windows.Forms.TextBox(); - this.label105 = new System.Windows.Forms.Label(); - this.ScenarioChainNodeDeleteButton = new System.Windows.Forms.Button(); - this.ScenarioChainNodeCheckBox = new System.Windows.Forms.CheckBox(); - this.ScenarioChainNodeAddToProjectButton = new System.Windows.Forms.Button(); - this.ScenarioClusterTabPage = new System.Windows.Forms.TabPage(); - this.ScenarioClusterDeleteButton = new System.Windows.Forms.Button(); - this.ScenarioClusterAddToProjectButton = new System.Windows.Forms.Button(); - this.ScenarioClusterCheckBox = new System.Windows.Forms.CheckBox(); - this.ScenarioClusterPanel = new System.Windows.Forms.Panel(); - this.label159 = new System.Windows.Forms.Label(); - this.ScenarioClusterAddPointButton = new System.Windows.Forms.Button(); - this.label158 = new System.Windows.Forms.Label(); - this.ScenarioClusterPointsListBox = new System.Windows.Forms.ListBox(); - this.ScenarioClusterRadiusTextBox = new System.Windows.Forms.TextBox(); - this.label157 = new System.Windows.Forms.Label(); - this.ScenarioClusterUnk2CheckBox = new System.Windows.Forms.CheckBox(); - this.ScenarioClusterUnk1TextBox = new System.Windows.Forms.TextBox(); - this.label140 = new System.Windows.Forms.Label(); - this.ScenarioClusterGoToButton = new System.Windows.Forms.Button(); - this.ScenarioClusterCenterTextBox = new System.Windows.Forms.TextBox(); - this.label139 = new System.Windows.Forms.Label(); - this.ScenarioClusterPointTabPage = new System.Windows.Forms.TabPage(); - this.ScenarioClusterPointDeleteButton = new System.Windows.Forms.Button(); - this.ScenarioClusterPointAddToProjectButton = new System.Windows.Forms.Button(); - this.ScenarioClusterPointPanel = new System.Windows.Forms.Panel(); - this.ScenarioClusterPointImapHashLabel = new System.Windows.Forms.Label(); - this.ScenarioClusterPointImapTextBox = new System.Windows.Forms.TextBox(); - this.label143 = new System.Windows.Forms.Label(); - this.ScenarioClusterPointGroupHashLabel = new System.Windows.Forms.Label(); - this.ScenarioClusterPointGroupTextBox = new System.Windows.Forms.TextBox(); - this.label141 = new System.Windows.Forms.Label(); - this.ScenarioClusterPointInteriorHashLabel = new System.Windows.Forms.Label(); - this.ScenarioClusterPointFlagsCheckedListBox = new System.Windows.Forms.CheckedListBox(); - this.label142 = new System.Windows.Forms.Label(); - this.ScenarioClusterPointDirectionTextBox = new System.Windows.Forms.TextBox(); - this.label144 = new System.Windows.Forms.Label(); - this.ScenarioClusterPointFlagsUpDown = new System.Windows.Forms.NumericUpDown(); - this.label145 = new System.Windows.Forms.Label(); - this.ScenarioClusterPointGoToButton = new System.Windows.Forms.Button(); - this.ScenarioClusterPointWaitTimeUpDown = new System.Windows.Forms.NumericUpDown(); - this.ScenarioClusterPointPositionTextBox = new System.Windows.Forms.TextBox(); - this.label146 = new System.Windows.Forms.Label(); - this.label147 = new System.Windows.Forms.Label(); - this.ScenarioClusterPointRadiusUpDown = new System.Windows.Forms.NumericUpDown(); - this.label148 = new System.Windows.Forms.Label(); - this.ScenarioClusterPointAnimalFlagUpDown = new System.Windows.Forms.NumericUpDown(); - this.label149 = new System.Windows.Forms.Label(); - this.ScenarioClusterPointProbabilityUpDown = new System.Windows.Forms.NumericUpDown(); - this.ScenarioClusterPointInteriorTextBox = new System.Windows.Forms.TextBox(); - this.label151 = new System.Windows.Forms.Label(); - this.label152 = new System.Windows.Forms.Label(); - this.ScenarioClusterPointTimeEndUpDown = new System.Windows.Forms.NumericUpDown(); - this.ScenarioClusterPointTimeStartUpDown = new System.Windows.Forms.NumericUpDown(); - this.label153 = new System.Windows.Forms.Label(); - this.ScenarioClusterPointModelSetComboBox = new System.Windows.Forms.ComboBox(); - this.label154 = new System.Windows.Forms.Label(); - this.ScenarioClusterPointTypeComboBox = new System.Windows.Forms.ComboBox(); - this.label155 = new System.Windows.Forms.Label(); - this.ScenarioClusterPointCheckBox = new System.Windows.Forms.CheckBox(); - this.TopMenuStrip = new CodeWalker.WinForms.MenuStripFix(); - this.FileMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.FileNewMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.FileNewProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.FileNewYmapMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.FileNewYndMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.FileNewYnvMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.FileNewTrainsMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.FileNewScenarioMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.FileOpenMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.FileOpenProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.FileOpenYmapMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.FileOpenYndMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.FileOpenYnvMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.FileOpenTrainsMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.FileOpenScenarioMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); - this.FileCloseProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); - this.FileSaveProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.FileSaveProjectAsMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.FileSaveItemMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.FileSaveItemAsMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.YmapMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.YmapNameMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); - this.YmapNewEntityMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.YmapNewCarGenMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator(); - this.YmapAddToProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.YmapRemoveFromProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.YndMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.YndNameMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); - this.YndNewNodeMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator(); - this.YndAddToProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.YndRemoveFromProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.YnvMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.YnvNameMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator(); - this.YnvNewPolygonMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator(); - this.YnvAddToProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.YnvRemoveFromProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.TrainsMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.TrainsNameMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator(); - this.TrainsNewNodeMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator(); - this.TrainsAddToProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.TrainsRemoveFromProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.ScenarioMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.ScenarioNameMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator11 = new System.Windows.Forms.ToolStripSeparator(); - this.ScenarioNewPointMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.ScenarioNewPointFromSelectedMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.ScenarioNewEntityOverrideMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.ScenarioNewChainMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.ScenarioNewClusterMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator12 = new System.Windows.Forms.ToolStripSeparator(); - this.ScenarioAddToProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.ScenarioRemoveFromProjectMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolsMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolsImportMenyooXmlMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.OptionsMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.OptionsHideGTAVMapMenu = new System.Windows.Forms.ToolStripMenuItem(); - this.SaveFileDialog = new System.Windows.Forms.SaveFileDialog(); - this.OpenFileDialog = new System.Windows.Forms.OpenFileDialog(); - this.ScenarioImportChainMenu = new System.Windows.Forms.ToolStripMenuItem(); - ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); - this.splitContainer1.Panel1.SuspendLayout(); - this.splitContainer1.Panel2.SuspendLayout(); - this.splitContainer1.SuspendLayout(); - this.MainTabControl.SuspendLayout(); - this.ProjectTabPage.SuspendLayout(); - this.ProjectPanel.SuspendLayout(); - this.ProjectTabControl.SuspendLayout(); - this.ProjectGeneralTabPage.SuspendLayout(); - this.ProjectManifestTabPage.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.ProjectManifestTextBox)).BeginInit(); - this.YmapTabPage.SuspendLayout(); - this.YmapTabControl.SuspendLayout(); - this.YmapYmapTabPage.SuspendLayout(); - this.YmapPanel.SuspendLayout(); - this.tabControl1.SuspendLayout(); - this.tabPage1.SuspendLayout(); - this.groupBox1.SuspendLayout(); - this.groupBox2.SuspendLayout(); - this.tabPage2.SuspendLayout(); - this.YmapEntityTabPage.SuspendLayout(); - this.EntityPanel.SuspendLayout(); - this.EntityTabControl.SuspendLayout(); - this.EntityGeneralTabPage.SuspendLayout(); - this.EntityLodTabPage.SuspendLayout(); - this.EntityPivotTabPage.SuspendLayout(); - this.YmapCarGenTabPage.SuspendLayout(); - this.CarGenPanel.SuspendLayout(); - this.YndTabPage.SuspendLayout(); - this.YndTabControl.SuspendLayout(); - this.YndYndTabPage.SuspendLayout(); - this.YndPanel.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.YndAreaIDYUpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.YndAreaIDXUpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.YndPedNodesUpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.YndVehicleNodesUpDown)).BeginInit(); - this.YndNodeTabPage.SuspendLayout(); - this.YndNodePanel.SuspendLayout(); - this.PathNodeTabControl.SuspendLayout(); - this.PathNodePropertiesTabPage.SuspendLayout(); - this.PathNodeFlags5GroupBox.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeFlags5UpDown)).BeginInit(); - this.PathNodeFlags4GroupBox.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeFlags42UpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeFlags4UpDown)).BeginInit(); - this.PathNodeFlags3GroupBox.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeFlags32UpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeFlags3UpDown)).BeginInit(); - this.PathNodeFlags2GroupBox.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeFlags2UpDown)).BeginInit(); - this.PathNodeFlags1GroupBox.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeFlags1UpDown)).BeginInit(); - this.PathNodeFlags0GroupBox.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeFlags0UpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeAreaIDUpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeNodeIDUpDown)).BeginInit(); - this.PathNodeLinksTabPage.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit(); - this.splitContainer2.Panel1.SuspendLayout(); - this.splitContainer2.Panel2.SuspendLayout(); - this.splitContainer2.SuspendLayout(); - this.PathNodeLinkPanel.SuspendLayout(); - this.PathLinkFlags2GroupBox.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeLinkFwdLanesUpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeLinkBackLanesUpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeLinkFlags2UpDown)).BeginInit(); - this.PathLinkFlags1GroupBox.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeLinkOffsetSizeUpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeLinkFlags1UpDown)).BeginInit(); - this.PathLinkFlags0GroupBox.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeLinkFlags04UpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeLinkFlags03UpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeLinkFlags0UpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeLinkLengthUpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeLinkNodeIDUpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeLinkAreaIDUpDown)).BeginInit(); - this.PathNodeJunctionTabPage.SuspendLayout(); - this.PathNodeJunctionPanel.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeJunctionPosYUpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeJunctionPosXUpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeJunctionHeightmapDimYUpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeJunctionHeightmapDimXUpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeJunctionMinZUpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeJunctionMaxZUpDown)).BeginInit(); - this.YnvTabPage.SuspendLayout(); - this.YnvTabControl.SuspendLayout(); - this.YnvYnvTabPage.SuspendLayout(); - this.YnvPanel.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.YnvAreaIDYUpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.YnvAreaIDXUpDown)).BeginInit(); - this.YnvPolyTabPage.SuspendLayout(); - this.YnvPortalTabPage.SuspendLayout(); - this.TrainsTabPage.SuspendLayout(); - this.TrainsTabControl.SuspendLayout(); - this.TrainTrackTabPage.SuspendLayout(); - this.TrainTrackFilePanel.SuspendLayout(); - this.TrainNodeTabPage.SuspendLayout(); - this.TrainNodePanel.SuspendLayout(); - this.ScenarioTabPage.SuspendLayout(); - this.ScenarioTabControl.SuspendLayout(); - this.ScenarioYmtTabPage.SuspendLayout(); - this.ScenarioYmtPanel.SuspendLayout(); - this.ScenarioPointTabPage.SuspendLayout(); - this.ScenarioPointOuterPanel.SuspendLayout(); - this.ScenarioPointPanel.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioPointFlagsValueUpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioPointWaitTimeUpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioPointRadiusUpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioPointSpOnlyFlagUpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioPointProbabilityUpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioPointTimeEndUpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioPointTimeStartUpDown)).BeginInit(); - this.ScenarioEntityTabPage.SuspendLayout(); - this.ScenarioEntityPanel.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioEntityUnk2UpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioEntityUnk1UpDown)).BeginInit(); - this.ScenarioEntityPointTabPage.SuspendLayout(); - this.ScenarioEntityPointPanel.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioEntityPointFlagsUpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioEntityPointEndUpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioEntityPointStartUpDown)).BeginInit(); - this.ScenarioChainTabPage.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).BeginInit(); - this.splitContainer3.Panel1.SuspendLayout(); - this.splitContainer3.Panel2.SuspendLayout(); - this.splitContainer3.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioChainUnk1UpDown)).BeginInit(); - this.ScenarioChainEdgePanel.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioChainEdgeNodeIndexToUpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioChainEdgeNodeIndexFromUpDown)).BeginInit(); - this.ScenarioChainNodeTabPage.SuspendLayout(); - this.ScenarioChainNodePanel.SuspendLayout(); - this.ScenarioClusterTabPage.SuspendLayout(); - this.ScenarioClusterPanel.SuspendLayout(); - this.ScenarioClusterPointTabPage.SuspendLayout(); - this.ScenarioClusterPointPanel.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioClusterPointFlagsUpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioClusterPointWaitTimeUpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioClusterPointRadiusUpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioClusterPointAnimalFlagUpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioClusterPointProbabilityUpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioClusterPointTimeEndUpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioClusterPointTimeStartUpDown)).BeginInit(); - this.TopMenuStrip.SuspendLayout(); - this.SuspendLayout(); - // - // splitContainer1 - // - this.splitContainer1.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.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; - this.splitContainer1.Location = new System.Drawing.Point(0, 27); - this.splitContainer1.Name = "splitContainer1"; - // - // splitContainer1.Panel1 - // - this.splitContainer1.Panel1.Controls.Add(this.ProjectTreeView); - // - // splitContainer1.Panel2 - // - this.splitContainer1.Panel2.Controls.Add(this.MainTabControl); - this.splitContainer1.Size = new System.Drawing.Size(776, 504); - this.splitContainer1.SplitterDistance = 237; - this.splitContainer1.TabIndex = 0; - // - // ProjectTreeView - // - this.ProjectTreeView.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.ProjectTreeView.FullRowSelect = true; - this.ProjectTreeView.HideSelection = false; - this.ProjectTreeView.Location = new System.Drawing.Point(3, 3); - this.ProjectTreeView.Name = "ProjectTreeView"; - this.ProjectTreeView.ShowRootLines = false; - this.ProjectTreeView.Size = new System.Drawing.Size(231, 498); - this.ProjectTreeView.TabIndex = 1; - this.ProjectTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.ProjectTreeView_AfterSelect); - // - // MainTabControl - // - this.MainTabControl.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.MainTabControl.Controls.Add(this.ProjectTabPage); - this.MainTabControl.Controls.Add(this.YmapTabPage); - this.MainTabControl.Controls.Add(this.YndTabPage); - this.MainTabControl.Controls.Add(this.YnvTabPage); - this.MainTabControl.Controls.Add(this.TrainsTabPage); - this.MainTabControl.Controls.Add(this.ScenarioTabPage); - this.MainTabControl.Location = new System.Drawing.Point(3, 3); - this.MainTabControl.Name = "MainTabControl"; - this.MainTabControl.SelectedIndex = 0; - this.MainTabControl.Size = new System.Drawing.Size(529, 498); - this.MainTabControl.TabIndex = 2; - // - // ProjectTabPage - // - this.ProjectTabPage.Controls.Add(this.ProjectPanel); - this.ProjectTabPage.Location = new System.Drawing.Point(4, 22); - this.ProjectTabPage.Name = "ProjectTabPage"; - this.ProjectTabPage.Padding = new System.Windows.Forms.Padding(3); - this.ProjectTabPage.Size = new System.Drawing.Size(521, 472); - this.ProjectTabPage.TabIndex = 0; - this.ProjectTabPage.Text = "Project"; - this.ProjectTabPage.UseVisualStyleBackColor = true; - // - // ProjectPanel - // - this.ProjectPanel.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.ProjectPanel.Controls.Add(this.ProjectTabControl); - this.ProjectPanel.Enabled = false; - this.ProjectPanel.Location = new System.Drawing.Point(0, 0); - this.ProjectPanel.Name = "ProjectPanel"; - this.ProjectPanel.Size = new System.Drawing.Size(521, 472); - this.ProjectPanel.TabIndex = 3; - // - // ProjectTabControl - // - this.ProjectTabControl.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.ProjectTabControl.Controls.Add(this.ProjectGeneralTabPage); - this.ProjectTabControl.Controls.Add(this.ProjectManifestTabPage); - this.ProjectTabControl.Location = new System.Drawing.Point(0, 3); - this.ProjectTabControl.Name = "ProjectTabControl"; - this.ProjectTabControl.SelectedIndex = 0; - this.ProjectTabControl.Size = new System.Drawing.Size(518, 469); - this.ProjectTabControl.TabIndex = 26; - // - // ProjectGeneralTabPage - // - this.ProjectGeneralTabPage.Controls.Add(this.ProjectNameTextBox); - this.ProjectGeneralTabPage.Controls.Add(this.ProjectHideMapCheckBox); - this.ProjectGeneralTabPage.Controls.Add(this.ProjectVersionLabel); - this.ProjectGeneralTabPage.Controls.Add(this.ProjectShowEntitiesCheckBox); - this.ProjectGeneralTabPage.Controls.Add(this.label1); - this.ProjectGeneralTabPage.Location = new System.Drawing.Point(4, 22); - this.ProjectGeneralTabPage.Name = "ProjectGeneralTabPage"; - this.ProjectGeneralTabPage.Padding = new System.Windows.Forms.Padding(3); - this.ProjectGeneralTabPage.Size = new System.Drawing.Size(510, 443); - this.ProjectGeneralTabPage.TabIndex = 0; - this.ProjectGeneralTabPage.Text = "General"; - this.ProjectGeneralTabPage.UseVisualStyleBackColor = true; - // - // ProjectNameTextBox - // - this.ProjectNameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ProjectNameTextBox.Location = new System.Drawing.Point(82, 16); - this.ProjectNameTextBox.Name = "ProjectNameTextBox"; - this.ProjectNameTextBox.Size = new System.Drawing.Size(265, 20); - this.ProjectNameTextBox.TabIndex = 1; - this.ProjectNameTextBox.TextChanged += new System.EventHandler(this.ProjectNameTextBox_TextChanged); - // - // ProjectHideMapCheckBox - // - this.ProjectHideMapCheckBox.AutoSize = true; - this.ProjectHideMapCheckBox.Location = new System.Drawing.Point(82, 123); - this.ProjectHideMapCheckBox.Name = "ProjectHideMapCheckBox"; - this.ProjectHideMapCheckBox.Size = new System.Drawing.Size(103, 17); - this.ProjectHideMapCheckBox.TabIndex = 25; - this.ProjectHideMapCheckBox.Text = "Hide GTAV map"; - this.ProjectHideMapCheckBox.UseVisualStyleBackColor = true; - this.ProjectHideMapCheckBox.CheckedChanged += new System.EventHandler(this.ProjectHideMapCheckBox_CheckedChanged); - // - // ProjectVersionLabel - // - this.ProjectVersionLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ProjectVersionLabel.AutoSize = true; - this.ProjectVersionLabel.Location = new System.Drawing.Point(375, 19); - this.ProjectVersionLabel.Name = "ProjectVersionLabel"; - this.ProjectVersionLabel.Size = new System.Drawing.Size(51, 13); - this.ProjectVersionLabel.TabIndex = 2; - this.ProjectVersionLabel.Text = "Version: -"; - // - // ProjectShowEntitiesCheckBox - // - this.ProjectShowEntitiesCheckBox.AutoSize = true; - this.ProjectShowEntitiesCheckBox.Checked = true; - this.ProjectShowEntitiesCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.ProjectShowEntitiesCheckBox.Location = new System.Drawing.Point(82, 100); - this.ProjectShowEntitiesCheckBox.Name = "ProjectShowEntitiesCheckBox"; - this.ProjectShowEntitiesCheckBox.Size = new System.Drawing.Size(156, 17); - this.ProjectShowEntitiesCheckBox.TabIndex = 24; - this.ProjectShowEntitiesCheckBox.Text = "Show entities in World view"; - this.ProjectShowEntitiesCheckBox.UseVisualStyleBackColor = true; - this.ProjectShowEntitiesCheckBox.CheckedChanged += new System.EventHandler(this.ProjectShowEntitiesCheckBox_CheckedChanged); - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(19, 19); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(38, 13); - this.label1.TabIndex = 0; - this.label1.Text = "Name:"; - // - // ProjectManifestTabPage - // - this.ProjectManifestTabPage.Controls.Add(this.label162); - this.ProjectManifestTabPage.Controls.Add(this.ProjectManifestGenerateButton); - this.ProjectManifestTabPage.Controls.Add(this.ProjectManifestTextBox); - this.ProjectManifestTabPage.Location = new System.Drawing.Point(4, 22); - this.ProjectManifestTabPage.Name = "ProjectManifestTabPage"; - this.ProjectManifestTabPage.Padding = new System.Windows.Forms.Padding(3); - this.ProjectManifestTabPage.Size = new System.Drawing.Size(510, 443); - this.ProjectManifestTabPage.TabIndex = 1; - this.ProjectManifestTabPage.Text = "Manifest"; - this.ProjectManifestTabPage.UseVisualStyleBackColor = true; - // - // label162 - // - this.label162.AutoSize = true; - this.label162.Location = new System.Drawing.Point(99, 11); - this.label162.Name = "label162"; - this.label162.Size = new System.Drawing.Size(111, 13); - this.label162.TabIndex = 2; - this.label162.Text = "XML for _manifest.ymf"; - // - // ProjectManifestGenerateButton - // - this.ProjectManifestGenerateButton.Location = new System.Drawing.Point(6, 6); - this.ProjectManifestGenerateButton.Name = "ProjectManifestGenerateButton"; - this.ProjectManifestGenerateButton.Size = new System.Drawing.Size(75, 23); - this.ProjectManifestGenerateButton.TabIndex = 1; - this.ProjectManifestGenerateButton.Text = "Generate"; - this.ProjectManifestGenerateButton.UseVisualStyleBackColor = true; - this.ProjectManifestGenerateButton.Click += new System.EventHandler(this.ProjectManifestGenerateButton_Click); - // - // ProjectManifestTextBox - // - this.ProjectManifestTextBox.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.ProjectManifestTextBox.AutoCompleteBracketsList = new char[] { - '(', - ')', - '{', - '}', - '[', - ']', - '\"', - '\"', - '\'', - '\''}; - this.ProjectManifestTextBox.AutoIndentCharsPatterns = ""; - this.ProjectManifestTextBox.AutoScrollMinSize = new System.Drawing.Size(2, 14); - this.ProjectManifestTextBox.BackBrush = null; - this.ProjectManifestTextBox.CharHeight = 14; - this.ProjectManifestTextBox.CharWidth = 8; - this.ProjectManifestTextBox.CommentPrefix = null; - this.ProjectManifestTextBox.Cursor = System.Windows.Forms.Cursors.IBeam; - this.ProjectManifestTextBox.DisabledColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(180)))), ((int)(((byte)(180)))), ((int)(((byte)(180))))); - this.ProjectManifestTextBox.Font = new System.Drawing.Font("Courier New", 9.75F); - this.ProjectManifestTextBox.IsReplaceMode = false; - this.ProjectManifestTextBox.Language = FastColoredTextBoxNS.Language.XML; - this.ProjectManifestTextBox.LeftBracket = '<'; - this.ProjectManifestTextBox.LeftBracket2 = '('; - this.ProjectManifestTextBox.Location = new System.Drawing.Point(3, 35); - this.ProjectManifestTextBox.Name = "ProjectManifestTextBox"; - this.ProjectManifestTextBox.Paddings = new System.Windows.Forms.Padding(0); - this.ProjectManifestTextBox.RightBracket = '>'; - this.ProjectManifestTextBox.RightBracket2 = ')'; - this.ProjectManifestTextBox.SelectionColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(255))))); - this.ProjectManifestTextBox.ServiceColors = ((FastColoredTextBoxNS.ServiceColors)(resources.GetObject("ProjectManifestTextBox.ServiceColors"))); - this.ProjectManifestTextBox.Size = new System.Drawing.Size(504, 408); - this.ProjectManifestTextBox.TabIndex = 0; - this.ProjectManifestTextBox.Zoom = 100; - // - // YmapTabPage - // - this.YmapTabPage.Controls.Add(this.YmapTabControl); - this.YmapTabPage.Location = new System.Drawing.Point(4, 22); - this.YmapTabPage.Name = "YmapTabPage"; - this.YmapTabPage.Padding = new System.Windows.Forms.Padding(3); - this.YmapTabPage.Size = new System.Drawing.Size(521, 472); - this.YmapTabPage.TabIndex = 1; - this.YmapTabPage.Text = "Map"; - this.YmapTabPage.UseVisualStyleBackColor = true; - // - // YmapTabControl - // - this.YmapTabControl.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.YmapTabControl.Controls.Add(this.YmapYmapTabPage); - this.YmapTabControl.Controls.Add(this.YmapEntityTabPage); - this.YmapTabControl.Controls.Add(this.YmapCarGenTabPage); - this.YmapTabControl.Controls.Add(this.YmapMloInstanceTabPage); - this.YmapTabControl.Controls.Add(this.YmapTimecycleModifierTabPage); - this.YmapTabControl.Location = new System.Drawing.Point(0, 3); - this.YmapTabControl.Name = "YmapTabControl"; - this.YmapTabControl.SelectedIndex = 0; - this.YmapTabControl.Size = new System.Drawing.Size(518, 469); - this.YmapTabControl.TabIndex = 0; - // - // YmapYmapTabPage - // - this.YmapYmapTabPage.Controls.Add(this.YmapPanel); - this.YmapYmapTabPage.Location = new System.Drawing.Point(4, 22); - this.YmapYmapTabPage.Name = "YmapYmapTabPage"; - this.YmapYmapTabPage.Padding = new System.Windows.Forms.Padding(3); - this.YmapYmapTabPage.Size = new System.Drawing.Size(510, 443); - this.YmapYmapTabPage.TabIndex = 0; - this.YmapYmapTabPage.Text = "Ymap"; - this.YmapYmapTabPage.UseVisualStyleBackColor = true; - // - // YmapPanel - // - this.YmapPanel.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.YmapPanel.Controls.Add(this.tabControl1); - this.YmapPanel.Controls.Add(this.YmapProjectPathTextBox); - this.YmapPanel.Controls.Add(this.label30); - this.YmapPanel.Controls.Add(this.YmapFileLocationTextBox); - this.YmapPanel.Controls.Add(this.label29); - this.YmapPanel.Controls.Add(this.YmapCalculateExtentsButton); - this.YmapPanel.Controls.Add(this.YmapStreamingExtentsMaxTextBox); - this.YmapPanel.Controls.Add(this.label10); - this.YmapPanel.Controls.Add(this.YmapStreamingExtentsMinTextBox); - this.YmapPanel.Controls.Add(this.label11); - this.YmapPanel.Controls.Add(this.YmapEntitiesExtentsMaxTextBox); - this.YmapPanel.Controls.Add(this.label9); - this.YmapPanel.Controls.Add(this.YmapEntitiesExtentsMinTextBox); - this.YmapPanel.Controls.Add(this.label8); - this.YmapPanel.Controls.Add(this.YmapParentHashLabel); - this.YmapPanel.Controls.Add(this.YmapNameHashLabel); - this.YmapPanel.Controls.Add(this.YmapParentTextBox); - this.YmapPanel.Controls.Add(this.label4); - this.YmapPanel.Controls.Add(this.label5); - this.YmapPanel.Controls.Add(this.YmapNameTextBox); - this.YmapPanel.Controls.Add(this.label3); - this.YmapPanel.Controls.Add(this.label2); - this.YmapPanel.Enabled = false; - this.YmapPanel.Location = new System.Drawing.Point(0, 0); - this.YmapPanel.Name = "YmapPanel"; - this.YmapPanel.Size = new System.Drawing.Size(510, 443); - this.YmapPanel.TabIndex = 5; - // - // tabControl1 - // - this.tabControl1.Controls.Add(this.tabPage1); - this.tabControl1.Controls.Add(this.tabPage2); - this.tabControl1.Location = new System.Drawing.Point(3, 61); - this.tabControl1.Name = "tabControl1"; - this.tabControl1.SelectedIndex = 0; - this.tabControl1.Size = new System.Drawing.Size(504, 203); - this.tabControl1.TabIndex = 41; - // - // tabPage1 - // - this.tabPage1.Controls.Add(this.groupBox1); - this.tabPage1.Controls.Add(this.YmapCalculateFlagsButton); - this.tabPage1.Controls.Add(this.groupBox2); - this.tabPage1.Location = new System.Drawing.Point(4, 22); - this.tabPage1.Name = "tabPage1"; - this.tabPage1.Padding = new System.Windows.Forms.Padding(3); - this.tabPage1.Size = new System.Drawing.Size(496, 177); - this.tabPage1.TabIndex = 0; - this.tabPage1.Text = "Flags"; - this.tabPage1.UseVisualStyleBackColor = true; - // - // groupBox1 - // - this.groupBox1.Controls.Add(this.YmapCFlagsGrassCheckBox); - this.groupBox1.Controls.Add(this.YmapCFlagsCriticalCheckBox); - this.groupBox1.Controls.Add(this.YmapCFlagsDistLightsCheckBox); - this.groupBox1.Controls.Add(this.YmapCFlagsLODLightsCheckBox); - this.groupBox1.Controls.Add(this.YmapCFlagsPhysicsCheckBox); - this.groupBox1.Controls.Add(this.YmapCFlagsOcclusionCheckBox); - this.groupBox1.Controls.Add(this.YmapCFlagsInteriorCheckBox); - this.groupBox1.Controls.Add(this.YmapCFlagsSLODCheckBox); - this.groupBox1.Controls.Add(this.YmapCFlagsSLOD2CheckBox); - this.groupBox1.Controls.Add(this.YmapCFlagsLODCheckBox); - this.groupBox1.Controls.Add(this.YmapCFlagsHDCheckBox); - this.groupBox1.Controls.Add(this.YmapContentFlagsTextBox); - this.groupBox1.Controls.Add(this.label7); - this.groupBox1.Location = new System.Drawing.Point(6, 6); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(259, 166); - this.groupBox1.TabIndex = 13; - this.groupBox1.TabStop = false; - this.groupBox1.Text = "Content Flags"; - // - // YmapCFlagsGrassCheckBox - // - this.YmapCFlagsGrassCheckBox.AutoSize = true; - this.YmapCFlagsGrassCheckBox.Location = new System.Drawing.Point(138, 113); - this.YmapCFlagsGrassCheckBox.Name = "YmapCFlagsGrassCheckBox"; - this.YmapCFlagsGrassCheckBox.Size = new System.Drawing.Size(86, 17); - this.YmapCFlagsGrassCheckBox.TabIndex = 10; - this.YmapCFlagsGrassCheckBox.Text = "Grass (1024)"; - this.YmapCFlagsGrassCheckBox.UseVisualStyleBackColor = true; - this.YmapCFlagsGrassCheckBox.CheckedChanged += new System.EventHandler(this.YmapCFlagsGrassCheckBox_CheckedChanged); - // - // YmapCFlagsCriticalCheckBox - // - this.YmapCFlagsCriticalCheckBox.AutoSize = true; - this.YmapCFlagsCriticalCheckBox.Location = new System.Drawing.Point(6, 113); - this.YmapCFlagsCriticalCheckBox.Name = "YmapCFlagsCriticalCheckBox"; - this.YmapCFlagsCriticalCheckBox.Size = new System.Drawing.Size(84, 17); - this.YmapCFlagsCriticalCheckBox.TabIndex = 9; - this.YmapCFlagsCriticalCheckBox.Text = "Critical (512)"; - this.YmapCFlagsCriticalCheckBox.UseVisualStyleBackColor = true; - this.YmapCFlagsCriticalCheckBox.CheckedChanged += new System.EventHandler(this.YmapCFlagsCriticalCheckBox_CheckedChanged); - // - // YmapCFlagsDistLightsCheckBox - // - this.YmapCFlagsDistLightsCheckBox.AutoSize = true; - this.YmapCFlagsDistLightsCheckBox.Location = new System.Drawing.Point(138, 90); - this.YmapCFlagsDistLightsCheckBox.Name = "YmapCFlagsDistLightsCheckBox"; - this.YmapCFlagsDistLightsCheckBox.Size = new System.Drawing.Size(117, 17); - this.YmapCFlagsDistLightsCheckBox.TabIndex = 8; - this.YmapCFlagsDistLightsCheckBox.Text = "Distant Lights (256)"; - this.YmapCFlagsDistLightsCheckBox.UseVisualStyleBackColor = true; - this.YmapCFlagsDistLightsCheckBox.CheckedChanged += new System.EventHandler(this.YmapCFlagsDistLightsCheckBox_CheckedChanged); - // - // YmapCFlagsLODLightsCheckBox - // - this.YmapCFlagsLODLightsCheckBox.AutoSize = true; - this.YmapCFlagsLODLightsCheckBox.Location = new System.Drawing.Point(6, 90); - this.YmapCFlagsLODLightsCheckBox.Name = "YmapCFlagsLODLightsCheckBox"; - this.YmapCFlagsLODLightsCheckBox.Size = new System.Drawing.Size(106, 17); - this.YmapCFlagsLODLightsCheckBox.TabIndex = 7; - this.YmapCFlagsLODLightsCheckBox.Text = "LOD Lights (128)"; - this.YmapCFlagsLODLightsCheckBox.UseVisualStyleBackColor = true; - this.YmapCFlagsLODLightsCheckBox.CheckedChanged += new System.EventHandler(this.YmapCFlagsLODLightsCheckBox_CheckedChanged); - // - // YmapCFlagsPhysicsCheckBox - // - this.YmapCFlagsPhysicsCheckBox.AutoSize = true; - this.YmapCFlagsPhysicsCheckBox.Location = new System.Drawing.Point(138, 67); - this.YmapCFlagsPhysicsCheckBox.Name = "YmapCFlagsPhysicsCheckBox"; - this.YmapCFlagsPhysicsCheckBox.Size = new System.Drawing.Size(83, 17); - this.YmapCFlagsPhysicsCheckBox.TabIndex = 6; - this.YmapCFlagsPhysicsCheckBox.Text = "Physics (64)"; - this.YmapCFlagsPhysicsCheckBox.UseVisualStyleBackColor = true; - this.YmapCFlagsPhysicsCheckBox.CheckedChanged += new System.EventHandler(this.YmapCFlagsPhysicsCheckBox_CheckedChanged); - // - // YmapCFlagsOcclusionCheckBox - // - this.YmapCFlagsOcclusionCheckBox.AutoSize = true; - this.YmapCFlagsOcclusionCheckBox.Location = new System.Drawing.Point(6, 67); - this.YmapCFlagsOcclusionCheckBox.Name = "YmapCFlagsOcclusionCheckBox"; - this.YmapCFlagsOcclusionCheckBox.Size = new System.Drawing.Size(94, 17); - this.YmapCFlagsOcclusionCheckBox.TabIndex = 5; - this.YmapCFlagsOcclusionCheckBox.Text = "Occlusion (32)"; - this.YmapCFlagsOcclusionCheckBox.UseVisualStyleBackColor = true; - this.YmapCFlagsOcclusionCheckBox.CheckedChanged += new System.EventHandler(this.YmapCFlagsOcclusionCheckBox_CheckedChanged); - // - // YmapCFlagsInteriorCheckBox - // - this.YmapCFlagsInteriorCheckBox.AutoSize = true; - this.YmapCFlagsInteriorCheckBox.Location = new System.Drawing.Point(6, 44); - this.YmapCFlagsInteriorCheckBox.Name = "YmapCFlagsInteriorCheckBox"; - this.YmapCFlagsInteriorCheckBox.Size = new System.Drawing.Size(73, 17); - this.YmapCFlagsInteriorCheckBox.TabIndex = 4; - this.YmapCFlagsInteriorCheckBox.Text = "Interior (8)"; - this.YmapCFlagsInteriorCheckBox.UseVisualStyleBackColor = true; - this.YmapCFlagsInteriorCheckBox.CheckedChanged += new System.EventHandler(this.YmapCFlagsInteriorCheckBox_CheckedChanged); - // - // YmapCFlagsSLODCheckBox - // - this.YmapCFlagsSLODCheckBox.AutoSize = true; - this.YmapCFlagsSLODCheckBox.Location = new System.Drawing.Point(138, 44); - this.YmapCFlagsSLODCheckBox.Name = "YmapCFlagsSLODCheckBox"; - this.YmapCFlagsSLODCheckBox.Size = new System.Drawing.Size(76, 17); - this.YmapCFlagsSLODCheckBox.TabIndex = 3; - this.YmapCFlagsSLODCheckBox.Text = "SLOD (16)"; - this.YmapCFlagsSLODCheckBox.UseVisualStyleBackColor = true; - this.YmapCFlagsSLODCheckBox.CheckedChanged += new System.EventHandler(this.YmapCFlagsSLODCheckBox_CheckedChanged); - // - // YmapCFlagsSLOD2CheckBox - // - this.YmapCFlagsSLOD2CheckBox.AutoSize = true; - this.YmapCFlagsSLOD2CheckBox.Location = new System.Drawing.Point(138, 21); - this.YmapCFlagsSLOD2CheckBox.Name = "YmapCFlagsSLOD2CheckBox"; - this.YmapCFlagsSLOD2CheckBox.Size = new System.Drawing.Size(82, 17); - this.YmapCFlagsSLOD2CheckBox.TabIndex = 2; - this.YmapCFlagsSLOD2CheckBox.Text = "SLOD2+ (4)"; - this.YmapCFlagsSLOD2CheckBox.UseVisualStyleBackColor = true; - this.YmapCFlagsSLOD2CheckBox.CheckedChanged += new System.EventHandler(this.YmapCFlagsSLOD2CheckBox_CheckedChanged); - // - // YmapCFlagsLODCheckBox - // - this.YmapCFlagsLODCheckBox.AutoSize = true; - this.YmapCFlagsLODCheckBox.Location = new System.Drawing.Point(69, 21); - this.YmapCFlagsLODCheckBox.Name = "YmapCFlagsLODCheckBox"; - this.YmapCFlagsLODCheckBox.Size = new System.Drawing.Size(63, 17); - this.YmapCFlagsLODCheckBox.TabIndex = 1; - this.YmapCFlagsLODCheckBox.Text = "LOD (2)"; - this.YmapCFlagsLODCheckBox.UseVisualStyleBackColor = true; - this.YmapCFlagsLODCheckBox.CheckedChanged += new System.EventHandler(this.YmapCFlagsLODCheckBox_CheckedChanged); - // - // YmapCFlagsHDCheckBox - // - this.YmapCFlagsHDCheckBox.AutoSize = true; - this.YmapCFlagsHDCheckBox.Location = new System.Drawing.Point(6, 21); - this.YmapCFlagsHDCheckBox.Name = "YmapCFlagsHDCheckBox"; - this.YmapCFlagsHDCheckBox.Size = new System.Drawing.Size(57, 17); - this.YmapCFlagsHDCheckBox.TabIndex = 0; - this.YmapCFlagsHDCheckBox.Text = "HD (1)"; - this.YmapCFlagsHDCheckBox.UseVisualStyleBackColor = true; - this.YmapCFlagsHDCheckBox.CheckedChanged += new System.EventHandler(this.YmapCFlagsHDCheckBox_CheckedChanged); - // - // YmapContentFlagsTextBox - // - this.YmapContentFlagsTextBox.Location = new System.Drawing.Point(69, 140); - this.YmapContentFlagsTextBox.Name = "YmapContentFlagsTextBox"; - this.YmapContentFlagsTextBox.Size = new System.Drawing.Size(130, 20); - this.YmapContentFlagsTextBox.TabIndex = 13; - this.YmapContentFlagsTextBox.TextChanged += new System.EventHandler(this.YmapContentFlagsTextBox_TextChanged); - // - // label7 - // - this.label7.AutoSize = true; - this.label7.Location = new System.Drawing.Point(26, 143); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(37, 13); - this.label7.TabIndex = 12; - this.label7.Text = "Value:"; - // - // YmapCalculateFlagsButton - // - this.YmapCalculateFlagsButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.YmapCalculateFlagsButton.Location = new System.Drawing.Point(385, 144); - this.YmapCalculateFlagsButton.Name = "YmapCalculateFlagsButton"; - this.YmapCalculateFlagsButton.Size = new System.Drawing.Size(106, 23); - this.YmapCalculateFlagsButton.TabIndex = 40; - this.YmapCalculateFlagsButton.Text = "Calculate all flags"; - this.YmapCalculateFlagsButton.UseVisualStyleBackColor = true; - this.YmapCalculateFlagsButton.Click += new System.EventHandler(this.YmapCalculateFlagsButton_Click); - // - // groupBox2 - // - this.groupBox2.Controls.Add(this.YmapFlagsLODCheckBox); - this.groupBox2.Controls.Add(this.YmapFlagsScriptedCheckBox); - this.groupBox2.Controls.Add(this.YmapFlagsTextBox); - this.groupBox2.Controls.Add(this.label6); - this.groupBox2.Location = new System.Drawing.Point(271, 6); - this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(219, 74); - this.groupBox2.TabIndex = 14; - this.groupBox2.TabStop = false; - this.groupBox2.Text = "Flags"; - // - // YmapFlagsLODCheckBox - // - this.YmapFlagsLODCheckBox.AutoSize = true; - this.YmapFlagsLODCheckBox.Location = new System.Drawing.Point(92, 21); - this.YmapFlagsLODCheckBox.Name = "YmapFlagsLODCheckBox"; - this.YmapFlagsLODCheckBox.Size = new System.Drawing.Size(63, 17); - this.YmapFlagsLODCheckBox.TabIndex = 13; - this.YmapFlagsLODCheckBox.Text = "LOD (2)"; - this.YmapFlagsLODCheckBox.UseVisualStyleBackColor = true; - this.YmapFlagsLODCheckBox.CheckedChanged += new System.EventHandler(this.YmapFlagsLODCheckBox_CheckedChanged); - // - // YmapFlagsScriptedCheckBox - // - this.YmapFlagsScriptedCheckBox.AutoSize = true; - this.YmapFlagsScriptedCheckBox.Location = new System.Drawing.Point(6, 21); - this.YmapFlagsScriptedCheckBox.Name = "YmapFlagsScriptedCheckBox"; - this.YmapFlagsScriptedCheckBox.Size = new System.Drawing.Size(80, 17); - this.YmapFlagsScriptedCheckBox.TabIndex = 12; - this.YmapFlagsScriptedCheckBox.Text = "Scripted (1)"; - this.YmapFlagsScriptedCheckBox.UseVisualStyleBackColor = true; - this.YmapFlagsScriptedCheckBox.CheckedChanged += new System.EventHandler(this.YmapFlagsScriptedCheckBox_CheckedChanged); - // - // YmapFlagsTextBox - // - this.YmapFlagsTextBox.Location = new System.Drawing.Point(78, 48); - this.YmapFlagsTextBox.Name = "YmapFlagsTextBox"; - this.YmapFlagsTextBox.Size = new System.Drawing.Size(130, 20); - this.YmapFlagsTextBox.TabIndex = 11; - this.YmapFlagsTextBox.TextChanged += new System.EventHandler(this.YmapFlagsTextBox_TextChanged); - // - // label6 - // - this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(35, 51); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(37, 13); - this.label6.TabIndex = 10; - this.label6.Text = "Value:"; - // - // tabPage2 - // - this.tabPage2.Controls.Add(this.label12); - this.tabPage2.Controls.Add(this.YmapPhysicsDictionariesTextBox); - this.tabPage2.Location = new System.Drawing.Point(4, 22); - this.tabPage2.Name = "tabPage2"; - this.tabPage2.Padding = new System.Windows.Forms.Padding(3); - this.tabPage2.Size = new System.Drawing.Size(496, 177); - this.tabPage2.TabIndex = 1; - this.tabPage2.Text = "Physics Dictionaries"; - this.tabPage2.UseVisualStyleBackColor = true; - // - // label12 - // - this.label12.AutoSize = true; - this.label12.Location = new System.Drawing.Point(3, 9); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(75, 13); - this.label12.TabIndex = 52; - this.label12.Text = "Name hashes:"; - // - // YmapPhysicsDictionariesTextBox - // - this.YmapPhysicsDictionariesTextBox.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.YmapPhysicsDictionariesTextBox.Location = new System.Drawing.Point(84, 6); - this.YmapPhysicsDictionariesTextBox.Multiline = true; - this.YmapPhysicsDictionariesTextBox.Name = "YmapPhysicsDictionariesTextBox"; - this.YmapPhysicsDictionariesTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Both; - this.YmapPhysicsDictionariesTextBox.Size = new System.Drawing.Size(248, 165); - this.YmapPhysicsDictionariesTextBox.TabIndex = 51; - this.YmapPhysicsDictionariesTextBox.WordWrap = false; - this.YmapPhysicsDictionariesTextBox.TextChanged += new System.EventHandler(this.YmapPhysicsDictionariesTextBox_TextChanged); - // - // YmapProjectPathTextBox - // - this.YmapProjectPathTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.YmapProjectPathTextBox.Location = new System.Drawing.Point(84, 417); - this.YmapProjectPathTextBox.Name = "YmapProjectPathTextBox"; - this.YmapProjectPathTextBox.ReadOnly = true; - this.YmapProjectPathTextBox.Size = new System.Drawing.Size(414, 20); - this.YmapProjectPathTextBox.TabIndex = 37; - // - // label30 - // - this.label30.AutoSize = true; - this.label30.Location = new System.Drawing.Point(6, 420); - this.label30.Name = "label30"; - this.label30.Size = new System.Drawing.Size(67, 13); - this.label30.TabIndex = 36; - this.label30.Text = "Project path:"; - // - // YmapFileLocationTextBox - // - this.YmapFileLocationTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.YmapFileLocationTextBox.Location = new System.Drawing.Point(84, 391); - this.YmapFileLocationTextBox.Name = "YmapFileLocationTextBox"; - this.YmapFileLocationTextBox.ReadOnly = true; - this.YmapFileLocationTextBox.Size = new System.Drawing.Size(414, 20); - this.YmapFileLocationTextBox.TabIndex = 35; - // - // label29 - // - this.label29.AutoSize = true; - this.label29.Location = new System.Drawing.Point(6, 394); - this.label29.Name = "label29"; - this.label29.Size = new System.Drawing.Size(66, 13); - this.label29.TabIndex = 34; - this.label29.Text = "File location:"; - // - // YmapCalculateExtentsButton - // - this.YmapCalculateExtentsButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.YmapCalculateExtentsButton.Location = new System.Drawing.Point(392, 350); - this.YmapCalculateExtentsButton.Name = "YmapCalculateExtentsButton"; - this.YmapCalculateExtentsButton.Size = new System.Drawing.Size(106, 23); - this.YmapCalculateExtentsButton.TabIndex = 25; - this.YmapCalculateExtentsButton.Text = "Calculate extents"; - this.YmapCalculateExtentsButton.UseVisualStyleBackColor = true; - this.YmapCalculateExtentsButton.Click += new System.EventHandler(this.YmapCalculateExtentsButton_Click); - // - // YmapStreamingExtentsMaxTextBox - // - this.YmapStreamingExtentsMaxTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.YmapStreamingExtentsMaxTextBox.Location = new System.Drawing.Point(127, 352); - this.YmapStreamingExtentsMaxTextBox.Name = "YmapStreamingExtentsMaxTextBox"; - this.YmapStreamingExtentsMaxTextBox.Size = new System.Drawing.Size(259, 20); - this.YmapStreamingExtentsMaxTextBox.TabIndex = 21; - this.YmapStreamingExtentsMaxTextBox.TextChanged += new System.EventHandler(this.YmapStreamingExtentsMaxTextBox_TextChanged); - // - // label10 - // - this.label10.AutoSize = true; - this.label10.Location = new System.Drawing.Point(6, 355); - this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(118, 13); - this.label10.TabIndex = 20; - this.label10.Text = "Streaming Extents Max:"; - // - // YmapStreamingExtentsMinTextBox - // - this.YmapStreamingExtentsMinTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.YmapStreamingExtentsMinTextBox.Location = new System.Drawing.Point(127, 326); - this.YmapStreamingExtentsMinTextBox.Name = "YmapStreamingExtentsMinTextBox"; - this.YmapStreamingExtentsMinTextBox.Size = new System.Drawing.Size(259, 20); - this.YmapStreamingExtentsMinTextBox.TabIndex = 19; - this.YmapStreamingExtentsMinTextBox.TextChanged += new System.EventHandler(this.YmapStreamingExtentsMinTextBox_TextChanged); - // - // label11 - // - this.label11.AutoSize = true; - this.label11.Location = new System.Drawing.Point(6, 329); - this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(115, 13); - this.label11.TabIndex = 18; - this.label11.Text = "Streaming Extents Min:"; - // - // YmapEntitiesExtentsMaxTextBox - // - this.YmapEntitiesExtentsMaxTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.YmapEntitiesExtentsMaxTextBox.Location = new System.Drawing.Point(127, 300); - this.YmapEntitiesExtentsMaxTextBox.Name = "YmapEntitiesExtentsMaxTextBox"; - this.YmapEntitiesExtentsMaxTextBox.Size = new System.Drawing.Size(259, 20); - this.YmapEntitiesExtentsMaxTextBox.TabIndex = 17; - this.YmapEntitiesExtentsMaxTextBox.TextChanged += new System.EventHandler(this.YmapEntitiesExtentsMaxTextBox_TextChanged); - // - // label9 - // - this.label9.AutoSize = true; - this.label9.Location = new System.Drawing.Point(6, 303); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(105, 13); - this.label9.TabIndex = 16; - this.label9.Text = "Entities Extents Max:"; - // - // YmapEntitiesExtentsMinTextBox - // - this.YmapEntitiesExtentsMinTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.YmapEntitiesExtentsMinTextBox.Location = new System.Drawing.Point(127, 274); - this.YmapEntitiesExtentsMinTextBox.Name = "YmapEntitiesExtentsMinTextBox"; - this.YmapEntitiesExtentsMinTextBox.Size = new System.Drawing.Size(259, 20); - this.YmapEntitiesExtentsMinTextBox.TabIndex = 15; - this.YmapEntitiesExtentsMinTextBox.TextChanged += new System.EventHandler(this.YmapEntitiesExtentsMinTextBox_TextChanged); - // - // label8 - // - this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(6, 277); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(102, 13); - this.label8.TabIndex = 14; - this.label8.Text = "Entities Extents Min:"; - // - // YmapParentHashLabel - // - this.YmapParentHashLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.YmapParentHashLabel.AutoSize = true; - this.YmapParentHashLabel.Location = new System.Drawing.Point(350, 38); - this.YmapParentHashLabel.Name = "YmapParentHashLabel"; - this.YmapParentHashLabel.Size = new System.Drawing.Size(44, 13); - this.YmapParentHashLabel.TabIndex = 9; - this.YmapParentHashLabel.Text = "Hash: 0"; - // - // YmapNameHashLabel - // - this.YmapNameHashLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.YmapNameHashLabel.AutoSize = true; - this.YmapNameHashLabel.Location = new System.Drawing.Point(350, 12); - this.YmapNameHashLabel.Name = "YmapNameHashLabel"; - this.YmapNameHashLabel.Size = new System.Drawing.Size(44, 13); - this.YmapNameHashLabel.TabIndex = 8; - this.YmapNameHashLabel.Text = "Hash: 0"; - // - // YmapParentTextBox - // - this.YmapParentTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.YmapParentTextBox.Location = new System.Drawing.Point(84, 35); - this.YmapParentTextBox.Name = "YmapParentTextBox"; - this.YmapParentTextBox.Size = new System.Drawing.Size(216, 20); - this.YmapParentTextBox.TabIndex = 6; - this.YmapParentTextBox.TextChanged += new System.EventHandler(this.YmapParentTextBox_TextChanged); - // - // label4 - // - this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(299, 38); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(35, 13); - this.label4.TabIndex = 7; - this.label4.Text = ".ymap"; - // - // label5 - // - this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(6, 38); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(41, 13); - this.label5.TabIndex = 5; - this.label5.Text = "Parent:"; - // - // YmapNameTextBox - // - this.YmapNameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.YmapNameTextBox.Location = new System.Drawing.Point(84, 9); - this.YmapNameTextBox.Name = "YmapNameTextBox"; - this.YmapNameTextBox.Size = new System.Drawing.Size(216, 20); - this.YmapNameTextBox.TabIndex = 3; - this.YmapNameTextBox.TextChanged += new System.EventHandler(this.YmapNameTextBox_TextChanged); - // - // label3 - // - this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(299, 12); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(35, 13); - this.label3.TabIndex = 4; - this.label3.Text = ".ymap"; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(6, 12); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(38, 13); - this.label2.TabIndex = 2; - this.label2.Text = "Name:"; - // - // YmapEntityTabPage - // - this.YmapEntityTabPage.Controls.Add(this.EntityPanel); - this.YmapEntityTabPage.Location = new System.Drawing.Point(4, 22); - this.YmapEntityTabPage.Name = "YmapEntityTabPage"; - this.YmapEntityTabPage.Padding = new System.Windows.Forms.Padding(3); - this.YmapEntityTabPage.Size = new System.Drawing.Size(510, 443); - this.YmapEntityTabPage.TabIndex = 1; - this.YmapEntityTabPage.Text = "Entity"; - this.YmapEntityTabPage.UseVisualStyleBackColor = true; - // - // EntityPanel - // - this.EntityPanel.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.EntityPanel.Controls.Add(this.EntityTabControl); - this.EntityPanel.Enabled = false; - this.EntityPanel.Location = new System.Drawing.Point(0, 0); - this.EntityPanel.Name = "EntityPanel"; - this.EntityPanel.Size = new System.Drawing.Size(510, 443); - this.EntityPanel.TabIndex = 24; - // - // EntityTabControl - // - this.EntityTabControl.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.EntityTabControl.Controls.Add(this.EntityGeneralTabPage); - this.EntityTabControl.Controls.Add(this.EntityLodTabPage); - this.EntityTabControl.Controls.Add(this.EntityExtensionsTabPage); - this.EntityTabControl.Controls.Add(this.EntityPivotTabPage); - this.EntityTabControl.Location = new System.Drawing.Point(0, 3); - this.EntityTabControl.Name = "EntityTabControl"; - this.EntityTabControl.SelectedIndex = 0; - this.EntityTabControl.Size = new System.Drawing.Size(507, 440); - this.EntityTabControl.TabIndex = 44; - // - // EntityGeneralTabPage - // - this.EntityGeneralTabPage.Controls.Add(this.EntityFlagsCheckedListBox); - this.EntityGeneralTabPage.Controls.Add(this.label13); - this.EntityGeneralTabPage.Controls.Add(this.label28); - this.EntityGeneralTabPage.Controls.Add(this.EntityDeleteButton); - this.EntityGeneralTabPage.Controls.Add(this.EntityTintValueTextBox); - this.EntityGeneralTabPage.Controls.Add(this.EntityAddToProjectButton); - this.EntityGeneralTabPage.Controls.Add(this.label27); - this.EntityGeneralTabPage.Controls.Add(this.EntityArtificialAOTextBox); - this.EntityGeneralTabPage.Controls.Add(this.label26); - this.EntityGeneralTabPage.Controls.Add(this.EntityAOMultiplierTextBox); - this.EntityGeneralTabPage.Controls.Add(this.EntityGuidTextBox); - this.EntityGeneralTabPage.Controls.Add(this.EntityPriorityLevelComboBox); - this.EntityGeneralTabPage.Controls.Add(this.label24); - this.EntityGeneralTabPage.Controls.Add(this.label15); - this.EntityGeneralTabPage.Controls.Add(this.EntityFlagsTextBox); - this.EntityGeneralTabPage.Controls.Add(this.label18); - this.EntityGeneralTabPage.Controls.Add(this.EntityLodLevelComboBox); - this.EntityGeneralTabPage.Controls.Add(this.label14); - this.EntityGeneralTabPage.Controls.Add(this.label23); - this.EntityGeneralTabPage.Controls.Add(this.EntityScaleXYTextBox); - this.EntityGeneralTabPage.Controls.Add(this.label22); - this.EntityGeneralTabPage.Controls.Add(this.EntityArchetypeHashLabel); - this.EntityGeneralTabPage.Controls.Add(this.EntityChildLodDistTextBox); - this.EntityGeneralTabPage.Controls.Add(this.label19); - this.EntityGeneralTabPage.Controls.Add(this.label21); - this.EntityGeneralTabPage.Controls.Add(this.EntityScaleZTextBox); - this.EntityGeneralTabPage.Controls.Add(this.EntityLodDistTextBox); - this.EntityGeneralTabPage.Controls.Add(this.EntityArchetypeTextBox); - this.EntityGeneralTabPage.Controls.Add(this.label16); - this.EntityGeneralTabPage.Controls.Add(this.EntityPositionTextBox); - this.EntityGeneralTabPage.Controls.Add(this.EntityNormalizeRotationButton); - this.EntityGeneralTabPage.Controls.Add(this.EntityGoToButton); - this.EntityGeneralTabPage.Controls.Add(this.label17); - this.EntityGeneralTabPage.Controls.Add(this.EntityRotationTextBox); - this.EntityGeneralTabPage.Location = new System.Drawing.Point(4, 22); - this.EntityGeneralTabPage.Name = "EntityGeneralTabPage"; - this.EntityGeneralTabPage.Padding = new System.Windows.Forms.Padding(3); - this.EntityGeneralTabPage.Size = new System.Drawing.Size(499, 414); - this.EntityGeneralTabPage.TabIndex = 0; - this.EntityGeneralTabPage.Text = "General"; - this.EntityGeneralTabPage.UseVisualStyleBackColor = true; - // - // 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 - Unk06", - "64 - Unk07", - "128 - Unk08", - "256 - Unk09", - "512 - Unk10", - "1024 - Unk11", - "2048 - Unk12", - "4096 - Unk13", - "8192 - Unk14", - "16384 - Unk15", - "32768 - Unk16", - "65536 - Unk17", - "131072 - Unk18", - "262144 - Unk19", - "524288 - Unk20", - "1048576 - Unk21", - "2097152 - Unk22", - "4194304 - Unk23", - "8388608 - Unk24", - "16777216 - Unk25", - "33554432 - Unk26", - "67108864 - Unk27", - "134217728 - Unk28", - "268435456 - Unk29", - "536870912 - Unk30", - "1073741824 - Unk31", - "2147483648 - Unk32"}); - this.EntityFlagsCheckedListBox.Location = new System.Drawing.Point(292, 113); - this.EntityFlagsCheckedListBox.Name = "EntityFlagsCheckedListBox"; - this.EntityFlagsCheckedListBox.Size = new System.Drawing.Size(201, 289); - this.EntityFlagsCheckedListBox.TabIndex = 32; - this.EntityFlagsCheckedListBox.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.EntityFlagsCheckedListBox_ItemCheck); - // - // label13 - // - this.label13.AutoSize = true; - this.label13.Location = new System.Drawing.Point(15, 64); - this.label13.Name = "label13"; - this.label13.Size = new System.Drawing.Size(58, 13); - this.label13.TabIndex = 7; - this.label13.Text = "Archetype:"; - // - // label28 - // - this.label28.AutoSize = true; - this.label28.Location = new System.Drawing.Point(15, 326); - this.label28.Name = "label28"; - this.label28.Size = new System.Drawing.Size(55, 13); - this.label28.TabIndex = 28; - this.label28.Text = "TintValue:"; - // - // EntityDeleteButton - // - this.EntityDeleteButton.Location = new System.Drawing.Point(175, 376); - this.EntityDeleteButton.Name = "EntityDeleteButton"; - this.EntityDeleteButton.Size = new System.Drawing.Size(95, 23); - this.EntityDeleteButton.TabIndex = 34; - this.EntityDeleteButton.Text = "Delete Entity"; - this.EntityDeleteButton.UseVisualStyleBackColor = true; - this.EntityDeleteButton.Click += new System.EventHandler(this.EntityDeleteButton_Click); - // - // EntityTintValueTextBox - // - this.EntityTintValueTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.EntityTintValueTextBox.Location = new System.Drawing.Point(93, 323); - this.EntityTintValueTextBox.Name = "EntityTintValueTextBox"; - this.EntityTintValueTextBox.Size = new System.Drawing.Size(177, 20); - this.EntityTintValueTextBox.TabIndex = 29; - this.EntityTintValueTextBox.TextChanged += new System.EventHandler(this.EntityTintValueTextBox_TextChanged); - // - // EntityAddToProjectButton - // - this.EntityAddToProjectButton.Location = new System.Drawing.Point(74, 376); - this.EntityAddToProjectButton.Name = "EntityAddToProjectButton"; - this.EntityAddToProjectButton.Size = new System.Drawing.Size(95, 23); - this.EntityAddToProjectButton.TabIndex = 33; - this.EntityAddToProjectButton.Text = "Add to Project"; - this.EntityAddToProjectButton.UseVisualStyleBackColor = true; - this.EntityAddToProjectButton.Click += new System.EventHandler(this.EntityAddToProjectButton_Click); - // - // label27 - // - this.label27.AutoSize = true; - this.label27.Location = new System.Drawing.Point(15, 300); - this.label27.Name = "label27"; - this.label27.Size = new System.Drawing.Size(61, 13); - this.label27.TabIndex = 26; - this.label27.Text = "ArtificialAO:"; - // - // EntityArtificialAOTextBox - // - this.EntityArtificialAOTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.EntityArtificialAOTextBox.Location = new System.Drawing.Point(93, 297); - this.EntityArtificialAOTextBox.Name = "EntityArtificialAOTextBox"; - this.EntityArtificialAOTextBox.Size = new System.Drawing.Size(177, 20); - this.EntityArtificialAOTextBox.TabIndex = 27; - this.EntityArtificialAOTextBox.TextChanged += new System.EventHandler(this.EntityArtificialAOTextBox_TextChanged); - // - // label26 - // - this.label26.AutoSize = true; - this.label26.Location = new System.Drawing.Point(15, 274); - this.label26.Name = "label26"; - this.label26.Size = new System.Drawing.Size(66, 13); - this.label26.TabIndex = 24; - this.label26.Text = "AOMultiplier:"; - // - // EntityAOMultiplierTextBox - // - this.EntityAOMultiplierTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.EntityAOMultiplierTextBox.Location = new System.Drawing.Point(93, 271); - this.EntityAOMultiplierTextBox.Name = "EntityAOMultiplierTextBox"; - this.EntityAOMultiplierTextBox.Size = new System.Drawing.Size(177, 20); - this.EntityAOMultiplierTextBox.TabIndex = 25; - this.EntityAOMultiplierTextBox.TextChanged += new System.EventHandler(this.EntityAOMultiplierTextBox_TextChanged); - // - // EntityGuidTextBox - // - this.EntityGuidTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.EntityGuidTextBox.Location = new System.Drawing.Point(93, 87); - this.EntityGuidTextBox.Name = "EntityGuidTextBox"; - this.EntityGuidTextBox.Size = new System.Drawing.Size(177, 20); - this.EntityGuidTextBox.TabIndex = 11; - this.EntityGuidTextBox.TextChanged += new System.EventHandler(this.EntityGuidTextBox_TextChanged); - // - // EntityPriorityLevelComboBox - // - this.EntityPriorityLevelComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.EntityPriorityLevelComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.EntityPriorityLevelComboBox.FormattingEnabled = true; - this.EntityPriorityLevelComboBox.Location = new System.Drawing.Point(93, 244); - this.EntityPriorityLevelComboBox.Name = "EntityPriorityLevelComboBox"; - this.EntityPriorityLevelComboBox.Size = new System.Drawing.Size(177, 21); - this.EntityPriorityLevelComboBox.TabIndex = 23; - this.EntityPriorityLevelComboBox.SelectedIndexChanged += new System.EventHandler(this.EntityPriorityLevelComboBox_SelectedIndexChanged); - // - // label24 - // - this.label24.AutoSize = true; - this.label24.Location = new System.Drawing.Point(15, 247); - this.label24.Name = "label24"; - this.label24.Size = new System.Drawing.Size(67, 13); - this.label24.TabIndex = 22; - this.label24.Text = "PriorityLevel:"; - // - // label15 - // - this.label15.AutoSize = true; - this.label15.Location = new System.Drawing.Point(15, 90); - this.label15.Name = "label15"; - this.label15.Size = new System.Drawing.Size(37, 13); - this.label15.TabIndex = 10; - this.label15.Text = "GUID:"; - // - // EntityFlagsTextBox - // - this.EntityFlagsTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.EntityFlagsTextBox.Location = new System.Drawing.Point(346, 87); - this.EntityFlagsTextBox.Name = "EntityFlagsTextBox"; - this.EntityFlagsTextBox.Size = new System.Drawing.Size(147, 20); - this.EntityFlagsTextBox.TabIndex = 31; - this.EntityFlagsTextBox.TextChanged += new System.EventHandler(this.EntityFlagsTextBox_TextChanged); - // - // label18 - // - this.label18.AutoSize = true; - this.label18.Location = new System.Drawing.Point(15, 116); - this.label18.Name = "label18"; - this.label18.Size = new System.Drawing.Size(51, 13); - this.label18.TabIndex = 12; - this.label18.Text = "ScaleXY:"; - // - // EntityLodLevelComboBox - // - this.EntityLodLevelComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.EntityLodLevelComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.EntityLodLevelComboBox.FormattingEnabled = true; - this.EntityLodLevelComboBox.Location = new System.Drawing.Point(93, 217); - this.EntityLodLevelComboBox.Name = "EntityLodLevelComboBox"; - this.EntityLodLevelComboBox.Size = new System.Drawing.Size(177, 21); - this.EntityLodLevelComboBox.TabIndex = 21; - this.EntityLodLevelComboBox.SelectedIndexChanged += new System.EventHandler(this.EntityLodLevelComboBox_SelectedIndexChanged); - // - // 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(305, 90); - this.label14.Name = "label14"; - this.label14.Size = new System.Drawing.Size(35, 13); - this.label14.TabIndex = 30; - this.label14.Text = "Flags:"; - // - // label23 - // - this.label23.AutoSize = true; - this.label23.Location = new System.Drawing.Point(15, 220); - this.label23.Name = "label23"; - this.label23.Size = new System.Drawing.Size(54, 13); - this.label23.TabIndex = 20; - this.label23.Text = "LodLevel:"; - // - // EntityScaleXYTextBox - // - this.EntityScaleXYTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.EntityScaleXYTextBox.Location = new System.Drawing.Point(93, 113); - this.EntityScaleXYTextBox.Name = "EntityScaleXYTextBox"; - this.EntityScaleXYTextBox.Size = new System.Drawing.Size(177, 20); - this.EntityScaleXYTextBox.TabIndex = 13; - this.EntityScaleXYTextBox.TextChanged += new System.EventHandler(this.EntityScaleXYTextBox_TextChanged); - // - // label22 - // - this.label22.AutoSize = true; - this.label22.Location = new System.Drawing.Point(15, 194); - this.label22.Name = "label22"; - this.label22.Size = new System.Drawing.Size(69, 13); - this.label22.TabIndex = 18; - this.label22.Text = "ChildLodDist:"; - // - // EntityArchetypeHashLabel - // - this.EntityArchetypeHashLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.EntityArchetypeHashLabel.AutoSize = true; - this.EntityArchetypeHashLabel.Location = new System.Drawing.Point(276, 64); - this.EntityArchetypeHashLabel.Name = "EntityArchetypeHashLabel"; - this.EntityArchetypeHashLabel.Size = new System.Drawing.Size(44, 13); - this.EntityArchetypeHashLabel.TabIndex = 9; - this.EntityArchetypeHashLabel.Text = "Hash: 0"; - // - // EntityChildLodDistTextBox - // - this.EntityChildLodDistTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.EntityChildLodDistTextBox.Location = new System.Drawing.Point(93, 191); - this.EntityChildLodDistTextBox.Name = "EntityChildLodDistTextBox"; - this.EntityChildLodDistTextBox.Size = new System.Drawing.Size(177, 20); - this.EntityChildLodDistTextBox.TabIndex = 19; - this.EntityChildLodDistTextBox.TextChanged += new System.EventHandler(this.EntityChildLodDistTextBox_TextChanged); - // - // label19 - // - this.label19.AutoSize = true; - this.label19.Location = new System.Drawing.Point(15, 142); - this.label19.Name = "label19"; - this.label19.Size = new System.Drawing.Size(44, 13); - this.label19.TabIndex = 14; - this.label19.Text = "ScaleZ:"; - // - // label21 - // - this.label21.AutoSize = true; - this.label21.Location = new System.Drawing.Point(15, 168); - this.label21.Name = "label21"; - this.label21.Size = new System.Drawing.Size(46, 13); - this.label21.TabIndex = 16; - this.label21.Text = "LodDist:"; - // - // EntityScaleZTextBox - // - this.EntityScaleZTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.EntityScaleZTextBox.Location = new System.Drawing.Point(93, 139); - this.EntityScaleZTextBox.Name = "EntityScaleZTextBox"; - this.EntityScaleZTextBox.Size = new System.Drawing.Size(177, 20); - this.EntityScaleZTextBox.TabIndex = 15; - this.EntityScaleZTextBox.TextChanged += new System.EventHandler(this.EntityScaleZTextBox_TextChanged); - // - // EntityLodDistTextBox - // - this.EntityLodDistTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.EntityLodDistTextBox.Location = new System.Drawing.Point(93, 165); - this.EntityLodDistTextBox.Name = "EntityLodDistTextBox"; - this.EntityLodDistTextBox.Size = new System.Drawing.Size(177, 20); - this.EntityLodDistTextBox.TabIndex = 17; - this.EntityLodDistTextBox.TextChanged += new System.EventHandler(this.EntityLodDistTextBox_TextChanged); - // - // EntityArchetypeTextBox - // - this.EntityArchetypeTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.EntityArchetypeTextBox.Location = new System.Drawing.Point(93, 61); - this.EntityArchetypeTextBox.Name = "EntityArchetypeTextBox"; - this.EntityArchetypeTextBox.Size = new System.Drawing.Size(177, 20); - this.EntityArchetypeTextBox.TabIndex = 8; - this.EntityArchetypeTextBox.TextChanged += new System.EventHandler(this.EntityArchetypeTextBox_TextChanged); - // - // label16 - // - this.label16.AutoSize = true; - this.label16.Location = new System.Drawing.Point(15, 12); - this.label16.Name = "label16"; - this.label16.Size = new System.Drawing.Size(47, 13); - this.label16.TabIndex = 1; - this.label16.Text = "Position:"; - // - // EntityPositionTextBox - // - this.EntityPositionTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.EntityPositionTextBox.Location = new System.Drawing.Point(93, 9); - this.EntityPositionTextBox.Name = "EntityPositionTextBox"; - this.EntityPositionTextBox.Size = new System.Drawing.Size(326, 20); - this.EntityPositionTextBox.TabIndex = 2; - this.EntityPositionTextBox.TextChanged += new System.EventHandler(this.EntityPositionTextBox_TextChanged); - // - // EntityNormalizeRotationButton - // - this.EntityNormalizeRotationButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.EntityNormalizeRotationButton.Location = new System.Drawing.Point(425, 33); - this.EntityNormalizeRotationButton.Name = "EntityNormalizeRotationButton"; - this.EntityNormalizeRotationButton.Size = new System.Drawing.Size(68, 23); - this.EntityNormalizeRotationButton.TabIndex = 6; - this.EntityNormalizeRotationButton.Text = "Normalize"; - this.EntityNormalizeRotationButton.UseVisualStyleBackColor = true; - this.EntityNormalizeRotationButton.Click += new System.EventHandler(this.EntityNormalizeRotationButton_Click); - // - // EntityGoToButton - // - this.EntityGoToButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.EntityGoToButton.Location = new System.Drawing.Point(425, 7); - this.EntityGoToButton.Name = "EntityGoToButton"; - this.EntityGoToButton.Size = new System.Drawing.Size(68, 23); - this.EntityGoToButton.TabIndex = 3; - this.EntityGoToButton.Text = "Go to"; - this.EntityGoToButton.UseVisualStyleBackColor = true; - this.EntityGoToButton.Click += new System.EventHandler(this.EntityGoToButton_Click); - // - // label17 - // - this.label17.AutoSize = true; - this.label17.Location = new System.Drawing.Point(15, 38); - this.label17.Name = "label17"; - this.label17.Size = new System.Drawing.Size(50, 13); - this.label17.TabIndex = 4; - this.label17.Text = "Rotation:"; - // - // EntityRotationTextBox - // - this.EntityRotationTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.EntityRotationTextBox.Location = new System.Drawing.Point(93, 35); - this.EntityRotationTextBox.Name = "EntityRotationTextBox"; - this.EntityRotationTextBox.Size = new System.Drawing.Size(326, 20); - this.EntityRotationTextBox.TabIndex = 5; - this.EntityRotationTextBox.TextChanged += new System.EventHandler(this.EntityRotationTextBox_TextChanged); - // - // EntityLodTabPage - // - this.EntityLodTabPage.Controls.Add(this.label20); - this.EntityLodTabPage.Controls.Add(this.EntityParentIndexTextBox); - this.EntityLodTabPage.Controls.Add(this.EntityNumChildrenTextBox); - this.EntityLodTabPage.Controls.Add(this.label25); - this.EntityLodTabPage.Location = new System.Drawing.Point(4, 22); - this.EntityLodTabPage.Name = "EntityLodTabPage"; - this.EntityLodTabPage.Padding = new System.Windows.Forms.Padding(3); - this.EntityLodTabPage.Size = new System.Drawing.Size(499, 414); - this.EntityLodTabPage.TabIndex = 1; - this.EntityLodTabPage.Text = "LOD Hierarchy"; - this.EntityLodTabPage.UseVisualStyleBackColor = true; - // - // label20 - // - this.label20.AutoSize = true; - this.label20.Location = new System.Drawing.Point(15, 16); - this.label20.Name = "label20"; - this.label20.Size = new System.Drawing.Size(67, 13); - this.label20.TabIndex = 24; - this.label20.Text = "ParentIndex:"; - // - // EntityParentIndexTextBox - // - this.EntityParentIndexTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.EntityParentIndexTextBox.Location = new System.Drawing.Point(93, 13); - this.EntityParentIndexTextBox.Name = "EntityParentIndexTextBox"; - this.EntityParentIndexTextBox.Size = new System.Drawing.Size(189, 20); - this.EntityParentIndexTextBox.TabIndex = 25; - this.EntityParentIndexTextBox.TextChanged += new System.EventHandler(this.EntityParentIndexTextBox_TextChanged); - // - // EntityNumChildrenTextBox - // - this.EntityNumChildrenTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.EntityNumChildrenTextBox.Location = new System.Drawing.Point(93, 39); - this.EntityNumChildrenTextBox.Name = "EntityNumChildrenTextBox"; - this.EntityNumChildrenTextBox.Size = new System.Drawing.Size(189, 20); - this.EntityNumChildrenTextBox.TabIndex = 35; - this.EntityNumChildrenTextBox.TextChanged += new System.EventHandler(this.EntityNumChildrenTextBox_TextChanged); - // - // label25 - // - this.label25.AutoSize = true; - this.label25.Location = new System.Drawing.Point(15, 42); - this.label25.Name = "label25"; - this.label25.Size = new System.Drawing.Size(70, 13); - this.label25.TabIndex = 34; - this.label25.Text = "NumChildren:"; - // - // EntityExtensionsTabPage - // - this.EntityExtensionsTabPage.Location = new System.Drawing.Point(4, 22); - this.EntityExtensionsTabPage.Name = "EntityExtensionsTabPage"; - this.EntityExtensionsTabPage.Size = new System.Drawing.Size(499, 414); - this.EntityExtensionsTabPage.TabIndex = 2; - this.EntityExtensionsTabPage.Text = "Extensions"; - this.EntityExtensionsTabPage.UseVisualStyleBackColor = true; - // - // EntityPivotTabPage - // - this.EntityPivotTabPage.Controls.Add(this.label95); - this.EntityPivotTabPage.Controls.Add(this.EntityPivotEditCheckBox); - this.EntityPivotTabPage.Controls.Add(this.label93); - this.EntityPivotTabPage.Controls.Add(this.EntityPivotPositionTextBox); - this.EntityPivotTabPage.Controls.Add(this.EntityPivotRotationNormalizeButton); - this.EntityPivotTabPage.Controls.Add(this.label94); - this.EntityPivotTabPage.Controls.Add(this.EntityPivotRotationTextBox); - this.EntityPivotTabPage.Location = new System.Drawing.Point(4, 22); - this.EntityPivotTabPage.Name = "EntityPivotTabPage"; - this.EntityPivotTabPage.Size = new System.Drawing.Size(499, 414); - this.EntityPivotTabPage.TabIndex = 3; - this.EntityPivotTabPage.Text = "Pivot"; - this.EntityPivotTabPage.UseVisualStyleBackColor = true; - // - // label95 - // - this.label95.Location = new System.Drawing.Point(90, 152); - this.label95.Name = "label95"; - this.label95.Size = new System.Drawing.Size(329, 51); - this.label95.TabIndex = 27; - this.label95.Text = "Note: Custom pivot is not saved. It will be reset if you close the project or res" + - "tart CodeWalker."; - // - // EntityPivotEditCheckBox - // - this.EntityPivotEditCheckBox.AutoSize = true; - this.EntityPivotEditCheckBox.Location = new System.Drawing.Point(93, 32); - this.EntityPivotEditCheckBox.Name = "EntityPivotEditCheckBox"; - this.EntityPivotEditCheckBox.Size = new System.Drawing.Size(137, 17); - this.EntityPivotEditCheckBox.TabIndex = 20; - this.EntityPivotEditCheckBox.Text = "Edit pivot in World view"; - this.EntityPivotEditCheckBox.UseVisualStyleBackColor = true; - this.EntityPivotEditCheckBox.CheckedChanged += new System.EventHandler(this.EntityPivotEditCheckBox_CheckedChanged); - // - // label93 - // - this.label93.AutoSize = true; - this.label93.Location = new System.Drawing.Point(15, 73); - this.label93.Name = "label93"; - this.label93.Size = new System.Drawing.Size(47, 13); - this.label93.TabIndex = 21; - this.label93.Text = "Position:"; - // - // EntityPivotPositionTextBox - // - this.EntityPivotPositionTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.EntityPivotPositionTextBox.Location = new System.Drawing.Point(93, 70); - this.EntityPivotPositionTextBox.Name = "EntityPivotPositionTextBox"; - this.EntityPivotPositionTextBox.Size = new System.Drawing.Size(326, 20); - this.EntityPivotPositionTextBox.TabIndex = 22; - this.EntityPivotPositionTextBox.TextChanged += new System.EventHandler(this.EntityPivotPositionTextBox_TextChanged); - // - // EntityPivotRotationNormalizeButton - // - this.EntityPivotRotationNormalizeButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.EntityPivotRotationNormalizeButton.Location = new System.Drawing.Point(425, 94); - this.EntityPivotRotationNormalizeButton.Name = "EntityPivotRotationNormalizeButton"; - this.EntityPivotRotationNormalizeButton.Size = new System.Drawing.Size(68, 23); - this.EntityPivotRotationNormalizeButton.TabIndex = 26; - this.EntityPivotRotationNormalizeButton.Text = "Normalize"; - this.EntityPivotRotationNormalizeButton.UseVisualStyleBackColor = true; - this.EntityPivotRotationNormalizeButton.Click += new System.EventHandler(this.EntityPivotRotationNormalizeButton_Click); - // - // label94 - // - this.label94.AutoSize = true; - this.label94.Location = new System.Drawing.Point(15, 99); - this.label94.Name = "label94"; - this.label94.Size = new System.Drawing.Size(50, 13); - this.label94.TabIndex = 24; - this.label94.Text = "Rotation:"; - // - // EntityPivotRotationTextBox - // - this.EntityPivotRotationTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.EntityPivotRotationTextBox.Location = new System.Drawing.Point(93, 96); - this.EntityPivotRotationTextBox.Name = "EntityPivotRotationTextBox"; - this.EntityPivotRotationTextBox.Size = new System.Drawing.Size(326, 20); - this.EntityPivotRotationTextBox.TabIndex = 25; - this.EntityPivotRotationTextBox.TextChanged += new System.EventHandler(this.EntityPivotRotationTextBox_TextChanged); - // - // YmapCarGenTabPage - // - this.YmapCarGenTabPage.Controls.Add(this.CarGenPanel); - this.YmapCarGenTabPage.Location = new System.Drawing.Point(4, 22); - this.YmapCarGenTabPage.Name = "YmapCarGenTabPage"; - this.YmapCarGenTabPage.Size = new System.Drawing.Size(510, 443); - this.YmapCarGenTabPage.TabIndex = 2; - this.YmapCarGenTabPage.Text = "Car Gen"; - this.YmapCarGenTabPage.UseVisualStyleBackColor = true; - // - // CarGenPanel - // - this.CarGenPanel.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.CarGenPanel.Controls.Add(this.CarFlagsCheckedListBox); - this.CarGenPanel.Controls.Add(this.CarDeleteButton); - this.CarGenPanel.Controls.Add(this.CarAddToProjectButton); - this.CarGenPanel.Controls.Add(this.label44); - this.CarGenPanel.Controls.Add(this.CarLiveryTextBox); - this.CarGenPanel.Controls.Add(this.label43); - this.CarGenPanel.Controls.Add(this.CarBodyColorRemap4TextBox); - this.CarGenPanel.Controls.Add(this.label42); - this.CarGenPanel.Controls.Add(this.CarBodyColorRemap3TextBox); - this.CarGenPanel.Controls.Add(this.label41); - this.CarGenPanel.Controls.Add(this.CarBodyColorRemap2TextBox); - this.CarGenPanel.Controls.Add(this.CarPopGroupTextBox); - this.CarGenPanel.Controls.Add(this.label39); - this.CarGenPanel.Controls.Add(this.CarPopGroupHashLabel); - this.CarGenPanel.Controls.Add(this.label38); - this.CarGenPanel.Controls.Add(this.CarBodyColorRemap1TextBox); - this.CarGenPanel.Controls.Add(this.label37); - this.CarGenPanel.Controls.Add(this.CarFlagsTextBox); - this.CarGenPanel.Controls.Add(this.CarPerpendicularLengthTextBox); - this.CarGenPanel.Controls.Add(this.label36); - this.CarGenPanel.Controls.Add(this.CarOrientYTextBox); - this.CarGenPanel.Controls.Add(this.label34); - this.CarGenPanel.Controls.Add(this.CarOrientXTextBox); - this.CarGenPanel.Controls.Add(this.label35); - this.CarGenPanel.Controls.Add(this.CarModelTextBox); - this.CarGenPanel.Controls.Add(this.label32); - this.CarGenPanel.Controls.Add(this.CarModelHashLabel); - this.CarGenPanel.Controls.Add(this.CarGoToButton); - this.CarGenPanel.Controls.Add(this.CarPositionTextBox); - this.CarGenPanel.Controls.Add(this.label31); - this.CarGenPanel.Enabled = false; - this.CarGenPanel.Location = new System.Drawing.Point(0, 0); - this.CarGenPanel.Name = "CarGenPanel"; - this.CarGenPanel.Size = new System.Drawing.Size(510, 443); - this.CarGenPanel.TabIndex = 0; - // - // CarFlagsCheckedListBox - // - this.CarFlagsCheckedListBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Right))); - this.CarFlagsCheckedListBox.CheckOnClick = true; - this.CarFlagsCheckedListBox.FormattingEnabled = true; - this.CarFlagsCheckedListBox.Items.AddRange(new object[] { - "1 - Unk01", - "2 - Unk02", - "4 - Unk03", - "8 - Unk04", - "16 - Unk05", - "32 - Unk06", - "64 - Unk07", - "128 - Unk08", - "256 - Unk09", - "512 - Unk10", - "1024 - Unk11", - "2048 - Unk12", - "4096 - Unk13", - "8192 - Unk14", - "16384 - Unk15", - "32768 - Unk16", - "65536 - Unk17", - "131072 - Unk18", - "262144 - Unk19", - "524288 - Unk20", - "1048576 - Unk21", - "2097152 - Unk22", - "4194304 - Unk23", - "8388608 - Unk24", - "16777216 - Unk25", - "33554432 - Unk26", - "67108864 - Unk27", - "134217728 - Unk28", - "268435456 - Unk29", - "536870912 - Unk30", - "1073741824 - Unk31", - "2147483648 - Unk32"}); - this.CarFlagsCheckedListBox.Location = new System.Drawing.Point(304, 113); - this.CarFlagsCheckedListBox.Name = "CarFlagsCheckedListBox"; - this.CarFlagsCheckedListBox.Size = new System.Drawing.Size(201, 319); - this.CarFlagsCheckedListBox.TabIndex = 73; - this.CarFlagsCheckedListBox.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.CarFlagsCheckedListBox_ItemCheck); - // - // CarDeleteButton - // - this.CarDeleteButton.Location = new System.Drawing.Point(168, 392); - this.CarDeleteButton.Name = "CarDeleteButton"; - this.CarDeleteButton.Size = new System.Drawing.Size(95, 23); - this.CarDeleteButton.TabIndex = 75; - this.CarDeleteButton.Text = "Delete CarGen"; - this.CarDeleteButton.UseVisualStyleBackColor = true; - this.CarDeleteButton.Click += new System.EventHandler(this.CarDeleteButton_Click); - // - // CarAddToProjectButton - // - this.CarAddToProjectButton.Location = new System.Drawing.Point(67, 392); - this.CarAddToProjectButton.Name = "CarAddToProjectButton"; - this.CarAddToProjectButton.Size = new System.Drawing.Size(95, 23); - this.CarAddToProjectButton.TabIndex = 74; - this.CarAddToProjectButton.Text = "Add to Project"; - this.CarAddToProjectButton.UseVisualStyleBackColor = true; - this.CarAddToProjectButton.Click += new System.EventHandler(this.CarAddToProjectButton_Click); - // - // label44 - // - this.label44.AutoSize = true; - this.label44.Location = new System.Drawing.Point(6, 272); - this.label44.Name = "label44"; - this.label44.Size = new System.Drawing.Size(38, 13); - this.label44.TabIndex = 69; - this.label44.Text = "Livery:"; - // - // CarLiveryTextBox - // - this.CarLiveryTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.CarLiveryTextBox.Location = new System.Drawing.Point(120, 269); - this.CarLiveryTextBox.Name = "CarLiveryTextBox"; - this.CarLiveryTextBox.Size = new System.Drawing.Size(155, 20); - this.CarLiveryTextBox.TabIndex = 70; - this.CarLiveryTextBox.TextChanged += new System.EventHandler(this.CarLiveryTextBox_TextChanged); - // - // label43 - // - this.label43.AutoSize = true; - this.label43.Location = new System.Drawing.Point(6, 246); - this.label43.Name = "label43"; - this.label43.Size = new System.Drawing.Size(98, 13); - this.label43.TabIndex = 67; - this.label43.Text = "BodyColorRemap4:"; - // - // CarBodyColorRemap4TextBox - // - this.CarBodyColorRemap4TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.CarBodyColorRemap4TextBox.Location = new System.Drawing.Point(120, 243); - this.CarBodyColorRemap4TextBox.Name = "CarBodyColorRemap4TextBox"; - this.CarBodyColorRemap4TextBox.Size = new System.Drawing.Size(155, 20); - this.CarBodyColorRemap4TextBox.TabIndex = 68; - this.CarBodyColorRemap4TextBox.TextChanged += new System.EventHandler(this.CarBodyColorRemap4TextBox_TextChanged); - // - // label42 - // - this.label42.AutoSize = true; - this.label42.Location = new System.Drawing.Point(6, 220); - this.label42.Name = "label42"; - this.label42.Size = new System.Drawing.Size(98, 13); - this.label42.TabIndex = 65; - this.label42.Text = "BodyColorRemap3:"; - // - // CarBodyColorRemap3TextBox - // - this.CarBodyColorRemap3TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.CarBodyColorRemap3TextBox.Location = new System.Drawing.Point(120, 217); - this.CarBodyColorRemap3TextBox.Name = "CarBodyColorRemap3TextBox"; - this.CarBodyColorRemap3TextBox.Size = new System.Drawing.Size(155, 20); - this.CarBodyColorRemap3TextBox.TabIndex = 66; - this.CarBodyColorRemap3TextBox.TextChanged += new System.EventHandler(this.CarBodyColorRemap3TextBox_TextChanged); - // - // label41 - // - this.label41.AutoSize = true; - this.label41.Location = new System.Drawing.Point(6, 194); - this.label41.Name = "label41"; - this.label41.Size = new System.Drawing.Size(98, 13); - this.label41.TabIndex = 63; - this.label41.Text = "BodyColorRemap2:"; - // - // CarBodyColorRemap2TextBox - // - this.CarBodyColorRemap2TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.CarBodyColorRemap2TextBox.Location = new System.Drawing.Point(120, 191); - this.CarBodyColorRemap2TextBox.Name = "CarBodyColorRemap2TextBox"; - this.CarBodyColorRemap2TextBox.Size = new System.Drawing.Size(155, 20); - this.CarBodyColorRemap2TextBox.TabIndex = 64; - this.CarBodyColorRemap2TextBox.TextChanged += new System.EventHandler(this.CarBodyColorRemap2TextBox_TextChanged); - // - // CarPopGroupTextBox - // - this.CarPopGroupTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.CarPopGroupTextBox.Location = new System.Drawing.Point(84, 61); - this.CarPopGroupTextBox.Name = "CarPopGroupTextBox"; - this.CarPopGroupTextBox.Size = new System.Drawing.Size(267, 20); - this.CarPopGroupTextBox.TabIndex = 50; - this.CarPopGroupTextBox.TextChanged += new System.EventHandler(this.CarPopGroupTextBox_TextChanged); - // - // label39 - // - this.label39.AutoSize = true; - this.label39.Location = new System.Drawing.Point(6, 64); - this.label39.Name = "label39"; - this.label39.Size = new System.Drawing.Size(58, 13); - this.label39.TabIndex = 49; - this.label39.Text = "PopGroup:"; - // - // CarPopGroupHashLabel - // - this.CarPopGroupHashLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.CarPopGroupHashLabel.AutoSize = true; - this.CarPopGroupHashLabel.Location = new System.Drawing.Point(357, 64); - this.CarPopGroupHashLabel.Name = "CarPopGroupHashLabel"; - this.CarPopGroupHashLabel.Size = new System.Drawing.Size(44, 13); - this.CarPopGroupHashLabel.TabIndex = 51; - this.CarPopGroupHashLabel.Text = "Hash: 0"; - // - // label38 - // - this.label38.AutoSize = true; - this.label38.Location = new System.Drawing.Point(6, 168); - this.label38.Name = "label38"; - this.label38.Size = new System.Drawing.Size(98, 13); - this.label38.TabIndex = 61; - this.label38.Text = "BodyColorRemap1:"; - // - // CarBodyColorRemap1TextBox - // - this.CarBodyColorRemap1TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.CarBodyColorRemap1TextBox.Location = new System.Drawing.Point(120, 165); - this.CarBodyColorRemap1TextBox.Name = "CarBodyColorRemap1TextBox"; - this.CarBodyColorRemap1TextBox.Size = new System.Drawing.Size(155, 20); - this.CarBodyColorRemap1TextBox.TabIndex = 62; - this.CarBodyColorRemap1TextBox.TextChanged += new System.EventHandler(this.CarBodyColorRemap1TextBox_TextChanged); - // - // label37 - // - this.label37.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.label37.AutoSize = true; - this.label37.Location = new System.Drawing.Point(321, 90); - this.label37.Name = "label37"; - this.label37.Size = new System.Drawing.Size(35, 13); - this.label37.TabIndex = 71; - this.label37.Text = "Flags:"; - // - // CarFlagsTextBox - // - this.CarFlagsTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.CarFlagsTextBox.Location = new System.Drawing.Point(362, 87); - this.CarFlagsTextBox.Name = "CarFlagsTextBox"; - this.CarFlagsTextBox.Size = new System.Drawing.Size(143, 20); - this.CarFlagsTextBox.TabIndex = 72; - this.CarFlagsTextBox.TextChanged += new System.EventHandler(this.CarFlagsTextBox_TextChanged); - // - // CarPerpendicularLengthTextBox - // - this.CarPerpendicularLengthTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.CarPerpendicularLengthTextBox.Location = new System.Drawing.Point(120, 139); - this.CarPerpendicularLengthTextBox.Name = "CarPerpendicularLengthTextBox"; - this.CarPerpendicularLengthTextBox.Size = new System.Drawing.Size(155, 20); - this.CarPerpendicularLengthTextBox.TabIndex = 60; - this.CarPerpendicularLengthTextBox.TextChanged += new System.EventHandler(this.CarPerpendicularLengthTextBox_TextChanged); - // - // label36 - // - this.label36.AutoSize = true; - this.label36.Location = new System.Drawing.Point(6, 142); - this.label36.Name = "label36"; - this.label36.Size = new System.Drawing.Size(108, 13); - this.label36.TabIndex = 59; - this.label36.Text = "PerpendicularLength:"; - // - // CarOrientYTextBox - // - this.CarOrientYTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.CarOrientYTextBox.Location = new System.Drawing.Point(84, 113); - this.CarOrientYTextBox.Name = "CarOrientYTextBox"; - this.CarOrientYTextBox.Size = new System.Drawing.Size(191, 20); - this.CarOrientYTextBox.TabIndex = 58; - this.CarOrientYTextBox.TextChanged += new System.EventHandler(this.CarOrientYTextBox_TextChanged); - // - // label34 - // - this.label34.AutoSize = true; - this.label34.Location = new System.Drawing.Point(6, 116); - this.label34.Name = "label34"; - this.label34.Size = new System.Drawing.Size(45, 13); - this.label34.TabIndex = 57; - this.label34.Text = "OrientY:"; - // - // CarOrientXTextBox - // - this.CarOrientXTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.CarOrientXTextBox.Location = new System.Drawing.Point(84, 87); - this.CarOrientXTextBox.Name = "CarOrientXTextBox"; - this.CarOrientXTextBox.Size = new System.Drawing.Size(191, 20); - this.CarOrientXTextBox.TabIndex = 56; - this.CarOrientXTextBox.TextChanged += new System.EventHandler(this.CarOrientXTextBox_TextChanged); - // - // label35 - // - this.label35.AutoSize = true; - this.label35.Location = new System.Drawing.Point(6, 90); - this.label35.Name = "label35"; - this.label35.Size = new System.Drawing.Size(45, 13); - this.label35.TabIndex = 55; - this.label35.Text = "OrientX:"; - // - // CarModelTextBox - // - this.CarModelTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.CarModelTextBox.Location = new System.Drawing.Point(84, 35); - this.CarModelTextBox.Name = "CarModelTextBox"; - this.CarModelTextBox.Size = new System.Drawing.Size(267, 20); - this.CarModelTextBox.TabIndex = 47; - this.CarModelTextBox.TextChanged += new System.EventHandler(this.CarModelTextBox_TextChanged); - // - // label32 - // - this.label32.AutoSize = true; - this.label32.Location = new System.Drawing.Point(6, 38); - this.label32.Name = "label32"; - this.label32.Size = new System.Drawing.Size(55, 13); - this.label32.TabIndex = 46; - this.label32.Text = "CarModel:"; - // - // CarModelHashLabel - // - this.CarModelHashLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.CarModelHashLabel.AutoSize = true; - this.CarModelHashLabel.Location = new System.Drawing.Point(357, 38); - this.CarModelHashLabel.Name = "CarModelHashLabel"; - this.CarModelHashLabel.Size = new System.Drawing.Size(44, 13); - this.CarModelHashLabel.TabIndex = 48; - this.CarModelHashLabel.Text = "Hash: 0"; - // - // CarGoToButton - // - this.CarGoToButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.CarGoToButton.Location = new System.Drawing.Point(437, 7); - this.CarGoToButton.Name = "CarGoToButton"; - this.CarGoToButton.Size = new System.Drawing.Size(68, 23); - this.CarGoToButton.TabIndex = 54; - this.CarGoToButton.Text = "Go to"; - this.CarGoToButton.UseVisualStyleBackColor = true; - this.CarGoToButton.Click += new System.EventHandler(this.CarGoToButton_Click); - // - // CarPositionTextBox - // - this.CarPositionTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.CarPositionTextBox.Location = new System.Drawing.Point(84, 9); - this.CarPositionTextBox.Name = "CarPositionTextBox"; - this.CarPositionTextBox.Size = new System.Drawing.Size(347, 20); - this.CarPositionTextBox.TabIndex = 53; - this.CarPositionTextBox.TextChanged += new System.EventHandler(this.CarPositionTextBox_TextChanged); - // - // label31 - // - this.label31.AutoSize = true; - this.label31.Location = new System.Drawing.Point(6, 12); - this.label31.Name = "label31"; - this.label31.Size = new System.Drawing.Size(47, 13); - this.label31.TabIndex = 52; - this.label31.Text = "Position:"; - // - // YmapMloInstanceTabPage - // - this.YmapMloInstanceTabPage.Location = new System.Drawing.Point(4, 22); - this.YmapMloInstanceTabPage.Name = "YmapMloInstanceTabPage"; - this.YmapMloInstanceTabPage.Size = new System.Drawing.Size(510, 443); - this.YmapMloInstanceTabPage.TabIndex = 3; - this.YmapMloInstanceTabPage.Text = "Mlo Instance"; - this.YmapMloInstanceTabPage.UseVisualStyleBackColor = true; - // - // YmapTimecycleModifierTabPage - // - this.YmapTimecycleModifierTabPage.Location = new System.Drawing.Point(4, 22); - this.YmapTimecycleModifierTabPage.Name = "YmapTimecycleModifierTabPage"; - this.YmapTimecycleModifierTabPage.Size = new System.Drawing.Size(510, 443); - this.YmapTimecycleModifierTabPage.TabIndex = 4; - this.YmapTimecycleModifierTabPage.Text = "Time Cycle Modifier"; - this.YmapTimecycleModifierTabPage.UseVisualStyleBackColor = true; - // - // YndTabPage - // - this.YndTabPage.Controls.Add(this.YndTabControl); - this.YndTabPage.Location = new System.Drawing.Point(4, 22); - this.YndTabPage.Name = "YndTabPage"; - this.YndTabPage.Size = new System.Drawing.Size(521, 472); - this.YndTabPage.TabIndex = 2; - this.YndTabPage.Text = "Traffic"; - this.YndTabPage.UseVisualStyleBackColor = true; - // - // YndTabControl - // - this.YndTabControl.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.YndTabControl.Controls.Add(this.YndYndTabPage); - this.YndTabControl.Controls.Add(this.YndNodeTabPage); - this.YndTabControl.Location = new System.Drawing.Point(0, 3); - this.YndTabControl.Name = "YndTabControl"; - this.YndTabControl.SelectedIndex = 0; - this.YndTabControl.Size = new System.Drawing.Size(518, 469); - this.YndTabControl.TabIndex = 1; - // - // YndYndTabPage - // - this.YndYndTabPage.Controls.Add(this.YndPanel); - this.YndYndTabPage.Location = new System.Drawing.Point(4, 22); - this.YndYndTabPage.Name = "YndYndTabPage"; - this.YndYndTabPage.Padding = new System.Windows.Forms.Padding(3); - this.YndYndTabPage.Size = new System.Drawing.Size(510, 443); - this.YndYndTabPage.TabIndex = 0; - this.YndYndTabPage.Text = "Ynd"; - this.YndYndTabPage.UseVisualStyleBackColor = true; - // - // YndPanel - // - this.YndPanel.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.YndPanel.Controls.Add(this.label88); - this.YndPanel.Controls.Add(this.YndAreaIDYUpDown); - this.YndPanel.Controls.Add(this.label87); - this.YndPanel.Controls.Add(this.YndAreaIDXUpDown); - this.YndPanel.Controls.Add(this.label48); - this.YndPanel.Controls.Add(this.YndProjectPathTextBox); - this.YndPanel.Controls.Add(this.label46); - this.YndPanel.Controls.Add(this.YndFilePathTextBox); - this.YndPanel.Controls.Add(this.label47); - this.YndPanel.Controls.Add(this.YndTotalNodesLabel); - this.YndPanel.Controls.Add(this.YndPedNodesUpDown); - this.YndPanel.Controls.Add(this.label45); - this.YndPanel.Controls.Add(this.YndVehicleNodesUpDown); - this.YndPanel.Controls.Add(this.label40); - this.YndPanel.Controls.Add(this.YndAreaIDInfoLabel); - this.YndPanel.Controls.Add(this.label33); - this.YndPanel.Controls.Add(this.YndRpfPathTextBox); - this.YndPanel.Enabled = false; - this.YndPanel.Location = new System.Drawing.Point(0, 0); - this.YndPanel.Name = "YndPanel"; - this.YndPanel.Size = new System.Drawing.Size(510, 443); - this.YndPanel.TabIndex = 0; - // - // label88 - // - this.label88.AutoSize = true; - this.label88.Location = new System.Drawing.Point(166, 11); - this.label88.Name = "label88"; - this.label88.Size = new System.Drawing.Size(17, 13); - this.label88.TabIndex = 19; - this.label88.Text = "Y:"; - // - // YndAreaIDYUpDown - // - this.YndAreaIDYUpDown.Location = new System.Drawing.Point(189, 9); - this.YndAreaIDYUpDown.Maximum = new decimal(new int[] { - 31, - 0, - 0, - 0}); - this.YndAreaIDYUpDown.Name = "YndAreaIDYUpDown"; - this.YndAreaIDYUpDown.Size = new System.Drawing.Size(48, 20); - this.YndAreaIDYUpDown.TabIndex = 18; - this.YndAreaIDYUpDown.ValueChanged += new System.EventHandler(this.YndAreaIDYUpDown_ValueChanged); - // - // label87 - // - this.label87.AutoSize = true; - this.label87.Location = new System.Drawing.Point(84, 11); - this.label87.Name = "label87"; - this.label87.Size = new System.Drawing.Size(17, 13); - this.label87.TabIndex = 17; - this.label87.Text = "X:"; - // - // YndAreaIDXUpDown - // - this.YndAreaIDXUpDown.Location = new System.Drawing.Point(107, 9); - this.YndAreaIDXUpDown.Maximum = new decimal(new int[] { - 31, - 0, - 0, - 0}); - this.YndAreaIDXUpDown.Name = "YndAreaIDXUpDown"; - this.YndAreaIDXUpDown.Size = new System.Drawing.Size(48, 20); - this.YndAreaIDXUpDown.TabIndex = 16; - this.YndAreaIDXUpDown.ValueChanged += new System.EventHandler(this.YndAreaIDXUpDown_ValueChanged); - // - // label48 - // - this.label48.AutoSize = true; - this.label48.Location = new System.Drawing.Point(6, 207); - this.label48.Name = "label48"; - this.label48.Size = new System.Drawing.Size(68, 13); - this.label48.TabIndex = 15; - this.label48.Text = "Project Path:"; - // - // YndProjectPathTextBox - // - this.YndProjectPathTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.YndProjectPathTextBox.Location = new System.Drawing.Point(80, 204); - this.YndProjectPathTextBox.Name = "YndProjectPathTextBox"; - this.YndProjectPathTextBox.ReadOnly = true; - this.YndProjectPathTextBox.Size = new System.Drawing.Size(386, 20); - this.YndProjectPathTextBox.TabIndex = 14; - // - // label46 - // - this.label46.AutoSize = true; - this.label46.Location = new System.Drawing.Point(6, 181); - this.label46.Name = "label46"; - this.label46.Size = new System.Drawing.Size(51, 13); - this.label46.TabIndex = 13; - this.label46.Text = "File Path:"; - // - // YndFilePathTextBox - // - this.YndFilePathTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.YndFilePathTextBox.Location = new System.Drawing.Point(80, 178); - this.YndFilePathTextBox.Name = "YndFilePathTextBox"; - this.YndFilePathTextBox.ReadOnly = true; - this.YndFilePathTextBox.Size = new System.Drawing.Size(386, 20); - this.YndFilePathTextBox.TabIndex = 12; - // - // label47 - // - this.label47.AutoSize = true; - this.label47.Location = new System.Drawing.Point(6, 155); - this.label47.Name = "label47"; - this.label47.Size = new System.Drawing.Size(52, 13); - this.label47.TabIndex = 11; - this.label47.Text = "Rpf Path:"; - // - // YndTotalNodesLabel - // - this.YndTotalNodesLabel.AutoSize = true; - this.YndTotalNodesLabel.Location = new System.Drawing.Point(6, 50); - this.YndTotalNodesLabel.Name = "YndTotalNodesLabel"; - this.YndTotalNodesLabel.Size = new System.Drawing.Size(77, 13); - this.YndTotalNodesLabel.TabIndex = 10; - this.YndTotalNodesLabel.Text = "Total Nodes: 0"; - // - // YndPedNodesUpDown - // - this.YndPedNodesUpDown.Location = new System.Drawing.Point(360, 48); - this.YndPedNodesUpDown.Maximum = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.YndPedNodesUpDown.Name = "YndPedNodesUpDown"; - this.YndPedNodesUpDown.Size = new System.Drawing.Size(74, 20); - this.YndPedNodesUpDown.TabIndex = 9; - this.YndPedNodesUpDown.ValueChanged += new System.EventHandler(this.YndPedNodesUpDown_ValueChanged); - // - // label45 - // - this.label45.AutoSize = true; - this.label45.Location = new System.Drawing.Point(291, 50); - this.label45.Name = "label45"; - this.label45.Size = new System.Drawing.Size(63, 13); - this.label45.TabIndex = 8; - this.label45.Text = "Ped Nodes:"; - // - // YndVehicleNodesUpDown - // - this.YndVehicleNodesUpDown.Location = new System.Drawing.Point(189, 48); - this.YndVehicleNodesUpDown.Maximum = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.YndVehicleNodesUpDown.Name = "YndVehicleNodesUpDown"; - this.YndVehicleNodesUpDown.Size = new System.Drawing.Size(74, 20); - this.YndVehicleNodesUpDown.TabIndex = 7; - this.YndVehicleNodesUpDown.ValueChanged += new System.EventHandler(this.YndVehicleNodesUpDown_ValueChanged); - // - // label40 - // - this.label40.AutoSize = true; - this.label40.Location = new System.Drawing.Point(104, 50); - this.label40.Name = "label40"; - this.label40.Size = new System.Drawing.Size(79, 13); - this.label40.TabIndex = 6; - this.label40.Text = "Vehicle Nodes:"; - // - // YndAreaIDInfoLabel - // - this.YndAreaIDInfoLabel.AutoSize = true; - this.YndAreaIDInfoLabel.Location = new System.Drawing.Point(254, 11); - this.YndAreaIDInfoLabel.Name = "YndAreaIDInfoLabel"; - this.YndAreaIDInfoLabel.Size = new System.Drawing.Size(30, 13); - this.YndAreaIDInfoLabel.TabIndex = 5; - this.YndAreaIDInfoLabel.Text = "ID: 0"; - // - // label33 - // - this.label33.AutoSize = true; - this.label33.Location = new System.Drawing.Point(28, 11); - this.label33.Name = "label33"; - this.label33.Size = new System.Drawing.Size(46, 13); - this.label33.TabIndex = 3; - this.label33.Text = "Area ID:"; - // - // YndRpfPathTextBox - // - this.YndRpfPathTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.YndRpfPathTextBox.Location = new System.Drawing.Point(80, 152); - this.YndRpfPathTextBox.Name = "YndRpfPathTextBox"; - this.YndRpfPathTextBox.ReadOnly = true; - this.YndRpfPathTextBox.Size = new System.Drawing.Size(386, 20); - this.YndRpfPathTextBox.TabIndex = 0; - // - // YndNodeTabPage - // - this.YndNodeTabPage.Controls.Add(this.YndNodePanel); - this.YndNodeTabPage.Location = new System.Drawing.Point(4, 22); - this.YndNodeTabPage.Name = "YndNodeTabPage"; - this.YndNodeTabPage.Padding = new System.Windows.Forms.Padding(3); - this.YndNodeTabPage.Size = new System.Drawing.Size(510, 443); - this.YndNodeTabPage.TabIndex = 1; - this.YndNodeTabPage.Text = "Node"; - this.YndNodeTabPage.UseVisualStyleBackColor = true; - // - // YndNodePanel - // - this.YndNodePanel.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.YndNodePanel.Controls.Add(this.PathNodeTabControl); - this.YndNodePanel.Enabled = false; - this.YndNodePanel.Location = new System.Drawing.Point(0, 0); - this.YndNodePanel.Name = "YndNodePanel"; - this.YndNodePanel.Size = new System.Drawing.Size(510, 443); - this.YndNodePanel.TabIndex = 0; - // - // PathNodeTabControl - // - this.PathNodeTabControl.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.PathNodeTabControl.Controls.Add(this.PathNodePropertiesTabPage); - this.PathNodeTabControl.Controls.Add(this.PathNodeLinksTabPage); - this.PathNodeTabControl.Controls.Add(this.PathNodeJunctionTabPage); - this.PathNodeTabControl.Location = new System.Drawing.Point(0, 3); - this.PathNodeTabControl.Name = "PathNodeTabControl"; - this.PathNodeTabControl.SelectedIndex = 0; - this.PathNodeTabControl.Size = new System.Drawing.Size(507, 440); - this.PathNodeTabControl.TabIndex = 28; - // - // PathNodePropertiesTabPage - // - this.PathNodePropertiesTabPage.Controls.Add(this.PathNodeFlags5GroupBox); - this.PathNodePropertiesTabPage.Controls.Add(this.PathNodeFlags4GroupBox); - this.PathNodePropertiesTabPage.Controls.Add(this.PathNodeFlags3GroupBox); - this.PathNodePropertiesTabPage.Controls.Add(this.PathNodeFlags2GroupBox); - this.PathNodePropertiesTabPage.Controls.Add(this.PathNodeFlags1GroupBox); - this.PathNodePropertiesTabPage.Controls.Add(this.PathNodeFlags0GroupBox); - this.PathNodePropertiesTabPage.Controls.Add(this.PathNodeDeleteButton); - this.PathNodePropertiesTabPage.Controls.Add(this.PathNodeAreaIDUpDown); - this.PathNodePropertiesTabPage.Controls.Add(this.PathNodeAddToProjectButton); - this.PathNodePropertiesTabPage.Controls.Add(this.label49); - this.PathNodePropertiesTabPage.Controls.Add(this.label50); - this.PathNodePropertiesTabPage.Controls.Add(this.label68); - this.PathNodePropertiesTabPage.Controls.Add(this.PathNodeNodeIDUpDown); - this.PathNodePropertiesTabPage.Controls.Add(this.label52); - this.PathNodePropertiesTabPage.Controls.Add(this.PathNodeStreetHashTextBox); - this.PathNodePropertiesTabPage.Controls.Add(this.PathNodeGoToButton); - this.PathNodePropertiesTabPage.Controls.Add(this.PathNodeStreetNameLabel); - this.PathNodePropertiesTabPage.Controls.Add(this.PathNodePositionTextBox); - this.PathNodePropertiesTabPage.Controls.Add(this.label55); - this.PathNodePropertiesTabPage.Location = new System.Drawing.Point(4, 22); - this.PathNodePropertiesTabPage.Name = "PathNodePropertiesTabPage"; - this.PathNodePropertiesTabPage.Size = new System.Drawing.Size(499, 414); - this.PathNodePropertiesTabPage.TabIndex = 2; - this.PathNodePropertiesTabPage.Text = "Node Properties"; - this.PathNodePropertiesTabPage.UseVisualStyleBackColor = true; - // - // PathNodeFlags5GroupBox - // - this.PathNodeFlags5GroupBox.Controls.Add(this.PathNodeFlags52CheckBox); - this.PathNodeFlags5GroupBox.Controls.Add(this.PathNodeFlags53CheckBox); - this.PathNodeFlags5GroupBox.Controls.Add(this.PathNodeFlags51CheckBox); - this.PathNodeFlags5GroupBox.Controls.Add(this.PathNodeFlags5UpDown); - this.PathNodeFlags5GroupBox.Location = new System.Drawing.Point(249, 318); - this.PathNodeFlags5GroupBox.Name = "PathNodeFlags5GroupBox"; - this.PathNodeFlags5GroupBox.Size = new System.Drawing.Size(223, 84); - this.PathNodeFlags5GroupBox.TabIndex = 48; - this.PathNodeFlags5GroupBox.TabStop = false; - this.PathNodeFlags5GroupBox.Text = "Flags 5"; - // - // PathNodeFlags52CheckBox - // - this.PathNodeFlags52CheckBox.AutoSize = true; - this.PathNodeFlags52CheckBox.Location = new System.Drawing.Point(80, 41); - this.PathNodeFlags52CheckBox.Name = "PathNodeFlags52CheckBox"; - this.PathNodeFlags52CheckBox.Size = new System.Drawing.Size(87, 17); - this.PathNodeFlags52CheckBox.TabIndex = 36; - this.PathNodeFlags52CheckBox.Text = "Speed unk 1"; - this.PathNodeFlags52CheckBox.UseVisualStyleBackColor = true; - this.PathNodeFlags52CheckBox.CheckedChanged += new System.EventHandler(this.PathNodeFlags52CheckBox_CheckedChanged); - // - // PathNodeFlags53CheckBox - // - this.PathNodeFlags53CheckBox.AutoSize = true; - this.PathNodeFlags53CheckBox.Location = new System.Drawing.Point(80, 62); - this.PathNodeFlags53CheckBox.Name = "PathNodeFlags53CheckBox"; - this.PathNodeFlags53CheckBox.Size = new System.Drawing.Size(87, 17); - this.PathNodeFlags53CheckBox.TabIndex = 37; - this.PathNodeFlags53CheckBox.Text = "Speed unk 2"; - this.PathNodeFlags53CheckBox.UseVisualStyleBackColor = true; - this.PathNodeFlags53CheckBox.CheckedChanged += new System.EventHandler(this.PathNodeFlags53CheckBox_CheckedChanged); - // - // PathNodeFlags51CheckBox - // - this.PathNodeFlags51CheckBox.AutoSize = true; - this.PathNodeFlags51CheckBox.Location = new System.Drawing.Point(80, 20); - this.PathNodeFlags51CheckBox.Name = "PathNodeFlags51CheckBox"; - this.PathNodeFlags51CheckBox.Size = new System.Drawing.Size(137, 17); - this.PathNodeFlags51CheckBox.TabIndex = 35; - this.PathNodeFlags51CheckBox.Text = "Has junction heightmap"; - this.PathNodeFlags51CheckBox.UseVisualStyleBackColor = true; - this.PathNodeFlags51CheckBox.CheckedChanged += new System.EventHandler(this.PathNodeFlags51CheckBox_CheckedChanged); - // - // PathNodeFlags5UpDown - // - this.PathNodeFlags5UpDown.Location = new System.Drawing.Point(6, 19); - this.PathNodeFlags5UpDown.Maximum = new decimal(new int[] { - 7, - 0, - 0, - 0}); - this.PathNodeFlags5UpDown.Name = "PathNodeFlags5UpDown"; - this.PathNodeFlags5UpDown.Size = new System.Drawing.Size(62, 20); - this.PathNodeFlags5UpDown.TabIndex = 43; - this.PathNodeFlags5UpDown.ValueChanged += new System.EventHandler(this.PathNodeFlags5UpDown_ValueChanged); - // - // PathNodeFlags4GroupBox - // - this.PathNodeFlags4GroupBox.Controls.Add(this.PathNodeFlags45CheckBox); - this.PathNodeFlags4GroupBox.Controls.Add(this.PathNodeFlags46CheckBox); - this.PathNodeFlags4GroupBox.Controls.Add(this.PathNodeFlags47CheckBox); - this.PathNodeFlags4GroupBox.Controls.Add(this.PathNodeFlags48CheckBox); - this.PathNodeFlags4GroupBox.Controls.Add(this.PathNodeFlags42UpDown); - this.PathNodeFlags4GroupBox.Controls.Add(this.label71); - this.PathNodeFlags4GroupBox.Controls.Add(this.PathNodeFlags41CheckBox); - this.PathNodeFlags4GroupBox.Controls.Add(this.PathNodeFlags4UpDown); - this.PathNodeFlags4GroupBox.Controls.Add(this.PathNodeFlags4Label); - this.PathNodeFlags4GroupBox.Location = new System.Drawing.Point(370, 96); - this.PathNodeFlags4GroupBox.Name = "PathNodeFlags4GroupBox"; - this.PathNodeFlags4GroupBox.Size = new System.Drawing.Size(115, 175); - this.PathNodeFlags4GroupBox.TabIndex = 47; - this.PathNodeFlags4GroupBox.TabStop = false; - this.PathNodeFlags4GroupBox.Text = "Flags 4"; - // - // PathNodeFlags45CheckBox - // - this.PathNodeFlags45CheckBox.AutoSize = true; - this.PathNodeFlags45CheckBox.Location = new System.Drawing.Point(6, 66); - this.PathNodeFlags45CheckBox.Name = "PathNodeFlags45CheckBox"; - this.PathNodeFlags45CheckBox.Size = new System.Drawing.Size(70, 17); - this.PathNodeFlags45CheckBox.TabIndex = 36; - this.PathNodeFlags45CheckBox.Text = "Special 1"; - this.PathNodeFlags45CheckBox.UseVisualStyleBackColor = true; - this.PathNodeFlags45CheckBox.CheckedChanged += new System.EventHandler(this.PathNodeFlags45CheckBox_CheckedChanged); - // - // PathNodeFlags46CheckBox - // - this.PathNodeFlags46CheckBox.AutoSize = true; - this.PathNodeFlags46CheckBox.Location = new System.Drawing.Point(6, 87); - this.PathNodeFlags46CheckBox.Name = "PathNodeFlags46CheckBox"; - this.PathNodeFlags46CheckBox.Size = new System.Drawing.Size(70, 17); - this.PathNodeFlags46CheckBox.TabIndex = 37; - this.PathNodeFlags46CheckBox.Text = "Special 2"; - this.PathNodeFlags46CheckBox.UseVisualStyleBackColor = true; - this.PathNodeFlags46CheckBox.CheckedChanged += new System.EventHandler(this.PathNodeFlags46CheckBox_CheckedChanged); - // - // PathNodeFlags47CheckBox - // - this.PathNodeFlags47CheckBox.AutoSize = true; - this.PathNodeFlags47CheckBox.Location = new System.Drawing.Point(6, 108); - this.PathNodeFlags47CheckBox.Name = "PathNodeFlags47CheckBox"; - this.PathNodeFlags47CheckBox.Size = new System.Drawing.Size(70, 17); - this.PathNodeFlags47CheckBox.TabIndex = 38; - this.PathNodeFlags47CheckBox.Text = "Special 3"; - this.PathNodeFlags47CheckBox.UseVisualStyleBackColor = true; - this.PathNodeFlags47CheckBox.CheckedChanged += new System.EventHandler(this.PathNodeFlags47CheckBox_CheckedChanged); - // - // PathNodeFlags48CheckBox - // - this.PathNodeFlags48CheckBox.AutoSize = true; - this.PathNodeFlags48CheckBox.Location = new System.Drawing.Point(6, 129); - this.PathNodeFlags48CheckBox.Name = "PathNodeFlags48CheckBox"; - this.PathNodeFlags48CheckBox.Size = new System.Drawing.Size(96, 17); - this.PathNodeFlags48CheckBox.TabIndex = 39; - this.PathNodeFlags48CheckBox.Text = "Junction unk 6"; - this.PathNodeFlags48CheckBox.UseVisualStyleBackColor = true; - this.PathNodeFlags48CheckBox.CheckedChanged += new System.EventHandler(this.PathNodeFlags48CheckBox_CheckedChanged); - // - // PathNodeFlags42UpDown - // - this.PathNodeFlags42UpDown.Location = new System.Drawing.Point(41, 150); - this.PathNodeFlags42UpDown.Maximum = new decimal(new int[] { - 7, - 0, - 0, - 0}); - this.PathNodeFlags42UpDown.Name = "PathNodeFlags42UpDown"; - this.PathNodeFlags42UpDown.Size = new System.Drawing.Size(57, 20); - this.PathNodeFlags42UpDown.TabIndex = 41; - this.PathNodeFlags42UpDown.ValueChanged += new System.EventHandler(this.PathNodeFlags42UpDown_ValueChanged); - // - // label71 - // - this.label71.AutoSize = true; - this.label71.Location = new System.Drawing.Point(4, 152); - this.label71.Name = "label71"; - this.label71.Size = new System.Drawing.Size(30, 13); - this.label71.TabIndex = 40; - this.label71.Text = "Unk:"; - // - // PathNodeFlags41CheckBox - // - this.PathNodeFlags41CheckBox.AutoSize = true; - this.PathNodeFlags41CheckBox.Location = new System.Drawing.Point(6, 45); - this.PathNodeFlags41CheckBox.Name = "PathNodeFlags41CheckBox"; - this.PathNodeFlags41CheckBox.Size = new System.Drawing.Size(79, 17); - this.PathNodeFlags41CheckBox.TabIndex = 35; - this.PathNodeFlags41CheckBox.Text = "Slow unk 4"; - this.PathNodeFlags41CheckBox.UseVisualStyleBackColor = true; - this.PathNodeFlags41CheckBox.CheckedChanged += new System.EventHandler(this.PathNodeFlags41CheckBox_CheckedChanged); - // - // PathNodeFlags4UpDown - // - this.PathNodeFlags4UpDown.Location = new System.Drawing.Point(6, 19); - this.PathNodeFlags4UpDown.Maximum = new decimal(new int[] { - 255, - 0, - 0, - 0}); - this.PathNodeFlags4UpDown.Name = "PathNodeFlags4UpDown"; - this.PathNodeFlags4UpDown.Size = new System.Drawing.Size(62, 20); - this.PathNodeFlags4UpDown.TabIndex = 43; - this.PathNodeFlags4UpDown.ValueChanged += new System.EventHandler(this.PathNodeFlags4UpDown_ValueChanged); - // - // PathNodeFlags4Label - // - this.PathNodeFlags4Label.AutoSize = true; - this.PathNodeFlags4Label.Location = new System.Drawing.Point(74, 21); - this.PathNodeFlags4Label.Name = "PathNodeFlags4Label"; - this.PathNodeFlags4Label.Size = new System.Drawing.Size(30, 13); - this.PathNodeFlags4Label.TabIndex = 44; - this.PathNodeFlags4Label.Text = "0x00"; - // - // PathNodeFlags3GroupBox - // - this.PathNodeFlags3GroupBox.Controls.Add(this.PathNodeFlags32UpDown); - this.PathNodeFlags3GroupBox.Controls.Add(this.label70); - this.PathNodeFlags3GroupBox.Controls.Add(this.PathNodeFlags31CheckBox); - this.PathNodeFlags3GroupBox.Controls.Add(this.PathNodeFlags3UpDown); - this.PathNodeFlags3GroupBox.Controls.Add(this.PathNodeFlags3Label); - this.PathNodeFlags3GroupBox.Location = new System.Drawing.Point(7, 318); - this.PathNodeFlags3GroupBox.Name = "PathNodeFlags3GroupBox"; - this.PathNodeFlags3GroupBox.Size = new System.Drawing.Size(223, 84); - this.PathNodeFlags3GroupBox.TabIndex = 46; - this.PathNodeFlags3GroupBox.TabStop = false; - this.PathNodeFlags3GroupBox.Text = "Flags 3"; - // - // PathNodeFlags32UpDown - // - this.PathNodeFlags32UpDown.Location = new System.Drawing.Point(147, 44); - this.PathNodeFlags32UpDown.Maximum = new decimal(new int[] { - 127, - 0, - 0, - 0}); - this.PathNodeFlags32UpDown.Name = "PathNodeFlags32UpDown"; - this.PathNodeFlags32UpDown.Size = new System.Drawing.Size(62, 20); - this.PathNodeFlags32UpDown.TabIndex = 37; - this.PathNodeFlags32UpDown.ValueChanged += new System.EventHandler(this.PathNodeFlags32UpDown_ValueChanged); - // - // label70 - // - this.label70.AutoSize = true; - this.label70.Location = new System.Drawing.Point(111, 46); - this.label70.Name = "label70"; - this.label70.Size = new System.Drawing.Size(30, 13); - this.label70.TabIndex = 36; - this.label70.Text = "Unk:"; - // - // PathNodeFlags31CheckBox - // - this.PathNodeFlags31CheckBox.AutoSize = true; - this.PathNodeFlags31CheckBox.Location = new System.Drawing.Point(6, 45); - this.PathNodeFlags31CheckBox.Name = "PathNodeFlags31CheckBox"; - this.PathNodeFlags31CheckBox.Size = new System.Drawing.Size(85, 17); - this.PathNodeFlags31CheckBox.TabIndex = 35; - this.PathNodeFlags31CheckBox.Text = "Interior node"; - this.PathNodeFlags31CheckBox.UseVisualStyleBackColor = true; - this.PathNodeFlags31CheckBox.CheckedChanged += new System.EventHandler(this.PathNodeFlags31CheckBox_CheckedChanged); - // - // PathNodeFlags3UpDown - // - this.PathNodeFlags3UpDown.Location = new System.Drawing.Point(6, 19); - this.PathNodeFlags3UpDown.Maximum = new decimal(new int[] { - 255, - 0, - 0, - 0}); - this.PathNodeFlags3UpDown.Name = "PathNodeFlags3UpDown"; - this.PathNodeFlags3UpDown.Size = new System.Drawing.Size(62, 20); - this.PathNodeFlags3UpDown.TabIndex = 43; - this.PathNodeFlags3UpDown.ValueChanged += new System.EventHandler(this.PathNodeFlags3UpDown_ValueChanged); - // - // PathNodeFlags3Label - // - this.PathNodeFlags3Label.AutoSize = true; - this.PathNodeFlags3Label.Location = new System.Drawing.Point(74, 21); - this.PathNodeFlags3Label.Name = "PathNodeFlags3Label"; - this.PathNodeFlags3Label.Size = new System.Drawing.Size(30, 13); - this.PathNodeFlags3Label.TabIndex = 44; - this.PathNodeFlags3Label.Text = "0x00"; - // - // PathNodeFlags2GroupBox - // - this.PathNodeFlags2GroupBox.Controls.Add(this.PathNodeFlags21CheckBox); - this.PathNodeFlags2GroupBox.Controls.Add(this.PathNodeFlags28CheckBox); - this.PathNodeFlags2GroupBox.Controls.Add(this.PathNodeFlags22CheckBox); - this.PathNodeFlags2GroupBox.Controls.Add(this.PathNodeFlags27CheckBox); - this.PathNodeFlags2GroupBox.Controls.Add(this.PathNodeFlags23CheckBox); - this.PathNodeFlags2GroupBox.Controls.Add(this.PathNodeFlags26CheckBox); - this.PathNodeFlags2GroupBox.Controls.Add(this.PathNodeFlags24CheckBox); - this.PathNodeFlags2GroupBox.Controls.Add(this.PathNodeFlags25CheckBox); - this.PathNodeFlags2GroupBox.Controls.Add(this.PathNodeFlags2UpDown); - this.PathNodeFlags2GroupBox.Controls.Add(this.PathNodeFlags2Label); - this.PathNodeFlags2GroupBox.Location = new System.Drawing.Point(249, 96); - this.PathNodeFlags2GroupBox.Name = "PathNodeFlags2GroupBox"; - this.PathNodeFlags2GroupBox.Size = new System.Drawing.Size(115, 216); - this.PathNodeFlags2GroupBox.TabIndex = 45; - this.PathNodeFlags2GroupBox.TabStop = false; - this.PathNodeFlags2GroupBox.Text = "Flags 2"; - // - // PathNodeFlags21CheckBox - // - this.PathNodeFlags21CheckBox.AutoSize = true; - this.PathNodeFlags21CheckBox.Location = new System.Drawing.Point(6, 45); - this.PathNodeFlags21CheckBox.Name = "PathNodeFlags21CheckBox"; - this.PathNodeFlags21CheckBox.Size = new System.Drawing.Size(79, 17); - this.PathNodeFlags21CheckBox.TabIndex = 35; - this.PathNodeFlags21CheckBox.Text = "Slow unk 2"; - this.PathNodeFlags21CheckBox.UseVisualStyleBackColor = true; - this.PathNodeFlags21CheckBox.CheckedChanged += new System.EventHandler(this.PathNodeFlags21CheckBox_CheckedChanged); - // - // PathNodeFlags28CheckBox - // - this.PathNodeFlags28CheckBox.AutoSize = true; - this.PathNodeFlags28CheckBox.Location = new System.Drawing.Point(6, 192); - this.PathNodeFlags28CheckBox.Name = "PathNodeFlags28CheckBox"; - this.PathNodeFlags28CheckBox.Size = new System.Drawing.Size(81, 17); - this.PathNodeFlags28CheckBox.TabIndex = 42; - this.PathNodeFlags28CheckBox.Text = "Back road?"; - this.PathNodeFlags28CheckBox.UseVisualStyleBackColor = true; - this.PathNodeFlags28CheckBox.CheckedChanged += new System.EventHandler(this.PathNodeFlags28CheckBox_CheckedChanged); - // - // PathNodeFlags22CheckBox - // - this.PathNodeFlags22CheckBox.AutoSize = true; - this.PathNodeFlags22CheckBox.Location = new System.Drawing.Point(6, 66); - this.PathNodeFlags22CheckBox.Name = "PathNodeFlags22CheckBox"; - this.PathNodeFlags22CheckBox.Size = new System.Drawing.Size(72, 17); - this.PathNodeFlags22CheckBox.TabIndex = 36; - this.PathNodeFlags22CheckBox.Text = "Unused 2"; - this.PathNodeFlags22CheckBox.UseVisualStyleBackColor = true; - this.PathNodeFlags22CheckBox.CheckedChanged += new System.EventHandler(this.PathNodeFlags22CheckBox_CheckedChanged); - // - // PathNodeFlags27CheckBox - // - this.PathNodeFlags27CheckBox.AutoSize = true; - this.PathNodeFlags27CheckBox.Location = new System.Drawing.Point(6, 171); - this.PathNodeFlags27CheckBox.Name = "PathNodeFlags27CheckBox"; - this.PathNodeFlags27CheckBox.Size = new System.Drawing.Size(66, 17); - this.PathNodeFlags27CheckBox.TabIndex = 41; - this.PathNodeFlags27CheckBox.Text = "Freeway"; - this.PathNodeFlags27CheckBox.UseVisualStyleBackColor = true; - this.PathNodeFlags27CheckBox.CheckedChanged += new System.EventHandler(this.PathNodeFlags27CheckBox_CheckedChanged); - // - // PathNodeFlags23CheckBox - // - this.PathNodeFlags23CheckBox.AutoSize = true; - this.PathNodeFlags23CheckBox.Location = new System.Drawing.Point(6, 87); - this.PathNodeFlags23CheckBox.Name = "PathNodeFlags23CheckBox"; - this.PathNodeFlags23CheckBox.Size = new System.Drawing.Size(96, 17); - this.PathNodeFlags23CheckBox.TabIndex = 37; - this.PathNodeFlags23CheckBox.Text = "Junction unk 5"; - this.PathNodeFlags23CheckBox.UseVisualStyleBackColor = true; - this.PathNodeFlags23CheckBox.CheckedChanged += new System.EventHandler(this.PathNodeFlags23CheckBox_CheckedChanged); - // - // PathNodeFlags26CheckBox - // - this.PathNodeFlags26CheckBox.AutoSize = true; - this.PathNodeFlags26CheckBox.Location = new System.Drawing.Point(6, 150); - this.PathNodeFlags26CheckBox.Name = "PathNodeFlags26CheckBox"; - this.PathNodeFlags26CheckBox.Size = new System.Drawing.Size(86, 17); - this.PathNodeFlags26CheckBox.TabIndex = 40; - this.PathNodeFlags26CheckBox.Text = "Water/boats"; - this.PathNodeFlags26CheckBox.UseVisualStyleBackColor = true; - this.PathNodeFlags26CheckBox.CheckedChanged += new System.EventHandler(this.PathNodeFlags26CheckBox_CheckedChanged); - // - // PathNodeFlags24CheckBox - // - this.PathNodeFlags24CheckBox.AutoSize = true; - this.PathNodeFlags24CheckBox.Location = new System.Drawing.Point(6, 108); - this.PathNodeFlags24CheckBox.Name = "PathNodeFlags24CheckBox"; - this.PathNodeFlags24CheckBox.Size = new System.Drawing.Size(72, 17); - this.PathNodeFlags24CheckBox.TabIndex = 38; - this.PathNodeFlags24CheckBox.Text = "Unused 8"; - this.PathNodeFlags24CheckBox.UseVisualStyleBackColor = true; - this.PathNodeFlags24CheckBox.CheckedChanged += new System.EventHandler(this.PathNodeFlags24CheckBox_CheckedChanged); - // - // PathNodeFlags25CheckBox - // - this.PathNodeFlags25CheckBox.AutoSize = true; - this.PathNodeFlags25CheckBox.Location = new System.Drawing.Point(6, 129); - this.PathNodeFlags25CheckBox.Name = "PathNodeFlags25CheckBox"; - this.PathNodeFlags25CheckBox.Size = new System.Drawing.Size(79, 17); - this.PathNodeFlags25CheckBox.TabIndex = 39; - this.PathNodeFlags25CheckBox.Text = "Slow unk 3"; - this.PathNodeFlags25CheckBox.UseVisualStyleBackColor = true; - this.PathNodeFlags25CheckBox.CheckedChanged += new System.EventHandler(this.PathNodeFlags25CheckBox_CheckedChanged); - // - // PathNodeFlags2UpDown - // - this.PathNodeFlags2UpDown.Location = new System.Drawing.Point(6, 19); - this.PathNodeFlags2UpDown.Maximum = new decimal(new int[] { - 255, - 0, - 0, - 0}); - this.PathNodeFlags2UpDown.Name = "PathNodeFlags2UpDown"; - this.PathNodeFlags2UpDown.Size = new System.Drawing.Size(62, 20); - this.PathNodeFlags2UpDown.TabIndex = 43; - this.PathNodeFlags2UpDown.ValueChanged += new System.EventHandler(this.PathNodeFlags2UpDown_ValueChanged); - // - // PathNodeFlags2Label - // - this.PathNodeFlags2Label.AutoSize = true; - this.PathNodeFlags2Label.Location = new System.Drawing.Point(74, 21); - this.PathNodeFlags2Label.Name = "PathNodeFlags2Label"; - this.PathNodeFlags2Label.Size = new System.Drawing.Size(30, 13); - this.PathNodeFlags2Label.TabIndex = 44; - this.PathNodeFlags2Label.Text = "0x00"; - // - // PathNodeFlags1GroupBox - // - this.PathNodeFlags1GroupBox.Controls.Add(this.PathNodeFlags11CheckBox); - this.PathNodeFlags1GroupBox.Controls.Add(this.PathNodeFlags18CheckBox); - this.PathNodeFlags1GroupBox.Controls.Add(this.PathNodeFlags12CheckBox); - this.PathNodeFlags1GroupBox.Controls.Add(this.PathNodeFlags17CheckBox); - this.PathNodeFlags1GroupBox.Controls.Add(this.PathNodeFlags13CheckBox); - this.PathNodeFlags1GroupBox.Controls.Add(this.PathNodeFlags16CheckBox); - this.PathNodeFlags1GroupBox.Controls.Add(this.PathNodeFlags14CheckBox); - this.PathNodeFlags1GroupBox.Controls.Add(this.PathNodeFlags15CheckBox); - this.PathNodeFlags1GroupBox.Controls.Add(this.PathNodeFlags1UpDown); - this.PathNodeFlags1GroupBox.Controls.Add(this.PathNodeFlags1Label); - this.PathNodeFlags1GroupBox.Location = new System.Drawing.Point(128, 96); - this.PathNodeFlags1GroupBox.Name = "PathNodeFlags1GroupBox"; - this.PathNodeFlags1GroupBox.Size = new System.Drawing.Size(115, 216); - this.PathNodeFlags1GroupBox.TabIndex = 44; - this.PathNodeFlags1GroupBox.TabStop = false; - this.PathNodeFlags1GroupBox.Text = "Flags 1"; - // - // PathNodeFlags11CheckBox - // - this.PathNodeFlags11CheckBox.AutoSize = true; - this.PathNodeFlags11CheckBox.Location = new System.Drawing.Point(6, 45); - this.PathNodeFlags11CheckBox.Name = "PathNodeFlags11CheckBox"; - this.PathNodeFlags11CheckBox.Size = new System.Drawing.Size(82, 17); - this.PathNodeFlags11CheckBox.TabIndex = 35; - this.PathNodeFlags11CheckBox.Text = "L turn lane?"; - this.PathNodeFlags11CheckBox.UseVisualStyleBackColor = true; - this.PathNodeFlags11CheckBox.CheckedChanged += new System.EventHandler(this.PathNodeFlags11CheckBox_CheckedChanged); - // - // PathNodeFlags18CheckBox - // - this.PathNodeFlags18CheckBox.AutoSize = true; - this.PathNodeFlags18CheckBox.Location = new System.Drawing.Point(6, 192); - this.PathNodeFlags18CheckBox.Name = "PathNodeFlags18CheckBox"; - this.PathNodeFlags18CheckBox.Size = new System.Drawing.Size(96, 17); - this.PathNodeFlags18CheckBox.TabIndex = 42; - this.PathNodeFlags18CheckBox.Text = "Junction unk 4"; - this.PathNodeFlags18CheckBox.UseVisualStyleBackColor = true; - this.PathNodeFlags18CheckBox.CheckedChanged += new System.EventHandler(this.PathNodeFlags18CheckBox_CheckedChanged); - // - // PathNodeFlags12CheckBox - // - this.PathNodeFlags12CheckBox.AutoSize = true; - this.PathNodeFlags12CheckBox.Location = new System.Drawing.Point(6, 66); - this.PathNodeFlags12CheckBox.Name = "PathNodeFlags12CheckBox"; - this.PathNodeFlags12CheckBox.Size = new System.Drawing.Size(98, 17); - this.PathNodeFlags12CheckBox.TabIndex = 36; - this.PathNodeFlags12CheckBox.Text = "L turn no return"; - this.PathNodeFlags12CheckBox.UseVisualStyleBackColor = true; - this.PathNodeFlags12CheckBox.CheckedChanged += new System.EventHandler(this.PathNodeFlags12CheckBox_CheckedChanged); - // - // PathNodeFlags17CheckBox - // - this.PathNodeFlags17CheckBox.AutoSize = true; - this.PathNodeFlags17CheckBox.Location = new System.Drawing.Point(6, 171); - this.PathNodeFlags17CheckBox.Name = "PathNodeFlags17CheckBox"; - this.PathNodeFlags17CheckBox.Size = new System.Drawing.Size(108, 17); - this.PathNodeFlags17CheckBox.TabIndex = 41; - this.PathNodeFlags17CheckBox.Text = "Traffic light unk 3"; - this.PathNodeFlags17CheckBox.UseVisualStyleBackColor = true; - this.PathNodeFlags17CheckBox.CheckedChanged += new System.EventHandler(this.PathNodeFlags17CheckBox_CheckedChanged); - // - // PathNodeFlags13CheckBox - // - this.PathNodeFlags13CheckBox.AutoSize = true; - this.PathNodeFlags13CheckBox.Location = new System.Drawing.Point(6, 87); - this.PathNodeFlags13CheckBox.Name = "PathNodeFlags13CheckBox"; - this.PathNodeFlags13CheckBox.Size = new System.Drawing.Size(100, 17); - this.PathNodeFlags13CheckBox.TabIndex = 37; - this.PathNodeFlags13CheckBox.Text = "R turn no return"; - this.PathNodeFlags13CheckBox.UseVisualStyleBackColor = true; - this.PathNodeFlags13CheckBox.CheckedChanged += new System.EventHandler(this.PathNodeFlags13CheckBox_CheckedChanged); - // - // PathNodeFlags16CheckBox - // - this.PathNodeFlags16CheckBox.AutoSize = true; - this.PathNodeFlags16CheckBox.Location = new System.Drawing.Point(6, 150); - this.PathNodeFlags16CheckBox.Name = "PathNodeFlags16CheckBox"; - this.PathNodeFlags16CheckBox.Size = new System.Drawing.Size(96, 17); - this.PathNodeFlags16CheckBox.TabIndex = 40; - this.PathNodeFlags16CheckBox.Text = "Junction unk 3"; - this.PathNodeFlags16CheckBox.UseVisualStyleBackColor = true; - this.PathNodeFlags16CheckBox.CheckedChanged += new System.EventHandler(this.PathNodeFlags16CheckBox_CheckedChanged); - // - // PathNodeFlags14CheckBox - // - this.PathNodeFlags14CheckBox.AutoSize = true; - this.PathNodeFlags14CheckBox.Location = new System.Drawing.Point(6, 108); - this.PathNodeFlags14CheckBox.Name = "PathNodeFlags14CheckBox"; - this.PathNodeFlags14CheckBox.Size = new System.Drawing.Size(108, 17); - this.PathNodeFlags14CheckBox.TabIndex = 38; - this.PathNodeFlags14CheckBox.Text = "Traffic light unk 1"; - this.PathNodeFlags14CheckBox.UseVisualStyleBackColor = true; - this.PathNodeFlags14CheckBox.CheckedChanged += new System.EventHandler(this.PathNodeFlags14CheckBox_CheckedChanged); - // - // PathNodeFlags15CheckBox - // - this.PathNodeFlags15CheckBox.AutoSize = true; - this.PathNodeFlags15CheckBox.Location = new System.Drawing.Point(6, 129); - this.PathNodeFlags15CheckBox.Name = "PathNodeFlags15CheckBox"; - this.PathNodeFlags15CheckBox.Size = new System.Drawing.Size(108, 17); - this.PathNodeFlags15CheckBox.TabIndex = 39; - this.PathNodeFlags15CheckBox.Text = "Traffic light unk 2"; - this.PathNodeFlags15CheckBox.UseVisualStyleBackColor = true; - this.PathNodeFlags15CheckBox.CheckedChanged += new System.EventHandler(this.PathNodeFlags15CheckBox_CheckedChanged); - // - // PathNodeFlags1UpDown - // - this.PathNodeFlags1UpDown.Location = new System.Drawing.Point(6, 19); - this.PathNodeFlags1UpDown.Maximum = new decimal(new int[] { - 255, - 0, - 0, - 0}); - this.PathNodeFlags1UpDown.Name = "PathNodeFlags1UpDown"; - this.PathNodeFlags1UpDown.Size = new System.Drawing.Size(62, 20); - this.PathNodeFlags1UpDown.TabIndex = 43; - this.PathNodeFlags1UpDown.ValueChanged += new System.EventHandler(this.PathNodeFlags1UpDown_ValueChanged); - // - // PathNodeFlags1Label - // - this.PathNodeFlags1Label.AutoSize = true; - this.PathNodeFlags1Label.Location = new System.Drawing.Point(74, 21); - this.PathNodeFlags1Label.Name = "PathNodeFlags1Label"; - this.PathNodeFlags1Label.Size = new System.Drawing.Size(30, 13); - this.PathNodeFlags1Label.TabIndex = 44; - this.PathNodeFlags1Label.Text = "0x00"; - // - // PathNodeFlags0GroupBox - // - this.PathNodeFlags0GroupBox.Controls.Add(this.PathNodeFlags01CheckBox); - this.PathNodeFlags0GroupBox.Controls.Add(this.PathNodeFlags08CheckBox); - this.PathNodeFlags0GroupBox.Controls.Add(this.PathNodeFlags02CheckBox); - this.PathNodeFlags0GroupBox.Controls.Add(this.PathNodeFlags07CheckBox); - this.PathNodeFlags0GroupBox.Controls.Add(this.PathNodeFlags03CheckBox); - this.PathNodeFlags0GroupBox.Controls.Add(this.PathNodeFlags06CheckBox); - this.PathNodeFlags0GroupBox.Controls.Add(this.PathNodeFlags04CheckBox); - this.PathNodeFlags0GroupBox.Controls.Add(this.PathNodeFlags05CheckBox); - this.PathNodeFlags0GroupBox.Controls.Add(this.PathNodeFlags0UpDown); - this.PathNodeFlags0GroupBox.Controls.Add(this.PathNodeFlags0Label); - this.PathNodeFlags0GroupBox.Location = new System.Drawing.Point(7, 96); - this.PathNodeFlags0GroupBox.Name = "PathNodeFlags0GroupBox"; - this.PathNodeFlags0GroupBox.Size = new System.Drawing.Size(115, 216); - this.PathNodeFlags0GroupBox.TabIndex = 43; - this.PathNodeFlags0GroupBox.TabStop = false; - this.PathNodeFlags0GroupBox.Text = "Flags 0"; - // - // PathNodeFlags01CheckBox - // - this.PathNodeFlags01CheckBox.AutoSize = true; - this.PathNodeFlags01CheckBox.Location = new System.Drawing.Point(6, 45); - this.PathNodeFlags01CheckBox.Name = "PathNodeFlags01CheckBox"; - this.PathNodeFlags01CheckBox.Size = new System.Drawing.Size(65, 17); - this.PathNodeFlags01CheckBox.TabIndex = 35; - this.PathNodeFlags01CheckBox.Text = "Scripted"; - this.PathNodeFlags01CheckBox.UseVisualStyleBackColor = true; - this.PathNodeFlags01CheckBox.CheckedChanged += new System.EventHandler(this.PathNodeFlags01CheckBox_CheckedChanged); - // - // PathNodeFlags08CheckBox - // - this.PathNodeFlags08CheckBox.AutoSize = true; - this.PathNodeFlags08CheckBox.Location = new System.Drawing.Point(6, 192); - this.PathNodeFlags08CheckBox.Name = "PathNodeFlags08CheckBox"; - this.PathNodeFlags08CheckBox.Size = new System.Drawing.Size(96, 17); - this.PathNodeFlags08CheckBox.TabIndex = 42; - this.PathNodeFlags08CheckBox.Text = "Junction unk 2"; - this.PathNodeFlags08CheckBox.UseVisualStyleBackColor = true; - this.PathNodeFlags08CheckBox.CheckedChanged += new System.EventHandler(this.PathNodeFlags08CheckBox_CheckedChanged); - // - // PathNodeFlags02CheckBox - // - this.PathNodeFlags02CheckBox.AutoSize = true; - this.PathNodeFlags02CheckBox.Location = new System.Drawing.Point(6, 66); - this.PathNodeFlags02CheckBox.Name = "PathNodeFlags02CheckBox"; - this.PathNodeFlags02CheckBox.Size = new System.Drawing.Size(89, 17); - this.PathNodeFlags02CheckBox.TabIndex = 36; - this.PathNodeFlags02CheckBox.Text = "GPS enable?"; - this.PathNodeFlags02CheckBox.UseVisualStyleBackColor = true; - this.PathNodeFlags02CheckBox.CheckedChanged += new System.EventHandler(this.PathNodeFlags02CheckBox_CheckedChanged); - // - // PathNodeFlags07CheckBox - // - this.PathNodeFlags07CheckBox.AutoSize = true; - this.PathNodeFlags07CheckBox.Location = new System.Drawing.Point(6, 171); - this.PathNodeFlags07CheckBox.Name = "PathNodeFlags07CheckBox"; - this.PathNodeFlags07CheckBox.Size = new System.Drawing.Size(96, 17); - this.PathNodeFlags07CheckBox.TabIndex = 41; - this.PathNodeFlags07CheckBox.Text = "Junction unk 1"; - this.PathNodeFlags07CheckBox.UseVisualStyleBackColor = true; - this.PathNodeFlags07CheckBox.CheckedChanged += new System.EventHandler(this.PathNodeFlags07CheckBox_CheckedChanged); - // - // PathNodeFlags03CheckBox - // - this.PathNodeFlags03CheckBox.AutoSize = true; - this.PathNodeFlags03CheckBox.Location = new System.Drawing.Point(6, 87); - this.PathNodeFlags03CheckBox.Name = "PathNodeFlags03CheckBox"; - this.PathNodeFlags03CheckBox.Size = new System.Drawing.Size(72, 17); - this.PathNodeFlags03CheckBox.TabIndex = 37; - this.PathNodeFlags03CheckBox.Text = "Unused 4"; - this.PathNodeFlags03CheckBox.UseVisualStyleBackColor = true; - this.PathNodeFlags03CheckBox.CheckedChanged += new System.EventHandler(this.PathNodeFlags03CheckBox_CheckedChanged); - // - // PathNodeFlags06CheckBox - // - this.PathNodeFlags06CheckBox.AutoSize = true; - this.PathNodeFlags06CheckBox.Location = new System.Drawing.Point(6, 150); - this.PathNodeFlags06CheckBox.Name = "PathNodeFlags06CheckBox"; - this.PathNodeFlags06CheckBox.Size = new System.Drawing.Size(79, 17); - this.PathNodeFlags06CheckBox.TabIndex = 40; - this.PathNodeFlags06CheckBox.Text = "Slow unk 1"; - this.PathNodeFlags06CheckBox.UseVisualStyleBackColor = true; - this.PathNodeFlags06CheckBox.CheckedChanged += new System.EventHandler(this.PathNodeFlags06CheckBox_CheckedChanged); - // - // PathNodeFlags04CheckBox - // - this.PathNodeFlags04CheckBox.AutoSize = true; - this.PathNodeFlags04CheckBox.Location = new System.Drawing.Point(6, 108); - this.PathNodeFlags04CheckBox.Name = "PathNodeFlags04CheckBox"; - this.PathNodeFlags04CheckBox.Size = new System.Drawing.Size(87, 17); - this.PathNodeFlags04CheckBox.TabIndex = 38; - this.PathNodeFlags04CheckBox.Text = "Gravel road?"; - this.PathNodeFlags04CheckBox.UseVisualStyleBackColor = true; - this.PathNodeFlags04CheckBox.CheckedChanged += new System.EventHandler(this.PathNodeFlags04CheckBox_CheckedChanged); - // - // PathNodeFlags05CheckBox - // - this.PathNodeFlags05CheckBox.AutoSize = true; - this.PathNodeFlags05CheckBox.Location = new System.Drawing.Point(6, 129); - this.PathNodeFlags05CheckBox.Name = "PathNodeFlags05CheckBox"; - this.PathNodeFlags05CheckBox.Size = new System.Drawing.Size(78, 17); - this.PathNodeFlags05CheckBox.TabIndex = 39; - this.PathNodeFlags05CheckBox.Text = "Unused 16"; - this.PathNodeFlags05CheckBox.UseVisualStyleBackColor = true; - this.PathNodeFlags05CheckBox.CheckedChanged += new System.EventHandler(this.PathNodeFlags05CheckBox_CheckedChanged); - // - // PathNodeFlags0UpDown - // - this.PathNodeFlags0UpDown.Location = new System.Drawing.Point(6, 19); - this.PathNodeFlags0UpDown.Maximum = new decimal(new int[] { - 255, - 0, - 0, - 0}); - this.PathNodeFlags0UpDown.Name = "PathNodeFlags0UpDown"; - this.PathNodeFlags0UpDown.Size = new System.Drawing.Size(62, 20); - this.PathNodeFlags0UpDown.TabIndex = 43; - this.PathNodeFlags0UpDown.ValueChanged += new System.EventHandler(this.PathNodeFlags0UpDown_ValueChanged); - // - // PathNodeFlags0Label - // - this.PathNodeFlags0Label.AutoSize = true; - this.PathNodeFlags0Label.Location = new System.Drawing.Point(74, 21); - this.PathNodeFlags0Label.Name = "PathNodeFlags0Label"; - this.PathNodeFlags0Label.Size = new System.Drawing.Size(30, 13); - this.PathNodeFlags0Label.TabIndex = 44; - this.PathNodeFlags0Label.Text = "0x00"; - // - // PathNodeDeleteButton - // - this.PathNodeDeleteButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.PathNodeDeleteButton.Enabled = false; - this.PathNodeDeleteButton.Location = new System.Drawing.Point(406, 36); - this.PathNodeDeleteButton.Name = "PathNodeDeleteButton"; - this.PathNodeDeleteButton.Size = new System.Drawing.Size(90, 23); - this.PathNodeDeleteButton.TabIndex = 12; - this.PathNodeDeleteButton.Text = "Delete Node"; - this.PathNodeDeleteButton.UseVisualStyleBackColor = true; - this.PathNodeDeleteButton.Click += new System.EventHandler(this.PathNodeDeleteButton_Click); - // - // PathNodeAreaIDUpDown - // - this.PathNodeAreaIDUpDown.Location = new System.Drawing.Point(78, 12); - this.PathNodeAreaIDUpDown.Maximum = new decimal(new int[] { - 1023, - 0, - 0, - 0}); - this.PathNodeAreaIDUpDown.Name = "PathNodeAreaIDUpDown"; - this.PathNodeAreaIDUpDown.Size = new System.Drawing.Size(74, 20); - this.PathNodeAreaIDUpDown.TabIndex = 6; - this.PathNodeAreaIDUpDown.ValueChanged += new System.EventHandler(this.PathNodeAreaIDUpDown_ValueChanged); - // - // PathNodeAddToProjectButton - // - this.PathNodeAddToProjectButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.PathNodeAddToProjectButton.Enabled = false; - this.PathNodeAddToProjectButton.Location = new System.Drawing.Point(310, 36); - this.PathNodeAddToProjectButton.Name = "PathNodeAddToProjectButton"; - this.PathNodeAddToProjectButton.Size = new System.Drawing.Size(90, 23); - this.PathNodeAddToProjectButton.TabIndex = 11; - this.PathNodeAddToProjectButton.Text = "Add to Project"; - this.PathNodeAddToProjectButton.UseVisualStyleBackColor = true; - this.PathNodeAddToProjectButton.Click += new System.EventHandler(this.PathNodeAddToProjectButton_Click); - // - // label49 - // - this.label49.AutoSize = true; - this.label49.Location = new System.Drawing.Point(26, 14); - this.label49.Name = "label49"; - this.label49.Size = new System.Drawing.Size(46, 13); - this.label49.TabIndex = 5; - this.label49.Text = "Area ID:"; - // - // label50 - // - this.label50.AutoSize = true; - this.label50.Location = new System.Drawing.Point(166, 14); - this.label50.Name = "label50"; - this.label50.Size = new System.Drawing.Size(50, 13); - this.label50.TabIndex = 7; - this.label50.Text = "Node ID:"; - // - // label68 - // - this.label68.AutoSize = true; - this.label68.Location = new System.Drawing.Point(302, 14); - this.label68.Name = "label68"; - this.label68.Size = new System.Drawing.Size(156, 13); - this.label68.TabIndex = 32; - this.label68.Text = "(These will be set automatically)"; - // - // PathNodeNodeIDUpDown - // - this.PathNodeNodeIDUpDown.Location = new System.Drawing.Point(222, 12); - this.PathNodeNodeIDUpDown.Maximum = new decimal(new int[] { - 100000, - 0, - 0, - 0}); - this.PathNodeNodeIDUpDown.Name = "PathNodeNodeIDUpDown"; - this.PathNodeNodeIDUpDown.Size = new System.Drawing.Size(74, 20); - this.PathNodeNodeIDUpDown.TabIndex = 8; - this.PathNodeNodeIDUpDown.ValueChanged += new System.EventHandler(this.PathNodeNodeIDUpDown_ValueChanged); - // - // label52 - // - this.label52.AutoSize = true; - this.label52.Location = new System.Drawing.Point(4, 67); - this.label52.Name = "label52"; - this.label52.Size = new System.Drawing.Size(70, 13); - this.label52.TabIndex = 9; - this.label52.Text = "Street (hash):"; - // - // PathNodeStreetHashTextBox - // - this.PathNodeStreetHashTextBox.Location = new System.Drawing.Point(78, 64); - this.PathNodeStreetHashTextBox.Name = "PathNodeStreetHashTextBox"; - this.PathNodeStreetHashTextBox.Size = new System.Drawing.Size(138, 20); - this.PathNodeStreetHashTextBox.TabIndex = 13; - this.PathNodeStreetHashTextBox.TextChanged += new System.EventHandler(this.PathNodeStreetHashTextBox_TextChanged); - // - // PathNodeGoToButton - // - this.PathNodeGoToButton.Location = new System.Drawing.Point(222, 36); - this.PathNodeGoToButton.Name = "PathNodeGoToButton"; - this.PathNodeGoToButton.Size = new System.Drawing.Size(68, 23); - this.PathNodeGoToButton.TabIndex = 10; - this.PathNodeGoToButton.Text = "Go to"; - this.PathNodeGoToButton.UseVisualStyleBackColor = true; - this.PathNodeGoToButton.Click += new System.EventHandler(this.PathNodeGoToButton_Click); - // - // PathNodeStreetNameLabel - // - this.PathNodeStreetNameLabel.AutoSize = true; - this.PathNodeStreetNameLabel.Location = new System.Drawing.Point(223, 67); - this.PathNodeStreetNameLabel.Name = "PathNodeStreetNameLabel"; - this.PathNodeStreetNameLabel.Size = new System.Drawing.Size(73, 13); - this.PathNodeStreetNameLabel.TabIndex = 11; - this.PathNodeStreetNameLabel.Text = "Name: [None]"; - // - // PathNodePositionTextBox - // - this.PathNodePositionTextBox.Location = new System.Drawing.Point(78, 38); - this.PathNodePositionTextBox.Name = "PathNodePositionTextBox"; - this.PathNodePositionTextBox.Size = new System.Drawing.Size(138, 20); - this.PathNodePositionTextBox.TabIndex = 9; - this.PathNodePositionTextBox.TextChanged += new System.EventHandler(this.PathNodePositionTextBox_TextChanged); - // - // label55 - // - this.label55.AutoSize = true; - this.label55.Location = new System.Drawing.Point(25, 41); - this.label55.Name = "label55"; - this.label55.Size = new System.Drawing.Size(47, 13); - this.label55.TabIndex = 28; - this.label55.Text = "Position:"; - // - // PathNodeLinksTabPage - // - this.PathNodeLinksTabPage.Controls.Add(this.splitContainer2); - this.PathNodeLinksTabPage.Location = new System.Drawing.Point(4, 22); - this.PathNodeLinksTabPage.Name = "PathNodeLinksTabPage"; - this.PathNodeLinksTabPage.Padding = new System.Windows.Forms.Padding(3); - this.PathNodeLinksTabPage.Size = new System.Drawing.Size(499, 414); - this.PathNodeLinksTabPage.TabIndex = 0; - this.PathNodeLinksTabPage.Text = "Path Links"; - this.PathNodeLinksTabPage.UseVisualStyleBackColor = true; - // - // splitContainer2 - // - this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; - this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; - this.splitContainer2.Location = new System.Drawing.Point(3, 3); - this.splitContainer2.Name = "splitContainer2"; - // - // splitContainer2.Panel1 - // - this.splitContainer2.Panel1.Controls.Add(this.PathNodeRemoveLinkButton); - this.splitContainer2.Panel1.Controls.Add(this.PathNodeAddLinkButton); - this.splitContainer2.Panel1.Controls.Add(this.PathNodeLinksListBox); - this.splitContainer2.Panel1.Controls.Add(this.PathNodeLinkCountLabel); - // - // splitContainer2.Panel2 - // - this.splitContainer2.Panel2.Controls.Add(this.PathNodeLinkPanel); - this.splitContainer2.Size = new System.Drawing.Size(493, 408); - this.splitContainer2.SplitterDistance = 168; - this.splitContainer2.TabIndex = 0; - // - // PathNodeRemoveLinkButton - // - this.PathNodeRemoveLinkButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.PathNodeRemoveLinkButton.Location = new System.Drawing.Point(85, 382); - this.PathNodeRemoveLinkButton.Name = "PathNodeRemoveLinkButton"; - this.PathNodeRemoveLinkButton.Size = new System.Drawing.Size(76, 23); - this.PathNodeRemoveLinkButton.TabIndex = 2; - this.PathNodeRemoveLinkButton.Text = "Remove"; - this.PathNodeRemoveLinkButton.UseVisualStyleBackColor = true; - this.PathNodeRemoveLinkButton.Click += new System.EventHandler(this.PathNodeRemoveLinkButton_Click); - // - // PathNodeAddLinkButton - // - this.PathNodeAddLinkButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.PathNodeAddLinkButton.Location = new System.Drawing.Point(3, 382); - this.PathNodeAddLinkButton.Name = "PathNodeAddLinkButton"; - this.PathNodeAddLinkButton.Size = new System.Drawing.Size(76, 23); - this.PathNodeAddLinkButton.TabIndex = 1; - this.PathNodeAddLinkButton.Text = "Add"; - this.PathNodeAddLinkButton.UseVisualStyleBackColor = true; - this.PathNodeAddLinkButton.Click += new System.EventHandler(this.PathNodeAddLinkButton_Click); - // - // PathNodeLinksListBox - // - this.PathNodeLinksListBox.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.PathNodeLinksListBox.FormattingEnabled = true; - this.PathNodeLinksListBox.Location = new System.Drawing.Point(0, 0); - this.PathNodeLinksListBox.Name = "PathNodeLinksListBox"; - this.PathNodeLinksListBox.Size = new System.Drawing.Size(165, 342); - this.PathNodeLinksListBox.TabIndex = 0; - this.PathNodeLinksListBox.SelectedIndexChanged += new System.EventHandler(this.PathNodeLinksListBox_SelectedIndexChanged); - // - // PathNodeLinkCountLabel - // - this.PathNodeLinkCountLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.PathNodeLinkCountLabel.AutoSize = true; - this.PathNodeLinkCountLabel.Location = new System.Drawing.Point(3, 366); - this.PathNodeLinkCountLabel.Name = "PathNodeLinkCountLabel"; - this.PathNodeLinkCountLabel.Size = new System.Drawing.Size(70, 13); - this.PathNodeLinkCountLabel.TabIndex = 31; - this.PathNodeLinkCountLabel.Text = "Link Count: 0"; - // - // PathNodeLinkPanel - // - this.PathNodeLinkPanel.Controls.Add(this.PathLinkFlags2GroupBox); - this.PathNodeLinkPanel.Controls.Add(this.PathLinkFlags1GroupBox); - this.PathNodeLinkPanel.Controls.Add(this.PathLinkFlags0GroupBox); - this.PathNodeLinkPanel.Controls.Add(this.PathNodeLinkageStatusLabel); - this.PathNodeLinkPanel.Controls.Add(this.PathNodeLinkLengthUpDown); - this.PathNodeLinkPanel.Controls.Add(this.label57); - this.PathNodeLinkPanel.Controls.Add(this.PathNodeLinkNodeIDUpDown); - this.PathNodeLinkPanel.Controls.Add(this.label51); - this.PathNodeLinkPanel.Controls.Add(this.PathNodeLinkAreaIDUpDown); - this.PathNodeLinkPanel.Controls.Add(this.label54); - this.PathNodeLinkPanel.Dock = System.Windows.Forms.DockStyle.Fill; - this.PathNodeLinkPanel.Enabled = false; - this.PathNodeLinkPanel.Location = new System.Drawing.Point(0, 0); - this.PathNodeLinkPanel.Name = "PathNodeLinkPanel"; - this.PathNodeLinkPanel.Size = new System.Drawing.Size(321, 408); - this.PathNodeLinkPanel.TabIndex = 0; - // - // PathLinkFlags2GroupBox - // - this.PathLinkFlags2GroupBox.Controls.Add(this.PathNodeLinkFlags21CheckBox); - this.PathLinkFlags2GroupBox.Controls.Add(this.PathNodeLinkFlags22CheckBox); - this.PathLinkFlags2GroupBox.Controls.Add(this.label53); - this.PathLinkFlags2GroupBox.Controls.Add(this.PathNodeLinkFwdLanesUpDown); - this.PathLinkFlags2GroupBox.Controls.Add(this.label56); - this.PathLinkFlags2GroupBox.Controls.Add(this.PathNodeLinkBackLanesUpDown); - this.PathLinkFlags2GroupBox.Controls.Add(this.PathNodeLinkFlags2UpDown); - this.PathLinkFlags2GroupBox.Controls.Add(this.PathNodeLinkFlags2Label); - this.PathLinkFlags2GroupBox.Location = new System.Drawing.Point(13, 240); - this.PathLinkFlags2GroupBox.Name = "PathLinkFlags2GroupBox"; - this.PathLinkFlags2GroupBox.Size = new System.Drawing.Size(141, 145); - this.PathLinkFlags2GroupBox.TabIndex = 18; - this.PathLinkFlags2GroupBox.TabStop = false; - this.PathLinkFlags2GroupBox.Text = "Flags 2"; - // - // PathNodeLinkFlags21CheckBox - // - this.PathNodeLinkFlags21CheckBox.AutoSize = true; - this.PathNodeLinkFlags21CheckBox.Location = new System.Drawing.Point(6, 45); - this.PathNodeLinkFlags21CheckBox.Name = "PathNodeLinkFlags21CheckBox"; - this.PathNodeLinkFlags21CheckBox.Size = new System.Drawing.Size(123, 17); - this.PathNodeLinkFlags21CheckBox.TabIndex = 33; - this.PathNodeLinkFlags21CheckBox.Text = "Angled/merged links"; - this.PathNodeLinkFlags21CheckBox.UseVisualStyleBackColor = true; - this.PathNodeLinkFlags21CheckBox.CheckedChanged += new System.EventHandler(this.PathNodeLinkFlags21CheckBox_CheckedChanged); - // - // PathNodeLinkFlags22CheckBox - // - this.PathNodeLinkFlags22CheckBox.AutoSize = true; - this.PathNodeLinkFlags22CheckBox.Location = new System.Drawing.Point(6, 66); - this.PathNodeLinkFlags22CheckBox.Name = "PathNodeLinkFlags22CheckBox"; - this.PathNodeLinkFlags22CheckBox.Size = new System.Drawing.Size(129, 17); - this.PathNodeLinkFlags22CheckBox.TabIndex = 34; - this.PathNodeLinkFlags22CheckBox.Text = "Lane change / U-turn"; - this.PathNodeLinkFlags22CheckBox.UseVisualStyleBackColor = true; - this.PathNodeLinkFlags22CheckBox.CheckedChanged += new System.EventHandler(this.PathNodeLinkFlags22CheckBox_CheckedChanged); - // - // label53 - // - this.label53.AutoSize = true; - this.label53.Location = new System.Drawing.Point(7, 118); - this.label53.Name = "label53"; - this.label53.Size = new System.Drawing.Size(58, 13); - this.label53.TabIndex = 37; - this.label53.Text = "Fwd lanes:"; - // - // PathNodeLinkFwdLanesUpDown - // - this.PathNodeLinkFwdLanesUpDown.Location = new System.Drawing.Point(71, 116); - this.PathNodeLinkFwdLanesUpDown.Maximum = new decimal(new int[] { - 7, - 0, - 0, - 0}); - this.PathNodeLinkFwdLanesUpDown.Name = "PathNodeLinkFwdLanesUpDown"; - this.PathNodeLinkFwdLanesUpDown.Size = new System.Drawing.Size(62, 20); - this.PathNodeLinkFwdLanesUpDown.TabIndex = 38; - this.PathNodeLinkFwdLanesUpDown.ValueChanged += new System.EventHandler(this.PathNodeLinkFwdLanesUpDown_ValueChanged); - // - // label56 - // - this.label56.AutoSize = true; - this.label56.Location = new System.Drawing.Point(3, 92); - this.label56.Name = "label56"; - this.label56.Size = new System.Drawing.Size(63, 13); - this.label56.TabIndex = 35; - this.label56.Text = "Back lanes:"; - // - // PathNodeLinkBackLanesUpDown - // - this.PathNodeLinkBackLanesUpDown.Location = new System.Drawing.Point(72, 90); - this.PathNodeLinkBackLanesUpDown.Maximum = new decimal(new int[] { - 7, - 0, - 0, - 0}); - this.PathNodeLinkBackLanesUpDown.Name = "PathNodeLinkBackLanesUpDown"; - this.PathNodeLinkBackLanesUpDown.Size = new System.Drawing.Size(62, 20); - this.PathNodeLinkBackLanesUpDown.TabIndex = 36; - this.PathNodeLinkBackLanesUpDown.ValueChanged += new System.EventHandler(this.PathNodeLinkBackLanesUpDown_ValueChanged); - // - // PathNodeLinkFlags2UpDown - // - this.PathNodeLinkFlags2UpDown.Location = new System.Drawing.Point(6, 19); - this.PathNodeLinkFlags2UpDown.Maximum = new decimal(new int[] { - 255, - 0, - 0, - 0}); - this.PathNodeLinkFlags2UpDown.Name = "PathNodeLinkFlags2UpDown"; - this.PathNodeLinkFlags2UpDown.Size = new System.Drawing.Size(62, 20); - this.PathNodeLinkFlags2UpDown.TabIndex = 31; - this.PathNodeLinkFlags2UpDown.ValueChanged += new System.EventHandler(this.PathNodeLinkFlags2UpDown_ValueChanged); - // - // PathNodeLinkFlags2Label - // - this.PathNodeLinkFlags2Label.AutoSize = true; - this.PathNodeLinkFlags2Label.Location = new System.Drawing.Point(74, 21); - this.PathNodeLinkFlags2Label.Name = "PathNodeLinkFlags2Label"; - this.PathNodeLinkFlags2Label.Size = new System.Drawing.Size(30, 13); - this.PathNodeLinkFlags2Label.TabIndex = 32; - this.PathNodeLinkFlags2Label.Text = "0x00"; - // - // PathLinkFlags1GroupBox - // - this.PathLinkFlags1GroupBox.Controls.Add(this.PathNodeLinkOffsetSizeUpDown); - this.PathLinkFlags1GroupBox.Controls.Add(this.label61); - this.PathLinkFlags1GroupBox.Controls.Add(this.PathNodeLinkFlags11CheckBox); - this.PathLinkFlags1GroupBox.Controls.Add(this.PathNodeLinkFlags18CheckBox); - this.PathLinkFlags1GroupBox.Controls.Add(this.PathNodeLinkFlags12CheckBox); - this.PathLinkFlags1GroupBox.Controls.Add(this.PathNodeLinkFlags13CheckBox); - this.PathLinkFlags1GroupBox.Controls.Add(this.PathNodeLinkFlags14CheckBox); - this.PathLinkFlags1GroupBox.Controls.Add(this.PathNodeLinkFlags1UpDown); - this.PathLinkFlags1GroupBox.Controls.Add(this.PathNodeLinkFlags1Label); - this.PathLinkFlags1GroupBox.Location = new System.Drawing.Point(165, 93); - this.PathLinkFlags1GroupBox.Name = "PathLinkFlags1GroupBox"; - this.PathLinkFlags1GroupBox.Size = new System.Drawing.Size(133, 181); - this.PathLinkFlags1GroupBox.TabIndex = 17; - this.PathLinkFlags1GroupBox.TabStop = false; - this.PathLinkFlags1GroupBox.Text = "Flags 1"; - // - // PathNodeLinkOffsetSizeUpDown - // - this.PathNodeLinkOffsetSizeUpDown.Location = new System.Drawing.Point(70, 152); - this.PathNodeLinkOffsetSizeUpDown.Maximum = new decimal(new int[] { - 7, - 0, - 0, - 0}); - this.PathNodeLinkOffsetSizeUpDown.Name = "PathNodeLinkOffsetSizeUpDown"; - this.PathNodeLinkOffsetSizeUpDown.Size = new System.Drawing.Size(57, 20); - this.PathNodeLinkOffsetSizeUpDown.TabIndex = 39; - this.PathNodeLinkOffsetSizeUpDown.ValueChanged += new System.EventHandler(this.PathNodeLinkOffsetSizeUpDown_ValueChanged); - // - // label61 - // - this.label61.AutoSize = true; - this.label61.Location = new System.Drawing.Point(6, 154); - this.label61.Name = "label61"; - this.label61.Size = new System.Drawing.Size(59, 13); - this.label61.TabIndex = 38; - this.label61.Text = "Offset size:"; - // - // PathNodeLinkFlags11CheckBox - // - this.PathNodeLinkFlags11CheckBox.AutoSize = true; - this.PathNodeLinkFlags11CheckBox.Location = new System.Drawing.Point(6, 45); - this.PathNodeLinkFlags11CheckBox.Name = "PathNodeLinkFlags11CheckBox"; - this.PathNodeLinkFlags11CheckBox.Size = new System.Drawing.Size(72, 17); - this.PathNodeLinkFlags11CheckBox.TabIndex = 30; - this.PathNodeLinkFlags11CheckBox.Text = "Unused 1"; - this.PathNodeLinkFlags11CheckBox.UseVisualStyleBackColor = true; - this.PathNodeLinkFlags11CheckBox.CheckedChanged += new System.EventHandler(this.PathNodeLinkFlags11CheckBox_CheckedChanged); - // - // PathNodeLinkFlags18CheckBox - // - this.PathNodeLinkFlags18CheckBox.AutoSize = true; - this.PathNodeLinkFlags18CheckBox.Location = new System.Drawing.Point(6, 129); - this.PathNodeLinkFlags18CheckBox.Name = "PathNodeLinkFlags18CheckBox"; - this.PathNodeLinkFlags18CheckBox.Size = new System.Drawing.Size(98, 17); - this.PathNodeLinkFlags18CheckBox.TabIndex = 37; - this.PathNodeLinkFlags18CheckBox.Text = "Negative offset"; - this.PathNodeLinkFlags18CheckBox.UseVisualStyleBackColor = true; - this.PathNodeLinkFlags18CheckBox.CheckedChanged += new System.EventHandler(this.PathNodeLinkFlags18CheckBox_CheckedChanged); - // - // PathNodeLinkFlags12CheckBox - // - this.PathNodeLinkFlags12CheckBox.AutoSize = true; - this.PathNodeLinkFlags12CheckBox.Location = new System.Drawing.Point(6, 66); - this.PathNodeLinkFlags12CheckBox.Name = "PathNodeLinkFlags12CheckBox"; - this.PathNodeLinkFlags12CheckBox.Size = new System.Drawing.Size(81, 17); - this.PathNodeLinkFlags12CheckBox.TabIndex = 31; - this.PathNodeLinkFlags12CheckBox.Text = "Unknown 1"; - this.PathNodeLinkFlags12CheckBox.UseVisualStyleBackColor = true; - this.PathNodeLinkFlags12CheckBox.CheckedChanged += new System.EventHandler(this.PathNodeLinkFlags12CheckBox_CheckedChanged); - // - // PathNodeLinkFlags13CheckBox - // - this.PathNodeLinkFlags13CheckBox.AutoSize = true; - this.PathNodeLinkFlags13CheckBox.Location = new System.Drawing.Point(6, 87); - this.PathNodeLinkFlags13CheckBox.Name = "PathNodeLinkFlags13CheckBox"; - this.PathNodeLinkFlags13CheckBox.Size = new System.Drawing.Size(73, 17); - this.PathNodeLinkFlags13CheckBox.TabIndex = 32; - this.PathNodeLinkFlags13CheckBox.Text = "Dead end"; - this.PathNodeLinkFlags13CheckBox.UseVisualStyleBackColor = true; - this.PathNodeLinkFlags13CheckBox.CheckedChanged += new System.EventHandler(this.PathNodeLinkFlags13CheckBox_CheckedChanged); - // - // PathNodeLinkFlags14CheckBox - // - this.PathNodeLinkFlags14CheckBox.AutoSize = true; - this.PathNodeLinkFlags14CheckBox.Location = new System.Drawing.Point(6, 108); - this.PathNodeLinkFlags14CheckBox.Name = "PathNodeLinkFlags14CheckBox"; - this.PathNodeLinkFlags14CheckBox.Size = new System.Drawing.Size(92, 17); - this.PathNodeLinkFlags14CheckBox.TabIndex = 33; - this.PathNodeLinkFlags14CheckBox.Text = "Dead end exit"; - this.PathNodeLinkFlags14CheckBox.UseVisualStyleBackColor = true; - this.PathNodeLinkFlags14CheckBox.CheckedChanged += new System.EventHandler(this.PathNodeLinkFlags14CheckBox_CheckedChanged); - // - // PathNodeLinkFlags1UpDown - // - this.PathNodeLinkFlags1UpDown.Location = new System.Drawing.Point(6, 19); - this.PathNodeLinkFlags1UpDown.Maximum = new decimal(new int[] { - 255, - 0, - 0, - 0}); - this.PathNodeLinkFlags1UpDown.Name = "PathNodeLinkFlags1UpDown"; - this.PathNodeLinkFlags1UpDown.Size = new System.Drawing.Size(62, 20); - this.PathNodeLinkFlags1UpDown.TabIndex = 28; - this.PathNodeLinkFlags1UpDown.ValueChanged += new System.EventHandler(this.PathNodeLinkFlags1UpDown_ValueChanged); - // - // PathNodeLinkFlags1Label - // - this.PathNodeLinkFlags1Label.AutoSize = true; - this.PathNodeLinkFlags1Label.Location = new System.Drawing.Point(74, 21); - this.PathNodeLinkFlags1Label.Name = "PathNodeLinkFlags1Label"; - this.PathNodeLinkFlags1Label.Size = new System.Drawing.Size(30, 13); - this.PathNodeLinkFlags1Label.TabIndex = 29; - this.PathNodeLinkFlags1Label.Text = "0x00"; - // - // PathLinkFlags0GroupBox - // - this.PathLinkFlags0GroupBox.Controls.Add(this.PathNodeLinkFlags04UpDown); - this.PathLinkFlags0GroupBox.Controls.Add(this.label60); - this.PathLinkFlags0GroupBox.Controls.Add(this.PathNodeLinkFlags03UpDown); - this.PathLinkFlags0GroupBox.Controls.Add(this.label58); - this.PathLinkFlags0GroupBox.Controls.Add(this.PathNodeLinkFlags01CheckBox); - this.PathLinkFlags0GroupBox.Controls.Add(this.PathNodeLinkFlags02CheckBox); - this.PathLinkFlags0GroupBox.Controls.Add(this.PathNodeLinkFlags0UpDown); - this.PathLinkFlags0GroupBox.Controls.Add(this.PathNodeLinkFlags0Label); - this.PathLinkFlags0GroupBox.Location = new System.Drawing.Point(13, 93); - this.PathLinkFlags0GroupBox.Name = "PathLinkFlags0GroupBox"; - this.PathLinkFlags0GroupBox.Size = new System.Drawing.Size(141, 141); - this.PathLinkFlags0GroupBox.TabIndex = 16; - this.PathLinkFlags0GroupBox.TabStop = false; - this.PathLinkFlags0GroupBox.Text = "Flags 0"; - // - // PathNodeLinkFlags04UpDown - // - this.PathNodeLinkFlags04UpDown.Location = new System.Drawing.Point(71, 112); - this.PathNodeLinkFlags04UpDown.Maximum = new decimal(new int[] { - 7, - 0, - 0, - 0}); - this.PathNodeLinkFlags04UpDown.Name = "PathNodeLinkFlags04UpDown"; - this.PathNodeLinkFlags04UpDown.Size = new System.Drawing.Size(57, 20); - this.PathNodeLinkFlags04UpDown.TabIndex = 32; - this.PathNodeLinkFlags04UpDown.ValueChanged += new System.EventHandler(this.PathNodeLinkFlags04UpDown_ValueChanged); - // - // label60 - // - this.label60.AutoSize = true; - this.label60.Location = new System.Drawing.Point(26, 114); - this.label60.Name = "label60"; - this.label60.Size = new System.Drawing.Size(39, 13); - this.label60.TabIndex = 31; - this.label60.Text = "Unk 2:"; - // - // PathNodeLinkFlags03UpDown - // - this.PathNodeLinkFlags03UpDown.Location = new System.Drawing.Point(71, 88); - this.PathNodeLinkFlags03UpDown.Maximum = new decimal(new int[] { - 7, - 0, - 0, - 0}); - this.PathNodeLinkFlags03UpDown.Name = "PathNodeLinkFlags03UpDown"; - this.PathNodeLinkFlags03UpDown.Size = new System.Drawing.Size(57, 20); - this.PathNodeLinkFlags03UpDown.TabIndex = 30; - this.PathNodeLinkFlags03UpDown.ValueChanged += new System.EventHandler(this.PathNodeLinkFlags03UpDown_ValueChanged); - // - // label58 - // - this.label58.AutoSize = true; - this.label58.Location = new System.Drawing.Point(26, 90); - this.label58.Name = "label58"; - this.label58.Size = new System.Drawing.Size(39, 13); - this.label58.TabIndex = 29; - this.label58.Text = "Unk 1:"; - // - // PathNodeLinkFlags01CheckBox - // - this.PathNodeLinkFlags01CheckBox.AutoSize = true; - this.PathNodeLinkFlags01CheckBox.Location = new System.Drawing.Point(6, 45); - this.PathNodeLinkFlags01CheckBox.Name = "PathNodeLinkFlags01CheckBox"; - this.PathNodeLinkFlags01CheckBox.Size = new System.Drawing.Size(70, 17); - this.PathNodeLinkFlags01CheckBox.TabIndex = 27; - this.PathNodeLinkFlags01CheckBox.Text = "Special 1"; - this.PathNodeLinkFlags01CheckBox.UseVisualStyleBackColor = true; - this.PathNodeLinkFlags01CheckBox.CheckedChanged += new System.EventHandler(this.PathNodeLinkFlags01CheckBox_CheckedChanged); - // - // PathNodeLinkFlags02CheckBox - // - this.PathNodeLinkFlags02CheckBox.AutoSize = true; - this.PathNodeLinkFlags02CheckBox.Location = new System.Drawing.Point(6, 66); - this.PathNodeLinkFlags02CheckBox.Name = "PathNodeLinkFlags02CheckBox"; - this.PathNodeLinkFlags02CheckBox.Size = new System.Drawing.Size(86, 17); - this.PathNodeLinkFlags02CheckBox.TabIndex = 28; - this.PathNodeLinkFlags02CheckBox.Text = "Scripted unk"; - this.PathNodeLinkFlags02CheckBox.UseVisualStyleBackColor = true; - this.PathNodeLinkFlags02CheckBox.CheckedChanged += new System.EventHandler(this.PathNodeLinkFlags02CheckBox_CheckedChanged); - // - // PathNodeLinkFlags0UpDown - // - this.PathNodeLinkFlags0UpDown.Location = new System.Drawing.Point(6, 19); - this.PathNodeLinkFlags0UpDown.Maximum = new decimal(new int[] { - 255, - 0, - 0, - 0}); - this.PathNodeLinkFlags0UpDown.Name = "PathNodeLinkFlags0UpDown"; - this.PathNodeLinkFlags0UpDown.Size = new System.Drawing.Size(62, 20); - this.PathNodeLinkFlags0UpDown.TabIndex = 25; - this.PathNodeLinkFlags0UpDown.ValueChanged += new System.EventHandler(this.PathNodeLinkFlags0UpDown_ValueChanged); - // - // PathNodeLinkFlags0Label - // - this.PathNodeLinkFlags0Label.AutoSize = true; - this.PathNodeLinkFlags0Label.Location = new System.Drawing.Point(74, 21); - this.PathNodeLinkFlags0Label.Name = "PathNodeLinkFlags0Label"; - this.PathNodeLinkFlags0Label.Size = new System.Drawing.Size(30, 13); - this.PathNodeLinkFlags0Label.TabIndex = 26; - this.PathNodeLinkFlags0Label.Text = "0x00"; - // - // PathNodeLinkageStatusLabel - // - this.PathNodeLinkageStatusLabel.AutoSize = true; - this.PathNodeLinkageStatusLabel.Location = new System.Drawing.Point(74, 33); - this.PathNodeLinkageStatusLabel.Name = "PathNodeLinkageStatusLabel"; - this.PathNodeLinkageStatusLabel.Size = new System.Drawing.Size(10, 13); - this.PathNodeLinkageStatusLabel.TabIndex = 13; - this.PathNodeLinkageStatusLabel.Text = "-"; - // - // PathNodeLinkLengthUpDown - // - this.PathNodeLinkLengthUpDown.Location = new System.Drawing.Point(74, 57); - this.PathNodeLinkLengthUpDown.Maximum = new decimal(new int[] { - 255, - 0, - 0, - 0}); - this.PathNodeLinkLengthUpDown.Name = "PathNodeLinkLengthUpDown"; - this.PathNodeLinkLengthUpDown.Size = new System.Drawing.Size(74, 20); - this.PathNodeLinkLengthUpDown.TabIndex = 15; - this.PathNodeLinkLengthUpDown.ValueChanged += new System.EventHandler(this.PathNodeLinkLengthUpDown_ValueChanged); - // - // label57 - // - this.label57.AutoSize = true; - this.label57.Location = new System.Drawing.Point(6, 59); - this.label57.Name = "label57"; - this.label57.Size = new System.Drawing.Size(62, 13); - this.label57.TabIndex = 14; - this.label57.Text = "Link length:"; - // - // PathNodeLinkNodeIDUpDown - // - this.PathNodeLinkNodeIDUpDown.Location = new System.Drawing.Point(219, 8); - this.PathNodeLinkNodeIDUpDown.Maximum = new decimal(new int[] { - 100000, - 0, - 0, - 0}); - this.PathNodeLinkNodeIDUpDown.Name = "PathNodeLinkNodeIDUpDown"; - this.PathNodeLinkNodeIDUpDown.Size = new System.Drawing.Size(74, 20); - this.PathNodeLinkNodeIDUpDown.TabIndex = 12; - this.PathNodeLinkNodeIDUpDown.ValueChanged += new System.EventHandler(this.PathNodeLinkNodeIDUpDown_ValueChanged); - // - // label51 - // - this.label51.AutoSize = true; - this.label51.Location = new System.Drawing.Point(163, 10); - this.label51.Name = "label51"; - this.label51.Size = new System.Drawing.Size(50, 13); - this.label51.TabIndex = 11; - this.label51.Text = "Node ID:"; - // - // PathNodeLinkAreaIDUpDown - // - this.PathNodeLinkAreaIDUpDown.Location = new System.Drawing.Point(74, 8); - this.PathNodeLinkAreaIDUpDown.Maximum = new decimal(new int[] { - 1023, - 0, - 0, - 0}); - this.PathNodeLinkAreaIDUpDown.Name = "PathNodeLinkAreaIDUpDown"; - this.PathNodeLinkAreaIDUpDown.Size = new System.Drawing.Size(74, 20); - this.PathNodeLinkAreaIDUpDown.TabIndex = 10; - this.PathNodeLinkAreaIDUpDown.ValueChanged += new System.EventHandler(this.PathNodeLinkAreaIDUpDown_ValueChanged); - // - // label54 - // - this.label54.AutoSize = true; - this.label54.Location = new System.Drawing.Point(22, 10); - this.label54.Name = "label54"; - this.label54.Size = new System.Drawing.Size(46, 13); - this.label54.TabIndex = 9; - this.label54.Text = "Area ID:"; - // - // PathNodeJunctionTabPage - // - this.PathNodeJunctionTabPage.Controls.Add(this.label78); - this.PathNodeJunctionTabPage.Controls.Add(this.PathNodeJunctionPanel); - this.PathNodeJunctionTabPage.Controls.Add(this.PathNodeJunctionEnableCheckBox); - this.PathNodeJunctionTabPage.Location = new System.Drawing.Point(4, 22); - this.PathNodeJunctionTabPage.Name = "PathNodeJunctionTabPage"; - this.PathNodeJunctionTabPage.Padding = new System.Windows.Forms.Padding(3); - this.PathNodeJunctionTabPage.Size = new System.Drawing.Size(499, 414); - this.PathNodeJunctionTabPage.TabIndex = 1; - this.PathNodeJunctionTabPage.Text = "Junction"; - this.PathNodeJunctionTabPage.UseVisualStyleBackColor = true; - // - // label78 - // - this.label78.AutoSize = true; - this.label78.Location = new System.Drawing.Point(182, 7); - this.label78.Name = "label78"; - this.label78.Size = new System.Drawing.Size(113, 13); - this.label78.TabIndex = 51; - this.label78.Text = "Height map byte array:"; - // - // PathNodeJunctionPanel - // - this.PathNodeJunctionPanel.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.PathNodeJunctionPanel.Controls.Add(this.PathNodeJunctionPosYUpDown); - this.PathNodeJunctionPanel.Controls.Add(this.label59); - this.PathNodeJunctionPanel.Controls.Add(this.PathNodeJunctionPosXUpDown); - this.PathNodeJunctionPanel.Controls.Add(this.label69); - this.PathNodeJunctionPanel.Controls.Add(this.PathNodeJunctionHeightmapBytesTextBox); - this.PathNodeJunctionPanel.Controls.Add(this.PathNodeJunctionHeightmapDimYUpDown); - this.PathNodeJunctionPanel.Controls.Add(this.label77); - this.PathNodeJunctionPanel.Controls.Add(this.PathNodeJunctionHeightmapDimXUpDown); - this.PathNodeJunctionPanel.Controls.Add(this.label76); - this.PathNodeJunctionPanel.Controls.Add(this.PathNodeJunctionMinZUpDown); - this.PathNodeJunctionPanel.Controls.Add(this.label67); - this.PathNodeJunctionPanel.Controls.Add(this.PathNodeJunctionMaxZUpDown); - this.PathNodeJunctionPanel.Controls.Add(this.label65); - this.PathNodeJunctionPanel.Enabled = false; - this.PathNodeJunctionPanel.Location = new System.Drawing.Point(6, 29); - this.PathNodeJunctionPanel.Name = "PathNodeJunctionPanel"; - this.PathNodeJunctionPanel.Size = new System.Drawing.Size(490, 379); - this.PathNodeJunctionPanel.TabIndex = 1; - // - // PathNodeJunctionPosYUpDown - // - this.PathNodeJunctionPosYUpDown.Location = new System.Drawing.Point(57, 81); - this.PathNodeJunctionPosYUpDown.Maximum = new decimal(new int[] { - 32767, - 0, - 0, - 0}); - this.PathNodeJunctionPosYUpDown.Minimum = new decimal(new int[] { - 32768, - 0, - 0, - -2147483648}); - this.PathNodeJunctionPosYUpDown.Name = "PathNodeJunctionPosYUpDown"; - this.PathNodeJunctionPosYUpDown.Size = new System.Drawing.Size(86, 20); - this.PathNodeJunctionPosYUpDown.TabIndex = 53; - this.PathNodeJunctionPosYUpDown.ValueChanged += new System.EventHandler(this.PathNodeJunctionPosYUpDown_ValueChanged); - // - // label59 - // - this.label59.AutoSize = true; - this.label59.Location = new System.Drawing.Point(13, 83); - this.label59.Name = "label59"; - this.label59.Size = new System.Drawing.Size(38, 13); - this.label59.TabIndex = 54; - this.label59.Text = "Pos Y:"; - // - // PathNodeJunctionPosXUpDown - // - this.PathNodeJunctionPosXUpDown.Location = new System.Drawing.Point(57, 55); - this.PathNodeJunctionPosXUpDown.Maximum = new decimal(new int[] { - 32767, - 0, - 0, - 0}); - this.PathNodeJunctionPosXUpDown.Minimum = new decimal(new int[] { - 32768, - 0, - 0, - -2147483648}); - this.PathNodeJunctionPosXUpDown.Name = "PathNodeJunctionPosXUpDown"; - this.PathNodeJunctionPosXUpDown.Size = new System.Drawing.Size(86, 20); - this.PathNodeJunctionPosXUpDown.TabIndex = 51; - this.PathNodeJunctionPosXUpDown.ValueChanged += new System.EventHandler(this.PathNodeJunctionPosXUpDown_ValueChanged); - // - // label69 - // - this.label69.AutoSize = true; - this.label69.Location = new System.Drawing.Point(13, 57); - this.label69.Name = "label69"; - this.label69.Size = new System.Drawing.Size(38, 13); - this.label69.TabIndex = 52; - this.label69.Text = "Pos X:"; - // - // PathNodeJunctionHeightmapBytesTextBox - // - this.PathNodeJunctionHeightmapBytesTextBox.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.PathNodeJunctionHeightmapBytesTextBox.Location = new System.Drawing.Point(159, 3); - this.PathNodeJunctionHeightmapBytesTextBox.Multiline = true; - this.PathNodeJunctionHeightmapBytesTextBox.Name = "PathNodeJunctionHeightmapBytesTextBox"; - this.PathNodeJunctionHeightmapBytesTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Both; - this.PathNodeJunctionHeightmapBytesTextBox.Size = new System.Drawing.Size(328, 373); - this.PathNodeJunctionHeightmapBytesTextBox.TabIndex = 50; - this.PathNodeJunctionHeightmapBytesTextBox.WordWrap = false; - this.PathNodeJunctionHeightmapBytesTextBox.TextChanged += new System.EventHandler(this.PathNodeJunctionHeightmapBytesTextBox_TextChanged); - // - // PathNodeJunctionHeightmapDimYUpDown - // - this.PathNodeJunctionHeightmapDimYUpDown.Location = new System.Drawing.Point(57, 133); - this.PathNodeJunctionHeightmapDimYUpDown.Maximum = new decimal(new int[] { - 255, - 0, - 0, - 0}); - this.PathNodeJunctionHeightmapDimYUpDown.Minimum = new decimal(new int[] { - 1, - 0, - 0, - 0}); - this.PathNodeJunctionHeightmapDimYUpDown.Name = "PathNodeJunctionHeightmapDimYUpDown"; - this.PathNodeJunctionHeightmapDimYUpDown.Size = new System.Drawing.Size(62, 20); - this.PathNodeJunctionHeightmapDimYUpDown.TabIndex = 49; - this.PathNodeJunctionHeightmapDimYUpDown.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - this.PathNodeJunctionHeightmapDimYUpDown.ValueChanged += new System.EventHandler(this.PathNodeJunctionHeightmapDimYUpDown_ValueChanged); - // - // label77 - // - this.label77.AutoSize = true; - this.label77.Location = new System.Drawing.Point(11, 135); - this.label77.Name = "label77"; - this.label77.Size = new System.Drawing.Size(40, 13); - this.label77.TabIndex = 48; - this.label77.Text = "Size Y:"; - // - // PathNodeJunctionHeightmapDimXUpDown - // - this.PathNodeJunctionHeightmapDimXUpDown.Location = new System.Drawing.Point(57, 107); - this.PathNodeJunctionHeightmapDimXUpDown.Maximum = new decimal(new int[] { - 255, - 0, - 0, - 0}); - this.PathNodeJunctionHeightmapDimXUpDown.Minimum = new decimal(new int[] { - 1, - 0, - 0, - 0}); - this.PathNodeJunctionHeightmapDimXUpDown.Name = "PathNodeJunctionHeightmapDimXUpDown"; - this.PathNodeJunctionHeightmapDimXUpDown.Size = new System.Drawing.Size(62, 20); - this.PathNodeJunctionHeightmapDimXUpDown.TabIndex = 47; - this.PathNodeJunctionHeightmapDimXUpDown.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - this.PathNodeJunctionHeightmapDimXUpDown.ValueChanged += new System.EventHandler(this.PathNodeJunctionHeightmapDimXUpDown_ValueChanged); - // - // label76 - // - this.label76.AutoSize = true; - this.label76.Location = new System.Drawing.Point(11, 109); - this.label76.Name = "label76"; - this.label76.Size = new System.Drawing.Size(40, 13); - this.label76.TabIndex = 46; - this.label76.Text = "Size X:"; - // - // PathNodeJunctionMinZUpDown - // - this.PathNodeJunctionMinZUpDown.Location = new System.Drawing.Point(57, 29); - this.PathNodeJunctionMinZUpDown.Maximum = new decimal(new int[] { - 32767, - 0, - 0, - 0}); - this.PathNodeJunctionMinZUpDown.Minimum = new decimal(new int[] { - 32768, - 0, - 0, - -2147483648}); - this.PathNodeJunctionMinZUpDown.Name = "PathNodeJunctionMinZUpDown"; - this.PathNodeJunctionMinZUpDown.Size = new System.Drawing.Size(86, 20); - this.PathNodeJunctionMinZUpDown.TabIndex = 32; - this.PathNodeJunctionMinZUpDown.ValueChanged += new System.EventHandler(this.PathNodeJunctionMinZUpDown_ValueChanged); - // - // label67 - // - this.label67.AutoSize = true; - this.label67.Location = new System.Drawing.Point(14, 32); - this.label67.Name = "label67"; - this.label67.Size = new System.Drawing.Size(37, 13); - this.label67.TabIndex = 33; - this.label67.Text = "Min Z:"; - // - // PathNodeJunctionMaxZUpDown - // - this.PathNodeJunctionMaxZUpDown.Location = new System.Drawing.Point(57, 3); - this.PathNodeJunctionMaxZUpDown.Maximum = new decimal(new int[] { - 32767, - 0, - 0, - 0}); - this.PathNodeJunctionMaxZUpDown.Minimum = new decimal(new int[] { - 32768, - 0, - 0, - -2147483648}); - this.PathNodeJunctionMaxZUpDown.Name = "PathNodeJunctionMaxZUpDown"; - this.PathNodeJunctionMaxZUpDown.Size = new System.Drawing.Size(86, 20); - this.PathNodeJunctionMaxZUpDown.TabIndex = 30; - this.PathNodeJunctionMaxZUpDown.ValueChanged += new System.EventHandler(this.PathNodeJunctionMaxZUpDown_ValueChanged); - // - // label65 - // - this.label65.AutoSize = true; - this.label65.Location = new System.Drawing.Point(11, 5); - this.label65.Name = "label65"; - this.label65.Size = new System.Drawing.Size(40, 13); - this.label65.TabIndex = 31; - this.label65.Text = "Max Z:"; - // - // PathNodeJunctionEnableCheckBox - // - this.PathNodeJunctionEnableCheckBox.AutoSize = true; - this.PathNodeJunctionEnableCheckBox.Location = new System.Drawing.Point(6, 6); - this.PathNodeJunctionEnableCheckBox.Name = "PathNodeJunctionEnableCheckBox"; - this.PathNodeJunctionEnableCheckBox.Size = new System.Drawing.Size(156, 17); - this.PathNodeJunctionEnableCheckBox.TabIndex = 0; - this.PathNodeJunctionEnableCheckBox.Text = "Enable Junction Heightmap"; - this.PathNodeJunctionEnableCheckBox.UseVisualStyleBackColor = true; - this.PathNodeJunctionEnableCheckBox.CheckedChanged += new System.EventHandler(this.PathNodeJunctionEnableCheckBox_CheckedChanged); - // - // YnvTabPage - // - this.YnvTabPage.Controls.Add(this.YnvTabControl); - this.YnvTabPage.Location = new System.Drawing.Point(4, 22); - this.YnvTabPage.Name = "YnvTabPage"; - this.YnvTabPage.Size = new System.Drawing.Size(521, 472); - this.YnvTabPage.TabIndex = 4; - this.YnvTabPage.Text = "Nav Mesh"; - this.YnvTabPage.UseVisualStyleBackColor = true; - // - // YnvTabControl - // - this.YnvTabControl.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.YnvTabControl.Controls.Add(this.YnvYnvTabPage); - this.YnvTabControl.Controls.Add(this.YnvPolyTabPage); - this.YnvTabControl.Controls.Add(this.YnvPortalTabPage); - this.YnvTabControl.Location = new System.Drawing.Point(0, 3); - this.YnvTabControl.Name = "YnvTabControl"; - this.YnvTabControl.SelectedIndex = 0; - this.YnvTabControl.Size = new System.Drawing.Size(518, 469); - this.YnvTabControl.TabIndex = 0; - // - // YnvYnvTabPage - // - this.YnvYnvTabPage.Controls.Add(this.YnvPanel); - this.YnvYnvTabPage.Location = new System.Drawing.Point(4, 22); - this.YnvYnvTabPage.Name = "YnvYnvTabPage"; - this.YnvYnvTabPage.Padding = new System.Windows.Forms.Padding(3); - this.YnvYnvTabPage.Size = new System.Drawing.Size(510, 443); - this.YnvYnvTabPage.TabIndex = 0; - this.YnvYnvTabPage.Text = "Ynv"; - this.YnvYnvTabPage.UseVisualStyleBackColor = true; - // - // YnvPanel - // - this.YnvPanel.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.YnvPanel.Controls.Add(this.YnvAABBSizeTextBox); - this.YnvPanel.Controls.Add(this.label91); - this.YnvPanel.Controls.Add(this.label89); - this.YnvPanel.Controls.Add(this.YnvAreaIDYUpDown); - this.YnvPanel.Controls.Add(this.label90); - this.YnvPanel.Controls.Add(this.YnvAreaIDXUpDown); - this.YnvPanel.Controls.Add(this.YnvAreaIDInfoLabel); - this.YnvPanel.Controls.Add(this.label92); - this.YnvPanel.Enabled = false; - this.YnvPanel.Location = new System.Drawing.Point(0, 0); - this.YnvPanel.Name = "YnvPanel"; - this.YnvPanel.Size = new System.Drawing.Size(510, 443); - this.YnvPanel.TabIndex = 0; - // - // YnvAABBSizeTextBox - // - this.YnvAABBSizeTextBox.Location = new System.Drawing.Point(107, 45); - this.YnvAABBSizeTextBox.Name = "YnvAABBSizeTextBox"; - this.YnvAABBSizeTextBox.Size = new System.Drawing.Size(138, 20); - this.YnvAABBSizeTextBox.TabIndex = 29; - // - // label91 - // - this.label91.AutoSize = true; - this.label91.Location = new System.Drawing.Point(40, 48); - this.label91.Name = "label91"; - this.label91.Size = new System.Drawing.Size(61, 13); - this.label91.TabIndex = 30; - this.label91.Text = "AABB Size:"; - // - // label89 - // - this.label89.AutoSize = true; - this.label89.Location = new System.Drawing.Point(166, 11); - this.label89.Name = "label89"; - this.label89.Size = new System.Drawing.Size(17, 13); - this.label89.TabIndex = 25; - this.label89.Text = "Y:"; - // - // YnvAreaIDYUpDown - // - this.YnvAreaIDYUpDown.Location = new System.Drawing.Point(189, 9); - this.YnvAreaIDYUpDown.Maximum = new decimal(new int[] { - 31, - 0, - 0, - 0}); - this.YnvAreaIDYUpDown.Name = "YnvAreaIDYUpDown"; - this.YnvAreaIDYUpDown.Size = new System.Drawing.Size(48, 20); - this.YnvAreaIDYUpDown.TabIndex = 24; - // - // label90 - // - this.label90.AutoSize = true; - this.label90.Location = new System.Drawing.Point(84, 11); - this.label90.Name = "label90"; - this.label90.Size = new System.Drawing.Size(17, 13); - this.label90.TabIndex = 23; - this.label90.Text = "X:"; - // - // YnvAreaIDXUpDown - // - this.YnvAreaIDXUpDown.Location = new System.Drawing.Point(107, 9); - this.YnvAreaIDXUpDown.Maximum = new decimal(new int[] { - 31, - 0, - 0, - 0}); - this.YnvAreaIDXUpDown.Name = "YnvAreaIDXUpDown"; - this.YnvAreaIDXUpDown.Size = new System.Drawing.Size(48, 20); - this.YnvAreaIDXUpDown.TabIndex = 22; - // - // YnvAreaIDInfoLabel - // - this.YnvAreaIDInfoLabel.AutoSize = true; - this.YnvAreaIDInfoLabel.Location = new System.Drawing.Point(254, 11); - this.YnvAreaIDInfoLabel.Name = "YnvAreaIDInfoLabel"; - this.YnvAreaIDInfoLabel.Size = new System.Drawing.Size(30, 13); - this.YnvAreaIDInfoLabel.TabIndex = 21; - this.YnvAreaIDInfoLabel.Text = "ID: 0"; - // - // label92 - // - this.label92.AutoSize = true; - this.label92.Location = new System.Drawing.Point(28, 11); - this.label92.Name = "label92"; - this.label92.Size = new System.Drawing.Size(46, 13); - this.label92.TabIndex = 20; - this.label92.Text = "Area ID:"; - // - // YnvPolyTabPage - // - this.YnvPolyTabPage.Controls.Add(this.YnvPolygonPanel); - this.YnvPolyTabPage.Location = new System.Drawing.Point(4, 22); - this.YnvPolyTabPage.Name = "YnvPolyTabPage"; - this.YnvPolyTabPage.Padding = new System.Windows.Forms.Padding(3); - this.YnvPolyTabPage.Size = new System.Drawing.Size(510, 443); - this.YnvPolyTabPage.TabIndex = 1; - this.YnvPolyTabPage.Text = "Polygon"; - this.YnvPolyTabPage.UseVisualStyleBackColor = true; - // - // YnvPolygonPanel - // - this.YnvPolygonPanel.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.YnvPolygonPanel.Enabled = false; - this.YnvPolygonPanel.Location = new System.Drawing.Point(0, 0); - this.YnvPolygonPanel.Name = "YnvPolygonPanel"; - this.YnvPolygonPanel.Size = new System.Drawing.Size(510, 443); - this.YnvPolygonPanel.TabIndex = 1; - // - // YnvPortalTabPage - // - this.YnvPortalTabPage.Controls.Add(this.YnvPortalPanel); - this.YnvPortalTabPage.Location = new System.Drawing.Point(4, 22); - this.YnvPortalTabPage.Name = "YnvPortalTabPage"; - this.YnvPortalTabPage.Size = new System.Drawing.Size(510, 443); - this.YnvPortalTabPage.TabIndex = 2; - this.YnvPortalTabPage.Text = "Portal"; - this.YnvPortalTabPage.UseVisualStyleBackColor = true; - // - // YnvPortalPanel - // - this.YnvPortalPanel.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.YnvPortalPanel.Enabled = false; - this.YnvPortalPanel.Location = new System.Drawing.Point(0, 0); - this.YnvPortalPanel.Name = "YnvPortalPanel"; - this.YnvPortalPanel.Size = new System.Drawing.Size(510, 443); - this.YnvPortalPanel.TabIndex = 1; - // - // TrainsTabPage - // - this.TrainsTabPage.Controls.Add(this.TrainsTabControl); - this.TrainsTabPage.Location = new System.Drawing.Point(4, 22); - this.TrainsTabPage.Name = "TrainsTabPage"; - this.TrainsTabPage.Size = new System.Drawing.Size(521, 472); - this.TrainsTabPage.TabIndex = 3; - this.TrainsTabPage.Text = "Trains"; - this.TrainsTabPage.UseVisualStyleBackColor = true; - // - // TrainsTabControl - // - this.TrainsTabControl.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.TrainsTabControl.Controls.Add(this.TrainTrackTabPage); - this.TrainsTabControl.Controls.Add(this.TrainNodeTabPage); - this.TrainsTabControl.Location = new System.Drawing.Point(0, 3); - this.TrainsTabControl.Name = "TrainsTabControl"; - this.TrainsTabControl.SelectedIndex = 0; - this.TrainsTabControl.Size = new System.Drawing.Size(518, 469); - this.TrainsTabControl.TabIndex = 0; - // - // TrainTrackTabPage - // - this.TrainTrackTabPage.Controls.Add(this.TrainTrackFilePanel); - this.TrainTrackTabPage.Location = new System.Drawing.Point(4, 22); - this.TrainTrackTabPage.Name = "TrainTrackTabPage"; - this.TrainTrackTabPage.Padding = new System.Windows.Forms.Padding(3); - this.TrainTrackTabPage.Size = new System.Drawing.Size(510, 443); - this.TrainTrackTabPage.TabIndex = 0; - this.TrainTrackTabPage.Text = "Track File"; - this.TrainTrackTabPage.UseVisualStyleBackColor = true; - // - // TrainTrackFilePanel - // - this.TrainTrackFilePanel.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.TrainTrackFilePanel.Controls.Add(this.TrainTrackInfoLabel); - this.TrainTrackFilePanel.Controls.Add(this.label86); - this.TrainTrackFilePanel.Controls.Add(this.TrainTrackBrakingDistTextBox); - this.TrainTrackFilePanel.Controls.Add(this.label85); - this.TrainTrackFilePanel.Controls.Add(this.TrainTrackSpeedTextBox); - this.TrainTrackFilePanel.Controls.Add(this.TrainTrackMPStopsAtStationsCheckBox); - this.TrainTrackFilePanel.Controls.Add(this.TrainTrackStopsAtStationsCheckBox); - this.TrainTrackFilePanel.Controls.Add(this.TrainTrackIsPingPongCheckBox); - this.TrainTrackFilePanel.Controls.Add(this.label84); - this.TrainTrackFilePanel.Controls.Add(this.TrainTrackConfigNameTextBox); - this.TrainTrackFilePanel.Controls.Add(this.label83); - this.TrainTrackFilePanel.Controls.Add(this.TrainTrackFilenameTextBox); - this.TrainTrackFilePanel.Controls.Add(this.label74); - this.TrainTrackFilePanel.Controls.Add(this.TrainTrackProjectPathTextBox); - this.TrainTrackFilePanel.Controls.Add(this.label79); - this.TrainTrackFilePanel.Controls.Add(this.TrainTrackFilePathTextBox); - this.TrainTrackFilePanel.Controls.Add(this.label80); - this.TrainTrackFilePanel.Controls.Add(this.TrainTrackRpfPathTextBox); - this.TrainTrackFilePanel.Enabled = false; - this.TrainTrackFilePanel.Location = new System.Drawing.Point(0, 0); - this.TrainTrackFilePanel.Name = "TrainTrackFilePanel"; - this.TrainTrackFilePanel.Size = new System.Drawing.Size(510, 443); - this.TrainTrackFilePanel.TabIndex = 1; - // - // TrainTrackInfoLabel - // - this.TrainTrackInfoLabel.AutoSize = true; - this.TrainTrackInfoLabel.Location = new System.Drawing.Point(97, 133); - this.TrainTrackInfoLabel.Name = "TrainTrackInfoLabel"; - this.TrainTrackInfoLabel.Size = new System.Drawing.Size(10, 13); - this.TrainTrackInfoLabel.TabIndex = 36; - this.TrainTrackInfoLabel.Text = "-"; - // - // label86 - // - this.label86.AutoSize = true; - this.label86.Location = new System.Drawing.Point(282, 84); - this.label86.Name = "label86"; - this.label86.Size = new System.Drawing.Size(63, 13); - this.label86.TabIndex = 32; - this.label86.Text = "brakingDist:"; - // - // TrainTrackBrakingDistTextBox - // - this.TrainTrackBrakingDistTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.TrainTrackBrakingDistTextBox.Location = new System.Drawing.Point(351, 81); - this.TrainTrackBrakingDistTextBox.Name = "TrainTrackBrakingDistTextBox"; - this.TrainTrackBrakingDistTextBox.ReadOnly = true; - this.TrainTrackBrakingDistTextBox.Size = new System.Drawing.Size(107, 20); - this.TrainTrackBrakingDistTextBox.TabIndex = 31; - // - // label85 - // - this.label85.AutoSize = true; - this.label85.Location = new System.Drawing.Point(55, 84); - this.label85.Name = "label85"; - this.label85.Size = new System.Drawing.Size(39, 13); - this.label85.TabIndex = 30; - this.label85.Text = "speed:"; - // - // TrainTrackSpeedTextBox - // - this.TrainTrackSpeedTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.TrainTrackSpeedTextBox.Location = new System.Drawing.Point(100, 81); - this.TrainTrackSpeedTextBox.Name = "TrainTrackSpeedTextBox"; - this.TrainTrackSpeedTextBox.ReadOnly = true; - this.TrainTrackSpeedTextBox.Size = new System.Drawing.Size(107, 20); - this.TrainTrackSpeedTextBox.TabIndex = 29; - // - // TrainTrackMPStopsAtStationsCheckBox - // - this.TrainTrackMPStopsAtStationsCheckBox.AutoSize = true; - this.TrainTrackMPStopsAtStationsCheckBox.Enabled = false; - this.TrainTrackMPStopsAtStationsCheckBox.Location = new System.Drawing.Point(351, 58); - this.TrainTrackMPStopsAtStationsCheckBox.Name = "TrainTrackMPStopsAtStationsCheckBox"; - this.TrainTrackMPStopsAtStationsCheckBox.Size = new System.Drawing.Size(115, 17); - this.TrainTrackMPStopsAtStationsCheckBox.TabIndex = 28; - this.TrainTrackMPStopsAtStationsCheckBox.Text = "MPstopsAtStations"; - this.TrainTrackMPStopsAtStationsCheckBox.UseVisualStyleBackColor = true; - // - // TrainTrackStopsAtStationsCheckBox - // - this.TrainTrackStopsAtStationsCheckBox.AutoSize = true; - this.TrainTrackStopsAtStationsCheckBox.Enabled = false; - this.TrainTrackStopsAtStationsCheckBox.Location = new System.Drawing.Point(225, 58); - this.TrainTrackStopsAtStationsCheckBox.Name = "TrainTrackStopsAtStationsCheckBox"; - this.TrainTrackStopsAtStationsCheckBox.Size = new System.Drawing.Size(99, 17); - this.TrainTrackStopsAtStationsCheckBox.TabIndex = 27; - this.TrainTrackStopsAtStationsCheckBox.Text = "stopsAtStations"; - this.TrainTrackStopsAtStationsCheckBox.UseVisualStyleBackColor = true; - // - // TrainTrackIsPingPongCheckBox - // - this.TrainTrackIsPingPongCheckBox.AutoSize = true; - this.TrainTrackIsPingPongCheckBox.Enabled = false; - this.TrainTrackIsPingPongCheckBox.Location = new System.Drawing.Point(100, 58); - this.TrainTrackIsPingPongCheckBox.Name = "TrainTrackIsPingPongCheckBox"; - this.TrainTrackIsPingPongCheckBox.Size = new System.Drawing.Size(107, 17); - this.TrainTrackIsPingPongCheckBox.TabIndex = 26; - this.TrainTrackIsPingPongCheckBox.Text = "isPingPongTrack"; - this.TrainTrackIsPingPongCheckBox.UseVisualStyleBackColor = true; - // - // label84 - // - this.label84.AutoSize = true; - this.label84.Location = new System.Drawing.Point(6, 35); - this.label84.Name = "label84"; - this.label84.Size = new System.Drawing.Size(88, 13); - this.label84.TabIndex = 25; - this.label84.Text = "trainConfigName:"; - // - // TrainTrackConfigNameTextBox - // - this.TrainTrackConfigNameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.TrainTrackConfigNameTextBox.Location = new System.Drawing.Point(100, 32); - this.TrainTrackConfigNameTextBox.Name = "TrainTrackConfigNameTextBox"; - this.TrainTrackConfigNameTextBox.ReadOnly = true; - this.TrainTrackConfigNameTextBox.Size = new System.Drawing.Size(366, 20); - this.TrainTrackConfigNameTextBox.TabIndex = 24; - // - // label83 - // - this.label83.AutoSize = true; - this.label83.Location = new System.Drawing.Point(45, 9); - this.label83.Name = "label83"; - this.label83.Size = new System.Drawing.Size(49, 13); - this.label83.TabIndex = 23; - this.label83.Text = "filename:"; - // - // TrainTrackFilenameTextBox - // - this.TrainTrackFilenameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.TrainTrackFilenameTextBox.Location = new System.Drawing.Point(100, 6); - this.TrainTrackFilenameTextBox.Name = "TrainTrackFilenameTextBox"; - this.TrainTrackFilenameTextBox.ReadOnly = true; - this.TrainTrackFilenameTextBox.Size = new System.Drawing.Size(366, 20); - this.TrainTrackFilenameTextBox.TabIndex = 22; - // - // label74 - // - this.label74.AutoSize = true; - this.label74.Location = new System.Drawing.Point(6, 254); - this.label74.Name = "label74"; - this.label74.Size = new System.Drawing.Size(68, 13); - this.label74.TabIndex = 21; - this.label74.Text = "Project Path:"; - // - // TrainTrackProjectPathTextBox - // - this.TrainTrackProjectPathTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.TrainTrackProjectPathTextBox.Location = new System.Drawing.Point(80, 251); - this.TrainTrackProjectPathTextBox.Name = "TrainTrackProjectPathTextBox"; - this.TrainTrackProjectPathTextBox.ReadOnly = true; - this.TrainTrackProjectPathTextBox.Size = new System.Drawing.Size(386, 20); - this.TrainTrackProjectPathTextBox.TabIndex = 35; - // - // label79 - // - this.label79.AutoSize = true; - this.label79.Location = new System.Drawing.Point(6, 228); - this.label79.Name = "label79"; - this.label79.Size = new System.Drawing.Size(51, 13); - this.label79.TabIndex = 19; - this.label79.Text = "File Path:"; - // - // TrainTrackFilePathTextBox - // - this.TrainTrackFilePathTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.TrainTrackFilePathTextBox.Location = new System.Drawing.Point(80, 225); - this.TrainTrackFilePathTextBox.Name = "TrainTrackFilePathTextBox"; - this.TrainTrackFilePathTextBox.ReadOnly = true; - this.TrainTrackFilePathTextBox.Size = new System.Drawing.Size(386, 20); - this.TrainTrackFilePathTextBox.TabIndex = 34; - // - // label80 - // - this.label80.AutoSize = true; - this.label80.Location = new System.Drawing.Point(6, 202); - this.label80.Name = "label80"; - this.label80.Size = new System.Drawing.Size(52, 13); - this.label80.TabIndex = 17; - this.label80.Text = "Rpf Path:"; - // - // TrainTrackRpfPathTextBox - // - this.TrainTrackRpfPathTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.TrainTrackRpfPathTextBox.Location = new System.Drawing.Point(80, 199); - this.TrainTrackRpfPathTextBox.Name = "TrainTrackRpfPathTextBox"; - this.TrainTrackRpfPathTextBox.ReadOnly = true; - this.TrainTrackRpfPathTextBox.Size = new System.Drawing.Size(386, 20); - this.TrainTrackRpfPathTextBox.TabIndex = 33; - // - // TrainNodeTabPage - // - this.TrainNodeTabPage.Controls.Add(this.TrainNodePanel); - this.TrainNodeTabPage.Location = new System.Drawing.Point(4, 22); - this.TrainNodeTabPage.Name = "TrainNodeTabPage"; - this.TrainNodeTabPage.Padding = new System.Windows.Forms.Padding(3); - this.TrainNodeTabPage.Size = new System.Drawing.Size(510, 443); - this.TrainNodeTabPage.TabIndex = 1; - this.TrainNodeTabPage.Text = "Node"; - this.TrainNodeTabPage.UseVisualStyleBackColor = true; - // - // TrainNodePanel - // - this.TrainNodePanel.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.TrainNodePanel.Controls.Add(this.TrainNodeTypeComboBox); - this.TrainNodePanel.Controls.Add(this.label82); - this.TrainNodePanel.Controls.Add(this.TrainNodeDeleteButton); - this.TrainNodePanel.Controls.Add(this.TrainNodeAddToProjectButton); - this.TrainNodePanel.Controls.Add(this.TrainNodeGoToButton); - this.TrainNodePanel.Controls.Add(this.TrainNodePositionTextBox); - this.TrainNodePanel.Controls.Add(this.label81); - this.TrainNodePanel.Enabled = false; - this.TrainNodePanel.Location = new System.Drawing.Point(0, 0); - this.TrainNodePanel.Name = "TrainNodePanel"; - this.TrainNodePanel.Size = new System.Drawing.Size(510, 443); - this.TrainNodePanel.TabIndex = 0; - // - // TrainNodeTypeComboBox - // - this.TrainNodeTypeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.TrainNodeTypeComboBox.FormattingEnabled = true; - this.TrainNodeTypeComboBox.Items.AddRange(new object[] { - "0 - Default", - "1 - Default Station", - "2 - Freight Station", - "3 - (Not used)", - "4 - Underground", - "5 - Underground Station"}); - this.TrainNodeTypeComboBox.Location = new System.Drawing.Point(75, 62); - this.TrainNodeTypeComboBox.Name = "TrainNodeTypeComboBox"; - this.TrainNodeTypeComboBox.Size = new System.Drawing.Size(142, 21); - this.TrainNodeTypeComboBox.TabIndex = 40; - this.TrainNodeTypeComboBox.SelectedIndexChanged += new System.EventHandler(this.TrainNodeTypeComboBox_SelectedIndexChanged); - // - // label82 - // - this.label82.AutoSize = true; - this.label82.Location = new System.Drawing.Point(22, 65); - this.label82.Name = "label82"; - this.label82.Size = new System.Drawing.Size(34, 13); - this.label82.TabIndex = 39; - this.label82.Text = "Type:"; - // - // TrainNodeDeleteButton - // - this.TrainNodeDeleteButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.TrainNodeDeleteButton.Enabled = false; - this.TrainNodeDeleteButton.Location = new System.Drawing.Point(401, 99); - this.TrainNodeDeleteButton.Name = "TrainNodeDeleteButton"; - this.TrainNodeDeleteButton.Size = new System.Drawing.Size(90, 23); - this.TrainNodeDeleteButton.TabIndex = 42; - this.TrainNodeDeleteButton.Text = "Delete Node"; - this.TrainNodeDeleteButton.UseVisualStyleBackColor = true; - this.TrainNodeDeleteButton.Click += new System.EventHandler(this.TrainNodeDeleteButton_Click); - // - // TrainNodeAddToProjectButton - // - this.TrainNodeAddToProjectButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.TrainNodeAddToProjectButton.Enabled = false; - this.TrainNodeAddToProjectButton.Location = new System.Drawing.Point(305, 99); - this.TrainNodeAddToProjectButton.Name = "TrainNodeAddToProjectButton"; - this.TrainNodeAddToProjectButton.Size = new System.Drawing.Size(90, 23); - this.TrainNodeAddToProjectButton.TabIndex = 41; - this.TrainNodeAddToProjectButton.Text = "Add to Project"; - this.TrainNodeAddToProjectButton.UseVisualStyleBackColor = true; - this.TrainNodeAddToProjectButton.Click += new System.EventHandler(this.TrainNodeAddToProjectButton_Click); - // - // TrainNodeGoToButton - // - this.TrainNodeGoToButton.Location = new System.Drawing.Point(305, 27); - this.TrainNodeGoToButton.Name = "TrainNodeGoToButton"; - this.TrainNodeGoToButton.Size = new System.Drawing.Size(68, 23); - this.TrainNodeGoToButton.TabIndex = 35; - this.TrainNodeGoToButton.Text = "Go to"; - this.TrainNodeGoToButton.UseVisualStyleBackColor = true; - this.TrainNodeGoToButton.Click += new System.EventHandler(this.TrainNodeGoToButton_Click); - // - // TrainNodePositionTextBox - // - this.TrainNodePositionTextBox.Location = new System.Drawing.Point(75, 29); - this.TrainNodePositionTextBox.Name = "TrainNodePositionTextBox"; - this.TrainNodePositionTextBox.Size = new System.Drawing.Size(224, 20); - this.TrainNodePositionTextBox.TabIndex = 34; - this.TrainNodePositionTextBox.TextChanged += new System.EventHandler(this.TrainNodePositionTextBox_TextChanged); - // - // label81 - // - this.label81.AutoSize = true; - this.label81.Location = new System.Drawing.Point(22, 32); - this.label81.Name = "label81"; - this.label81.Size = new System.Drawing.Size(47, 13); - this.label81.TabIndex = 38; - this.label81.Text = "Position:"; - // - // ScenarioTabPage - // - this.ScenarioTabPage.Controls.Add(this.ScenarioTabControl); - this.ScenarioTabPage.Location = new System.Drawing.Point(4, 22); - this.ScenarioTabPage.Name = "ScenarioTabPage"; - this.ScenarioTabPage.Size = new System.Drawing.Size(521, 472); - this.ScenarioTabPage.TabIndex = 5; - this.ScenarioTabPage.Text = "Scenario"; - this.ScenarioTabPage.UseVisualStyleBackColor = true; - // - // ScenarioTabControl - // - this.ScenarioTabControl.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.ScenarioTabControl.Controls.Add(this.ScenarioYmtTabPage); - this.ScenarioTabControl.Controls.Add(this.ScenarioPointTabPage); - this.ScenarioTabControl.Controls.Add(this.ScenarioEntityTabPage); - this.ScenarioTabControl.Controls.Add(this.ScenarioEntityPointTabPage); - this.ScenarioTabControl.Controls.Add(this.ScenarioChainTabPage); - this.ScenarioTabControl.Controls.Add(this.ScenarioChainNodeTabPage); - this.ScenarioTabControl.Controls.Add(this.ScenarioClusterTabPage); - this.ScenarioTabControl.Controls.Add(this.ScenarioClusterPointTabPage); - this.ScenarioTabControl.Location = new System.Drawing.Point(0, 3); - this.ScenarioTabControl.Name = "ScenarioTabControl"; - this.ScenarioTabControl.SelectedIndex = 0; - this.ScenarioTabControl.Size = new System.Drawing.Size(518, 469); - this.ScenarioTabControl.TabIndex = 0; - // - // ScenarioYmtTabPage - // - this.ScenarioYmtTabPage.Controls.Add(this.ScenarioYmtPanel); - this.ScenarioYmtTabPage.Location = new System.Drawing.Point(4, 22); - this.ScenarioYmtTabPage.Name = "ScenarioYmtTabPage"; - this.ScenarioYmtTabPage.Padding = new System.Windows.Forms.Padding(3); - this.ScenarioYmtTabPage.Size = new System.Drawing.Size(510, 443); - this.ScenarioYmtTabPage.TabIndex = 0; - this.ScenarioYmtTabPage.Text = "Ymt"; - this.ScenarioYmtTabPage.UseVisualStyleBackColor = true; - // - // ScenarioYmtPanel - // - this.ScenarioYmtPanel.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.ScenarioYmtPanel.Controls.Add(this.ScenarioYmtExtentsMaxTextBox); - this.ScenarioYmtPanel.Controls.Add(this.label103); - this.ScenarioYmtPanel.Controls.Add(this.ScenarioYmtExtentsMinTextBox); - this.ScenarioYmtPanel.Controls.Add(this.label150); - this.ScenarioYmtPanel.Controls.Add(this.ScenarioYmtGridInfoLabel); - this.ScenarioYmtPanel.Controls.Add(this.ScenarioYmtGridScaleTextBox); - this.ScenarioYmtPanel.Controls.Add(this.label96); - this.ScenarioYmtPanel.Controls.Add(this.ScenarioYmtProjectPathTextBox); - this.ScenarioYmtPanel.Controls.Add(this.label66); - this.ScenarioYmtPanel.Controls.Add(this.ScenarioYmtFileLocationTextBox); - this.ScenarioYmtPanel.Controls.Add(this.label72); - this.ScenarioYmtPanel.Controls.Add(this.ScenarioYmtGridMaxTextBox); - this.ScenarioYmtPanel.Controls.Add(this.label73); - this.ScenarioYmtPanel.Controls.Add(this.ScenarioYmtGridMinTextBox); - this.ScenarioYmtPanel.Controls.Add(this.label75); - this.ScenarioYmtPanel.Controls.Add(this.ScenarioYmtVersionTextBox); - this.ScenarioYmtPanel.Controls.Add(this.label64); - this.ScenarioYmtPanel.Controls.Add(this.ScenarioYmtNameTextBox); - this.ScenarioYmtPanel.Controls.Add(this.label63); - this.ScenarioYmtPanel.Enabled = false; - this.ScenarioYmtPanel.Location = new System.Drawing.Point(0, 0); - this.ScenarioYmtPanel.Name = "ScenarioYmtPanel"; - this.ScenarioYmtPanel.Size = new System.Drawing.Size(510, 443); - this.ScenarioYmtPanel.TabIndex = 0; - // - // ScenarioYmtExtentsMaxTextBox - // - this.ScenarioYmtExtentsMaxTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioYmtExtentsMaxTextBox.Location = new System.Drawing.Point(94, 256); - this.ScenarioYmtExtentsMaxTextBox.Name = "ScenarioYmtExtentsMaxTextBox"; - this.ScenarioYmtExtentsMaxTextBox.ReadOnly = true; - this.ScenarioYmtExtentsMaxTextBox.Size = new System.Drawing.Size(277, 20); - this.ScenarioYmtExtentsMaxTextBox.TabIndex = 15; - // - // label103 - // - this.label103.AutoSize = true; - this.label103.Location = new System.Drawing.Point(6, 259); - this.label103.Name = "label103"; - this.label103.Size = new System.Drawing.Size(68, 13); - this.label103.TabIndex = 14; - this.label103.Text = "Extents Max:"; - // - // ScenarioYmtExtentsMinTextBox - // - this.ScenarioYmtExtentsMinTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioYmtExtentsMinTextBox.Location = new System.Drawing.Point(94, 230); - this.ScenarioYmtExtentsMinTextBox.Name = "ScenarioYmtExtentsMinTextBox"; - this.ScenarioYmtExtentsMinTextBox.ReadOnly = true; - this.ScenarioYmtExtentsMinTextBox.Size = new System.Drawing.Size(277, 20); - this.ScenarioYmtExtentsMinTextBox.TabIndex = 13; - // - // label150 - // - this.label150.AutoSize = true; - this.label150.Location = new System.Drawing.Point(6, 233); - this.label150.Name = "label150"; - this.label150.Size = new System.Drawing.Size(65, 13); - this.label150.TabIndex = 12; - this.label150.Text = "Extents Min:"; - // - // ScenarioYmtGridInfoLabel - // - this.ScenarioYmtGridInfoLabel.AutoSize = true; - this.ScenarioYmtGridInfoLabel.Location = new System.Drawing.Point(91, 169); - this.ScenarioYmtGridInfoLabel.Name = "ScenarioYmtGridInfoLabel"; - this.ScenarioYmtGridInfoLabel.Size = new System.Drawing.Size(94, 13); - this.ScenarioYmtGridInfoLabel.TabIndex = 11; - this.ScenarioYmtGridInfoLabel.Text = "Total grid points: 0"; - // - // ScenarioYmtGridScaleTextBox - // - this.ScenarioYmtGridScaleTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioYmtGridScaleTextBox.Location = new System.Drawing.Point(94, 131); - this.ScenarioYmtGridScaleTextBox.Name = "ScenarioYmtGridScaleTextBox"; - this.ScenarioYmtGridScaleTextBox.ReadOnly = true; - this.ScenarioYmtGridScaleTextBox.Size = new System.Drawing.Size(277, 20); - this.ScenarioYmtGridScaleTextBox.TabIndex = 10; - // - // label96 - // - this.label96.AutoSize = true; - this.label96.Location = new System.Drawing.Point(6, 134); - this.label96.Name = "label96"; - this.label96.Size = new System.Drawing.Size(59, 13); - this.label96.TabIndex = 9; - this.label96.Text = "Grid Scale:"; - // - // ScenarioYmtProjectPathTextBox - // - this.ScenarioYmtProjectPathTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioYmtProjectPathTextBox.Location = new System.Drawing.Point(94, 379); - this.ScenarioYmtProjectPathTextBox.Name = "ScenarioYmtProjectPathTextBox"; - this.ScenarioYmtProjectPathTextBox.ReadOnly = true; - this.ScenarioYmtProjectPathTextBox.Size = new System.Drawing.Size(404, 20); - this.ScenarioYmtProjectPathTextBox.TabIndex = 19; - // - // label66 - // - this.label66.AutoSize = true; - this.label66.Location = new System.Drawing.Point(6, 382); - this.label66.Name = "label66"; - this.label66.Size = new System.Drawing.Size(67, 13); - this.label66.TabIndex = 18; - this.label66.Text = "Project path:"; - // - // ScenarioYmtFileLocationTextBox - // - this.ScenarioYmtFileLocationTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioYmtFileLocationTextBox.Location = new System.Drawing.Point(94, 353); - this.ScenarioYmtFileLocationTextBox.Name = "ScenarioYmtFileLocationTextBox"; - this.ScenarioYmtFileLocationTextBox.ReadOnly = true; - this.ScenarioYmtFileLocationTextBox.Size = new System.Drawing.Size(404, 20); - this.ScenarioYmtFileLocationTextBox.TabIndex = 17; - // - // label72 - // - this.label72.AutoSize = true; - this.label72.Location = new System.Drawing.Point(6, 356); - this.label72.Name = "label72"; - this.label72.Size = new System.Drawing.Size(66, 13); - this.label72.TabIndex = 16; - this.label72.Text = "File location:"; - // - // ScenarioYmtGridMaxTextBox - // - this.ScenarioYmtGridMaxTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioYmtGridMaxTextBox.Location = new System.Drawing.Point(94, 105); - this.ScenarioYmtGridMaxTextBox.Name = "ScenarioYmtGridMaxTextBox"; - this.ScenarioYmtGridMaxTextBox.ReadOnly = true; - this.ScenarioYmtGridMaxTextBox.Size = new System.Drawing.Size(277, 20); - this.ScenarioYmtGridMaxTextBox.TabIndex = 8; - // - // label73 - // - this.label73.AutoSize = true; - this.label73.Location = new System.Drawing.Point(6, 108); - this.label73.Name = "label73"; - this.label73.Size = new System.Drawing.Size(52, 13); - this.label73.TabIndex = 7; - this.label73.Text = "Grid Max:"; - // - // ScenarioYmtGridMinTextBox - // - this.ScenarioYmtGridMinTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioYmtGridMinTextBox.Location = new System.Drawing.Point(94, 79); - this.ScenarioYmtGridMinTextBox.Name = "ScenarioYmtGridMinTextBox"; - this.ScenarioYmtGridMinTextBox.ReadOnly = true; - this.ScenarioYmtGridMinTextBox.Size = new System.Drawing.Size(277, 20); - this.ScenarioYmtGridMinTextBox.TabIndex = 6; - // - // label75 - // - this.label75.AutoSize = true; - this.label75.Location = new System.Drawing.Point(6, 82); - this.label75.Name = "label75"; - this.label75.Size = new System.Drawing.Size(49, 13); - this.label75.TabIndex = 5; - this.label75.Text = "Grid Min:"; - // - // ScenarioYmtVersionTextBox - // - this.ScenarioYmtVersionTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioYmtVersionTextBox.Location = new System.Drawing.Point(94, 36); - this.ScenarioYmtVersionTextBox.Name = "ScenarioYmtVersionTextBox"; - this.ScenarioYmtVersionTextBox.Size = new System.Drawing.Size(277, 20); - this.ScenarioYmtVersionTextBox.TabIndex = 4; - this.ScenarioYmtVersionTextBox.TextChanged += new System.EventHandler(this.ScenarioYmtVersionTextBox_TextChanged); - // - // label64 - // - this.label64.AutoSize = true; - this.label64.Location = new System.Drawing.Point(6, 39); - this.label64.Name = "label64"; - this.label64.Size = new System.Drawing.Size(82, 13); - this.label64.TabIndex = 3; - this.label64.Text = "VersionNumber:"; - // - // ScenarioYmtNameTextBox - // - this.ScenarioYmtNameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioYmtNameTextBox.Location = new System.Drawing.Point(94, 10); - this.ScenarioYmtNameTextBox.Name = "ScenarioYmtNameTextBox"; - this.ScenarioYmtNameTextBox.ReadOnly = true; - this.ScenarioYmtNameTextBox.Size = new System.Drawing.Size(277, 20); - this.ScenarioYmtNameTextBox.TabIndex = 2; - // - // label63 - // - this.label63.AutoSize = true; - this.label63.Location = new System.Drawing.Point(6, 13); - this.label63.Name = "label63"; - this.label63.Size = new System.Drawing.Size(38, 13); - this.label63.TabIndex = 1; - this.label63.Text = "Name:"; - // - // ScenarioPointTabPage - // - this.ScenarioPointTabPage.Controls.Add(this.ScenarioPointOuterPanel); - this.ScenarioPointTabPage.Location = new System.Drawing.Point(4, 22); - this.ScenarioPointTabPage.Name = "ScenarioPointTabPage"; - this.ScenarioPointTabPage.Padding = new System.Windows.Forms.Padding(3); - this.ScenarioPointTabPage.Size = new System.Drawing.Size(510, 443); - this.ScenarioPointTabPage.TabIndex = 1; - this.ScenarioPointTabPage.Text = "Point"; - this.ScenarioPointTabPage.UseVisualStyleBackColor = true; - // - // ScenarioPointOuterPanel - // - this.ScenarioPointOuterPanel.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.ScenarioPointOuterPanel.Controls.Add(this.ScenarioPointCheckBox); - this.ScenarioPointOuterPanel.Controls.Add(this.ScenarioPointPanel); - this.ScenarioPointOuterPanel.Controls.Add(this.ScenarioPointDeleteButton); - this.ScenarioPointOuterPanel.Controls.Add(this.ScenarioPointAddToProjectButton); - this.ScenarioPointOuterPanel.Location = new System.Drawing.Point(0, 0); - this.ScenarioPointOuterPanel.Name = "ScenarioPointOuterPanel"; - this.ScenarioPointOuterPanel.Size = new System.Drawing.Size(510, 443); - this.ScenarioPointOuterPanel.TabIndex = 1; - // - // ScenarioPointCheckBox - // - this.ScenarioPointCheckBox.AutoSize = true; - this.ScenarioPointCheckBox.Location = new System.Drawing.Point(6, 6); - this.ScenarioPointCheckBox.Name = "ScenarioPointCheckBox"; - this.ScenarioPointCheckBox.Size = new System.Drawing.Size(98, 17); - this.ScenarioPointCheckBox.TabIndex = 1; - this.ScenarioPointCheckBox.Text = "Define MyPoint"; - this.ScenarioPointCheckBox.UseVisualStyleBackColor = true; - this.ScenarioPointCheckBox.CheckedChanged += new System.EventHandler(this.ScenarioPointCheckBox_CheckedChanged); - // - // ScenarioPointPanel - // - this.ScenarioPointPanel.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.ScenarioPointPanel.Controls.Add(this.ScenarioPointImapHashLabel); - this.ScenarioPointPanel.Controls.Add(this.ScenarioPointImapTextBox); - this.ScenarioPointPanel.Controls.Add(this.label110); - this.ScenarioPointPanel.Controls.Add(this.ScenarioPointGroupHashLabel); - this.ScenarioPointPanel.Controls.Add(this.ScenarioPointGroupTextBox); - this.ScenarioPointPanel.Controls.Add(this.label156); - this.ScenarioPointPanel.Controls.Add(this.ScenarioPointInteriorHashLabel); - this.ScenarioPointPanel.Controls.Add(this.ScenarioPointFlagsCheckedListBox); - this.ScenarioPointPanel.Controls.Add(this.label111); - this.ScenarioPointPanel.Controls.Add(this.ScenarioPointDirectionTextBox); - this.ScenarioPointPanel.Controls.Add(this.label97); - this.ScenarioPointPanel.Controls.Add(this.ScenarioPointFlagsValueUpDown); - this.ScenarioPointPanel.Controls.Add(this.label109); - this.ScenarioPointPanel.Controls.Add(this.ScenarioPointGoToButton); - this.ScenarioPointPanel.Controls.Add(this.ScenarioPointWaitTimeUpDown); - this.ScenarioPointPanel.Controls.Add(this.ScenarioPointPositionTextBox); - this.ScenarioPointPanel.Controls.Add(this.label62); - this.ScenarioPointPanel.Controls.Add(this.label108); - this.ScenarioPointPanel.Controls.Add(this.ScenarioPointRadiusUpDown); - this.ScenarioPointPanel.Controls.Add(this.label107); - this.ScenarioPointPanel.Controls.Add(this.ScenarioPointSpOnlyFlagUpDown); - this.ScenarioPointPanel.Controls.Add(this.label106); - this.ScenarioPointPanel.Controls.Add(this.ScenarioPointProbabilityUpDown); - this.ScenarioPointPanel.Controls.Add(this.ScenarioPointInteriorTextBox); - this.ScenarioPointPanel.Controls.Add(this.label102); - this.ScenarioPointPanel.Controls.Add(this.label101); - this.ScenarioPointPanel.Controls.Add(this.ScenarioPointTimeEndUpDown); - this.ScenarioPointPanel.Controls.Add(this.ScenarioPointTimeStartUpDown); - this.ScenarioPointPanel.Controls.Add(this.label100); - this.ScenarioPointPanel.Controls.Add(this.ScenarioPointModelSetComboBox); - this.ScenarioPointPanel.Controls.Add(this.label99); - this.ScenarioPointPanel.Controls.Add(this.ScenarioPointTypeComboBox); - this.ScenarioPointPanel.Controls.Add(this.label98); - this.ScenarioPointPanel.Enabled = false; - this.ScenarioPointPanel.Location = new System.Drawing.Point(0, 29); - this.ScenarioPointPanel.Name = "ScenarioPointPanel"; - this.ScenarioPointPanel.Size = new System.Drawing.Size(510, 414); - this.ScenarioPointPanel.TabIndex = 0; - // - // ScenarioPointImapHashLabel - // - this.ScenarioPointImapHashLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioPointImapHashLabel.AutoSize = true; - this.ScenarioPointImapHashLabel.Location = new System.Drawing.Point(341, 146); - this.ScenarioPointImapHashLabel.Name = "ScenarioPointImapHashLabel"; - this.ScenarioPointImapHashLabel.Size = new System.Drawing.Size(44, 13); - this.ScenarioPointImapHashLabel.TabIndex = 21; - this.ScenarioPointImapHashLabel.Text = "Hash: 0"; - // - // ScenarioPointImapTextBox - // - this.ScenarioPointImapTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioPointImapTextBox.Location = new System.Drawing.Point(73, 143); - this.ScenarioPointImapTextBox.Name = "ScenarioPointImapTextBox"; - this.ScenarioPointImapTextBox.Size = new System.Drawing.Size(262, 20); - this.ScenarioPointImapTextBox.TabIndex = 20; - this.ScenarioPointImapTextBox.TextChanged += new System.EventHandler(this.ScenarioPointImapTextBox_TextChanged); - // - // label110 - // - this.label110.AutoSize = true; - this.label110.Location = new System.Drawing.Point(34, 146); - this.label110.Name = "label110"; - this.label110.Size = new System.Drawing.Size(33, 13); - this.label110.TabIndex = 19; - this.label110.Text = "Imap:"; - // - // ScenarioPointGroupHashLabel - // - this.ScenarioPointGroupHashLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioPointGroupHashLabel.AutoSize = true; - this.ScenarioPointGroupHashLabel.Location = new System.Drawing.Point(341, 123); - this.ScenarioPointGroupHashLabel.Name = "ScenarioPointGroupHashLabel"; - this.ScenarioPointGroupHashLabel.Size = new System.Drawing.Size(44, 13); - this.ScenarioPointGroupHashLabel.TabIndex = 18; - this.ScenarioPointGroupHashLabel.Text = "Hash: 0"; - // - // ScenarioPointGroupTextBox - // - this.ScenarioPointGroupTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioPointGroupTextBox.Location = new System.Drawing.Point(73, 120); - this.ScenarioPointGroupTextBox.Name = "ScenarioPointGroupTextBox"; - this.ScenarioPointGroupTextBox.Size = new System.Drawing.Size(262, 20); - this.ScenarioPointGroupTextBox.TabIndex = 17; - this.ScenarioPointGroupTextBox.TextChanged += new System.EventHandler(this.ScenarioPointGroupTextBox_TextChanged); - // - // label156 - // - this.label156.AutoSize = true; - this.label156.Location = new System.Drawing.Point(28, 123); - this.label156.Name = "label156"; - this.label156.Size = new System.Drawing.Size(39, 13); - this.label156.TabIndex = 16; - this.label156.Text = "Group:"; - // - // ScenarioPointInteriorHashLabel - // - this.ScenarioPointInteriorHashLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioPointInteriorHashLabel.AutoSize = true; - this.ScenarioPointInteriorHashLabel.Location = new System.Drawing.Point(341, 100); - this.ScenarioPointInteriorHashLabel.Name = "ScenarioPointInteriorHashLabel"; - this.ScenarioPointInteriorHashLabel.Size = new System.Drawing.Size(44, 13); - this.ScenarioPointInteriorHashLabel.TabIndex = 15; - this.ScenarioPointInteriorHashLabel.Text = "Hash: 0"; - // - // ScenarioPointFlagsCheckedListBox - // - this.ScenarioPointFlagsCheckedListBox.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.ScenarioPointFlagsCheckedListBox.CheckOnClick = true; - this.ScenarioPointFlagsCheckedListBox.FormattingEnabled = true; - this.ScenarioPointFlagsCheckedListBox.Items.AddRange(new object[] { - "1 - IgnoreMaxInRange", - "2 - NoSpawn", - "4 - StationaryReactions", - "8 - Unk", - "16 - Unk", - "32 - ActivateVehicleSiren", - "64 - AggressiveVehicleDriving", - "128 - Unk", - "256 - Unk", - "512 - Unk", - "1024 - AerialVehiclePoint", - "2048 - TerritorialScenario", - "4096 - Unk", - "8192 - Unk", - "16384 - Unk", - "32768 - Unk", - "65536 - InWater", - "131072 - Unk", - "262144 - OpenDoor", - "524288 - PreciseUseTime", - "1048576 - Unk", - "2097152 - Unk", - "4194304 - ExtendedRange", - "8388608 - ShortRange", - "16777216 - HighPriority", - "33554432 - IgnoreLoitering", - "67108864 - UseSearchlight", - "134217728 - ResetNoCollisionOnCleanUp", - "268435456 - Unk", - "536870912 - Unk", - "1073741824 - IgnoreWeatherRestrictions"}); - this.ScenarioPointFlagsCheckedListBox.Location = new System.Drawing.Point(195, 167); - this.ScenarioPointFlagsCheckedListBox.Name = "ScenarioPointFlagsCheckedListBox"; - this.ScenarioPointFlagsCheckedListBox.Size = new System.Drawing.Size(214, 244); - this.ScenarioPointFlagsCheckedListBox.TabIndex = 36; - this.ScenarioPointFlagsCheckedListBox.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.ScenarioPointFlagsCheckedListBox_ItemCheck); - // - // label111 - // - this.label111.AutoSize = true; - this.label111.Location = new System.Drawing.Point(32, 390); - this.label111.Name = "label111"; - this.label111.Size = new System.Drawing.Size(35, 13); - this.label111.TabIndex = 34; - this.label111.Text = "Flags:"; - // - // ScenarioPointDirectionTextBox - // - this.ScenarioPointDirectionTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioPointDirectionTextBox.Location = new System.Drawing.Point(73, 26); - this.ScenarioPointDirectionTextBox.Name = "ScenarioPointDirectionTextBox"; - this.ScenarioPointDirectionTextBox.Size = new System.Drawing.Size(262, 20); - this.ScenarioPointDirectionTextBox.TabIndex = 8; - this.ScenarioPointDirectionTextBox.TextChanged += new System.EventHandler(this.ScenarioPointDirectionTextBox_TextChanged); - // - // label97 - // - this.label97.AutoSize = true; - this.label97.Location = new System.Drawing.Point(15, 29); - this.label97.Name = "label97"; - this.label97.Size = new System.Drawing.Size(52, 13); - this.label97.TabIndex = 7; - this.label97.Text = "Direction:"; - // - // ScenarioPointFlagsValueUpDown - // - this.ScenarioPointFlagsValueUpDown.Location = new System.Drawing.Point(73, 388); - this.ScenarioPointFlagsValueUpDown.Maximum = new decimal(new int[] { - -1, - 0, - 0, - 0}); - this.ScenarioPointFlagsValueUpDown.Name = "ScenarioPointFlagsValueUpDown"; - this.ScenarioPointFlagsValueUpDown.Size = new System.Drawing.Size(116, 20); - this.ScenarioPointFlagsValueUpDown.TabIndex = 35; - this.ScenarioPointFlagsValueUpDown.ValueChanged += new System.EventHandler(this.ScenarioPointFlagsValueUpDown_ValueChanged); - // - // label109 - // - this.label109.AutoSize = true; - this.label109.Location = new System.Drawing.Point(13, 299); - this.label109.Name = "label109"; - this.label109.Size = new System.Drawing.Size(54, 13); - this.label109.TabIndex = 32; - this.label109.Text = "Wait time:"; - // - // ScenarioPointGoToButton - // - this.ScenarioPointGoToButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioPointGoToButton.Location = new System.Drawing.Point(341, 1); - this.ScenarioPointGoToButton.Name = "ScenarioPointGoToButton"; - this.ScenarioPointGoToButton.Size = new System.Drawing.Size(68, 23); - this.ScenarioPointGoToButton.TabIndex = 6; - this.ScenarioPointGoToButton.Text = "Go to"; - this.ScenarioPointGoToButton.UseVisualStyleBackColor = true; - this.ScenarioPointGoToButton.Click += new System.EventHandler(this.ScenarioPointGoToButton_Click); - // - // ScenarioPointWaitTimeUpDown - // - this.ScenarioPointWaitTimeUpDown.Location = new System.Drawing.Point(73, 297); - this.ScenarioPointWaitTimeUpDown.Maximum = new decimal(new int[] { - 255, - 0, - 0, - 0}); - this.ScenarioPointWaitTimeUpDown.Name = "ScenarioPointWaitTimeUpDown"; - this.ScenarioPointWaitTimeUpDown.Size = new System.Drawing.Size(57, 20); - this.ScenarioPointWaitTimeUpDown.TabIndex = 33; - this.ScenarioPointWaitTimeUpDown.ValueChanged += new System.EventHandler(this.ScenarioPointWaitTimeUpDown_ValueChanged); - // - // ScenarioPointPositionTextBox - // - this.ScenarioPointPositionTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioPointPositionTextBox.Location = new System.Drawing.Point(73, 3); - this.ScenarioPointPositionTextBox.Name = "ScenarioPointPositionTextBox"; - this.ScenarioPointPositionTextBox.Size = new System.Drawing.Size(262, 20); - this.ScenarioPointPositionTextBox.TabIndex = 5; - this.ScenarioPointPositionTextBox.TextChanged += new System.EventHandler(this.ScenarioPointPositionTextBox_TextChanged); - // - // label62 - // - this.label62.AutoSize = true; - this.label62.Location = new System.Drawing.Point(20, 6); - this.label62.Name = "label62"; - this.label62.Size = new System.Drawing.Size(47, 13); - this.label62.TabIndex = 4; - this.label62.Text = "Position:"; - // - // label108 - // - this.label108.AutoSize = true; - this.label108.Location = new System.Drawing.Point(24, 273); - this.label108.Name = "label108"; - this.label108.Size = new System.Drawing.Size(43, 13); - this.label108.TabIndex = 30; - this.label108.Text = "Radius:"; - // - // ScenarioPointRadiusUpDown - // - this.ScenarioPointRadiusUpDown.Location = new System.Drawing.Point(73, 271); - this.ScenarioPointRadiusUpDown.Maximum = new decimal(new int[] { - 255, - 0, - 0, - 0}); - this.ScenarioPointRadiusUpDown.Name = "ScenarioPointRadiusUpDown"; - this.ScenarioPointRadiusUpDown.Size = new System.Drawing.Size(57, 20); - this.ScenarioPointRadiusUpDown.TabIndex = 31; - this.ScenarioPointRadiusUpDown.ValueChanged += new System.EventHandler(this.ScenarioPointRadiusUpDown_ValueChanged); - // - // label107 - // - this.label107.AutoSize = true; - this.label107.Location = new System.Drawing.Point(3, 247); - this.label107.Name = "label107"; - this.label107.Size = new System.Drawing.Size(64, 13); - this.label107.TabIndex = 28; - this.label107.Text = "SpOnly flag:"; - // - // ScenarioPointSpOnlyFlagUpDown - // - this.ScenarioPointSpOnlyFlagUpDown.Location = new System.Drawing.Point(73, 245); - this.ScenarioPointSpOnlyFlagUpDown.Maximum = new decimal(new int[] { - 255, - 0, - 0, - 0}); - this.ScenarioPointSpOnlyFlagUpDown.Name = "ScenarioPointSpOnlyFlagUpDown"; - this.ScenarioPointSpOnlyFlagUpDown.Size = new System.Drawing.Size(57, 20); - this.ScenarioPointSpOnlyFlagUpDown.TabIndex = 29; - this.ScenarioPointSpOnlyFlagUpDown.ValueChanged += new System.EventHandler(this.ScenarioPointSpOnlyFlagUpDown_ValueChanged); - // - // label106 - // - this.label106.AutoSize = true; - this.label106.Location = new System.Drawing.Point(9, 221); - this.label106.Name = "label106"; - this.label106.Size = new System.Drawing.Size(58, 13); - this.label106.TabIndex = 26; - this.label106.Text = "Probability:"; - // - // ScenarioPointProbabilityUpDown - // - this.ScenarioPointProbabilityUpDown.Location = new System.Drawing.Point(73, 219); - this.ScenarioPointProbabilityUpDown.Maximum = new decimal(new int[] { - 255, - 0, - 0, - 0}); - this.ScenarioPointProbabilityUpDown.Name = "ScenarioPointProbabilityUpDown"; - this.ScenarioPointProbabilityUpDown.Size = new System.Drawing.Size(57, 20); - this.ScenarioPointProbabilityUpDown.TabIndex = 27; - this.ScenarioPointProbabilityUpDown.ValueChanged += new System.EventHandler(this.ScenarioPointProbabilityUpDown_ValueChanged); - // - // ScenarioPointInteriorTextBox - // - this.ScenarioPointInteriorTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioPointInteriorTextBox.Location = new System.Drawing.Point(73, 97); - this.ScenarioPointInteriorTextBox.Name = "ScenarioPointInteriorTextBox"; - this.ScenarioPointInteriorTextBox.Size = new System.Drawing.Size(262, 20); - this.ScenarioPointInteriorTextBox.TabIndex = 14; - this.ScenarioPointInteriorTextBox.TextChanged += new System.EventHandler(this.ScenarioPointInteriorTextBox_TextChanged); - // - // label102 - // - this.label102.AutoSize = true; - this.label102.Location = new System.Drawing.Point(25, 100); - this.label102.Name = "label102"; - this.label102.Size = new System.Drawing.Size(42, 13); - this.label102.TabIndex = 13; - this.label102.Text = "Interior:"; - // - // label101 - // - this.label101.AutoSize = true; - this.label101.Location = new System.Drawing.Point(13, 195); - this.label101.Name = "label101"; - this.label101.Size = new System.Drawing.Size(54, 13); - this.label101.TabIndex = 24; - this.label101.Text = "Time end:"; - // - // ScenarioPointTimeEndUpDown - // - this.ScenarioPointTimeEndUpDown.Location = new System.Drawing.Point(73, 193); - this.ScenarioPointTimeEndUpDown.Maximum = new decimal(new int[] { - 24, - 0, - 0, - 0}); - this.ScenarioPointTimeEndUpDown.Name = "ScenarioPointTimeEndUpDown"; - this.ScenarioPointTimeEndUpDown.Size = new System.Drawing.Size(57, 20); - this.ScenarioPointTimeEndUpDown.TabIndex = 25; - this.ScenarioPointTimeEndUpDown.ValueChanged += new System.EventHandler(this.ScenarioPointTimeEndUpDown_ValueChanged); - // - // ScenarioPointTimeStartUpDown - // - this.ScenarioPointTimeStartUpDown.Location = new System.Drawing.Point(73, 167); - this.ScenarioPointTimeStartUpDown.Maximum = new decimal(new int[] { - 24, - 0, - 0, - 0}); - this.ScenarioPointTimeStartUpDown.Name = "ScenarioPointTimeStartUpDown"; - this.ScenarioPointTimeStartUpDown.Size = new System.Drawing.Size(57, 20); - this.ScenarioPointTimeStartUpDown.TabIndex = 23; - this.ScenarioPointTimeStartUpDown.ValueChanged += new System.EventHandler(this.ScenarioPointTimeStartUpDown_ValueChanged); - // - // label100 - // - this.label100.AutoSize = true; - this.label100.Location = new System.Drawing.Point(11, 169); - this.label100.Name = "label100"; - this.label100.Size = new System.Drawing.Size(56, 13); - this.label100.TabIndex = 22; - this.label100.Text = "Time start:"; - // - // ScenarioPointModelSetComboBox - // - this.ScenarioPointModelSetComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioPointModelSetComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.ScenarioPointModelSetComboBox.FormattingEnabled = true; - this.ScenarioPointModelSetComboBox.Location = new System.Drawing.Point(73, 73); - this.ScenarioPointModelSetComboBox.Name = "ScenarioPointModelSetComboBox"; - this.ScenarioPointModelSetComboBox.Size = new System.Drawing.Size(336, 21); - this.ScenarioPointModelSetComboBox.TabIndex = 12; - this.ScenarioPointModelSetComboBox.SelectedIndexChanged += new System.EventHandler(this.ScenarioPointModelSetComboBox_SelectedIndexChanged); - // - // label99 - // - this.label99.AutoSize = true; - this.label99.Location = new System.Drawing.Point(9, 76); - this.label99.Name = "label99"; - this.label99.Size = new System.Drawing.Size(58, 13); - this.label99.TabIndex = 11; - this.label99.Text = "Model Set:"; - // - // ScenarioPointTypeComboBox - // - this.ScenarioPointTypeComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioPointTypeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.ScenarioPointTypeComboBox.FormattingEnabled = true; - this.ScenarioPointTypeComboBox.Location = new System.Drawing.Point(73, 49); - this.ScenarioPointTypeComboBox.Name = "ScenarioPointTypeComboBox"; - this.ScenarioPointTypeComboBox.Size = new System.Drawing.Size(336, 21); - this.ScenarioPointTypeComboBox.TabIndex = 10; - this.ScenarioPointTypeComboBox.SelectedIndexChanged += new System.EventHandler(this.ScenarioPointTypeComboBox_SelectedIndexChanged); - // - // label98 - // - this.label98.AutoSize = true; - this.label98.Location = new System.Drawing.Point(33, 52); - this.label98.Name = "label98"; - this.label98.Size = new System.Drawing.Size(34, 13); - this.label98.TabIndex = 9; - this.label98.Text = "Type:"; - // - // ScenarioPointDeleteButton - // - this.ScenarioPointDeleteButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioPointDeleteButton.Enabled = false; - this.ScenarioPointDeleteButton.Location = new System.Drawing.Point(415, 2); - this.ScenarioPointDeleteButton.Name = "ScenarioPointDeleteButton"; - this.ScenarioPointDeleteButton.Size = new System.Drawing.Size(90, 23); - this.ScenarioPointDeleteButton.TabIndex = 3; - this.ScenarioPointDeleteButton.Text = "Delete Point"; - this.ScenarioPointDeleteButton.UseVisualStyleBackColor = true; - this.ScenarioPointDeleteButton.Click += new System.EventHandler(this.ScenarioPointDeleteButton_Click); - // - // ScenarioPointAddToProjectButton - // - this.ScenarioPointAddToProjectButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioPointAddToProjectButton.Enabled = false; - this.ScenarioPointAddToProjectButton.Location = new System.Drawing.Point(319, 2); - this.ScenarioPointAddToProjectButton.Name = "ScenarioPointAddToProjectButton"; - this.ScenarioPointAddToProjectButton.Size = new System.Drawing.Size(90, 23); - this.ScenarioPointAddToProjectButton.TabIndex = 2; - this.ScenarioPointAddToProjectButton.Text = "Add to Project"; - this.ScenarioPointAddToProjectButton.UseVisualStyleBackColor = true; - this.ScenarioPointAddToProjectButton.Click += new System.EventHandler(this.ScenarioPointAddToProjectButton_Click); - // - // ScenarioEntityTabPage - // - this.ScenarioEntityTabPage.Controls.Add(this.ScenarioEntityDeleteButton); - this.ScenarioEntityTabPage.Controls.Add(this.ScenarioEntityPanel); - this.ScenarioEntityTabPage.Controls.Add(this.ScenarioEntityAddToProjectButton); - this.ScenarioEntityTabPage.Controls.Add(this.ScenarioEntityCheckBox); - this.ScenarioEntityTabPage.Location = new System.Drawing.Point(4, 22); - this.ScenarioEntityTabPage.Name = "ScenarioEntityTabPage"; - this.ScenarioEntityTabPage.Size = new System.Drawing.Size(510, 443); - this.ScenarioEntityTabPage.TabIndex = 7; - this.ScenarioEntityTabPage.Text = "Entity"; - this.ScenarioEntityTabPage.UseVisualStyleBackColor = true; - // - // ScenarioEntityDeleteButton - // - this.ScenarioEntityDeleteButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioEntityDeleteButton.Enabled = false; - this.ScenarioEntityDeleteButton.Location = new System.Drawing.Point(415, 2); - this.ScenarioEntityDeleteButton.Name = "ScenarioEntityDeleteButton"; - this.ScenarioEntityDeleteButton.Size = new System.Drawing.Size(90, 23); - this.ScenarioEntityDeleteButton.TabIndex = 7; - this.ScenarioEntityDeleteButton.Text = "Delete Override"; - this.ScenarioEntityDeleteButton.UseVisualStyleBackColor = true; - this.ScenarioEntityDeleteButton.Click += new System.EventHandler(this.ScenarioEntityDeleteButton_Click); - // - // ScenarioEntityPanel - // - this.ScenarioEntityPanel.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.ScenarioEntityPanel.Controls.Add(this.label160); - this.ScenarioEntityPanel.Controls.Add(this.ScenarioEntityAddPointButton); - this.ScenarioEntityPanel.Controls.Add(this.label161); - this.ScenarioEntityPanel.Controls.Add(this.ScenarioEntityPointsListBox); - this.ScenarioEntityPanel.Controls.Add(this.ScenarioEntityInfoLabel); - this.ScenarioEntityPanel.Controls.Add(this.label114); - this.ScenarioEntityPanel.Controls.Add(this.ScenarioEntityUnk2UpDown); - this.ScenarioEntityPanel.Controls.Add(this.label113); - this.ScenarioEntityPanel.Controls.Add(this.ScenarioEntityUnk1UpDown); - this.ScenarioEntityPanel.Controls.Add(this.ScenarioEntityTypeHashLabel); - this.ScenarioEntityPanel.Controls.Add(this.ScenarioEntityTypeTextBox); - this.ScenarioEntityPanel.Controls.Add(this.label112); - this.ScenarioEntityPanel.Controls.Add(this.ScenarioEntityGoToButton); - this.ScenarioEntityPanel.Controls.Add(this.ScenarioEntityPositionTextBox); - this.ScenarioEntityPanel.Controls.Add(this.label104); - this.ScenarioEntityPanel.Enabled = false; - this.ScenarioEntityPanel.Location = new System.Drawing.Point(0, 29); - this.ScenarioEntityPanel.Name = "ScenarioEntityPanel"; - this.ScenarioEntityPanel.Size = new System.Drawing.Size(510, 414); - this.ScenarioEntityPanel.TabIndex = 8; - // - // label160 - // - this.label160.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.label160.AutoSize = true; - this.label160.Location = new System.Drawing.Point(332, 160); - this.label160.Name = "label160"; - this.label160.Size = new System.Drawing.Size(141, 13); - this.label160.TabIndex = 20; - this.label160.Text = "(Double-click to select point)"; - // - // ScenarioEntityAddPointButton - // - this.ScenarioEntityAddPointButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.ScenarioEntityAddPointButton.Location = new System.Drawing.Point(91, 347); - this.ScenarioEntityAddPointButton.Name = "ScenarioEntityAddPointButton"; - this.ScenarioEntityAddPointButton.Size = new System.Drawing.Size(90, 23); - this.ScenarioEntityAddPointButton.TabIndex = 19; - this.ScenarioEntityAddPointButton.Text = "Add Point"; - this.ScenarioEntityAddPointButton.UseVisualStyleBackColor = true; - this.ScenarioEntityAddPointButton.Click += new System.EventHandler(this.ScenarioEntityAddPointButton_Click); - // - // label161 - // - this.label161.AutoSize = true; - this.label161.Location = new System.Drawing.Point(42, 160); - this.label161.Name = "label161"; - this.label161.Size = new System.Drawing.Size(39, 13); - this.label161.TabIndex = 18; - this.label161.Text = "Points:"; - // - // ScenarioEntityPointsListBox - // - this.ScenarioEntityPointsListBox.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.ScenarioEntityPointsListBox.FormattingEnabled = true; - this.ScenarioEntityPointsListBox.Location = new System.Drawing.Point(91, 158); - this.ScenarioEntityPointsListBox.Name = "ScenarioEntityPointsListBox"; - this.ScenarioEntityPointsListBox.Size = new System.Drawing.Size(235, 173); - this.ScenarioEntityPointsListBox.TabIndex = 17; - this.ScenarioEntityPointsListBox.DoubleClick += new System.EventHandler(this.ScenarioEntityPointsListBox_DoubleClick); - // - // ScenarioEntityInfoLabel - // - this.ScenarioEntityInfoLabel.AutoSize = true; - this.ScenarioEntityInfoLabel.Location = new System.Drawing.Point(88, 123); - this.ScenarioEntityInfoLabel.Name = "ScenarioEntityInfoLabel"; - this.ScenarioEntityInfoLabel.Size = new System.Drawing.Size(85, 13); - this.ScenarioEntityInfoLabel.TabIndex = 14; - this.ScenarioEntityInfoLabel.Text = "0 override points"; - // - // label114 - // - this.label114.AutoSize = true; - this.label114.Location = new System.Drawing.Point(46, 83); - this.label114.Name = "label114"; - this.label114.Size = new System.Drawing.Size(39, 13); - this.label114.TabIndex = 12; - this.label114.Text = "Unk 2:"; - // - // ScenarioEntityUnk2UpDown - // - this.ScenarioEntityUnk2UpDown.Location = new System.Drawing.Point(91, 81); - this.ScenarioEntityUnk2UpDown.Maximum = new decimal(new int[] { - 255, - 0, - 0, - 0}); - this.ScenarioEntityUnk2UpDown.Name = "ScenarioEntityUnk2UpDown"; - this.ScenarioEntityUnk2UpDown.Size = new System.Drawing.Size(57, 20); - this.ScenarioEntityUnk2UpDown.TabIndex = 13; - this.ScenarioEntityUnk2UpDown.ValueChanged += new System.EventHandler(this.ScenarioEntityUnk2UpDown_ValueChanged); - // - // label113 - // - this.label113.AutoSize = true; - this.label113.Location = new System.Drawing.Point(46, 57); - this.label113.Name = "label113"; - this.label113.Size = new System.Drawing.Size(39, 13); - this.label113.TabIndex = 10; - this.label113.Text = "Unk 1:"; - // - // ScenarioEntityUnk1UpDown - // - this.ScenarioEntityUnk1UpDown.Location = new System.Drawing.Point(91, 55); - this.ScenarioEntityUnk1UpDown.Maximum = new decimal(new int[] { - 255, - 0, - 0, - 0}); - this.ScenarioEntityUnk1UpDown.Name = "ScenarioEntityUnk1UpDown"; - this.ScenarioEntityUnk1UpDown.Size = new System.Drawing.Size(57, 20); - this.ScenarioEntityUnk1UpDown.TabIndex = 11; - this.ScenarioEntityUnk1UpDown.ValueChanged += new System.EventHandler(this.ScenarioEntityUnk1UpDown_ValueChanged); - // - // ScenarioEntityTypeHashLabel - // - this.ScenarioEntityTypeHashLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioEntityTypeHashLabel.AutoSize = true; - this.ScenarioEntityTypeHashLabel.Location = new System.Drawing.Point(341, 32); - this.ScenarioEntityTypeHashLabel.Name = "ScenarioEntityTypeHashLabel"; - this.ScenarioEntityTypeHashLabel.Size = new System.Drawing.Size(44, 13); - this.ScenarioEntityTypeHashLabel.TabIndex = 9; - this.ScenarioEntityTypeHashLabel.Text = "Hash: 0"; - // - // ScenarioEntityTypeTextBox - // - this.ScenarioEntityTypeTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioEntityTypeTextBox.Location = new System.Drawing.Point(91, 29); - this.ScenarioEntityTypeTextBox.Name = "ScenarioEntityTypeTextBox"; - this.ScenarioEntityTypeTextBox.Size = new System.Drawing.Size(244, 20); - this.ScenarioEntityTypeTextBox.TabIndex = 8; - this.ScenarioEntityTypeTextBox.TextChanged += new System.EventHandler(this.ScenarioEntityTypeTextBox_TextChanged); - // - // label112 - // - this.label112.AutoSize = true; - this.label112.Location = new System.Drawing.Point(26, 32); - this.label112.Name = "label112"; - this.label112.Size = new System.Drawing.Size(59, 13); - this.label112.TabIndex = 7; - this.label112.Text = "Entity type:"; - // - // ScenarioEntityGoToButton - // - this.ScenarioEntityGoToButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioEntityGoToButton.Location = new System.Drawing.Point(341, 1); - this.ScenarioEntityGoToButton.Name = "ScenarioEntityGoToButton"; - this.ScenarioEntityGoToButton.Size = new System.Drawing.Size(68, 23); - this.ScenarioEntityGoToButton.TabIndex = 6; - this.ScenarioEntityGoToButton.Text = "Go to"; - this.ScenarioEntityGoToButton.UseVisualStyleBackColor = true; - this.ScenarioEntityGoToButton.Click += new System.EventHandler(this.ScenarioEntityGoToButton_Click); - // - // ScenarioEntityPositionTextBox - // - this.ScenarioEntityPositionTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioEntityPositionTextBox.Location = new System.Drawing.Point(91, 3); - this.ScenarioEntityPositionTextBox.Name = "ScenarioEntityPositionTextBox"; - this.ScenarioEntityPositionTextBox.Size = new System.Drawing.Size(244, 20); - this.ScenarioEntityPositionTextBox.TabIndex = 5; - this.ScenarioEntityPositionTextBox.TextChanged += new System.EventHandler(this.ScenarioEntityPositionTextBox_TextChanged); - // - // label104 - // - this.label104.AutoSize = true; - this.label104.Location = new System.Drawing.Point(10, 6); - this.label104.Name = "label104"; - this.label104.Size = new System.Drawing.Size(75, 13); - this.label104.TabIndex = 4; - this.label104.Text = "Entity position:"; - // - // ScenarioEntityAddToProjectButton - // - this.ScenarioEntityAddToProjectButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioEntityAddToProjectButton.Enabled = false; - this.ScenarioEntityAddToProjectButton.Location = new System.Drawing.Point(319, 2); - this.ScenarioEntityAddToProjectButton.Name = "ScenarioEntityAddToProjectButton"; - this.ScenarioEntityAddToProjectButton.Size = new System.Drawing.Size(90, 23); - this.ScenarioEntityAddToProjectButton.TabIndex = 6; - this.ScenarioEntityAddToProjectButton.Text = "Add to Project"; - this.ScenarioEntityAddToProjectButton.UseVisualStyleBackColor = true; - this.ScenarioEntityAddToProjectButton.Click += new System.EventHandler(this.ScenarioEntityAddToProjectButton_Click); - // - // ScenarioEntityCheckBox - // - this.ScenarioEntityCheckBox.AutoSize = true; - this.ScenarioEntityCheckBox.Location = new System.Drawing.Point(6, 6); - this.ScenarioEntityCheckBox.Name = "ScenarioEntityCheckBox"; - this.ScenarioEntityCheckBox.Size = new System.Drawing.Size(129, 17); - this.ScenarioEntityCheckBox.TabIndex = 5; - this.ScenarioEntityCheckBox.Text = "Define Entity Override"; - this.ScenarioEntityCheckBox.UseVisualStyleBackColor = true; - this.ScenarioEntityCheckBox.CheckedChanged += new System.EventHandler(this.ScenarioEntityCheckBox_CheckedChanged); - // - // ScenarioEntityPointTabPage - // - this.ScenarioEntityPointTabPage.Controls.Add(this.ScenarioEntityPointDeleteButton); - this.ScenarioEntityPointTabPage.Controls.Add(this.ScenarioEntityPointAddToProjectButton); - this.ScenarioEntityPointTabPage.Controls.Add(this.ScenarioEntityPointCheckBox); - this.ScenarioEntityPointTabPage.Controls.Add(this.ScenarioEntityPointPanel); - this.ScenarioEntityPointTabPage.Location = new System.Drawing.Point(4, 22); - this.ScenarioEntityPointTabPage.Name = "ScenarioEntityPointTabPage"; - this.ScenarioEntityPointTabPage.Size = new System.Drawing.Size(510, 443); - this.ScenarioEntityPointTabPage.TabIndex = 2; - this.ScenarioEntityPointTabPage.Text = "Entity Point"; - this.ScenarioEntityPointTabPage.UseVisualStyleBackColor = true; - // - // ScenarioEntityPointDeleteButton - // - this.ScenarioEntityPointDeleteButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioEntityPointDeleteButton.Enabled = false; - this.ScenarioEntityPointDeleteButton.Location = new System.Drawing.Point(415, 2); - this.ScenarioEntityPointDeleteButton.Name = "ScenarioEntityPointDeleteButton"; - this.ScenarioEntityPointDeleteButton.Size = new System.Drawing.Size(90, 23); - this.ScenarioEntityPointDeleteButton.TabIndex = 3; - this.ScenarioEntityPointDeleteButton.Text = "Delete Point"; - this.ScenarioEntityPointDeleteButton.UseVisualStyleBackColor = true; - this.ScenarioEntityPointDeleteButton.Click += new System.EventHandler(this.ScenarioEntityPointDeleteButton_Click); - // - // ScenarioEntityPointAddToProjectButton - // - this.ScenarioEntityPointAddToProjectButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioEntityPointAddToProjectButton.Enabled = false; - this.ScenarioEntityPointAddToProjectButton.Location = new System.Drawing.Point(319, 2); - this.ScenarioEntityPointAddToProjectButton.Name = "ScenarioEntityPointAddToProjectButton"; - this.ScenarioEntityPointAddToProjectButton.Size = new System.Drawing.Size(90, 23); - this.ScenarioEntityPointAddToProjectButton.TabIndex = 2; - this.ScenarioEntityPointAddToProjectButton.Text = "Add to Project"; - this.ScenarioEntityPointAddToProjectButton.UseVisualStyleBackColor = true; - this.ScenarioEntityPointAddToProjectButton.Click += new System.EventHandler(this.ScenarioEntityPointAddToProjectButton_Click); - // - // ScenarioEntityPointCheckBox - // - this.ScenarioEntityPointCheckBox.AutoSize = true; - this.ScenarioEntityPointCheckBox.Location = new System.Drawing.Point(6, 6); - this.ScenarioEntityPointCheckBox.Name = "ScenarioEntityPointCheckBox"; - this.ScenarioEntityPointCheckBox.Size = new System.Drawing.Size(156, 17); - this.ScenarioEntityPointCheckBox.TabIndex = 1; - this.ScenarioEntityPointCheckBox.Text = "Define Entity Override Point"; - this.ScenarioEntityPointCheckBox.UseVisualStyleBackColor = true; - this.ScenarioEntityPointCheckBox.CheckedChanged += new System.EventHandler(this.ScenarioEntityPointCheckBox_CheckedChanged); - // - // ScenarioEntityPointPanel - // - this.ScenarioEntityPointPanel.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.ScenarioEntityPointPanel.Controls.Add(this.ScenarioEntityPointNameHashLabel); - this.ScenarioEntityPointPanel.Controls.Add(this.ScenarioEntityPointNameTextBox); - this.ScenarioEntityPointPanel.Controls.Add(this.ScenarioEntityPointFlagsCheckedListBox); - this.ScenarioEntityPointPanel.Controls.Add(this.label135); - this.ScenarioEntityPointPanel.Controls.Add(this.ScenarioEntityPointFlagsUpDown); - this.ScenarioEntityPointPanel.Controls.Add(this.ScenarioEntityPointShortRangeCheckBox); - this.ScenarioEntityPointPanel.Controls.Add(this.ScenarioEntityPointExtendedRangeCheckBox); - this.ScenarioEntityPointPanel.Controls.Add(this.ScenarioEntityPointHighPriCheckBox); - this.ScenarioEntityPointPanel.Controls.Add(this.label133); - this.ScenarioEntityPointPanel.Controls.Add(this.ScenarioEntityPointEndUpDown); - this.ScenarioEntityPointPanel.Controls.Add(this.ScenarioEntityPointStartUpDown); - this.ScenarioEntityPointPanel.Controls.Add(this.label134); - this.ScenarioEntityPointPanel.Controls.Add(this.ScenarioEntityPointRadiusTextBox); - this.ScenarioEntityPointPanel.Controls.Add(this.label132); - this.ScenarioEntityPointPanel.Controls.Add(this.ScenarioEntityPointTimeTillPedLeavesTextBox); - this.ScenarioEntityPointPanel.Controls.Add(this.label131); - this.ScenarioEntityPointPanel.Controls.Add(this.ScenarioEntityPointProbabilityTextBox); - this.ScenarioEntityPointPanel.Controls.Add(this.label130); - this.ScenarioEntityPointPanel.Controls.Add(this.ScenarioEntityPointAvailableInMpSpComboBox); - this.ScenarioEntityPointPanel.Controls.Add(this.label129); - this.ScenarioEntityPointPanel.Controls.Add(this.ScenarioEntityPointRequiredImapHashLabel); - this.ScenarioEntityPointPanel.Controls.Add(this.ScenarioEntityPointRequiredImapTextBox); - this.ScenarioEntityPointPanel.Controls.Add(this.label128); - this.ScenarioEntityPointPanel.Controls.Add(this.ScenarioEntityPointInteriorHashLabel); - this.ScenarioEntityPointPanel.Controls.Add(this.ScenarioEntityPointInteriorTextBox); - this.ScenarioEntityPointPanel.Controls.Add(this.label126); - this.ScenarioEntityPointPanel.Controls.Add(this.ScenarioEntityPointGroupHashLabel); - this.ScenarioEntityPointPanel.Controls.Add(this.ScenarioEntityPointGroupTextBox); - this.ScenarioEntityPointPanel.Controls.Add(this.label124); - this.ScenarioEntityPointPanel.Controls.Add(this.ScenarioEntityPointPedTypeHashLabel); - this.ScenarioEntityPointPanel.Controls.Add(this.ScenarioEntityPointPedTypeTextBox); - this.ScenarioEntityPointPanel.Controls.Add(this.label122); - this.ScenarioEntityPointPanel.Controls.Add(this.ScenarioEntityPointSpawnTypeHashLabel); - this.ScenarioEntityPointPanel.Controls.Add(this.ScenarioEntityPointSpawnTypeTextBox); - this.ScenarioEntityPointPanel.Controls.Add(this.label120); - this.ScenarioEntityPointPanel.Controls.Add(this.ScenarioEntityPointRotationTextBox); - this.ScenarioEntityPointPanel.Controls.Add(this.label118); - this.ScenarioEntityPointPanel.Controls.Add(this.ScenarioEntityPointGoToButton); - this.ScenarioEntityPointPanel.Controls.Add(this.ScenarioEntityPointPositionTextBox); - this.ScenarioEntityPointPanel.Controls.Add(this.label117); - this.ScenarioEntityPointPanel.Controls.Add(this.label116); - this.ScenarioEntityPointPanel.Enabled = false; - this.ScenarioEntityPointPanel.Location = new System.Drawing.Point(0, 29); - this.ScenarioEntityPointPanel.Name = "ScenarioEntityPointPanel"; - this.ScenarioEntityPointPanel.Size = new System.Drawing.Size(510, 414); - this.ScenarioEntityPointPanel.TabIndex = 4; - // - // ScenarioEntityPointNameHashLabel - // - this.ScenarioEntityPointNameHashLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioEntityPointNameHashLabel.AutoSize = true; - this.ScenarioEntityPointNameHashLabel.Location = new System.Drawing.Point(387, 53); - this.ScenarioEntityPointNameHashLabel.Name = "ScenarioEntityPointNameHashLabel"; - this.ScenarioEntityPointNameHashLabel.Size = new System.Drawing.Size(44, 13); - this.ScenarioEntityPointNameHashLabel.TabIndex = 12; - this.ScenarioEntityPointNameHashLabel.Text = "Hash: 0"; - // - // ScenarioEntityPointNameTextBox - // - this.ScenarioEntityPointNameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioEntityPointNameTextBox.Location = new System.Drawing.Point(109, 50); - this.ScenarioEntityPointNameTextBox.Name = "ScenarioEntityPointNameTextBox"; - this.ScenarioEntityPointNameTextBox.Size = new System.Drawing.Size(272, 20); - this.ScenarioEntityPointNameTextBox.TabIndex = 11; - this.ScenarioEntityPointNameTextBox.TextChanged += new System.EventHandler(this.ScenarioEntityPointNameTextBox_TextChanged); - // - // ScenarioEntityPointFlagsCheckedListBox - // - this.ScenarioEntityPointFlagsCheckedListBox.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.ScenarioEntityPointFlagsCheckedListBox.CheckOnClick = true; - this.ScenarioEntityPointFlagsCheckedListBox.FormattingEnabled = true; - this.ScenarioEntityPointFlagsCheckedListBox.Items.AddRange(new object[] { - "1 - IgnoreMaxInRange", - "2 - NoSpawn", - "4 - StationaryReactions", - "8 - Unk", - "16 - Unk", - "32 - ActivateVehicleSiren", - "64 - AggressiveVehicleDriving", - "128 - Unk", - "256 - Unk", - "512 - Unk", - "1024 - AerialVehiclePoint", - "2048 - TerritorialScenario", - "4096 - Unk", - "8192 - Unk", - "16384 - Unk", - "32768 - Unk", - "65536 - InWater", - "131072 - Unk", - "262144 - OpenDoor", - "524288 - PreciseUseTime", - "1048576 - Unk", - "2097152 - Unk", - "4194304 - ExtendedRange", - "8388608 - ShortRange", - "16777216 - HighPriority", - "33554432 - IgnoreLoitering", - "67108864 - UseSearchlight", - "134217728 - ResetNoCollisionOnCleanUp", - "268435456 - Unk", - "536870912 - Unk", - "1073741824 - IgnoreWeatherRestrictions"}); - this.ScenarioEntityPointFlagsCheckedListBox.Location = new System.Drawing.Point(269, 193); - this.ScenarioEntityPointFlagsCheckedListBox.Name = "ScenarioEntityPointFlagsCheckedListBox"; - this.ScenarioEntityPointFlagsCheckedListBox.Size = new System.Drawing.Size(214, 214); - this.ScenarioEntityPointFlagsCheckedListBox.TabIndex = 45; - this.ScenarioEntityPointFlagsCheckedListBox.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.ScenarioEntityPointFlagsCheckedListBox_ItemCheck); - // - // label135 - // - this.label135.AutoSize = true; - this.label135.Location = new System.Drawing.Point(68, 389); - this.label135.Name = "label135"; - this.label135.Size = new System.Drawing.Size(35, 13); - this.label135.TabIndex = 43; - this.label135.Text = "Flags:"; - // - // ScenarioEntityPointFlagsUpDown - // - this.ScenarioEntityPointFlagsUpDown.Location = new System.Drawing.Point(109, 387); - this.ScenarioEntityPointFlagsUpDown.Maximum = new decimal(new int[] { - -1, - 0, - 0, - 0}); - this.ScenarioEntityPointFlagsUpDown.Name = "ScenarioEntityPointFlagsUpDown"; - this.ScenarioEntityPointFlagsUpDown.Size = new System.Drawing.Size(154, 20); - this.ScenarioEntityPointFlagsUpDown.TabIndex = 44; - this.ScenarioEntityPointFlagsUpDown.ValueChanged += new System.EventHandler(this.ScenarioEntityPointFlagsUpDown_ValueChanged); - // - // ScenarioEntityPointShortRangeCheckBox - // - this.ScenarioEntityPointShortRangeCheckBox.AutoSize = true; - this.ScenarioEntityPointShortRangeCheckBox.Location = new System.Drawing.Point(109, 364); - this.ScenarioEntityPointShortRangeCheckBox.Name = "ScenarioEntityPointShortRangeCheckBox"; - this.ScenarioEntityPointShortRangeCheckBox.Size = new System.Drawing.Size(83, 17); - this.ScenarioEntityPointShortRangeCheckBox.TabIndex = 42; - this.ScenarioEntityPointShortRangeCheckBox.Text = "ShortRange"; - this.ScenarioEntityPointShortRangeCheckBox.UseVisualStyleBackColor = true; - this.ScenarioEntityPointShortRangeCheckBox.CheckedChanged += new System.EventHandler(this.ScenarioEntityPointShortRangeCheckBox_CheckedChanged); - // - // ScenarioEntityPointExtendedRangeCheckBox - // - this.ScenarioEntityPointExtendedRangeCheckBox.AutoSize = true; - this.ScenarioEntityPointExtendedRangeCheckBox.Location = new System.Drawing.Point(109, 346); - this.ScenarioEntityPointExtendedRangeCheckBox.Name = "ScenarioEntityPointExtendedRangeCheckBox"; - this.ScenarioEntityPointExtendedRangeCheckBox.Size = new System.Drawing.Size(103, 17); - this.ScenarioEntityPointExtendedRangeCheckBox.TabIndex = 41; - this.ScenarioEntityPointExtendedRangeCheckBox.Text = "ExtendedRange"; - this.ScenarioEntityPointExtendedRangeCheckBox.UseVisualStyleBackColor = true; - this.ScenarioEntityPointExtendedRangeCheckBox.CheckedChanged += new System.EventHandler(this.ScenarioEntityPointExtendedRangeCheckBox_CheckedChanged); - // - // ScenarioEntityPointHighPriCheckBox - // - this.ScenarioEntityPointHighPriCheckBox.AutoSize = true; - this.ScenarioEntityPointHighPriCheckBox.Location = new System.Drawing.Point(109, 328); - this.ScenarioEntityPointHighPriCheckBox.Name = "ScenarioEntityPointHighPriCheckBox"; - this.ScenarioEntityPointHighPriCheckBox.Size = new System.Drawing.Size(60, 17); - this.ScenarioEntityPointHighPriCheckBox.TabIndex = 40; - this.ScenarioEntityPointHighPriCheckBox.Text = "HighPri"; - this.ScenarioEntityPointHighPriCheckBox.UseVisualStyleBackColor = true; - this.ScenarioEntityPointHighPriCheckBox.CheckedChanged += new System.EventHandler(this.ScenarioEntityPointHighPriCheckBox_CheckedChanged); - // - // label133 - // - this.label133.AutoSize = true; - this.label133.Location = new System.Drawing.Point(74, 306); - this.label133.Name = "label133"; - this.label133.Size = new System.Drawing.Size(29, 13); - this.label133.TabIndex = 38; - this.label133.Text = "End:"; - // - // ScenarioEntityPointEndUpDown - // - this.ScenarioEntityPointEndUpDown.Location = new System.Drawing.Point(109, 304); - this.ScenarioEntityPointEndUpDown.Maximum = new decimal(new int[] { - 24, - 0, - 0, - 0}); - this.ScenarioEntityPointEndUpDown.Name = "ScenarioEntityPointEndUpDown"; - this.ScenarioEntityPointEndUpDown.Size = new System.Drawing.Size(57, 20); - this.ScenarioEntityPointEndUpDown.TabIndex = 39; - this.ScenarioEntityPointEndUpDown.ValueChanged += new System.EventHandler(this.ScenarioEntityPointEndUpDown_ValueChanged); - // - // ScenarioEntityPointStartUpDown - // - this.ScenarioEntityPointStartUpDown.Location = new System.Drawing.Point(109, 281); - this.ScenarioEntityPointStartUpDown.Maximum = new decimal(new int[] { - 24, - 0, - 0, - 0}); - this.ScenarioEntityPointStartUpDown.Name = "ScenarioEntityPointStartUpDown"; - this.ScenarioEntityPointStartUpDown.Size = new System.Drawing.Size(57, 20); - this.ScenarioEntityPointStartUpDown.TabIndex = 37; - this.ScenarioEntityPointStartUpDown.ValueChanged += new System.EventHandler(this.ScenarioEntityPointStartUpDown_ValueChanged); - // - // label134 - // - this.label134.AutoSize = true; - this.label134.Location = new System.Drawing.Point(71, 283); - this.label134.Name = "label134"; - this.label134.Size = new System.Drawing.Size(32, 13); - this.label134.TabIndex = 36; - this.label134.Text = "Start:"; - // - // ScenarioEntityPointRadiusTextBox - // - this.ScenarioEntityPointRadiusTextBox.Location = new System.Drawing.Point(109, 258); - this.ScenarioEntityPointRadiusTextBox.Name = "ScenarioEntityPointRadiusTextBox"; - this.ScenarioEntityPointRadiusTextBox.Size = new System.Drawing.Size(88, 20); - this.ScenarioEntityPointRadiusTextBox.TabIndex = 35; - this.ScenarioEntityPointRadiusTextBox.TextChanged += new System.EventHandler(this.ScenarioEntityPointRadiusTextBox_TextChanged); - // - // label132 - // - this.label132.AutoSize = true; - this.label132.Location = new System.Drawing.Point(60, 261); - this.label132.Name = "label132"; - this.label132.Size = new System.Drawing.Size(43, 13); - this.label132.TabIndex = 34; - this.label132.Text = "Radius:"; - // - // ScenarioEntityPointTimeTillPedLeavesTextBox - // - this.ScenarioEntityPointTimeTillPedLeavesTextBox.Location = new System.Drawing.Point(109, 235); - this.ScenarioEntityPointTimeTillPedLeavesTextBox.Name = "ScenarioEntityPointTimeTillPedLeavesTextBox"; - this.ScenarioEntityPointTimeTillPedLeavesTextBox.Size = new System.Drawing.Size(88, 20); - this.ScenarioEntityPointTimeTillPedLeavesTextBox.TabIndex = 33; - this.ScenarioEntityPointTimeTillPedLeavesTextBox.TextChanged += new System.EventHandler(this.ScenarioEntityPointTimeTillPedLeavesTextBox_TextChanged); - // - // label131 - // - this.label131.AutoSize = true; - this.label131.Location = new System.Drawing.Point(3, 238); - this.label131.Name = "label131"; - this.label131.Size = new System.Drawing.Size(100, 13); - this.label131.TabIndex = 32; - this.label131.Text = "TimeTillPedLeaves:"; - // - // ScenarioEntityPointProbabilityTextBox - // - this.ScenarioEntityPointProbabilityTextBox.Location = new System.Drawing.Point(109, 212); - this.ScenarioEntityPointProbabilityTextBox.Name = "ScenarioEntityPointProbabilityTextBox"; - this.ScenarioEntityPointProbabilityTextBox.Size = new System.Drawing.Size(88, 20); - this.ScenarioEntityPointProbabilityTextBox.TabIndex = 31; - this.ScenarioEntityPointProbabilityTextBox.TextChanged += new System.EventHandler(this.ScenarioEntityPointProbabilityTextBox_TextChanged); - // - // label130 - // - this.label130.AutoSize = true; - this.label130.Location = new System.Drawing.Point(45, 215); - this.label130.Name = "label130"; - this.label130.Size = new System.Drawing.Size(58, 13); - this.label130.TabIndex = 30; - this.label130.Text = "Probability:"; - // - // ScenarioEntityPointAvailableInMpSpComboBox - // - this.ScenarioEntityPointAvailableInMpSpComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.ScenarioEntityPointAvailableInMpSpComboBox.FormattingEnabled = true; - this.ScenarioEntityPointAvailableInMpSpComboBox.Location = new System.Drawing.Point(109, 188); - this.ScenarioEntityPointAvailableInMpSpComboBox.Name = "ScenarioEntityPointAvailableInMpSpComboBox"; - this.ScenarioEntityPointAvailableInMpSpComboBox.Size = new System.Drawing.Size(88, 21); - this.ScenarioEntityPointAvailableInMpSpComboBox.TabIndex = 29; - this.ScenarioEntityPointAvailableInMpSpComboBox.SelectedIndexChanged += new System.EventHandler(this.ScenarioEntityPointAvailableInMpSpComboBox_SelectedIndexChanged); - // - // label129 - // - this.label129.AutoSize = true; - this.label129.Location = new System.Drawing.Point(14, 191); - this.label129.Name = "label129"; - this.label129.Size = new System.Drawing.Size(90, 13); - this.label129.TabIndex = 28; - this.label129.Text = "AvailableInMpSp:"; - // - // ScenarioEntityPointRequiredImapHashLabel - // - this.ScenarioEntityPointRequiredImapHashLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioEntityPointRequiredImapHashLabel.AutoSize = true; - this.ScenarioEntityPointRequiredImapHashLabel.Location = new System.Drawing.Point(387, 168); - this.ScenarioEntityPointRequiredImapHashLabel.Name = "ScenarioEntityPointRequiredImapHashLabel"; - this.ScenarioEntityPointRequiredImapHashLabel.Size = new System.Drawing.Size(44, 13); - this.ScenarioEntityPointRequiredImapHashLabel.TabIndex = 27; - this.ScenarioEntityPointRequiredImapHashLabel.Text = "Hash: 0"; - // - // ScenarioEntityPointRequiredImapTextBox - // - this.ScenarioEntityPointRequiredImapTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioEntityPointRequiredImapTextBox.Location = new System.Drawing.Point(109, 165); - this.ScenarioEntityPointRequiredImapTextBox.Name = "ScenarioEntityPointRequiredImapTextBox"; - this.ScenarioEntityPointRequiredImapTextBox.Size = new System.Drawing.Size(272, 20); - this.ScenarioEntityPointRequiredImapTextBox.TabIndex = 26; - this.ScenarioEntityPointRequiredImapTextBox.TextChanged += new System.EventHandler(this.ScenarioEntityPointRequiredImapTextBox_TextChanged); - // - // label128 - // - this.label128.AutoSize = true; - this.label128.Location = new System.Drawing.Point(24, 168); - this.label128.Name = "label128"; - this.label128.Size = new System.Drawing.Size(79, 13); - this.label128.TabIndex = 25; - this.label128.Text = "Required Imap:"; - // - // ScenarioEntityPointInteriorHashLabel - // - this.ScenarioEntityPointInteriorHashLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioEntityPointInteriorHashLabel.AutoSize = true; - this.ScenarioEntityPointInteriorHashLabel.Location = new System.Drawing.Point(387, 145); - this.ScenarioEntityPointInteriorHashLabel.Name = "ScenarioEntityPointInteriorHashLabel"; - this.ScenarioEntityPointInteriorHashLabel.Size = new System.Drawing.Size(44, 13); - this.ScenarioEntityPointInteriorHashLabel.TabIndex = 24; - this.ScenarioEntityPointInteriorHashLabel.Text = "Hash: 0"; - // - // ScenarioEntityPointInteriorTextBox - // - this.ScenarioEntityPointInteriorTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioEntityPointInteriorTextBox.Location = new System.Drawing.Point(109, 142); - this.ScenarioEntityPointInteriorTextBox.Name = "ScenarioEntityPointInteriorTextBox"; - this.ScenarioEntityPointInteriorTextBox.Size = new System.Drawing.Size(272, 20); - this.ScenarioEntityPointInteriorTextBox.TabIndex = 23; - this.ScenarioEntityPointInteriorTextBox.TextChanged += new System.EventHandler(this.ScenarioEntityPointInteriorTextBox_TextChanged); - // - // label126 - // - this.label126.AutoSize = true; - this.label126.Location = new System.Drawing.Point(61, 145); - this.label126.Name = "label126"; - this.label126.Size = new System.Drawing.Size(42, 13); - this.label126.TabIndex = 22; - this.label126.Text = "Interior:"; - // - // ScenarioEntityPointGroupHashLabel - // - this.ScenarioEntityPointGroupHashLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioEntityPointGroupHashLabel.AutoSize = true; - this.ScenarioEntityPointGroupHashLabel.Location = new System.Drawing.Point(387, 122); - this.ScenarioEntityPointGroupHashLabel.Name = "ScenarioEntityPointGroupHashLabel"; - this.ScenarioEntityPointGroupHashLabel.Size = new System.Drawing.Size(44, 13); - this.ScenarioEntityPointGroupHashLabel.TabIndex = 21; - this.ScenarioEntityPointGroupHashLabel.Text = "Hash: 0"; - // - // ScenarioEntityPointGroupTextBox - // - this.ScenarioEntityPointGroupTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioEntityPointGroupTextBox.Location = new System.Drawing.Point(109, 119); - this.ScenarioEntityPointGroupTextBox.Name = "ScenarioEntityPointGroupTextBox"; - this.ScenarioEntityPointGroupTextBox.Size = new System.Drawing.Size(272, 20); - this.ScenarioEntityPointGroupTextBox.TabIndex = 20; - this.ScenarioEntityPointGroupTextBox.TextChanged += new System.EventHandler(this.ScenarioEntityPointGroupTextBox_TextChanged); - // - // label124 - // - this.label124.AutoSize = true; - this.label124.Location = new System.Drawing.Point(64, 122); - this.label124.Name = "label124"; - this.label124.Size = new System.Drawing.Size(39, 13); - this.label124.TabIndex = 19; - this.label124.Text = "Group:"; - // - // ScenarioEntityPointPedTypeHashLabel - // - this.ScenarioEntityPointPedTypeHashLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioEntityPointPedTypeHashLabel.AutoSize = true; - this.ScenarioEntityPointPedTypeHashLabel.Location = new System.Drawing.Point(387, 99); - this.ScenarioEntityPointPedTypeHashLabel.Name = "ScenarioEntityPointPedTypeHashLabel"; - this.ScenarioEntityPointPedTypeHashLabel.Size = new System.Drawing.Size(44, 13); - this.ScenarioEntityPointPedTypeHashLabel.TabIndex = 18; - this.ScenarioEntityPointPedTypeHashLabel.Text = "Hash: 0"; - // - // ScenarioEntityPointPedTypeTextBox - // - this.ScenarioEntityPointPedTypeTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioEntityPointPedTypeTextBox.Location = new System.Drawing.Point(109, 96); - this.ScenarioEntityPointPedTypeTextBox.Name = "ScenarioEntityPointPedTypeTextBox"; - this.ScenarioEntityPointPedTypeTextBox.Size = new System.Drawing.Size(272, 20); - this.ScenarioEntityPointPedTypeTextBox.TabIndex = 17; - this.ScenarioEntityPointPedTypeTextBox.TextChanged += new System.EventHandler(this.ScenarioEntityPointPedTypeTextBox_TextChanged); - // - // label122 - // - this.label122.AutoSize = true; - this.label122.Location = new System.Drawing.Point(51, 99); - this.label122.Name = "label122"; - this.label122.Size = new System.Drawing.Size(52, 13); - this.label122.TabIndex = 16; - this.label122.Text = "Ped type:"; - // - // ScenarioEntityPointSpawnTypeHashLabel - // - this.ScenarioEntityPointSpawnTypeHashLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioEntityPointSpawnTypeHashLabel.AutoSize = true; - this.ScenarioEntityPointSpawnTypeHashLabel.Location = new System.Drawing.Point(387, 76); - this.ScenarioEntityPointSpawnTypeHashLabel.Name = "ScenarioEntityPointSpawnTypeHashLabel"; - this.ScenarioEntityPointSpawnTypeHashLabel.Size = new System.Drawing.Size(44, 13); - this.ScenarioEntityPointSpawnTypeHashLabel.TabIndex = 15; - this.ScenarioEntityPointSpawnTypeHashLabel.Text = "Hash: 0"; - // - // ScenarioEntityPointSpawnTypeTextBox - // - this.ScenarioEntityPointSpawnTypeTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioEntityPointSpawnTypeTextBox.Location = new System.Drawing.Point(109, 73); - this.ScenarioEntityPointSpawnTypeTextBox.Name = "ScenarioEntityPointSpawnTypeTextBox"; - this.ScenarioEntityPointSpawnTypeTextBox.Size = new System.Drawing.Size(272, 20); - this.ScenarioEntityPointSpawnTypeTextBox.TabIndex = 14; - this.ScenarioEntityPointSpawnTypeTextBox.TextChanged += new System.EventHandler(this.ScenarioEntityPointSpawnTypeTextBox_TextChanged); - // - // label120 - // - this.label120.AutoSize = true; - this.label120.Location = new System.Drawing.Point(37, 76); - this.label120.Name = "label120"; - this.label120.Size = new System.Drawing.Size(66, 13); - this.label120.TabIndex = 13; - this.label120.Text = "Spawn type:"; - // - // ScenarioEntityPointRotationTextBox - // - this.ScenarioEntityPointRotationTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioEntityPointRotationTextBox.Location = new System.Drawing.Point(109, 27); - this.ScenarioEntityPointRotationTextBox.Name = "ScenarioEntityPointRotationTextBox"; - this.ScenarioEntityPointRotationTextBox.Size = new System.Drawing.Size(272, 20); - this.ScenarioEntityPointRotationTextBox.TabIndex = 9; - this.ScenarioEntityPointRotationTextBox.TextChanged += new System.EventHandler(this.ScenarioEntityPointRotationTextBox_TextChanged); - // - // label118 - // - this.label118.AutoSize = true; - this.label118.Location = new System.Drawing.Point(27, 30); - this.label118.Name = "label118"; - this.label118.Size = new System.Drawing.Size(76, 13); - this.label118.TabIndex = 8; - this.label118.Text = "Offset rotation:"; - // - // ScenarioEntityPointGoToButton - // - this.ScenarioEntityPointGoToButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioEntityPointGoToButton.Location = new System.Drawing.Point(387, 2); - this.ScenarioEntityPointGoToButton.Name = "ScenarioEntityPointGoToButton"; - this.ScenarioEntityPointGoToButton.Size = new System.Drawing.Size(68, 23); - this.ScenarioEntityPointGoToButton.TabIndex = 7; - this.ScenarioEntityPointGoToButton.Text = "Go to"; - this.ScenarioEntityPointGoToButton.UseVisualStyleBackColor = true; - this.ScenarioEntityPointGoToButton.Click += new System.EventHandler(this.ScenarioEntityPointGoToButton_Click); - // - // ScenarioEntityPointPositionTextBox - // - this.ScenarioEntityPointPositionTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioEntityPointPositionTextBox.Location = new System.Drawing.Point(109, 4); - this.ScenarioEntityPointPositionTextBox.Name = "ScenarioEntityPointPositionTextBox"; - this.ScenarioEntityPointPositionTextBox.Size = new System.Drawing.Size(272, 20); - this.ScenarioEntityPointPositionTextBox.TabIndex = 6; - this.ScenarioEntityPointPositionTextBox.TextChanged += new System.EventHandler(this.ScenarioEntityPointPositionTextBox_TextChanged); - // - // label117 - // - this.label117.AutoSize = true; - this.label117.Location = new System.Drawing.Point(26, 7); - this.label117.Name = "label117"; - this.label117.Size = new System.Drawing.Size(77, 13); - this.label117.TabIndex = 5; - this.label117.Text = "Offset position:"; - // - // label116 - // - this.label116.AutoSize = true; - this.label116.Location = new System.Drawing.Point(65, 53); - this.label116.Name = "label116"; - this.label116.Size = new System.Drawing.Size(38, 13); - this.label116.TabIndex = 10; - this.label116.Text = "Name:"; - // - // ScenarioChainTabPage - // - this.ScenarioChainTabPage.Controls.Add(this.ScenarioChainDeleteButton); - this.ScenarioChainTabPage.Controls.Add(this.ScenarioChainAddToProjectButton); - this.ScenarioChainTabPage.Controls.Add(this.splitContainer3); - this.ScenarioChainTabPage.Location = new System.Drawing.Point(4, 22); - this.ScenarioChainTabPage.Name = "ScenarioChainTabPage"; - this.ScenarioChainTabPage.Size = new System.Drawing.Size(510, 443); - this.ScenarioChainTabPage.TabIndex = 3; - this.ScenarioChainTabPage.Text = "Chain"; - this.ScenarioChainTabPage.UseVisualStyleBackColor = true; - // - // ScenarioChainDeleteButton - // - this.ScenarioChainDeleteButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioChainDeleteButton.Enabled = false; - this.ScenarioChainDeleteButton.Location = new System.Drawing.Point(415, 2); - this.ScenarioChainDeleteButton.Name = "ScenarioChainDeleteButton"; - this.ScenarioChainDeleteButton.Size = new System.Drawing.Size(90, 23); - this.ScenarioChainDeleteButton.TabIndex = 9; - this.ScenarioChainDeleteButton.Text = "Delete Chain"; - this.ScenarioChainDeleteButton.UseVisualStyleBackColor = true; - this.ScenarioChainDeleteButton.Click += new System.EventHandler(this.ScenarioChainDeleteButton_Click); - // - // ScenarioChainAddToProjectButton - // - this.ScenarioChainAddToProjectButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioChainAddToProjectButton.Enabled = false; - this.ScenarioChainAddToProjectButton.Location = new System.Drawing.Point(319, 2); - this.ScenarioChainAddToProjectButton.Name = "ScenarioChainAddToProjectButton"; - this.ScenarioChainAddToProjectButton.Size = new System.Drawing.Size(90, 23); - this.ScenarioChainAddToProjectButton.TabIndex = 8; - this.ScenarioChainAddToProjectButton.Text = "Add to Project"; - this.ScenarioChainAddToProjectButton.UseVisualStyleBackColor = true; - this.ScenarioChainAddToProjectButton.Click += new System.EventHandler(this.ScenarioChainAddToProjectButton_Click); - // - // splitContainer3 - // - this.splitContainer3.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.splitContainer3.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; - this.splitContainer3.Location = new System.Drawing.Point(0, 31); - this.splitContainer3.Name = "splitContainer3"; - // - // splitContainer3.Panel1 - // - this.splitContainer3.Panel1.Controls.Add(this.ScenarioChainMoveEdgeDownButton); - this.splitContainer3.Panel1.Controls.Add(this.ScenarioChainMoveEdgeUpButton); - this.splitContainer3.Panel1.Controls.Add(this.label138); - this.splitContainer3.Panel1.Controls.Add(this.ScenarioChainUnk1UpDown); - this.splitContainer3.Panel1.Controls.Add(this.ScenarioChainRemoveEdgeButton); - this.splitContainer3.Panel1.Controls.Add(this.ScenarioChainAddEdgeButton); - this.splitContainer3.Panel1.Controls.Add(this.ScenarioChainEdgesListBox); - this.splitContainer3.Panel1.Controls.Add(this.ScenarioChainEdgeCountLabel); - // - // splitContainer3.Panel2 - // - this.splitContainer3.Panel2.Controls.Add(this.ScenarioChainEdgePanel); - this.splitContainer3.Size = new System.Drawing.Size(510, 412); - this.splitContainer3.SplitterDistance = 205; - this.splitContainer3.TabIndex = 1; - // - // ScenarioChainMoveEdgeDownButton - // - this.ScenarioChainMoveEdgeDownButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.ScenarioChainMoveEdgeDownButton.Location = new System.Drawing.Point(85, 353); - this.ScenarioChainMoveEdgeDownButton.Name = "ScenarioChainMoveEdgeDownButton"; - this.ScenarioChainMoveEdgeDownButton.Size = new System.Drawing.Size(76, 23); - this.ScenarioChainMoveEdgeDownButton.TabIndex = 5; - this.ScenarioChainMoveEdgeDownButton.Text = "Move Down"; - this.ScenarioChainMoveEdgeDownButton.UseVisualStyleBackColor = true; - this.ScenarioChainMoveEdgeDownButton.Click += new System.EventHandler(this.ScenarioChainMoveEdgeDownButton_Click); - // - // ScenarioChainMoveEdgeUpButton - // - this.ScenarioChainMoveEdgeUpButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.ScenarioChainMoveEdgeUpButton.Location = new System.Drawing.Point(3, 353); - this.ScenarioChainMoveEdgeUpButton.Name = "ScenarioChainMoveEdgeUpButton"; - this.ScenarioChainMoveEdgeUpButton.Size = new System.Drawing.Size(76, 23); - this.ScenarioChainMoveEdgeUpButton.TabIndex = 4; - this.ScenarioChainMoveEdgeUpButton.Text = "Move Up"; - this.ScenarioChainMoveEdgeUpButton.UseVisualStyleBackColor = true; - this.ScenarioChainMoveEdgeUpButton.Click += new System.EventHandler(this.ScenarioChainMoveEdgeUpButton_Click); - // - // label138 - // - this.label138.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.label138.AutoSize = true; - this.label138.Location = new System.Drawing.Point(10, 391); - this.label138.Name = "label138"; - this.label138.Size = new System.Drawing.Size(69, 13); - this.label138.TabIndex = 6; - this.label138.Text = "Chain Unk 1:"; - // - // ScenarioChainUnk1UpDown - // - this.ScenarioChainUnk1UpDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.ScenarioChainUnk1UpDown.Location = new System.Drawing.Point(85, 389); - this.ScenarioChainUnk1UpDown.Maximum = new decimal(new int[] { - 255, - 0, - 0, - 0}); - this.ScenarioChainUnk1UpDown.Name = "ScenarioChainUnk1UpDown"; - this.ScenarioChainUnk1UpDown.Size = new System.Drawing.Size(57, 20); - this.ScenarioChainUnk1UpDown.TabIndex = 7; - this.ScenarioChainUnk1UpDown.ValueChanged += new System.EventHandler(this.ScenarioChainUnk1UpDown_ValueChanged); - // - // ScenarioChainRemoveEdgeButton - // - this.ScenarioChainRemoveEdgeButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.ScenarioChainRemoveEdgeButton.Location = new System.Drawing.Point(85, 324); - this.ScenarioChainRemoveEdgeButton.Name = "ScenarioChainRemoveEdgeButton"; - this.ScenarioChainRemoveEdgeButton.Size = new System.Drawing.Size(76, 23); - this.ScenarioChainRemoveEdgeButton.TabIndex = 3; - this.ScenarioChainRemoveEdgeButton.Text = "Remove"; - this.ScenarioChainRemoveEdgeButton.UseVisualStyleBackColor = true; - this.ScenarioChainRemoveEdgeButton.Click += new System.EventHandler(this.ScenarioChainRemoveEdgeButton_Click); - // - // ScenarioChainAddEdgeButton - // - this.ScenarioChainAddEdgeButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.ScenarioChainAddEdgeButton.Location = new System.Drawing.Point(3, 324); - this.ScenarioChainAddEdgeButton.Name = "ScenarioChainAddEdgeButton"; - this.ScenarioChainAddEdgeButton.Size = new System.Drawing.Size(76, 23); - this.ScenarioChainAddEdgeButton.TabIndex = 2; - this.ScenarioChainAddEdgeButton.Text = "Add"; - this.ScenarioChainAddEdgeButton.UseVisualStyleBackColor = true; - this.ScenarioChainAddEdgeButton.Click += new System.EventHandler(this.ScenarioChainAddEdgeButton_Click); - // - // ScenarioChainEdgesListBox - // - this.ScenarioChainEdgesListBox.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.ScenarioChainEdgesListBox.FormattingEnabled = true; - this.ScenarioChainEdgesListBox.Location = new System.Drawing.Point(0, 0); - this.ScenarioChainEdgesListBox.Name = "ScenarioChainEdgesListBox"; - this.ScenarioChainEdgesListBox.Size = new System.Drawing.Size(202, 290); - this.ScenarioChainEdgesListBox.TabIndex = 0; - this.ScenarioChainEdgesListBox.SelectedIndexChanged += new System.EventHandler(this.ScenarioChainEdgesListBox_SelectedIndexChanged); - // - // ScenarioChainEdgeCountLabel - // - this.ScenarioChainEdgeCountLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.ScenarioChainEdgeCountLabel.AutoSize = true; - this.ScenarioChainEdgeCountLabel.Location = new System.Drawing.Point(3, 308); - this.ScenarioChainEdgeCountLabel.Name = "ScenarioChainEdgeCountLabel"; - this.ScenarioChainEdgeCountLabel.Size = new System.Drawing.Size(75, 13); - this.ScenarioChainEdgeCountLabel.TabIndex = 1; - this.ScenarioChainEdgeCountLabel.Text = "Edge Count: 0"; - // - // ScenarioChainEdgePanel - // - this.ScenarioChainEdgePanel.Controls.Add(this.ScenarioChainEdgeNavSpeedComboBox); - this.ScenarioChainEdgePanel.Controls.Add(this.label137); - this.ScenarioChainEdgePanel.Controls.Add(this.ScenarioChainEdgeNavModeComboBox); - this.ScenarioChainEdgePanel.Controls.Add(this.label136); - this.ScenarioChainEdgePanel.Controls.Add(this.ScenarioChainEdgeActionComboBox); - this.ScenarioChainEdgePanel.Controls.Add(this.label127); - this.ScenarioChainEdgePanel.Controls.Add(this.ScenarioChainEdgeNodeIndexToUpDown); - this.ScenarioChainEdgePanel.Controls.Add(this.ScenarioChainEdgeNodeIndexFromUpDown); - this.ScenarioChainEdgePanel.Controls.Add(this.label125); - this.ScenarioChainEdgePanel.Controls.Add(this.label121); - this.ScenarioChainEdgePanel.Dock = System.Windows.Forms.DockStyle.Fill; - this.ScenarioChainEdgePanel.Enabled = false; - this.ScenarioChainEdgePanel.Location = new System.Drawing.Point(0, 0); - this.ScenarioChainEdgePanel.Name = "ScenarioChainEdgePanel"; - this.ScenarioChainEdgePanel.Size = new System.Drawing.Size(301, 412); - this.ScenarioChainEdgePanel.TabIndex = 0; - // - // ScenarioChainEdgeNavSpeedComboBox - // - this.ScenarioChainEdgeNavSpeedComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.ScenarioChainEdgeNavSpeedComboBox.FormattingEnabled = true; - this.ScenarioChainEdgeNavSpeedComboBox.Location = new System.Drawing.Point(100, 118); - this.ScenarioChainEdgeNavSpeedComboBox.Name = "ScenarioChainEdgeNavSpeedComboBox"; - this.ScenarioChainEdgeNavSpeedComboBox.Size = new System.Drawing.Size(142, 21); - this.ScenarioChainEdgeNavSpeedComboBox.TabIndex = 10; - this.ScenarioChainEdgeNavSpeedComboBox.SelectedIndexChanged += new System.EventHandler(this.ScenarioChainEdgeNavSpeedComboBox_SelectedIndexChanged); - // - // label137 - // - this.label137.AutoSize = true; - this.label137.Location = new System.Drawing.Point(33, 121); - this.label137.Name = "label137"; - this.label137.Size = new System.Drawing.Size(61, 13); - this.label137.TabIndex = 9; - this.label137.Text = "NavSpeed:"; - // - // ScenarioChainEdgeNavModeComboBox - // - this.ScenarioChainEdgeNavModeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.ScenarioChainEdgeNavModeComboBox.FormattingEnabled = true; - this.ScenarioChainEdgeNavModeComboBox.Location = new System.Drawing.Point(100, 91); - this.ScenarioChainEdgeNavModeComboBox.Name = "ScenarioChainEdgeNavModeComboBox"; - this.ScenarioChainEdgeNavModeComboBox.Size = new System.Drawing.Size(142, 21); - this.ScenarioChainEdgeNavModeComboBox.TabIndex = 8; - this.ScenarioChainEdgeNavModeComboBox.SelectedIndexChanged += new System.EventHandler(this.ScenarioChainEdgeNavModeComboBox_SelectedIndexChanged); - // - // label136 - // - this.label136.AutoSize = true; - this.label136.Location = new System.Drawing.Point(37, 94); - this.label136.Name = "label136"; - this.label136.Size = new System.Drawing.Size(57, 13); - this.label136.TabIndex = 7; - this.label136.Text = "NavMode:"; - // - // ScenarioChainEdgeActionComboBox - // - this.ScenarioChainEdgeActionComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.ScenarioChainEdgeActionComboBox.FormattingEnabled = true; - this.ScenarioChainEdgeActionComboBox.Location = new System.Drawing.Point(100, 64); - this.ScenarioChainEdgeActionComboBox.Name = "ScenarioChainEdgeActionComboBox"; - this.ScenarioChainEdgeActionComboBox.Size = new System.Drawing.Size(142, 21); - this.ScenarioChainEdgeActionComboBox.TabIndex = 6; - this.ScenarioChainEdgeActionComboBox.SelectedIndexChanged += new System.EventHandler(this.ScenarioChainEdgeActionComboBox_SelectedIndexChanged); - // - // label127 - // - this.label127.AutoSize = true; - this.label127.Location = new System.Drawing.Point(54, 67); - this.label127.Name = "label127"; - this.label127.Size = new System.Drawing.Size(40, 13); - this.label127.TabIndex = 5; - this.label127.Text = "Action:"; - // - // ScenarioChainEdgeNodeIndexToUpDown - // - this.ScenarioChainEdgeNodeIndexToUpDown.Location = new System.Drawing.Point(100, 38); - this.ScenarioChainEdgeNodeIndexToUpDown.Maximum = new decimal(new int[] { - 65535, - 0, - 0, - 0}); - this.ScenarioChainEdgeNodeIndexToUpDown.Name = "ScenarioChainEdgeNodeIndexToUpDown"; - this.ScenarioChainEdgeNodeIndexToUpDown.Size = new System.Drawing.Size(81, 20); - this.ScenarioChainEdgeNodeIndexToUpDown.TabIndex = 4; - this.ScenarioChainEdgeNodeIndexToUpDown.ValueChanged += new System.EventHandler(this.ScenarioChainEdgeNodeIndexToUpDown_ValueChanged); - // - // ScenarioChainEdgeNodeIndexFromUpDown - // - this.ScenarioChainEdgeNodeIndexFromUpDown.Location = new System.Drawing.Point(100, 12); - this.ScenarioChainEdgeNodeIndexFromUpDown.Maximum = new decimal(new int[] { - 65535, - 0, - 0, - 0}); - this.ScenarioChainEdgeNodeIndexFromUpDown.Name = "ScenarioChainEdgeNodeIndexFromUpDown"; - this.ScenarioChainEdgeNodeIndexFromUpDown.Size = new System.Drawing.Size(81, 20); - this.ScenarioChainEdgeNodeIndexFromUpDown.TabIndex = 2; - this.ScenarioChainEdgeNodeIndexFromUpDown.ValueChanged += new System.EventHandler(this.ScenarioChainEdgeNodeIndexFromUpDown_ValueChanged); - // - // label125 - // - this.label125.AutoSize = true; - this.label125.Location = new System.Drawing.Point(19, 40); - this.label125.Name = "label125"; - this.label125.Size = new System.Drawing.Size(75, 13); - this.label125.TabIndex = 3; - this.label125.Text = "NodeIndexTo:"; - // - // label121 - // - this.label121.AutoSize = true; - this.label121.Location = new System.Drawing.Point(9, 14); - this.label121.Name = "label121"; - this.label121.Size = new System.Drawing.Size(85, 13); - this.label121.TabIndex = 1; - this.label121.Text = "NodeIndexFrom:"; - // - // ScenarioChainNodeTabPage - // - this.ScenarioChainNodeTabPage.Controls.Add(this.ScenarioChainNodePanel); - this.ScenarioChainNodeTabPage.Controls.Add(this.ScenarioChainNodeDeleteButton); - this.ScenarioChainNodeTabPage.Controls.Add(this.ScenarioChainNodeCheckBox); - this.ScenarioChainNodeTabPage.Controls.Add(this.ScenarioChainNodeAddToProjectButton); - this.ScenarioChainNodeTabPage.Location = new System.Drawing.Point(4, 22); - this.ScenarioChainNodeTabPage.Name = "ScenarioChainNodeTabPage"; - this.ScenarioChainNodeTabPage.Size = new System.Drawing.Size(510, 443); - this.ScenarioChainNodeTabPage.TabIndex = 6; - this.ScenarioChainNodeTabPage.Text = "Chain Node"; - this.ScenarioChainNodeTabPage.UseVisualStyleBackColor = true; - // - // ScenarioChainNodePanel - // - this.ScenarioChainNodePanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioChainNodePanel.Controls.Add(this.ScenarioChainNodeTypeComboBox); - this.ScenarioChainNodePanel.Controls.Add(this.ScenarioChainNodeIndexTextBox); - this.ScenarioChainNodePanel.Controls.Add(this.label115); - this.ScenarioChainNodePanel.Controls.Add(this.ScenarioChainNodeLastCheckBox); - this.ScenarioChainNodePanel.Controls.Add(this.ScenarioChainNodeFirstCheckBox); - this.ScenarioChainNodePanel.Controls.Add(this.label123); - this.ScenarioChainNodePanel.Controls.Add(this.ScenarioChainNodeUnk1HashLabel); - this.ScenarioChainNodePanel.Controls.Add(this.ScenarioChainNodeUnk1TextBox); - this.ScenarioChainNodePanel.Controls.Add(this.label119); - this.ScenarioChainNodePanel.Controls.Add(this.ScenarioChainNodeGoToButton); - this.ScenarioChainNodePanel.Controls.Add(this.ScenarioChainNodePositionTextBox); - this.ScenarioChainNodePanel.Controls.Add(this.label105); - this.ScenarioChainNodePanel.Enabled = false; - this.ScenarioChainNodePanel.Location = new System.Drawing.Point(0, 29); - this.ScenarioChainNodePanel.Name = "ScenarioChainNodePanel"; - this.ScenarioChainNodePanel.Size = new System.Drawing.Size(510, 201); - this.ScenarioChainNodePanel.TabIndex = 8; - // - // ScenarioChainNodeTypeComboBox - // - this.ScenarioChainNodeTypeComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioChainNodeTypeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.ScenarioChainNodeTypeComboBox.FormattingEnabled = true; - this.ScenarioChainNodeTypeComboBox.Location = new System.Drawing.Point(73, 55); - this.ScenarioChainNodeTypeComboBox.Name = "ScenarioChainNodeTypeComboBox"; - this.ScenarioChainNodeTypeComboBox.Size = new System.Drawing.Size(336, 21); - this.ScenarioChainNodeTypeComboBox.TabIndex = 12; - this.ScenarioChainNodeTypeComboBox.SelectedIndexChanged += new System.EventHandler(this.ScenarioChainNodeTypeComboBox_SelectedIndexChanged); - // - // ScenarioChainNodeIndexTextBox - // - this.ScenarioChainNodeIndexTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioChainNodeIndexTextBox.Location = new System.Drawing.Point(73, 142); - this.ScenarioChainNodeIndexTextBox.Name = "ScenarioChainNodeIndexTextBox"; - this.ScenarioChainNodeIndexTextBox.ReadOnly = true; - this.ScenarioChainNodeIndexTextBox.Size = new System.Drawing.Size(94, 20); - this.ScenarioChainNodeIndexTextBox.TabIndex = 17; - // - // label115 - // - this.label115.AutoSize = true; - this.label115.Location = new System.Drawing.Point(33, 145); - this.label115.Name = "label115"; - this.label115.Size = new System.Drawing.Size(36, 13); - this.label115.TabIndex = 16; - this.label115.Text = "Index:"; - // - // ScenarioChainNodeLastCheckBox - // - this.ScenarioChainNodeLastCheckBox.AutoSize = true; - this.ScenarioChainNodeLastCheckBox.Location = new System.Drawing.Point(73, 105); - this.ScenarioChainNodeLastCheckBox.Name = "ScenarioChainNodeLastCheckBox"; - this.ScenarioChainNodeLastCheckBox.Size = new System.Drawing.Size(86, 17); - this.ScenarioChainNodeLastCheckBox.TabIndex = 15; - this.ScenarioChainNodeLastCheckBox.Text = "Last in chain"; - this.ScenarioChainNodeLastCheckBox.UseVisualStyleBackColor = true; - this.ScenarioChainNodeLastCheckBox.CheckedChanged += new System.EventHandler(this.ScenarioChainNodeLastCheckBox_CheckedChanged); - // - // ScenarioChainNodeFirstCheckBox - // - this.ScenarioChainNodeFirstCheckBox.AutoSize = true; - this.ScenarioChainNodeFirstCheckBox.Location = new System.Drawing.Point(73, 82); - this.ScenarioChainNodeFirstCheckBox.Name = "ScenarioChainNodeFirstCheckBox"; - this.ScenarioChainNodeFirstCheckBox.Size = new System.Drawing.Size(85, 17); - this.ScenarioChainNodeFirstCheckBox.TabIndex = 14; - this.ScenarioChainNodeFirstCheckBox.Text = "First in chain"; - this.ScenarioChainNodeFirstCheckBox.UseVisualStyleBackColor = true; - this.ScenarioChainNodeFirstCheckBox.CheckedChanged += new System.EventHandler(this.ScenarioChainNodeFirstCheckBox_CheckedChanged); - // - // label123 - // - this.label123.AutoSize = true; - this.label123.Location = new System.Drawing.Point(33, 58); - this.label123.Name = "label123"; - this.label123.Size = new System.Drawing.Size(34, 13); - this.label123.TabIndex = 11; - this.label123.Text = "Type:"; - // - // ScenarioChainNodeUnk1HashLabel - // - this.ScenarioChainNodeUnk1HashLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioChainNodeUnk1HashLabel.AutoSize = true; - this.ScenarioChainNodeUnk1HashLabel.Location = new System.Drawing.Point(341, 32); - this.ScenarioChainNodeUnk1HashLabel.Name = "ScenarioChainNodeUnk1HashLabel"; - this.ScenarioChainNodeUnk1HashLabel.Size = new System.Drawing.Size(44, 13); - this.ScenarioChainNodeUnk1HashLabel.TabIndex = 10; - this.ScenarioChainNodeUnk1HashLabel.Text = "Hash: 0"; - // - // ScenarioChainNodeUnk1TextBox - // - this.ScenarioChainNodeUnk1TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioChainNodeUnk1TextBox.Location = new System.Drawing.Point(73, 29); - this.ScenarioChainNodeUnk1TextBox.Name = "ScenarioChainNodeUnk1TextBox"; - this.ScenarioChainNodeUnk1TextBox.Size = new System.Drawing.Size(262, 20); - this.ScenarioChainNodeUnk1TextBox.TabIndex = 9; - this.ScenarioChainNodeUnk1TextBox.TextChanged += new System.EventHandler(this.ScenarioChainNodeUnk1TextBox_TextChanged); - // - // label119 - // - this.label119.AutoSize = true; - this.label119.Location = new System.Drawing.Point(28, 32); - this.label119.Name = "label119"; - this.label119.Size = new System.Drawing.Size(39, 13); - this.label119.TabIndex = 8; - this.label119.Text = "Unk 1:"; - // - // ScenarioChainNodeGoToButton - // - this.ScenarioChainNodeGoToButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioChainNodeGoToButton.Location = new System.Drawing.Point(341, 1); - this.ScenarioChainNodeGoToButton.Name = "ScenarioChainNodeGoToButton"; - this.ScenarioChainNodeGoToButton.Size = new System.Drawing.Size(68, 23); - this.ScenarioChainNodeGoToButton.TabIndex = 7; - this.ScenarioChainNodeGoToButton.Text = "Go to"; - this.ScenarioChainNodeGoToButton.UseVisualStyleBackColor = true; - this.ScenarioChainNodeGoToButton.Click += new System.EventHandler(this.ScenarioChainNodeGoToButton_Click); - // - // ScenarioChainNodePositionTextBox - // - this.ScenarioChainNodePositionTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioChainNodePositionTextBox.Location = new System.Drawing.Point(73, 3); - this.ScenarioChainNodePositionTextBox.Name = "ScenarioChainNodePositionTextBox"; - this.ScenarioChainNodePositionTextBox.Size = new System.Drawing.Size(262, 20); - this.ScenarioChainNodePositionTextBox.TabIndex = 6; - this.ScenarioChainNodePositionTextBox.TextChanged += new System.EventHandler(this.ScenarioChainNodePositionTextBox_TextChanged); - // - // label105 - // - this.label105.AutoSize = true; - this.label105.Location = new System.Drawing.Point(20, 6); - this.label105.Name = "label105"; - this.label105.Size = new System.Drawing.Size(47, 13); - this.label105.TabIndex = 5; - this.label105.Text = "Position:"; - // - // ScenarioChainNodeDeleteButton - // - this.ScenarioChainNodeDeleteButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioChainNodeDeleteButton.Enabled = false; - this.ScenarioChainNodeDeleteButton.Location = new System.Drawing.Point(415, 2); - this.ScenarioChainNodeDeleteButton.Name = "ScenarioChainNodeDeleteButton"; - this.ScenarioChainNodeDeleteButton.Size = new System.Drawing.Size(90, 23); - this.ScenarioChainNodeDeleteButton.TabIndex = 7; - this.ScenarioChainNodeDeleteButton.Text = "Delete Node"; - this.ScenarioChainNodeDeleteButton.UseVisualStyleBackColor = true; - this.ScenarioChainNodeDeleteButton.Click += new System.EventHandler(this.ScenarioChainNodeDeleteButton_Click); - // - // ScenarioChainNodeCheckBox - // - this.ScenarioChainNodeCheckBox.AutoSize = true; - this.ScenarioChainNodeCheckBox.Location = new System.Drawing.Point(6, 6); - this.ScenarioChainNodeCheckBox.Name = "ScenarioChainNodeCheckBox"; - this.ScenarioChainNodeCheckBox.Size = new System.Drawing.Size(116, 17); - this.ScenarioChainNodeCheckBox.TabIndex = 5; - this.ScenarioChainNodeCheckBox.Text = "Define Chain Node"; - this.ScenarioChainNodeCheckBox.UseVisualStyleBackColor = true; - this.ScenarioChainNodeCheckBox.CheckedChanged += new System.EventHandler(this.ScenarioChainNodeCheckBox_CheckedChanged); - // - // ScenarioChainNodeAddToProjectButton - // - this.ScenarioChainNodeAddToProjectButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioChainNodeAddToProjectButton.Enabled = false; - this.ScenarioChainNodeAddToProjectButton.Location = new System.Drawing.Point(319, 2); - this.ScenarioChainNodeAddToProjectButton.Name = "ScenarioChainNodeAddToProjectButton"; - this.ScenarioChainNodeAddToProjectButton.Size = new System.Drawing.Size(90, 23); - this.ScenarioChainNodeAddToProjectButton.TabIndex = 6; - this.ScenarioChainNodeAddToProjectButton.Text = "Add to Project"; - this.ScenarioChainNodeAddToProjectButton.UseVisualStyleBackColor = true; - this.ScenarioChainNodeAddToProjectButton.Click += new System.EventHandler(this.ScenarioChainNodeAddToProjectButton_Click); - // - // ScenarioClusterTabPage - // - this.ScenarioClusterTabPage.Controls.Add(this.ScenarioClusterDeleteButton); - this.ScenarioClusterTabPage.Controls.Add(this.ScenarioClusterAddToProjectButton); - this.ScenarioClusterTabPage.Controls.Add(this.ScenarioClusterCheckBox); - this.ScenarioClusterTabPage.Controls.Add(this.ScenarioClusterPanel); - this.ScenarioClusterTabPage.Location = new System.Drawing.Point(4, 22); - this.ScenarioClusterTabPage.Name = "ScenarioClusterTabPage"; - this.ScenarioClusterTabPage.Size = new System.Drawing.Size(510, 443); - this.ScenarioClusterTabPage.TabIndex = 4; - this.ScenarioClusterTabPage.Text = "Cluster"; - this.ScenarioClusterTabPage.UseVisualStyleBackColor = true; - // - // ScenarioClusterDeleteButton - // - this.ScenarioClusterDeleteButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioClusterDeleteButton.Enabled = false; - this.ScenarioClusterDeleteButton.Location = new System.Drawing.Point(415, 2); - this.ScenarioClusterDeleteButton.Name = "ScenarioClusterDeleteButton"; - this.ScenarioClusterDeleteButton.Size = new System.Drawing.Size(90, 23); - this.ScenarioClusterDeleteButton.TabIndex = 3; - this.ScenarioClusterDeleteButton.Text = "Delete Cluster"; - this.ScenarioClusterDeleteButton.UseVisualStyleBackColor = true; - this.ScenarioClusterDeleteButton.Click += new System.EventHandler(this.ScenarioClusterDeleteButton_Click); - // - // ScenarioClusterAddToProjectButton - // - this.ScenarioClusterAddToProjectButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioClusterAddToProjectButton.Enabled = false; - this.ScenarioClusterAddToProjectButton.Location = new System.Drawing.Point(319, 2); - this.ScenarioClusterAddToProjectButton.Name = "ScenarioClusterAddToProjectButton"; - this.ScenarioClusterAddToProjectButton.Size = new System.Drawing.Size(90, 23); - this.ScenarioClusterAddToProjectButton.TabIndex = 2; - this.ScenarioClusterAddToProjectButton.Text = "Add to Project"; - this.ScenarioClusterAddToProjectButton.UseVisualStyleBackColor = true; - this.ScenarioClusterAddToProjectButton.Click += new System.EventHandler(this.ScenarioClusterAddToProjectButton_Click); - // - // ScenarioClusterCheckBox - // - this.ScenarioClusterCheckBox.AutoSize = true; - this.ScenarioClusterCheckBox.Location = new System.Drawing.Point(6, 6); - this.ScenarioClusterCheckBox.Name = "ScenarioClusterCheckBox"; - this.ScenarioClusterCheckBox.Size = new System.Drawing.Size(92, 17); - this.ScenarioClusterCheckBox.TabIndex = 1; - this.ScenarioClusterCheckBox.Text = "Define Cluster"; - this.ScenarioClusterCheckBox.UseVisualStyleBackColor = true; - this.ScenarioClusterCheckBox.CheckedChanged += new System.EventHandler(this.ScenarioClusterCheckBox_CheckedChanged); - // - // ScenarioClusterPanel - // - this.ScenarioClusterPanel.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.ScenarioClusterPanel.Controls.Add(this.label159); - this.ScenarioClusterPanel.Controls.Add(this.ScenarioClusterAddPointButton); - this.ScenarioClusterPanel.Controls.Add(this.label158); - this.ScenarioClusterPanel.Controls.Add(this.ScenarioClusterPointsListBox); - this.ScenarioClusterPanel.Controls.Add(this.ScenarioClusterRadiusTextBox); - this.ScenarioClusterPanel.Controls.Add(this.label157); - this.ScenarioClusterPanel.Controls.Add(this.ScenarioClusterUnk2CheckBox); - this.ScenarioClusterPanel.Controls.Add(this.ScenarioClusterUnk1TextBox); - this.ScenarioClusterPanel.Controls.Add(this.label140); - this.ScenarioClusterPanel.Controls.Add(this.ScenarioClusterGoToButton); - this.ScenarioClusterPanel.Controls.Add(this.ScenarioClusterCenterTextBox); - this.ScenarioClusterPanel.Controls.Add(this.label139); - this.ScenarioClusterPanel.Enabled = false; - this.ScenarioClusterPanel.Location = new System.Drawing.Point(0, 29); - this.ScenarioClusterPanel.Name = "ScenarioClusterPanel"; - this.ScenarioClusterPanel.Size = new System.Drawing.Size(510, 415); - this.ScenarioClusterPanel.TabIndex = 4; - // - // label159 - // - this.label159.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.label159.AutoSize = true; - this.label159.Location = new System.Drawing.Point(341, 150); - this.label159.Name = "label159"; - this.label159.Size = new System.Drawing.Size(141, 13); - this.label159.TabIndex = 16; - this.label159.Text = "(Double-click to select point)"; - // - // ScenarioClusterAddPointButton - // - this.ScenarioClusterAddPointButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.ScenarioClusterAddPointButton.Location = new System.Drawing.Point(100, 337); - this.ScenarioClusterAddPointButton.Name = "ScenarioClusterAddPointButton"; - this.ScenarioClusterAddPointButton.Size = new System.Drawing.Size(90, 23); - this.ScenarioClusterAddPointButton.TabIndex = 15; - this.ScenarioClusterAddPointButton.Text = "Add Point"; - this.ScenarioClusterAddPointButton.UseVisualStyleBackColor = true; - this.ScenarioClusterAddPointButton.Click += new System.EventHandler(this.ScenarioClusterAddPointButton_Click); - // - // label158 - // - this.label158.AutoSize = true; - this.label158.Location = new System.Drawing.Point(51, 150); - this.label158.Name = "label158"; - this.label158.Size = new System.Drawing.Size(39, 13); - this.label158.TabIndex = 14; - this.label158.Text = "Points:"; - // - // ScenarioClusterPointsListBox - // - this.ScenarioClusterPointsListBox.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.ScenarioClusterPointsListBox.FormattingEnabled = true; - this.ScenarioClusterPointsListBox.Location = new System.Drawing.Point(100, 148); - this.ScenarioClusterPointsListBox.Name = "ScenarioClusterPointsListBox"; - this.ScenarioClusterPointsListBox.Size = new System.Drawing.Size(235, 173); - this.ScenarioClusterPointsListBox.TabIndex = 13; - this.ScenarioClusterPointsListBox.DoubleClick += new System.EventHandler(this.ScenarioClusterPointsListBox_DoubleClick); - // - // ScenarioClusterRadiusTextBox - // - this.ScenarioClusterRadiusTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioClusterRadiusTextBox.Location = new System.Drawing.Point(100, 29); - this.ScenarioClusterRadiusTextBox.Name = "ScenarioClusterRadiusTextBox"; - this.ScenarioClusterRadiusTextBox.Size = new System.Drawing.Size(163, 20); - this.ScenarioClusterRadiusTextBox.TabIndex = 9; - this.ScenarioClusterRadiusTextBox.TextChanged += new System.EventHandler(this.ScenarioClusterRadiusTextBox_TextChanged); - // - // label157 - // - this.label157.AutoSize = true; - this.label157.Location = new System.Drawing.Point(51, 32); - this.label157.Name = "label157"; - this.label157.Size = new System.Drawing.Size(43, 13); - this.label157.TabIndex = 8; - this.label157.Text = "Radius:"; - // - // ScenarioClusterUnk2CheckBox - // - this.ScenarioClusterUnk2CheckBox.AutoSize = true; - this.ScenarioClusterUnk2CheckBox.Location = new System.Drawing.Point(100, 81); - this.ScenarioClusterUnk2CheckBox.Name = "ScenarioClusterUnk2CheckBox"; - this.ScenarioClusterUnk2CheckBox.Size = new System.Drawing.Size(55, 17); - this.ScenarioClusterUnk2CheckBox.TabIndex = 12; - this.ScenarioClusterUnk2CheckBox.Text = "Unk 2"; - this.ScenarioClusterUnk2CheckBox.UseVisualStyleBackColor = true; - this.ScenarioClusterUnk2CheckBox.CheckedChanged += new System.EventHandler(this.ScenarioClusterUnk2CheckBox_CheckedChanged); - // - // ScenarioClusterUnk1TextBox - // - this.ScenarioClusterUnk1TextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioClusterUnk1TextBox.Location = new System.Drawing.Point(100, 55); - this.ScenarioClusterUnk1TextBox.Name = "ScenarioClusterUnk1TextBox"; - this.ScenarioClusterUnk1TextBox.Size = new System.Drawing.Size(163, 20); - this.ScenarioClusterUnk1TextBox.TabIndex = 11; - this.ScenarioClusterUnk1TextBox.TextChanged += new System.EventHandler(this.ScenarioClusterUnk1TextBox_TextChanged); - // - // label140 - // - this.label140.AutoSize = true; - this.label140.Location = new System.Drawing.Point(4, 58); - this.label140.Name = "label140"; - this.label140.Size = new System.Drawing.Size(90, 13); - this.label140.TabIndex = 10; - this.label140.Text = "Probability Unk 1:"; - // - // ScenarioClusterGoToButton - // - this.ScenarioClusterGoToButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioClusterGoToButton.Location = new System.Drawing.Point(341, 1); - this.ScenarioClusterGoToButton.Name = "ScenarioClusterGoToButton"; - this.ScenarioClusterGoToButton.Size = new System.Drawing.Size(68, 23); - this.ScenarioClusterGoToButton.TabIndex = 7; - this.ScenarioClusterGoToButton.Text = "Go to"; - this.ScenarioClusterGoToButton.UseVisualStyleBackColor = true; - this.ScenarioClusterGoToButton.Click += new System.EventHandler(this.ScenarioClusterGoToButton_Click); - // - // ScenarioClusterCenterTextBox - // - this.ScenarioClusterCenterTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioClusterCenterTextBox.Location = new System.Drawing.Point(100, 3); - this.ScenarioClusterCenterTextBox.Name = "ScenarioClusterCenterTextBox"; - this.ScenarioClusterCenterTextBox.Size = new System.Drawing.Size(235, 20); - this.ScenarioClusterCenterTextBox.TabIndex = 6; - this.ScenarioClusterCenterTextBox.TextChanged += new System.EventHandler(this.ScenarioClusterCenterTextBox_TextChanged); - // - // label139 - // - this.label139.AutoSize = true; - this.label139.Location = new System.Drawing.Point(53, 6); - this.label139.Name = "label139"; - this.label139.Size = new System.Drawing.Size(41, 13); - this.label139.TabIndex = 5; - this.label139.Text = "Center:"; - // - // ScenarioClusterPointTabPage - // - this.ScenarioClusterPointTabPage.Controls.Add(this.ScenarioClusterPointDeleteButton); - this.ScenarioClusterPointTabPage.Controls.Add(this.ScenarioClusterPointAddToProjectButton); - this.ScenarioClusterPointTabPage.Controls.Add(this.ScenarioClusterPointPanel); - this.ScenarioClusterPointTabPage.Controls.Add(this.ScenarioClusterPointCheckBox); - this.ScenarioClusterPointTabPage.Location = new System.Drawing.Point(4, 22); - this.ScenarioClusterPointTabPage.Name = "ScenarioClusterPointTabPage"; - this.ScenarioClusterPointTabPage.Size = new System.Drawing.Size(510, 443); - this.ScenarioClusterPointTabPage.TabIndex = 5; - this.ScenarioClusterPointTabPage.Text = "Cluster Point"; - this.ScenarioClusterPointTabPage.UseVisualStyleBackColor = true; - // - // ScenarioClusterPointDeleteButton - // - this.ScenarioClusterPointDeleteButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioClusterPointDeleteButton.Enabled = false; - this.ScenarioClusterPointDeleteButton.Location = new System.Drawing.Point(415, 2); - this.ScenarioClusterPointDeleteButton.Name = "ScenarioClusterPointDeleteButton"; - this.ScenarioClusterPointDeleteButton.Size = new System.Drawing.Size(90, 23); - this.ScenarioClusterPointDeleteButton.TabIndex = 7; - this.ScenarioClusterPointDeleteButton.Text = "Delete Point"; - this.ScenarioClusterPointDeleteButton.UseVisualStyleBackColor = true; - this.ScenarioClusterPointDeleteButton.Click += new System.EventHandler(this.ScenarioClusterPointDeleteButton_Click); - // - // ScenarioClusterPointAddToProjectButton - // - this.ScenarioClusterPointAddToProjectButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioClusterPointAddToProjectButton.Enabled = false; - this.ScenarioClusterPointAddToProjectButton.Location = new System.Drawing.Point(319, 2); - this.ScenarioClusterPointAddToProjectButton.Name = "ScenarioClusterPointAddToProjectButton"; - this.ScenarioClusterPointAddToProjectButton.Size = new System.Drawing.Size(90, 23); - this.ScenarioClusterPointAddToProjectButton.TabIndex = 6; - this.ScenarioClusterPointAddToProjectButton.Text = "Add to Project"; - this.ScenarioClusterPointAddToProjectButton.UseVisualStyleBackColor = true; - this.ScenarioClusterPointAddToProjectButton.Click += new System.EventHandler(this.ScenarioClusterPointAddToProjectButton_Click); - // - // ScenarioClusterPointPanel - // - this.ScenarioClusterPointPanel.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.ScenarioClusterPointPanel.Controls.Add(this.ScenarioClusterPointImapHashLabel); - this.ScenarioClusterPointPanel.Controls.Add(this.ScenarioClusterPointImapTextBox); - this.ScenarioClusterPointPanel.Controls.Add(this.label143); - this.ScenarioClusterPointPanel.Controls.Add(this.ScenarioClusterPointGroupHashLabel); - this.ScenarioClusterPointPanel.Controls.Add(this.ScenarioClusterPointGroupTextBox); - this.ScenarioClusterPointPanel.Controls.Add(this.label141); - this.ScenarioClusterPointPanel.Controls.Add(this.ScenarioClusterPointInteriorHashLabel); - this.ScenarioClusterPointPanel.Controls.Add(this.ScenarioClusterPointFlagsCheckedListBox); - this.ScenarioClusterPointPanel.Controls.Add(this.label142); - this.ScenarioClusterPointPanel.Controls.Add(this.ScenarioClusterPointDirectionTextBox); - this.ScenarioClusterPointPanel.Controls.Add(this.label144); - this.ScenarioClusterPointPanel.Controls.Add(this.ScenarioClusterPointFlagsUpDown); - this.ScenarioClusterPointPanel.Controls.Add(this.label145); - this.ScenarioClusterPointPanel.Controls.Add(this.ScenarioClusterPointGoToButton); - this.ScenarioClusterPointPanel.Controls.Add(this.ScenarioClusterPointWaitTimeUpDown); - this.ScenarioClusterPointPanel.Controls.Add(this.ScenarioClusterPointPositionTextBox); - this.ScenarioClusterPointPanel.Controls.Add(this.label146); - this.ScenarioClusterPointPanel.Controls.Add(this.label147); - this.ScenarioClusterPointPanel.Controls.Add(this.ScenarioClusterPointRadiusUpDown); - this.ScenarioClusterPointPanel.Controls.Add(this.label148); - this.ScenarioClusterPointPanel.Controls.Add(this.ScenarioClusterPointAnimalFlagUpDown); - this.ScenarioClusterPointPanel.Controls.Add(this.label149); - this.ScenarioClusterPointPanel.Controls.Add(this.ScenarioClusterPointProbabilityUpDown); - this.ScenarioClusterPointPanel.Controls.Add(this.ScenarioClusterPointInteriorTextBox); - this.ScenarioClusterPointPanel.Controls.Add(this.label151); - this.ScenarioClusterPointPanel.Controls.Add(this.label152); - this.ScenarioClusterPointPanel.Controls.Add(this.ScenarioClusterPointTimeEndUpDown); - this.ScenarioClusterPointPanel.Controls.Add(this.ScenarioClusterPointTimeStartUpDown); - this.ScenarioClusterPointPanel.Controls.Add(this.label153); - this.ScenarioClusterPointPanel.Controls.Add(this.ScenarioClusterPointModelSetComboBox); - this.ScenarioClusterPointPanel.Controls.Add(this.label154); - this.ScenarioClusterPointPanel.Controls.Add(this.ScenarioClusterPointTypeComboBox); - this.ScenarioClusterPointPanel.Controls.Add(this.label155); - this.ScenarioClusterPointPanel.Enabled = false; - this.ScenarioClusterPointPanel.Location = new System.Drawing.Point(0, 29); - this.ScenarioClusterPointPanel.Name = "ScenarioClusterPointPanel"; - this.ScenarioClusterPointPanel.Size = new System.Drawing.Size(510, 414); - this.ScenarioClusterPointPanel.TabIndex = 8; - // - // ScenarioClusterPointImapHashLabel - // - this.ScenarioClusterPointImapHashLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioClusterPointImapHashLabel.AutoSize = true; - this.ScenarioClusterPointImapHashLabel.Location = new System.Drawing.Point(341, 146); - this.ScenarioClusterPointImapHashLabel.Name = "ScenarioClusterPointImapHashLabel"; - this.ScenarioClusterPointImapHashLabel.Size = new System.Drawing.Size(44, 13); - this.ScenarioClusterPointImapHashLabel.TabIndex = 22; - this.ScenarioClusterPointImapHashLabel.Text = "Hash: 0"; - // - // ScenarioClusterPointImapTextBox - // - this.ScenarioClusterPointImapTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioClusterPointImapTextBox.Location = new System.Drawing.Point(73, 143); - this.ScenarioClusterPointImapTextBox.Name = "ScenarioClusterPointImapTextBox"; - this.ScenarioClusterPointImapTextBox.Size = new System.Drawing.Size(262, 20); - this.ScenarioClusterPointImapTextBox.TabIndex = 21; - this.ScenarioClusterPointImapTextBox.TextChanged += new System.EventHandler(this.ScenarioClusterPointImapTextBox_TextChanged); - // - // label143 - // - this.label143.AutoSize = true; - this.label143.Location = new System.Drawing.Point(34, 146); - this.label143.Name = "label143"; - this.label143.Size = new System.Drawing.Size(33, 13); - this.label143.TabIndex = 20; - this.label143.Text = "Imap:"; - // - // ScenarioClusterPointGroupHashLabel - // - this.ScenarioClusterPointGroupHashLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioClusterPointGroupHashLabel.AutoSize = true; - this.ScenarioClusterPointGroupHashLabel.Location = new System.Drawing.Point(341, 123); - this.ScenarioClusterPointGroupHashLabel.Name = "ScenarioClusterPointGroupHashLabel"; - this.ScenarioClusterPointGroupHashLabel.Size = new System.Drawing.Size(44, 13); - this.ScenarioClusterPointGroupHashLabel.TabIndex = 19; - this.ScenarioClusterPointGroupHashLabel.Text = "Hash: 0"; - // - // ScenarioClusterPointGroupTextBox - // - this.ScenarioClusterPointGroupTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioClusterPointGroupTextBox.Location = new System.Drawing.Point(73, 120); - this.ScenarioClusterPointGroupTextBox.Name = "ScenarioClusterPointGroupTextBox"; - this.ScenarioClusterPointGroupTextBox.Size = new System.Drawing.Size(262, 20); - this.ScenarioClusterPointGroupTextBox.TabIndex = 18; - this.ScenarioClusterPointGroupTextBox.TextChanged += new System.EventHandler(this.ScenarioClusterPointGroupTextBox_TextChanged); - // - // label141 - // - this.label141.AutoSize = true; - this.label141.Location = new System.Drawing.Point(28, 123); - this.label141.Name = "label141"; - this.label141.Size = new System.Drawing.Size(39, 13); - this.label141.TabIndex = 17; - this.label141.Text = "Group:"; - // - // ScenarioClusterPointInteriorHashLabel - // - this.ScenarioClusterPointInteriorHashLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioClusterPointInteriorHashLabel.AutoSize = true; - this.ScenarioClusterPointInteriorHashLabel.Location = new System.Drawing.Point(341, 100); - this.ScenarioClusterPointInteriorHashLabel.Name = "ScenarioClusterPointInteriorHashLabel"; - this.ScenarioClusterPointInteriorHashLabel.Size = new System.Drawing.Size(44, 13); - this.ScenarioClusterPointInteriorHashLabel.TabIndex = 16; - this.ScenarioClusterPointInteriorHashLabel.Text = "Hash: 0"; - // - // ScenarioClusterPointFlagsCheckedListBox - // - this.ScenarioClusterPointFlagsCheckedListBox.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.ScenarioClusterPointFlagsCheckedListBox.CheckOnClick = true; - this.ScenarioClusterPointFlagsCheckedListBox.FormattingEnabled = true; - this.ScenarioClusterPointFlagsCheckedListBox.Items.AddRange(new object[] { - "1 - IgnoreMaxInRange", - "2 - NoSpawn", - "4 - StationaryReactions", - "8 - Unk", - "16 - Unk", - "32 - ActivateVehicleSiren", - "64 - AggressiveVehicleDriving", - "128 - Unk", - "256 - Unk", - "512 - Unk", - "1024 - AerialVehiclePoint", - "2048 - TerritorialScenario", - "4096 - Unk", - "8192 - Unk", - "16384 - Unk", - "32768 - Unk", - "65536 - InWater", - "131072 - Unk", - "262144 - OpenDoor", - "524288 - PreciseUseTime", - "1048576 - Unk", - "2097152 - Unk", - "4194304 - ExtendedRange", - "8388608 - ShortRange", - "16777216 - HighPriority", - "33554432 - IgnoreLoitering", - "67108864 - UseSearchlight", - "134217728 - ResetNoCollisionOnCleanUp", - "268435456 - Unk", - "536870912 - Unk", - "1073741824 - IgnoreWeatherRestrictions"}); - this.ScenarioClusterPointFlagsCheckedListBox.Location = new System.Drawing.Point(195, 167); - this.ScenarioClusterPointFlagsCheckedListBox.Name = "ScenarioClusterPointFlagsCheckedListBox"; - this.ScenarioClusterPointFlagsCheckedListBox.Size = new System.Drawing.Size(214, 244); - this.ScenarioClusterPointFlagsCheckedListBox.TabIndex = 37; - this.ScenarioClusterPointFlagsCheckedListBox.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.ScenarioClusterPointFlagsCheckedListBox_ItemCheck); - // - // label142 - // - this.label142.AutoSize = true; - this.label142.Location = new System.Drawing.Point(32, 390); - this.label142.Name = "label142"; - this.label142.Size = new System.Drawing.Size(35, 13); - this.label142.TabIndex = 35; - this.label142.Text = "Flags:"; - // - // ScenarioClusterPointDirectionTextBox - // - this.ScenarioClusterPointDirectionTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioClusterPointDirectionTextBox.Location = new System.Drawing.Point(73, 26); - this.ScenarioClusterPointDirectionTextBox.Name = "ScenarioClusterPointDirectionTextBox"; - this.ScenarioClusterPointDirectionTextBox.Size = new System.Drawing.Size(262, 20); - this.ScenarioClusterPointDirectionTextBox.TabIndex = 9; - this.ScenarioClusterPointDirectionTextBox.TextChanged += new System.EventHandler(this.ScenarioClusterPointDirectionTextBox_TextChanged); - // - // label144 - // - this.label144.AutoSize = true; - this.label144.Location = new System.Drawing.Point(15, 29); - this.label144.Name = "label144"; - this.label144.Size = new System.Drawing.Size(52, 13); - this.label144.TabIndex = 8; - this.label144.Text = "Direction:"; - // - // ScenarioClusterPointFlagsUpDown - // - this.ScenarioClusterPointFlagsUpDown.Location = new System.Drawing.Point(73, 388); - this.ScenarioClusterPointFlagsUpDown.Maximum = new decimal(new int[] { - -1, - 0, - 0, - 0}); - this.ScenarioClusterPointFlagsUpDown.Name = "ScenarioClusterPointFlagsUpDown"; - this.ScenarioClusterPointFlagsUpDown.Size = new System.Drawing.Size(116, 20); - this.ScenarioClusterPointFlagsUpDown.TabIndex = 36; - this.ScenarioClusterPointFlagsUpDown.ValueChanged += new System.EventHandler(this.ScenarioClusterPointFlagsUpDown_ValueChanged); - // - // label145 - // - this.label145.AutoSize = true; - this.label145.Location = new System.Drawing.Point(13, 299); - this.label145.Name = "label145"; - this.label145.Size = new System.Drawing.Size(54, 13); - this.label145.TabIndex = 33; - this.label145.Text = "Wait time:"; - // - // ScenarioClusterPointGoToButton - // - this.ScenarioClusterPointGoToButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioClusterPointGoToButton.Location = new System.Drawing.Point(341, 1); - this.ScenarioClusterPointGoToButton.Name = "ScenarioClusterPointGoToButton"; - this.ScenarioClusterPointGoToButton.Size = new System.Drawing.Size(68, 23); - this.ScenarioClusterPointGoToButton.TabIndex = 7; - this.ScenarioClusterPointGoToButton.Text = "Go to"; - this.ScenarioClusterPointGoToButton.UseVisualStyleBackColor = true; - this.ScenarioClusterPointGoToButton.Click += new System.EventHandler(this.ScenarioClusterPointGoToButton_Click); - // - // ScenarioClusterPointWaitTimeUpDown - // - this.ScenarioClusterPointWaitTimeUpDown.Location = new System.Drawing.Point(73, 297); - this.ScenarioClusterPointWaitTimeUpDown.Maximum = new decimal(new int[] { - 255, - 0, - 0, - 0}); - this.ScenarioClusterPointWaitTimeUpDown.Name = "ScenarioClusterPointWaitTimeUpDown"; - this.ScenarioClusterPointWaitTimeUpDown.Size = new System.Drawing.Size(57, 20); - this.ScenarioClusterPointWaitTimeUpDown.TabIndex = 34; - this.ScenarioClusterPointWaitTimeUpDown.ValueChanged += new System.EventHandler(this.ScenarioClusterPointWaitTimeUpDown_ValueChanged); - // - // ScenarioClusterPointPositionTextBox - // - this.ScenarioClusterPointPositionTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioClusterPointPositionTextBox.Location = new System.Drawing.Point(73, 3); - this.ScenarioClusterPointPositionTextBox.Name = "ScenarioClusterPointPositionTextBox"; - this.ScenarioClusterPointPositionTextBox.Size = new System.Drawing.Size(262, 20); - this.ScenarioClusterPointPositionTextBox.TabIndex = 6; - this.ScenarioClusterPointPositionTextBox.TextChanged += new System.EventHandler(this.ScenarioClusterPointPositionTextBox_TextChanged); - // - // label146 - // - this.label146.AutoSize = true; - this.label146.Location = new System.Drawing.Point(20, 6); - this.label146.Name = "label146"; - this.label146.Size = new System.Drawing.Size(47, 13); - this.label146.TabIndex = 5; - this.label146.Text = "Position:"; - // - // label147 - // - this.label147.AutoSize = true; - this.label147.Location = new System.Drawing.Point(24, 273); - this.label147.Name = "label147"; - this.label147.Size = new System.Drawing.Size(43, 13); - this.label147.TabIndex = 31; - this.label147.Text = "Radius:"; - // - // ScenarioClusterPointRadiusUpDown - // - this.ScenarioClusterPointRadiusUpDown.Location = new System.Drawing.Point(73, 271); - this.ScenarioClusterPointRadiusUpDown.Maximum = new decimal(new int[] { - 255, - 0, - 0, - 0}); - this.ScenarioClusterPointRadiusUpDown.Name = "ScenarioClusterPointRadiusUpDown"; - this.ScenarioClusterPointRadiusUpDown.Size = new System.Drawing.Size(57, 20); - this.ScenarioClusterPointRadiusUpDown.TabIndex = 32; - this.ScenarioClusterPointRadiusUpDown.ValueChanged += new System.EventHandler(this.ScenarioClusterPointRadiusUpDown_ValueChanged); - // - // label148 - // - this.label148.AutoSize = true; - this.label148.Location = new System.Drawing.Point(6, 247); - this.label148.Name = "label148"; - this.label148.Size = new System.Drawing.Size(61, 13); - this.label148.TabIndex = 29; - this.label148.Text = "Animal flag:"; - // - // ScenarioClusterPointAnimalFlagUpDown - // - this.ScenarioClusterPointAnimalFlagUpDown.Location = new System.Drawing.Point(73, 245); - this.ScenarioClusterPointAnimalFlagUpDown.Maximum = new decimal(new int[] { - 255, - 0, - 0, - 0}); - this.ScenarioClusterPointAnimalFlagUpDown.Name = "ScenarioClusterPointAnimalFlagUpDown"; - this.ScenarioClusterPointAnimalFlagUpDown.Size = new System.Drawing.Size(57, 20); - this.ScenarioClusterPointAnimalFlagUpDown.TabIndex = 30; - this.ScenarioClusterPointAnimalFlagUpDown.ValueChanged += new System.EventHandler(this.ScenarioClusterPointAnimalFlagUpDown_ValueChanged); - // - // label149 - // - this.label149.AutoSize = true; - this.label149.Location = new System.Drawing.Point(9, 221); - this.label149.Name = "label149"; - this.label149.Size = new System.Drawing.Size(58, 13); - this.label149.TabIndex = 27; - this.label149.Text = "Probability:"; - // - // ScenarioClusterPointProbabilityUpDown - // - this.ScenarioClusterPointProbabilityUpDown.Location = new System.Drawing.Point(73, 219); - this.ScenarioClusterPointProbabilityUpDown.Maximum = new decimal(new int[] { - 255, - 0, - 0, - 0}); - this.ScenarioClusterPointProbabilityUpDown.Name = "ScenarioClusterPointProbabilityUpDown"; - this.ScenarioClusterPointProbabilityUpDown.Size = new System.Drawing.Size(57, 20); - this.ScenarioClusterPointProbabilityUpDown.TabIndex = 28; - this.ScenarioClusterPointProbabilityUpDown.ValueChanged += new System.EventHandler(this.ScenarioClusterPointProbabilityUpDown_ValueChanged); - // - // ScenarioClusterPointInteriorTextBox - // - this.ScenarioClusterPointInteriorTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioClusterPointInteriorTextBox.Location = new System.Drawing.Point(73, 97); - this.ScenarioClusterPointInteriorTextBox.Name = "ScenarioClusterPointInteriorTextBox"; - this.ScenarioClusterPointInteriorTextBox.Size = new System.Drawing.Size(262, 20); - this.ScenarioClusterPointInteriorTextBox.TabIndex = 15; - this.ScenarioClusterPointInteriorTextBox.TextChanged += new System.EventHandler(this.ScenarioClusterPointInteriorTextBox_TextChanged); - // - // label151 - // - this.label151.AutoSize = true; - this.label151.Location = new System.Drawing.Point(25, 100); - this.label151.Name = "label151"; - this.label151.Size = new System.Drawing.Size(42, 13); - this.label151.TabIndex = 14; - this.label151.Text = "Interior:"; - // - // label152 - // - this.label152.AutoSize = true; - this.label152.Location = new System.Drawing.Point(13, 195); - this.label152.Name = "label152"; - this.label152.Size = new System.Drawing.Size(54, 13); - this.label152.TabIndex = 25; - this.label152.Text = "Time end:"; - // - // ScenarioClusterPointTimeEndUpDown - // - this.ScenarioClusterPointTimeEndUpDown.Location = new System.Drawing.Point(73, 193); - this.ScenarioClusterPointTimeEndUpDown.Maximum = new decimal(new int[] { - 24, - 0, - 0, - 0}); - this.ScenarioClusterPointTimeEndUpDown.Name = "ScenarioClusterPointTimeEndUpDown"; - this.ScenarioClusterPointTimeEndUpDown.Size = new System.Drawing.Size(57, 20); - this.ScenarioClusterPointTimeEndUpDown.TabIndex = 26; - this.ScenarioClusterPointTimeEndUpDown.ValueChanged += new System.EventHandler(this.ScenarioClusterPointTimeEndUpDown_ValueChanged); - // - // ScenarioClusterPointTimeStartUpDown - // - this.ScenarioClusterPointTimeStartUpDown.Location = new System.Drawing.Point(73, 167); - this.ScenarioClusterPointTimeStartUpDown.Maximum = new decimal(new int[] { - 24, - 0, - 0, - 0}); - this.ScenarioClusterPointTimeStartUpDown.Name = "ScenarioClusterPointTimeStartUpDown"; - this.ScenarioClusterPointTimeStartUpDown.Size = new System.Drawing.Size(57, 20); - this.ScenarioClusterPointTimeStartUpDown.TabIndex = 24; - this.ScenarioClusterPointTimeStartUpDown.ValueChanged += new System.EventHandler(this.ScenarioClusterPointTimeStartUpDown_ValueChanged); - // - // label153 - // - this.label153.AutoSize = true; - this.label153.Location = new System.Drawing.Point(11, 169); - this.label153.Name = "label153"; - this.label153.Size = new System.Drawing.Size(56, 13); - this.label153.TabIndex = 23; - this.label153.Text = "Time start:"; - // - // ScenarioClusterPointModelSetComboBox - // - this.ScenarioClusterPointModelSetComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioClusterPointModelSetComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.ScenarioClusterPointModelSetComboBox.FormattingEnabled = true; - this.ScenarioClusterPointModelSetComboBox.Location = new System.Drawing.Point(73, 73); - this.ScenarioClusterPointModelSetComboBox.Name = "ScenarioClusterPointModelSetComboBox"; - this.ScenarioClusterPointModelSetComboBox.Size = new System.Drawing.Size(336, 21); - this.ScenarioClusterPointModelSetComboBox.TabIndex = 13; - this.ScenarioClusterPointModelSetComboBox.SelectedIndexChanged += new System.EventHandler(this.ScenarioClusterPointModelSetComboBox_SelectedIndexChanged); - // - // label154 - // - this.label154.AutoSize = true; - this.label154.Location = new System.Drawing.Point(9, 76); - this.label154.Name = "label154"; - this.label154.Size = new System.Drawing.Size(58, 13); - this.label154.TabIndex = 12; - this.label154.Text = "Model Set:"; - // - // ScenarioClusterPointTypeComboBox - // - this.ScenarioClusterPointTypeComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ScenarioClusterPointTypeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.ScenarioClusterPointTypeComboBox.FormattingEnabled = true; - this.ScenarioClusterPointTypeComboBox.Location = new System.Drawing.Point(73, 49); - this.ScenarioClusterPointTypeComboBox.Name = "ScenarioClusterPointTypeComboBox"; - this.ScenarioClusterPointTypeComboBox.Size = new System.Drawing.Size(336, 21); - this.ScenarioClusterPointTypeComboBox.TabIndex = 11; - this.ScenarioClusterPointTypeComboBox.SelectedIndexChanged += new System.EventHandler(this.ScenarioClusterPointTypeComboBox_SelectedIndexChanged); - // - // label155 - // - this.label155.AutoSize = true; - this.label155.Location = new System.Drawing.Point(33, 52); - this.label155.Name = "label155"; - this.label155.Size = new System.Drawing.Size(34, 13); - this.label155.TabIndex = 10; - this.label155.Text = "Type:"; - // - // ScenarioClusterPointCheckBox - // - this.ScenarioClusterPointCheckBox.AutoSize = true; - this.ScenarioClusterPointCheckBox.Location = new System.Drawing.Point(6, 6); - this.ScenarioClusterPointCheckBox.Name = "ScenarioClusterPointCheckBox"; - this.ScenarioClusterPointCheckBox.Size = new System.Drawing.Size(119, 17); - this.ScenarioClusterPointCheckBox.TabIndex = 5; - this.ScenarioClusterPointCheckBox.Text = "Define Cluster Point"; - this.ScenarioClusterPointCheckBox.UseVisualStyleBackColor = true; - this.ScenarioClusterPointCheckBox.CheckedChanged += new System.EventHandler(this.ScenarioClusterPointCheckBox_CheckedChanged); - // - // TopMenuStrip - // - this.TopMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.FileMenu, - this.YmapMenu, - this.YndMenu, - this.YnvMenu, - this.TrainsMenu, - this.ScenarioMenu, - this.ToolsMenu, - this.OptionsMenu}); - this.TopMenuStrip.Location = new System.Drawing.Point(0, 0); - this.TopMenuStrip.Name = "TopMenuStrip"; - this.TopMenuStrip.Size = new System.Drawing.Size(776, 24); - this.TopMenuStrip.TabIndex = 1; - this.TopMenuStrip.Text = "menuStrip1"; - // - // FileMenu - // - this.FileMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.FileNewMenu, - this.FileOpenMenu, - this.toolStripSeparator1, - this.FileCloseProjectMenu, - this.toolStripSeparator2, - this.FileSaveProjectMenu, - this.FileSaveProjectAsMenu, - this.FileSaveItemMenu, - this.FileSaveItemAsMenu}); - this.FileMenu.Name = "FileMenu"; - this.FileMenu.Size = new System.Drawing.Size(37, 20); - this.FileMenu.Text = "File"; - // - // FileNewMenu - // - this.FileNewMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.FileNewProjectMenu, - this.FileNewYmapMenu, - this.FileNewYndMenu, - this.FileNewYnvMenu, - this.FileNewTrainsMenu, - this.FileNewScenarioMenu}); - this.FileNewMenu.Name = "FileNewMenu"; - this.FileNewMenu.Size = new System.Drawing.Size(163, 22); - this.FileNewMenu.Text = "New"; - // - // FileNewProjectMenu - // - this.FileNewProjectMenu.Name = "FileNewProjectMenu"; - this.FileNewProjectMenu.Size = new System.Drawing.Size(138, 22); - this.FileNewProjectMenu.Text = "Project..."; - this.FileNewProjectMenu.Click += new System.EventHandler(this.FileNewProjectMenu_Click); - // - // FileNewYmapMenu - // - this.FileNewYmapMenu.Name = "FileNewYmapMenu"; - this.FileNewYmapMenu.Size = new System.Drawing.Size(138, 22); - this.FileNewYmapMenu.Text = "Ymap file"; - this.FileNewYmapMenu.Click += new System.EventHandler(this.FileNewYmapMenu_Click); - // - // FileNewYndMenu - // - this.FileNewYndMenu.Name = "FileNewYndMenu"; - this.FileNewYndMenu.Size = new System.Drawing.Size(138, 22); - this.FileNewYndMenu.Text = "Ynd file"; - this.FileNewYndMenu.Click += new System.EventHandler(this.FileNewYndMenu_Click); - // - // FileNewYnvMenu - // - this.FileNewYnvMenu.Name = "FileNewYnvMenu"; - this.FileNewYnvMenu.Size = new System.Drawing.Size(138, 22); - this.FileNewYnvMenu.Text = "Ynv file"; - this.FileNewYnvMenu.Visible = false; - this.FileNewYnvMenu.Click += new System.EventHandler(this.FileNewYnvMenu_Click); - // - // FileNewTrainsMenu - // - this.FileNewTrainsMenu.Name = "FileNewTrainsMenu"; - this.FileNewTrainsMenu.Size = new System.Drawing.Size(138, 22); - this.FileNewTrainsMenu.Text = "Trains file"; - this.FileNewTrainsMenu.Click += new System.EventHandler(this.FileNewTrainsMenu_Click); - // - // FileNewScenarioMenu - // - this.FileNewScenarioMenu.Name = "FileNewScenarioMenu"; - this.FileNewScenarioMenu.Size = new System.Drawing.Size(138, 22); - this.FileNewScenarioMenu.Text = "Scenario file"; - this.FileNewScenarioMenu.Click += new System.EventHandler(this.FileNewScenarioMenu_Click); - // - // FileOpenMenu - // - this.FileOpenMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.FileOpenProjectMenu, - this.FileOpenYmapMenu, - this.FileOpenYndMenu, - this.FileOpenYnvMenu, - this.FileOpenTrainsMenu, - this.FileOpenScenarioMenu}); - this.FileOpenMenu.Name = "FileOpenMenu"; - this.FileOpenMenu.Size = new System.Drawing.Size(163, 22); - this.FileOpenMenu.Text = "Open"; - // - // FileOpenProjectMenu - // - this.FileOpenProjectMenu.Name = "FileOpenProjectMenu"; - this.FileOpenProjectMenu.Size = new System.Drawing.Size(147, 22); - this.FileOpenProjectMenu.Text = "Project..."; - this.FileOpenProjectMenu.Click += new System.EventHandler(this.FileOpenProjectMenu_Click); - // - // FileOpenYmapMenu - // - this.FileOpenYmapMenu.Name = "FileOpenYmapMenu"; - this.FileOpenYmapMenu.Size = new System.Drawing.Size(147, 22); - this.FileOpenYmapMenu.Text = "Ymap file..."; - this.FileOpenYmapMenu.Click += new System.EventHandler(this.FileOpenYmapMenu_Click); - // - // FileOpenYndMenu - // - this.FileOpenYndMenu.Name = "FileOpenYndMenu"; - this.FileOpenYndMenu.Size = new System.Drawing.Size(147, 22); - this.FileOpenYndMenu.Text = "Ynd file..."; - this.FileOpenYndMenu.Click += new System.EventHandler(this.FileOpenYndMenu_Click); - // - // FileOpenYnvMenu - // - this.FileOpenYnvMenu.Name = "FileOpenYnvMenu"; - this.FileOpenYnvMenu.Size = new System.Drawing.Size(147, 22); - this.FileOpenYnvMenu.Text = "Ynv file..."; - this.FileOpenYnvMenu.Visible = false; - this.FileOpenYnvMenu.Click += new System.EventHandler(this.FileOpenYnvMenu_Click); - // - // FileOpenTrainsMenu - // - this.FileOpenTrainsMenu.Name = "FileOpenTrainsMenu"; - this.FileOpenTrainsMenu.Size = new System.Drawing.Size(147, 22); - this.FileOpenTrainsMenu.Text = "Trains file..."; - this.FileOpenTrainsMenu.Click += new System.EventHandler(this.FileOpenTrainsMenu_Click); - // - // FileOpenScenarioMenu - // - this.FileOpenScenarioMenu.Name = "FileOpenScenarioMenu"; - this.FileOpenScenarioMenu.Size = new System.Drawing.Size(147, 22); - this.FileOpenScenarioMenu.Text = "Scenario file..."; - this.FileOpenScenarioMenu.Click += new System.EventHandler(this.FileOpenScenarioMenu_Click); - // - // toolStripSeparator1 - // - this.toolStripSeparator1.Name = "toolStripSeparator1"; - this.toolStripSeparator1.Size = new System.Drawing.Size(160, 6); - // - // FileCloseProjectMenu - // - this.FileCloseProjectMenu.Enabled = false; - this.FileCloseProjectMenu.Name = "FileCloseProjectMenu"; - this.FileCloseProjectMenu.Size = new System.Drawing.Size(163, 22); - this.FileCloseProjectMenu.Text = "Close Project"; - this.FileCloseProjectMenu.Click += new System.EventHandler(this.FileCloseProjectMenu_Click); - // - // toolStripSeparator2 - // - this.toolStripSeparator2.Name = "toolStripSeparator2"; - this.toolStripSeparator2.Size = new System.Drawing.Size(160, 6); - // - // FileSaveProjectMenu - // - this.FileSaveProjectMenu.Enabled = false; - this.FileSaveProjectMenu.Name = "FileSaveProjectMenu"; - this.FileSaveProjectMenu.Size = new System.Drawing.Size(163, 22); - this.FileSaveProjectMenu.Text = "Save Project"; - this.FileSaveProjectMenu.Click += new System.EventHandler(this.FileSaveProjectMenu_Click); - // - // FileSaveProjectAsMenu - // - this.FileSaveProjectAsMenu.Enabled = false; - this.FileSaveProjectAsMenu.Name = "FileSaveProjectAsMenu"; - this.FileSaveProjectAsMenu.Size = new System.Drawing.Size(163, 22); - this.FileSaveProjectAsMenu.Text = "Save Project As..."; - this.FileSaveProjectAsMenu.Click += new System.EventHandler(this.FileSaveProjectAsMenu_Click); - // - // FileSaveItemMenu - // - this.FileSaveItemMenu.Enabled = false; - this.FileSaveItemMenu.Name = "FileSaveItemMenu"; - this.FileSaveItemMenu.Size = new System.Drawing.Size(163, 22); - this.FileSaveItemMenu.Text = "Save Item"; - this.FileSaveItemMenu.Visible = false; - this.FileSaveItemMenu.Click += new System.EventHandler(this.FileSaveItemMenu_Click); - // - // FileSaveItemAsMenu - // - this.FileSaveItemAsMenu.Enabled = false; - this.FileSaveItemAsMenu.Name = "FileSaveItemAsMenu"; - this.FileSaveItemAsMenu.Size = new System.Drawing.Size(163, 22); - this.FileSaveItemAsMenu.Text = "Save Item As..."; - this.FileSaveItemAsMenu.Visible = false; - this.FileSaveItemAsMenu.Click += new System.EventHandler(this.FileSaveItemAsMenu_Click); - // - // YmapMenu - // - this.YmapMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.YmapNameMenu, - this.toolStripSeparator3, - this.YmapNewEntityMenu, - this.YmapNewCarGenMenu, - this.toolStripSeparator5, - this.YmapAddToProjectMenu, - this.YmapRemoveFromProjectMenu}); - this.YmapMenu.Name = "YmapMenu"; - this.YmapMenu.Size = new System.Drawing.Size(49, 20); - this.YmapMenu.Text = "Ymap"; - // - // YmapNameMenu - // - this.YmapNameMenu.Enabled = false; - this.YmapNameMenu.Name = "YmapNameMenu"; - this.YmapNameMenu.Size = new System.Drawing.Size(199, 22); - this.YmapNameMenu.Text = "(No .ymap file selected)"; - // - // toolStripSeparator3 - // - this.toolStripSeparator3.Name = "toolStripSeparator3"; - this.toolStripSeparator3.Size = new System.Drawing.Size(196, 6); - // - // YmapNewEntityMenu - // - this.YmapNewEntityMenu.Enabled = false; - this.YmapNewEntityMenu.Name = "YmapNewEntityMenu"; - this.YmapNewEntityMenu.Size = new System.Drawing.Size(199, 22); - this.YmapNewEntityMenu.Text = "New Entity"; - this.YmapNewEntityMenu.Click += new System.EventHandler(this.YmapNewEntityMenu_Click); - // - // YmapNewCarGenMenu - // - this.YmapNewCarGenMenu.Enabled = false; - this.YmapNewCarGenMenu.Name = "YmapNewCarGenMenu"; - this.YmapNewCarGenMenu.Size = new System.Drawing.Size(199, 22); - this.YmapNewCarGenMenu.Text = "New Car Generator"; - this.YmapNewCarGenMenu.Click += new System.EventHandler(this.YmapNewCarGenMenu_Click); - // - // toolStripSeparator5 - // - this.toolStripSeparator5.Name = "toolStripSeparator5"; - this.toolStripSeparator5.Size = new System.Drawing.Size(196, 6); - // - // YmapAddToProjectMenu - // - this.YmapAddToProjectMenu.Enabled = false; - this.YmapAddToProjectMenu.Name = "YmapAddToProjectMenu"; - this.YmapAddToProjectMenu.Size = new System.Drawing.Size(199, 22); - this.YmapAddToProjectMenu.Text = "Add to Project"; - this.YmapAddToProjectMenu.Click += new System.EventHandler(this.YmapAddToProjectMenu_Click); - // - // YmapRemoveFromProjectMenu - // - this.YmapRemoveFromProjectMenu.Enabled = false; - this.YmapRemoveFromProjectMenu.Name = "YmapRemoveFromProjectMenu"; - this.YmapRemoveFromProjectMenu.Size = new System.Drawing.Size(199, 22); - this.YmapRemoveFromProjectMenu.Text = "Remove from Project"; - this.YmapRemoveFromProjectMenu.Click += new System.EventHandler(this.YmapRemoveFromProjectMenu_Click); - // - // YndMenu - // - this.YndMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.YndNameMenu, - this.toolStripSeparator4, - this.YndNewNodeMenu, - this.toolStripSeparator6, - this.YndAddToProjectMenu, - this.YndRemoveFromProjectMenu}); - this.YndMenu.Name = "YndMenu"; - this.YndMenu.Size = new System.Drawing.Size(39, 20); - this.YndMenu.Text = "Ynd"; - // - // YndNameMenu - // - this.YndNameMenu.Enabled = false; - this.YndNameMenu.Name = "YndNameMenu"; - this.YndNameMenu.Size = new System.Drawing.Size(189, 22); - this.YndNameMenu.Text = "(No .ynd file selected)"; - // - // toolStripSeparator4 - // - this.toolStripSeparator4.Name = "toolStripSeparator4"; - this.toolStripSeparator4.Size = new System.Drawing.Size(186, 6); - // - // YndNewNodeMenu - // - this.YndNewNodeMenu.Enabled = false; - this.YndNewNodeMenu.Name = "YndNewNodeMenu"; - this.YndNewNodeMenu.Size = new System.Drawing.Size(189, 22); - this.YndNewNodeMenu.Text = "New Node"; - this.YndNewNodeMenu.Click += new System.EventHandler(this.YndNewNodeMenu_Click); - // - // toolStripSeparator6 - // - this.toolStripSeparator6.Name = "toolStripSeparator6"; - this.toolStripSeparator6.Size = new System.Drawing.Size(186, 6); - // - // YndAddToProjectMenu - // - this.YndAddToProjectMenu.Enabled = false; - this.YndAddToProjectMenu.Name = "YndAddToProjectMenu"; - this.YndAddToProjectMenu.Size = new System.Drawing.Size(189, 22); - this.YndAddToProjectMenu.Text = "Add to Project"; - this.YndAddToProjectMenu.Click += new System.EventHandler(this.YndAddToProjectMenu_Click); - // - // YndRemoveFromProjectMenu - // - this.YndRemoveFromProjectMenu.Enabled = false; - this.YndRemoveFromProjectMenu.Name = "YndRemoveFromProjectMenu"; - this.YndRemoveFromProjectMenu.Size = new System.Drawing.Size(189, 22); - this.YndRemoveFromProjectMenu.Text = "Remove from Project"; - this.YndRemoveFromProjectMenu.Click += new System.EventHandler(this.YndRemoveFromProjectMenu_Click); - // - // YnvMenu - // - this.YnvMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.YnvNameMenu, - this.toolStripSeparator9, - this.YnvNewPolygonMenu, - this.toolStripSeparator10, - this.YnvAddToProjectMenu, - this.YnvRemoveFromProjectMenu}); - this.YnvMenu.Name = "YnvMenu"; - this.YnvMenu.Size = new System.Drawing.Size(38, 20); - this.YnvMenu.Text = "Ynv"; - this.YnvMenu.Visible = false; - // - // YnvNameMenu - // - this.YnvNameMenu.Enabled = false; - this.YnvNameMenu.Name = "YnvNameMenu"; - this.YnvNameMenu.Size = new System.Drawing.Size(188, 22); - this.YnvNameMenu.Text = "(No .ynv file selected)"; - // - // toolStripSeparator9 - // - this.toolStripSeparator9.Name = "toolStripSeparator9"; - this.toolStripSeparator9.Size = new System.Drawing.Size(185, 6); - // - // YnvNewPolygonMenu - // - this.YnvNewPolygonMenu.Enabled = false; - this.YnvNewPolygonMenu.Name = "YnvNewPolygonMenu"; - this.YnvNewPolygonMenu.Size = new System.Drawing.Size(188, 22); - this.YnvNewPolygonMenu.Text = "New Polygon"; - this.YnvNewPolygonMenu.Click += new System.EventHandler(this.YnvNewPolygonMenu_Click); - // - // toolStripSeparator10 - // - this.toolStripSeparator10.Name = "toolStripSeparator10"; - this.toolStripSeparator10.Size = new System.Drawing.Size(185, 6); - // - // YnvAddToProjectMenu - // - this.YnvAddToProjectMenu.Enabled = false; - this.YnvAddToProjectMenu.Name = "YnvAddToProjectMenu"; - this.YnvAddToProjectMenu.Size = new System.Drawing.Size(188, 22); - this.YnvAddToProjectMenu.Text = "Add to Project"; - this.YnvAddToProjectMenu.Click += new System.EventHandler(this.YnvAddToProjectMenu_Click); - // - // YnvRemoveFromProjectMenu - // - this.YnvRemoveFromProjectMenu.Enabled = false; - this.YnvRemoveFromProjectMenu.Name = "YnvRemoveFromProjectMenu"; - this.YnvRemoveFromProjectMenu.Size = new System.Drawing.Size(188, 22); - this.YnvRemoveFromProjectMenu.Text = "Remove from Project"; - this.YnvRemoveFromProjectMenu.Click += new System.EventHandler(this.YnvRemoveFromProjectMenu_Click); - // - // TrainsMenu - // - this.TrainsMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.TrainsNameMenu, - this.toolStripSeparator7, - this.TrainsNewNodeMenu, - this.toolStripSeparator8, - this.TrainsAddToProjectMenu, - this.TrainsRemoveFromProjectMenu}); - this.TrainsMenu.Name = "TrainsMenu"; - this.TrainsMenu.Size = new System.Drawing.Size(50, 20); - this.TrainsMenu.Text = "Trains"; - // - // TrainsNameMenu - // - this.TrainsNameMenu.Enabled = false; - this.TrainsNameMenu.Name = "TrainsNameMenu"; - this.TrainsNameMenu.Size = new System.Drawing.Size(200, 22); - this.TrainsNameMenu.Text = "(No train track selected)"; - // - // toolStripSeparator7 - // - this.toolStripSeparator7.Name = "toolStripSeparator7"; - this.toolStripSeparator7.Size = new System.Drawing.Size(197, 6); - // - // TrainsNewNodeMenu - // - this.TrainsNewNodeMenu.Enabled = false; - this.TrainsNewNodeMenu.Name = "TrainsNewNodeMenu"; - this.TrainsNewNodeMenu.Size = new System.Drawing.Size(200, 22); - this.TrainsNewNodeMenu.Text = "New Node"; - this.TrainsNewNodeMenu.Click += new System.EventHandler(this.TrainsNewNodeMenu_Click); - // - // toolStripSeparator8 - // - this.toolStripSeparator8.Name = "toolStripSeparator8"; - this.toolStripSeparator8.Size = new System.Drawing.Size(197, 6); - // - // TrainsAddToProjectMenu - // - this.TrainsAddToProjectMenu.Enabled = false; - this.TrainsAddToProjectMenu.Name = "TrainsAddToProjectMenu"; - this.TrainsAddToProjectMenu.Size = new System.Drawing.Size(200, 22); - this.TrainsAddToProjectMenu.Text = "Add to Project"; - this.TrainsAddToProjectMenu.Click += new System.EventHandler(this.TrainsAddToProjectMenu_Click); - // - // TrainsRemoveFromProjectMenu - // - this.TrainsRemoveFromProjectMenu.Enabled = false; - this.TrainsRemoveFromProjectMenu.Name = "TrainsRemoveFromProjectMenu"; - this.TrainsRemoveFromProjectMenu.Size = new System.Drawing.Size(200, 22); - this.TrainsRemoveFromProjectMenu.Text = "Remove from Project"; - this.TrainsRemoveFromProjectMenu.Click += new System.EventHandler(this.TrainsRemoveFromProjectMenu_Click); - // - // ScenarioMenu - // - this.ScenarioMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.ScenarioNameMenu, - this.toolStripSeparator11, - this.ScenarioNewPointMenu, - this.ScenarioNewPointFromSelectedMenu, - this.ScenarioNewEntityOverrideMenu, - this.ScenarioNewChainMenu, - this.ScenarioNewClusterMenu, - this.ScenarioImportChainMenu, - this.toolStripSeparator12, - this.ScenarioAddToProjectMenu, - this.ScenarioRemoveFromProjectMenu}); - this.ScenarioMenu.Name = "ScenarioMenu"; - this.ScenarioMenu.Size = new System.Drawing.Size(64, 20); - this.ScenarioMenu.Text = "Scenario"; - // - // ScenarioNameMenu - // - this.ScenarioNameMenu.Enabled = false; - this.ScenarioNameMenu.Name = "ScenarioNameMenu"; - this.ScenarioNameMenu.Size = new System.Drawing.Size(228, 22); - this.ScenarioNameMenu.Text = "(No scenario region selected)"; - // - // toolStripSeparator11 - // - this.toolStripSeparator11.Name = "toolStripSeparator11"; - this.toolStripSeparator11.Size = new System.Drawing.Size(225, 6); - // - // ScenarioNewPointMenu - // - this.ScenarioNewPointMenu.Enabled = false; - this.ScenarioNewPointMenu.Name = "ScenarioNewPointMenu"; - this.ScenarioNewPointMenu.Size = new System.Drawing.Size(228, 22); - this.ScenarioNewPointMenu.Text = "New Point (Blank)"; - this.ScenarioNewPointMenu.Click += new System.EventHandler(this.ScenarioNewPointMenu_Click); - // - // ScenarioNewPointFromSelectedMenu - // - this.ScenarioNewPointFromSelectedMenu.Enabled = false; - this.ScenarioNewPointFromSelectedMenu.Name = "ScenarioNewPointFromSelectedMenu"; - this.ScenarioNewPointFromSelectedMenu.Size = new System.Drawing.Size(228, 22); - this.ScenarioNewPointFromSelectedMenu.Text = "New Point (from Selected)"; - this.ScenarioNewPointFromSelectedMenu.Click += new System.EventHandler(this.ScenarioNewPointFromSelectedMenu_Click); - // - // ScenarioNewEntityOverrideMenu - // - this.ScenarioNewEntityOverrideMenu.Enabled = false; - this.ScenarioNewEntityOverrideMenu.Name = "ScenarioNewEntityOverrideMenu"; - this.ScenarioNewEntityOverrideMenu.Size = new System.Drawing.Size(228, 22); - this.ScenarioNewEntityOverrideMenu.Text = "New Entity Override"; - this.ScenarioNewEntityOverrideMenu.Click += new System.EventHandler(this.ScenarioNewEntityOverrideMenu_Click); - // - // ScenarioNewChainMenu - // - this.ScenarioNewChainMenu.Enabled = false; - this.ScenarioNewChainMenu.Name = "ScenarioNewChainMenu"; - this.ScenarioNewChainMenu.Size = new System.Drawing.Size(228, 22); - this.ScenarioNewChainMenu.Text = "New Chain"; - this.ScenarioNewChainMenu.Click += new System.EventHandler(this.ScenarioNewChainMenu_Click); - // - // ScenarioNewClusterMenu - // - this.ScenarioNewClusterMenu.Enabled = false; - this.ScenarioNewClusterMenu.Name = "ScenarioNewClusterMenu"; - this.ScenarioNewClusterMenu.Size = new System.Drawing.Size(228, 22); - this.ScenarioNewClusterMenu.Text = "New Cluster"; - this.ScenarioNewClusterMenu.Click += new System.EventHandler(this.ScenarioNewClusterMenu_Click); - // - // toolStripSeparator12 - // - this.toolStripSeparator12.Name = "toolStripSeparator12"; - this.toolStripSeparator12.Size = new System.Drawing.Size(225, 6); - // - // ScenarioAddToProjectMenu - // - this.ScenarioAddToProjectMenu.Enabled = false; - this.ScenarioAddToProjectMenu.Name = "ScenarioAddToProjectMenu"; - this.ScenarioAddToProjectMenu.Size = new System.Drawing.Size(228, 22); - this.ScenarioAddToProjectMenu.Text = "Add to Project"; - this.ScenarioAddToProjectMenu.Click += new System.EventHandler(this.ScenarioAddToProjectMenu_Click); - // - // ScenarioRemoveFromProjectMenu - // - this.ScenarioRemoveFromProjectMenu.Enabled = false; - this.ScenarioRemoveFromProjectMenu.Name = "ScenarioRemoveFromProjectMenu"; - this.ScenarioRemoveFromProjectMenu.Size = new System.Drawing.Size(228, 22); - this.ScenarioRemoveFromProjectMenu.Text = "Remove from Project"; - this.ScenarioRemoveFromProjectMenu.Click += new System.EventHandler(this.ScenarioRemoveFromProjectMenu_Click); - // - // ToolsMenu - // - this.ToolsMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.ToolsImportMenyooXmlMenu}); - this.ToolsMenu.Name = "ToolsMenu"; - this.ToolsMenu.Size = new System.Drawing.Size(47, 20); - this.ToolsMenu.Text = "Tools"; - // - // ToolsImportMenyooXmlMenu - // - this.ToolsImportMenyooXmlMenu.Name = "ToolsImportMenyooXmlMenu"; - this.ToolsImportMenyooXmlMenu.Size = new System.Drawing.Size(193, 22); - this.ToolsImportMenyooXmlMenu.Text = "Import Menyoo XML..."; - this.ToolsImportMenyooXmlMenu.Click += new System.EventHandler(this.ToolsImportMenyooXmlMenu_Click); - // - // OptionsMenu - // - this.OptionsMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.OptionsHideGTAVMapMenu}); - this.OptionsMenu.Name = "OptionsMenu"; - this.OptionsMenu.Size = new System.Drawing.Size(61, 20); - this.OptionsMenu.Text = "Options"; - // - // OptionsHideGTAVMapMenu - // - this.OptionsHideGTAVMapMenu.Name = "OptionsHideGTAVMapMenu"; - this.OptionsHideGTAVMapMenu.Size = new System.Drawing.Size(157, 22); - this.OptionsHideGTAVMapMenu.Text = "Hide GTAV map"; - this.OptionsHideGTAVMapMenu.Click += new System.EventHandler(this.OptionsHideGTAVMapMenu_Click); - // - // SaveFileDialog - // - this.SaveFileDialog.Filter = "CodeWalker Projects|*.cwproj"; - // - // OpenFileDialog - // - this.OpenFileDialog.Filter = "CodeWalker Projects|*.cwproj"; - // - // ScenarioImportChainMenu - // - this.ScenarioImportChainMenu.Enabled = false; - this.ScenarioImportChainMenu.Name = "ScenarioImportChainMenu"; - this.ScenarioImportChainMenu.Size = new System.Drawing.Size(228, 22); - this.ScenarioImportChainMenu.Text = "Import Chain..."; - this.ScenarioImportChainMenu.Click += new System.EventHandler(this.ScenarioImportChainMenu_Click); - // - // ProjectForm - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(776, 531); - this.Controls.Add(this.splitContainer1); - this.Controls.Add(this.TopMenuStrip); - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.MainMenuStrip = this.TopMenuStrip; - this.Name = "ProjectForm"; - this.Text = "Project - CodeWalker by dexyfex"; - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ProjectForm_FormClosing); - this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.ProjectForm_FormClosed); - this.splitContainer1.Panel1.ResumeLayout(false); - this.splitContainer1.Panel2.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); - this.splitContainer1.ResumeLayout(false); - this.MainTabControl.ResumeLayout(false); - this.ProjectTabPage.ResumeLayout(false); - this.ProjectPanel.ResumeLayout(false); - this.ProjectTabControl.ResumeLayout(false); - this.ProjectGeneralTabPage.ResumeLayout(false); - this.ProjectGeneralTabPage.PerformLayout(); - this.ProjectManifestTabPage.ResumeLayout(false); - this.ProjectManifestTabPage.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.ProjectManifestTextBox)).EndInit(); - this.YmapTabPage.ResumeLayout(false); - this.YmapTabControl.ResumeLayout(false); - this.YmapYmapTabPage.ResumeLayout(false); - this.YmapPanel.ResumeLayout(false); - this.YmapPanel.PerformLayout(); - this.tabControl1.ResumeLayout(false); - this.tabPage1.ResumeLayout(false); - this.groupBox1.ResumeLayout(false); - this.groupBox1.PerformLayout(); - this.groupBox2.ResumeLayout(false); - this.groupBox2.PerformLayout(); - this.tabPage2.ResumeLayout(false); - this.tabPage2.PerformLayout(); - this.YmapEntityTabPage.ResumeLayout(false); - this.EntityPanel.ResumeLayout(false); - this.EntityTabControl.ResumeLayout(false); - this.EntityGeneralTabPage.ResumeLayout(false); - this.EntityGeneralTabPage.PerformLayout(); - this.EntityLodTabPage.ResumeLayout(false); - this.EntityLodTabPage.PerformLayout(); - this.EntityPivotTabPage.ResumeLayout(false); - this.EntityPivotTabPage.PerformLayout(); - this.YmapCarGenTabPage.ResumeLayout(false); - this.CarGenPanel.ResumeLayout(false); - this.CarGenPanel.PerformLayout(); - this.YndTabPage.ResumeLayout(false); - this.YndTabControl.ResumeLayout(false); - this.YndYndTabPage.ResumeLayout(false); - this.YndPanel.ResumeLayout(false); - this.YndPanel.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.YndAreaIDYUpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.YndAreaIDXUpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.YndPedNodesUpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.YndVehicleNodesUpDown)).EndInit(); - this.YndNodeTabPage.ResumeLayout(false); - this.YndNodePanel.ResumeLayout(false); - this.PathNodeTabControl.ResumeLayout(false); - this.PathNodePropertiesTabPage.ResumeLayout(false); - this.PathNodePropertiesTabPage.PerformLayout(); - this.PathNodeFlags5GroupBox.ResumeLayout(false); - this.PathNodeFlags5GroupBox.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeFlags5UpDown)).EndInit(); - this.PathNodeFlags4GroupBox.ResumeLayout(false); - this.PathNodeFlags4GroupBox.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeFlags42UpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeFlags4UpDown)).EndInit(); - this.PathNodeFlags3GroupBox.ResumeLayout(false); - this.PathNodeFlags3GroupBox.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeFlags32UpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeFlags3UpDown)).EndInit(); - this.PathNodeFlags2GroupBox.ResumeLayout(false); - this.PathNodeFlags2GroupBox.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeFlags2UpDown)).EndInit(); - this.PathNodeFlags1GroupBox.ResumeLayout(false); - this.PathNodeFlags1GroupBox.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeFlags1UpDown)).EndInit(); - this.PathNodeFlags0GroupBox.ResumeLayout(false); - this.PathNodeFlags0GroupBox.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeFlags0UpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeAreaIDUpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeNodeIDUpDown)).EndInit(); - this.PathNodeLinksTabPage.ResumeLayout(false); - this.splitContainer2.Panel1.ResumeLayout(false); - this.splitContainer2.Panel1.PerformLayout(); - this.splitContainer2.Panel2.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit(); - this.splitContainer2.ResumeLayout(false); - this.PathNodeLinkPanel.ResumeLayout(false); - this.PathNodeLinkPanel.PerformLayout(); - this.PathLinkFlags2GroupBox.ResumeLayout(false); - this.PathLinkFlags2GroupBox.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeLinkFwdLanesUpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeLinkBackLanesUpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeLinkFlags2UpDown)).EndInit(); - this.PathLinkFlags1GroupBox.ResumeLayout(false); - this.PathLinkFlags1GroupBox.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeLinkOffsetSizeUpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeLinkFlags1UpDown)).EndInit(); - this.PathLinkFlags0GroupBox.ResumeLayout(false); - this.PathLinkFlags0GroupBox.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeLinkFlags04UpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeLinkFlags03UpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeLinkFlags0UpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeLinkLengthUpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeLinkNodeIDUpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeLinkAreaIDUpDown)).EndInit(); - this.PathNodeJunctionTabPage.ResumeLayout(false); - this.PathNodeJunctionTabPage.PerformLayout(); - this.PathNodeJunctionPanel.ResumeLayout(false); - this.PathNodeJunctionPanel.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeJunctionPosYUpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeJunctionPosXUpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeJunctionHeightmapDimYUpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeJunctionHeightmapDimXUpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeJunctionMinZUpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.PathNodeJunctionMaxZUpDown)).EndInit(); - this.YnvTabPage.ResumeLayout(false); - this.YnvTabControl.ResumeLayout(false); - this.YnvYnvTabPage.ResumeLayout(false); - this.YnvPanel.ResumeLayout(false); - this.YnvPanel.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.YnvAreaIDYUpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.YnvAreaIDXUpDown)).EndInit(); - this.YnvPolyTabPage.ResumeLayout(false); - this.YnvPortalTabPage.ResumeLayout(false); - this.TrainsTabPage.ResumeLayout(false); - this.TrainsTabControl.ResumeLayout(false); - this.TrainTrackTabPage.ResumeLayout(false); - this.TrainTrackFilePanel.ResumeLayout(false); - this.TrainTrackFilePanel.PerformLayout(); - this.TrainNodeTabPage.ResumeLayout(false); - this.TrainNodePanel.ResumeLayout(false); - this.TrainNodePanel.PerformLayout(); - this.ScenarioTabPage.ResumeLayout(false); - this.ScenarioTabControl.ResumeLayout(false); - this.ScenarioYmtTabPage.ResumeLayout(false); - this.ScenarioYmtPanel.ResumeLayout(false); - this.ScenarioYmtPanel.PerformLayout(); - this.ScenarioPointTabPage.ResumeLayout(false); - this.ScenarioPointOuterPanel.ResumeLayout(false); - this.ScenarioPointOuterPanel.PerformLayout(); - this.ScenarioPointPanel.ResumeLayout(false); - this.ScenarioPointPanel.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioPointFlagsValueUpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioPointWaitTimeUpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioPointRadiusUpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioPointSpOnlyFlagUpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioPointProbabilityUpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioPointTimeEndUpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioPointTimeStartUpDown)).EndInit(); - this.ScenarioEntityTabPage.ResumeLayout(false); - this.ScenarioEntityTabPage.PerformLayout(); - this.ScenarioEntityPanel.ResumeLayout(false); - this.ScenarioEntityPanel.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioEntityUnk2UpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioEntityUnk1UpDown)).EndInit(); - this.ScenarioEntityPointTabPage.ResumeLayout(false); - this.ScenarioEntityPointTabPage.PerformLayout(); - this.ScenarioEntityPointPanel.ResumeLayout(false); - this.ScenarioEntityPointPanel.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioEntityPointFlagsUpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioEntityPointEndUpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioEntityPointStartUpDown)).EndInit(); - this.ScenarioChainTabPage.ResumeLayout(false); - this.splitContainer3.Panel1.ResumeLayout(false); - this.splitContainer3.Panel1.PerformLayout(); - this.splitContainer3.Panel2.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).EndInit(); - this.splitContainer3.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioChainUnk1UpDown)).EndInit(); - this.ScenarioChainEdgePanel.ResumeLayout(false); - this.ScenarioChainEdgePanel.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioChainEdgeNodeIndexToUpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioChainEdgeNodeIndexFromUpDown)).EndInit(); - this.ScenarioChainNodeTabPage.ResumeLayout(false); - this.ScenarioChainNodeTabPage.PerformLayout(); - this.ScenarioChainNodePanel.ResumeLayout(false); - this.ScenarioChainNodePanel.PerformLayout(); - this.ScenarioClusterTabPage.ResumeLayout(false); - this.ScenarioClusterTabPage.PerformLayout(); - this.ScenarioClusterPanel.ResumeLayout(false); - this.ScenarioClusterPanel.PerformLayout(); - this.ScenarioClusterPointTabPage.ResumeLayout(false); - this.ScenarioClusterPointTabPage.PerformLayout(); - this.ScenarioClusterPointPanel.ResumeLayout(false); - this.ScenarioClusterPointPanel.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioClusterPointFlagsUpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioClusterPointWaitTimeUpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioClusterPointRadiusUpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioClusterPointAnimalFlagUpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioClusterPointProbabilityUpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioClusterPointTimeEndUpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.ScenarioClusterPointTimeStartUpDown)).EndInit(); - this.TopMenuStrip.ResumeLayout(false); - this.TopMenuStrip.PerformLayout(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.SplitContainer splitContainer1; - private System.Windows.Forms.TreeView ProjectTreeView; - private CodeWalker.WinForms.MenuStripFix TopMenuStrip; - private System.Windows.Forms.ToolStripMenuItem FileMenu; - private System.Windows.Forms.ToolStripMenuItem FileNewMenu; - private System.Windows.Forms.ToolStripMenuItem FileNewProjectMenu; - private System.Windows.Forms.ToolStripMenuItem FileNewYmapMenu; - private System.Windows.Forms.ToolStripMenuItem FileOpenMenu; - private System.Windows.Forms.ToolStripMenuItem FileOpenProjectMenu; - private System.Windows.Forms.ToolStripMenuItem FileOpenYmapMenu; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; - private System.Windows.Forms.ToolStripMenuItem FileCloseProjectMenu; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; - private System.Windows.Forms.ToolStripMenuItem FileSaveProjectMenu; - private System.Windows.Forms.ToolStripMenuItem FileSaveProjectAsMenu; - private System.Windows.Forms.SaveFileDialog SaveFileDialog; - private System.Windows.Forms.OpenFileDialog OpenFileDialog; - private System.Windows.Forms.TabControl MainTabControl; - private System.Windows.Forms.TabPage ProjectTabPage; - private System.Windows.Forms.TabPage YmapTabPage; - private System.Windows.Forms.Label ProjectVersionLabel; - private System.Windows.Forms.TextBox ProjectNameTextBox; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.TextBox YmapNameTextBox; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.Panel YmapPanel; - private System.Windows.Forms.Panel ProjectPanel; - private System.Windows.Forms.TextBox YmapParentTextBox; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.Label label5; - private System.Windows.Forms.Label YmapParentHashLabel; - private System.Windows.Forms.Label YmapNameHashLabel; - private System.Windows.Forms.TextBox YmapContentFlagsTextBox; - private System.Windows.Forms.Label label7; - private System.Windows.Forms.TextBox YmapFlagsTextBox; - private System.Windows.Forms.Label label6; - private System.Windows.Forms.TextBox YmapStreamingExtentsMaxTextBox; - private System.Windows.Forms.Label label10; - private System.Windows.Forms.TextBox YmapStreamingExtentsMinTextBox; - private System.Windows.Forms.Label label11; - private System.Windows.Forms.TextBox YmapEntitiesExtentsMaxTextBox; - private System.Windows.Forms.Label label9; - private System.Windows.Forms.TextBox YmapEntitiesExtentsMinTextBox; - private System.Windows.Forms.Label label8; - private System.Windows.Forms.ToolStripMenuItem FileSaveItemMenu; - private System.Windows.Forms.ToolStripMenuItem FileSaveItemAsMenu; - private System.Windows.Forms.Label EntityArchetypeHashLabel; - private System.Windows.Forms.TextBox EntityArchetypeTextBox; - private System.Windows.Forms.Label label13; - private System.Windows.Forms.TextBox EntityGuidTextBox; - private System.Windows.Forms.Label label15; - private System.Windows.Forms.TextBox EntityFlagsTextBox; - private System.Windows.Forms.Label label14; - private System.Windows.Forms.TextBox EntityRotationTextBox; - private System.Windows.Forms.Label label17; - private System.Windows.Forms.TextBox EntityPositionTextBox; - private System.Windows.Forms.Label label16; - private System.Windows.Forms.Panel EntityPanel; - private System.Windows.Forms.TextBox EntityScaleZTextBox; - private System.Windows.Forms.Label label19; - private System.Windows.Forms.TextBox EntityScaleXYTextBox; - private System.Windows.Forms.Label label18; - private System.Windows.Forms.Label label20; - private System.Windows.Forms.TextBox EntityParentIndexTextBox; - private System.Windows.Forms.Label label22; - private System.Windows.Forms.TextBox EntityChildLodDistTextBox; - private System.Windows.Forms.Label label21; - private System.Windows.Forms.TextBox EntityLodDistTextBox; - private System.Windows.Forms.ComboBox EntityLodLevelComboBox; - private System.Windows.Forms.Label label23; - private System.Windows.Forms.ComboBox EntityPriorityLevelComboBox; - private System.Windows.Forms.Label label24; - private System.Windows.Forms.Label label25; - private System.Windows.Forms.TextBox EntityNumChildrenTextBox; - private System.Windows.Forms.Label label26; - private System.Windows.Forms.TextBox EntityAOMultiplierTextBox; - private System.Windows.Forms.Label label28; - private System.Windows.Forms.TextBox EntityTintValueTextBox; - private System.Windows.Forms.Label label27; - private System.Windows.Forms.TextBox EntityArtificialAOTextBox; - private System.Windows.Forms.CheckBox ProjectShowEntitiesCheckBox; - private System.Windows.Forms.CheckBox ProjectHideMapCheckBox; - private System.Windows.Forms.Button EntityGoToButton; - private System.Windows.Forms.ToolStripMenuItem YmapMenu; - private System.Windows.Forms.ToolStripMenuItem YmapNewEntityMenu; - private System.Windows.Forms.ToolStripMenuItem YmapNameMenu; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator3; - private System.Windows.Forms.Button YmapCalculateExtentsButton; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator5; - private System.Windows.Forms.ToolStripMenuItem YmapRemoveFromProjectMenu; - private System.Windows.Forms.Button EntityNormalizeRotationButton; - private System.Windows.Forms.TextBox YmapProjectPathTextBox; - private System.Windows.Forms.Label label30; - private System.Windows.Forms.TextBox YmapFileLocationTextBox; - private System.Windows.Forms.Label label29; - private System.Windows.Forms.Panel CarGenPanel; - private System.Windows.Forms.Button CarGoToButton; - private System.Windows.Forms.TextBox CarPositionTextBox; - private System.Windows.Forms.Label label31; - private System.Windows.Forms.TextBox CarModelTextBox; - private System.Windows.Forms.Label label32; - private System.Windows.Forms.Label CarModelHashLabel; - private System.Windows.Forms.TextBox CarOrientYTextBox; - private System.Windows.Forms.Label label34; - private System.Windows.Forms.TextBox CarOrientXTextBox; - private System.Windows.Forms.Label label35; - private System.Windows.Forms.TextBox CarPerpendicularLengthTextBox; - private System.Windows.Forms.Label label36; - private System.Windows.Forms.Label label37; - private System.Windows.Forms.TextBox CarFlagsTextBox; - private System.Windows.Forms.Label label38; - private System.Windows.Forms.TextBox CarBodyColorRemap1TextBox; - private System.Windows.Forms.Label label43; - private System.Windows.Forms.TextBox CarBodyColorRemap4TextBox; - private System.Windows.Forms.Label label42; - private System.Windows.Forms.TextBox CarBodyColorRemap3TextBox; - private System.Windows.Forms.Label label41; - private System.Windows.Forms.TextBox CarBodyColorRemap2TextBox; - private System.Windows.Forms.TextBox CarPopGroupTextBox; - private System.Windows.Forms.Label label39; - private System.Windows.Forms.Label CarPopGroupHashLabel; - private System.Windows.Forms.Label label44; - private System.Windows.Forms.TextBox CarLiveryTextBox; - private System.Windows.Forms.Button EntityDeleteButton; - private System.Windows.Forms.Button EntityAddToProjectButton; - private System.Windows.Forms.ToolStripMenuItem YmapNewCarGenMenu; - private System.Windows.Forms.ToolStripMenuItem YmapAddToProjectMenu; - private System.Windows.Forms.Button CarDeleteButton; - private System.Windows.Forms.Button CarAddToProjectButton; - private System.Windows.Forms.TabControl YmapTabControl; - private System.Windows.Forms.TabPage YmapYmapTabPage; - private System.Windows.Forms.TabPage YmapEntityTabPage; - private System.Windows.Forms.TabPage YmapCarGenTabPage; - private System.Windows.Forms.TabPage YndTabPage; - private System.Windows.Forms.Panel YndPanel; - private System.Windows.Forms.TextBox YndRpfPathTextBox; - private System.Windows.Forms.TabControl YndTabControl; - private System.Windows.Forms.TabPage YndYndTabPage; - private System.Windows.Forms.TabPage YndNodeTabPage; - private System.Windows.Forms.Label label33; - private System.Windows.Forms.Label YndAreaIDInfoLabel; - private System.Windows.Forms.Label YndTotalNodesLabel; - private System.Windows.Forms.NumericUpDown YndPedNodesUpDown; - private System.Windows.Forms.Label label45; - private System.Windows.Forms.NumericUpDown YndVehicleNodesUpDown; - private System.Windows.Forms.Label label40; - private System.Windows.Forms.Label label47; - private System.Windows.Forms.ToolStripMenuItem FileNewYndMenu; - private System.Windows.Forms.ToolStripMenuItem FileOpenYndMenu; - private System.Windows.Forms.ToolStripMenuItem YndMenu; - private System.Windows.Forms.ToolStripMenuItem YndNameMenu; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator4; - private System.Windows.Forms.ToolStripMenuItem YndNewNodeMenu; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator6; - private System.Windows.Forms.ToolStripMenuItem YndAddToProjectMenu; - private System.Windows.Forms.ToolStripMenuItem YndRemoveFromProjectMenu; - private System.Windows.Forms.Label label46; - private System.Windows.Forms.TextBox YndFilePathTextBox; - private System.Windows.Forms.Panel YndNodePanel; - private System.Windows.Forms.Label label48; - private System.Windows.Forms.TextBox YndProjectPathTextBox; - private System.Windows.Forms.Label PathNodeStreetNameLabel; - private System.Windows.Forms.TextBox PathNodeStreetHashTextBox; - private System.Windows.Forms.Label label52; - private System.Windows.Forms.NumericUpDown PathNodeNodeIDUpDown; - private System.Windows.Forms.Label label50; - private System.Windows.Forms.NumericUpDown PathNodeAreaIDUpDown; - private System.Windows.Forms.Label label49; - private System.Windows.Forms.Label PathNodeFlags4Label; - private System.Windows.Forms.NumericUpDown PathNodeFlags4UpDown; - private System.Windows.Forms.Label PathNodeFlags3Label; - private System.Windows.Forms.NumericUpDown PathNodeFlags3UpDown; - private System.Windows.Forms.Label PathNodeFlags2Label; - private System.Windows.Forms.NumericUpDown PathNodeFlags2UpDown; - private System.Windows.Forms.Label PathNodeFlags1Label; - private System.Windows.Forms.NumericUpDown PathNodeFlags1UpDown; - private System.Windows.Forms.Label PathNodeFlags0Label; - private System.Windows.Forms.NumericUpDown PathNodeFlags0UpDown; - private System.Windows.Forms.TabControl PathNodeTabControl; - private System.Windows.Forms.TabPage PathNodeLinksTabPage; - private System.Windows.Forms.TabPage PathNodeJunctionTabPage; - private System.Windows.Forms.SplitContainer splitContainer2; - private System.Windows.Forms.ListBox PathNodeLinksListBox; - private System.Windows.Forms.Panel PathNodeLinkPanel; - private System.Windows.Forms.NumericUpDown PathNodeLinkNodeIDUpDown; - private System.Windows.Forms.Label label51; - private System.Windows.Forms.NumericUpDown PathNodeLinkAreaIDUpDown; - private System.Windows.Forms.Label label54; - private System.Windows.Forms.NumericUpDown PathNodeLinkLengthUpDown; - private System.Windows.Forms.Label label57; - private System.Windows.Forms.Label PathNodeLinkFlags2Label; - private System.Windows.Forms.NumericUpDown PathNodeLinkFlags2UpDown; - private System.Windows.Forms.Label PathNodeLinkFlags1Label; - private System.Windows.Forms.NumericUpDown PathNodeLinkFlags1UpDown; - private System.Windows.Forms.Label PathNodeLinkFlags0Label; - private System.Windows.Forms.NumericUpDown PathNodeLinkFlags0UpDown; - private System.Windows.Forms.Button PathNodeGoToButton; - private System.Windows.Forms.TextBox PathNodePositionTextBox; - private System.Windows.Forms.Label label55; - private System.Windows.Forms.NumericUpDown PathNodeFlags5UpDown; - private System.Windows.Forms.Button PathNodeRemoveLinkButton; - private System.Windows.Forms.Button PathNodeAddLinkButton; - private System.Windows.Forms.Panel PathNodeJunctionPanel; - private System.Windows.Forms.NumericUpDown PathNodeJunctionMaxZUpDown; - private System.Windows.Forms.Label label65; - private System.Windows.Forms.CheckBox PathNodeJunctionEnableCheckBox; - private System.Windows.Forms.NumericUpDown PathNodeJunctionMinZUpDown; - private System.Windows.Forms.Label label67; - private System.Windows.Forms.NumericUpDown PathNodeJunctionHeightmapDimYUpDown; - private System.Windows.Forms.Label label77; - private System.Windows.Forms.NumericUpDown PathNodeJunctionHeightmapDimXUpDown; - private System.Windows.Forms.Label label76; - private System.Windows.Forms.Label label78; - private WinForms.TextBoxFix PathNodeJunctionHeightmapBytesTextBox; - private System.Windows.Forms.Label PathNodeLinkCountLabel; - private System.Windows.Forms.Label label68; - private System.Windows.Forms.Label PathNodeLinkageStatusLabel; - private System.Windows.Forms.Button PathNodeDeleteButton; - private System.Windows.Forms.Button PathNodeAddToProjectButton; - private System.Windows.Forms.TabPage TrainsTabPage; - private System.Windows.Forms.TabControl TrainsTabControl; - private System.Windows.Forms.TabPage TrainTrackTabPage; - private System.Windows.Forms.TabPage TrainNodeTabPage; - private System.Windows.Forms.Panel TrainNodePanel; - private System.Windows.Forms.Panel TrainTrackFilePanel; - private System.Windows.Forms.Label label74; - private System.Windows.Forms.TextBox TrainTrackProjectPathTextBox; - private System.Windows.Forms.Label label79; - private System.Windows.Forms.TextBox TrainTrackFilePathTextBox; - private System.Windows.Forms.Label label80; - private System.Windows.Forms.TextBox TrainTrackRpfPathTextBox; - private System.Windows.Forms.Button TrainNodeDeleteButton; - private System.Windows.Forms.Button TrainNodeAddToProjectButton; - private System.Windows.Forms.Button TrainNodeGoToButton; - private System.Windows.Forms.TextBox TrainNodePositionTextBox; - private System.Windows.Forms.Label label81; - private System.Windows.Forms.ComboBox TrainNodeTypeComboBox; - private System.Windows.Forms.Label label82; - private System.Windows.Forms.Label label83; - private System.Windows.Forms.TextBox TrainTrackFilenameTextBox; - private System.Windows.Forms.Label label84; - private System.Windows.Forms.TextBox TrainTrackConfigNameTextBox; - private System.Windows.Forms.CheckBox TrainTrackMPStopsAtStationsCheckBox; - private System.Windows.Forms.CheckBox TrainTrackStopsAtStationsCheckBox; - private System.Windows.Forms.CheckBox TrainTrackIsPingPongCheckBox; - private System.Windows.Forms.Label label86; - private System.Windows.Forms.TextBox TrainTrackBrakingDistTextBox; - private System.Windows.Forms.Label label85; - private System.Windows.Forms.TextBox TrainTrackSpeedTextBox; - private System.Windows.Forms.ToolStripMenuItem TrainsMenu; - private System.Windows.Forms.ToolStripMenuItem TrainsNameMenu; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator7; - private System.Windows.Forms.ToolStripMenuItem TrainsNewNodeMenu; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator8; - private System.Windows.Forms.ToolStripMenuItem TrainsAddToProjectMenu; - private System.Windows.Forms.ToolStripMenuItem TrainsRemoveFromProjectMenu; - private System.Windows.Forms.ToolStripMenuItem FileNewTrainsMenu; - private System.Windows.Forms.ToolStripMenuItem FileOpenTrainsMenu; - private System.Windows.Forms.TabPage YnvTabPage; - private System.Windows.Forms.TabControl YnvTabControl; - private System.Windows.Forms.TabPage YnvYnvTabPage; - private System.Windows.Forms.TabPage YnvPolyTabPage; - private System.Windows.Forms.TabPage YnvPortalTabPage; - private System.Windows.Forms.Panel YnvPanel; - private System.Windows.Forms.Panel YnvPolygonPanel; - private System.Windows.Forms.Panel YnvPortalPanel; - private System.Windows.Forms.ToolStripMenuItem FileNewYnvMenu; - private System.Windows.Forms.ToolStripMenuItem FileOpenYnvMenu; - private System.Windows.Forms.ToolStripMenuItem YnvMenu; - private System.Windows.Forms.ToolStripMenuItem YnvNameMenu; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator9; - private System.Windows.Forms.ToolStripMenuItem YnvNewPolygonMenu; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator10; - private System.Windows.Forms.ToolStripMenuItem YnvAddToProjectMenu; - private System.Windows.Forms.ToolStripMenuItem YnvRemoveFromProjectMenu; - private System.Windows.Forms.Label label88; - private System.Windows.Forms.NumericUpDown YndAreaIDYUpDown; - private System.Windows.Forms.Label label87; - private System.Windows.Forms.NumericUpDown YndAreaIDXUpDown; - private System.Windows.Forms.Label label89; - private System.Windows.Forms.NumericUpDown YnvAreaIDYUpDown; - private System.Windows.Forms.Label label90; - private System.Windows.Forms.NumericUpDown YnvAreaIDXUpDown; - private System.Windows.Forms.Label YnvAreaIDInfoLabel; - private System.Windows.Forms.Label label92; - private System.Windows.Forms.TextBox YnvAABBSizeTextBox; - private System.Windows.Forms.Label label91; - private System.Windows.Forms.GroupBox groupBox1; - private System.Windows.Forms.CheckBox YmapCFlagsSLOD2CheckBox; - private System.Windows.Forms.CheckBox YmapCFlagsLODCheckBox; - private System.Windows.Forms.CheckBox YmapCFlagsHDCheckBox; - private System.Windows.Forms.CheckBox YmapCFlagsOcclusionCheckBox; - private System.Windows.Forms.CheckBox YmapCFlagsInteriorCheckBox; - private System.Windows.Forms.CheckBox YmapCFlagsSLODCheckBox; - private System.Windows.Forms.CheckBox YmapCFlagsPhysicsCheckBox; - private System.Windows.Forms.CheckBox YmapCFlagsCriticalCheckBox; - private System.Windows.Forms.CheckBox YmapCFlagsDistLightsCheckBox; - private System.Windows.Forms.CheckBox YmapCFlagsLODLightsCheckBox; - private System.Windows.Forms.CheckBox YmapCFlagsGrassCheckBox; - private System.Windows.Forms.GroupBox groupBox2; - private System.Windows.Forms.CheckBox YmapFlagsLODCheckBox; - private System.Windows.Forms.CheckBox YmapFlagsScriptedCheckBox; - private System.Windows.Forms.Button YmapCalculateFlagsButton; - private System.Windows.Forms.TabControl tabControl1; - private System.Windows.Forms.TabPage tabPage1; - private System.Windows.Forms.TabPage tabPage2; - private System.Windows.Forms.Label label12; - private WinForms.TextBoxFix YmapPhysicsDictionariesTextBox; - private System.Windows.Forms.TabControl EntityTabControl; - private System.Windows.Forms.TabPage EntityGeneralTabPage; - private System.Windows.Forms.TabPage EntityLodTabPage; - private System.Windows.Forms.TabPage EntityExtensionsTabPage; - private System.Windows.Forms.TabPage EntityPivotTabPage; - private System.Windows.Forms.Label label93; - private System.Windows.Forms.TextBox EntityPivotPositionTextBox; - private System.Windows.Forms.Button EntityPivotRotationNormalizeButton; - private System.Windows.Forms.Label label94; - private System.Windows.Forms.TextBox EntityPivotRotationTextBox; - private System.Windows.Forms.CheckBox EntityPivotEditCheckBox; - private System.Windows.Forms.Label label95; - private System.Windows.Forms.NumericUpDown PathNodeJunctionPosYUpDown; - private System.Windows.Forms.Label label59; - private System.Windows.Forms.NumericUpDown PathNodeJunctionPosXUpDown; - private System.Windows.Forms.Label label69; - private System.Windows.Forms.Label TrainTrackInfoLabel; - private System.Windows.Forms.TabPage PathNodePropertiesTabPage; - private System.Windows.Forms.CheckBox PathNodeFlags08CheckBox; - private System.Windows.Forms.CheckBox PathNodeFlags07CheckBox; - private System.Windows.Forms.CheckBox PathNodeFlags06CheckBox; - private System.Windows.Forms.CheckBox PathNodeFlags05CheckBox; - private System.Windows.Forms.CheckBox PathNodeFlags04CheckBox; - private System.Windows.Forms.CheckBox PathNodeFlags03CheckBox; - private System.Windows.Forms.CheckBox PathNodeFlags02CheckBox; - private System.Windows.Forms.CheckBox PathNodeFlags01CheckBox; - private System.Windows.Forms.GroupBox PathNodeFlags0GroupBox; - private System.Windows.Forms.GroupBox PathNodeFlags1GroupBox; - private System.Windows.Forms.CheckBox PathNodeFlags11CheckBox; - private System.Windows.Forms.CheckBox PathNodeFlags18CheckBox; - private System.Windows.Forms.CheckBox PathNodeFlags12CheckBox; - private System.Windows.Forms.CheckBox PathNodeFlags17CheckBox; - private System.Windows.Forms.CheckBox PathNodeFlags13CheckBox; - private System.Windows.Forms.CheckBox PathNodeFlags16CheckBox; - private System.Windows.Forms.CheckBox PathNodeFlags14CheckBox; - private System.Windows.Forms.CheckBox PathNodeFlags15CheckBox; - private System.Windows.Forms.GroupBox PathNodeFlags2GroupBox; - private System.Windows.Forms.CheckBox PathNodeFlags21CheckBox; - private System.Windows.Forms.CheckBox PathNodeFlags28CheckBox; - private System.Windows.Forms.CheckBox PathNodeFlags22CheckBox; - private System.Windows.Forms.CheckBox PathNodeFlags27CheckBox; - private System.Windows.Forms.CheckBox PathNodeFlags23CheckBox; - private System.Windows.Forms.CheckBox PathNodeFlags26CheckBox; - private System.Windows.Forms.CheckBox PathNodeFlags24CheckBox; - private System.Windows.Forms.CheckBox PathNodeFlags25CheckBox; - private System.Windows.Forms.GroupBox PathNodeFlags3GroupBox; - private System.Windows.Forms.CheckBox PathNodeFlags31CheckBox; - private System.Windows.Forms.Label label70; - private System.Windows.Forms.GroupBox PathNodeFlags4GroupBox; - private System.Windows.Forms.Label label71; - private System.Windows.Forms.CheckBox PathNodeFlags41CheckBox; - private System.Windows.Forms.NumericUpDown PathNodeFlags42UpDown; - private System.Windows.Forms.GroupBox PathNodeFlags5GroupBox; - private System.Windows.Forms.CheckBox PathNodeFlags51CheckBox; - private System.Windows.Forms.CheckBox PathNodeFlags45CheckBox; - private System.Windows.Forms.CheckBox PathNodeFlags46CheckBox; - private System.Windows.Forms.CheckBox PathNodeFlags47CheckBox; - private System.Windows.Forms.CheckBox PathNodeFlags48CheckBox; - private System.Windows.Forms.NumericUpDown PathNodeFlags32UpDown; - private System.Windows.Forms.CheckBox PathNodeFlags52CheckBox; - private System.Windows.Forms.CheckBox PathNodeFlags53CheckBox; - private System.Windows.Forms.NumericUpDown PathNodeLinkBackLanesUpDown; - private System.Windows.Forms.Label label56; - private System.Windows.Forms.NumericUpDown PathNodeLinkFwdLanesUpDown; - private System.Windows.Forms.Label label53; - private System.Windows.Forms.GroupBox PathLinkFlags0GroupBox; - private System.Windows.Forms.CheckBox PathNodeLinkFlags01CheckBox; - private System.Windows.Forms.CheckBox PathNodeLinkFlags02CheckBox; - private System.Windows.Forms.GroupBox PathLinkFlags1GroupBox; - private System.Windows.Forms.CheckBox PathNodeLinkFlags11CheckBox; - private System.Windows.Forms.CheckBox PathNodeLinkFlags18CheckBox; - private System.Windows.Forms.CheckBox PathNodeLinkFlags12CheckBox; - private System.Windows.Forms.CheckBox PathNodeLinkFlags13CheckBox; - private System.Windows.Forms.CheckBox PathNodeLinkFlags14CheckBox; - private System.Windows.Forms.GroupBox PathLinkFlags2GroupBox; - private System.Windows.Forms.CheckBox PathNodeLinkFlags21CheckBox; - private System.Windows.Forms.CheckBox PathNodeLinkFlags22CheckBox; - private System.Windows.Forms.NumericUpDown PathNodeLinkFlags04UpDown; - private System.Windows.Forms.Label label60; - private System.Windows.Forms.NumericUpDown PathNodeLinkFlags03UpDown; - private System.Windows.Forms.Label label58; - private System.Windows.Forms.NumericUpDown PathNodeLinkOffsetSizeUpDown; - private System.Windows.Forms.Label label61; - private System.Windows.Forms.TabPage ScenarioTabPage; - private System.Windows.Forms.TabControl ScenarioTabControl; - private System.Windows.Forms.TabPage ScenarioYmtTabPage; - private System.Windows.Forms.TabPage ScenarioPointTabPage; - private System.Windows.Forms.Panel ScenarioYmtPanel; - private System.Windows.Forms.Panel ScenarioPointOuterPanel; - private System.Windows.Forms.TextBox ScenarioYmtNameTextBox; - private System.Windows.Forms.Label label63; - private System.Windows.Forms.TextBox ScenarioYmtVersionTextBox; - private System.Windows.Forms.Label label64; - private System.Windows.Forms.TextBox ScenarioYmtProjectPathTextBox; - private System.Windows.Forms.Label label66; - private System.Windows.Forms.TextBox ScenarioYmtFileLocationTextBox; - private System.Windows.Forms.Label label72; - private System.Windows.Forms.TextBox ScenarioYmtGridMaxTextBox; - private System.Windows.Forms.Label label73; - private System.Windows.Forms.TextBox ScenarioYmtGridMinTextBox; - private System.Windows.Forms.Label label75; - private System.Windows.Forms.Label ScenarioYmtGridInfoLabel; - private System.Windows.Forms.TextBox ScenarioYmtGridScaleTextBox; - private System.Windows.Forms.Label label96; - private System.Windows.Forms.ToolStripMenuItem FileOpenScenarioMenu; - private System.Windows.Forms.ToolStripMenuItem ScenarioMenu; - private System.Windows.Forms.ToolStripMenuItem ScenarioNameMenu; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator11; - private System.Windows.Forms.ToolStripMenuItem ScenarioNewPointMenu; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator12; - private System.Windows.Forms.ToolStripMenuItem ScenarioAddToProjectMenu; - private System.Windows.Forms.ToolStripMenuItem ScenarioRemoveFromProjectMenu; - private System.Windows.Forms.ToolStripMenuItem FileNewScenarioMenu; - private System.Windows.Forms.TextBox ScenarioPointDirectionTextBox; - private System.Windows.Forms.Label label97; - private System.Windows.Forms.Button ScenarioPointDeleteButton; - private System.Windows.Forms.Button ScenarioPointAddToProjectButton; - private System.Windows.Forms.Button ScenarioPointGoToButton; - private System.Windows.Forms.TextBox ScenarioPointPositionTextBox; - private System.Windows.Forms.Label label62; - private System.Windows.Forms.Panel ScenarioPointPanel; - private System.Windows.Forms.ComboBox ScenarioPointTypeComboBox; - private System.Windows.Forms.Label label98; - private System.Windows.Forms.NumericUpDown ScenarioPointTimeEndUpDown; - private System.Windows.Forms.NumericUpDown ScenarioPointTimeStartUpDown; - private System.Windows.Forms.Label label100; - private System.Windows.Forms.ComboBox ScenarioPointModelSetComboBox; - private System.Windows.Forms.Label label99; - private System.Windows.Forms.Label label101; - private System.Windows.Forms.TextBox ScenarioPointInteriorTextBox; - private System.Windows.Forms.Label label102; - private System.Windows.Forms.Label label106; - private System.Windows.Forms.NumericUpDown ScenarioPointProbabilityUpDown; - private System.Windows.Forms.Label label107; - private System.Windows.Forms.NumericUpDown ScenarioPointSpOnlyFlagUpDown; - private System.Windows.Forms.Label label108; - private System.Windows.Forms.NumericUpDown ScenarioPointRadiusUpDown; - private System.Windows.Forms.Label label109; - private System.Windows.Forms.NumericUpDown ScenarioPointWaitTimeUpDown; - private System.Windows.Forms.Label label111; - private System.Windows.Forms.NumericUpDown ScenarioPointFlagsValueUpDown; - private System.Windows.Forms.CheckedListBox ScenarioPointFlagsCheckedListBox; - private System.Windows.Forms.CheckBox ScenarioPointCheckBox; - private System.Windows.Forms.TabPage ScenarioEntityPointTabPage; - private System.Windows.Forms.Panel ScenarioEntityPointPanel; - private System.Windows.Forms.CheckBox ScenarioEntityPointCheckBox; - private System.Windows.Forms.TabPage ScenarioChainTabPage; - private System.Windows.Forms.TabPage ScenarioClusterTabPage; - private System.Windows.Forms.Panel ScenarioClusterPanel; - private System.Windows.Forms.CheckBox ScenarioClusterCheckBox; - private System.Windows.Forms.Label ScenarioPointInteriorHashLabel; - private System.Windows.Forms.Label label116; - private System.Windows.Forms.Button ScenarioEntityPointGoToButton; - private System.Windows.Forms.TextBox ScenarioEntityPointPositionTextBox; - private System.Windows.Forms.Label label117; - private System.Windows.Forms.TextBox ScenarioEntityPointRotationTextBox; - private System.Windows.Forms.Label label118; - private System.Windows.Forms.Label ScenarioEntityPointPedTypeHashLabel; - private System.Windows.Forms.TextBox ScenarioEntityPointPedTypeTextBox; - private System.Windows.Forms.Label label122; - private System.Windows.Forms.Label ScenarioEntityPointSpawnTypeHashLabel; - private System.Windows.Forms.TextBox ScenarioEntityPointSpawnTypeTextBox; - private System.Windows.Forms.Label label120; - private System.Windows.Forms.Label ScenarioEntityPointRequiredImapHashLabel; - private System.Windows.Forms.TextBox ScenarioEntityPointRequiredImapTextBox; - private System.Windows.Forms.Label label128; - private System.Windows.Forms.Label ScenarioEntityPointInteriorHashLabel; - private System.Windows.Forms.TextBox ScenarioEntityPointInteriorTextBox; - private System.Windows.Forms.Label label126; - private System.Windows.Forms.Label ScenarioEntityPointGroupHashLabel; - private System.Windows.Forms.TextBox ScenarioEntityPointGroupTextBox; - private System.Windows.Forms.Label label124; - private System.Windows.Forms.ComboBox ScenarioEntityPointAvailableInMpSpComboBox; - private System.Windows.Forms.Label label129; - private System.Windows.Forms.TextBox ScenarioEntityPointProbabilityTextBox; - private System.Windows.Forms.Label label130; - private System.Windows.Forms.TextBox ScenarioEntityPointTimeTillPedLeavesTextBox; - private System.Windows.Forms.Label label131; - private System.Windows.Forms.TextBox ScenarioEntityPointRadiusTextBox; - private System.Windows.Forms.Label label132; - private System.Windows.Forms.Label label133; - private System.Windows.Forms.NumericUpDown ScenarioEntityPointEndUpDown; - private System.Windows.Forms.NumericUpDown ScenarioEntityPointStartUpDown; - private System.Windows.Forms.Label label134; - private System.Windows.Forms.CheckBox ScenarioEntityPointHighPriCheckBox; - private System.Windows.Forms.CheckBox ScenarioEntityPointExtendedRangeCheckBox; - private System.Windows.Forms.CheckedListBox ScenarioEntityPointFlagsCheckedListBox; - private System.Windows.Forms.Label label135; - private System.Windows.Forms.NumericUpDown ScenarioEntityPointFlagsUpDown; - private System.Windows.Forms.CheckBox ScenarioEntityPointShortRangeCheckBox; - private System.Windows.Forms.Button ScenarioEntityPointDeleteButton; - private System.Windows.Forms.Button ScenarioEntityPointAddToProjectButton; - private System.Windows.Forms.Button ScenarioClusterDeleteButton; - private System.Windows.Forms.Button ScenarioClusterAddToProjectButton; - private System.Windows.Forms.Label ScenarioEntityPointNameHashLabel; - private System.Windows.Forms.TextBox ScenarioEntityPointNameTextBox; - private System.Windows.Forms.SplitContainer splitContainer3; - private System.Windows.Forms.Button ScenarioChainRemoveEdgeButton; - private System.Windows.Forms.Button ScenarioChainAddEdgeButton; - private System.Windows.Forms.ListBox ScenarioChainEdgesListBox; - private System.Windows.Forms.Label ScenarioChainEdgeCountLabel; - private System.Windows.Forms.Panel ScenarioChainEdgePanel; - private System.Windows.Forms.Label label121; - private System.Windows.Forms.Label label125; - private System.Windows.Forms.NumericUpDown ScenarioChainEdgeNodeIndexToUpDown; - private System.Windows.Forms.NumericUpDown ScenarioChainEdgeNodeIndexFromUpDown; - private System.Windows.Forms.ComboBox ScenarioChainEdgeActionComboBox; - private System.Windows.Forms.Label label127; - private System.Windows.Forms.ComboBox ScenarioChainEdgeNavSpeedComboBox; - private System.Windows.Forms.Label label137; - private System.Windows.Forms.ComboBox ScenarioChainEdgeNavModeComboBox; - private System.Windows.Forms.Label label136; - private System.Windows.Forms.Label label138; - private System.Windows.Forms.NumericUpDown ScenarioChainUnk1UpDown; - private System.Windows.Forms.Button ScenarioClusterGoToButton; - private System.Windows.Forms.TextBox ScenarioClusterCenterTextBox; - private System.Windows.Forms.Label label139; - private System.Windows.Forms.TextBox ScenarioClusterUnk1TextBox; - private System.Windows.Forms.Label label140; - private System.Windows.Forms.CheckBox ScenarioClusterUnk2CheckBox; - private System.Windows.Forms.Label ScenarioPointGroupHashLabel; - private System.Windows.Forms.TextBox ScenarioPointGroupTextBox; - private System.Windows.Forms.Label label156; - private System.Windows.Forms.Label ScenarioPointImapHashLabel; - private System.Windows.Forms.TextBox ScenarioPointImapTextBox; - private System.Windows.Forms.Label label110; - private System.Windows.Forms.TabPage ScenarioClusterPointTabPage; - private System.Windows.Forms.Button ScenarioClusterPointDeleteButton; - private System.Windows.Forms.Button ScenarioClusterPointAddToProjectButton; - private System.Windows.Forms.Panel ScenarioClusterPointPanel; - private System.Windows.Forms.Label ScenarioClusterPointImapHashLabel; - private System.Windows.Forms.TextBox ScenarioClusterPointImapTextBox; - private System.Windows.Forms.Label label143; - private System.Windows.Forms.Label ScenarioClusterPointGroupHashLabel; - private System.Windows.Forms.TextBox ScenarioClusterPointGroupTextBox; - private System.Windows.Forms.Label label141; - private System.Windows.Forms.Label ScenarioClusterPointInteriorHashLabel; - private System.Windows.Forms.CheckedListBox ScenarioClusterPointFlagsCheckedListBox; - private System.Windows.Forms.Label label142; - private System.Windows.Forms.TextBox ScenarioClusterPointDirectionTextBox; - private System.Windows.Forms.Label label144; - private System.Windows.Forms.NumericUpDown ScenarioClusterPointFlagsUpDown; - private System.Windows.Forms.Label label145; - private System.Windows.Forms.Button ScenarioClusterPointGoToButton; - private System.Windows.Forms.NumericUpDown ScenarioClusterPointWaitTimeUpDown; - private System.Windows.Forms.TextBox ScenarioClusterPointPositionTextBox; - private System.Windows.Forms.Label label146; - private System.Windows.Forms.Label label147; - private System.Windows.Forms.NumericUpDown ScenarioClusterPointRadiusUpDown; - private System.Windows.Forms.Label label148; - private System.Windows.Forms.NumericUpDown ScenarioClusterPointAnimalFlagUpDown; - private System.Windows.Forms.Label label149; - private System.Windows.Forms.NumericUpDown ScenarioClusterPointProbabilityUpDown; - private System.Windows.Forms.TextBox ScenarioClusterPointInteriorTextBox; - private System.Windows.Forms.Label label151; - private System.Windows.Forms.Label label152; - private System.Windows.Forms.NumericUpDown ScenarioClusterPointTimeEndUpDown; - private System.Windows.Forms.NumericUpDown ScenarioClusterPointTimeStartUpDown; - private System.Windows.Forms.Label label153; - private System.Windows.Forms.ComboBox ScenarioClusterPointModelSetComboBox; - private System.Windows.Forms.Label label154; - private System.Windows.Forms.ComboBox ScenarioClusterPointTypeComboBox; - private System.Windows.Forms.Label label155; - private System.Windows.Forms.CheckBox ScenarioClusterPointCheckBox; - private System.Windows.Forms.TabPage ScenarioChainNodeTabPage; - private System.Windows.Forms.Panel ScenarioChainNodePanel; - private System.Windows.Forms.ComboBox ScenarioChainNodeTypeComboBox; - private System.Windows.Forms.TextBox ScenarioChainNodeIndexTextBox; - private System.Windows.Forms.Label label115; - private System.Windows.Forms.CheckBox ScenarioChainNodeLastCheckBox; - private System.Windows.Forms.CheckBox ScenarioChainNodeFirstCheckBox; - private System.Windows.Forms.Label label123; - private System.Windows.Forms.Label ScenarioChainNodeUnk1HashLabel; - private System.Windows.Forms.TextBox ScenarioChainNodeUnk1TextBox; - private System.Windows.Forms.Label label119; - private System.Windows.Forms.Button ScenarioChainNodeGoToButton; - private System.Windows.Forms.TextBox ScenarioChainNodePositionTextBox; - private System.Windows.Forms.Label label105; - private System.Windows.Forms.Button ScenarioChainNodeDeleteButton; - private System.Windows.Forms.CheckBox ScenarioChainNodeCheckBox; - private System.Windows.Forms.Button ScenarioChainNodeAddToProjectButton; - private System.Windows.Forms.TabPage ScenarioEntityTabPage; - private System.Windows.Forms.Button ScenarioEntityDeleteButton; - private System.Windows.Forms.Panel ScenarioEntityPanel; - private System.Windows.Forms.Label ScenarioEntityInfoLabel; - private System.Windows.Forms.Label label114; - private System.Windows.Forms.NumericUpDown ScenarioEntityUnk2UpDown; - private System.Windows.Forms.Label label113; - private System.Windows.Forms.NumericUpDown ScenarioEntityUnk1UpDown; - private System.Windows.Forms.Label ScenarioEntityTypeHashLabel; - private System.Windows.Forms.TextBox ScenarioEntityTypeTextBox; - private System.Windows.Forms.Label label112; - private System.Windows.Forms.Button ScenarioEntityGoToButton; - private System.Windows.Forms.TextBox ScenarioEntityPositionTextBox; - private System.Windows.Forms.Label label104; - private System.Windows.Forms.Button ScenarioEntityAddToProjectButton; - private System.Windows.Forms.CheckBox ScenarioEntityCheckBox; - private System.Windows.Forms.Button ScenarioChainDeleteButton; - private System.Windows.Forms.Button ScenarioChainAddToProjectButton; - private System.Windows.Forms.TextBox ScenarioYmtExtentsMaxTextBox; - private System.Windows.Forms.Label label103; - private System.Windows.Forms.TextBox ScenarioYmtExtentsMinTextBox; - private System.Windows.Forms.Label label150; - private System.Windows.Forms.ToolStripMenuItem ScenarioNewPointFromSelectedMenu; - private System.Windows.Forms.ToolStripMenuItem ScenarioNewEntityOverrideMenu; - private System.Windows.Forms.ToolStripMenuItem ScenarioNewChainMenu; - private System.Windows.Forms.ToolStripMenuItem ScenarioNewClusterMenu; - private System.Windows.Forms.TextBox ScenarioClusterRadiusTextBox; - private System.Windows.Forms.Label label157; - private System.Windows.Forms.Button ScenarioChainMoveEdgeDownButton; - private System.Windows.Forms.Button ScenarioChainMoveEdgeUpButton; - private System.Windows.Forms.Button ScenarioClusterAddPointButton; - private System.Windows.Forms.Label label158; - private System.Windows.Forms.ListBox ScenarioClusterPointsListBox; - private System.Windows.Forms.Label label159; - private System.Windows.Forms.Label label160; - private System.Windows.Forms.Button ScenarioEntityAddPointButton; - private System.Windows.Forms.Label label161; - private System.Windows.Forms.ListBox ScenarioEntityPointsListBox; - private System.Windows.Forms.TabControl ProjectTabControl; - private System.Windows.Forms.TabPage ProjectGeneralTabPage; - private System.Windows.Forms.TabPage ProjectManifestTabPage; - private System.Windows.Forms.ToolStripMenuItem OptionsMenu; - private System.Windows.Forms.ToolStripMenuItem OptionsHideGTAVMapMenu; - private System.Windows.Forms.Button ProjectManifestGenerateButton; - private FastColoredTextBoxNS.FastColoredTextBox ProjectManifestTextBox; - private System.Windows.Forms.Label label162; - private System.Windows.Forms.CheckedListBox CarFlagsCheckedListBox; - private System.Windows.Forms.CheckedListBox EntityFlagsCheckedListBox; - private System.Windows.Forms.ToolStripMenuItem ToolsMenu; - private System.Windows.Forms.ToolStripMenuItem ToolsImportMenyooXmlMenu; - private System.Windows.Forms.TabPage YmapMloInstanceTabPage; - private System.Windows.Forms.TabPage YmapTimecycleModifierTabPage; - private System.Windows.Forms.ToolStripMenuItem ScenarioImportChainMenu; - } -} \ No newline at end of file diff --git a/Project/ProjectFormOLD.cs b/Project/ProjectFormOLD.cs deleted file mode 100644 index aa95737..0000000 --- a/Project/ProjectFormOLD.cs +++ /dev/null @@ -1,10586 +0,0 @@ -using CodeWalker.GameFiles; -using CodeWalker.Project; -using CodeWalker.Properties; -using CodeWalker.World; -using SharpDX; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Globalization; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace CodeWalker -{ - public partial class ProjectFormOLD : Form - { - WorldForm WorldForm; - GameFileCache GameFileCache; - RpfManager RpfMan; - - ProjectFile CurrentProjectFile; - YmapFile CurrentYmapFile; - YmapEntityDef CurrentEntity; - YmapCarGen CurrentCarGen; - - YndFile CurrentYndFile; - YndNode CurrentPathNode; - YndLink CurrentPathLink; - - YnvFile CurrentYnvFile; - YnvPoly CurrentNavPoly; - - TrainTrack CurrentTrainTrack; - TrainTrackNode CurrentTrainNode; - - YmtFile CurrentScenario; - ScenarioNode CurrentScenarioNode; - MCScenarioChainingEdge CurrentScenarioChainEdge; - - - bool renderentities = true; - bool hidegtavmap = false; - - object ymapsyncroot = new object(); - object yndsyncroot = new object(); - object ynvsyncroot = new object(); - object trainsyncroot = new object(); - object scenariosyncroot = new object(); - - Dictionary visibleynds = new Dictionary(); - Dictionary visibleynvs = new Dictionary(); - Dictionary visibletrains = new Dictionary(); - Dictionary visiblescenarios = new Dictionary(); - - - bool populatingui = false; - - - - public bool IsProjectLoaded - { - get { return CurrentProjectFile != null; } - } - - - public ProjectFormOLD(WorldForm worldForm) - { - InitializeComponent(); - - MainTabControl.TabPages.Remove(YnvTabPage);//TODO - EntityTabControl.TabPages.Remove(EntityExtensionsTabPage);//TODO - - LoadDropDowns(); - - WorldForm = worldForm; - if ((WorldForm != null) && (WorldForm.GameFileCache != null)) - { - GameFileCache = WorldForm.GameFileCache; - RpfMan = GameFileCache.RpfMan; - } - else - { - GameFileCache = GameFileCacheFactory.Create(); - new Thread(new ThreadStart(() => { - GameFileCache.Init(UpdateStatus, UpdateStatus); - RpfMan = GameFileCache.RpfMan; - })).Start(); - } - - } - - - private void LoadDropDowns() - { - EntityLodLevelComboBox.Items.Clear(); - EntityLodLevelComboBox.Items.Add(Unk_1264241711.LODTYPES_DEPTH_ORPHANHD); - EntityLodLevelComboBox.Items.Add(Unk_1264241711.LODTYPES_DEPTH_HD); - EntityLodLevelComboBox.Items.Add(Unk_1264241711.LODTYPES_DEPTH_LOD); - EntityLodLevelComboBox.Items.Add(Unk_1264241711.LODTYPES_DEPTH_SLOD1); - EntityLodLevelComboBox.Items.Add(Unk_1264241711.LODTYPES_DEPTH_SLOD2); - EntityLodLevelComboBox.Items.Add(Unk_1264241711.LODTYPES_DEPTH_SLOD3); - EntityLodLevelComboBox.Items.Add(Unk_1264241711.LODTYPES_DEPTH_SLOD4); - - EntityPriorityLevelComboBox.Items.Clear(); - EntityPriorityLevelComboBox.Items.Add(Unk_648413703.PRI_REQUIRED); - EntityPriorityLevelComboBox.Items.Add(Unk_648413703.PRI_OPTIONAL_HIGH); - EntityPriorityLevelComboBox.Items.Add(Unk_648413703.PRI_OPTIONAL_MEDIUM); - EntityPriorityLevelComboBox.Items.Add(Unk_648413703.PRI_OPTIONAL_LOW); - } - - - private void UpdateStatus(string text) - { - try - { - if (InvokeRequired) - { - BeginInvoke(new Action(() => { UpdateStatus(text); })); - } - else - { - //TODO: status text - //StatusLabel.Text = text; - } - } - catch { } - } - - - - - private void UpdateFormTitleText() - { - 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; - } - - private void RefreshYmapUI() - { - bool enable = (CurrentYmapFile != null); - bool inproj = YmapExistsInProject(CurrentYmapFile); - - YmapNewEntityMenu.Enabled = enable && inproj; - YmapNewCarGenMenu.Enabled = enable && inproj; - - if (CurrentYmapFile != null) - { - YmapNameMenu.Text = "(" + CurrentYmapFile.Name + ")"; - } - else - { - YmapNameMenu.Text = "(No .ymap file selected)"; - } - - YmapAddToProjectMenu.Enabled = enable && !inproj; - YmapRemoveFromProjectMenu.Enabled = inproj; - - if (WorldForm != null) - { - WorldForm.EnableYmapUI(enable, CurrentYmapFile?.Name ?? ""); - } - } - - private void RefreshEntityUI() - { - bool enable = (CurrentEntity != null); - bool isinproj = false; - - if (CurrentEntity != null) - { - isinproj = YmapExistsInProject(CurrentEntity.Ymap); - } - - EntityAddToProjectButton.Enabled = !isinproj; - EntityDeleteButton.Enabled = isinproj; - } - - private void RefreshCarGenUI() - { - bool enable = (CurrentCarGen != null); - bool isinproj = false; - - if (CurrentCarGen != null) - { - isinproj = YmapExistsInProject(CurrentCarGen.Ymap); - } - - CarAddToProjectButton.Enabled = !isinproj; - CarDeleteButton.Enabled = isinproj; - } - - private void RefreshYndUI() - { - bool enable = (CurrentYndFile != null); - bool inproj = YndExistsInProject(CurrentYndFile); - - YndNewNodeMenu.Enabled = enable && inproj; - - if (CurrentYndFile != null) - { - YndNameMenu.Text = "(" + CurrentYndFile.Name + ")"; - } - else - { - YndNameMenu.Text = "(No .ynd file selected)"; - } - - YndAddToProjectMenu.Enabled = enable && !inproj; - YndRemoveFromProjectMenu.Enabled = inproj; - - - if (WorldForm != null) - { - WorldForm.EnableYndUI(enable, CurrentYndFile?.Name ?? ""); - } - } - - private void RefreshYnvUI() - { - bool enable = (CurrentYnvFile != null); - bool inproj = YnvExistsInProject(CurrentYnvFile); - - YnvNewPolygonMenu.Enabled = enable && inproj; - - if (CurrentYnvFile != null) - { - YnvNameMenu.Text = "(" + CurrentYnvFile.Name + ")"; - } - else - { - YnvNameMenu.Text = "(No .ynv file selected)"; - } - - YnvAddToProjectMenu.Enabled = enable && !inproj; - YnvRemoveFromProjectMenu.Enabled = inproj; - - - if (WorldForm != null) - { - WorldForm.EnableYnvUI(enable, CurrentYnvFile?.Name ?? ""); - } - } - - private void RefreshTrainTrackUI() - { - bool enable = (CurrentTrainTrack != null); - bool inproj = TrainTrackExistsInProject(CurrentTrainTrack); - - TrainsNewNodeMenu.Enabled = enable && inproj; - - if (CurrentTrainTrack != null) - { - TrainsNameMenu.Text = "(" + CurrentTrainTrack.Name + ")"; - } - else - { - TrainsNameMenu.Text = "(No train track selected)"; - } - - TrainsAddToProjectMenu.Enabled = enable && !inproj; - TrainsRemoveFromProjectMenu.Enabled = inproj; - - - if (WorldForm != null) - { - WorldForm.EnableTrainsUI(enable, CurrentTrainTrack?.Name ?? ""); - } - } - - private void RefreshScenarioUI() - { - bool enable = (CurrentScenario != null); - bool inproj = ScenarioExistsInProject(CurrentScenario); - - ScenarioNewPointMenu.Enabled = enable && inproj; - ScenarioNewPointFromSelectedMenu.Enabled = enable && inproj && (CurrentScenarioNode != null); - ScenarioNewEntityOverrideMenu.Enabled = enable && inproj; - ScenarioNewChainMenu.Enabled = enable && inproj; - ScenarioNewClusterMenu.Enabled = enable && inproj; - ScenarioImportChainMenu.Enabled = enable && inproj; - - if (CurrentScenario != null) - { - ScenarioNameMenu.Text = "(" + CurrentScenario.Name + ")"; - } - else - { - ScenarioNameMenu.Text = "(No scenario region selected)"; - } - - ScenarioAddToProjectMenu.Enabled = enable && !inproj; - ScenarioRemoveFromProjectMenu.Enabled = inproj; - - - if (WorldForm != null) - { - WorldForm.EnableScenarioUI(enable, CurrentScenario?.Name ?? ""); - } - } - - private void RefreshUI() - { - RefreshYmapUI(); - RefreshEntityUI(); - RefreshCarGenUI(); - RefreshYndUI(); - RefreshYnvUI(); - RefreshTrainTrackUI(); - RefreshScenarioUI(); - SetCurrentSaveItem(); - LoadYmapTabPage(); - LoadEntityTabPage(); - LoadCarGenTabPage(); - LoadYndTabPage(); - LoadYnvTabPage(); - LoadPathNodeTabPage(); - LoadTrainTrackTabPage(); - LoadTrainNodeTabPage(); - LoadScenarioTabPage(); - LoadScenarioNodeTabPages(); - } - - - private void SetCurrentSaveItem() - { - string filename = null; - if (CurrentYmapFile != null) - { - filename = CurrentYmapFile.RpfFileEntry?.Name; - } - else if (CurrentYndFile != null) - { - filename = CurrentYndFile.RpfFileEntry?.Name; - } - else if (CurrentYnvFile != null) - { - filename = CurrentYnvFile.RpfFileEntry?.Name; - } - else if (CurrentTrainTrack != null) - { - filename = CurrentTrainTrack.RpfFileEntry?.Name; - } - else if (CurrentScenario != null) - { - filename = CurrentScenario.RpfFileEntry?.Name; - } - - bool enable = !string.IsNullOrEmpty(filename); - - if (enable) - { - FileSaveItemMenu.Text = "Save " + filename; - FileSaveItemAsMenu.Text = "Save " + filename + " As..."; - } - else - { - FileSaveItemMenu.Text = "Save"; - FileSaveItemAsMenu.Text = "Save As..."; - } - - FileSaveItemMenu.Tag = filename; - FileSaveItemAsMenu.Tag = filename; - - FileSaveItemMenu.Enabled = enable; - FileSaveItemMenu.Visible = enable; - FileSaveItemAsMenu.Enabled = enable; - FileSaveItemAsMenu.Visible = enable; - - if (WorldForm != null) - { - WorldForm.SetCurrentSaveItem(filename); - } - } - - - - public void Save() - { - if (CurrentYmapFile != null) - { - SaveYmap(); - } - else if (CurrentYndFile != null) - { - SaveYnd(); - } - else if (CurrentYnvFile != null) - { - SaveYnv(); - } - else if (CurrentTrainTrack != null) - { - SaveTrainTrack(); - } - else if (CurrentScenario != null) - { - SaveScenario(); - } - else if (CurrentProjectFile != null) - { - SaveProject(); - } - } - - public void SaveAll() - { - if (CurrentProjectFile != null) - { - if (CurrentProjectFile.YmapFiles != null) - { - var cymap = CurrentYmapFile; - foreach (var ymap in CurrentProjectFile.YmapFiles) - { - CurrentYmapFile = ymap; - SaveYmap(); - } - CurrentYmapFile = cymap; - LoadYmapTabPage(); - } - - if (CurrentProjectFile.YndFiles != null) - { - var cynd = CurrentYndFile; - foreach (var ynd in CurrentProjectFile.YndFiles) - { - CurrentYndFile = ynd; - SaveYnd(); - } - CurrentYndFile = cynd; - LoadYndTabPage(); - } - - if (CurrentProjectFile.YnvFiles != null) - { - var cynv = CurrentYnvFile; - foreach (var ynv in CurrentProjectFile.YnvFiles) - { - CurrentYnvFile = ynv; - SaveYnv(); - } - CurrentYnvFile = cynv; - LoadYnvTabPage(); - } - - if (CurrentProjectFile.TrainsFiles != null) - { - var ctrack = CurrentTrainTrack; - foreach (var track in CurrentProjectFile.TrainsFiles) - { - CurrentTrainTrack = track; - SaveYnd(); - } - CurrentTrainTrack = ctrack; - LoadTrainTrackTabPage(); - } - - if (CurrentProjectFile.ScenarioFiles != null) - { - var cscen = CurrentScenario; - foreach (var scen in CurrentProjectFile.ScenarioFiles) - { - CurrentScenario = scen; - SaveScenario(); - } - CurrentScenario = cscen; - LoadScenarioTabPage(); - } - - - SaveProject(); - } - } - - - private void SaveCurrentItem(bool saveas = false) - { - if (CurrentYmapFile != null) - { - SaveYmap(saveas); - } - else if (CurrentYndFile != null) - { - SaveYnd(saveas); - } - else if (CurrentYnvFile != null) - { - SaveYnv(saveas); - } - else if (CurrentTrainTrack != null) - { - SaveTrainTrack(saveas); - } - else if (CurrentScenario != null) - { - SaveScenario(saveas); - } - } - - - - public void NewProject() - { - if (CurrentProjectFile != null) - { - ////unload current project first - CloseProject(); - } - - CurrentProjectFile = new ProjectFile(); - CurrentProjectFile.Name = "New CodeWalker Project"; - CurrentProjectFile.Version = 1; - CurrentProjectFile.HasChanged = true; - LoadProjectUI(); - } - - public void OpenProject() - { - string file = ShowOpenDialog("CodeWalker Projects|*.cwproj", string.Empty); - if (string.IsNullOrEmpty(file)) - { - return; - } - - CloseProject(); - - CurrentProjectFile = new ProjectFile(); - CurrentProjectFile.Load(file); - - string cpath = new FileInfo(CurrentProjectFile.Filepath).Directory.FullName; - - foreach (var ymap in CurrentProjectFile.YmapFiles) - { - string filename = ymap.FilePath; - if (!File.Exists(filename)) - { - filename = cpath + "\\" + filename; - } - if (File.Exists(filename)) - { - LoadYmapFromFile(ymap, filename); - } - else - { - MessageBox.Show("Couldn't find file: " + filename); - } - } - - foreach (var ynd in CurrentProjectFile.YndFiles) - { - string filename = ynd.FilePath; - if (!File.Exists(filename)) - { - filename = cpath + "\\" + filename; - } - if (File.Exists(filename)) - { - LoadYndFromFile(ynd, filename); - } - else - { - MessageBox.Show("Couldn't find file: " + filename); - } - } - - foreach (var ynv in CurrentProjectFile.YnvFiles) - { - string filename = ynv.FilePath; - if (!File.Exists(filename)) - { - filename = cpath + "\\" + filename; - } - if (File.Exists(filename)) - { - LoadYnvFromFile(ynv, filename); - } - else - { - MessageBox.Show("Couldn't find file: " + filename); - } - } - - foreach (var track in CurrentProjectFile.TrainsFiles) - { - string filename = track.FilePath; - if (!File.Exists(filename)) - { - filename = cpath + "\\" + filename; - } - if (File.Exists(filename)) - { - LoadTrainTrackFromFile(track, filename); - } - else - { - MessageBox.Show("Couldn't find file: " + filename); - } - } - - foreach (var scenario in CurrentProjectFile.ScenarioFiles) - { - string filename = scenario.FilePath; - if (!File.Exists(filename)) - { - filename = cpath + "\\" + filename; - } - if (File.Exists(filename)) - { - LoadScenarioFromFile(scenario, filename); - } - else - { - MessageBox.Show("Couldn't find file: " + filename); - } - } - - - LoadProjectUI(); - } - - public void 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 - - string oldpath = CurrentProjectFile.Filepath; - CurrentProjectFile.Filepath = fileName; - CurrentProjectFile.Filename = new FileInfo(fileName).Name; - CurrentProjectFile.UpdateFilenames(oldpath); - } - - CurrentProjectFile.Save(); - - SetProjectHasChanged(false); - } - - private void CloseProject() - { - if (CurrentProjectFile == null) return; - - foreach (var ymap in CurrentProjectFile.YmapFiles) - { - if ((ymap != 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) - { - CurrentYmapFile = ymap; - SaveYmap(); - } - } - } - - foreach (var ynd in CurrentProjectFile.YndFiles) - { - if ((ynd != 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) - { - CurrentYndFile = ynd; - SaveYnd(); - } - } - } - - foreach (var ynv in CurrentProjectFile.YnvFiles) - { - 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) - { - CurrentYnvFile = ynv; - SaveYnv(); - } - } - } - - foreach (var trains in CurrentProjectFile.TrainsFiles) - { - if ((trains != 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) - { - CurrentTrainTrack = trains; - SaveTrainTrack(); - } - } - } - - foreach (var scenario in CurrentProjectFile.ScenarioFiles) - { - if ((scenario != null) && (scenario.HasChanged)) - { - //save the current scenario file first? - if (MessageBox.Show("Would you like to save " + scenario.Name + " before closing?", "Save scenario file before closing?", MessageBoxButtons.YesNo) == DialogResult.Yes) - { - CurrentScenario = scenario; - SaveScenario(); - } - } - } - - - if (CurrentProjectFile.HasChanged) - { - //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(); - } - } - - CurrentProjectFile = null; - CurrentYmapFile = null; - CurrentYndFile = null; - - LoadProjectUI(); - - - if (WorldForm != null) - { - WorldForm.SelectItem(null);//make sure current selected item isn't still selected... - } - } - - private void LoadProjectUI() - { - RefreshProjectUI(); - UpdateFormTitleText(); - LoadProjectTree(); - LoadProjectTabPage(); - RefreshUI(); - } - - - private void LoadProjectTree() - { - ProjectTreeView.Nodes.Clear(); - - if (CurrentProjectFile == null) return; - - var pcstr = CurrentProjectFile.HasChanged ? "*" : ""; - - var projnode = ProjectTreeView.Nodes.Add(pcstr + CurrentProjectFile.Name); - projnode.Tag = CurrentProjectFile; - - - if (CurrentProjectFile.YmapFiles.Count > 0) - { - 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.Ensure(name); - JenkIndex.Ensure(Path.GetFileNameWithoutExtension(name)); - } - ymapsnode.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(); - } - - projnode.Expand(); - - } - - private void LoadProjectTabPage() - { - if (CurrentProjectFile == null) - { - ProjectPanel.Enabled = false; - ProjectNameTextBox.Text = ""; - ProjectVersionLabel.Text = "Version: -"; - } - else - { - ProjectPanel.Enabled = true; - ProjectNameTextBox.Text = CurrentProjectFile.Name; - ProjectVersionLabel.Text = "Version: " + CurrentProjectFile.Version.ToString(); - } - } - - private void SetProjectHasChanged(bool changed) - { - if (CurrentProjectFile == null) return; - - CurrentProjectFile.HasChanged = changed; - - if (ProjectTreeView.Nodes.Count > 0) - { - //first node is the project... - string changestr = changed ? "*" : ""; - ProjectTreeView.Nodes[0].Text = changestr + CurrentProjectFile.Name; - } - - UpdateFormTitleText(); - } - - - private void GenerateProjectManifest() - { - StringBuilder sb = new StringBuilder(); - Dictionary deps = new Dictionary(); - - sb.AppendLine(""); - sb.AppendLine(""); - sb.AppendLine(" "); - sb.AppendLine(" "); - sb.AppendLine(" "); - - - if ((CurrentProjectFile != null) && (CurrentProjectFile.YmapFiles.Count > 0)) - { - sb.AppendLine(" "); - foreach (var ymap in CurrentProjectFile.YmapFiles) - { - var ymapname = ymap.RpfFileEntry?.NameLower; - if (string.IsNullOrEmpty(ymapname)) - { - ymapname = ymap.Name.ToLowerInvariant(); - } - if (ymapname.EndsWith(".ymap")) - { - ymapname = ymapname.Substring(0, ymapname.Length - 5); - } - - deps.Clear(); - if (ymap.AllEntities != null) - { - foreach (var ent in ymap.AllEntities) - { - var ytyp = ent.Archetype?.Ytyp; - if (ytyp != null) - { - var ytypname = ytyp.RpfFileEntry?.NameLower; - if (string.IsNullOrEmpty(ytypname)) - { - ytypname = ytyp.RpfFileEntry?.Name?.ToLowerInvariant(); - if (ytypname == null) ytypname = ""; - } - if (ytypname.EndsWith(".ytyp")) - { - ytypname = ytypname.Substring(0, ytypname.Length - 5); - } - deps[ytypname] = ytyp; - } - } - } - - sb.AppendLine(" "); - sb.AppendLine(" " + ymapname + ""); - sb.AppendLine(" "); - sb.AppendLine(" "); - foreach (var kvp in deps) - { - sb.AppendLine(" " + kvp.Key + ""); - } - sb.AppendLine(" "); - sb.AppendLine(" "); - } - sb.AppendLine(" "); - } - else - { - sb.AppendLine(" "); - } - - sb.AppendLine(" "); - sb.AppendLine(" "); - sb.AppendLine(""); - - ProjectManifestTextBox.Text = sb.ToString(); - } - - - - - public void NewYmap() - { - if (CurrentProjectFile == null) - { - NewProject(); - } - if (CurrentProjectFile == null) return; - - int testi = 1; - string fname = string.Empty; - bool filenameok = false; - while (!filenameok) - { - fname = "map" + testi.ToString() + ".ymap"; - filenameok = !CurrentProjectFile.ContainsYmap(fname); - testi++; - } - - lock (ymapsyncroot) - { - YmapFile ymap = CurrentProjectFile.AddYmapFile(fname); - if (ymap != null) - { - ymap.Loaded = true; - ymap.HasChanged = true; //new ymap, flag as not saved - ymap._CMapData.contentFlags = 65; //stream flags value - } - } - - CurrentProjectFile.HasChanged = true; - - LoadProjectTree(); - } - - public void OpenYmap() - { - string[] files = ShowOpenDialogMulti("Ymap files|*.ymap", string.Empty); - if (files == null) - { - return; - } - - if (CurrentProjectFile == null) - { - NewProject(); - } - - foreach (string file in files) - { - if (!File.Exists(file)) continue; - - var ymap = CurrentProjectFile.AddYmapFile(file); - - if (ymap != null) - { - SetProjectHasChanged(true); - - LoadYmapFromFile(ymap, file); - - LoadProjectTree(); - } - else - { - MessageBox.Show("Couldn't add\n" + file + "\n - the file already exists in the project."); - } - - } - } - - public void SaveYmap(bool saveas = false) - { - - if (CurrentYmapFile == null) return; - string ymapname = CurrentYmapFile.Name; - string filepath = CurrentYmapFile.FilePath; - if (string.IsNullOrEmpty(filepath)) - { - filepath = ymapname; - } - string origfile = filepath; - if (!File.Exists(filepath)) - { - saveas = true; - } - - - byte[] data; - lock (ymapsyncroot) //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; } - - string newname = Path.GetFileNameWithoutExtension(filepath); - JenkIndex.Ensure(newname); - CurrentYmapFile.FilePath = filepath; - CurrentYmapFile.RpfFileEntry.Name = new FileInfo(filepath).Name; - CurrentYmapFile.Name = CurrentYmapFile.RpfFileEntry.Name; - CurrentYmapFile._CMapData.name = new MetaHash(JenkHash.GenHash(newname)); - } - - data = CurrentYmapFile.Save(); - } - - - if (data != null) - { - File.WriteAllBytes(filepath, data); - } - - SetYmapHasChanged(false); - - if (saveas) - { - LoadYmapTabPage(); - if (CurrentProjectFile != null) - { - //string newname = CurrentYmapFile.Name; - string origpath = CurrentProjectFile.GetRelativePath(origfile); - string newpath = CurrentProjectFile.GetRelativePath(CurrentYmapFile.FilePath); - - if (!CurrentProjectFile.RenameYmap(origpath, newpath)) - { //couldn't rename it in the project? - MessageBox.Show("Couldn't rename ymap in project! This shouldn't happen - check the project file XML."); - } - } - SetProjectHasChanged(true); - SetCurrentSaveItem(); - } - - if (CurrentYmapFile.SaveWarnings != null) - { - string w = string.Join("\n", CurrentYmapFile.SaveWarnings); - MessageBox.Show(CurrentYmapFile.SaveWarnings.Count.ToString() + " warnings were generated while saving the ymap:\n" + w); - CurrentYmapFile.SaveWarnings = null;//clear it out for next time.. - } - } - - private void AddYmapToProject(YmapFile ymap) - { - if (ymap == null) return; - if (CurrentProjectFile == null) - { - NewProject(); - } - if (YmapExistsInProject(ymap)) return; - if (CurrentProjectFile.AddYmapFile(ymap)) - { - ymap.HasChanged = true; - CurrentProjectFile.HasChanged = true; - LoadProjectTree(); - } - CurrentYmapFile = ymap; - RefreshUI(); - if (CurrentEntity != null) - { - TrySelectEntityTreeNode(CurrentEntity); - } - else if (CurrentCarGen != null) - { - TrySelectCarGenTreeNode(CurrentCarGen); - } - } - - private void RemoveYmapFromProject() - { - if (CurrentYmapFile == null) return; - if (CurrentProjectFile == null) return; - CurrentProjectFile.RemoveYmapFile(CurrentYmapFile); - CurrentYmapFile = null; - LoadProjectTree(); - RefreshUI(); - } - - private void LoadYmapTabPage() - { - if (CurrentYmapFile == null) - { - YmapPanel.Enabled = false; - YmapNameTextBox.Text = ""; - YmapNameHashLabel.Text = "Hash: 0"; - YmapParentTextBox.Text = string.Empty; - YmapParentHashLabel.Text = "Hash: 0"; - YmapFlagsTextBox.Text = string.Empty; - YmapContentFlagsTextBox.Text = string.Empty; - YmapCFlagsHDCheckBox.Checked = false; - YmapCFlagsLODCheckBox.Checked = false; - YmapCFlagsSLOD2CheckBox.Checked = false; - YmapCFlagsInteriorCheckBox.Checked = false; - YmapCFlagsSLODCheckBox.Checked = false; - YmapCFlagsOcclusionCheckBox.Checked = false; - YmapCFlagsPhysicsCheckBox.Checked = false; - YmapCFlagsLODLightsCheckBox.Checked = false; - YmapCFlagsDistLightsCheckBox.Checked = false; - YmapCFlagsCriticalCheckBox.Checked = false; - YmapCFlagsGrassCheckBox.Checked = false; - YmapFlagsScriptedCheckBox.Checked = false; - YmapFlagsLODCheckBox.Checked = false; - YmapPhysicsDictionariesTextBox.Text = string.Empty; - YmapEntitiesExtentsMinTextBox.Text = string.Empty; - YmapEntitiesExtentsMaxTextBox.Text = string.Empty; - YmapStreamingExtentsMinTextBox.Text = string.Empty; - YmapStreamingExtentsMaxTextBox.Text = string.Empty; - YmapFileLocationTextBox.Text = string.Empty; - YmapProjectPathTextBox.Text = string.Empty; - } - else - { - populatingui = true; - var md = CurrentYmapFile.CMapData; - if (md.name.Hash == 0) - { - string name = Path.GetFileNameWithoutExtension(CurrentYmapFile.Name); - JenkIndex.Ensure(name); - md.name = new MetaHash(JenkHash.GenHash(name)); - } - - YmapPanel.Enabled = true; - 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 = CurrentYmapFile.FilePath; - YmapProjectPathTextBox.Text = (CurrentProjectFile != null) ? CurrentProjectFile.GetRelativePath(CurrentYmapFile.FilePath) : CurrentYmapFile.FilePath; - - UpdateYmapFlagsUI(true, true); - - UpdateYmapPhysicsDictionariesUI(); - - populatingui = false; - - ////struct CMapData: - //MetaHash name { get; set; } //8 8: Hash: 0: name - //MetaHash parent { get; set; } //12 12: Hash: 0: parent - //uint flags { get; set; } //16 16: UnsignedInt: 0: flags - //uint contentFlags { get; set; } //20 20: UnsignedInt: 0: contentFlags//1785155637 - //Vector3 streamingExtentsMin { get; set; } //32 32: Float_XYZ: 0: streamingExtentsMin//3710026271 - //Vector3 streamingExtentsMax { get; set; } //48 48: Float_XYZ: 0: streamingExtentsMax//2720965429 - //Vector3 entitiesExtentsMin { get; set; } //64 64: Float_XYZ: 0: entitiesExtentsMin//477478129 - //Vector3 entitiesExtentsMax { get; set; } //80 80: Float_XYZ: 0: entitiesExtentsMax//1829192759 - //Array_StructurePointer entities { get; set; } //96 96: Array: 0: entities {0: StructurePointer: 0: 256} - //Array_Structure containerLods { get; set; } //112 112: Array: 0: containerLods//2935983381 {0: Structure: 372253349: 256} - //Array_Structure boxOccluders { get; set; } //128 128: Array: 0: boxOccluders//3983590932 {0: Structure: SectionUNKNOWN7: 256} - //Array_Structure occludeModels { get; set; } //144 144: Array: 0: occludeModels//2132383965 {0: Structure: SectionUNKNOWN5: 256} - //Array_uint physicsDictionaries { get; set; } //160 160: Array: 0: physicsDictionaries//949589348 {0: Hash: 0: 256} - //rage__fwInstancedMapData instancedData { get; set; } //176 176: Structure: rage__fwInstancedMapData: instancedData//2569067561 - //Array_Structure timeCycleModifiers { get; set; } //224 224: Array: 0: timeCycleModifiers {0: Structure: CTimeCycleModifier: 256} - //Array_Structure carGenerators { get; set; } //240 240: Array: 0: carGenerators//3254823756 {0: Structure: CCarGen: 256} - //CLODLight LODLightsSOA { get; set; } //256 256: Structure: CLODLight: LODLightsSOA//1774371066 - //CDistantLODLight DistantLODLightsSOA { get; set; } //392 392: Structure: CDistantLODLight: DistantLODLightsSOA//2954466641 - //CBlockDesc block { get; set; } //440 440: Structure: CBlockDesc//3072355914: block - - } - } - - private void LoadYmapFromFile(YmapFile ymap, string filename) - { - byte[] data = File.ReadAllBytes(filename); - - ymap.Load(data); - - ymap.InitYmapEntityArchetypes(GameFileCache); //this needs to be done after calling YmapFile.Load() - } - - private void LoadYmapTreeNodes(YmapFile ymap, TreeNode node) - { - if (ymap == null) return; - - if (!string.IsNullOrEmpty(node.Name)) return; //named nodes are eg Entities and CarGens - - node.Nodes.Clear(); - - if ((ymap.AllEntities != null)&& (ymap.AllEntities.Length > 0)) - { - var entsnode = node.Nodes.Add("Entities (" + ymap.AllEntities.Length.ToString() + ")"); - entsnode.Name = "Entities"; - entsnode.Tag = ymap; - var ents = ymap.AllEntities; - for (int i = 0; i < ents.Length; i++) - { - var ent = ents[i]; - var edef = ent._CEntityDef; - var enode = entsnode.Nodes.Add(edef.archetypeName.ToString()); - enode.Tag = ent; - } - } - if ((ymap.CarGenerators != null) && (ymap.CarGenerators.Length > 0)) - { - var cargensnode = node.Nodes.Add("Car Generators (" + ymap.CarGenerators.Length.ToString() + ")"); - cargensnode.Name = "CarGens"; - cargensnode.Tag = ymap; - var cargens = ymap.CarGenerators; - for (int i = 0; i < cargens.Length; i++) - { - var cargen = cargens[i]; - var ccgnode = cargensnode.Nodes.Add(cargen.ToString()); - ccgnode.Tag = cargen; - } - } - if ((ymap.GrassInstanceBatches != null) && (ymap.GrassInstanceBatches.Length > 0)) - { - var grassbatchesnodes = node.Nodes.Add("Grass Batches (" + ymap.GrassInstanceBatches.Length.ToString() + ")"); - grassbatchesnodes.Name = "GrassBatches"; - grassbatchesnodes.Tag = ymap; - var grassbatches = ymap.GrassInstanceBatches; - for (int i = 0; i < grassbatches.Length; i++) - { - var batch = grassbatches[i]; - var gbnode = grassbatchesnodes.Nodes.Add(batch.ToString()); - gbnode.Tag = batch; - } - } - - } - - private void SetYmapHasChanged(bool changed) - { - if (CurrentYmapFile == null) return; - - bool changechange = changed != CurrentYmapFile.HasChanged; - if (!changechange) return; - - CurrentYmapFile.HasChanged = changed; - - SetYmapHasChangedUI(changed); - } - - private void SetYmapHasChangedUI(bool changed) - { - if (ProjectTreeView.Nodes.Count > 0) - { - var pnode = ProjectTreeView.Nodes[0]; - var ymnode = GetChildTreeNode(pnode, "Ymap"); - if (ymnode == null) return; - string changestr = changed ? "*" : ""; - for (int i = 0; i < ymnode.Nodes.Count; i++) - { - var ynode = ymnode.Nodes[i]; - if (ynode.Tag == CurrentYmapFile) - { - string name = CurrentYmapFile.Name; - if (CurrentYmapFile.RpfFileEntry != null) - { - name = CurrentYmapFile.RpfFileEntry.Name; - } - ynode.Text = changestr + name; - break; - } - } - } - } - - private void UpdateYmapFlagsUI(bool updateCheckboxes, bool updateTextboxes) - { - if (CurrentYmapFile == null) return; - - var md = CurrentYmapFile.CMapData; - var flags = md.flags; - var contentFlags = md.contentFlags; - - if (updateCheckboxes) - { - YmapCFlagsHDCheckBox.Checked = IsBitSet(contentFlags, 0); //1 - YmapCFlagsLODCheckBox.Checked = IsBitSet(contentFlags, 1); //2 - YmapCFlagsSLOD2CheckBox.Checked = IsBitSet(contentFlags, 2); //4 - YmapCFlagsInteriorCheckBox.Checked = IsBitSet(contentFlags, 3); //8 - YmapCFlagsSLODCheckBox.Checked = IsBitSet(contentFlags, 4); //16 - YmapCFlagsOcclusionCheckBox.Checked = IsBitSet(contentFlags, 5); //32 - YmapCFlagsPhysicsCheckBox.Checked = IsBitSet(contentFlags, 6); //64 - YmapCFlagsLODLightsCheckBox.Checked = IsBitSet(contentFlags, 7); //128 - YmapCFlagsDistLightsCheckBox.Checked = IsBitSet(contentFlags, 8); //256 - YmapCFlagsCriticalCheckBox.Checked = IsBitSet(contentFlags, 9); //512 - YmapCFlagsGrassCheckBox.Checked = IsBitSet(contentFlags, 10); //1024 - - YmapFlagsScriptedCheckBox.Checked = IsBitSet(flags, 0); //1 - YmapFlagsLODCheckBox.Checked = IsBitSet(flags, 1); //2 - } - if (updateTextboxes) - { - YmapFlagsTextBox.Text = flags.ToString(); - YmapContentFlagsTextBox.Text = contentFlags.ToString(); - } - } - - private void SetYmapFlagsFromCheckBoxes() - { - if (populatingui) return; - if (CurrentYmapFile == null) return; - - uint flags = 0; - uint contentFlags = 0; - - contentFlags = UpdateBit(contentFlags, 0, YmapCFlagsHDCheckBox.Checked); - contentFlags = UpdateBit(contentFlags, 1, YmapCFlagsLODCheckBox.Checked); - contentFlags = UpdateBit(contentFlags, 2, YmapCFlagsSLOD2CheckBox.Checked); - contentFlags = UpdateBit(contentFlags, 3, YmapCFlagsInteriorCheckBox.Checked); - contentFlags = UpdateBit(contentFlags, 4, YmapCFlagsSLODCheckBox.Checked); - contentFlags = UpdateBit(contentFlags, 5, YmapCFlagsOcclusionCheckBox.Checked); - contentFlags = UpdateBit(contentFlags, 6, YmapCFlagsPhysicsCheckBox.Checked); - contentFlags = UpdateBit(contentFlags, 7, YmapCFlagsLODLightsCheckBox.Checked); - contentFlags = UpdateBit(contentFlags, 8, YmapCFlagsDistLightsCheckBox.Checked); - contentFlags = UpdateBit(contentFlags, 9, YmapCFlagsCriticalCheckBox.Checked); - contentFlags = UpdateBit(contentFlags, 10, YmapCFlagsGrassCheckBox.Checked); - - flags = UpdateBit(flags, 0, YmapFlagsScriptedCheckBox.Checked); - flags = UpdateBit(flags, 1, YmapFlagsLODCheckBox.Checked); - - - lock (ymapsyncroot) - { - if (CurrentYmapFile._CMapData.flags != flags) - { - CurrentYmapFile._CMapData.flags = flags; - SetYmapHasChanged(true); - } - if (CurrentYmapFile._CMapData.contentFlags != contentFlags) - { - CurrentYmapFile._CMapData.contentFlags = contentFlags; - SetYmapHasChanged(true); - } - } - - populatingui = true; - UpdateYmapFlagsUI(false, true); //update textbox - populatingui = false; - } - - private void SetYmapFlagsFromTextBoxes() - { - if (populatingui) return; - if (CurrentYmapFile == null) return; - - uint flags = 0; - uint contentFlags = 0; - uint.TryParse(YmapFlagsTextBox.Text, out flags); - uint.TryParse(YmapContentFlagsTextBox.Text, out contentFlags); - lock (ymapsyncroot) - { - if (CurrentYmapFile._CMapData.flags != flags) - { - CurrentYmapFile._CMapData.flags = flags; - SetYmapHasChanged(true); - } - if (CurrentYmapFile._CMapData.contentFlags != contentFlags) - { - CurrentYmapFile._CMapData.contentFlags = contentFlags; - SetYmapHasChanged(true); - } - } - - populatingui = true; - UpdateYmapFlagsUI(true, false); //update checkboxes - populatingui = false; - } - - private void CalcYmapFlags() - { - if (populatingui) return; - if (CurrentYmapFile == null) return; - - lock (ymapsyncroot) - { - if (CurrentYmapFile.CalcFlags()) - { - SetYmapHasChanged(true); - } - } - - populatingui = true; - UpdateYmapFlagsUI(true, true); //update checkboxes and textboxes - populatingui = false; - } - - private void CalcYmapExtents() - { - if (CurrentYmapFile == null) return; - - var allents = CurrentYmapFile.AllEntities; - var allbatches = CurrentYmapFile.GrassInstanceBatches; - - if ((allents == null) && (allbatches == null)) - { - MessageBox.Show("No items to calculate extents from."); - return; - } - - lock (ymapsyncroot) - { - if (CurrentYmapFile.CalcExtents()) - { - SetYmapHasChanged(true); - } - } - - populatingui = true; - var md = CurrentYmapFile.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; - } - - private void UpdateYmapPhysicsDictionariesUI() - { - if ((CurrentYmapFile == null) || (CurrentYmapFile.physicsDictionaries == null)) - { - YmapPhysicsDictionariesTextBox.Text = string.Empty; - } - else - { - StringBuilder sb = new StringBuilder(); - foreach (var hash in CurrentYmapFile.physicsDictionaries) - { - sb.AppendLine(hash.ToString()); - } - YmapPhysicsDictionariesTextBox.Text = sb.ToString(); - } - } - - private void SetYmapPhysicsDictionariesFromTextbox() - { - if (populatingui) return; - if (CurrentYmapFile == null) return; - - List hashes = new List(); - - var strs = YmapPhysicsDictionariesTextBox.Text.Split('\n'); - foreach (var str in strs) - { - var tstr = str.Trim(); - if (!string.IsNullOrEmpty(tstr)) - { - uint h = 0; - if (uint.TryParse(tstr, out h)) - { - hashes.Add(h); - } - else - { - h = JenkHash.GenHash(tstr.ToLowerInvariant()); - hashes.Add(h); - } - } - } - - lock (ymapsyncroot) - { - CurrentYmapFile.physicsDictionaries = (hashes.Count > 0) ? hashes.ToArray() : null; - SetYmapHasChanged(true); - } - } - - - private Vector3 GetSpawnPos(float dist) - { - Vector3 pos = Vector3.Zero; - if (WorldForm != null) - { - Vector3 campos = WorldForm.GetCameraPosition(); - Vector3 camdir = WorldForm.GetCameraViewDir(); - pos = campos + camdir * dist; - } - return pos; - } - - - public void NewEntity(YmapEntityDef copy = null, bool copyPosition = false) - { - if (CurrentYmapFile == null) return; - - - - float spawndist = 5.0f; //use archetype BSradius if starting with a copy... - if (copy != null) - { - spawndist = copy.BSRadius * 2.5f; - } - bool cp = copyPosition && (copy != null); - Vector3 pos = cp ? copy.Position : GetSpawnPos(spawndist); - - - CEntityDef cent = new CEntityDef(); - - if (copy != null) - { - cent = copy.CEntityDef; - //TODO: copy entity extensions! - } - else - { - cent.archetypeName = new MetaHash(JenkHash.GenHash("prop_alien_egg_01")); - 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 = Unk_1264241711.LODTYPES_DEPTH_ORPHANHD; - cent.priorityLevel = Unk_648413703.PRI_REQUIRED; - cent.ambientOcclusionMultiplier = 255; - cent.artificialAmbientOcclusion = 255; - } - - cent.position = pos; - - - YmapEntityDef ent = new YmapEntityDef(CurrentYmapFile, 0, ref cent); - - ent.SetArchetype(GameFileCache.GetArchetype(cent.archetypeName)); - - if (WorldForm != null) - { - lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... - { - CurrentYmapFile.AddEntity(ent); - } - } - else - { - CurrentYmapFile.AddEntity(ent); - } - - - LoadProjectTree(); - - TrySelectEntityTreeNode(ent); - CurrentEntity = ent; - LoadEntityTabPage(); - } - - public bool DeleteEntity() - { - if (CurrentYmapFile == null) return false; - if (CurrentEntity == null) return false; - 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._CEntityDef.numChildren != 0) - { - MessageBox.Show("This entity's numChildren is not 0 - deleting entities with children is not currently supported by CodeWalker."); - return true; - } - - int idx = CurrentEntity.Index; - for (int i = idx + 1; i < CurrentYmapFile.AllEntities.Length; i++) - { - var ent = CurrentYmapFile.AllEntities[i]; - if (ent._CEntityDef.numChildren != 0) - { - MessageBox.Show("There are other entities present in this .ymap that have children. Deleting this entity is not currently supported by CodeWalker."); - return true; - } - } - - if (MessageBox.Show("Are you sure you want to delete this entity?\n" + CurrentEntity._CEntityDef.archetypeName.ToString() + "\n" + CurrentEntity.Position.ToString() + "\n\nThis operation cannot be undone. Continue?", "Confirm delete", MessageBoxButtons.YesNo) != DialogResult.Yes) - { - return true; - } - - //find this now to remove it later. - var tn = FindEntityTreeNode(CurrentEntity); - - bool res = false; - if (WorldForm != null) - { - lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... - { - res = CurrentYmapFile.RemoveEntity(CurrentEntity); - - //WorldForm.SelectItem(null, null, null); - } - } - else - { - res = CurrentYmapFile.RemoveEntity(CurrentEntity); - } - if (!res) - { - MessageBox.Show("Entity.Index didn't match the index of the entity in the ymap. This shouldn't happen, check LOD linkages!"); - } - - SetYmapHasChangedUI(true); - - CurrentEntity = null; - if ((tn != null) && (tn.Parent != null)) - { - tn.Parent.Text = "Entities (" + CurrentYmapFile.AllEntities.Length.ToString() + ")"; - tn.Parent.Nodes.Remove(tn); - } - else - { - //no need for this when removing the node above will select something else. - LoadEntityTabPage(); //this case really shouldn't happen... - } - - return true; - } - - private void AddEntityToProject() - { - if (CurrentEntity == null) return; - - if (CurrentEntity.Ymap == null) - { - MessageBox.Show("Sorry, interior entities cannot currently be added to the project."); - return; - } - - CurrentYmapFile = CurrentEntity.Ymap; - if (!YmapExistsInProject(CurrentYmapFile)) - { - var ent = CurrentEntity; - CurrentYmapFile.HasChanged = true; - AddYmapToProject(CurrentYmapFile); - - CurrentEntity = ent; //bug fix for some reason the treeview selects the project node here. - CurrentYmapFile = ent.Ymap; - TrySelectEntityTreeNode(ent); - } - } - - private void LoadEntityTabPage() - { - if (CurrentEntity == null) - { - EntityPanel.Enabled = false; - EntityArchetypeTextBox.Text = string.Empty; - EntityArchetypeHashLabel.Text = "Hash: 0"; - EntityFlagsTextBox.Text = string.Empty; - EntityGuidTextBox.Text = string.Empty; - EntityPositionTextBox.Text = string.Empty; - EntityRotationTextBox.Text = string.Empty; - EntityScaleXYTextBox.Text = string.Empty; - EntityScaleZTextBox.Text = string.Empty; - EntityParentIndexTextBox.Text = string.Empty; - EntityLodDistTextBox.Text = string.Empty; - EntityChildLodDistTextBox.Text = string.Empty; - EntityLodLevelComboBox.SelectedIndex = 0;// Math.Max(EntityLodLevelComboBox.FindString(), 0); - EntityNumChildrenTextBox.Text = string.Empty; - EntityPriorityLevelComboBox.SelectedIndex = 0; //Math.Max(.. - EntityAOMultiplierTextBox.Text = string.Empty; - EntityArtificialAOTextBox.Text = string.Empty; - EntityTintValueTextBox.Text = string.Empty; - EntityPivotEditCheckBox.Checked = false; - EntityPivotPositionTextBox.Text = string.Empty; - EntityPivotRotationTextBox.Text = string.Empty; - foreach (int i in EntityFlagsCheckedListBox.CheckedIndices) - { - EntityFlagsCheckedListBox.SetItemCheckState(i, CheckState.Unchecked); - } - } - else - { - populatingui = true; - var e = CurrentEntity.CEntityDef; - var po = CurrentEntity.PivotOrientation; - EntityPanel.Enabled = true; - EntityArchetypeTextBox.Text = e.archetypeName.ToString(); - EntityArchetypeHashLabel.Text = "Hash: " + e.archetypeName.Hash.ToString(); - EntityFlagsTextBox.Text = e.flags.ToString(); - EntityGuidTextBox.Text = e.guid.ToString(); - EntityPositionTextBox.Text = FloatUtil.GetVector3String(e.position); - EntityRotationTextBox.Text = FloatUtil.GetVector4String(e.rotation); - EntityScaleXYTextBox.Text = FloatUtil.ToString(e.scaleXY); - EntityScaleZTextBox.Text = FloatUtil.ToString(e.scaleZ); - EntityParentIndexTextBox.Text = e.parentIndex.ToString(); - EntityLodDistTextBox.Text = FloatUtil.ToString(e.lodDist); - EntityChildLodDistTextBox.Text = FloatUtil.ToString(e.childLodDist); - EntityLodLevelComboBox.SelectedIndex = Math.Max(EntityLodLevelComboBox.FindString(e.lodLevel.ToString()), 0); - EntityNumChildrenTextBox.Text = e.numChildren.ToString(); - EntityPriorityLevelComboBox.SelectedIndex = Math.Max(EntityPriorityLevelComboBox.FindString(e.priorityLevel.ToString()), 0); - EntityAOMultiplierTextBox.Text = e.ambientOcclusionMultiplier.ToString(); - EntityArtificialAOTextBox.Text = e.artificialAmbientOcclusion.ToString(); - EntityTintValueTextBox.Text = e.tintValue.ToString(); - EntityPivotPositionTextBox.Text = FloatUtil.GetVector3String(CurrentEntity.PivotPosition); - EntityPivotRotationTextBox.Text = FloatUtil.GetVector4String(new Vector4(po.X, po.Y, po.Z, po.W)); - for (int i = 0; i < EntityFlagsCheckedListBox.Items.Count; i++) - { - var cv = ((e.flags & (1u << i)) > 0); - EntityFlagsCheckedListBox.SetItemCheckState(i, cv ? CheckState.Checked : CheckState.Unchecked); - } - populatingui = false; - - - - if (WorldForm != null) - { - WorldForm.SelectEntity(CurrentEntity); //hopefully the drawable is already loaded - this will try get from cache - } - - ////struct CEntityDef: - //MetaHash archetypeName { get; set; } //8 8: Hash: 0: archetypeName - //uint flags { get; set; } //12 12: UnsignedInt: 0: flags - //uint guid { get; set; } //16 16: UnsignedInt: 0: guid - //Vector3 position { get; set; } //32 32: Float_XYZ: 0: position - //Vector4 rotation { get; set; } //48 48: Float_XYZW: 0: rotation - //float scaleXY { get; set; } //64 64: Float: 0: 2627937847 - //float scaleZ { get; set; } //68 68: Float: 0: 284916802 - //int parentIndex { get; set; } //72 72: SignedInt: 0: parentIndex - //float lodDist { get; set; } //76 76: Float: 0: lodDist - //float childLodDist { get; set; } //80 80: Float: 0: childLodDist//3398912973 - //Unk_1264241711 lodLevel { get; set; } //84 84: IntEnum: 1264241711: lodLevel //LODTYPES_DEPTH_ - //uint numChildren { get; set; } //88 88: UnsignedInt: 0: numChildren//2793909385 - //Unk_648413703 priorityLevel { get; set; } //92 92: IntEnum: 648413703: priorityLevel//647098393 - //Array_StructurePointer extensions { get; set; } //96 96: Array: 0: extensions {0: StructurePointer: 0: 256} - //int ambientOcclusionMultiplier { get; set; } //112 112: SignedInt: 0: ambientOcclusionMultiplier//415356295 - //int artificialAmbientOcclusion { get; set; } //116 116: SignedInt: 0: artificialAmbientOcclusion//599844163 - //uint tintValue { get; set; } //120 120: UnsignedInt: 0: tintValue//1015358759 - } - } - - public bool IsCurrentEntity(YmapEntityDef ent) - { - return CurrentEntity == ent; - } - - - - public void NewCarGen(YmapCarGen copy = null, bool copyPosition = false) - { - if (CurrentYmapFile == null) return; - - - Vector3 pos = GetSpawnPos(10.0f); - - - CCarGen ccg = new CCarGen(); - - if (copy != null) - { - ccg = copy.CCarGen; - } - else - { - ccg.flags = 3680; - ccg.orientX = 5.0f; - ccg.perpendicularLength = 2.6f; - //TODO: set default values for cargen - } - - if (!copyPosition || (copy == null)) - { - ccg.position = pos; - } - - - YmapCarGen cg = new YmapCarGen(CurrentYmapFile, ccg); - - if (WorldForm != null) - { - lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... - { - CurrentYmapFile.AddCarGen(cg); - } - } - else - { - CurrentYmapFile.AddCarGen(cg); - } - - - LoadProjectTree(); - - TrySelectCarGenTreeNode(cg); - CurrentCarGen = cg; - LoadCarGenTabPage(); - } - - public bool DeleteCarGen() - { - if (CurrentYmapFile == null) return false; - if (CurrentCarGen == null) return false; - if (CurrentCarGen.Ymap != CurrentYmapFile) return false; - if (CurrentYmapFile.CarGenerators == null) return false; //nothing to delete.. - - if (MessageBox.Show("Are you sure you want to delete this car generator?\n" + CurrentCarGen.ToString() + "\n\nThis operation cannot be undone. Continue?", "Confirm delete", MessageBoxButtons.YesNo) != DialogResult.Yes) - { - return true; - } - - //find this now to remove it later. - var tn = FindCarGenTreeNode(CurrentCarGen); - - bool res = false; - if (WorldForm != null) - { - lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... - { - res = CurrentYmapFile.RemoveCarGen(CurrentCarGen); - - //WorldForm.SelectItem(null, null, null); - } - } - else - { - res = CurrentYmapFile.RemoveCarGen(CurrentCarGen); - } - if (!res) - { - MessageBox.Show("Unable to delete the car generator. This shouldn't happen!"); - } - - SetYmapHasChangedUI(true); - - CurrentCarGen = null; - if ((tn != null) && (tn.Parent != null)) - { - tn.Parent.Text = "Car Generators (" + CurrentYmapFile.CarGenerators.Length.ToString() + ")"; - tn.Parent.Nodes.Remove(tn); - } - else - { - //no need for this when removing the node above will select something else. - LoadCarGenTabPage(); //this case really shouldn't happen... - } - - return true; - } - - private void AddCarGenToProject() - { - if (CurrentCarGen == null) return; - - CurrentYmapFile = CurrentCarGen.Ymap; - if (!YmapExistsInProject(CurrentYmapFile)) - { - var cargen = CurrentCarGen; - CurrentYmapFile.HasChanged = true; - AddYmapToProject(CurrentYmapFile); - - CurrentCarGen = cargen; //bug fix for some reason the treeview selects the project node here. - CurrentYmapFile = cargen.Ymap; - TrySelectCarGenTreeNode(cargen); - } - } - - private void LoadCarGenTabPage() - { - - if (CurrentCarGen == null) - { - CarGenPanel.Enabled = false; - CarModelTextBox.Text = string.Empty; - CarModelHashLabel.Text = "Hash: 0"; - CarPopGroupTextBox.Text = string.Empty; - CarPopGroupHashLabel.Text = "Hash: 0"; - CarFlagsTextBox.Text = string.Empty; - CarPositionTextBox.Text = string.Empty; - CarOrientXTextBox.Text = string.Empty; - CarOrientYTextBox.Text = string.Empty; - CarPerpendicularLengthTextBox.Text = string.Empty; - CarBodyColorRemap1TextBox.Text = string.Empty; - CarBodyColorRemap2TextBox.Text = string.Empty; - CarBodyColorRemap3TextBox.Text = string.Empty; - CarBodyColorRemap4TextBox.Text = string.Empty; - CarLiveryTextBox.Text = string.Empty; - foreach (int i in CarFlagsCheckedListBox.CheckedIndices) - { - CarFlagsCheckedListBox.SetItemCheckState(i, CheckState.Unchecked); - } - } - else - { - populatingui = true; - var c = CurrentCarGen.CCarGen; - CarGenPanel.Enabled = true; - CarModelTextBox.Text = c.carModel.ToString(); - CarModelHashLabel.Text = "Hash: " + c.carModel.Hash.ToString(); - CarPopGroupTextBox.Text = c.popGroup.ToString(); - CarPopGroupHashLabel.Text = "Hash: " + c.popGroup.Hash.ToString(); - CarFlagsTextBox.Text = c.flags.ToString(); - CarPositionTextBox.Text = FloatUtil.GetVector3String(c.position); - CarOrientXTextBox.Text = FloatUtil.ToString(c.orientX); - CarOrientYTextBox.Text = FloatUtil.ToString(c.orientY); - CarPerpendicularLengthTextBox.Text = FloatUtil.ToString(c.perpendicularLength); - CarBodyColorRemap1TextBox.Text = c.bodyColorRemap1.ToString(); - CarBodyColorRemap2TextBox.Text = c.bodyColorRemap2.ToString(); - CarBodyColorRemap3TextBox.Text = c.bodyColorRemap3.ToString(); - CarBodyColorRemap4TextBox.Text = c.bodyColorRemap4.ToString(); - CarLiveryTextBox.Text = c.livery.ToString(); - for (int i = 0; i < CarFlagsCheckedListBox.Items.Count; i++) - { - var cv = ((c.flags & (1u << i)) > 0); - CarFlagsCheckedListBox.SetItemCheckState(i, cv ? CheckState.Checked : CheckState.Unchecked); - } - populatingui = false; - - if (WorldForm != null) - { - WorldForm.SelectCarGen(CurrentCarGen); - } - - ////struct CCarGen: - //Vector3 position { get; set; } //16 16: Float_XYZ: 0: position - //float orientX { get; set; } //32 32: Float: 0: orientX=735213009 - //float orientY { get; set; } //36 36: Float: 0: orientY=979440342 - //float perpendicularLength { get; set; } //40 40: Float: 0: perpendicularLength=124715667 - //MetaHash carModel { get; set; } //44 44: Hash: 0: carModel - //uint flags { get; set; } //48 48: UnsignedInt: 0: flags - //int bodyColorRemap1 { get; set; } //52 52: SignedInt: 0: bodyColorRemap1=1429703670 - //int bodyColorRemap2 { get; set; } //56 56: SignedInt: 0: bodyColorRemap2=1254848286 - //int bodyColorRemap3 { get; set; } //60 60: SignedInt: 0: bodyColorRemap3=1880965569 - //int bodyColorRemap4 { get; set; } //64 64: SignedInt: 0: bodyColorRemap4=1719152247 - //MetaHash popGroup { get; set; } //68 68: Hash: 0: popGroup=911358791 - //sbyte livery { get; set; } //72 72: SignedByte: 0: livery - } - } - - public bool IsCurrentCarGen(YmapCarGen cargen) - { - return CurrentCarGen == cargen; - } - - - - - public void NewYnd() - { - if (CurrentProjectFile == null) - { - NewProject(); - } - if (CurrentProjectFile == null) return; - - int testi = 1; - string fname = string.Empty; - bool filenameok = false; - while (!filenameok) - { - fname = "nodes" + testi.ToString() + ".ynd"; - filenameok = !CurrentProjectFile.ContainsYnd(fname); - testi++; - } - - lock (yndsyncroot) - { - YndFile ynd = CurrentProjectFile.AddYndFile(fname); - if (ynd != null) - { - ynd.Loaded = true; - ynd.HasChanged = true; //new ynd, flag as not saved - - //TODO: set new ynd default values... - ynd.NodeDictionary = new NodeDictionary(); - - - } - } - - CurrentProjectFile.HasChanged = true; - - LoadProjectTree(); - } - - public void OpenYnd() - { - string[] files = ShowOpenDialogMulti("Ynd files|*.ynd", string.Empty); - if (files == null) - { - return; - } - - if (CurrentProjectFile == null) - { - NewProject(); - } - - foreach (string file in files) - { - if (!File.Exists(file)) continue; - - var ynd = CurrentProjectFile.AddYndFile(file); - - if (ynd != null) - { - SetProjectHasChanged(true); - - LoadYndFromFile(ynd, file); - - LoadProjectTree(); - } - else - { - MessageBox.Show("Couldn't add\n" + file + "\n - the file already exists in the project."); - } - - } - } - - public void SaveYnd(bool saveas = false) - { - if ((CurrentYndFile == null) && (CurrentPathNode != null)) CurrentYndFile = CurrentPathNode.Ynd; - if (CurrentYndFile == null) return; - string yndname = CurrentYndFile.Name; - string filepath = CurrentYndFile.FilePath; - if (string.IsNullOrEmpty(filepath)) - { - filepath = yndname; - } - string origfile = filepath; - if (!File.Exists(filepath)) - { - saveas = true; - } - - - byte[] data; - lock (yndsyncroot) //need to sync writes to ynd objects... - { - saveas = saveas || string.IsNullOrEmpty(filepath); - if (saveas) - { - filepath = ShowSaveDialog("Ynd files|*.ynd", filepath); - if (string.IsNullOrEmpty(filepath)) - { return; } - - string newname = Path.GetFileNameWithoutExtension(filepath); - JenkIndex.Ensure(newname); - CurrentYndFile.FilePath = filepath; - CurrentYndFile.RpfFileEntry.Name = new FileInfo(filepath).Name; - CurrentYndFile.Name = CurrentYndFile.RpfFileEntry.Name; - } - - - data = CurrentYndFile.Save(); - } - - - if (data != null) - { - File.WriteAllBytes(filepath, data); - } - - SetYndHasChanged(false); - - if (saveas) - { - LoadYndTabPage(); - if (CurrentProjectFile != null) - { - string origpath = CurrentProjectFile.GetRelativePath(origfile); - string newpath = CurrentProjectFile.GetRelativePath(CurrentYndFile.FilePath); - if (!CurrentProjectFile.RenameYnd(origpath, newpath)) - { //couldn't rename it in the project? happens when project not saved yet... - //MessageBox.Show("Couldn't rename ynd in project! This shouldn't happen - check the project file XML."); - } - } - SetProjectHasChanged(true); - SetCurrentSaveItem(); - } - - } - - private void AddYndToProject(YndFile ynd) - { - if (ynd == null) return; - if (CurrentProjectFile == null) - { - NewProject(); - } - if (YndExistsInProject(ynd)) return; - if (CurrentProjectFile.AddYndFile(ynd)) - { - ynd.HasChanged = true; - CurrentProjectFile.HasChanged = true; - LoadProjectTree(); - } - CurrentYndFile = ynd; - RefreshUI(); - if (CurrentPathNode != null) - { - TrySelectPathNodeTreeNode(CurrentPathNode); - } - } - - private void RemoveYndFromProject() - { - if (CurrentYndFile == null) return; - if (CurrentProjectFile == null) return; - CurrentProjectFile.RemoveYndFile(CurrentYndFile); - CurrentYndFile = null; - LoadProjectTree(); - RefreshUI(); - } - - private void LoadYndTabPage() - { - if (CurrentYndFile == null) - { - YndPanel.Enabled = false; - YndRpfPathTextBox.Text = string.Empty; - YndFilePathTextBox.Text = string.Empty; - YndProjectPathTextBox.Text = string.Empty; - YndAreaIDXUpDown.Value = 0; - YndAreaIDYUpDown.Value = 0; - YndAreaIDInfoLabel.Text = "ID: 0"; - YndTotalNodesLabel.Text = "Total Nodes: 0"; - YndVehicleNodesUpDown.Value = 0; - YndVehicleNodesUpDown.Maximum = 0; - YndPedNodesUpDown.Value = 0; - YndPedNodesUpDown.Maximum = 0; - } - else - { - populatingui = true; - var nd = CurrentYndFile.NodeDictionary; - YndPanel.Enabled = true; - YndRpfPathTextBox.Text = CurrentYndFile.RpfFileEntry.Path; - YndFilePathTextBox.Text = CurrentYndFile.FilePath; - YndProjectPathTextBox.Text = (CurrentProjectFile != null) ? CurrentProjectFile.GetRelativePath(CurrentYndFile.FilePath) : CurrentYndFile.FilePath; - YndAreaIDXUpDown.Value = CurrentYndFile.CellX; - YndAreaIDYUpDown.Value = CurrentYndFile.CellY; - YndAreaIDInfoLabel.Text = "ID: " + CurrentYndFile.AreaID.ToString(); - YndTotalNodesLabel.Text = "Total Nodes: " + (nd?.NodesCount.ToString()??"0"); - YndVehicleNodesUpDown.Maximum = nd?.NodesCount??0; - YndVehicleNodesUpDown.Value = Math.Min(nd?.NodesCountVehicle??0, YndVehicleNodesUpDown.Maximum); - YndPedNodesUpDown.Maximum = nd?.NodesCount??0; - YndPedNodesUpDown.Value = Math.Min(nd?.NodesCountPed??0, YndPedNodesUpDown.Maximum); - populatingui = false; - } - } - - private void LoadYndFromFile(YndFile ynd, string filename) - { - byte[] data = File.ReadAllBytes(filename); - - ynd.Load(data); - - - - if (WorldForm != null) - { - WorldForm.UpdatePathYndGraphics(ynd, true); //links don't get drawn until something changes otherwise - //note: this is actually necessary to properly populate junctions data........ - } - } - - private void LoadYndTreeNodes(YndFile ynd, TreeNode node) - { - if (ynd == null) return; - - if (!string.IsNullOrEmpty(node.Name)) return; //named nodes are eg Nodes - - node.Nodes.Clear(); - - - - if ((ynd.Nodes != null) && (ynd.Nodes.Length > 0)) - { - var nodesnode = node.Nodes.Add("Nodes (" + ynd.Nodes.Length.ToString() + ")"); - nodesnode.Name = "Nodes"; - nodesnode.Tag = ynd; - var nodes = ynd.Nodes; - for (int i = 0; i < nodes.Length; i++) - { - var ynode = nodes[i]; - var nnode = ynode.RawData; - var tnode = nodesnode.Nodes.Add(nnode.ToString()); - tnode.Tag = ynode; - } - } - - } - - private void SetYndHasChanged(bool changed) - { - if (CurrentYndFile == null) return; - - bool changechange = changed != CurrentYndFile.HasChanged; - if (!changechange) return; - - CurrentYndFile.HasChanged = changed; - - SetYndHasChangedUI(changed); - } - - private void SetYndHasChangedUI(bool changed) - { - if (ProjectTreeView.Nodes.Count > 0) - { - var pnode = ProjectTreeView.Nodes[0]; - var ynnode = GetChildTreeNode(pnode, "Ynd"); - if (ynnode == null) return; - string changestr = changed ? "*" : ""; - for (int i = 0; i < ynnode.Nodes.Count; i++) - { - var ynode = ynnode.Nodes[i]; - if (ynode.Tag == CurrentYndFile) - { - string name = CurrentYndFile.Name; - if (CurrentYndFile.RpfFileEntry != null) - { - name = CurrentYndFile.RpfFileEntry.Name; - } - ynode.Text = changestr + name; - break; - } - } - } - } - - - - public void NewPathNode(YndNode copy = null, bool copyPosition = false) - { - if (CurrentYndFile == null) return; - - var n = CurrentYndFile.AddNode(); - var areaid = n.AreaID; - var nodeid = n.NodeID; - if (copy == null) - { - copy = CurrentPathNode; - } - if (copy != null) - { - n.Init(CurrentYndFile, copy.RawData); - n.LinkCountUnk = copy.LinkCountUnk; - } - n.AreaID = areaid; - n.NodeID = nodeid; - - bool cp = copyPosition && (copy != null); - Vector3 pos = cp ? copy.Position : GetSpawnPos(10.0f); - n.SetPosition(pos); - - - if (copy != null) - { - var link1 = n.AddLink(copy); - var link2 = copy.AddLink(n); - if ((copy.Links != null) && (copy.Links.Length > 0)) - { - var clink = copy.Links[0]; - link1.CopyFlags(clink); - var clnode = clink.Node2; - if (clnode.Links != null) - { - for (int i = 0; i < clnode.Links.Length; i++) - { - var clnlink = clnode.Links[i]; - if (clnlink.Node2 == copy) - { - link2.CopyFlags(clnlink); - break; - } - } - } - } - } - - CurrentYndFile.UpdateAllNodePositions(); //for the graphics... - CurrentYndFile.BuildBVH(); - - - LoadProjectTree(); - - TrySelectPathNodeTreeNode(n); - CurrentPathNode = n; - LoadYndTabPage(); - LoadPathNodeTabPage(); - - - if (WorldForm != null) - { - WorldForm.UpdatePathYndGraphics(CurrentYndFile, false); - } - } - - public bool DeletePathNode() - { - if (CurrentYndFile == null) return false; - if (CurrentPathNode == null) return false; - if (CurrentPathNode.Ynd != CurrentYndFile) return false; - if (CurrentYndFile.Nodes == null) return false; //nothing to delete.. - - if (MessageBox.Show("Are you sure you want to delete this path node?\n" + CurrentPathNode.ToString() + "\n\nThis operation cannot be undone. Continue?", "Confirm delete", MessageBoxButtons.YesNo) != DialogResult.Yes) - { - return true; - } - - //find this now to remove it later. - var tn = FindPathNodeTreeNode(CurrentPathNode); - - bool res = false; - if (WorldForm != null) - { - lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... - { - res = CurrentYndFile.RemoveNode(CurrentPathNode); - - //WorldForm.SelectItem(null, null, null); - } - } - else - { - res = CurrentYndFile.RemoveNode(CurrentPathNode); - } - if (!res) - { - MessageBox.Show("Unable to delete the path node. This shouldn't happen!"); - } - - SetYndHasChangedUI(true); - - CurrentPathNode = null; - if ((tn != null) && (tn.Parent != null)) - { - tn.Parent.Text = "Nodes (" + CurrentYndFile.Nodes.Length.ToString() + ")"; - tn.Parent.Nodes.Remove(tn); - } - else - { - //no need for this when removing the node above will select something else. - LoadPathNodeTabPage(); //this case really shouldn't happen... - } - - if (WorldForm != null) - { - WorldForm.UpdatePathYndGraphics(CurrentYndFile, false); - } - - - return true; - } - - private void AddPathNodeToProject() - { - if (CurrentPathNode == null) return; - if (CurrentYndFile != null) - { - AddYndToProject(CurrentYndFile); - } - } - - private void LoadPathNodeTabPage() - { - - CurrentPathLink = null; - - if (CurrentPathNode == null) - { - YndNodePanel.Enabled = false; - PathNodeDeleteButton.Enabled = false; - PathNodeAddToProjectButton.Enabled = false; - PathNodeAreaIDUpDown.Value = 0; - PathNodeNodeIDUpDown.Value = 0; - PathNodePositionTextBox.Text = string.Empty; - PathNodeStreetHashTextBox.Text = string.Empty; - PathNodeStreetNameLabel.Text = "Name: [None]"; - - UpdatePathNodeFlagsUI(true, true); - - PathNodeLinkCountLabel.Text = "Link Count: 0"; - PathNodeLinksListBox.Items.Clear(); - - } - else - { - populatingui = true; - var n = CurrentPathNode.RawData; - YndNodePanel.Enabled = true; - PathNodeDeleteButton.Enabled = YndExistsInProject(CurrentYndFile); - PathNodeAddToProjectButton.Enabled = !PathNodeDeleteButton.Enabled; - var streetname = GlobalText.TryGetString(n.StreetName.Hash); - PathNodeAreaIDUpDown.Value = n.AreaID; - PathNodeNodeIDUpDown.Value = n.NodeID; - PathNodePositionTextBox.Text = FloatUtil.GetVector3String(CurrentPathNode.Position); - PathNodeStreetHashTextBox.Text = n.StreetName.Hash.ToString(); - PathNodeStreetNameLabel.Text = "Name: " + ((n.StreetName.Hash == 0) ? "[None]" : (string.IsNullOrEmpty(streetname) ? "[Not found]" : streetname)); - - UpdatePathNodeFlagsUI(true, true); - - PathNodeLinkCountLabel.Text = "Link Count: " + CurrentPathNode.LinkCount.ToString(); - PathNodeLinksListBox.Items.Clear(); - if (CurrentPathNode.Links != null) - { - foreach (var link in CurrentPathNode.Links) - { - PathNodeLinksListBox.Items.Add(link); - } - } - populatingui = false; - - - if (WorldForm != null) - { - WorldForm.SelectPathNode(CurrentPathNode); - } - - } - - - LoadPathNodeJunctionPage(); - - LoadPathNodeLinkPage(); - } - - private void LoadPathNodeLinkPage() - { - if (CurrentPathLink == null) - { - PathNodeLinkPanel.Enabled = false; - PathNodeLinkAreaIDUpDown.Value = 0; - PathNodeLinkNodeIDUpDown.Value = 0; - - UpdatePathNodeLinkFlagsUI(true, true); - - PathNodeLinkLengthUpDown.Value = 0; - PathNodeLinkageStatusLabel.Text = ""; - } - else - { - populatingui = true; - PathNodeLinkPanel.Enabled = true; - PathNodeLinkAreaIDUpDown.Value = CurrentPathLink._RawData.AreaID; - PathNodeLinkNodeIDUpDown.Value = CurrentPathLink._RawData.NodeID; - - UpdatePathNodeLinkFlagsUI(true, true); - - PathNodeLinkLengthUpDown.Value = CurrentPathLink.LinkLength.Value; - PathNodeLinkageStatusLabel.Text = ""; - populatingui = false; - - if (WorldForm != null) - { - WorldForm.SelectPathLink(CurrentPathLink); - } - } - - } - - private void LoadPathNodeJunctionPage() - { - - var junc = CurrentPathNode?.Junction; - if (junc == null) - { - PathNodeJunctionEnableCheckBox.Checked = false; - PathNodeJunctionPanel.Enabled = false; - PathNodeJunctionMaxZUpDown.Value = 0; - PathNodeJunctionMinZUpDown.Value = 0; - PathNodeJunctionPosXUpDown.Value = 0; - PathNodeJunctionPosYUpDown.Value = 0; - PathNodeJunctionHeightmapDimXUpDown.Value = 1; - PathNodeJunctionHeightmapDimYUpDown.Value = 1; - PathNodeJunctionHeightmapBytesTextBox.Text = string.Empty; - } - else - { - populatingui = true; - PathNodeJunctionEnableCheckBox.Checked = CurrentPathNode.HasJunction; - PathNodeJunctionPanel.Enabled = PathNodeJunctionEnableCheckBox.Checked; - PathNodeJunctionMaxZUpDown.Value = junc.MaxZ; - PathNodeJunctionMinZUpDown.Value = junc.MinZ; - PathNodeJunctionPosXUpDown.Value = junc.PositionX; - PathNodeJunctionPosYUpDown.Value = junc.PositionY; - PathNodeJunctionHeightmapDimXUpDown.Value = junc.Heightmap.CountX; - PathNodeJunctionHeightmapDimYUpDown.Value = junc.Heightmap.CountY; - PathNodeJunctionHeightmapBytesTextBox.Text = junc.Heightmap?.GetDataString() ?? ""; - populatingui = false; - } - - - } - - public bool IsCurrentPathNode(YndNode pathnode) - { - return CurrentPathNode == pathnode; - } - - - private void UpdatePathNodeFlagsUI(bool updateCheckboxes, bool updateUpDowns) - { - - var flags0 = CurrentPathNode?.Flags0.Value ?? 0; - var flags1 = CurrentPathNode?.Flags1.Value ?? 0; - var flags2 = CurrentPathNode?.Flags2.Value ?? 0; - var flags3 = CurrentPathNode?.Flags3.Value ?? 0; - var flags4 = CurrentPathNode?.Flags4.Value ?? 0; - var flags5 = (uint)(CurrentPathNode?.LinkCountUnk ?? 0); - - - if (updateCheckboxes) - { - PathNodeFlags01CheckBox.Checked = IsBitSet(flags0, 0); - PathNodeFlags02CheckBox.Checked = IsBitSet(flags0, 1); - PathNodeFlags03CheckBox.Checked = IsBitSet(flags0, 2); - PathNodeFlags04CheckBox.Checked = IsBitSet(flags0, 3); - PathNodeFlags05CheckBox.Checked = IsBitSet(flags0, 4); - PathNodeFlags06CheckBox.Checked = IsBitSet(flags0, 5); - PathNodeFlags07CheckBox.Checked = IsBitSet(flags0, 6); - PathNodeFlags08CheckBox.Checked = IsBitSet(flags0, 7); - - PathNodeFlags11CheckBox.Checked = IsBitSet(flags1, 0); - PathNodeFlags12CheckBox.Checked = IsBitSet(flags1, 1); - PathNodeFlags13CheckBox.Checked = IsBitSet(flags1, 2); - PathNodeFlags14CheckBox.Checked = IsBitSet(flags1, 3); - PathNodeFlags15CheckBox.Checked = IsBitSet(flags1, 4); - PathNodeFlags16CheckBox.Checked = IsBitSet(flags1, 5); - PathNodeFlags17CheckBox.Checked = IsBitSet(flags1, 6); - PathNodeFlags18CheckBox.Checked = IsBitSet(flags1, 7); - - PathNodeFlags21CheckBox.Checked = IsBitSet(flags2, 0); - PathNodeFlags22CheckBox.Checked = IsBitSet(flags2, 1); - PathNodeFlags23CheckBox.Checked = IsBitSet(flags2, 2); - PathNodeFlags24CheckBox.Checked = IsBitSet(flags2, 3); - PathNodeFlags25CheckBox.Checked = IsBitSet(flags2, 4); - PathNodeFlags26CheckBox.Checked = IsBitSet(flags2, 5); - PathNodeFlags27CheckBox.Checked = IsBitSet(flags2, 6); - PathNodeFlags28CheckBox.Checked = IsBitSet(flags2, 7); - - PathNodeFlags31CheckBox.Checked = IsBitSet(flags3, 0); - PathNodeFlags32UpDown.Value = (flags3 >> 1) & 127; - - PathNodeFlags41CheckBox.Checked = IsBitSet(flags4, 0); - PathNodeFlags42UpDown.Value = (flags4 >> 1) & 7; - PathNodeFlags45CheckBox.Checked = IsBitSet(flags4, 4); - PathNodeFlags46CheckBox.Checked = IsBitSet(flags4, 5); - PathNodeFlags47CheckBox.Checked = IsBitSet(flags4, 6); - PathNodeFlags48CheckBox.Checked = IsBitSet(flags4, 7); - - PathNodeFlags51CheckBox.Checked = IsBitSet(flags5, 0); - PathNodeFlags52CheckBox.Checked = IsBitSet(flags5, 1); - PathNodeFlags53CheckBox.Checked = IsBitSet(flags5, 2); - } - if (updateUpDowns) - { - PathNodeFlags0UpDown.Value = flags0; - PathNodeFlags1UpDown.Value = flags1; - PathNodeFlags2UpDown.Value = flags2; - PathNodeFlags3UpDown.Value = flags3; - PathNodeFlags4UpDown.Value = flags4; - PathNodeFlags5UpDown.Value = flags5; - } - - var n = CurrentPathNode; - if (n != null) - { - PathNodeFlags0Label.Text = n.Flags0.ToHexString(); - PathNodeFlags1Label.Text = n.Flags1.ToHexString(); - PathNodeFlags2Label.Text = n.Flags2.ToHexString(); - PathNodeFlags3Label.Text = n.Flags3.ToHexString(); - PathNodeFlags4Label.Text = n.Flags4.ToHexString(); - } - else - { - PathNodeFlags0Label.Text = "0x00"; - PathNodeFlags1Label.Text = "0x00"; - PathNodeFlags2Label.Text = "0x00"; - PathNodeFlags3Label.Text = "0x00"; - PathNodeFlags4Label.Text = "0x00"; - } - } - - private void SetPathNodeFlagsFromCheckBoxes() - { - if (populatingui) return; - if (CurrentPathNode == null) return; - - uint flags0 = 0; - uint flags1 = 0; - uint flags2 = 0; - uint flags3 = 0; - uint flags4 = 0; - uint flags5 = 0; - flags0 = UpdateBit(flags0, 0, PathNodeFlags01CheckBox.Checked); - flags0 = UpdateBit(flags0, 1, PathNodeFlags02CheckBox.Checked); - flags0 = UpdateBit(flags0, 2, PathNodeFlags03CheckBox.Checked); - flags0 = UpdateBit(flags0, 3, PathNodeFlags04CheckBox.Checked); - flags0 = UpdateBit(flags0, 4, PathNodeFlags05CheckBox.Checked); - flags0 = UpdateBit(flags0, 5, PathNodeFlags06CheckBox.Checked); - flags0 = UpdateBit(flags0, 6, PathNodeFlags07CheckBox.Checked); - flags0 = UpdateBit(flags0, 7, PathNodeFlags08CheckBox.Checked); - - flags1 = UpdateBit(flags1, 0, PathNodeFlags11CheckBox.Checked); - flags1 = UpdateBit(flags1, 1, PathNodeFlags12CheckBox.Checked); - flags1 = UpdateBit(flags1, 2, PathNodeFlags13CheckBox.Checked); - flags1 = UpdateBit(flags1, 3, PathNodeFlags14CheckBox.Checked); - flags1 = UpdateBit(flags1, 4, PathNodeFlags15CheckBox.Checked); - flags1 = UpdateBit(flags1, 5, PathNodeFlags16CheckBox.Checked); - flags1 = UpdateBit(flags1, 6, PathNodeFlags17CheckBox.Checked); - flags1 = UpdateBit(flags1, 7, PathNodeFlags18CheckBox.Checked); - - flags2 = UpdateBit(flags2, 0, PathNodeFlags21CheckBox.Checked); - flags2 = UpdateBit(flags2, 1, PathNodeFlags22CheckBox.Checked); - flags2 = UpdateBit(flags2, 2, PathNodeFlags23CheckBox.Checked); - flags2 = UpdateBit(flags2, 3, PathNodeFlags24CheckBox.Checked); - flags2 = UpdateBit(flags2, 4, PathNodeFlags25CheckBox.Checked); - flags2 = UpdateBit(flags2, 5, PathNodeFlags26CheckBox.Checked); - flags2 = UpdateBit(flags2, 6, PathNodeFlags27CheckBox.Checked); - flags2 = UpdateBit(flags2, 7, PathNodeFlags28CheckBox.Checked); - - flags3 = UpdateBit(flags3, 0, PathNodeFlags31CheckBox.Checked); - flags3 += (((uint)PathNodeFlags32UpDown.Value & 127u) << 1); - - flags4 = UpdateBit(flags4, 0, PathNodeFlags41CheckBox.Checked); - flags4 += (((uint)PathNodeFlags42UpDown.Value & 7u) << 1); - flags4 = UpdateBit(flags4, 4, PathNodeFlags45CheckBox.Checked); - flags4 = UpdateBit(flags4, 5, PathNodeFlags46CheckBox.Checked); - flags4 = UpdateBit(flags4, 6, PathNodeFlags47CheckBox.Checked); - flags4 = UpdateBit(flags4, 7, PathNodeFlags48CheckBox.Checked); - - flags5 = UpdateBit(flags5, 0, PathNodeFlags51CheckBox.Checked); - flags5 = UpdateBit(flags5, 1, PathNodeFlags52CheckBox.Checked); - flags5 = UpdateBit(flags5, 2, PathNodeFlags53CheckBox.Checked); - - - lock (yndsyncroot) - { - if (CurrentPathNode.Flags0.Value != flags0) - { - CurrentPathNode.Flags0 = (byte)flags0; - SetYndHasChanged(true); - } - if (CurrentPathNode.Flags1.Value != flags1) - { - CurrentPathNode.Flags1 = (byte)flags1; - SetYndHasChanged(true); - } - if (CurrentPathNode.Flags2.Value != flags2) - { - CurrentPathNode.Flags2 = (byte)flags2; - SetYndHasChanged(true); - } - if (CurrentPathNode.Flags3.Value != flags3) - { - CurrentPathNode.Flags3 = (byte)flags3; - SetYndHasChanged(true); - } - if (CurrentPathNode.Flags4.Value != flags4) - { - CurrentPathNode.Flags4 = (byte)flags4; - SetYndHasChanged(true); - } - if (CurrentPathNode.LinkCountUnk != flags5) - { - CurrentPathNode.LinkCountUnk = (byte)flags5; - SetYndHasChanged(true); - } - } - - populatingui = true; - UpdatePathNodeFlagsUI(false, true); //update updowns - populatingui = false; - } - - private void SetPathNodeFlagsFromUpDowns() - { - if (populatingui) return; - if (CurrentPathNode == null) return; - - uint flags0 = (uint)PathNodeFlags0UpDown.Value; - uint flags1 = (uint)PathNodeFlags1UpDown.Value; - uint flags2 = (uint)PathNodeFlags2UpDown.Value; - uint flags3 = (uint)PathNodeFlags3UpDown.Value; - uint flags4 = (uint)PathNodeFlags4UpDown.Value; - uint flags5 = (uint)PathNodeFlags5UpDown.Value; - - lock (yndsyncroot) - { - if (CurrentPathNode.Flags0.Value != flags0) - { - CurrentPathNode.Flags0 = (byte)flags0; - SetYndHasChanged(true); - } - if (CurrentPathNode.Flags1.Value != flags1) - { - CurrentPathNode.Flags1 = (byte)flags1; - SetYndHasChanged(true); - } - if (CurrentPathNode.Flags2.Value != flags2) - { - CurrentPathNode.Flags2 = (byte)flags2; - SetYndHasChanged(true); - } - if (CurrentPathNode.Flags3.Value != flags3) - { - CurrentPathNode.Flags3 = (byte)flags3; - SetYndHasChanged(true); - } - if (CurrentPathNode.Flags4.Value != flags4) - { - CurrentPathNode.Flags4 = (byte)flags4; - SetYndHasChanged(true); - } - if (CurrentPathNode.LinkCountUnk != flags5) - { - CurrentPathNode.LinkCountUnk = (byte)flags5; - SetYndHasChanged(true); - } - } - - populatingui = true; - UpdatePathNodeFlagsUI(true, false); //update checkboxes - populatingui = false; - } - - - private void UpdatePathNodeLinkFlagsUI(bool updateCheckboxes, bool updateUpDowns) - { - var flags0 = CurrentPathLink?.Flags0.Value ?? 0; - var flags1 = CurrentPathLink?.Flags1.Value ?? 0; - var flags2 = CurrentPathLink?.Flags2.Value ?? 0; - - - if (updateCheckboxes) - { - PathNodeLinkFlags01CheckBox.Checked = IsBitSet(flags0, 0); - PathNodeLinkFlags02CheckBox.Checked = IsBitSet(flags0, 1); - PathNodeLinkFlags03UpDown.Value = (flags0 >> 2) & 7; - PathNodeLinkFlags04UpDown.Value = (flags0 >> 5) & 7; - - PathNodeLinkFlags11CheckBox.Checked = IsBitSet(flags1, 0); - PathNodeLinkFlags12CheckBox.Checked = IsBitSet(flags1, 1); - PathNodeLinkFlags13CheckBox.Checked = IsBitSet(flags1, 2); - PathNodeLinkFlags14CheckBox.Checked = IsBitSet(flags1, 3); - PathNodeLinkOffsetSizeUpDown.Value = (flags1 >> 4) & 7; - PathNodeLinkFlags18CheckBox.Checked = IsBitSet(flags1, 7); - - PathNodeLinkFlags21CheckBox.Checked = IsBitSet(flags2, 0); - PathNodeLinkFlags22CheckBox.Checked = IsBitSet(flags2, 1); - PathNodeLinkBackLanesUpDown.Value = (flags2 >> 2) & 7; - PathNodeLinkFwdLanesUpDown.Value = (flags2 >> 5) & 7; - } - if (updateUpDowns) - { - PathNodeLinkFlags0UpDown.Value = flags0; - PathNodeLinkFlags1UpDown.Value = flags1; - PathNodeLinkFlags2UpDown.Value = flags2; - } - - var l = CurrentPathLink; - if (l != null) - { - PathNodeLinkFlags0Label.Text = l.Flags0.ToHexString(); - PathNodeLinkFlags1Label.Text = l.Flags1.ToHexString(); - PathNodeLinkFlags2Label.Text = l.Flags2.ToHexString(); - } - else - { - PathNodeLinkFlags0Label.Text = "0x00"; - PathNodeLinkFlags1Label.Text = "0x00"; - PathNodeLinkFlags2Label.Text = "0x00"; - } - } - - private void SetPathNodeLinkFlagsFromCheckBoxes() - { - if (populatingui) return; - if (CurrentPathLink == null) return; - - uint flags0 = 0; - uint flags1 = 0; - uint flags2 = 0; - flags0 = UpdateBit(flags0, 0, PathNodeLinkFlags01CheckBox.Checked); - flags0 = UpdateBit(flags0, 1, PathNodeLinkFlags02CheckBox.Checked); - flags0 += (((uint)PathNodeLinkFlags03UpDown.Value & 7u) << 2); - flags0 += (((uint)PathNodeLinkFlags04UpDown.Value & 7u) << 5); - - flags1 = UpdateBit(flags1, 0, PathNodeLinkFlags11CheckBox.Checked); - flags1 = UpdateBit(flags1, 1, PathNodeLinkFlags12CheckBox.Checked); - flags1 = UpdateBit(flags1, 2, PathNodeLinkFlags13CheckBox.Checked); - flags1 = UpdateBit(flags1, 3, PathNodeLinkFlags14CheckBox.Checked); - flags1 += (((uint)PathNodeLinkOffsetSizeUpDown.Value & 7u) << 4); - flags1 = UpdateBit(flags1, 7, PathNodeLinkFlags18CheckBox.Checked); - - flags2 = UpdateBit(flags2, 0, PathNodeLinkFlags21CheckBox.Checked); - flags2 = UpdateBit(flags2, 1, PathNodeLinkFlags22CheckBox.Checked); - flags2 += (((uint)PathNodeLinkBackLanesUpDown.Value & 7u) << 2); - flags2 += (((uint)PathNodeLinkFwdLanesUpDown.Value & 7u) << 5); - - bool updgfx = false; - lock (yndsyncroot) - { - if (CurrentPathLink.Flags0.Value != flags0) - { - CurrentPathLink.Flags0 = (byte)flags0; - SetYndHasChanged(true); - } - if (CurrentPathLink.Flags1.Value != flags1) - { - CurrentPathLink.Flags1 = (byte)flags1; - SetYndHasChanged(true); - updgfx = true; - } - if (CurrentPathLink.Flags2.Value != flags2) - { - CurrentPathLink.Flags2 = (byte)flags2; - SetYndHasChanged(true); - updgfx = true; - } - } - - populatingui = true; - UpdatePathNodeLinkFlagsUI(false, true); //update updowns - populatingui = false; - - if (updgfx && (WorldForm != null) && (CurrentYndFile != null)) - { - WorldForm.UpdatePathYndGraphics(CurrentYndFile, false); - } - } - - private void SetPathNodeLinkFlagsFromUpDowns() - { - if (populatingui) return; - if (CurrentPathLink == null) return; - - uint flags0 = (uint)PathNodeLinkFlags0UpDown.Value; - uint flags1 = (uint)PathNodeLinkFlags1UpDown.Value; - uint flags2 = (uint)PathNodeLinkFlags2UpDown.Value; - - bool updgfx = false; - lock (yndsyncroot) - { - if (CurrentPathLink.Flags0.Value != flags0) - { - CurrentPathLink.Flags0 = (byte)flags0; - SetYndHasChanged(true); - } - if (CurrentPathLink.Flags1.Value != flags1) - { - CurrentPathLink.Flags1 = (byte)flags1; - SetYndHasChanged(true); - } - if (CurrentPathLink.Flags2.Value != flags2) - { - CurrentPathLink.Flags2 = (byte)flags2; - SetYndHasChanged(true); - updgfx = true; - } - } - - populatingui = true; - UpdatePathNodeLinkFlagsUI(true, false); //update checkboxes - populatingui = false; - - if (updgfx && (WorldForm != null) && (CurrentYndFile != null)) - { - WorldForm.UpdatePathYndGraphics(CurrentYndFile, false); - } - } - - - - private void AddPathLink() - { - if (CurrentPathNode == null) return; - - var l = CurrentPathNode.AddLink(); - - LoadPathNodeTabPage(); - - PathNodeLinksListBox.SelectedItem = l; - - if (WorldForm != null) - { - WorldForm.UpdatePathNodeGraphics(CurrentPathNode, false); - } - } - - private void RemovePathLink() - { - if (CurrentPathLink == null) return; - if (CurrentPathNode == null) return; - - var r = CurrentPathNode.RemoveLink(CurrentPathLink); - - if (!r) return; - - LoadPathNodeTabPage(); - - if (WorldForm != null) - { - WorldForm.UpdatePathNodeGraphics(CurrentPathNode, false); - } - } - - private void UpdatePathNodeLinkage() - { - if (CurrentPathLink == null) return; - if (CurrentYndFile == null) return; - - YndNode linknode = null; - ushort areaid = CurrentPathLink._RawData.AreaID; - ushort nodeid = CurrentPathLink._RawData.NodeID; - if (areaid == CurrentYndFile.AreaID) - { - //link to the same ynd. find the new node in the current ynd. - if ((CurrentYndFile.Nodes != null) && (nodeid < CurrentYndFile.Nodes.Length)) - { - linknode = CurrentYndFile.Nodes[nodeid]; - } - } - else - { - //try lookup the link node from the space. - if (WorldForm != null) - { - linknode = WorldForm.GetPathNodeFromSpace(areaid, nodeid); - } - } - - if (linknode == null) - { - PathNodeLinkageStatusLabel.Text = "Unable to find node " + areaid.ToString() + ":" + nodeid.ToString() + "."; - } - else - { - PathNodeLinkageStatusLabel.Text = ""; - } - - CurrentPathLink.Node2 = linknode; - CurrentPathLink.UpdateLength(); - - - ////need to rebuild the link verts.. updating the graphics should do it... - if (WorldForm != null) - { - WorldForm.UpdatePathYndGraphics(CurrentYndFile, false); - } - } - - - - - - - - - - - - public void NewYnv()//TODO! - { - } - - public void OpenYnv()//TODO! - { - } - - public void SaveYnv(bool saveas = false)//TODO! - { - } - - private void AddYnvToProject(YnvFile ynv)//TODO! - { - } - - private void RemoveYnvFromProject()//TODO! - { - } - - private void LoadYnvTabPage()//TODO! - { - } - - private void LoadYnvFromFile(YnvFile ynv, string filename)//TODO! - { - } - - private void LoadYnvTreeNodes(YnvFile ynv, TreeNode node)//TODO! - { - } - - private void SetYnvHasChanged(bool changed)//TODO! - { - } - - private void SetYnvHasChangedUI(bool changed)//TODO! - { - } - - - public void NewNavPoly(YnvPoly copy = null, bool copyposition = false)//TODO! - { - } - - public bool DeleteNavPoly()//TODO! - { - return false; - } - - private void AddNavPolyToProject()//TODO! - { - } - - private void LoadNavPolyTabPage()//TODO! - { - } - - public bool IsCurrentNavPoly(YnvPoly poly) - { - return poly == CurrentNavPoly; - } - - - - - - - - - - - - public void NewTrainTrack() - { - if (CurrentProjectFile == null) - { - NewProject(); - } - if (CurrentProjectFile == null) return; - - int testi = 13; - string fname = string.Empty; - bool filenameok = false; - while (!filenameok) - { - fname = "trains" + testi.ToString() + ".dat"; - filenameok = !CurrentProjectFile.ContainsTrainTrack(fname); - testi++; - } - - lock (trainsyncroot) - { - TrainTrack track = CurrentProjectFile.AddTrainsFile(fname); - if (track != null) - { - track.Loaded = true; - track.HasChanged = true; //new track, flag as not saved - - //TODO: set new train track default values... - - } - } - - CurrentProjectFile.HasChanged = true; - - LoadProjectTree(); - } - - public void OpenTrainTrack() - { - string[] files = ShowOpenDialogMulti("Dat files|*.dat", string.Empty); - if (files == null) - { - return; - } - - if (CurrentProjectFile == null) - { - NewProject(); - } - - foreach (string file in files) - { - if (!File.Exists(file)) continue; - - var track = CurrentProjectFile.AddTrainsFile(file); - - if (track != null) - { - SetProjectHasChanged(true); - - LoadTrainTrackFromFile(track, file); - - LoadProjectTree(); - } - else - { - MessageBox.Show("Couldn't add\n" + file + "\n - the file already exists in the project."); - } - - } - } - - public void SaveTrainTrack(bool saveas = false) - { - if ((CurrentTrainTrack == null) && (CurrentTrainNode != null)) CurrentTrainTrack = CurrentTrainNode.Track; - if (CurrentTrainTrack == null) return; - string trackname = CurrentTrainTrack.Name; - string filepath = CurrentTrainTrack.FilePath; - if (string.IsNullOrEmpty(filepath)) - { - filepath = trackname; - } - string origfile = filepath; - if (!File.Exists(filepath)) - { - saveas = true; - } - - - byte[] data; - lock (trainsyncroot) //need to sync writes to ynd objects... - { - saveas = saveas || string.IsNullOrEmpty(filepath); - if (saveas) - { - filepath = ShowSaveDialog("Dat files|*.dat", filepath); - if (string.IsNullOrEmpty(filepath)) - { return; } - - string newname = Path.GetFileNameWithoutExtension(filepath); - //JenkIndex.Ensure(newname); - CurrentTrainTrack.FilePath = filepath; - CurrentTrainTrack.RpfFileEntry.Name = new FileInfo(filepath).Name; - CurrentTrainTrack.Name = CurrentTrainTrack.RpfFileEntry.Name; - } - - - data = CurrentTrainTrack.Save(); - } - - - if (data != null) - { - File.WriteAllBytes(filepath, data); - } - - SetTrainTrackHasChanged(false); - - if (saveas) - { - LoadTrainTrackTabPage(); - if (CurrentProjectFile != null) - { - string origpath = CurrentProjectFile.GetRelativePath(origfile); - string newpath = CurrentProjectFile.GetRelativePath(CurrentTrainTrack.FilePath); - if (!CurrentProjectFile.RenameTrainTrack(origpath, newpath)) - { //couldn't rename it in the project? happens when project not saved yet... - //MessageBox.Show("Couldn't rename train track in project! This shouldn't happen - check the project file XML."); - } - } - SetProjectHasChanged(true); - SetCurrentSaveItem(); - } - - } - - private void AddTrainTrackToProject(TrainTrack track) - { - if (track == null) return; - if (CurrentProjectFile == null) - { - NewProject(); - } - if (TrainTrackExistsInProject(track)) return; - if (CurrentProjectFile.AddTrainsFile(track)) - { - track.HasChanged = true; - CurrentProjectFile.HasChanged = true; - LoadProjectTree(); - } - CurrentTrainTrack = track; - RefreshUI(); - if (CurrentTrainNode != null) - { - TrySelectTrainNodeTreeNode(CurrentTrainNode); - } - } - - private void RemoveTrainTrackFromProject() - { - if (CurrentTrainTrack == null) return; - if (CurrentProjectFile == null) return; - CurrentProjectFile.RemoveTrainsFile(CurrentTrainTrack); - CurrentTrainTrack = null; - LoadProjectTree(); - RefreshUI(); - } - - private void LoadTrainTrackTabPage() - { - if (CurrentTrainTrack == null) - { - TrainTrackFilePanel.Enabled = false; - TrainTrackFilenameTextBox.Text = string.Empty; - TrainTrackConfigNameTextBox.Text = string.Empty; - TrainTrackIsPingPongCheckBox.Checked = false; - TrainTrackStopsAtStationsCheckBox.Checked = false; - TrainTrackMPStopsAtStationsCheckBox.Checked = false; - TrainTrackSpeedTextBox.Text = string.Empty; - TrainTrackBrakingDistTextBox.Text = string.Empty; - TrainTrackRpfPathTextBox.Text = string.Empty; - TrainTrackFilePathTextBox.Text = string.Empty; - TrainTrackProjectPathTextBox.Text = string.Empty; - TrainTrackInfoLabel.Text = string.Empty; - } - else - { - populatingui = true; - TrainTrackFilePanel.Enabled = true; - TrainTrackFilenameTextBox.Text = CurrentTrainTrack.filename; - TrainTrackConfigNameTextBox.Text = CurrentTrainTrack.trainConfigName; - TrainTrackIsPingPongCheckBox.Checked = CurrentTrainTrack.isPingPongTrack; - TrainTrackStopsAtStationsCheckBox.Checked = CurrentTrainTrack.stopsAtStations; - TrainTrackMPStopsAtStationsCheckBox.Checked = CurrentTrainTrack.MPstopsAtStations; - TrainTrackSpeedTextBox.Text = FloatUtil.ToString(CurrentTrainTrack.speed); - TrainTrackBrakingDistTextBox.Text = FloatUtil.ToString(CurrentTrainTrack.brakingDist); - TrainTrackRpfPathTextBox.Text = CurrentTrainTrack.RpfFileEntry?.Path ?? string.Empty; - TrainTrackFilePathTextBox.Text = string.Empty; //todo - TrainTrackProjectPathTextBox.Text = string.Empty; //todo - TrainTrackInfoLabel.Text = CurrentTrainTrack.StationCount.ToString() + " stations"; - populatingui = false; - } - } - - private void LoadTrainTrackFromFile(TrainTrack track, string filename) - { - byte[] data = File.ReadAllBytes(filename); - - string fname = new FileInfo(filename).Name; - - track.Load(data); - - track.Name = fname; - track.FilePath = filename; - track.RpfFileEntry.Name = fname; - track.RpfFileEntry.NameLower = fname.ToLowerInvariant(); - - - if (WorldForm != null) - { - WorldForm.UpdateTrainTrackGraphics(track, true); //links don't get drawn until something changes otherwise - } - } - - private void LoadTrainTrackTreeNodes(TrainTrack track, TreeNode node) - { - if (track == null) return; - - if (!string.IsNullOrEmpty(node.Name)) return; //named nodes are eg Nodes - - node.Nodes.Clear(); - - - - if ((track.Nodes != null) && (track.Nodes.Count > 0)) - { - var nodesnode = node.Nodes.Add("Nodes (" + track.Nodes.Count.ToString() + ")"); - nodesnode.Name = "Nodes"; - nodesnode.Tag = track; - var nodes = track.Nodes; - for (int i = 0; i < nodes.Count; i++) - { - var ynode = nodes[i]; - var tnode = nodesnode.Nodes.Add(ynode.ToString()); - tnode.Tag = ynode; - } - } - - } - - private void SetTrainTrackHasChanged(bool changed) - { - if (CurrentTrainTrack == null) return; - - bool changechange = changed != CurrentTrainTrack.HasChanged; - if (!changechange) return; - - CurrentTrainTrack.HasChanged = changed; - - SetTrainTrackHasChangedUI(changed); - } - - private void SetTrainTrackHasChangedUI(bool changed) - { - if (ProjectTreeView.Nodes.Count > 0) - { - var pnode = ProjectTreeView.Nodes[0]; - var trnode = GetChildTreeNode(pnode, "Trains"); - if (trnode == null) return; - string changestr = changed ? "*" : ""; - for (int i = 0; i < trnode.Nodes.Count; i++) - { - var tnode = trnode.Nodes[i]; - if (tnode.Tag == CurrentTrainTrack) - { - string name = CurrentTrainTrack.Name; - if (CurrentTrainTrack.RpfFileEntry != null) - { - name = CurrentTrainTrack.RpfFileEntry.Name; - } - tnode.Text = changestr + name; - break; - } - } - } - } - - - - public void NewTrainNode(TrainTrackNode copy = null, bool copyPosition = false) - { - if (CurrentTrainTrack == null) return; - - var afternode = copyPosition ? copy : null; - - var n = CurrentTrainTrack.AddNode(afternode); - if (copy == null) - { - copy = CurrentTrainNode; - } - if (copy != null) - { - n.NodeType = copy.NodeType; - } - - bool cp = copyPosition && (copy != null); - Vector3 pos = cp ? copy.Position : GetSpawnPos(10.0f); - n.SetPosition(pos); - - - //CurrentTrainTrack.BuildVertices(); //for the graphics... - CurrentTrainTrack.BuildBVH(); - - - LoadProjectTree(); - - TrySelectTrainNodeTreeNode(n); - CurrentTrainNode = n; - LoadTrainNodeTabPage(); - - - if (WorldForm != null) - { - WorldForm.UpdateTrainTrackGraphics(CurrentTrainTrack, false); - } - } - - public bool DeleteTrainNode() - { - if (CurrentTrainTrack == null) return false; - if (CurrentTrainNode == null) return false; - if (CurrentTrainNode.Track != CurrentTrainTrack) return false; - if (CurrentTrainTrack.Nodes == null) return false; //nothing to delete.. - - if (MessageBox.Show("Are you sure you want to delete this train track node?\n" + CurrentTrainNode.ToString() + "\n\nThis operation cannot be undone. Continue?", "Confirm delete", MessageBoxButtons.YesNo) != DialogResult.Yes) - { - return true; - } - - //find this now to remove it later. - var tn = FindTrainNodeTreeNode(CurrentTrainNode); - - bool res = false; - if (WorldForm != null) - { - lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... - { - res = CurrentTrainTrack.RemoveNode(CurrentTrainNode); - - //WorldForm.SelectItem(null, null, null); - } - } - else - { - res = CurrentTrainTrack.RemoveNode(CurrentTrainNode); - } - if (!res) - { - MessageBox.Show("Unable to delete the train track node. This shouldn't happen!"); - } - - SetTrainTrackHasChangedUI(true); - - CurrentTrainNode = null; - if ((tn != null) && (tn.Parent != null)) - { - tn.Parent.Text = "Nodes (" + CurrentTrainTrack.Nodes.Count.ToString() + ")"; - tn.Parent.Nodes.Remove(tn); - } - else - { - //no need for this when removing the node above will select something else. - LoadTrainNodeTabPage(); //this case really shouldn't happen... - } - - if (WorldForm != null) - { - WorldForm.UpdateTrainTrackGraphics(CurrentTrainTrack, false); - } - - - return true; - } - - private void AddTrainNodeToProject() - { - if (CurrentTrainNode == null) return; - if (CurrentTrainTrack != null) - { - AddTrainTrackToProject(CurrentTrainTrack); - } - } - - private void LoadTrainNodeTabPage() - { - if (CurrentTrainNode == null) - { - TrainNodePanel.Enabled = false; - TrainNodeDeleteButton.Enabled = false; - TrainNodeAddToProjectButton.Enabled = false; - TrainNodePositionTextBox.Text = string.Empty; - TrainNodeTypeComboBox.SelectedIndex = -1; - } - else - { - populatingui = true; - TrainNodePanel.Enabled = true; - TrainNodeDeleteButton.Enabled = TrainTrackExistsInProject(CurrentTrainTrack); - TrainNodeAddToProjectButton.Enabled = !TrainNodeDeleteButton.Enabled; - TrainNodePositionTextBox.Text = FloatUtil.GetVector3String(CurrentTrainNode.Position); - TrainNodeTypeComboBox.SelectedIndex = CurrentTrainNode.NodeType; - populatingui = false; - - if (WorldForm != null) - { - WorldForm.SelectTrainTrackNode(CurrentTrainNode); - } - } - } - - public bool IsCurrentTrainNode(TrainTrackNode node) - { - return node == CurrentTrainNode; - } - - - - - - - - - - - - - - - - - - public void NewScenario() - { - if (CurrentProjectFile == null) - { - NewProject(); - } - if (CurrentProjectFile == null) return; - - int testi = 1; - string fname = string.Empty; - bool filenameok = false; - while (!filenameok) - { - fname = "scenario" + testi.ToString() + ".ymt"; - filenameok = !CurrentProjectFile.ContainsScenario(fname); - testi++; - } - - lock (scenariosyncroot) - { - YmtFile ymt = CurrentProjectFile.AddScenarioFile(fname); - if (ymt != null) - { - ymt.CScenarioPointRegion = new MCScenarioPointRegion(); - ymt.CScenarioPointRegion.Ymt = ymt; - ymt.CScenarioPointRegion.Points = new MCScenarioPointContainer(ymt.CScenarioPointRegion); - ymt.CScenarioPointRegion.Paths = new MUnk_4023740759(ymt.CScenarioPointRegion); - ymt.CScenarioPointRegion.LookUps = new MCScenarioPointLookUps(ymt.CScenarioPointRegion); - - ymt.ScenarioRegion = new ScenarioRegion(); - ymt.ScenarioRegion.Region = ymt.CScenarioPointRegion; - ymt.ScenarioRegion.Ymt = ymt; - - ymt.ScenarioRegion.BuildNodes(); //should be empty - ymt.ScenarioRegion.BuildBVH(); //should be empty - ymt.ScenarioRegion.BuildVertices(); //should be empty - - ymt.HasChanged = true; //new ymt, flag as not saved - ymt.Loaded = true; - } - } - - CurrentProjectFile.HasChanged = true; - - LoadProjectTree(); - } - - public void OpenScenario() - { - string[] files = ShowOpenDialogMulti("Ymt files|*.ymt", string.Empty); - if (files == null) - { - return; - } - - if (CurrentProjectFile == null) - { - NewProject(); - } - - foreach (string file in files) - { - if (!File.Exists(file)) continue; - - var ymt = CurrentProjectFile.AddScenarioFile(file); - - if (ymt != null) - { - SetProjectHasChanged(true); - - LoadScenarioFromFile(ymt, file); - - LoadProjectTree(); - } - else - { - MessageBox.Show("Couldn't add\n" + file + "\n - the file already exists in the project."); - } - - } - } - - public void SaveScenario(bool saveas = false) - { - if ((CurrentScenario == null) && (CurrentScenarioNode != null)) CurrentScenario = CurrentScenarioNode.Ymt; - if (CurrentScenario == null) return; - string ymtname = CurrentScenario.Name; - string filepath = CurrentScenario.FilePath; - if (string.IsNullOrEmpty(filepath)) - { - filepath = ymtname; - } - string origfile = filepath; - if (!File.Exists(filepath)) - { - saveas = true; - } - - - byte[] data; - lock (scenariosyncroot) //need to sync writes to scenario... - { - saveas = saveas || string.IsNullOrEmpty(filepath); - if (saveas) - { - filepath = ShowSaveDialog("Ymt files|*.ymt", filepath); - if (string.IsNullOrEmpty(filepath)) - { return; } - - string newname = Path.GetFileNameWithoutExtension(filepath); - JenkIndex.Ensure(newname); - CurrentScenario.FilePath = filepath; - CurrentScenario.RpfFileEntry.Name = new FileInfo(filepath).Name; - CurrentScenario.Name = CurrentScenario.RpfFileEntry.Name; - } - - - CurrentScenario.ContentType = YmtFileContentType.ScenarioPointRegion;//just to be sure.. - - data = CurrentScenario.Save(); - } - - - if (data != null) - { - File.WriteAllBytes(filepath, data); - } - - SetScenarioHasChanged(false); - - if (saveas) - { - LoadScenarioTabPage(); - if (CurrentProjectFile != null) - { - string origpath = CurrentProjectFile.GetRelativePath(origfile); - string newpath = CurrentProjectFile.GetRelativePath(CurrentScenario.FilePath); - if (!CurrentProjectFile.RenameScenario(origpath, newpath)) - { //couldn't rename it in the project? happens when project not saved yet... - //MessageBox.Show("Couldn't rename scenario in project! This shouldn't happen - check the project file XML."); - } - } - SetProjectHasChanged(true); - SetCurrentSaveItem(); - } - } - - private void AddScenarioToProject(YmtFile ymt) - { - if (ymt == null) return; - if (CurrentProjectFile == null) - { - NewProject(); - } - if (ScenarioExistsInProject(ymt)) return; - if (CurrentProjectFile.AddScenarioFile(ymt)) - { - ymt.HasChanged = true; - CurrentProjectFile.HasChanged = true; - LoadProjectTree(); - } - CurrentScenario = ymt; - RefreshUI(); - if (CurrentScenarioNode != null) - { - TrySelectScenarioNodeTreeNode(CurrentScenarioNode); - } - } - - private void RemoveScenarioFromProject() - { - if (CurrentScenario == null) return; - if (CurrentProjectFile == null) return; - CurrentProjectFile.RemoveScenarioFile(CurrentScenario); - CurrentScenario = null; - LoadProjectTree(); - RefreshUI(); - } - - private void LoadScenarioTabPage() - { - if (CurrentScenario == null) - { - populatingui = true; - ScenarioYmtPanel.Enabled = false; - ScenarioYmtNameTextBox.Text = string.Empty; - ScenarioYmtVersionTextBox.Text = string.Empty; - ScenarioYmtGridMinTextBox.Text = string.Empty; - ScenarioYmtGridMaxTextBox.Text = string.Empty; - ScenarioYmtGridScaleTextBox.Text = string.Empty; - ScenarioYmtGridInfoLabel.Text = "Total grid points: 0"; - ScenarioYmtExtentsMinTextBox.Text = string.Empty; - ScenarioYmtExtentsMaxTextBox.Text = string.Empty; - ScenarioYmtFileLocationTextBox.Text = string.Empty; - ScenarioYmtProjectPathTextBox.Text = string.Empty; - populatingui = false; - } - else - { - var rgn = CurrentScenario.CScenarioPointRegion; - var accg = rgn?._Data.AccelGrid ?? new rage__spdGrid2D(); - var bvh = CurrentScenario.ScenarioRegion?.BVH; - var emin = bvh?.Box.Minimum ?? Vector3.Zero; - var emax = bvh?.Box.Maximum ?? Vector3.Zero; - - populatingui = true; - ScenarioYmtPanel.Enabled = true; - ScenarioYmtNameTextBox.Text = CurrentScenario.Name; - ScenarioYmtVersionTextBox.Text = rgn?.VersionNumber.ToString() ?? ""; - ScenarioYmtGridMinTextBox.Text = FloatUtil.GetVector2String(accg.Min); - ScenarioYmtGridMaxTextBox.Text = FloatUtil.GetVector2String(accg.Max); - ScenarioYmtGridScaleTextBox.Text = FloatUtil.GetVector2String(accg.Scale); - ScenarioYmtGridInfoLabel.Text = "Total grid points: " + (rgn?.Unk_3844724227?.Length ?? 0).ToString(); - ScenarioYmtExtentsMinTextBox.Text = FloatUtil.GetVector3String(emin); - ScenarioYmtExtentsMaxTextBox.Text = FloatUtil.GetVector3String(emax); - ScenarioYmtFileLocationTextBox.Text = CurrentScenario.RpfFileEntry?.Path ?? ""; - ScenarioYmtProjectPathTextBox.Text = (CurrentProjectFile != null) ? CurrentProjectFile.GetRelativePath(CurrentScenario.FilePath) : CurrentScenario.FilePath; - populatingui = false; - } - } - - private void LoadScenarioFromFile(YmtFile ymt, string filename) - { - byte[] data = File.ReadAllBytes(filename); - - ymt.Load(data); - } - - private void LoadScenarioTreeNodes(YmtFile ymt, TreeNode node) - { - if (!string.IsNullOrEmpty(node.Name)) return; //named nodes are eg Points - - node.Nodes.Clear(); - - var region = ymt?.ScenarioRegion; - - if (region == null) return; - - var nodes = region.Nodes; - if ((nodes == null) || (nodes.Count == 0)) return; - - var pointsnode = node.Nodes.Add("Points (" + nodes.Count.ToString() + ")"); - pointsnode.Name = "Points"; - pointsnode.Tag = ymt; - for (int i = 0; i < nodes.Count; i++) - { - var snode = nodes[i]; - var tnode = pointsnode.Nodes.Add(snode.MedTypeName + ": " + snode.StringText); - tnode.Tag = snode; - } - - //var sr = region.Region; - //if (sr == null) return; - //int pointCount = (sr.Points?.LoadSavePoints?.Length ?? 0) + (sr.Points?.MyPoints?.Length ?? 0); - //int entityOverrideCount = (sr.EntityOverrides?.Length ?? 0); - //int chainCount = (sr.Paths?.Chains?.Length ?? 0); - //int clusterCount = (sr.Clusters?.Length ?? 0); - //TreeNode pointsNode = null; - //TreeNode entityOverridesNode = null; - //TreeNode chainsNode = null; - //TreeNode clustersNode = null; - //if (pointCount > 0) - //{ - // pointsNode = node.Nodes.Add("Points (" + pointCount.ToString() + ")"); - //} - //if (entityOverrideCount > 0) - //{ - // entityOverridesNode = node.Nodes.Add("Entity Overrides (" + entityOverrideCount.ToString() + ")"); - //} - //if (chainCount > 0) - //{ - // chainsNode = node.Nodes.Add("Chains (" + chainsNode.ToString() + ")"); - //} - //if (clusterCount > 0) - //{ - // clustersNode = node.Nodes.Add("Clusters (" + clusterCount.ToString() + ")"); - //} - //for (int i = 0; i < nodes.Count; i++) - //{ - // var snode = nodes[i]; - // if (snode == null) continue; - // if ((pointsNode != null) && ((snode.LoadSavePoint != null) || (snode.MyPoint != null))) - // { - // pointsNode.Nodes.Add(snode.ToString()).Tag = snode; - // } - // if ((entityOverridesNode != null) && ((snode.EntityOverride != null) || (snode.EntityPoint != null))) - // { - // entityOverridesNode.Nodes.Add(snode.ToString()).Tag = snode; - // } - // if ((chainsNode != null) && (snode.ChainingNode != null)) - // { - // chainsNode.Nodes.Add(snode.ToString()).Tag = snode; - // } - // if ((clustersNode != null) && ((snode.Cluster != null) || (snode.ClusterLoadSavePoint != null) || (snode.ClusterMyPoint != null))) - // { - // clustersNode.Nodes.Add(snode.ToString()).Tag = snode; - // } - //} - - } - - private void SetScenarioHasChanged(bool changed) - { - if (CurrentScenario == null) return; - - bool changechange = changed != CurrentScenario.HasChanged; - if (!changechange) return; - - CurrentScenario.HasChanged = changed; - - SetScenarioHasChangedUI(changed); - } - - private void SetScenarioHasChangedUI(bool changed) - { - if (ProjectTreeView.Nodes.Count > 0) - { - var pnode = ProjectTreeView.Nodes[0]; - var scnode = GetChildTreeNode(pnode, "Scenarios"); - if (scnode == null) return; - string changestr = changed ? "*" : ""; - for (int i = 0; i < scnode.Nodes.Count; i++) - { - var snode = scnode.Nodes[i]; - if (snode.Tag == CurrentScenario) - { - string name = CurrentScenario.Name; - if (CurrentScenario.RpfFileEntry != null) - { - name = CurrentScenario.RpfFileEntry.Name; - } - snode.Text = changestr + name; - break; - } - } - } - } - - - - public void NewScenarioNode(ScenarioNode copy = null, bool copyPosition = false) - { - if (CurrentScenario == null) return; - if (CurrentScenario.ScenarioRegion == null) return; - - if (copy == null) - { - copy = CurrentScenarioNode; - } - - var n = CurrentScenario.ScenarioRegion.AddNode(copy); - - bool cp = copyPosition && (copy != null); - Vector3 pos = cp ? copy.Position : GetSpawnPos(10.0f); - Quaternion ori = cp ? copy.Orientation : Quaternion.Identity; - n.SetPosition(pos); - n.SetOrientation(ori); - - - LoadProjectTree(); - - TrySelectScenarioNodeTreeNode(n); - CurrentScenarioNode = n; - LoadScenarioTabPage(); - LoadScenarioNodeTabPages(); - - - if (WorldForm != null) - { - WorldForm.UpdateScenarioGraphics(CurrentScenario, false); - } - else - { - CurrentScenario.ScenarioRegion.BuildBVH(); - CurrentScenario.ScenarioRegion.BuildVertices(); //for the graphics... - } - } - - public bool DeleteScenarioNode() - { - if (CurrentScenario == null) return false; - if (CurrentScenario.ScenarioRegion == null) return false; - if (CurrentScenarioNode == null) return false; - - - if (MessageBox.Show("Are you sure you want to delete this scenario node?\n" + CurrentScenarioNode.ToString() + "\n\nThis operation cannot be undone. Continue?", "Confirm delete", MessageBoxButtons.YesNo) != DialogResult.Yes) - { - return true; - } - - //find this now to remove it later. - var tn = FindScenarioNodeTreeNode(CurrentScenarioNode); - - bool res = false; - if (WorldForm != null) - { - lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... - { - res = CurrentScenario.ScenarioRegion.RemoveNode(CurrentScenarioNode); - } - } - else - { - res = CurrentScenario.ScenarioRegion.RemoveNode(CurrentScenarioNode); - } - if (!res) - { - MessageBox.Show("Unable to delete the scenario node. This shouldn't happen!"); - } - - SetScenarioHasChangedUI(true); - - CurrentScenarioNode = null; - if ((tn != null) && (tn.Parent != null)) - { - tn.Parent.Text = "Points (" + (CurrentScenario?.ScenarioRegion?.Nodes?.Count ?? 0).ToString() + ")"; - tn.Parent.Nodes.Remove(tn); - } - else - { - //no need for this when removing the node above will select something else. - LoadScenarioNodeTabPages(); //this case really shouldn't happen... - } - - if (WorldForm != null) - { - WorldForm.UpdateScenarioGraphics(CurrentScenario, false); - } - - - return true; - } - - private void AddScenarioNodeToProject() - { - if (CurrentScenarioNode == null) return; - if (CurrentScenario != null) - { - AddScenarioToProject(CurrentScenario); - } - } - - private void LoadScenarioNodeTabPages() - { - populatingui = true; - - LoadScenarioDropDowns(); - - LoadScenarioPointTabPage(); - LoadScenarioEntityTabPage(); - LoadScenarioEntityPointTabPage(); - LoadScenarioChainTabPage(); - LoadScenarioChainEdgeTabPage(); - LoadScenarioChainNodeTabPage(); - LoadScenarioClusterTabPage(); - LoadScenarioClusterPointTabPage(); - populatingui = false; - - if (CurrentScenarioNode != null) - { - if (WorldForm != null) - { - WorldForm.SelectScenarioNode(CurrentScenarioNode); - } - } - } - - private void LoadScenarioDropDowns() - { - if (ScenarioPointTypeComboBox.Items.Count > 0) return; - - var types = Scenarios.ScenarioTypes; //these are loaded by Scenarios.Init - if (types == null) - { return; } - - var stypes = types.GetScenarioTypes(); - if (stypes == null) return; - - var pmsets = types.GetPedModelSets(); - if (pmsets == null) return; - - var vmsets = types.GetVehicleModelSets(); - if (vmsets == null) return; - - ScenarioPointTypeComboBox.Items.Clear(); - ScenarioPointTypeComboBox.Items.Add(""); - ScenarioClusterPointTypeComboBox.Items.Clear(); - ScenarioClusterPointTypeComboBox.Items.Add(""); - ScenarioChainNodeTypeComboBox.Items.Clear(); - ScenarioChainNodeTypeComboBox.Items.Add(""); - foreach (var stype in stypes) - { - ScenarioPointTypeComboBox.Items.Add(stype); - ScenarioClusterPointTypeComboBox.Items.Add(stype); - ScenarioChainNodeTypeComboBox.Items.Add(stype); - } - - ScenarioPointModelSetComboBox.Items.Clear(); - ScenarioPointModelSetComboBox.Items.Add(""); - ScenarioClusterPointModelSetComboBox.Items.Clear(); - ScenarioClusterPointModelSetComboBox.Items.Add(""); - foreach (var pmset in pmsets) - { - ScenarioPointModelSetComboBox.Items.Add(pmset); - ScenarioClusterPointModelSetComboBox.Items.Add(pmset); - } - foreach (var vmset in vmsets) - { - ScenarioPointModelSetComboBox.Items.Add(vmset); - ScenarioClusterPointModelSetComboBox.Items.Add(vmset); - } - - - ScenarioEntityPointAvailableInMpSpComboBox.Items.Clear(); - ScenarioEntityPointAvailableInMpSpComboBox.Items.Add(Unk_3573596290.kBoth); - ScenarioEntityPointAvailableInMpSpComboBox.Items.Add(Unk_3573596290.kOnlySp); - ScenarioEntityPointAvailableInMpSpComboBox.Items.Add(Unk_3573596290.kOnlyMp); - - - ScenarioChainEdgeActionComboBox.Items.Clear(); - ScenarioChainEdgeActionComboBox.Items.Add(Unk_3609807418.Move); - ScenarioChainEdgeActionComboBox.Items.Add(Unk_3609807418.Unk_7865678); - ScenarioChainEdgeActionComboBox.Items.Add(Unk_3609807418.MoveFollowMaster); - - ScenarioChainEdgeNavModeComboBox.Items.Clear(); - ScenarioChainEdgeNavModeComboBox.Items.Add(Unk_3971773454.Direct); - ScenarioChainEdgeNavModeComboBox.Items.Add(Unk_3971773454.NavMesh); - ScenarioChainEdgeNavModeComboBox.Items.Add(Unk_3971773454.Roads); - - ScenarioChainEdgeNavSpeedComboBox.Items.Clear(); - ScenarioChainEdgeNavSpeedComboBox.Items.Add(Unk_941086046.Unk_00_3279574318); - ScenarioChainEdgeNavSpeedComboBox.Items.Add(Unk_941086046.Unk_01_2212923970); - ScenarioChainEdgeNavSpeedComboBox.Items.Add(Unk_941086046.Unk_02_4022799658); - ScenarioChainEdgeNavSpeedComboBox.Items.Add(Unk_941086046.Unk_03_1425672334); - ScenarioChainEdgeNavSpeedComboBox.Items.Add(Unk_941086046.Unk_04_957720931); - ScenarioChainEdgeNavSpeedComboBox.Items.Add(Unk_941086046.Unk_05_3795195414); - ScenarioChainEdgeNavSpeedComboBox.Items.Add(Unk_941086046.Unk_06_2834622009); - ScenarioChainEdgeNavSpeedComboBox.Items.Add(Unk_941086046.Unk_07_1876554076); - ScenarioChainEdgeNavSpeedComboBox.Items.Add(Unk_941086046.Unk_08_698543797); - ScenarioChainEdgeNavSpeedComboBox.Items.Add(Unk_941086046.Unk_09_1544199634); - ScenarioChainEdgeNavSpeedComboBox.Items.Add(Unk_941086046.Unk_10_2725613303); - ScenarioChainEdgeNavSpeedComboBox.Items.Add(Unk_941086046.Unk_11_4033265820); - ScenarioChainEdgeNavSpeedComboBox.Items.Add(Unk_941086046.Unk_12_3054809929); - ScenarioChainEdgeNavSpeedComboBox.Items.Add(Unk_941086046.Unk_13_3911005380); - ScenarioChainEdgeNavSpeedComboBox.Items.Add(Unk_941086046.Unk_14_3717649022); - ScenarioChainEdgeNavSpeedComboBox.Items.Add(Unk_941086046.Unk_15_3356026130); - - } - - private void LoadScenarioPointTabPage() - { - var p = CurrentScenarioNode?.MyPoint; - if (p == null) - { - ScenarioPointPanel.Enabled = false; - ScenarioPointCheckBox.Checked = false; - ScenarioPointAddToProjectButton.Enabled = false; - ScenarioPointDeleteButton.Enabled = false; - ScenarioPointPositionTextBox.Text = ""; - ScenarioPointDirectionTextBox.Text = ""; - ScenarioPointTypeComboBox.SelectedItem = null; - ScenarioPointModelSetComboBox.SelectedItem = null; - ScenarioPointInteriorTextBox.Text = ""; - ScenarioPointInteriorHashLabel.Text = "Hash: 0"; - ScenarioPointGroupTextBox.Text = ""; - ScenarioPointGroupHashLabel.Text = "Hash: 0"; - ScenarioPointImapTextBox.Text = ""; - ScenarioPointImapHashLabel.Text = "Hash: 0"; - ScenarioPointTimeStartUpDown.Value = 0; - ScenarioPointTimeEndUpDown.Value = 0; - ScenarioPointProbabilityUpDown.Value = 0; - ScenarioPointSpOnlyFlagUpDown.Value = 0; - ScenarioPointRadiusUpDown.Value = 0; - ScenarioPointWaitTimeUpDown.Value = 0; - ScenarioPointFlagsValueUpDown.Value = 0; - foreach (int i in ScenarioPointFlagsCheckedListBox.CheckedIndices) - { - ScenarioPointFlagsCheckedListBox.SetItemCheckState(i, CheckState.Unchecked); - } - } - else - { - ScenarioPointPanel.Enabled = true; - ScenarioPointCheckBox.Checked = true; - ScenarioPointDeleteButton.Enabled = ScenarioExistsInProject(CurrentScenario); - ScenarioPointAddToProjectButton.Enabled = !ScenarioPointDeleteButton.Enabled; - ScenarioPointPositionTextBox.Text = FloatUtil.GetVector3String(p.Position); - ScenarioPointDirectionTextBox.Text = FloatUtil.ToString(p.Direction); - ScenarioPointTypeComboBox.SelectedItem = ((object)p.Type) ?? ""; - ScenarioPointModelSetComboBox.SelectedItem = ((object)p.ModelSet) ?? ""; - ScenarioPointInteriorTextBox.Text = p.InteriorName.ToString(); - ScenarioPointInteriorHashLabel.Text = "Hash: " + p.InteriorName.Hash.ToString(); - ScenarioPointGroupTextBox.Text = p.GroupName.ToString(); - ScenarioPointGroupHashLabel.Text = "Hash: " + p.GroupName.Hash.ToString(); - ScenarioPointImapTextBox.Text = p.IMapName.ToString(); - ScenarioPointImapHashLabel.Text = "Hash: " + p.IMapName.Hash.ToString(); - ScenarioPointTimeStartUpDown.Value = p.TimeStart; - ScenarioPointTimeEndUpDown.Value = p.TimeEnd; - ScenarioPointProbabilityUpDown.Value = p.Probability; - ScenarioPointSpOnlyFlagUpDown.Value = p.AvailableMpSp; - ScenarioPointRadiusUpDown.Value = p.Radius; - ScenarioPointWaitTimeUpDown.Value = p.WaitTime; - var iflags = (int)p.Flags; - ScenarioPointFlagsValueUpDown.Value = iflags; - for (int i = 0; i < ScenarioPointFlagsCheckedListBox.Items.Count; i++) - { - var c = ((iflags & (1 << i)) > 0); - ScenarioPointFlagsCheckedListBox.SetItemCheckState(i, c ? CheckState.Checked : CheckState.Unchecked); - } - } - } - - private void LoadScenarioEntityTabPage() - { - var e = CurrentScenarioNode?.Entity; - if (e == null) - { - ScenarioEntityPanel.Enabled = false; - ScenarioEntityCheckBox.Checked = false; - ScenarioEntityAddToProjectButton.Enabled = false; - ScenarioEntityDeleteButton.Enabled = false; - ScenarioEntityPositionTextBox.Text = ""; - ScenarioEntityTypeTextBox.Text = ""; - ScenarioEntityTypeHashLabel.Text = "Hash: 0"; - ScenarioEntityUnk1UpDown.Value = 0; - ScenarioEntityUnk2UpDown.Value = 0; - ScenarioEntityInfoLabel.Text = "0 override points"; - ScenarioEntityPointsListBox.Items.Clear(); - ScenarioEntityAddPointButton.Enabled = false; - } - else - { - ScenarioEntityPanel.Enabled = true; - ScenarioEntityCheckBox.Checked = true; - ScenarioEntityDeleteButton.Enabled = ScenarioExistsInProject(CurrentScenario); - ScenarioEntityAddToProjectButton.Enabled = !ScenarioEntityDeleteButton.Enabled; - ScenarioEntityPositionTextBox.Text = FloatUtil.GetVector3String(e.Position); - ScenarioEntityTypeTextBox.Text = e.TypeName.ToString(); - ScenarioEntityTypeHashLabel.Text = "Hash: " + e.TypeName.Hash.ToString(); - ScenarioEntityUnk1UpDown.Value = e.Unk1; - ScenarioEntityUnk2UpDown.Value = e.Unk2; - var pc = e.ScenarioPoints?.Length ?? 0; - ScenarioEntityInfoLabel.Text = pc.ToString() + " override point" + ((pc != 1) ? "s" : ""); - ScenarioEntityPointsListBox.Items.Clear(); - ScenarioEntityAddPointButton.Enabled = true; - - if (e.ScenarioPoints != null) - { - foreach (var point in e.ScenarioPoints) - { - ScenarioEntityPointsListBox.Items.Add(point); - } - if (CurrentScenarioNode.EntityPoint != null) - { - ScenarioEntityPointsListBox.SelectedItem = CurrentScenarioNode.EntityPoint; - } - } - } - } - - private void LoadScenarioEntityPointTabPage() - { - var p = CurrentScenarioNode?.EntityPoint; - if (p == null) - { - ScenarioEntityPointPanel.Enabled = false; - ScenarioEntityPointCheckBox.Checked = false; - ScenarioEntityPointAddToProjectButton.Enabled = false; - ScenarioEntityPointDeleteButton.Enabled = false; - ScenarioEntityPointNameTextBox.Text = ""; - ScenarioEntityPointNameHashLabel.Text = "Hash: 0"; - ScenarioEntityPointPositionTextBox.Text = ""; - ScenarioEntityPointRotationTextBox.Text = ""; - ScenarioEntityPointSpawnTypeTextBox.Text = ""; - ScenarioEntityPointSpawnTypeHashLabel.Text = "Hash: 0"; - ScenarioEntityPointPedTypeTextBox.Text = ""; - ScenarioEntityPointPedTypeHashLabel.Text = "Hash: 0"; - ScenarioEntityPointGroupTextBox.Text = ""; - ScenarioEntityPointGroupHashLabel.Text = "Hash: 0"; - ScenarioEntityPointInteriorTextBox.Text = ""; - ScenarioEntityPointInteriorHashLabel.Text = "Hash: 0"; - ScenarioEntityPointRequiredImapTextBox.Text = ""; - ScenarioEntityPointRequiredImapHashLabel.Text = "Hash: 0"; - ScenarioEntityPointAvailableInMpSpComboBox.SelectedItem = null; - ScenarioEntityPointProbabilityTextBox.Text = ""; - ScenarioEntityPointTimeTillPedLeavesTextBox.Text = ""; - ScenarioEntityPointRadiusTextBox.Text = ""; - ScenarioEntityPointStartUpDown.Value = 0; - ScenarioEntityPointEndUpDown.Value = 0; - ScenarioEntityPointExtendedRangeCheckBox.Checked = false; - ScenarioEntityPointShortRangeCheckBox.Checked = false; - ScenarioEntityPointHighPriCheckBox.Checked = false; - ScenarioEntityPointFlagsUpDown.Value = 0; - foreach (int i in ScenarioEntityPointFlagsCheckedListBox.CheckedIndices) - { - ScenarioEntityPointFlagsCheckedListBox.SetItemCheckState(i, CheckState.Unchecked); - } - } - else - { - ScenarioEntityPointPanel.Enabled = true; - ScenarioEntityPointCheckBox.Checked = true; - ScenarioEntityPointDeleteButton.Enabled = ScenarioExistsInProject(CurrentScenario); - ScenarioEntityPointAddToProjectButton.Enabled = !ScenarioEntityPointDeleteButton.Enabled; - ScenarioEntityPointNameTextBox.Text = p.NameHash.ToString(); - ScenarioEntityPointNameHashLabel.Text = "Hash: " + p.NameHash.Hash.ToString(); - ScenarioEntityPointPositionTextBox.Text = FloatUtil.GetVector3String(p.OffsetPosition); - ScenarioEntityPointRotationTextBox.Text = FloatUtil.GetVector4String(p.OffsetRotation); - ScenarioEntityPointSpawnTypeTextBox.Text = p.SpawnType.ToString(); - ScenarioEntityPointSpawnTypeHashLabel.Text = "Hash: " + p.SpawnType.Hash.ToString(); - ScenarioEntityPointPedTypeTextBox.Text = p.PedType.ToString(); - ScenarioEntityPointPedTypeHashLabel.Text = "Hash: " + p.PedType.Hash.ToString(); - ScenarioEntityPointGroupTextBox.Text = p.Group.ToString(); - ScenarioEntityPointGroupHashLabel.Text = "Hash: " + p.Group.Hash.ToString(); - ScenarioEntityPointInteriorTextBox.Text = p.Interior.ToString(); - ScenarioEntityPointInteriorHashLabel.Text = "Hash: " + p.Interior.Hash.ToString(); - ScenarioEntityPointRequiredImapTextBox.Text = p.RequiredImap.ToString(); - ScenarioEntityPointRequiredImapHashLabel.Text = "Hash: " + p.RequiredImap.Hash.ToString(); - ScenarioEntityPointAvailableInMpSpComboBox.SelectedItem = p.AvailableInMpSp; - ScenarioEntityPointProbabilityTextBox.Text = FloatUtil.ToString(p.Probability); - ScenarioEntityPointTimeTillPedLeavesTextBox.Text = FloatUtil.ToString(p.TimeTillPedLeaves); - ScenarioEntityPointRadiusTextBox.Text = FloatUtil.ToString(p.Radius); - ScenarioEntityPointStartUpDown.Value = p.StartTime; - ScenarioEntityPointEndUpDown.Value = p.EndTime; - ScenarioEntityPointExtendedRangeCheckBox.Checked = p.ExtendedRange; - ScenarioEntityPointShortRangeCheckBox.Checked = p.ShortRange; - ScenarioEntityPointHighPriCheckBox.Checked = p.HighPri; - var iflags = (int)p.Flags; - ScenarioEntityPointFlagsUpDown.Value = 0; - for (int i = 0; i < ScenarioEntityPointFlagsCheckedListBox.Items.Count; i++) - { - var c = ((iflags & (1 << i)) > 0); - ScenarioEntityPointFlagsCheckedListBox.SetItemCheckState(i, c ? CheckState.Checked : CheckState.Unchecked); - } - - } - } - - private void LoadScenarioChainTabPage() - { - CurrentScenarioChainEdge = null; - - var n = CurrentScenarioNode?.ChainingNode; - if (n == null) - { - ScenarioChainAddToProjectButton.Enabled = false; - ScenarioChainDeleteButton.Enabled = false; - ScenarioChainEdgesListBox.Items.Clear(); - ScenarioChainEdgeCountLabel.Text = "Edge Count: 0"; - ScenarioChainUnk1UpDown.Value = 0; - } - else - { - ScenarioChainDeleteButton.Enabled = ScenarioChainNodeDeleteButton.Enabled;// ScenarioExistsInProject(CurrentScenario); - ScenarioChainAddToProjectButton.Enabled = !ScenarioChainDeleteButton.Enabled; - ScenarioChainEdgesListBox.Items.Clear(); - ScenarioChainEdgeCountLabel.Text = "Edge Count: " + (n.Chain?.EdgeIds?.Length ?? 0).ToString(); - ScenarioChainUnk1UpDown.Value = n.Chain?.Unk1 ?? 0; - - if ((n.Chain != null) && (n.Chain.Edges != null)) - { - foreach (var edge in n.Chain.Edges) - { - ScenarioChainEdgesListBox.Items.Add(edge); - } - } - else - { } - } - } - - private void LoadScenarioChainEdgeTabPage() - { - var e = CurrentScenarioChainEdge; - if (e == null) - { - ScenarioChainEdgePanel.Enabled = false; - ScenarioChainEdgeNodeIndexFromUpDown.Value = 0; - ScenarioChainEdgeNodeIndexToUpDown.Value = 0; - ScenarioChainEdgeActionComboBox.SelectedItem = null; - ScenarioChainEdgeNavModeComboBox.SelectedItem = null; - ScenarioChainEdgeNavSpeedComboBox.SelectedItem = null; - ScenarioChainMoveEdgeDownButton.Enabled = false; - ScenarioChainMoveEdgeUpButton.Enabled = false; - } - else - { - ScenarioChainEdgePanel.Enabled = true; - ScenarioChainEdgeNodeIndexFromUpDown.Value = e.NodeIndexFrom; - ScenarioChainEdgeNodeIndexToUpDown.Value = e.NodeIndexTo; - ScenarioChainEdgeActionComboBox.SelectedItem = e.Action; - ScenarioChainEdgeNavModeComboBox.SelectedItem = e.NavMode; - ScenarioChainEdgeNavSpeedComboBox.SelectedItem = e.NavSpeed; - ScenarioChainMoveEdgeDownButton.Enabled = true; - ScenarioChainMoveEdgeUpButton.Enabled = true; - - if (WorldForm != null) - { - WorldForm.SelectScenarioEdge(CurrentScenarioNode, e); - } - } - } - - private void LoadScenarioChainNodeTabPage() - { - var n = CurrentScenarioNode?.ChainingNode; - if (n == null) - { - ScenarioChainNodePanel.Enabled = false; - ScenarioChainNodeCheckBox.Checked = false; - ScenarioChainNodeAddToProjectButton.Enabled = false; - ScenarioChainNodeDeleteButton.Enabled = false; - ScenarioChainNodePositionTextBox.Text = ""; - ScenarioChainNodeUnk1TextBox.Text = ""; - ScenarioChainNodeUnk1HashLabel.Text = "Hash: 0"; - ScenarioChainNodeTypeComboBox.SelectedItem = null; - ScenarioChainNodeFirstCheckBox.Checked = false; - ScenarioChainNodeLastCheckBox.Checked = false; - ScenarioChainNodeIndexTextBox.Text = ""; - } - else - { - ScenarioChainNodePanel.Enabled = true; - ScenarioChainNodeCheckBox.Checked = true; - ScenarioChainNodeDeleteButton.Enabled = ScenarioExistsInProject(CurrentScenario); - ScenarioChainNodeAddToProjectButton.Enabled = !ScenarioChainNodeDeleteButton.Enabled; - ScenarioChainNodePositionTextBox.Text = FloatUtil.GetVector3String(n.Position); - ScenarioChainNodeUnk1TextBox.Text = n.Unk1.ToString(); - ScenarioChainNodeUnk1HashLabel.Text = "Hash: " + n.Unk1.Hash.ToString(); - ScenarioChainNodeTypeComboBox.SelectedItem = ((object)n.Type) ?? ""; - ScenarioChainNodeFirstCheckBox.Checked = !n.NotFirst; - ScenarioChainNodeLastCheckBox.Checked = !n.NotLast; - ScenarioChainNodeIndexTextBox.Text = n.NodeIndex.ToString(); - } - } - - private void LoadScenarioClusterTabPage() - { - var c = CurrentScenarioNode?.Cluster; - if (c == null) - { - ScenarioClusterPanel.Enabled = false; - ScenarioClusterCheckBox.Checked = false; - ScenarioClusterAddToProjectButton.Enabled = false; - ScenarioClusterDeleteButton.Enabled = false; - ScenarioClusterCenterTextBox.Text = ""; - ScenarioClusterRadiusTextBox.Text = ""; - ScenarioClusterUnk1TextBox.Text = ""; - ScenarioClusterUnk2CheckBox.Checked = false; - ScenarioClusterPointsListBox.Items.Clear(); - ScenarioClusterAddPointButton.Enabled = false; - } - else - { - ScenarioClusterPanel.Enabled = true; - ScenarioClusterCheckBox.Checked = true; - ScenarioClusterDeleteButton.Enabled = ScenarioExistsInProject(CurrentScenario); - ScenarioClusterAddToProjectButton.Enabled = !ScenarioClusterDeleteButton.Enabled; - ScenarioClusterCenterTextBox.Text = FloatUtil.GetVector3String(c.Position); - ScenarioClusterRadiusTextBox.Text = FloatUtil.ToString(c.Radius); - ScenarioClusterUnk1TextBox.Text = FloatUtil.ToString(c.Unk1); - ScenarioClusterUnk2CheckBox.Checked = c.Unk2; - ScenarioClusterPointsListBox.Items.Clear(); - ScenarioClusterAddPointButton.Enabled = true; - - if (c.Points != null) - { - if (c.Points.MyPoints != null) - { - foreach (var point in c.Points.MyPoints) - { - ScenarioClusterPointsListBox.Items.Add(point); - } - if (CurrentScenarioNode.ClusterMyPoint != null) - { - ScenarioClusterPointsListBox.SelectedItem = CurrentScenarioNode.ClusterMyPoint; - } - } - if (c.Points.LoadSavePoints != null) - { - foreach (var point in c.Points.LoadSavePoints) - { - ScenarioClusterPointsListBox.Items.Add(point); - } - if (CurrentScenarioNode.ClusterLoadSavePoint != null) - { - ScenarioClusterPointsListBox.SelectedItem = CurrentScenarioNode.ClusterLoadSavePoint; - } - } - } - - } - } - - private void LoadScenarioClusterPointTabPage() - { - var p = CurrentScenarioNode?.ClusterMyPoint; - if (p == null) - { - ScenarioClusterPointPanel.Enabled = false; - ScenarioClusterPointCheckBox.Checked = false; - ScenarioClusterPointAddToProjectButton.Enabled = false; - ScenarioClusterPointDeleteButton.Enabled = false; - ScenarioClusterPointPositionTextBox.Text = ""; - ScenarioClusterPointDirectionTextBox.Text = ""; - ScenarioClusterPointTypeComboBox.SelectedItem = null; - ScenarioClusterPointModelSetComboBox.SelectedItem = null; - ScenarioClusterPointInteriorTextBox.Text = ""; - ScenarioClusterPointInteriorHashLabel.Text = "Hash: 0"; - ScenarioClusterPointGroupTextBox.Text = ""; - ScenarioClusterPointGroupHashLabel.Text = "Hash: 0"; - ScenarioClusterPointImapTextBox.Text = ""; - ScenarioClusterPointImapHashLabel.Text = "Hash: 0"; - ScenarioClusterPointTimeStartUpDown.Value = 0; - ScenarioClusterPointTimeEndUpDown.Value = 0; - ScenarioClusterPointProbabilityUpDown.Value = 0; - ScenarioClusterPointAnimalFlagUpDown.Value = 0; - ScenarioClusterPointRadiusUpDown.Value = 0; - ScenarioClusterPointWaitTimeUpDown.Value = 0; - ScenarioClusterPointFlagsUpDown.Value = 0; - foreach (int i in ScenarioClusterPointFlagsCheckedListBox.CheckedIndices) - { - ScenarioClusterPointFlagsCheckedListBox.SetItemCheckState(i, CheckState.Unchecked); - } - } - else - { - ScenarioClusterPointPanel.Enabled = true; - ScenarioClusterPointCheckBox.Checked = true; - ScenarioClusterPointDeleteButton.Enabled = ScenarioExistsInProject(CurrentScenario); - ScenarioClusterPointAddToProjectButton.Enabled = !ScenarioClusterPointDeleteButton.Enabled; - ScenarioClusterPointPositionTextBox.Text = FloatUtil.GetVector3String(p.Position); - ScenarioClusterPointDirectionTextBox.Text = FloatUtil.ToString(p.Direction); - ScenarioClusterPointTypeComboBox.SelectedItem = ((object)p.Type) ?? ""; - ScenarioClusterPointModelSetComboBox.SelectedItem = ((object)p.ModelSet) ?? ""; - ScenarioClusterPointInteriorTextBox.Text = p.InteriorName.ToString(); - ScenarioClusterPointInteriorHashLabel.Text = "Hash: " + p.InteriorName.Hash.ToString(); - ScenarioClusterPointGroupTextBox.Text = p.GroupName.ToString(); - ScenarioClusterPointGroupHashLabel.Text = "Hash: " + p.GroupName.Hash.ToString(); - ScenarioClusterPointImapTextBox.Text = p.IMapName.ToString(); - ScenarioClusterPointImapHashLabel.Text = "Hash: " + p.IMapName.Hash.ToString(); - ScenarioClusterPointTimeStartUpDown.Value = p.TimeStart; - ScenarioClusterPointTimeEndUpDown.Value = p.TimeEnd; - ScenarioClusterPointProbabilityUpDown.Value = p.Probability; - ScenarioClusterPointAnimalFlagUpDown.Value = p.AvailableMpSp; - ScenarioClusterPointRadiusUpDown.Value = p.Radius; - ScenarioClusterPointWaitTimeUpDown.Value = p.WaitTime; - var iflags = (int)p.Flags; - ScenarioClusterPointFlagsUpDown.Value = iflags; - for (int i = 0; i < ScenarioClusterPointFlagsCheckedListBox.Items.Count; i++) - { - var c = ((iflags & (1 << i)) > 0); - ScenarioClusterPointFlagsCheckedListBox.SetItemCheckState(i, c ? CheckState.Checked : CheckState.Unchecked); - } - } - } - - private void SelectScenarioNodeTabPages(ScenarioNode node) - { - //select the appropriate tab page(s) for the given node. - - if (node == null) return; - - bool reseltree = ProjectTreeView.Focused; - bool change = false; - - if (node.MyPoint != null) - { - bool sw = true; - if ((node.Entity != null) && (ScenarioTabControl.SelectedTab == ScenarioEntityTabPage)) - { - sw = false; - } - if ((node.EntityPoint != null) && (ScenarioTabControl.SelectedTab == ScenarioEntityPointTabPage)) - { - sw = false; - } - if ((node.Cluster != null) && (ScenarioTabControl.SelectedTab == ScenarioClusterTabPage)) - { - sw = false; - } - if ((node.ClusterMyPoint != null) && (ScenarioTabControl.SelectedTab == ScenarioClusterPointTabPage)) - { - sw = false; - } - if ((node.ChainingNode != null) && (ScenarioTabControl.SelectedTab == ScenarioChainTabPage)) - { - sw = false; - } - if ((node.ChainingNode != null) && (ScenarioTabControl.SelectedTab == ScenarioChainNodeTabPage)) - { - sw = false; - } - - if (sw) - { - change = ScenarioTabControl.SelectedTab != ScenarioPointTabPage; - ScenarioTabControl.SelectedTab = ScenarioPointTabPage; - } - } - else if (node.EntityPoint != null) - { - if (ScenarioTabControl.SelectedTab != ScenarioEntityTabPage) - { - change = ScenarioTabControl.SelectedTab != ScenarioEntityPointTabPage; - ScenarioTabControl.SelectedTab = ScenarioEntityPointTabPage; - } - } - else if (node.Entity != null) - { - change = ScenarioTabControl.SelectedTab != ScenarioEntityTabPage; - ScenarioTabControl.SelectedTab = ScenarioEntityTabPage; - } - else if (node.ClusterMyPoint != null) - { - if (ScenarioTabControl.SelectedTab != ScenarioClusterTabPage) - { - change = ScenarioTabControl.SelectedTab != ScenarioClusterPointTabPage; - ScenarioTabControl.SelectedTab = ScenarioClusterPointTabPage; - } - } - else if (node.Cluster != null) - { - change = ScenarioTabControl.SelectedTab != ScenarioClusterTabPage; - ScenarioTabControl.SelectedTab = ScenarioClusterTabPage; - } - else if (node.ChainingNode != null) - { - if (ScenarioTabControl.SelectedTab != ScenarioChainTabPage) - { - change = ScenarioTabControl.SelectedTab != ScenarioChainNodeTabPage; - ScenarioTabControl.SelectedTab = ScenarioChainNodeTabPage; - } - } - else //if (node.MyPoint != null) - { - change = ScenarioTabControl.SelectedTab != ScenarioPointTabPage; - ScenarioTabControl.SelectedTab = ScenarioPointTabPage; - } - - if (reseltree && change) - { - ProjectTreeView.Focus(); - } - } - - public bool IsCurrentScenarioNode(ScenarioNode node) - { - return node == CurrentScenarioNode; - } - - - - - private void AddScenarioChain() - { - if (CurrentScenario.ScenarioRegion == null) return; - var paths = CurrentScenario?.CScenarioPointRegion?.Paths; - if (paths == null) return; - - var copy = CurrentScenarioNode?.ChainingNode?.Chain; - var copyn = CurrentScenarioNode?.ChainingNode; - var copyp = CurrentScenarioNode?.MyPoint; - var copye = CurrentScenarioChainEdge; - var copycl = CurrentScenarioNode?.Cluster; - - MCScenarioChain chain = new MCScenarioChain(); - chain.Unk1 = 1; //default value - if (copy != null) - { - chain.Data = copy.Data; - chain._Data.EdgeIds = new Array_ushort(); //start empty.. not really necessary - } - - paths.AddChain(chain); - - - //add 2 new nodes to the new chain. - var pos1 = GetSpawnPos(10.0f); - var pos2 = pos1 + Vector3.UnitX; - - ScenarioNode n1 = null;// CurrentScenario.ScenarioRegion.AddNode(); - - if (copycl != null) - { - ScenarioNode copyclnode = new ScenarioNode(CurrentScenario); - copyclnode.Cluster = copycl; - copyclnode.ClusterMyPoint = new MCScenarioPoint(CurrentScenario.CScenarioPointRegion); - copyclnode.ClusterMyPoint.InteriorName = 493038497; //JenkHash.GenHash("none"); - copyclnode.ClusterMyPoint.GroupName = 493038497; - copyclnode.ClusterMyPoint.IMapName = 493038497; - copyclnode.ClusterMyPoint.TimeStart = 0; - copyclnode.ClusterMyPoint.TimeEnd = 24; - n1 = CurrentScenario.ScenarioRegion.AddNode(copyclnode); - } - else - { - n1 = CurrentScenario.ScenarioRegion.AddNode(); - } - - ScenarioNode n2 = CurrentScenario.ScenarioRegion.AddNode(); - - if (copyp != null) - { - n1.MyPoint.CopyFrom(copyp); - n2.MyPoint.CopyFrom(copyp); - } - - n1.ChainingNode = new MCScenarioChainingNode(); - n2.ChainingNode = new MCScenarioChainingNode(); - - if (copyn != null) - { - n1.ChainingNode.CopyFrom(copyn); - n2.ChainingNode.CopyFrom(copyn); - } - - n1.ChainingNode.NotLast = true; - n2.ChainingNode.NotFirst = true; - - n1.ChainingNode.ScenarioNode = n1; - n2.ChainingNode.ScenarioNode = n2; - - paths.AddNode(n1.ChainingNode); - paths.AddNode(n2.ChainingNode); - - n1.ChainingNode.Chain = chain; - n2.ChainingNode.Chain = chain; - - var ed = new MCScenarioChainingEdge(); - - if (copye != null) - { - ed.Data = copye.Data; - } - - ed.NodeFrom = n1.ChainingNode; - ed.NodeTo = n2.ChainingNode; - ed.NodeIndexFrom = (ushort)n1.ChainingNode.NodeIndex; - ed.NodeIndexTo = (ushort)n2.ChainingNode.NodeIndex; - - paths.AddEdge(ed); - chain.AddEdge(ed); - - - - n1.SetPosition(pos1); - n2.SetPosition(pos2); - - - - - - - LoadProjectTree(); - - TrySelectScenarioNodeTreeNode(n1); - CurrentScenarioNode = n1; - CurrentScenarioChainEdge = ed; - LoadScenarioChainTabPage(); - //LoadScenarioTabPage(); - //LoadScenarioNodeTabPages(); - - - if (WorldForm != null) - { - WorldForm.UpdateScenarioGraphics(CurrentScenario, false); - } - else - { - CurrentScenario.ScenarioRegion.BuildBVH(); - CurrentScenario.ScenarioRegion.BuildVertices(); //for the graphics... - } - } - - private void AddScenarioEdge() - { - var chain = CurrentScenarioNode?.ChainingNode?.Chain; - if (chain == null) return; - var paths = CurrentScenario?.CScenarioPointRegion?.Paths; - if (paths == null) return; - - MCScenarioChainingEdge edge = new MCScenarioChainingEdge(); - if (CurrentScenarioChainEdge != null) - { - edge.Data = CurrentScenarioChainEdge.Data; - } - - paths.AddEdge(edge); - chain.AddEdge(edge); - - CurrentScenarioChainEdge = edge; - - UpdateScenarioEdgeLinkage(); - - LoadScenarioChainTabPage(); - - ScenarioChainEdgesListBox.SelectedItem = edge; - } - - private void RemoveScenarioEdge() - { - if (CurrentScenarioChainEdge == null) return; - if (CurrentScenario == null) return; - - var chain = CurrentScenarioNode?.ChainingNode?.Chain; - if (chain == null) return; - var paths = CurrentScenario?.CScenarioPointRegion?.Paths; - if (paths == null) return; - - if (MessageBox.Show("Are you sure you want to delete this scenario chain edge?\n" + CurrentScenarioChainEdge.ToString() + "\n\nThis operation cannot be undone. Continue?", "Confirm delete", MessageBoxButtons.YesNo) != DialogResult.Yes) - { - return; - } - - chain.RemoveEdge(CurrentScenarioChainEdge); - paths.RemoveEdge(CurrentScenarioChainEdge); - - LoadScenarioChainTabPage(); - - if (WorldForm != null) - { - WorldForm.UpdateScenarioGraphics(CurrentScenario, false); - WorldForm.SelectScenarioEdge(CurrentScenarioNode, null); - } - } - - private void MoveScenarioEdge(bool moveDown) - { - - var chain = CurrentScenarioNode?.ChainingNode?.Chain; - if (chain == null) return; - if (chain.Edges == null) return; - if (chain.EdgeIds == null) return; - - if (CurrentScenarioChainEdge == null) return; - - var edges = CurrentScenario?.CScenarioPointRegion?.Paths?.Edges; - if (edges == null) return; - - - int lasti = (chain.Edges?.Length ?? 0) - 1; - - var edgeid = 0; - for (int i = 0; i < chain.Edges.Length; i++) - { - if (chain.Edges[i] == CurrentScenarioChainEdge) - { - edgeid = i; - break; - } - } - - if (!moveDown && (edgeid <= 0)) return; - if (moveDown && (edgeid >= lasti)) return; - - var swapid = edgeid + (moveDown ? 1 : -1); - var swaped = chain.Edges[swapid]; - - chain.Edges[swapid] = CurrentScenarioChainEdge; - chain.EdgeIds[swapid] = (ushort)CurrentScenarioChainEdge.EdgeIndex; - chain.Edges[edgeid] = swaped; - chain.EdgeIds[edgeid] = (ushort)swapid; - - var ce = CurrentScenarioChainEdge; - - LoadScenarioChainTabPage(); - - CurrentScenarioChainEdge = ce; - - ScenarioChainEdgesListBox.SelectedItem = ce; - - //LoadScenarioChainEdgeTabPage(); - - } - - private void UpdateScenarioEdgeLinkage() - { - if (CurrentScenarioChainEdge == null) return; - if (CurrentScenario == null) return; - - - var chains = CurrentScenario?.CScenarioPointRegion?.Paths; - if (chains == null) return; - - var nodes = chains.Nodes; - if (nodes == null) return; - - ushort nifrom = CurrentScenarioChainEdge.NodeIndexFrom; - ushort nito = CurrentScenarioChainEdge.NodeIndexTo; - - if (nifrom < nodes.Length) CurrentScenarioChainEdge.NodeFrom = nodes[nifrom]; - if (nito < nodes.Length) CurrentScenarioChainEdge.NodeTo = nodes[nito]; - - ////need to rebuild the link verts.. updating the graphics should do it... - if (WorldForm != null) - { - WorldForm.UpdateScenarioGraphics(CurrentScenario, false); - } - } - - private void DeleteScenarioChain() - { - if (CurrentScenario == null) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.ChainingNode == null) return; - if (CurrentScenarioNode.ChainingNode.Chain == null) return; - - var chain = CurrentScenarioNode.ChainingNode.Chain; - - var paths = CurrentScenario.CScenarioPointRegion?.Paths; - if (paths == null) return; - - var rgn = CurrentScenario.ScenarioRegion; - if (rgn == null) return; - - - if (MessageBox.Show("Are you sure you want to delete this scenario chain?\n" + chain.ToString() + "\n\nThis operation cannot be undone. Continue?", "Confirm delete", MessageBoxButtons.YesNo) != DialogResult.Yes) - { - return; - } - - bool delpoints = false; - if (MessageBox.Show("Delete all Scenario Points for this chain as well?", "Confirm delete points", MessageBoxButtons.YesNo) == DialogResult.Yes) - { - delpoints = true; - } - - - - Dictionary ndict = new Dictionary(); - - var edges = chain.Edges; - if (edges != null) - { - foreach (var edge in edges) - { - //paths.RemoveEdge(edge); //removing nodes also removes edges! - paths.RemoveNode(edge.NodeFrom); - paths.RemoveNode(edge.NodeTo); - - ndict[edge.NodeFrom] = 1; - ndict[edge.NodeTo] = 1; - } - } - - paths.RemoveChain(chain); - - - - - List delnodes = new List(); - foreach (var node in rgn.Nodes) - { - if ((node.ChainingNode != null) && (ndict.ContainsKey(node.ChainingNode))) - { - delnodes.Add(node); - } - } - foreach (var delnode in delnodes) - { - delnode.ChainingNode = null;//this chaining node has been removed from the region. remove this association. - if (delpoints) - { - rgn.RemoveNode(delnode); - } - } - - - - var cn = CurrentScenarioNode; - var cs = CurrentScenario; - - LoadProjectTree(); - - if (!delpoints && (cn != null)) - { - TrySelectScenarioNodeTreeNode(cn); - } - else - { - TrySelectScenarioTreeNode(cs); - } - - - if (WorldForm != null) - { - WorldForm.UpdateScenarioGraphics(cs, false); - if (delpoints) - { - WorldForm.SelectItem(null); - } - } - else if (cs?.ScenarioRegion != null) - { - cs.ScenarioRegion.BuildBVH(); - cs.ScenarioRegion.BuildVertices(); //for the graphics... - } - } - - - - - private void AddScenarioCluster()//TODO: add defualt cluster points to new cluster - { - if (CurrentScenario == null) return; - - var sr = CurrentScenario.ScenarioRegion; - if (sr == null) return; - - var rgn = CurrentScenario.CScenarioPointRegion; - if (rgn == null) return; - - var copy = CurrentScenarioNode?.Cluster; - - - MCScenarioPointCluster cluster = new MCScenarioPointCluster(rgn, copy); - List clusterpoints = new List(); - - if (copy != null) - { - if (copy.Points?.MyPoints != null) - { - clusterpoints.AddRange(copy.Points.MyPoints); - } - } - - - - rgn.AddCluster(cluster); //add the base cluster to the region. - - - var pos1 = GetSpawnPos(10.0f); - - var ncopy = new ScenarioNode(CurrentScenario);//copy an empty node to start with, to avoid creating default MyPoint - var nc = sr.AddNode(ncopy); //add the base cluster's display node. - nc.Cluster = cluster; - - nc.SetPosition(pos1); - - if (cluster.Points != null) - { - foreach (var cpt in clusterpoints) - { - //TODO: copy cluster points.... - //or create some default points! - } - } - - - - - - - - - LoadProjectTree(); - - TrySelectScenarioNodeTreeNode(nc); - CurrentScenarioNode = nc; - LoadScenarioClusterTabPage(); - - - if (WorldForm != null) - { - WorldForm.UpdateScenarioGraphics(CurrentScenario, false); - } - else - { - CurrentScenario.ScenarioRegion.BuildBVH(); - CurrentScenario.ScenarioRegion.BuildVertices(); //for the graphics... - } - - } - - private void DeleteScenarioCluster() - { - if (CurrentScenario == null) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.Cluster == null) return; - - var cluster = CurrentScenarioNode.Cluster; - - var rgn = CurrentScenario.ScenarioRegion; - if (rgn == null) return; - - var crgn = CurrentScenario.CScenarioPointRegion; - if (crgn == null) return; - - - if (MessageBox.Show("Are you sure you want to delete this scenario cluster?\n" + cluster.ToString() + "\n\nThis operation cannot be undone. Continue?", "Confirm delete", MessageBoxButtons.YesNo) != DialogResult.Yes) - { - return; - } - - bool delpoints = false; - if (MessageBox.Show("Delete all Scenario Points for this cluster as well?", "Confirm delete points", MessageBoxButtons.YesNo) == DialogResult.Yes) - { - delpoints = true; - } - - - crgn.RemoveCluster(cluster); - - - - - - Dictionary ndict = new Dictionary(); - if (cluster?.Points?.MyPoints != null) - { - foreach (var point in cluster.Points.MyPoints) - { - ndict[point] = 1; - } - } - List delnodes = new List(); - foreach (var node in rgn.Nodes) - { - if ((node.ClusterMyPoint != null) && (ndict.ContainsKey(node.ClusterMyPoint))) - { - delnodes.Add(node); - } - else if (node.Cluster == cluster) - { - delnodes.Add(node); - } - } - foreach (var delnode in delnodes) - { - if (!delpoints && (crgn.Points != null) && (delnode.ClusterMyPoint != null)) - { - var copypt = new MCScenarioPoint(crgn, delnode.ClusterMyPoint); - crgn.Points.AddMyPoint(copypt); - delnode.MyPoint = copypt; - } - bool iscl = false; - if ((delnode.Cluster != null) && (delnode.ClusterMyPoint == null) && (delnode.ClusterLoadSavePoint == null)) - { - iscl = true; - } - delnode.Cluster = null; - delnode.ClusterMyPoint = null;//this cluster point has been removed from the region. remove this association. - delnode.ClusterLoadSavePoint = null; - if (delpoints) - { - //if ((delnode.ChainingNode == null) && (delnode.EntityPoint == null)) - { - rgn.RemoveNode(delnode); - } - } - else if (iscl) - { - rgn.RemoveNode(delnode); //remove the cluster node itself. - } - } - - - - var cn = CurrentScenarioNode; - var cs = CurrentScenario; - - LoadProjectTree(); - - if (!delpoints && (cn != null)) - { - TrySelectScenarioNodeTreeNode(cn); - } - else - { - TrySelectScenarioTreeNode(cs); - } - - - if (WorldForm != null) - { - WorldForm.UpdateScenarioGraphics(cs, false); - if (delpoints || ((cn != null) && (cn.MyPoint == null))) - { - WorldForm.SelectItem(null); - } - } - else if (cs?.ScenarioRegion != null) - { - cs.ScenarioRegion.BuildBVH(); - cs.ScenarioRegion.BuildVertices(); //for the graphics... - } - - } - - private void AddScenarioClusterPoint() - { - if (CurrentScenario == null) return; - - var sr = CurrentScenario.ScenarioRegion; - if (sr == null) return; - - var rgn = CurrentScenario.CScenarioPointRegion; - if (rgn == null) return; - - var cluster = CurrentScenarioNode?.Cluster; - if (cluster == null) return; - - if (cluster.Points == null) - { - cluster.Points = new MCScenarioPointContainer(rgn); - cluster.Points.Parent = cluster; - } - - var copy = CurrentScenarioNode?.ClusterMyPoint; - - var pos1 = GetSpawnPos(10.0f); - var ori1 = copy?.Orientation ?? Quaternion.Identity; - - var cn = new ScenarioNode(CurrentScenario);//copy a blank node - var n = sr.AddNode(cn); - - var np = new MCScenarioPoint(rgn, copy); - cluster.Points.AddMyPoint(np); - - n.ClusterMyPoint = np; - n.Cluster = cluster; - - n.SetPosition(pos1); - n.SetOrientation(ori1); - - - LoadProjectTree(); - - TrySelectScenarioNodeTreeNode(n); - CurrentScenarioNode = n; - LoadScenarioClusterTabPage(); - LoadScenarioClusterPointTabPage(); - //LoadScenarioTabPage(); - //LoadScenarioNodeTabPages(); - - - if (WorldForm != null) - { - WorldForm.UpdateScenarioGraphics(CurrentScenario, false); - } - else - { - CurrentScenario.ScenarioRegion.BuildBVH(); - CurrentScenario.ScenarioRegion.BuildVertices(); //for the graphics... - } - } - - - private void AddScenarioEntity()//TODO: add default entity point(s) to entity - { - if (CurrentScenario == null) return; - - var sr = CurrentScenario.ScenarioRegion; - if (sr == null) return; - - var rgn = CurrentScenario.CScenarioPointRegion; - if (rgn == null) return; - - var copy = CurrentScenarioNode?.Entity; - - - MCScenarioEntityOverride entity = new MCScenarioEntityOverride(rgn, copy); - List entpoints = new List(); - - if (copy != null) - { - if (copy.ScenarioPoints != null) - { - entpoints.AddRange(copy.ScenarioPoints); - } - } - - - - - - - rgn.AddEntity(entity); //add the base entity to the region. - - - var pos1 = GetSpawnPos(10.0f); - - var ncopy = new ScenarioNode(CurrentScenario);//copy an empty node to start with, to avoid creating default MyPoint - var ne = sr.AddNode(ncopy); //add the base entity's display node. - ne.Entity = entity; - - ne.SetPosition(pos1); - - if (entity.ScenarioPoints != null) - { - foreach (var cpt in entpoints) - { - //TODO: copy entity points.... - //or create some default points! - } - } - - - - - - - - - LoadProjectTree(); - - TrySelectScenarioNodeTreeNode(ne); - CurrentScenarioNode = ne; - LoadScenarioEntityTabPage(); - - - if (WorldForm != null) - { - WorldForm.UpdateScenarioGraphics(CurrentScenario, false); - } - else - { - CurrentScenario.ScenarioRegion.BuildBVH(); - CurrentScenario.ScenarioRegion.BuildVertices(); //for the graphics... - } - - } - - private void DeleteScenarioEntity() - { - if (CurrentScenario == null) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.Entity == null) return; - - var entity = CurrentScenarioNode.Entity; - - var rgn = CurrentScenario.ScenarioRegion; - if (rgn == null) return; - - var crgn = CurrentScenario.CScenarioPointRegion; - if (crgn == null) return; - - - if (MessageBox.Show("Are you sure you want to delete this scenario entity override, and all its override points?\n" + entity.ToString() + "\n\nThis operation cannot be undone. Continue?", "Confirm delete", MessageBoxButtons.YesNo) != DialogResult.Yes) - { - return; - } - - //bool delpoints = false; - //if (MessageBox.Show("Delete all Scenario Points for this entity override as well?", "Confirm delete points", MessageBoxButtons.YesNo) == DialogResult.Yes) - //{ - // delpoints = true; - //} - - - crgn.RemoveEntity(entity); - - - - - - Dictionary ndict = new Dictionary(); - if (entity.ScenarioPoints != null) - { - foreach (var point in entity.ScenarioPoints) - { - ndict[point] = 1; - } - } - List delnodes = new List(); - foreach (var node in rgn.Nodes) - { - if ((node.EntityPoint != null) && (ndict.ContainsKey(node.EntityPoint))) - { - delnodes.Add(node); - } - else if (node.Entity == entity) - { - delnodes.Add(node); - } - } - foreach (var delnode in delnodes) - { - delnode.Entity = null; - delnode.EntityPoint = null;//this entity point has been removed from the region. remove this association. - rgn.RemoveNode(delnode); - } - - - - var cn = CurrentScenarioNode; - var cs = CurrentScenario; - - LoadProjectTree(); - - - TrySelectScenarioTreeNode(cs); - - - if (WorldForm != null) - { - WorldForm.UpdateScenarioGraphics(cs, false); - WorldForm.SelectItem(null); - } - else if (cs?.ScenarioRegion != null) - { - cs.ScenarioRegion.BuildBVH(); - cs.ScenarioRegion.BuildVertices(); //for the graphics... - } - } - - private void AddScenarioEntityPoint() - { - if (CurrentScenario == null) return; - - var sr = CurrentScenario.ScenarioRegion; - if (sr == null) return; - - var rgn = CurrentScenario.CScenarioPointRegion; - if (rgn == null) return; - - var entity = CurrentScenarioNode?.Entity; - if (entity == null) return; - - var copy = CurrentScenarioNode?.EntityPoint; - - var pos1 = GetSpawnPos(10.0f); - var ori1 = copy?.Orientation ?? Quaternion.Identity; - - var cn = new ScenarioNode(CurrentScenario);//copy a blank node - var n = sr.AddNode(cn); - - var np = new MCExtensionDefSpawnPoint(rgn, copy); - entity.AddScenarioPoint(np); - - n.EntityPoint = np; - n.Entity = entity; - - n.SetPosition(pos1); - n.SetOrientation(ori1); - - - LoadProjectTree(); - - TrySelectScenarioNodeTreeNode(n); - CurrentScenarioNode = n; - LoadScenarioEntityTabPage(); - LoadScenarioEntityPointTabPage(); - //LoadScenarioTabPage(); - //LoadScenarioNodeTabPages(); - - - if (WorldForm != null) - { - WorldForm.UpdateScenarioGraphics(CurrentScenario, false); - } - else - { - CurrentScenario.ScenarioRegion.BuildBVH(); - CurrentScenario.ScenarioRegion.BuildVertices(); //for the graphics... - } - } - - - - - - - - - private void ImportScenarioChain() - { - var paths = CurrentScenario?.CScenarioPointRegion?.Paths; - if (paths == null) return; - var rgn = CurrentScenario.ScenarioRegion; - if (rgn == null) return; - - TextInputForm f = new TextInputForm(); - f.TitleText = "Import scenario chain points"; - f.PromptText = "Input chain points in CSV (or TSV) format. Direction is in radians. NavSpeed is from 0 to 15. NavMode can be either Direct, NavMesh, or Roads. ScenarioType is the name of the scenario type to use."; - f.MainText = "X, Y, Z, Direction, NavSpeed, NavMode, ScenarioType, ModelSet, Flags"; - if (f.ShowDialog() == DialogResult.Cancel) return; - - var stypes = Scenarios.ScenarioTypes; //these are loaded by Scenarios.Init - ScenarioType defaulttype = null; - if (stypes != null) - { - defaulttype = stypes.GetScenarioType(1194480618); //"drive"; - } - - AmbientModelSet defaultmodelset = null; - uint defaultflags = 0; - - ScenarioNode thisnode = null; - ScenarioNode lastnode = null; - MCScenarioChainingEdge lastedge = null; - - var str = f.MainText; - var lines = str.Split('\n'); - - - if (lines.Length < 2) - { - return;//need at least 2 lines (1 point) to work with... - } - - - - MCScenarioChain chain = new MCScenarioChain(); - - paths.AddChain(chain); - - - for (int i = 0; i < lines.Length; i++) - { - var line = lines[i]; - var delim = line.Contains(",") ? "," : " "; - var vals = line.Split(new[] { delim }, StringSplitOptions.RemoveEmptyEntries); - if (vals.Length < 3) continue; - if (vals[0].StartsWith("X")) continue; - Vector3 pos = Vector3.Zero; - float dir = 0; - var action = Unk_3609807418.Move; - var navMode = Unk_3971773454.Direct; - var navSpeed = Unk_941086046.Unk_00_3279574318; - var stype = defaulttype; - var modelset = defaultmodelset; - var flags = defaultflags; - var ok = true; - ok = ok && FloatUtil.TryParse(vals[0].Trim(), out pos.X); - ok = ok && FloatUtil.TryParse(vals[1].Trim(), out pos.Y); - ok = ok && FloatUtil.TryParse(vals[2].Trim(), out pos.Z); - if (vals.Length > 3) - { - ok = ok && FloatUtil.TryParse(vals[3].Trim(), out dir); - while (dir > Math.PI) dir -= 2.0f * (float)Math.PI; - while (dir < -Math.PI) dir += 2.0f * (float)Math.PI; - } - if (vals.Length > 4) - { - byte nsb = 0; - byte.TryParse(vals[4].Trim(), out nsb); - if (nsb > 15) nsb = 15; - navSpeed = (Unk_941086046)nsb; - } - if (vals.Length > 5) - { - switch (vals[5].Trim()) - { - case "Direct": navMode = Unk_3971773454.Direct; break; - case "NavMesh": navMode = Unk_3971773454.NavMesh; break; - case "Roads": navMode = Unk_3971773454.Roads; break; - } - } - if (vals.Length > 6) - { - var sthash = JenkHash.GenHash(vals[6].Trim().ToLowerInvariant()); - stype = stypes?.GetScenarioType(sthash) ?? defaulttype; - } - if (vals.Length > 7) - { - var mshash = JenkHash.GenHash(vals[7].Trim().ToLowerInvariant()); - modelset = stypes?.GetPedModelSet(mshash) ?? null; - if (modelset == null) modelset = stypes?.GetVehicleModelSet(mshash) ?? null; - } - if (vals.Length > 8) - { - if (!uint.TryParse(vals[8].Trim(), out flags)) flags = defaultflags; - } - - if (!ok) continue; - - - - thisnode = rgn.AddNode(); - - thisnode.MyPoint.Direction = dir; - thisnode.MyPoint.Type = stype; - thisnode.MyPoint.ModelSet = modelset; - thisnode.MyPoint.Flags = (Unk_700327466)flags; - - thisnode.ChainingNode = new MCScenarioChainingNode(); - thisnode.ChainingNode.ScenarioNode = thisnode; - thisnode.ChainingNode.Chain = chain; - thisnode.ChainingNode.Type = stype; - thisnode.ChainingNode.TypeHash = stype?.NameHash ?? 0; - thisnode.ChainingNode.NotLast = (i < (lines.Length - 1)); - thisnode.ChainingNode.NotFirst = (lastnode != null); - - thisnode.SetPosition(pos); - thisnode.Orientation = thisnode.MyPoint.Orientation; - - paths.AddNode(thisnode.ChainingNode); - - - if (lastnode != null) - { - var edge = new MCScenarioChainingEdge(); - - edge.NodeFrom = lastnode.ChainingNode; - edge.NodeTo = thisnode.ChainingNode; - edge.NodeIndexFrom = (ushort)lastnode.ChainingNode.NodeIndex; - edge.NodeIndexTo = (ushort)thisnode.ChainingNode.NodeIndex; - - edge.Action = action; - edge.NavMode = navMode; - edge.NavSpeed = navSpeed; - - paths.AddEdge(edge); - chain.AddEdge(edge); - - lastedge = edge; - } - - - lastnode = thisnode; - } - - - - - - - LoadProjectTree(); - - if (lastnode != null) - { - TrySelectScenarioNodeTreeNode(lastnode); - CurrentScenarioNode = lastnode; - } - - CurrentScenarioChainEdge = lastedge; - LoadScenarioChainTabPage(); - //LoadScenarioTabPage(); - //LoadScenarioNodeTabPages(); - - - if (WorldForm != null) - { - WorldForm.UpdateScenarioGraphics(CurrentScenario, false); - } - else - { - CurrentScenario.ScenarioRegion.BuildBVH(); - CurrentScenario.ScenarioRegion.BuildVertices(); //for the graphics... - } - - - } - - - - - - - - - - - - - - - private void ImportMenyooXml() - { - if (CurrentProjectFile == null) - { - NewProject(); - } - - var xmlpath = ShowOpenDialog("XML Files|*.xml", string.Empty); - - if (string.IsNullOrEmpty(xmlpath)) return; - - - var xmlstr = string.Empty; - try - { - xmlstr = File.ReadAllText(xmlpath); - } - catch (Exception ex) - { - MessageBox.Show("Error loading file!\n" + ex.ToString()); - } - - if (string.IsNullOrEmpty(xmlstr)) return; - - var finf = new FileInfo(xmlpath); - - MenyooXml menyooXml = new MenyooXml(); - menyooXml.FilePath = xmlpath; - menyooXml.FileName = finf.Name; - menyooXml.Name = Path.GetFileNameWithoutExtension(finf.Name); - menyooXml.Init(xmlstr); - - - - string fname = menyooXml.Name + ".ymap"; - lock (ymapsyncroot) - { - YmapFile ymap = CurrentProjectFile.AddYmapFile(fname); - if (ymap != null) - { - ymap.Loaded = true; - ymap.HasChanged = true; //new ymap, flag as not saved - ymap._CMapData.contentFlags = 65; //stream flags value - } - CurrentYmapFile = ymap; - } - - CurrentProjectFile.HasChanged = true; - - - int pedcount = 0; - int carcount = 0; - int entcount = 0; - int unkcount = 0; - - foreach (var placement in menyooXml.Placements) - { - if (placement.Type == 1) - { - pedcount++; - } - else if (placement.Type == 2) - { - CCarGen ccg = new CCarGen(); - var rotq = Quaternion.Invert(new Quaternion(placement.Rotation)); - Vector3 cdir = rotq.Multiply(new Vector3(0, 5, 0)); - ccg.flags = 3680; - ccg.orientX = cdir.X; - ccg.orientY = cdir.Y; - ccg.perpendicularLength = 2.6f; - ccg.position = placement.Position; - ccg.carModel = placement.ModelHash; - - YmapCarGen cg = new YmapCarGen(CurrentYmapFile, ccg); - - if (WorldForm != null) - { - lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... - { - CurrentYmapFile.AddCarGen(cg); - } - } - else - { - CurrentYmapFile.AddCarGen(cg); - } - - carcount++; - } - else if (placement.Type == 3) //standard entity - { - CEntityDef cent = new CEntityDef(); - cent.archetypeName = placement.ModelHash; - cent.position = placement.Position; - cent.rotation = placement.Rotation; - cent.scaleXY = 1.0f; - cent.scaleZ = 1.0f; - cent.flags = placement.Dynamic ? 32u : 0;// 1572872; //? - cent.parentIndex = -1; - cent.lodDist = placement.LodDistance; - cent.lodLevel = Unk_1264241711.LODTYPES_DEPTH_ORPHANHD; - cent.priorityLevel = Unk_648413703.PRI_REQUIRED; - cent.ambientOcclusionMultiplier = 255; - cent.artificialAmbientOcclusion = 255; - - YmapEntityDef ent = new YmapEntityDef(CurrentYmapFile, 0, ref cent); - - ent.SetArchetype(GameFileCache.GetArchetype(cent.archetypeName)); - - if (WorldForm != null) - { - lock (WorldForm.RenderSyncRoot) //don't try to do this while rendering... - { - CurrentYmapFile.AddEntity(ent); - } - } - else - { - CurrentYmapFile.AddEntity(ent); - } - - entcount++; - } - else - { - unkcount++; - } - } - - - LoadProjectTree(); - - - - CalcYmapFlags(); - - CalcYmapExtents(); - - - MessageBox.Show(entcount.ToString() + " entities imported. \n" + carcount.ToString() + " car generators imported. \n" + pedcount.ToString() + " peds ignored. \n" + unkcount.ToString() + " others ignored."); - - } - - - - - - - - - - - - - - - - - public void GetVisibleYmaps(Camera camera, Dictionary ymaps) - { - if (hidegtavmap) - { - ymaps.Clear(); //remove all the gtav ymaps. - } - - if (renderentities && (CurrentProjectFile != null)) - { - lock (ymapsyncroot) - { - for (int i = 0; i < CurrentProjectFile.YmapFiles.Count; i++) - { - var ymap = CurrentProjectFile.YmapFiles[i]; - if (ymap.Loaded) - { - ymaps[ymap._CMapData.name] = ymap; - } - } - } - } - - } - - public void GetVisibleCollisionMeshes(Camera camera, List items) - { - //eventually will need to change this to use a list of Ybn's... - if (hidegtavmap) - { - items.Clear(); - } - } - - public void GetVisibleWaterQuads(Camera camera, List quads) - { - if (hidegtavmap) - { - quads.Clear(); - } - - } - - public void GetVisibleYnds(Camera camera, List ynds) - { - if (hidegtavmap) - { - ynds.Clear(); - } - - if (CurrentProjectFile == null) return; - - lock (yndsyncroot) - { - visibleynds.Clear(); - for (int i = 0; i < ynds.Count; i++) - { - var ynd = ynds[i]; - visibleynds[ynd.AreaID] = ynd; - } - - for (int i = 0; i < CurrentProjectFile.YndFiles.Count; i++) - { - var ynd = CurrentProjectFile.YndFiles[i]; - if (ynd.Loaded) - { - visibleynds[ynd.AreaID] = ynd; - } - } - - ynds.Clear(); - foreach (var ynd in visibleynds.Values) - { - ynds.Add(ynd); - } - } - - } - - public void GetVisibleYnvs(Camera camera, List ynvs) - { - if (hidegtavmap) - { - ynvs.Clear(); - } - - if (CurrentProjectFile == null) return; - - lock (ynvsyncroot) - { - visibleynvs.Clear(); - for (int i = 0; i < ynvs.Count; i++) - { - var ynv = ynvs[i]; - visibleynvs[ynv.AreaID] = ynv; - } - - for (int i = 0; i < CurrentProjectFile.YnvFiles.Count; i++) - { - var ynv = CurrentProjectFile.YnvFiles[i]; - if (ynv.Loaded) - { - visibleynvs[ynv.AreaID] = ynv; - } - } - - ynvs.Clear(); - foreach (var ynv in visibleynvs.Values) - { - ynvs.Add(ynv); - } - } - - } - - public void GetVisibleTrainTracks(Camera camera, List tracks) - { - if (hidegtavmap) - { - tracks.Clear(); - } - - - if (CurrentProjectFile == null) return; - - lock (trainsyncroot) - { - visibletrains.Clear(); - for (int i = 0; i < tracks.Count; i++) - { - var track = tracks[i]; - visibletrains[track.Name] = track; - } - - for (int i = 0; i < CurrentProjectFile.TrainsFiles.Count; i++) - { - var track = CurrentProjectFile.TrainsFiles[i]; - if (track.Loaded) - { - visibletrains[track.Name] = track; - } - } - - tracks.Clear(); - foreach (var track in visibletrains.Values) - { - tracks.Add(track); - } - } - - } - - public void GetVisibleScenarios(Camera camera, List ymts) - { - if (hidegtavmap) - { - ymts.Clear(); - } - - - if (CurrentProjectFile == null) return; - - lock (scenariosyncroot) - { - visiblescenarios.Clear(); - for (int i = 0; i < ymts.Count; i++) - { - var ymt = ymts[i]; - visiblescenarios[ymt.Name] = ymt; - } - - for (int i = 0; i < CurrentProjectFile.ScenarioFiles.Count; i++) - { - var scenario = CurrentProjectFile.ScenarioFiles[i]; - if (scenario.Loaded) - { - visiblescenarios[scenario.Name] = scenario; - } - } - - ymts.Clear(); - foreach (var ymt in visiblescenarios.Values) - { - ymts.Add(ymt); - } - } - - } - - - - public void OnWorldSelectionChanged(MapSelection sel) - { - try - { - if (InvokeRequired) - { - BeginInvoke(new Action(() => { OnWorldSelectionChanged(sel); })); - } - else - { - var ent = sel.EntityDef; - var cargen = sel.CarGenerator; - var pathnode = sel.PathNode; - var pathlink = sel.PathLink; - var navpoly = sel.NavPoly; - var trainnode = sel.TrainTrackNode; - var scenariond = sel.ScenarioNode; - YmapFile ymap = ent?.Ymap; - YndFile ynd = pathnode?.Ynd; - YnvFile ynv = navpoly?.Ynv; - TrainTrack traintrack = trainnode?.Track; - YmtFile scenario = scenariond?.Ymt; - - if (cargen != null) - { - ymap = cargen.Ymap; - } - - if (YmapExistsInProject(ymap)) - { - if (ent != CurrentEntity) - { - TrySelectEntityTreeNode(ent); - } - if (cargen != CurrentCarGen) - { - TrySelectCarGenTreeNode(cargen); - } - } - else if (YndExistsInProject(ynd)) - { - if (pathnode != CurrentPathNode) - { - TrySelectPathNodeTreeNode(pathnode); - } - } - else if (YnvExistsInProject(ynv)) - { - if (navpoly != CurrentNavPoly) - { - TrySelectNavPolyTreeNode(navpoly); - } - } - else if (TrainTrackExistsInProject(traintrack)) - { - if (trainnode != CurrentTrainNode) - { - TrySelectTrainNodeTreeNode(trainnode); - } - } - else if (ScenarioExistsInProject(scenario)) - { - if ((scenariond != null) && (scenariond != CurrentScenarioNode)) - { - TrySelectScenarioNodeTreeNode(scenariond); - } - } - else - { - ProjectTreeView.SelectedNode = null; - if (ymap != null) - { - MainTabControl.SelectedTab = YmapTabPage; - } - else if (ynd != null) - { - MainTabControl.SelectedTab = YndTabPage; - } - else if (ynv != null) - { - MainTabControl.SelectedTab = YnvTabPage; - } - else if (traintrack != null) - { - MainTabControl.SelectedTab = TrainsTabPage; - } - else if (scenario != null) - { - MainTabControl.SelectedTab = ScenarioTabPage; - } - if (ent != null) - { - YmapTabControl.SelectedTab = YmapEntityTabPage; - } - else if (cargen != null) - { - YmapTabControl.SelectedTab = YmapCarGenTabPage; - } - if (pathnode != null) - { - YndTabControl.SelectedTab = YndNodeTabPage; - } - if (trainnode != null) - { - TrainsTabControl.SelectedTab = TrainNodeTabPage; - } - if (scenariond != null) - { - SelectScenarioNodeTabPages(scenariond); - } - } - - CurrentYmapFile = ymap; - CurrentEntity = ent; - CurrentCarGen = cargen; - CurrentYndFile = ynd; - CurrentPathNode = pathnode; - CurrentPathLink = pathlink; - CurrentYnvFile = ynv; - CurrentNavPoly = navpoly; - CurrentTrainTrack = traintrack; - CurrentTrainNode = trainnode; - CurrentScenario = scenario; - CurrentScenarioNode = scenariond; - RefreshUI(); - } - } - catch { } - } - - public void OnWorldSelectionModified(MapSelection sel, List items) - { - if (sel.MultipleSelection) - { - } - else if (sel.EntityDef != null) - { - OnWorldEntityModified(sel.EntityDef); - } - else if (sel.CarGenerator != null) - { - OnWorldCarGenModified(sel.CarGenerator); - } - else if (sel.PathNode != null) - { - OnWorldPathNodeModified(sel.PathNode, sel.PathLink); - } - else if (sel.NavPoly != null) - { - OnWorldNavPolyModified(sel.NavPoly); - } - else if (sel.TrainTrackNode != null) - { - OnWorldTrainNodeModified(sel.TrainTrackNode); - } - else if (sel.ScenarioNode != null) - { - OnWorldScenarioNodeModified(sel.ScenarioNode); - } - - } - - private void OnWorldEntityModified(YmapEntityDef ent) - { - try - { - if (InvokeRequired) - { - BeginInvoke(new Action(() => { OnWorldEntityModified(ent); })); - } - else - { - if ((ent.Ymap == null) || (ent.MloParent != null)) - { - return;//TODO: properly handle interior entities! - } - - if (CurrentProjectFile == null) - { - NewProject(); - } - - if (!YmapExistsInProject(ent.Ymap)) - { - ent.Ymap.HasChanged = true; - AddYmapToProject(ent.Ymap); - TrySelectEntityTreeNode(ent); - } - - if (ent != CurrentEntity) - { - CurrentEntity = ent; - TrySelectEntityTreeNode(ent); - } - - if (ent == CurrentEntity) - { - LoadEntityTabPage(); - - if (ent.Ymap != null) - { - SetYmapHasChanged(true); - } - } - } - } - catch { } - } - - private void OnWorldCarGenModified(YmapCarGen cargen) - { - try - { - if (InvokeRequired) - { - BeginInvoke(new Action(() => { OnWorldCarGenModified(cargen); })); - } - else - { - if (cargen?.Ymap == null) return; - - if (CurrentProjectFile == null) - { - NewProject(); - } - - if (!YmapExistsInProject(cargen.Ymap)) - { - cargen.Ymap.HasChanged = true; - AddYmapToProject(cargen.Ymap); - TrySelectCarGenTreeNode(cargen); - } - - if (cargen != CurrentCarGen) - { - CurrentCarGen = cargen; - TrySelectCarGenTreeNode(cargen); - } - - if (cargen == CurrentCarGen) - { - LoadCarGenTabPage(); - - UpdateCarGenTreeNode(cargen); - - if (cargen.Ymap != null) - { - SetYmapHasChanged(true); - } - } - - } - } - catch { } - } - - private void OnWorldPathNodeModified(YndNode node, YndLink link) - { - try - { - if (InvokeRequired) - { - BeginInvoke(new Action(() => { OnWorldPathNodeModified(node, link); })); - } - else - { - if (node?.Ynd == null) return; - - if (CurrentProjectFile == null) - { - NewProject(); - } - - if (!YndExistsInProject(node.Ynd)) - { - node.Ynd.HasChanged = true; - AddYndToProject(node.Ynd); - TrySelectPathNodeTreeNode(node); - } - - if (node != CurrentPathNode) - { - CurrentPathNode = node; - TrySelectPathNodeTreeNode(node); - } - - //if (link != CurrentPathLink) - //{ - // CurrentPathLink = link; - // LoadPathNodeLinkPage(); - //} - - if (node == CurrentPathNode) - { - //LoadYndTabPage(); - LoadPathNodeTabPage(); - - //UpdatePathNodeTreeNode(node); - - if (node.Ynd != null) - { - SetYndHasChanged(true); - } - } - - } - } - catch { } - } - - private void OnWorldNavPolyModified(YnvPoly poly) - { - try - { - if (InvokeRequired) - { - BeginInvoke(new Action(() => { OnWorldNavPolyModified(poly); })); - } - else - { - if (poly?.Ynv == null) return; - - if (CurrentProjectFile == null) - { - NewProject(); - } - - if (!YnvExistsInProject(poly.Ynv)) - { - poly.Ynv.HasChanged = true; - AddYnvToProject(poly.Ynv); - TrySelectNavPolyTreeNode(poly); - } - - if (poly != CurrentNavPoly) - { - CurrentNavPoly = poly; - TrySelectNavPolyTreeNode(poly); - } - - if (poly == CurrentNavPoly) - { - LoadYnvTabPage(); - - //UpdateNavPolyTreeNode(poly); - - if (poly.Ynv != null) - { - SetYnvHasChanged(true); - } - } - - } - } - catch { } - } - - private void OnWorldTrainNodeModified(TrainTrackNode node) - { - try - { - if (InvokeRequired) - { - BeginInvoke(new Action(() => { OnWorldTrainNodeModified(node); })); - } - else - { - if (node?.Track == null) return; - - if (CurrentProjectFile == null) - { - NewProject(); - } - - if (!TrainTrackExistsInProject(node.Track)) - { - node.Track.HasChanged = true; - AddTrainTrackToProject(node.Track); - TrySelectTrainNodeTreeNode(node); - } - - if (node != CurrentTrainNode) - { - CurrentTrainNode = node; - TrySelectTrainNodeTreeNode(node); - } - - if (node == CurrentTrainNode) - { - LoadTrainNodeTabPage(); - - if (node.Track != null) - { - SetTrainTrackHasChanged(true); - } - } - } - } - catch { } - } - - private void OnWorldScenarioNodeModified(ScenarioNode node) - { - try - { - if (InvokeRequired) - { - BeginInvoke(new Action(() => { OnWorldScenarioNodeModified(node); })); - } - else - { - if (node?.Ymt == null) return; - - if (CurrentProjectFile == null) - { - NewProject(); - } - - if (!ScenarioExistsInProject(node.Ymt)) - { - node.Ymt.HasChanged = true; - AddScenarioToProject(node.Ymt); - TrySelectScenarioNodeTreeNode(node); - } - - if (node != CurrentScenarioNode) - { - CurrentScenarioNode = node; - TrySelectScenarioNodeTreeNode(node); - } - - if (node == CurrentScenarioNode) - { - LoadScenarioTabPage(); - LoadScenarioNodeTabPages(); - - if (node?.Ymt != null) - { - SetScenarioHasChanged(true); - } - } - } - } - catch { } - } - - - - - - - - - - - private bool IsBitSet(uint value, int bit) - { - return (((value >> bit) & 1) > 0); - } - private uint SetBit(uint value, int bit) - { - return (value | (1u << bit)); - } - private uint ClearBit(uint value, int bit) - { - return (value & (~(1u << bit))); - } - private uint UpdateBit(uint value, int bit, bool flag) - { - if (flag) return SetBit(value, bit); - else return ClearBit(value, bit); - } - - - private string ShowOpenDialog(string filter, string filename) - { - OpenFileDialog.FileName = filename; - OpenFileDialog.Filter = filter; - OpenFileDialog.Multiselect = false; - if (OpenFileDialog.ShowDialog(this) != DialogResult.OK) - { - return string.Empty; - } - return OpenFileDialog.FileName; - } - private string[] ShowOpenDialogMulti(string filter, string filename) - { - OpenFileDialog.FileName = filename; - OpenFileDialog.Filter = filter; - OpenFileDialog.Multiselect = true; - if (OpenFileDialog.ShowDialog(this) != DialogResult.OK) - { - return null; - } - return OpenFileDialog.FileNames; - } - - private string ShowSaveDialog(string filter, string filename) - { - SaveFileDialog.FileName = filename; - SaveFileDialog.Filter = filter; - if (SaveFileDialog.ShowDialog(this) != DialogResult.OK) - { - return string.Empty; - } - return SaveFileDialog.FileName; - } - - - - - - - - private 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)) - { - return ymap.RpfFileEntry; - } - } - } - - if ((GameFileCache != null) && (GameFileCache.IsInited)) - { - return GameFileCache.GetYmapEntry(hash); - } - - return null; - } - - private bool YmapExistsInProject(YmapFile ymap) - { - if (ymap == null) return false; - if (CurrentProjectFile == null) return false; - return CurrentProjectFile.ContainsYmap(ymap); - } - private bool YndExistsInProject(YndFile ynd) - { - if (ynd == null) return false; - if (CurrentProjectFile == null) return false; - return CurrentProjectFile.ContainsYnd(ynd); - } - private bool YnvExistsInProject(YnvFile ynv) - { - if (ynv == null) return false; - if (CurrentProjectFile == null) return false; - return CurrentProjectFile.ContainsYnv(ynv); - } - private bool TrainTrackExistsInProject(TrainTrack track) - { - if (track == null) return false; - if (CurrentProjectFile == null) return false; - return CurrentProjectFile.ContainsTrainTrack(track); - } - private bool ScenarioExistsInProject(YmtFile ymt) - { - if (ymt == null) return false; - if (CurrentProjectFile == null) return false; - return CurrentProjectFile.ContainsScenario(ymt); - } - - private TreeNode GetChildTreeNode(TreeNode node, string name) - { - if (node == null) return null; - var nodes = node.Nodes.Find(name, false); - if ((nodes == null) || (nodes.Length != 1)) return null; - return nodes[0]; - } - private TreeNode FindYmapTreeNode(YmapFile ymap) - { - if (ProjectTreeView.Nodes.Count <= 0) return null; - var projnode = ProjectTreeView.Nodes[0]; - var ymapsnode = GetChildTreeNode(projnode, "Ymap"); - if (ymapsnode == null) return null; - for (int i = 0; i < ymapsnode.Nodes.Count; i++) - { - var ymapnode = ymapsnode.Nodes[i]; - if (ymapnode.Tag == ymap) return ymapnode; - } - return null; - } - private TreeNode FindEntityTreeNode(YmapEntityDef ent) - { - if (ent == null) return null; - TreeNode ymapnode = FindYmapTreeNode(ent.Ymap); - if (ymapnode == null) return null; - var entsnode = GetChildTreeNode(ymapnode, "Entities"); - 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; - } - return null; - } - private TreeNode FindCarGenTreeNode(YmapCarGen cargen) - { - if (cargen == null) return null; - TreeNode ymapnode = FindYmapTreeNode(cargen.Ymap); - if (ymapnode == null) return null; - var cargensnode = GetChildTreeNode(ymapnode, "CarGens"); - if (cargensnode == null) return null; - for (int i = 0; i < cargensnode.Nodes.Count; i++) - { - TreeNode cargennode = cargensnode.Nodes[i]; - if (cargennode.Tag == cargen) return cargennode; - } - return null; - } - private TreeNode FindYndTreeNode(YndFile ynd) - { - if (ProjectTreeView.Nodes.Count <= 0) return null; - var projnode = ProjectTreeView.Nodes[0]; - var yndsnode = GetChildTreeNode(projnode, "Ynd"); - 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; - } - return null; - } - private TreeNode FindPathNodeTreeNode(YndNode n) - { - if (n == null) return null; - TreeNode yndnode = FindYndTreeNode(n.Ynd); - var nodesnode = GetChildTreeNode(yndnode, "Nodes"); - 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; - } - return null; - } - private TreeNode FindYnvTreeNode(YnvFile ynv) - { - if (ProjectTreeView.Nodes.Count <= 0) return null; - var projnode = ProjectTreeView.Nodes[0]; - var ynvsnode = GetChildTreeNode(projnode, "Ynv"); - 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; - } - return null; - } - private TreeNode FindNavPolyTreeNode(YnvPoly p) - { - if (p == null) return null; - TreeNode ynvnode = FindYnvTreeNode(p.Ynv); - var polysnode = GetChildTreeNode(ynvnode, "Polygons"); - if (polysnode == null) return null; - for (int i = 0; i < polysnode.Nodes.Count; i++) - { - TreeNode pnode = polysnode.Nodes[i]; - if (pnode.Tag == p) return pnode; - } - return null; - } - private TreeNode FindTrainTrackTreeNode(TrainTrack track) - { - if (ProjectTreeView.Nodes.Count <= 0) return null; - var projnode = ProjectTreeView.Nodes[0]; - var trainsnode = GetChildTreeNode(projnode, "Trains"); - if (trainsnode == null) return null; - for (int i = 0; i < trainsnode.Nodes.Count; i++) - { - var trainnode = trainsnode.Nodes[i]; - if (trainnode.Tag == track) return trainnode; - } - return null; - } - private TreeNode FindTrainNodeTreeNode(TrainTrackNode n) - { - if (n == null) return null; - TreeNode tracknode = FindTrainTrackTreeNode(n.Track); - var nodesnode = GetChildTreeNode(tracknode, "Nodes"); - 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; - } - return null; - } - private TreeNode FindScenarioTreeNode(YmtFile ymt) - { - if (ProjectTreeView.Nodes.Count <= 0) return null; - var projnode = ProjectTreeView.Nodes[0]; - var scenariosnode = GetChildTreeNode(projnode, "Scenarios"); - if (scenariosnode == null) return null; - for (int i = 0; i < scenariosnode.Nodes.Count; i++) - { - var ymtnode = scenariosnode.Nodes[i]; - if (ymtnode.Tag == ymt) return ymtnode; - } - return null; - } - private TreeNode FindScenarioNodeTreeNode(ScenarioNode p) - { - if (p == null) return null; - TreeNode ymtnode = FindScenarioTreeNode(p.Ymt); - var pointsnode = GetChildTreeNode(ymtnode, "Points"); - if (pointsnode == null) return null; - for (int i = 0; i < pointsnode.Nodes.Count; i++) - { - TreeNode pnode = pointsnode.Nodes[i]; - if (pnode.Tag == p) return pnode; - } - return null; - } - - - private void TrySelectEntityTreeNode(YmapEntityDef ent) - { - TreeNode entnode = FindEntityTreeNode(ent); - if (entnode != null) - { - ProjectTreeView.SelectedNode = entnode; - } - } - - private void TrySelectCarGenTreeNode(YmapCarGen cargen) - { - TreeNode cargennode = FindCarGenTreeNode(cargen); - if (cargennode != null) - { - ProjectTreeView.SelectedNode = cargennode; - } - } - private void UpdateCarGenTreeNode(YmapCarGen cargen) - { - var tn = FindCarGenTreeNode(cargen); - if (tn != null) - { - tn.Text = cargen.ToString(); - } - } - - private void TrySelectPathNodeTreeNode(YndNode node) - { - TreeNode tnode = FindPathNodeTreeNode(node); - if (tnode == null) - { - tnode = FindYndTreeNode(node?.Ynd); - } - if (tnode != null) - { - ProjectTreeView.SelectedNode = tnode; - } - } - private void UpdatePathNodeTreeNode(YndNode node) - { - var tn = FindPathNodeTreeNode(node); - if (tn != null) - { - tn.Text = node._RawData.ToString(); - } - } - - private void TrySelectNavPolyTreeNode(YnvPoly poly) - { - TreeNode tnode = FindNavPolyTreeNode(poly); - if (tnode == null) - { - tnode = FindYnvTreeNode(poly?.Ynv); - } - if (tnode != null) - { - ProjectTreeView.SelectedNode = tnode; - } - } - private void UpdateNavPolyTreeNode(YnvPoly poly) - { - var tn = FindNavPolyTreeNode(poly); - if (tn != null) - { - tn.Text = poly._RawData.ToString(); - } - } - - private void TrySelectTrainNodeTreeNode(TrainTrackNode node) - { - TreeNode tnode = FindTrainNodeTreeNode(node); - if (tnode == null) - { - tnode = FindTrainTrackTreeNode(node?.Track); - } - if (tnode != null) - { - ProjectTreeView.SelectedNode = tnode; - } - } - private void UpdateTrainNodeTreeNode(TrainTrackNode node) - { - var tn = FindTrainNodeTreeNode(node); - if (tn != null) - { - tn.Text = node.ToString(); - } - } - - private void TrySelectScenarioTreeNode(YmtFile scenario) - { - TreeNode tnode = FindScenarioTreeNode(scenario); - if (tnode != null) - { - ProjectTreeView.SelectedNode = tnode; - } - } - private void TrySelectScenarioNodeTreeNode(ScenarioNode node) - { - TreeNode tnode = FindScenarioNodeTreeNode(node); - if (tnode == null) - { - tnode = FindScenarioTreeNode(node?.Ymt); - } - if (tnode != null) - { - ProjectTreeView.SelectedNode = tnode; - } - } - private void UpdateScenarioNodeTreeNode(ScenarioNode node) - { - var tn = FindScenarioNodeTreeNode(node); - if (tn != null) - { - tn.Text = node.MedTypeName + ": " + node.StringText; - } - } - - - - - private void ProjectForm_FormClosing(object sender, FormClosingEventArgs e) - { - CloseProject(); - } - - private void ProjectForm_FormClosed(object sender, FormClosedEventArgs e) - { - if (WorldForm != null) - { - WorldForm.OnProjectFormClosed(); - } - } - - - private void FileNewProjectMenu_Click(object sender, EventArgs e) - { - NewProject(); - } - - private void FileNewYmapMenu_Click(object sender, EventArgs e) - { - NewYmap(); - } - - private void FileNewYndMenu_Click(object sender, EventArgs e) - { - NewYnd(); - } - - private void FileNewYnvMenu_Click(object sender, EventArgs e) - { - NewYnv(); - } - - private void FileNewTrainsMenu_Click(object sender, EventArgs e) - { - NewTrainTrack(); - } - - private void FileNewScenarioMenu_Click(object sender, EventArgs e) - { - NewScenario(); - } - - private void FileOpenProjectMenu_Click(object sender, EventArgs e) - { - if (CurrentProjectFile != null) - { - ////unload current project first? - //if (MessageBox.Show("Close the current project and open an existing one?", "Confirm close project", MessageBoxButtons.YesNo) != DialogResult.Yes) - //{ - // return; - //} - CloseProject(); - } - - OpenProject(); - } - - private void FileOpenYmapMenu_Click(object sender, EventArgs e) - { - OpenYmap(); - } - - private void FileOpenYndMenu_Click(object sender, EventArgs e) - { - OpenYnd(); - } - - private void FileOpenYnvMenu_Click(object sender, EventArgs e) - { - OpenYnv(); - } - - private void FileOpenTrainsMenu_Click(object sender, EventArgs e) - { - OpenTrainTrack(); - } - - private void FileOpenScenarioMenu_Click(object sender, EventArgs e) - { - OpenScenario(); - } - - private void FileCloseProjectMenu_Click(object sender, EventArgs e) - { - CloseProject(); - } - - private void FileSaveProjectMenu_Click(object sender, EventArgs e) - { - SaveProject(false); - } - - private void FileSaveProjectAsMenu_Click(object sender, EventArgs e) - { - SaveProject(true); - } - - private void FileSaveItemMenu_Click(object sender, EventArgs e) - { - SaveCurrentItem(false); - } - - private void FileSaveItemAsMenu_Click(object sender, EventArgs e) - { - SaveCurrentItem(true); - } - - private void YmapNewEntityMenu_Click(object sender, EventArgs e) - { - NewEntity(); - } - - private void YmapNewCarGenMenu_Click(object sender, EventArgs e) - { - NewCarGen(); - } - - private void YmapAddToProjectMenu_Click(object sender, EventArgs e) - { - AddYmapToProject(CurrentYmapFile); - } - - private void YmapRemoveFromProjectMenu_Click(object sender, EventArgs e) - { - RemoveYmapFromProject(); - } - - private void YndNewNodeMenu_Click(object sender, EventArgs e) - { - NewPathNode(); - } - - private void YndAddToProjectMenu_Click(object sender, EventArgs e) - { - AddYndToProject(CurrentYndFile); - } - - private void YndRemoveFromProjectMenu_Click(object sender, EventArgs e) - { - RemoveYndFromProject(); - } - - private void YnvNewPolygonMenu_Click(object sender, EventArgs e) - { - NewNavPoly(); - } - - private void YnvAddToProjectMenu_Click(object sender, EventArgs e) - { - //AddYnvToProject(CurrentYnvFile); - } - - private void YnvRemoveFromProjectMenu_Click(object sender, EventArgs e) - { - RemoveYnvFromProject(); - } - - private void TrainsNewNodeMenu_Click(object sender, EventArgs e) - { - NewTrainNode(); - } - - private void TrainsAddToProjectMenu_Click(object sender, EventArgs e) - { - AddTrainTrackToProject(CurrentTrainTrack); - } - - private void TrainsRemoveFromProjectMenu_Click(object sender, EventArgs e) - { - RemoveTrainTrackFromProject(); - } - - private void ScenarioNewPointMenu_Click(object sender, EventArgs e) - { - CurrentScenarioNode = null; - NewScenarioNode(); - } - - private void ScenarioNewPointFromSelectedMenu_Click(object sender, EventArgs e) - { - NewScenarioNode(); - } - - private void ScenarioNewEntityOverrideMenu_Click(object sender, EventArgs e) - { - AddScenarioEntity(); - } - - private void ScenarioNewChainMenu_Click(object sender, EventArgs e) - { - AddScenarioChain(); - } - - private void ScenarioNewClusterMenu_Click(object sender, EventArgs e) - { - AddScenarioCluster(); - } - - private void ScenarioImportChainMenu_Click(object sender, EventArgs e) - { - ImportScenarioChain(); - } - - private void ScenarioAddToProjectMenu_Click(object sender, EventArgs e) - { - AddScenarioToProject(CurrentScenario); - } - - private void ScenarioRemoveFromProjectMenu_Click(object sender, EventArgs e) - { - RemoveScenarioFromProject(); - } - - private void ToolsImportMenyooXmlMenu_Click(object sender, EventArgs e) - { - ImportMenyooXml(); - } - - private void OptionsHideGTAVMapMenu_Click(object sender, EventArgs e) - { - ProjectHideMapCheckBox.Checked = !hidegtavmap; - } - - - - - - - - private void ProjectNameTextBox_TextChanged(object sender, EventArgs e) - { - if (CurrentProjectFile != null) - { - if (CurrentProjectFile.Name != ProjectNameTextBox.Text) - { - CurrentProjectFile.Name = ProjectNameTextBox.Text; - SetProjectHasChanged(true); - } - } - } - - private void ProjectTreeView_AfterSelect(object sender, TreeViewEventArgs e) - { - YmapFile ymap = null; - YmapEntityDef yent = null; - YmapCarGen ycgen = null; - YndFile ynd = null; - YndNode ynode = null; - YnvFile ynv = null; - YnvPoly ypoly = null; - TrainTrack tt = null; - TrainTrackNode ttnode = null; - YmtFile scenario = null; - ScenarioNode scenarionode = null; - object tag = null; - var node = ProjectTreeView.SelectedNode; - if (node != null) - { - tag = node.Tag; - ymap = tag as YmapFile; - yent = tag as YmapEntityDef; - ycgen = tag as YmapCarGen; - ynd = tag as YndFile; - ynode = tag as YndNode; - ynv = tag as YnvFile; - ypoly = tag as YnvPoly; - tt = tag as TrainTrack; - ttnode = tag as TrainTrackNode; - scenario = tag as YmtFile; if ((scenario != null) && (scenario.ScenarioRegion == null)) scenario = null;//incase other types of ymt files make it into the project... - scenarionode = tag as ScenarioNode; - } - - CurrentYmapFile = ymap; - CurrentEntity = yent; - CurrentCarGen = ycgen; - CurrentYndFile = ynd; - CurrentPathNode = ynode; - CurrentYnvFile = ynv; - CurrentNavPoly = ypoly; - CurrentTrainTrack = tt; - CurrentTrainNode = ttnode; - CurrentScenario = scenario; - CurrentScenarioNode = scenarionode; - - if (tag == CurrentProjectFile) - { - MainTabControl.SelectedTab = ProjectTabPage; - } - if (yent != null) - { - CurrentYmapFile = yent.Ymap; - MainTabControl.SelectedTab = YmapTabPage; - YmapTabControl.SelectedTab = YmapEntityTabPage; - } - else if (ycgen != null) - { - CurrentYmapFile = ycgen.Ymap; - MainTabControl.SelectedTab = YmapTabPage; - YmapTabControl.SelectedTab = YmapCarGenTabPage; - } - else if (ymap != null) - { - CurrentYmapFile = ymap; - MainTabControl.SelectedTab = YmapTabPage; - YmapTabControl.SelectedTab = YmapYmapTabPage; - } - if (ynode != null) - { - CurrentYndFile = ynode.Ynd; - MainTabControl.SelectedTab = YndTabPage; - YndTabControl.SelectedTab = YndNodeTabPage; - } - else if (ynd != null) - { - MainTabControl.SelectedTab = YndTabPage; - YndTabControl.SelectedTab = YndYndTabPage; - } - if (ypoly != null) - { - CurrentYnvFile = ypoly.Ynv; - MainTabControl.SelectedTab = YnvTabPage; - YnvTabControl.SelectedTab = YnvPolyTabPage; - } - else if (ynv != null) - { - MainTabControl.SelectedTab = YnvTabPage; - YnvTabControl.SelectedTab = YnvYnvTabPage; - } - if (ttnode != null) - { - CurrentTrainTrack = ttnode.Track; - MainTabControl.SelectedTab = TrainsTabPage; - TrainsTabControl.SelectedTab = TrainNodeTabPage; - } - else if (tt != null) - { - MainTabControl.SelectedTab = TrainsTabPage; - TrainsTabControl.SelectedTab = TrainTrackTabPage; - } - if (scenarionode != null) - { - CurrentScenario = scenarionode.Ymt; - MainTabControl.SelectedTab = ScenarioTabPage; - SelectScenarioNodeTabPages(scenarionode); - } - else if (scenario != null) - { - MainTabControl.SelectedTab = ScenarioTabPage; - ScenarioTabControl.SelectedTab = ScenarioYmtTabPage; - } - - RefreshUI(); - } - - private void ProjectShowEntitiesCheckBox_CheckedChanged(object sender, EventArgs e) - { - renderentities = ProjectShowEntitiesCheckBox.Checked; - } - - private void ProjectHideMapCheckBox_CheckedChanged(object sender, EventArgs e) - { - hidegtavmap = ProjectHideMapCheckBox.Checked; - OptionsHideGTAVMapMenu.Checked = hidegtavmap; - } - - private void ProjectManifestGenerateButton_Click(object sender, EventArgs e) - { - GenerateProjectManifest(); - } - - - - - - - private void YmapNameTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - uint hash = 0; - string name = YmapNameTextBox.Text; - if (!uint.TryParse(name, out hash))//don't re-hash hashes - { - hash = JenkHash.GenHash(name); - JenkIndex.Ensure(name); - } - YmapNameHashLabel.Text = "Hash: " + hash.ToString(); - - if (CurrentYmapFile != null) - { - lock (ymapsyncroot) - { - string ymname = name + ".ymap"; - if (CurrentYmapFile.Name != ymname) - { - CurrentYmapFile.Name = ymname; - CurrentYmapFile._CMapData.name = new MetaHash(hash); - SetYmapHasChanged(true); - } - } - } - } - - private void YmapParentTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - uint hash = 0; - string name = YmapParentTextBox.Text; - if (!uint.TryParse(name, out hash))//don't re-hash hashes - { - hash = JenkHash.GenHash(name); - JenkIndex.Ensure(name); - } - YmapParentHashLabel.Text = "Hash: " + hash.ToString(); - - if (hash != 0) - { - var entry = FindParentYmapEntry(hash); - if (entry == null) - { - YmapParentHashLabel.Text += " (not found!)"; - } - } - - if (CurrentYmapFile != null) - { - lock (ymapsyncroot) - { - if (CurrentYmapFile._CMapData.parent.Hash != hash) - { - CurrentYmapFile._CMapData.parent = new MetaHash(hash); - SetYmapHasChanged(true); - - //TODO: confirm entity parent linkage? - } - } - } - - } - - private void YmapFlagsTextBox_TextChanged(object sender, EventArgs e) - { - SetYmapFlagsFromTextBoxes(); - } - - private void YmapContentFlagsTextBox_TextChanged(object sender, EventArgs e) - { - SetYmapFlagsFromTextBoxes(); - } - - private void YmapCFlagsHDCheckBox_CheckedChanged(object sender, EventArgs e) - { - SetYmapFlagsFromCheckBoxes(); - } - - private void YmapCFlagsLODCheckBox_CheckedChanged(object sender, EventArgs e) - { - SetYmapFlagsFromCheckBoxes(); - } - - private void YmapCFlagsSLOD2CheckBox_CheckedChanged(object sender, EventArgs e) - { - SetYmapFlagsFromCheckBoxes(); - } - - private void YmapCFlagsInteriorCheckBox_CheckedChanged(object sender, EventArgs e) - { - SetYmapFlagsFromCheckBoxes(); - } - - private void YmapCFlagsSLODCheckBox_CheckedChanged(object sender, EventArgs e) - { - SetYmapFlagsFromCheckBoxes(); - } - - private void YmapCFlagsOcclusionCheckBox_CheckedChanged(object sender, EventArgs e) - { - SetYmapFlagsFromCheckBoxes(); - } - - private void YmapCFlagsPhysicsCheckBox_CheckedChanged(object sender, EventArgs e) - { - SetYmapFlagsFromCheckBoxes(); - } - - private void YmapCFlagsLODLightsCheckBox_CheckedChanged(object sender, EventArgs e) - { - SetYmapFlagsFromCheckBoxes(); - } - - private void YmapCFlagsDistLightsCheckBox_CheckedChanged(object sender, EventArgs e) - { - SetYmapFlagsFromCheckBoxes(); - } - - private void YmapCFlagsCriticalCheckBox_CheckedChanged(object sender, EventArgs e) - { - SetYmapFlagsFromCheckBoxes(); - } - - private void YmapCFlagsGrassCheckBox_CheckedChanged(object sender, EventArgs e) - { - SetYmapFlagsFromCheckBoxes(); - } - - private void YmapFlagsScriptedCheckBox_CheckedChanged(object sender, EventArgs e) - { - SetYmapFlagsFromCheckBoxes(); - } - - private void YmapFlagsLODCheckBox_CheckedChanged(object sender, EventArgs e) - { - SetYmapFlagsFromCheckBoxes(); - } - - private void YmapCalculateFlagsButton_Click(object sender, EventArgs e) - { - CalcYmapFlags(); - } - - private void YmapEntitiesExtentsMinTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentYmapFile == null) return; - Vector3 v = FloatUtil.ParseVector3String(YmapEntitiesExtentsMinTextBox.Text); - lock (ymapsyncroot) - { - if (CurrentYmapFile._CMapData.entitiesExtentsMin != v) - { - CurrentYmapFile._CMapData.entitiesExtentsMin = v; - SetYmapHasChanged(true); - } - } - } - - private void YmapEntitiesExtentsMaxTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentYmapFile == null) return; - Vector3 v = FloatUtil.ParseVector3String(YmapEntitiesExtentsMaxTextBox.Text); - lock (ymapsyncroot) - { - if (CurrentYmapFile._CMapData.entitiesExtentsMax != v) - { - CurrentYmapFile._CMapData.entitiesExtentsMax = v; - SetYmapHasChanged(true); - } - } - } - - private void YmapStreamingExtentsMinTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentYmapFile == null) return; - Vector3 v = FloatUtil.ParseVector3String(YmapStreamingExtentsMinTextBox.Text); - lock (ymapsyncroot) - { - if (CurrentYmapFile._CMapData.streamingExtentsMin != v) - { - CurrentYmapFile._CMapData.streamingExtentsMin = v; - SetYmapHasChanged(true); - } - } - } - - private void YmapStreamingExtentsMaxTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentYmapFile == null) return; - Vector3 v = FloatUtil.ParseVector3String(YmapStreamingExtentsMaxTextBox.Text); - lock (ymapsyncroot) - { - if (CurrentYmapFile._CMapData.streamingExtentsMax != v) - { - CurrentYmapFile._CMapData.streamingExtentsMax = v; - SetYmapHasChanged(true); - } - } - } - - private void YmapCalculateExtentsButton_Click(object sender, EventArgs e) - { - CalcYmapExtents(); - } - - private void YmapPhysicsDictionariesTextBox_TextChanged(object sender, EventArgs e) - { - SetYmapPhysicsDictionariesFromTextbox(); - } - - - private void EntityArchetypeTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentEntity == null) return; - uint hash = 0; - string name = EntityArchetypeTextBox.Text; - if (!uint.TryParse(name, out hash))//don't re-hash hashes - { - hash = JenkHash.GenHash(name); - JenkIndex.Ensure(name); - } - EntityArchetypeHashLabel.Text = "Hash: " + hash.ToString(); - - var arch = GameFileCache.GetArchetype(hash); - if (arch == null) - { - EntityArchetypeHashLabel.Text += " (not found)"; - } - - TreeNode tn = FindEntityTreeNode(CurrentEntity); - if (tn != null) - { - tn.Text = name; - } - - if (CurrentEntity != null) - { - lock (ymapsyncroot) - { - CurrentEntity._CEntityDef.archetypeName = new MetaHash(hash); - if (CurrentEntity.Archetype != arch) - { - CurrentEntity.SetArchetype(arch); - SetYmapHasChanged(true); - } - } - } - } - - private void EntityFlagsTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentEntity == null) return; - uint flags = 0; - uint.TryParse(EntityFlagsTextBox.Text, out flags); - populatingui = true; - for (int i = 0; i < EntityFlagsCheckedListBox.Items.Count; i++) - { - var c = ((flags & (1u << i)) > 0); - EntityFlagsCheckedListBox.SetItemCheckState(i, c ? CheckState.Checked : CheckState.Unchecked); - } - populatingui = false; - lock (ymapsyncroot) - { - if (CurrentEntity._CEntityDef.flags != flags) - { - CurrentEntity._CEntityDef.flags = flags; - SetYmapHasChanged(true); - } - } - } - - private void EntityFlagsCheckedListBox_ItemCheck(object sender, ItemCheckEventArgs e) - { - if (populatingui) return; - if (CurrentEntity == null) return; - uint flags = 0; - for (int i = 0; i < EntityFlagsCheckedListBox.Items.Count; i++) - { - if (e.Index == i) - { - if (e.NewValue == CheckState.Checked) - { - flags += (uint)(1 << i); - } - } - else - { - if (EntityFlagsCheckedListBox.GetItemChecked(i)) - { - flags += (uint)(1 << i); - } - } - } - populatingui = true; - EntityFlagsTextBox.Text = flags.ToString(); - populatingui = false; - lock (ymapsyncroot) - { - if (CurrentEntity._CEntityDef.flags != flags) - { - CurrentEntity._CEntityDef.flags = flags; - SetYmapHasChanged(true); - } - } - } - - private void EntityGuidTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentEntity == null) return; - uint guid = 0; - uint.TryParse(EntityGuidTextBox.Text, out guid); - lock (ymapsyncroot) - { - if (CurrentEntity._CEntityDef.guid != guid) - { - CurrentEntity._CEntityDef.guid = guid; - SetYmapHasChanged(true); - } - } - } - - private void EntityPositionTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentEntity == null) return; - Vector3 v = FloatUtil.ParseVector3String(EntityPositionTextBox.Text); - lock (ymapsyncroot) - { - if (CurrentEntity.MloParent != null) - { - //TODO: positioning for interior entities! - } - else - { - if (CurrentEntity.Position != v) - { - CurrentEntity.SetPosition(v); - SetYmapHasChanged(true); - if (WorldForm != null) - { - WorldForm.BeginInvoke(new Action(() => - { - WorldForm.SetWidgetPosition(CurrentEntity.WidgetPosition, true); - })); - } - } - } - } - } - - private void EntityRotationTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentEntity == null) return; - Vector4 v = FloatUtil.ParseVector4String(EntityRotationTextBox.Text); - lock (ymapsyncroot) - { - if (CurrentEntity._CEntityDef.rotation != v) - { - Quaternion q = new Quaternion(v); - CurrentEntity.SetOrientation(q, true); - SetYmapHasChanged(true); - if (WorldForm != null) - { - WorldForm.BeginInvoke(new Action(() => - { - WorldForm.SetWidgetRotation(CurrentEntity.WidgetOrientation, true); - })); - } - } - } - } - - private void EntityScaleXYTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentEntity == null) return; - float sxy = 0; - FloatUtil.TryParse(EntityScaleXYTextBox.Text, out sxy); - lock (ymapsyncroot) - { - if (CurrentEntity.Scale.X != sxy) - { - Vector3 newscale = new Vector3(sxy, sxy, CurrentEntity.Scale.Z); - CurrentEntity.SetScale(newscale); - SetYmapHasChanged(true); - if (WorldForm != null) - { - WorldForm.BeginInvoke(new Action(() => - { - WorldForm.SetWidgetScale(newscale, true); - })); - } - } - } - } - - private void EntityScaleZTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentEntity == null) return; - float sz = 0; - FloatUtil.TryParse(EntityScaleZTextBox.Text, out sz); - lock (ymapsyncroot) - { - if (CurrentEntity.Scale.Z != sz) - { - Vector3 newscale = new Vector3(CurrentEntity.Scale.X, CurrentEntity.Scale.Y, sz); - CurrentEntity.SetScale(newscale); - SetYmapHasChanged(true); - if (WorldForm != null) - { - WorldForm.BeginInvoke(new Action(() => - { - WorldForm.SetWidgetScale(newscale, true); - })); - } - } - } - } - - private void EntityParentIndexTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentEntity == null) return; - int pind = 0; - int.TryParse(EntityParentIndexTextBox.Text, out pind); - lock (ymapsyncroot) - { - if (CurrentEntity._CEntityDef.parentIndex != pind) - { - CurrentEntity._CEntityDef.parentIndex = pind; //Needs more work for LOD linking! - SetYmapHasChanged(true); - } - } - } - - private void EntityLodDistTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentEntity == null) return; - float lodDist = 0; - FloatUtil.TryParse(EntityLodDistTextBox.Text, out lodDist); - lock (ymapsyncroot) - { - if (CurrentEntity._CEntityDef.lodDist != lodDist) - { - CurrentEntity._CEntityDef.lodDist = lodDist; - SetYmapHasChanged(true); - } - } - } - - private void EntityChildLodDistTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentEntity == null) return; - float childLodDist = 0; - FloatUtil.TryParse(EntityChildLodDistTextBox.Text, out childLodDist); - lock (ymapsyncroot) - { - if (CurrentEntity._CEntityDef.childLodDist != childLodDist) - { - CurrentEntity._CEntityDef.childLodDist = childLodDist; - SetYmapHasChanged(true); - } - } - } - - private void EntityLodLevelComboBox_SelectedIndexChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentEntity == null) return; - Unk_1264241711 lodLevel = (Unk_1264241711)EntityLodLevelComboBox.SelectedItem; - lock (ymapsyncroot) - { - if (CurrentEntity._CEntityDef.lodLevel != lodLevel) - { - CurrentEntity._CEntityDef.lodLevel = lodLevel; - SetYmapHasChanged(true); - } - } - } - - private void EntityNumChildrenTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentEntity == null) return; - uint numChildren = 0; - uint.TryParse(EntityNumChildrenTextBox.Text, out numChildren); - lock (ymapsyncroot) - { - if (CurrentEntity._CEntityDef.numChildren != numChildren) - { - CurrentEntity._CEntityDef.numChildren = numChildren; - SetYmapHasChanged(true); - } - } - } - - private void EntityPriorityLevelComboBox_SelectedIndexChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentEntity == null) return; - Unk_648413703 priorityLevel = (Unk_648413703)EntityPriorityLevelComboBox.SelectedItem; - lock (ymapsyncroot) - { - if (CurrentEntity._CEntityDef.priorityLevel != priorityLevel) - { - CurrentEntity._CEntityDef.priorityLevel = priorityLevel; - SetYmapHasChanged(true); - } - } - } - - private void EntityAOMultiplierTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentEntity == null) return; - int aomult = 0; - int.TryParse(EntityAOMultiplierTextBox.Text, out aomult); - lock (ymapsyncroot) - { - if (CurrentEntity._CEntityDef.ambientOcclusionMultiplier != aomult) - { - CurrentEntity._CEntityDef.ambientOcclusionMultiplier = aomult; - SetYmapHasChanged(true); - } - } - } - - private void EntityArtificialAOTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentEntity == null) return; - int artao = 0; - int.TryParse(EntityArtificialAOTextBox.Text, out artao); - lock (ymapsyncroot) - { - if (CurrentEntity._CEntityDef.artificialAmbientOcclusion != artao) - { - CurrentEntity._CEntityDef.artificialAmbientOcclusion = artao; - SetYmapHasChanged(true); - } - } - } - - private void EntityTintValueTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentEntity == null) return; - uint tintValue = 0; - uint.TryParse(EntityTintValueTextBox.Text, out tintValue); - lock (ymapsyncroot) - { - if (CurrentEntity._CEntityDef.tintValue != tintValue) - { - CurrentEntity._CEntityDef.tintValue = tintValue; - SetYmapHasChanged(true); - } - } - } - - private void EntityGoToButton_Click(object sender, EventArgs e) - { - if (CurrentEntity == null) return; - if (WorldForm == null) return; - WorldForm.GoToPosition(CurrentEntity.Position); - } - - private void EntityNormalizeRotationButton_Click(object sender, EventArgs e) - { - Vector4 v = FloatUtil.ParseVector4String(EntityRotationTextBox.Text); - Quaternion q = Quaternion.Normalize(new Quaternion(v)); - EntityRotationTextBox.Text = FloatUtil.GetVector4String(new Vector4(q.X, q.Y, q.Z, q.W)); - } - - private void EntityAddToProjectButton_Click(object sender, EventArgs e) - { - AddEntityToProject(); - } - - private void EntityDeleteButton_Click(object sender, EventArgs e) - { - DeleteEntity(); - } - - private void EntityPivotEditCheckBox_CheckedChanged(object sender, EventArgs e) - { - if (WorldForm != null) - { - WorldForm.EditEntityPivot = EntityPivotEditCheckBox.Checked; - } - } - - private void EntityPivotPositionTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentEntity == null) return; - Vector3 v = FloatUtil.ParseVector3String(EntityPivotPositionTextBox.Text); - lock (ymapsyncroot) - { - if (CurrentEntity.PivotPosition != v) - { - CurrentEntity.SetPivotPosition(v); - //SetYmapHasChanged(true); - if (WorldForm != null) - { - WorldForm.BeginInvoke(new Action(() => - { - bool editpivot = WorldForm.EditEntityPivot; - WorldForm.EditEntityPivot = true; - WorldForm.SetWidgetPosition(CurrentEntity.WidgetPosition, true); - WorldForm.EditEntityPivot = editpivot; - })); - } - } - } - } - - private void EntityPivotRotationTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentEntity == null) return; - Vector4 v = FloatUtil.ParseVector4String(EntityPivotRotationTextBox.Text); - Quaternion q = new Quaternion(v); - lock (ymapsyncroot) - { - if (CurrentEntity.PivotOrientation != q) - { - CurrentEntity.SetPivotOrientation(q); - //SetYmapHasChanged(true); - if (WorldForm != null) - { - WorldForm.BeginInvoke(new Action(() => - { - bool editpivot = WorldForm.EditEntityPivot; - WorldForm.EditEntityPivot = true; - WorldForm.SetWidgetRotation(CurrentEntity.WidgetOrientation, true); - WorldForm.EditEntityPivot = editpivot; - })); - } - } - } - } - - private void EntityPivotRotationNormalizeButton_Click(object sender, EventArgs e) - { - Vector4 v = FloatUtil.ParseVector4String(EntityPivotRotationTextBox.Text); - Quaternion q = Quaternion.Normalize(new Quaternion(v)); - EntityPivotRotationTextBox.Text = FloatUtil.GetVector4String(new Vector4(q.X, q.Y, q.Z, q.W)); - } - - - private void CarModelTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentCarGen == null) return; - uint hash = 0; - string name = CarModelTextBox.Text; - if (!uint.TryParse(name, out hash))//don't re-hash hashes - { - hash = JenkHash.GenHash(name); - JenkIndex.Ensure(name); - } - CarModelHashLabel.Text = "Hash: " + hash.ToString(); - - //var model = GameFileCache.GetCarInfo(hash); //todo: something like this for car info? - //if (model == null) - //{ - // CarModelHashLabel.Text += " (not found)"; - //} - - if (CurrentCarGen != null) - { - lock (ymapsyncroot) - { - var modelhash = new MetaHash(hash); - if (CurrentCarGen._CCarGen.carModel != modelhash) - { - CurrentCarGen._CCarGen.carModel = modelhash; - SetYmapHasChanged(true); - } - } - } - - UpdateCarGenTreeNode(CurrentCarGen); - - } - - private void CarPopGroupTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentCarGen == null) return; - uint hash = 0; - string name = CarPopGroupTextBox.Text; - if (!uint.TryParse(name, out hash))//don't re-hash hashes - { - hash = JenkHash.GenHash(name); - JenkIndex.Ensure(name); - } - CarPopGroupHashLabel.Text = "Hash: " + hash.ToString(); - - //var grp = GameFileCache.GetCarPopGroup(hash); //todo: something like this for popgroup info? - //if (grp == null) - //{ - // CarPopGroupHashLabel.Text += " (not found)"; - //} - - if (CurrentCarGen != null) - { - lock (ymapsyncroot) - { - var pghash = new MetaHash(hash); - if (CurrentCarGen._CCarGen.popGroup != pghash) - { - CurrentCarGen._CCarGen.popGroup = pghash; - SetYmapHasChanged(true); - } - } - } - - UpdateCarGenTreeNode(CurrentCarGen); - } - - private void CarFlagsTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentCarGen == null) return; - uint flags = 0; - uint.TryParse(CarFlagsTextBox.Text, out flags); - populatingui = true; - for (int i = 0; i < CarFlagsCheckedListBox.Items.Count; i++) - { - var c = ((flags & (1u << i)) > 0); - CarFlagsCheckedListBox.SetItemCheckState(i, c ? CheckState.Checked : CheckState.Unchecked); - } - populatingui = false; - lock (ymapsyncroot) - { - if (CurrentCarGen._CCarGen.flags != flags) - { - CurrentCarGen._CCarGen.flags = flags; - SetYmapHasChanged(true); - } - } - } - - private void CarFlagsCheckedListBox_ItemCheck(object sender, ItemCheckEventArgs e) - { - if (populatingui) return; - if (CurrentCarGen == null) return; - uint flags = 0; - for (int i = 0; i < CarFlagsCheckedListBox.Items.Count; i++) - { - if (e.Index == i) - { - if (e.NewValue == CheckState.Checked) - { - flags += (uint)(1 << i); - } - } - else - { - if (CarFlagsCheckedListBox.GetItemChecked(i)) - { - flags += (uint)(1 << i); - } - } - } - populatingui = true; - CarFlagsTextBox.Text = flags.ToString(); - populatingui = false; - lock (ymapsyncroot) - { - if (CurrentCarGen._CCarGen.flags != flags) - { - CurrentCarGen._CCarGen.flags = flags; - SetYmapHasChanged(true); - } - } - } - - private void CarPositionTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentCarGen == null) return; - Vector3 v = FloatUtil.ParseVector3String(CarPositionTextBox.Text); - lock (ymapsyncroot) - { - if (CurrentCarGen.Position != v) - { - CurrentCarGen.SetPosition(v); - SetYmapHasChanged(true); - if (WorldForm != null) - { - WorldForm.SetWidgetPosition(v); - } - } - } - - UpdateCarGenTreeNode(CurrentCarGen); - } - - private void CarOrientXTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentCarGen == null) return; - float ox = FloatUtil.Parse(CarOrientXTextBox.Text); - lock (ymapsyncroot) - { - if (CurrentCarGen._CCarGen.orientX != ox) - { - CurrentCarGen._CCarGen.orientX = ox; - CurrentCarGen.CalcOrientation(); - SetYmapHasChanged(true); - if (WorldForm != null) - { - WorldForm.SetWidgetRotation(CurrentCarGen.Orientation); - } - } - } - } - - private void CarOrientYTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentCarGen == null) return; - float oy = FloatUtil.Parse(CarOrientYTextBox.Text); - lock (ymapsyncroot) - { - if (CurrentCarGen._CCarGen.orientY != oy) - { - CurrentCarGen._CCarGen.orientY = oy; - CurrentCarGen.CalcOrientation(); - SetYmapHasChanged(true); - if (WorldForm != null) - { - WorldForm.SetWidgetRotation(CurrentCarGen.Orientation); - } - } - } - } - - private void CarPerpendicularLengthTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentCarGen == null) return; - float len = FloatUtil.Parse(CarPerpendicularLengthTextBox.Text); - lock (ymapsyncroot) - { - if (CurrentCarGen._CCarGen.perpendicularLength != len) - { - CurrentCarGen.SetLength(len); - SetYmapHasChanged(true); - if (WorldForm != null) - { - WorldForm.SetWidgetScale(new Vector3(len)); - } - } - } - } - - private void CarBodyColorRemap1TextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentCarGen == null) return; - int cr = 0; - int.TryParse(CarBodyColorRemap1TextBox.Text, out cr); - lock (ymapsyncroot) - { - if (CurrentCarGen._CCarGen.bodyColorRemap1 != cr) - { - CurrentCarGen._CCarGen.bodyColorRemap1 = cr; - SetYmapHasChanged(true); - } - } - } - - private void CarBodyColorRemap2TextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentCarGen == null) return; - int cr = 0; - int.TryParse(CarBodyColorRemap2TextBox.Text, out cr); - lock (ymapsyncroot) - { - if (CurrentCarGen._CCarGen.bodyColorRemap2 != cr) - { - CurrentCarGen._CCarGen.bodyColorRemap2 = cr; - SetYmapHasChanged(true); - } - } - } - - private void CarBodyColorRemap3TextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentCarGen == null) return; - int cr = 0; - int.TryParse(CarBodyColorRemap3TextBox.Text, out cr); - lock (ymapsyncroot) - { - if (CurrentCarGen._CCarGen.bodyColorRemap3 != cr) - { - CurrentCarGen._CCarGen.bodyColorRemap3 = cr; - SetYmapHasChanged(true); - } - } - } - - private void CarBodyColorRemap4TextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentCarGen == null) return; - int cr = 0; - int.TryParse(CarBodyColorRemap4TextBox.Text, out cr); - lock (ymapsyncroot) - { - if (CurrentCarGen._CCarGen.bodyColorRemap4 != cr) - { - CurrentCarGen._CCarGen.bodyColorRemap4 = cr; - SetYmapHasChanged(true); - } - } - } - - private void CarLiveryTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentCarGen == null) return; - sbyte cr = 0; - sbyte.TryParse(CarLiveryTextBox.Text, out cr); - lock (ymapsyncroot) - { - if (CurrentCarGen._CCarGen.livery != cr) - { - CurrentCarGen._CCarGen.livery = cr; - SetYmapHasChanged(true); - } - } - UpdateCarGenTreeNode(CurrentCarGen); - } - - private void CarGoToButton_Click(object sender, EventArgs e) - { - if (CurrentCarGen == null) return; - if (WorldForm == null) return; - WorldForm.GoToPosition(CurrentCarGen.Position); - } - - private void CarAddToProjectButton_Click(object sender, EventArgs e) - { - AddCarGenToProject(); - } - - private void CarDeleteButton_Click(object sender, EventArgs e) - { - DeleteCarGen(); - } - - - - - - - - - - private void YndAreaIDUpDownChange() - { - if (populatingui) return; - if (CurrentYndFile == null) return; - int x = (int)YndAreaIDXUpDown.Value; - int y = (int)YndAreaIDYUpDown.Value; - lock (yndsyncroot) - { - var areaid = y * 32 + x; - if (CurrentYndFile.AreaID != areaid) - { - CurrentYndFile.AreaID = areaid; - CurrentYndFile.Name = "nodes" + areaid.ToString() + ".ynd"; - YndAreaIDInfoLabel.Text = "ID: " + areaid.ToString(); - SetYndHasChanged(true); - } - } - } - - private void YndAreaIDXUpDown_ValueChanged(object sender, EventArgs e) - { - YndAreaIDUpDownChange(); - } - - private void YndAreaIDYUpDown_ValueChanged(object sender, EventArgs e) - { - YndAreaIDUpDownChange(); - } - - private void YndVehicleNodesUpDown_ValueChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentYndFile == null) return; - if (CurrentYndFile.NodeDictionary == null) return; - lock (yndsyncroot) - { - var vehnodes = (int)YndVehicleNodesUpDown.Value; - if (CurrentYndFile.NodeDictionary.NodesCountVehicle != vehnodes) - { - CurrentYndFile.NodeDictionary.NodesCountVehicle = (uint)vehnodes; - SetYndHasChanged(true); - } - } - } - - private void YndPedNodesUpDown_ValueChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentYndFile == null) return; - if (CurrentYndFile.NodeDictionary == null) return; - lock (yndsyncroot) - { - var pednodes = (int)YndPedNodesUpDown.Value; - if (CurrentYndFile.NodeDictionary.NodesCountPed != pednodes) - { - CurrentYndFile.NodeDictionary.NodesCountPed = (uint)pednodes; - SetYndHasChanged(true); - } - } - } - - - private void PathNodeAreaIDUpDown_ValueChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentPathNode == null) return; - ushort areaid = (ushort)PathNodeAreaIDUpDown.Value; - lock (yndsyncroot) - { - if (CurrentPathNode.AreaID != areaid) - { - CurrentPathNode.AreaID = areaid; - SetYndHasChanged(true); - } - } - - UpdatePathNodeTreeNode(CurrentPathNode); - } - - private void PathNodeNodeIDUpDown_ValueChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentPathNode == null) return; - ushort nodeid = (ushort)PathNodeNodeIDUpDown.Value; - lock (yndsyncroot) - { - if (CurrentPathNode.NodeID != nodeid) - { - CurrentPathNode.NodeID = nodeid; - SetYndHasChanged(true); - } - } - - UpdatePathNodeTreeNode(CurrentPathNode); - } - - private void PathNodePositionTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentPathNode == null) return; - Vector3 v = FloatUtil.ParseVector3String(PathNodePositionTextBox.Text); - bool change = false; - lock (yndsyncroot) - { - if (CurrentPathNode.Position != v) - { - CurrentPathNode.SetPosition(v); - SetYndHasChanged(true); - change = true; - } - } - if (change) - { - if (WorldForm != null) - { - WorldForm.SetWidgetPosition(CurrentPathNode.Position); - WorldForm.UpdatePathNodeGraphics(CurrentPathNode, false); - } - //PathNodePositionTextBox.Text = FloatUtil.GetVector3String(CurrentPathNode.Position); - } - } - - private void PathNodeGoToButton_Click(object sender, EventArgs e) - { - if (CurrentPathNode == null) return; - if (WorldForm == null) return; - WorldForm.GoToPosition(CurrentPathNode.Position); - } - - private void PathNodeAddToProjectButton_Click(object sender, EventArgs e) - { - AddPathNodeToProject(); - } - - private void PathNodeDeleteButton_Click(object sender, EventArgs e) - { - DeletePathNode(); - } - - private void PathNodeStreetHashTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentPathNode == null) return; - uint hash; - uint.TryParse(PathNodeStreetHashTextBox.Text, out hash); - var streetname = GlobalText.TryGetString(hash); - PathNodeStreetNameLabel.Text = "Name: " + ((hash == 0) ? "[None]" : (string.IsNullOrEmpty(streetname) ? "[Not found]" : streetname)); - - lock (yndsyncroot) - { - if (CurrentPathNode.StreetName.Hash != hash) - { - CurrentPathNode.StreetName = hash; - SetYndHasChanged(true); - } - } - - UpdatePathNodeTreeNode(CurrentPathNode); - } - - private void PathNodeFlags0UpDown_ValueChanged(object sender, EventArgs e) - { - SetPathNodeFlagsFromUpDowns(); - } - - private void PathNodeFlags1UpDown_ValueChanged(object sender, EventArgs e) - { - SetPathNodeFlagsFromUpDowns(); - } - - private void PathNodeFlags2UpDown_ValueChanged(object sender, EventArgs e) - { - SetPathNodeFlagsFromUpDowns(); - } - - private void PathNodeFlags3UpDown_ValueChanged(object sender, EventArgs e) - { - SetPathNodeFlagsFromUpDowns(); - } - - private void PathNodeFlags4UpDown_ValueChanged(object sender, EventArgs e) - { - SetPathNodeFlagsFromUpDowns(); - } - - private void PathNodeFlags5UpDown_ValueChanged(object sender, EventArgs e) - { - SetPathNodeFlagsFromUpDowns(); - } - - private void PathNodeFlags01CheckBox_CheckedChanged(object sender, EventArgs e) - { - SetPathNodeFlagsFromCheckBoxes(); - } - - private void PathNodeFlags02CheckBox_CheckedChanged(object sender, EventArgs e) - { - SetPathNodeFlagsFromCheckBoxes(); - } - - private void PathNodeFlags03CheckBox_CheckedChanged(object sender, EventArgs e) - { - SetPathNodeFlagsFromCheckBoxes(); - } - - private void PathNodeFlags04CheckBox_CheckedChanged(object sender, EventArgs e) - { - SetPathNodeFlagsFromCheckBoxes(); - } - - private void PathNodeFlags05CheckBox_CheckedChanged(object sender, EventArgs e) - { - SetPathNodeFlagsFromCheckBoxes(); - } - - private void PathNodeFlags06CheckBox_CheckedChanged(object sender, EventArgs e) - { - SetPathNodeFlagsFromCheckBoxes(); - } - - private void PathNodeFlags07CheckBox_CheckedChanged(object sender, EventArgs e) - { - SetPathNodeFlagsFromCheckBoxes(); - } - - private void PathNodeFlags08CheckBox_CheckedChanged(object sender, EventArgs e) - { - SetPathNodeFlagsFromCheckBoxes(); - } - - private void PathNodeFlags11CheckBox_CheckedChanged(object sender, EventArgs e) - { - SetPathNodeFlagsFromCheckBoxes(); - } - - private void PathNodeFlags12CheckBox_CheckedChanged(object sender, EventArgs e) - { - SetPathNodeFlagsFromCheckBoxes(); - } - - private void PathNodeFlags13CheckBox_CheckedChanged(object sender, EventArgs e) - { - SetPathNodeFlagsFromCheckBoxes(); - } - - private void PathNodeFlags14CheckBox_CheckedChanged(object sender, EventArgs e) - { - SetPathNodeFlagsFromCheckBoxes(); - } - - private void PathNodeFlags15CheckBox_CheckedChanged(object sender, EventArgs e) - { - SetPathNodeFlagsFromCheckBoxes(); - } - - private void PathNodeFlags16CheckBox_CheckedChanged(object sender, EventArgs e) - { - SetPathNodeFlagsFromCheckBoxes(); - } - - private void PathNodeFlags17CheckBox_CheckedChanged(object sender, EventArgs e) - { - SetPathNodeFlagsFromCheckBoxes(); - } - - private void PathNodeFlags18CheckBox_CheckedChanged(object sender, EventArgs e) - { - SetPathNodeFlagsFromCheckBoxes(); - } - - private void PathNodeFlags21CheckBox_CheckedChanged(object sender, EventArgs e) - { - SetPathNodeFlagsFromCheckBoxes(); - } - - private void PathNodeFlags22CheckBox_CheckedChanged(object sender, EventArgs e) - { - SetPathNodeFlagsFromCheckBoxes(); - } - - private void PathNodeFlags23CheckBox_CheckedChanged(object sender, EventArgs e) - { - SetPathNodeFlagsFromCheckBoxes(); - } - - private void PathNodeFlags24CheckBox_CheckedChanged(object sender, EventArgs e) - { - SetPathNodeFlagsFromCheckBoxes(); - } - - private void PathNodeFlags25CheckBox_CheckedChanged(object sender, EventArgs e) - { - SetPathNodeFlagsFromCheckBoxes(); - } - - private void PathNodeFlags26CheckBox_CheckedChanged(object sender, EventArgs e) - { - SetPathNodeFlagsFromCheckBoxes(); - } - - private void PathNodeFlags27CheckBox_CheckedChanged(object sender, EventArgs e) - { - SetPathNodeFlagsFromCheckBoxes(); - } - - private void PathNodeFlags28CheckBox_CheckedChanged(object sender, EventArgs e) - { - SetPathNodeFlagsFromCheckBoxes(); - } - - private void PathNodeFlags31CheckBox_CheckedChanged(object sender, EventArgs e) - { - SetPathNodeFlagsFromCheckBoxes(); - } - - private void PathNodeFlags32UpDown_ValueChanged(object sender, EventArgs e) - { - SetPathNodeFlagsFromCheckBoxes(); //treat this one like checkboxes - } - - private void PathNodeFlags51CheckBox_CheckedChanged(object sender, EventArgs e) - { - SetPathNodeFlagsFromCheckBoxes(); - } - - private void PathNodeFlags41CheckBox_CheckedChanged(object sender, EventArgs e) - { - SetPathNodeFlagsFromCheckBoxes(); - } - - private void PathNodeFlags45CheckBox_CheckedChanged(object sender, EventArgs e) - { - SetPathNodeFlagsFromCheckBoxes(); - } - - private void PathNodeFlags46CheckBox_CheckedChanged(object sender, EventArgs e) - { - SetPathNodeFlagsFromCheckBoxes(); - } - - private void PathNodeFlags47CheckBox_CheckedChanged(object sender, EventArgs e) - { - SetPathNodeFlagsFromCheckBoxes(); - } - - private void PathNodeFlags48CheckBox_CheckedChanged(object sender, EventArgs e) - { - SetPathNodeFlagsFromCheckBoxes(); - } - - private void PathNodeFlags42UpDown_ValueChanged(object sender, EventArgs e) - { - SetPathNodeFlagsFromCheckBoxes(); //treat this one like checkboxes - } - - private void PathNodeFlags52CheckBox_CheckedChanged(object sender, EventArgs e) - { - SetPathNodeFlagsFromCheckBoxes(); - } - - private void PathNodeFlags53CheckBox_CheckedChanged(object sender, EventArgs e) - { - SetPathNodeFlagsFromCheckBoxes(); - } - - - private void PathNodeLinksListBox_SelectedIndexChanged(object sender, EventArgs e) - { - CurrentPathLink = PathNodeLinksListBox.SelectedItem as YndLink; - LoadPathNodeLinkPage(); - } - - private void PathNodeAddLinkButton_Click(object sender, EventArgs e) - { - AddPathLink(); - } - - private void PathNodeRemoveLinkButton_Click(object sender, EventArgs e) - { - RemovePathLink(); - } - - private void PathNodeLinkAreaIDUpDown_ValueChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentPathLink == null) return; - ushort areaid = (ushort)PathNodeLinkAreaIDUpDown.Value; - bool change = false; - lock (yndsyncroot) - { - if (CurrentPathLink._RawData.AreaID != areaid) - { - CurrentPathLink._RawData.AreaID = areaid; - SetYndHasChanged(true); - change = true; - } - } - if (change) - { - UpdatePathNodeLinkage(); - - //refresh the selected item in the list box, to update the text, and the other controls. - PathNodeLinksListBox.Items[PathNodeLinksListBox.SelectedIndex] = PathNodeLinksListBox.SelectedItem; - } - } - - private void PathNodeLinkNodeIDUpDown_ValueChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentPathLink == null) return; - ushort nodeid = (ushort)PathNodeLinkNodeIDUpDown.Value; - bool change = false; - lock (yndsyncroot) - { - if (CurrentPathLink._RawData.NodeID != nodeid) - { - CurrentPathLink._RawData.NodeID = nodeid; - SetYndHasChanged(true); - change = true; - } - } - if (change) - { - UpdatePathNodeLinkage(); - - //refresh the selected item in the list box, to update the text, and the other controls. - PathNodeLinksListBox.Items[PathNodeLinksListBox.SelectedIndex] = PathNodeLinksListBox.SelectedItem; - } - } - - private void PathNodeLinkFlags0UpDown_ValueChanged(object sender, EventArgs e) - { - SetPathNodeLinkFlagsFromUpDowns(); - } - - private void PathNodeLinkFlags1UpDown_ValueChanged(object sender, EventArgs e) - { - SetPathNodeLinkFlagsFromUpDowns(); - } - - private void PathNodeLinkFlags2UpDown_ValueChanged(object sender, EventArgs e) - { - SetPathNodeLinkFlagsFromUpDowns(); - } - - private void PathNodeLinkFlags01CheckBox_CheckedChanged(object sender, EventArgs e) - { - SetPathNodeLinkFlagsFromCheckBoxes(); - } - - private void PathNodeLinkFlags02CheckBox_CheckedChanged(object sender, EventArgs e) - { - SetPathNodeLinkFlagsFromCheckBoxes(); - } - - private void PathNodeLinkFlags03UpDown_ValueChanged(object sender, EventArgs e) - { - SetPathNodeLinkFlagsFromCheckBoxes(); - } - - private void PathNodeLinkFlags04UpDown_ValueChanged(object sender, EventArgs e) - { - SetPathNodeLinkFlagsFromCheckBoxes(); - } - - private void PathNodeLinkFlags11CheckBox_CheckedChanged(object sender, EventArgs e) - { - SetPathNodeLinkFlagsFromCheckBoxes(); - } - - private void PathNodeLinkFlags12CheckBox_CheckedChanged(object sender, EventArgs e) - { - SetPathNodeLinkFlagsFromCheckBoxes(); - } - - private void PathNodeLinkFlags13CheckBox_CheckedChanged(object sender, EventArgs e) - { - SetPathNodeLinkFlagsFromCheckBoxes(); - } - - private void PathNodeLinkFlags14CheckBox_CheckedChanged(object sender, EventArgs e) - { - SetPathNodeLinkFlagsFromCheckBoxes(); - } - - private void PathNodeLinkFlags18CheckBox_CheckedChanged(object sender, EventArgs e) - { - SetPathNodeLinkFlagsFromCheckBoxes(); - } - - private void PathNodeLinkOffsetSizeUpDown_ValueChanged(object sender, EventArgs e) - { - SetPathNodeLinkFlagsFromCheckBoxes(); - } - - private void PathNodeLinkFlags21CheckBox_CheckedChanged(object sender, EventArgs e) - { - SetPathNodeLinkFlagsFromCheckBoxes(); - } - - private void PathNodeLinkFlags22CheckBox_CheckedChanged(object sender, EventArgs e) - { - SetPathNodeLinkFlagsFromCheckBoxes(); - } - - private void PathNodeLinkFwdLanesUpDown_ValueChanged(object sender, EventArgs e) - { - SetPathNodeLinkFlagsFromCheckBoxes(); - } - - private void PathNodeLinkBackLanesUpDown_ValueChanged(object sender, EventArgs e) - { - SetPathNodeLinkFlagsFromCheckBoxes(); - } - - private void PathNodeLinkLengthUpDown_ValueChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentPathLink == null) return; - byte length = (byte)PathNodeLinkLengthUpDown.Value; - lock (yndsyncroot) - { - if (CurrentPathLink.LinkLength.Value != length) - { - CurrentPathLink.LinkLength = length; - CurrentPathLink._RawData.LinkLength = length; - SetYndHasChanged(true); - } - } - } - - private void PathNodeJunctionEnableCheckBox_CheckedChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentPathNode == null) return; - lock (yndsyncroot) - { - if (CurrentPathNode.HasJunction != PathNodeJunctionEnableCheckBox.Checked) - { - CurrentPathNode.HasJunction = PathNodeJunctionEnableCheckBox.Checked; - if (CurrentPathNode.HasJunction && (CurrentPathNode.Junction == null)) - { - var j = new YndJunction(); - //init new junction - j._RawData.HeightmapDimX = 1; - j._RawData.HeightmapDimY = 1; - j.Heightmap = new YndJunctionHeightmap(new byte[] { 255 }, j); - j.RefData = new NodeJunctionRef() { AreaID = (ushort)CurrentPathNode.AreaID, NodeID = (ushort)CurrentPathNode.NodeID }; - - CurrentPathNode.Junction = j; - } - SetYndHasChanged(true); - } - } - LoadPathNodeJunctionPage(); - } - - private void PathNodeJunctionMaxZUpDown_ValueChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentPathNode == null) return; - if (CurrentPathNode.Junction == null) return; - short val = (short)PathNodeJunctionMaxZUpDown.Value; - lock (yndsyncroot) - { - if (CurrentPathNode.Junction.MaxZ != val) - { - CurrentPathNode.Junction.MaxZ = val; - CurrentPathNode.Junction._RawData.MaxZ = val; - SetYndHasChanged(true); - } - } - } - - private void PathNodeJunctionMinZUpDown_ValueChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentPathNode == null) return; - if (CurrentPathNode.Junction == null) return; - short val = (short)PathNodeJunctionMinZUpDown.Value; - lock (yndsyncroot) - { - if (CurrentPathNode.Junction.MinZ != val) - { - CurrentPathNode.Junction.MinZ = val; - CurrentPathNode.Junction._RawData.MinZ = val; - SetYndHasChanged(true); - } - } - } - - private void PathNodeJunctionPosXUpDown_ValueChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentPathNode == null) return; - if (CurrentPathNode.Junction == null) return; - short val = (short)PathNodeJunctionPosXUpDown.Value; - lock (yndsyncroot) - { - if (CurrentPathNode.Junction.PositionX != val) - { - CurrentPathNode.Junction.PositionX = val; - CurrentPathNode.Junction._RawData.PositionX = val; - SetYndHasChanged(true); - } - } - } - - private void PathNodeJunctionPosYUpDown_ValueChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentPathNode == null) return; - if (CurrentPathNode.Junction == null) return; - short val = (short)PathNodeJunctionPosYUpDown.Value; - lock (yndsyncroot) - { - if (CurrentPathNode.Junction.PositionY != val) - { - CurrentPathNode.Junction.PositionY = val; - CurrentPathNode.Junction._RawData.PositionY = val; - SetYndHasChanged(true); - } - } - } - - private void PathNodeJunctionHeightmapDimXUpDown_ValueChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentPathNode == null) return; - if (CurrentPathNode.Junction == null) return; - byte val = (byte)PathNodeJunctionHeightmapDimXUpDown.Value; - lock (yndsyncroot) - { - if (CurrentPathNode.Junction._RawData.HeightmapDimX != val) - { - CurrentPathNode.Junction._RawData.HeightmapDimX = val; - CurrentPathNode.Junction.ResizeHeightmap(); - SetYndHasChanged(true); - } - } - LoadPathNodeJunctionPage(); - } - - private void PathNodeJunctionHeightmapDimYUpDown_ValueChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentPathNode == null) return; - if (CurrentPathNode.Junction == null) return; - byte val = (byte)PathNodeJunctionHeightmapDimYUpDown.Value; - lock (yndsyncroot) - { - if (CurrentPathNode.Junction._RawData.HeightmapDimY != val) - { - CurrentPathNode.Junction._RawData.HeightmapDimY = val; - CurrentPathNode.Junction.ResizeHeightmap(); - SetYndHasChanged(true); - } - } - LoadPathNodeJunctionPage(); - } - - private void PathNodeJunctionHeightmapBytesTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentPathNode == null) return; - if (CurrentPathNode.Junction == null) return; - lock (yndsyncroot) - { - CurrentPathNode.Junction.SetHeightmap(PathNodeJunctionHeightmapBytesTextBox.Text); - SetYndHasChanged(true); - } - //LoadPathNodeJunctionPage(); - } - - - - - - - - - private void TrainNodePositionTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentTrainNode == null) return; - Vector3 v = FloatUtil.ParseVector3String(TrainNodePositionTextBox.Text); - bool change = false; - lock (trainsyncroot) - { - if (CurrentTrainNode.Position != v) - { - CurrentTrainNode.SetPosition(v); - SetTrainTrackHasChanged(true); - change = true; - } - } - if (change) - { - if (WorldForm != null) - { - WorldForm.SetWidgetPosition(CurrentTrainNode.Position); - WorldForm.UpdateTrainTrackNodeGraphics(CurrentTrainNode, false); - } - //TrainNodePositionTextBox.Text = FloatUtil.GetVector3String(CurrentTrainNode.Position); - } - } - - private void TrainNodeGoToButton_Click(object sender, EventArgs e) - { - if (CurrentTrainNode == null) return; - if (WorldForm == null) return; - WorldForm.GoToPosition(CurrentTrainNode.Position); - } - - private void TrainNodeTypeComboBox_SelectedIndexChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentTrainNode == null) return; - int type = TrainNodeTypeComboBox.SelectedIndex; - bool change = false; - lock (trainsyncroot) - { - if (CurrentTrainNode.NodeType != type) - { - CurrentTrainNode.NodeType = type; - SetTrainTrackHasChanged(true); - change = true; - } - } - if (change) - { - if (WorldForm != null) - { - WorldForm.UpdateTrainTrackNodeGraphics(CurrentTrainNode, false); //change the colour... - } - } - UpdateTrainNodeTreeNode(CurrentTrainNode); - } - - private void TrainNodeAddToProjectButton_Click(object sender, EventArgs e) - { - AddTrainNodeToProject(); - } - - private void TrainNodeDeleteButton_Click(object sender, EventArgs e) - { - DeleteTrainNode(); - } - - - - - - - - - - private void ScenarioYmtVersionTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenario == null) return; - if (CurrentScenario.CScenarioPointRegion == null) return; - lock (scenariosyncroot) - { - int v = 0; - int.TryParse(ScenarioYmtVersionTextBox.Text, out v); - if (CurrentScenario.CScenarioPointRegion.VersionNumber != v) - { - CurrentScenario.CScenarioPointRegion.VersionNumber = v; - SetScenarioHasChanged(true); - } - } - } - - - private void ScenarioPointCheckBox_CheckedChanged(object sender, EventArgs e) - { - - } - - private void ScenarioPointAddToProjectButton_Click(object sender, EventArgs e) - { - AddScenarioNodeToProject(); - } - - private void ScenarioPointDeleteButton_Click(object sender, EventArgs e) - { - DeleteScenarioNode(); - } - - private void ScenarioPointGoToButton_Click(object sender, EventArgs e) - { - if (CurrentScenarioNode == null) return; - if (WorldForm == null) return; - WorldForm.GoToPosition(CurrentScenarioNode.Position); - } - - private void ScenarioPointPositionTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - Vector3 v = FloatUtil.ParseVector3String(ScenarioPointPositionTextBox.Text); - bool change = false; - lock (scenariosyncroot) - { - if (CurrentScenarioNode.Position != v) - { - CurrentScenarioNode.SetPosition(v); - SetScenarioHasChanged(true); - change = true; - } - } - if (change) - { - if (WorldForm != null) - { - WorldForm.SetWidgetPosition(CurrentScenarioNode.Position); - WorldForm.UpdateScenarioGraphics(CurrentScenario, false); - } - } - } - - private void ScenarioPointDirectionTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.MyPoint == null) return; - float dir = FloatUtil.Parse(ScenarioPointDirectionTextBox.Text); - lock (scenariosyncroot) - { - if (CurrentScenarioNode.MyPoint.Direction != dir) - { - CurrentScenarioNode.MyPoint.Direction = dir; - CurrentScenarioNode.Orientation = CurrentScenarioNode.MyPoint.Orientation; - SetScenarioHasChanged(true); - if (WorldForm != null) - { - WorldForm.SetWidgetRotation(CurrentScenarioNode.Orientation); - } - } - } - } - - private void ScenarioPointTypeComboBox_SelectedIndexChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.MyPoint == null) return; - ScenarioType stype = ScenarioPointTypeComboBox.SelectedItem as ScenarioType; - lock (scenariosyncroot) - { - if (CurrentScenarioNode.MyPoint.Type != stype) - { - CurrentScenarioNode.MyPoint.Type = stype; - SetScenarioHasChanged(true); - } - } - UpdateScenarioNodeTreeNode(CurrentScenarioNode); - - if (CurrentScenarioNode.ChainingNode != null) - { - ScenarioChainNodeTypeComboBox.SelectedItem = stype; - } - } - - private void ScenarioPointModelSetComboBox_SelectedIndexChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.MyPoint == null) return; - AmbientModelSet mset = ScenarioPointModelSetComboBox.SelectedItem as AmbientModelSet; - lock (scenariosyncroot) - { - if (CurrentScenarioNode.MyPoint.ModelSet != mset) - { - CurrentScenarioNode.MyPoint.ModelSet = mset; - SetScenarioHasChanged(true); - } - } - UpdateScenarioNodeTreeNode(CurrentScenarioNode); - } - - private void ScenarioPointInteriorTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.MyPoint == null) return; - uint hash = 0; - string name = ScenarioPointInteriorTextBox.Text; - if (!uint.TryParse(name, out hash))//don't re-hash hashes - { - hash = JenkHash.GenHash(name); - JenkIndex.Ensure(name); - } - ScenarioPointInteriorHashLabel.Text = "Hash: " + hash.ToString(); - lock (scenariosyncroot) - { - if (CurrentScenarioNode.MyPoint.InteriorName != hash) - { - CurrentScenarioNode.MyPoint.InteriorName = hash; - SetScenarioHasChanged(true); - } - } - } - - private void ScenarioPointGroupTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.MyPoint == null) return; - uint hash = 0; - string name = ScenarioPointGroupTextBox.Text; - if (!uint.TryParse(name, out hash))//don't re-hash hashes - { - hash = JenkHash.GenHash(name); - JenkIndex.Ensure(name); - } - ScenarioPointGroupHashLabel.Text = "Hash: " + hash.ToString(); - lock (scenariosyncroot) - { - if (CurrentScenarioNode.MyPoint.GroupName != hash) - { - CurrentScenarioNode.MyPoint.GroupName = hash; - SetScenarioHasChanged(true); - } - } - } - - private void ScenarioPointImapTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.MyPoint == null) return; - uint hash = 0; - string name = ScenarioPointImapTextBox.Text; - if (!uint.TryParse(name, out hash))//don't re-hash hashes - { - hash = JenkHash.GenHash(name); - JenkIndex.Ensure(name); - } - ScenarioPointImapHashLabel.Text = "Hash: " + hash.ToString(); - lock (scenariosyncroot) - { - if (CurrentScenarioNode.MyPoint.IMapName != hash) - { - CurrentScenarioNode.MyPoint.IMapName = hash; - SetScenarioHasChanged(true); - } - } - } - - private void ScenarioPointTimeStartUpDown_ValueChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.MyPoint == null) return; - byte t = (byte)ScenarioPointTimeStartUpDown.Value; - lock (scenariosyncroot) - { - if (CurrentScenarioNode.MyPoint.TimeStart != t) - { - CurrentScenarioNode.MyPoint.TimeStart = t; - SetScenarioHasChanged(true); - } - } - UpdateScenarioNodeTreeNode(CurrentScenarioNode); - } - - private void ScenarioPointTimeEndUpDown_ValueChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.MyPoint == null) return; - byte t = (byte)ScenarioPointTimeEndUpDown.Value; - lock (scenariosyncroot) - { - if (CurrentScenarioNode.MyPoint.TimeEnd != t) - { - CurrentScenarioNode.MyPoint.TimeEnd = t; - SetScenarioHasChanged(true); - } - } - UpdateScenarioNodeTreeNode(CurrentScenarioNode); - } - - private void ScenarioPointProbabilityUpDown_ValueChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.MyPoint == null) return; - byte v = (byte)ScenarioPointProbabilityUpDown.Value; - lock (scenariosyncroot) - { - if (CurrentScenarioNode.MyPoint.Probability != v) - { - CurrentScenarioNode.MyPoint.Probability = v; - SetScenarioHasChanged(true); - } - } - } - - private void ScenarioPointSpOnlyFlagUpDown_ValueChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.MyPoint == null) return; - byte v = (byte)ScenarioPointSpOnlyFlagUpDown.Value; - lock (scenariosyncroot) - { - if (CurrentScenarioNode.MyPoint.AvailableMpSp != v) - { - CurrentScenarioNode.MyPoint.AvailableMpSp = v; - SetScenarioHasChanged(true); - } - } - } - - private void ScenarioPointRadiusUpDown_ValueChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.MyPoint == null) return; - byte v = (byte)ScenarioPointRadiusUpDown.Value; - lock (scenariosyncroot) - { - if (CurrentScenarioNode.MyPoint.Radius != v) - { - CurrentScenarioNode.MyPoint.Radius = v; - SetScenarioHasChanged(true); - } - } - } - - private void ScenarioPointWaitTimeUpDown_ValueChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.MyPoint == null) return; - byte v = (byte)ScenarioPointWaitTimeUpDown.Value; - lock (scenariosyncroot) - { - if (CurrentScenarioNode.MyPoint.WaitTime != v) - { - CurrentScenarioNode.MyPoint.WaitTime = v; - SetScenarioHasChanged(true); - } - } - } - - private void ScenarioPointFlagsValueUpDown_ValueChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.MyPoint == null) return; - var iflags = (uint)ScenarioPointFlagsValueUpDown.Value; - populatingui = true; - for (int i = 0; i < ScenarioPointFlagsCheckedListBox.Items.Count; i++) - { - var c = ((iflags & (1 << i)) > 0); - ScenarioPointFlagsCheckedListBox.SetItemCheckState(i, c ? CheckState.Checked : CheckState.Unchecked); - } - populatingui = false; - Unk_700327466 f = (Unk_700327466)iflags; - lock (scenariosyncroot) - { - if (CurrentScenarioNode.MyPoint.Flags != f) - { - CurrentScenarioNode.MyPoint.Flags = f; - SetScenarioHasChanged(true); - } - } - } - - private void ScenarioPointFlagsCheckedListBox_ItemCheck(object sender, ItemCheckEventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.MyPoint == null) return; - uint iflags = 0; - for (int i = 0; i < ScenarioPointFlagsCheckedListBox.Items.Count; i++) - { - if (e.Index == i) - { - if (e.NewValue == CheckState.Checked) - { - iflags += (uint)(1 << i); - } - } - else - { - if (ScenarioPointFlagsCheckedListBox.GetItemChecked(i)) - { - iflags += (uint)(1 << i); - } - } - } - populatingui = true; - ScenarioPointFlagsValueUpDown.Value = iflags; - populatingui = false; - Unk_700327466 f = (Unk_700327466)iflags; - lock (scenariosyncroot) - { - if (CurrentScenarioNode.MyPoint.Flags != f) - { - CurrentScenarioNode.MyPoint.Flags = f; - SetScenarioHasChanged(true); - } - } - } - - - private void ScenarioEntityCheckBox_CheckedChanged(object sender, EventArgs e) - { - - } - - private void ScenarioEntityAddToProjectButton_Click(object sender, EventArgs e) - { - AddScenarioNodeToProject(); - } - - private void ScenarioEntityDeleteButton_Click(object sender, EventArgs e) - { - DeleteScenarioEntity(); - } - - private void ScenarioEntityGoToButton_Click(object sender, EventArgs e) - { - if (CurrentScenarioNode == null) return; - if (WorldForm == null) return; - WorldForm.GoToPosition(CurrentScenarioNode.Position); - } - - private void ScenarioEntityPositionTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.Entity == null) return; - Vector3 v = FloatUtil.ParseVector3String(ScenarioEntityPositionTextBox.Text); - bool change = false; - lock (scenariosyncroot) - { - if (CurrentScenarioNode.Position != v) - { - CurrentScenarioNode.SetPosition(v); - SetScenarioHasChanged(true); - change = true; - } - } - if (change) - { - if (WorldForm != null) - { - WorldForm.SetWidgetPosition(CurrentScenarioNode.Position); - WorldForm.UpdateScenarioGraphics(CurrentScenario, false); - } - } - } - - private void ScenarioEntityTypeTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.Entity == null) return; - uint hash = 0; - string name = ScenarioEntityTypeTextBox.Text; - if (!uint.TryParse(name, out hash))//don't re-hash hashes - { - hash = JenkHash.GenHash(name); - JenkIndex.Ensure(name); - } - ScenarioEntityTypeHashLabel.Text = "Hash: " + hash.ToString(); - lock (scenariosyncroot) - { - if (CurrentScenarioNode.Entity.TypeName != hash) - { - CurrentScenarioNode.Entity.TypeName = hash; - SetScenarioHasChanged(true); - } - } - UpdateScenarioNodeTreeNode(CurrentScenarioNode); - } - - private void ScenarioEntityUnk1UpDown_ValueChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.Entity == null) return; - byte v = (byte)ScenarioEntityUnk1UpDown.Value; - lock (scenariosyncroot) - { - if (CurrentScenarioNode.Entity.Unk1 != v) - { - CurrentScenarioNode.Entity.Unk1 = v; - SetScenarioHasChanged(true); - } - } - } - - private void ScenarioEntityUnk2UpDown_ValueChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.Entity == null) return; - byte v = (byte)ScenarioEntityUnk2UpDown.Value; - lock (scenariosyncroot) - { - if (CurrentScenarioNode.Entity.Unk2 != v) - { - CurrentScenarioNode.Entity.Unk2 = v; - SetScenarioHasChanged(true); - } - } - } - - private void ScenarioEntityPointsListBox_DoubleClick(object sender, EventArgs e) - { - var item = ScenarioEntityPointsListBox.SelectedItem as MCExtensionDefSpawnPoint; - if (item == null) return; - - var nodes = CurrentScenario?.ScenarioRegion?.Nodes; - if (nodes == null) return; - - ScenarioNode node = null; - foreach (var snode in nodes) - { - if (snode.EntityPoint == item) - { - node = snode; - break; - } - } - - if (node == null) return; - - TrySelectScenarioNodeTreeNode(node); - - } - - private void ScenarioEntityAddPointButton_Click(object sender, EventArgs e) - { - AddScenarioEntityPoint(); - } - - - private void ScenarioEntityPointCheckBox_CheckedChanged(object sender, EventArgs e) - { - - } - - private void ScenarioEntityPointAddToProjectButton_Click(object sender, EventArgs e) - { - AddScenarioNodeToProject(); - } - - private void ScenarioEntityPointDeleteButton_Click(object sender, EventArgs e) - { - DeleteScenarioNode(); - } - - private void ScenarioEntityPointGoToButton_Click(object sender, EventArgs e) - { - if (CurrentScenarioNode == null) return; - if (WorldForm == null) return; - WorldForm.GoToPosition(CurrentScenarioNode.Position); - } - - private void ScenarioEntityPointPositionTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.EntityPoint == null) return; - Vector3 v = FloatUtil.ParseVector3String(ScenarioEntityPointPositionTextBox.Text); - v += CurrentScenarioNode.EntityPoint.ParentPosition; - bool change = false; - lock (scenariosyncroot) - { - if (CurrentScenarioNode.Position != v) - { - CurrentScenarioNode.SetPosition(v); - SetScenarioHasChanged(true); - change = true; - } - } - if (change) - { - if (WorldForm != null) - { - WorldForm.SetWidgetPosition(CurrentScenarioNode.Position); - WorldForm.UpdateScenarioGraphics(CurrentScenario, false); - } - } - } - - private void ScenarioEntityPointRotationTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.EntityPoint == null) return; - Vector4 v = FloatUtil.ParseVector4String(ScenarioEntityPointRotationTextBox.Text); - bool change = false; - lock (scenariosyncroot) - { - if (CurrentScenarioNode.EntityPoint.OffsetRotation != v) - { - CurrentScenarioNode.EntityPoint.OffsetRotation = v; - CurrentScenarioNode.Orientation = new Quaternion(v); - SetScenarioHasChanged(true); - change = true; - } - } - if (change) - { - if (WorldForm != null) - { - WorldForm.SetWidgetRotation(CurrentScenarioNode.Orientation); - } - } - } - - private void ScenarioEntityPointNameTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.EntityPoint == null) return; - uint hash = 0; - string name = ScenarioEntityPointNameTextBox.Text; - if (!uint.TryParse(name, out hash))//don't re-hash hashes - { - hash = JenkHash.GenHash(name); - JenkIndex.Ensure(name); - } - ScenarioEntityPointNameHashLabel.Text = "Hash: " + hash.ToString(); - lock (scenariosyncroot) - { - if (CurrentScenarioNode.EntityPoint.NameHash != hash) - { - CurrentScenarioNode.EntityPoint.NameHash = hash; - SetScenarioHasChanged(true); - } - } - UpdateScenarioNodeTreeNode(CurrentScenarioNode); - } - - private void ScenarioEntityPointSpawnTypeTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.EntityPoint == null) return; - uint hash = 0; - string name = ScenarioEntityPointSpawnTypeTextBox.Text; - if (!uint.TryParse(name, out hash))//don't re-hash hashes - { - hash = JenkHash.GenHash(name); - JenkIndex.Ensure(name); - } - ScenarioEntityPointSpawnTypeHashLabel.Text = "Hash: " + hash.ToString(); - lock (scenariosyncroot) - { - if (CurrentScenarioNode.EntityPoint.SpawnType != hash) - { - CurrentScenarioNode.EntityPoint.SpawnType = hash; - SetScenarioHasChanged(true); - } - } - UpdateScenarioNodeTreeNode(CurrentScenarioNode); - } - - private void ScenarioEntityPointPedTypeTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.EntityPoint == null) return; - uint hash = 0; - string name = ScenarioEntityPointPedTypeTextBox.Text; - if (!uint.TryParse(name, out hash))//don't re-hash hashes - { - hash = JenkHash.GenHash(name); - JenkIndex.Ensure(name); - } - ScenarioEntityPointPedTypeHashLabel.Text = "Hash: " + hash.ToString(); - lock (scenariosyncroot) - { - if (CurrentScenarioNode.EntityPoint.PedType != hash) - { - CurrentScenarioNode.EntityPoint.PedType = hash; - SetScenarioHasChanged(true); - } - } - UpdateScenarioNodeTreeNode(CurrentScenarioNode); - } - - private void ScenarioEntityPointGroupTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.EntityPoint == null) return; - uint hash = 0; - string name = ScenarioEntityPointGroupTextBox.Text; - if (!uint.TryParse(name, out hash))//don't re-hash hashes - { - hash = JenkHash.GenHash(name); - JenkIndex.Ensure(name); - } - ScenarioEntityPointGroupHashLabel.Text = "Hash: " + hash.ToString(); - lock (scenariosyncroot) - { - if (CurrentScenarioNode.EntityPoint.Group != hash) - { - CurrentScenarioNode.EntityPoint.Group = hash; - SetScenarioHasChanged(true); - } - } - } - - private void ScenarioEntityPointInteriorTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.EntityPoint == null) return; - uint hash = 0; - string name = ScenarioEntityPointInteriorTextBox.Text; - if (!uint.TryParse(name, out hash))//don't re-hash hashes - { - hash = JenkHash.GenHash(name); - JenkIndex.Ensure(name); - } - ScenarioEntityPointInteriorHashLabel.Text = "Hash: " + hash.ToString(); - lock (scenariosyncroot) - { - if (CurrentScenarioNode.EntityPoint.Interior != hash) - { - CurrentScenarioNode.EntityPoint.Interior = hash; - SetScenarioHasChanged(true); - } - } - } - - private void ScenarioEntityPointRequiredImapTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.EntityPoint == null) return; - uint hash = 0; - string name = ScenarioEntityPointRequiredImapTextBox.Text; - if (!uint.TryParse(name, out hash))//don't re-hash hashes - { - hash = JenkHash.GenHash(name); - JenkIndex.Ensure(name); - } - ScenarioEntityPointRequiredImapHashLabel.Text = "Hash: " + hash.ToString(); - lock (scenariosyncroot) - { - if (CurrentScenarioNode.EntityPoint.RequiredImap != hash) - { - CurrentScenarioNode.EntityPoint.RequiredImap = hash; - SetScenarioHasChanged(true); - } - } - } - - private void ScenarioEntityPointAvailableInMpSpComboBox_SelectedIndexChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.EntityPoint == null) return; - Unk_3573596290 v = (Unk_3573596290)ScenarioEntityPointAvailableInMpSpComboBox.SelectedItem; - lock (scenariosyncroot) - { - if (CurrentScenarioNode.EntityPoint.AvailableInMpSp != v) - { - CurrentScenarioNode.EntityPoint.AvailableInMpSp = v; - SetScenarioHasChanged(true); - } - } - } - - private void ScenarioEntityPointProbabilityTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.EntityPoint == null) return; - float v = FloatUtil.Parse(ScenarioEntityPointProbabilityTextBox.Text); - lock (scenariosyncroot) - { - if (CurrentScenarioNode.EntityPoint.Probability != v) - { - CurrentScenarioNode.EntityPoint.Probability = v; - SetScenarioHasChanged(true); - } - } - } - - private void ScenarioEntityPointTimeTillPedLeavesTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.EntityPoint == null) return; - float v = FloatUtil.Parse(ScenarioEntityPointTimeTillPedLeavesTextBox.Text); - lock (scenariosyncroot) - { - if (CurrentScenarioNode.EntityPoint.TimeTillPedLeaves != v) - { - CurrentScenarioNode.EntityPoint.TimeTillPedLeaves = v; - SetScenarioHasChanged(true); - } - } - } - - private void ScenarioEntityPointRadiusTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.EntityPoint == null) return; - float v = FloatUtil.Parse(ScenarioEntityPointRadiusTextBox.Text); - lock (scenariosyncroot) - { - if (CurrentScenarioNode.EntityPoint.Radius != v) - { - CurrentScenarioNode.EntityPoint.Radius = v; - SetScenarioHasChanged(true); - } - } - } - - private void ScenarioEntityPointStartUpDown_ValueChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.EntityPoint == null) return; - byte v = (byte)ScenarioEntityPointStartUpDown.Value; - lock (scenariosyncroot) - { - if (CurrentScenarioNode.EntityPoint.StartTime != v) - { - CurrentScenarioNode.EntityPoint.StartTime = v; - SetScenarioHasChanged(true); - } - } - } - - private void ScenarioEntityPointEndUpDown_ValueChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.EntityPoint == null) return; - byte v = (byte)ScenarioEntityPointEndUpDown.Value; - lock (scenariosyncroot) - { - if (CurrentScenarioNode.EntityPoint.EndTime != v) - { - CurrentScenarioNode.EntityPoint.EndTime = v; - SetScenarioHasChanged(true); - } - } - } - - private void ScenarioEntityPointExtendedRangeCheckBox_CheckedChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.EntityPoint == null) return; - bool v = ScenarioEntityPointExtendedRangeCheckBox.Checked; - lock (scenariosyncroot) - { - if (CurrentScenarioNode.EntityPoint.ExtendedRange != v) - { - CurrentScenarioNode.EntityPoint.ExtendedRange = v; - SetScenarioHasChanged(true); - } - } - } - - private void ScenarioEntityPointShortRangeCheckBox_CheckedChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.EntityPoint == null) return; - bool v = ScenarioEntityPointShortRangeCheckBox.Checked; - lock (scenariosyncroot) - { - if (CurrentScenarioNode.EntityPoint.ShortRange != v) - { - CurrentScenarioNode.EntityPoint.ShortRange = v; - SetScenarioHasChanged(true); - } - } - } - - private void ScenarioEntityPointHighPriCheckBox_CheckedChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.EntityPoint == null) return; - bool v = ScenarioEntityPointHighPriCheckBox.Checked; - lock (scenariosyncroot) - { - if (CurrentScenarioNode.EntityPoint.HighPri != v) - { - CurrentScenarioNode.EntityPoint.HighPri = v; - SetScenarioHasChanged(true); - } - } - } - - private void ScenarioEntityPointFlagsUpDown_ValueChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.EntityPoint == null) return; - var iflags = (uint)ScenarioEntityPointFlagsUpDown.Value; - populatingui = true; - for (int i = 0; i < ScenarioEntityPointFlagsCheckedListBox.Items.Count; i++) - { - var c = ((iflags & (1 << i)) > 0); - ScenarioEntityPointFlagsCheckedListBox.SetItemCheckState(i, c ? CheckState.Checked : CheckState.Unchecked); - } - populatingui = false; - Unk_700327466 f = (Unk_700327466)iflags; - lock (scenariosyncroot) - { - if (CurrentScenarioNode.EntityPoint.Flags != f) - { - CurrentScenarioNode.EntityPoint.Flags = f; - SetScenarioHasChanged(true); - } - } - } - - private void ScenarioEntityPointFlagsCheckedListBox_ItemCheck(object sender, ItemCheckEventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.EntityPoint == null) return; - uint iflags = 0; - for (int i = 0; i < ScenarioEntityPointFlagsCheckedListBox.Items.Count; i++) - { - if (e.Index == i) - { - if (e.NewValue == CheckState.Checked) - { - iflags += (uint)(1 << i); - } - } - else - { - if (ScenarioEntityPointFlagsCheckedListBox.GetItemChecked(i)) - { - iflags += (uint)(1 << i); - } - } - } - populatingui = true; - ScenarioEntityPointFlagsUpDown.Value = iflags; - populatingui = false; - Unk_700327466 f = (Unk_700327466)iflags; - lock (scenariosyncroot) - { - if (CurrentScenarioNode.EntityPoint.Flags != f) - { - CurrentScenarioNode.EntityPoint.Flags = f; - SetScenarioHasChanged(true); - } - } - } - - - private void ScenarioChainNodeCheckBox_CheckedChanged(object sender, EventArgs e) - { - - } - - private void ScenarioChainNodeAddToProjectButton_Click(object sender, EventArgs e) - { - AddScenarioNodeToProject(); - } - - private void ScenarioChainNodeDeleteButton_Click(object sender, EventArgs e) - { - DeleteScenarioNode(); - } - - private void ScenarioChainNodeGoToButton_Click(object sender, EventArgs e) - { - if (CurrentScenarioNode == null) return; - if (WorldForm == null) return; - WorldForm.GoToPosition(CurrentScenarioNode.Position); - } - - private void ScenarioChainNodePositionTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - Vector3 v = FloatUtil.ParseVector3String(ScenarioChainNodePositionTextBox.Text); - bool change = false; - lock (scenariosyncroot) - { - if (CurrentScenarioNode.Position != v) - { - CurrentScenarioNode.SetPosition(v); - SetScenarioHasChanged(true); - change = true; - } - } - if (change) - { - if (WorldForm != null) - { - WorldForm.SetWidgetPosition(CurrentScenarioNode.Position); - WorldForm.UpdateScenarioGraphics(CurrentScenario, false); - } - } - } - - private void ScenarioChainNodeUnk1TextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.ChainingNode == null) return; - uint hash = 0; - string name = ScenarioChainNodeUnk1TextBox.Text; - if (!uint.TryParse(name, out hash))//don't re-hash hashes - { - hash = JenkHash.GenHash(name); - JenkIndex.Ensure(name); - } - ScenarioChainNodeUnk1HashLabel.Text = "Hash: " + hash.ToString(); - lock (scenariosyncroot) - { - if (CurrentScenarioNode.ChainingNode.Unk1 != hash) - { - CurrentScenarioNode.ChainingNode.Unk1 = hash; - SetScenarioHasChanged(true); - } - } - } - - private void ScenarioChainNodeTypeComboBox_SelectedIndexChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.ChainingNode == null) return; - ScenarioType stype = ScenarioChainNodeTypeComboBox.SelectedItem as ScenarioType; - lock (scenariosyncroot) - { - if (CurrentScenarioNode.ChainingNode.Type != stype) - { - CurrentScenarioNode.ChainingNode.Type = stype; - CurrentScenarioNode.ChainingNode.TypeHash = stype?.NameHash ?? 0; - SetScenarioHasChanged(true); - } - } - UpdateScenarioNodeTreeNode(CurrentScenarioNode); - } - - private void ScenarioChainNodeFirstCheckBox_CheckedChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.ChainingNode == null) return; - bool v = !ScenarioChainNodeFirstCheckBox.Checked; - bool change = false; - lock (scenariosyncroot) - { - if (CurrentScenarioNode.ChainingNode.NotFirst != v) - { - CurrentScenarioNode.ChainingNode.NotFirst = v; - SetScenarioHasChanged(true); - change = true; - } - } - if (change) - { - if (WorldForm != null) - { - WorldForm.UpdateScenarioGraphics(CurrentScenario, false); - } - } - } - - private void ScenarioChainNodeLastCheckBox_CheckedChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.ChainingNode == null) return; - bool v = !ScenarioChainNodeLastCheckBox.Checked; - bool change = false; - lock (scenariosyncroot) - { - if (CurrentScenarioNode.ChainingNode.NotLast != v) - { - CurrentScenarioNode.ChainingNode.NotLast = v; - SetScenarioHasChanged(true); - change = true; - } - } - if (change) - { - if (WorldForm != null) - { - WorldForm.UpdateScenarioGraphics(CurrentScenario, false); - } - } - } - - - private void ScenarioChainAddToProjectButton_Click(object sender, EventArgs e) - { - AddScenarioNodeToProject(); - } - - private void ScenarioChainDeleteButton_Click(object sender, EventArgs e) - { - DeleteScenarioChain(); - } - - private void ScenarioChainEdgesListBox_SelectedIndexChanged(object sender, EventArgs e) - { - if (populatingui) return; - CurrentScenarioChainEdge = ScenarioChainEdgesListBox.SelectedItem as MCScenarioChainingEdge; - populatingui = true; - LoadScenarioChainEdgeTabPage(); - populatingui = false; - } - - private void ScenarioChainAddEdgeButton_Click(object sender, EventArgs e) - { - AddScenarioEdge(); - } - - private void ScenarioChainRemoveEdgeButton_Click(object sender, EventArgs e) - { - RemoveScenarioEdge(); - } - - private void ScenarioChainMoveEdgeUpButton_Click(object sender, EventArgs e) - { - MoveScenarioEdge(false); - } - - private void ScenarioChainMoveEdgeDownButton_Click(object sender, EventArgs e) - { - MoveScenarioEdge(true); - } - - private void ScenarioChainUnk1UpDown_ValueChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.ChainingNode == null) return; - if (CurrentScenarioNode.ChainingNode.Chain == null) return; - byte v = (byte)ScenarioChainUnk1UpDown.Value; - lock (scenariosyncroot) - { - if (CurrentScenarioNode.ChainingNode.Chain.Unk1 != v) - { - CurrentScenarioNode.ChainingNode.Chain.Unk1 = v; - SetScenarioHasChanged(true); - } - } - } - - - private void ScenarioChainEdgeNodeIndexFromUpDown_ValueChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioChainEdge == null) return; - ushort nodeid = (ushort)ScenarioChainEdgeNodeIndexFromUpDown.Value; - bool change = false; - lock (scenariosyncroot) - { - if (CurrentScenarioChainEdge.NodeIndexFrom != nodeid) - { - CurrentScenarioChainEdge.NodeIndexFrom = nodeid; - SetScenarioHasChanged(true); - change = true; - } - } - if (change) - { - UpdateScenarioEdgeLinkage(); - - //refresh the selected item in the list box, to update the text, and the other controls. - ScenarioChainEdgesListBox.Items[ScenarioChainEdgesListBox.SelectedIndex] = ScenarioChainEdgesListBox.SelectedItem; - } - } - - private void ScenarioChainEdgeNodeIndexToUpDown_ValueChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioChainEdge == null) return; - ushort nodeid = (ushort)ScenarioChainEdgeNodeIndexToUpDown.Value; - bool change = false; - lock (scenariosyncroot) - { - if (CurrentScenarioChainEdge.NodeIndexTo != nodeid) - { - CurrentScenarioChainEdge.NodeIndexTo = nodeid; - SetScenarioHasChanged(true); - change = true; - } - } - if (change) - { - UpdateScenarioEdgeLinkage(); - - //refresh the selected item in the list box, to update the text, and the other controls. - ScenarioChainEdgesListBox.Items[ScenarioChainEdgesListBox.SelectedIndex] = ScenarioChainEdgesListBox.SelectedItem; - } - } - - private void ScenarioChainEdgeActionComboBox_SelectedIndexChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioChainEdge == null) return; - Unk_3609807418 v = (Unk_3609807418)ScenarioChainEdgeActionComboBox.SelectedItem; - lock (scenariosyncroot) - { - if (CurrentScenarioChainEdge.Action != v) - { - CurrentScenarioChainEdge.Action = v; - SetScenarioHasChanged(true); - } - } - } - - private void ScenarioChainEdgeNavModeComboBox_SelectedIndexChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioChainEdge == null) return; - Unk_3971773454 v = (Unk_3971773454)ScenarioChainEdgeNavModeComboBox.SelectedItem; - lock (scenariosyncroot) - { - if (CurrentScenarioChainEdge.NavMode != v) - { - CurrentScenarioChainEdge.NavMode = v; - SetScenarioHasChanged(true); - } - } - } - - private void ScenarioChainEdgeNavSpeedComboBox_SelectedIndexChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioChainEdge == null) return; - Unk_941086046 v = (Unk_941086046)ScenarioChainEdgeNavSpeedComboBox.SelectedItem; - lock (scenariosyncroot) - { - if (CurrentScenarioChainEdge.NavSpeed != v) - { - CurrentScenarioChainEdge.NavSpeed = v; - SetScenarioHasChanged(true); - } - } - } - - - private void ScenarioClusterCheckBox_CheckedChanged(object sender, EventArgs e) - { - - } - - private void ScenarioClusterAddToProjectButton_Click(object sender, EventArgs e) - { - AddScenarioNodeToProject(); - } - - private void ScenarioClusterDeleteButton_Click(object sender, EventArgs e) - { - DeleteScenarioCluster(); - } - - private void ScenarioClusterGoToButton_Click(object sender, EventArgs e) - { - if (CurrentScenarioNode == null) return; - if (WorldForm == null) return; - WorldForm.GoToPosition(CurrentScenarioNode.Position); - } - - private void ScenarioClusterCenterTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - Vector3 v = FloatUtil.ParseVector3String(ScenarioClusterCenterTextBox.Text); - bool change = false; - lock (scenariosyncroot) - { - if (CurrentScenarioNode.Position != v) - { - CurrentScenarioNode.SetPosition(v); - SetScenarioHasChanged(true); - change = true; - } - if ((CurrentScenarioNode.Cluster != null) && (CurrentScenarioNode.Cluster.Position != v)) - { - CurrentScenarioNode.Cluster.Position = v; - SetScenarioHasChanged(true); - change = true; - } - } - if (change) - { - if (WorldForm != null) - { - WorldForm.SetWidgetPosition(CurrentScenarioNode.Position); - WorldForm.UpdateScenarioGraphics(CurrentScenario, false); - } - } - } - - private void ScenarioClusterRadiusTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - float r = FloatUtil.Parse(ScenarioClusterRadiusTextBox.Text); - bool change = false; - lock (scenariosyncroot) - { - if ((CurrentScenarioNode.Cluster != null) && (CurrentScenarioNode.Cluster.Radius != r)) - { - CurrentScenarioNode.Cluster.Radius = r; - SetScenarioHasChanged(true); - change = true; - } - } - if (change) - { - if (WorldForm != null) - { - WorldForm.SetWidgetPosition(CurrentScenarioNode.Position); - WorldForm.UpdateScenarioGraphics(CurrentScenario, false); - } - } - } - - private void ScenarioClusterUnk1TextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.Cluster == null) return; - float v = FloatUtil.Parse(ScenarioClusterUnk1TextBox.Text); - lock (scenariosyncroot) - { - if (CurrentScenarioNode.Cluster.Unk1 != v) - { - CurrentScenarioNode.Cluster.Unk1 = v; - SetScenarioHasChanged(true); - } - } - } - - private void ScenarioClusterUnk2CheckBox_CheckedChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.Cluster == null) return; - bool v = ScenarioClusterUnk2CheckBox.Checked; - lock (scenariosyncroot) - { - if (CurrentScenarioNode.Cluster.Unk2 != v) - { - CurrentScenarioNode.Cluster.Unk2 = v; - SetScenarioHasChanged(true); - } - } - } - - private void ScenarioClusterPointsListBox_DoubleClick(object sender, EventArgs e) - { - var item = ScenarioClusterPointsListBox.SelectedItem as MCScenarioPoint; - if (item == null) return; - - var nodes = CurrentScenario?.ScenarioRegion?.Nodes; - if (nodes == null) return; - - ScenarioNode node = null; - foreach (var snode in nodes) - { - if (snode.ClusterMyPoint == item) - { - node = snode; - break; - } - } - - if (node == null) return; - - TrySelectScenarioNodeTreeNode(node); - - } - - private void ScenarioClusterAddPointButton_Click(object sender, EventArgs e) - { - AddScenarioClusterPoint(); - } - - - private void ScenarioClusterPointCheckBox_CheckedChanged(object sender, EventArgs e) - { - - } - - private void ScenarioClusterPointAddToProjectButton_Click(object sender, EventArgs e) - { - AddScenarioNodeToProject(); - } - - private void ScenarioClusterPointDeleteButton_Click(object sender, EventArgs e) - { - DeleteScenarioNode(); - } - - private void ScenarioClusterPointGoToButton_Click(object sender, EventArgs e) - { - if (CurrentScenarioNode == null) return; - if (WorldForm == null) return; - WorldForm.GoToPosition(CurrentScenarioNode.Position); - } - - private void ScenarioClusterPointPositionTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - Vector3 v = FloatUtil.ParseVector3String(ScenarioClusterPointPositionTextBox.Text); - bool change = false; - lock (scenariosyncroot) - { - if (CurrentScenarioNode.Position != v) - { - CurrentScenarioNode.SetPosition(v); - SetScenarioHasChanged(true); - change = true; - } - } - if (change) - { - if (WorldForm != null) - { - WorldForm.SetWidgetPosition(CurrentScenarioNode.Position); - WorldForm.UpdateScenarioGraphics(CurrentScenario, false); - } - } - } - - private void ScenarioClusterPointDirectionTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.ClusterMyPoint == null) return; - float dir = FloatUtil.Parse(ScenarioClusterPointDirectionTextBox.Text); - lock (scenariosyncroot) - { - if (CurrentScenarioNode.ClusterMyPoint.Direction != dir) - { - CurrentScenarioNode.ClusterMyPoint.Direction = dir; - CurrentScenarioNode.Orientation = CurrentScenarioNode.ClusterMyPoint.Orientation; - SetScenarioHasChanged(true); - if (WorldForm != null) - { - WorldForm.SetWidgetRotation(CurrentScenarioNode.Orientation); - } - } - } - } - - private void ScenarioClusterPointTypeComboBox_SelectedIndexChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.ClusterMyPoint == null) return; - ScenarioType stype = ScenarioClusterPointTypeComboBox.SelectedItem as ScenarioType; - lock (scenariosyncroot) - { - if (CurrentScenarioNode.ClusterMyPoint.Type != stype) - { - CurrentScenarioNode.ClusterMyPoint.Type = stype; - SetScenarioHasChanged(true); - } - } - UpdateScenarioNodeTreeNode(CurrentScenarioNode); - - if (CurrentScenarioNode.ChainingNode != null) - { - ScenarioChainNodeTypeComboBox.SelectedItem = stype; - } - } - - private void ScenarioClusterPointModelSetComboBox_SelectedIndexChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.ClusterMyPoint == null) return; - AmbientModelSet mset = ScenarioClusterPointModelSetComboBox.SelectedItem as AmbientModelSet; - lock (scenariosyncroot) - { - if (CurrentScenarioNode.ClusterMyPoint.ModelSet != mset) - { - CurrentScenarioNode.ClusterMyPoint.ModelSet = mset; - SetScenarioHasChanged(true); - } - } - UpdateScenarioNodeTreeNode(CurrentScenarioNode); - } - - private void ScenarioClusterPointInteriorTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.ClusterMyPoint == null) return; - uint hash = 0; - string name = ScenarioClusterPointInteriorTextBox.Text; - if (!uint.TryParse(name, out hash))//don't re-hash hashes - { - hash = JenkHash.GenHash(name); - JenkIndex.Ensure(name); - } - ScenarioClusterPointInteriorHashLabel.Text = "Hash: " + hash.ToString(); - lock (scenariosyncroot) - { - if (CurrentScenarioNode.ClusterMyPoint.InteriorName != hash) - { - CurrentScenarioNode.ClusterMyPoint.InteriorName = hash; - SetScenarioHasChanged(true); - } - } - } - - private void ScenarioClusterPointGroupTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.ClusterMyPoint == null) return; - uint hash = 0; - string name = ScenarioClusterPointGroupTextBox.Text; - if (!uint.TryParse(name, out hash))//don't re-hash hashes - { - hash = JenkHash.GenHash(name); - JenkIndex.Ensure(name); - } - ScenarioClusterPointGroupHashLabel.Text = "Hash: " + hash.ToString(); - lock (scenariosyncroot) - { - if (CurrentScenarioNode.ClusterMyPoint.GroupName != hash) - { - CurrentScenarioNode.ClusterMyPoint.GroupName = hash; - SetScenarioHasChanged(true); - } - } - } - - private void ScenarioClusterPointImapTextBox_TextChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.ClusterMyPoint == null) return; - uint hash = 0; - string name = ScenarioClusterPointImapTextBox.Text; - if (!uint.TryParse(name, out hash))//don't re-hash hashes - { - hash = JenkHash.GenHash(name); - JenkIndex.Ensure(name); - } - ScenarioClusterPointImapHashLabel.Text = "Hash: " + hash.ToString(); - lock (scenariosyncroot) - { - if (CurrentScenarioNode.ClusterMyPoint.IMapName != hash) - { - CurrentScenarioNode.ClusterMyPoint.IMapName = hash; - SetScenarioHasChanged(true); - } - } - } - - private void ScenarioClusterPointTimeStartUpDown_ValueChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.ClusterMyPoint == null) return; - byte t = (byte)ScenarioClusterPointTimeStartUpDown.Value; - lock (scenariosyncroot) - { - if (CurrentScenarioNode.ClusterMyPoint.TimeStart != t) - { - CurrentScenarioNode.ClusterMyPoint.TimeStart = t; - SetScenarioHasChanged(true); - } - } - UpdateScenarioNodeTreeNode(CurrentScenarioNode); - } - - private void ScenarioClusterPointTimeEndUpDown_ValueChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.ClusterMyPoint == null) return; - byte t = (byte)ScenarioClusterPointTimeEndUpDown.Value; - lock (scenariosyncroot) - { - if (CurrentScenarioNode.ClusterMyPoint.TimeEnd != t) - { - CurrentScenarioNode.ClusterMyPoint.TimeEnd = t; - SetScenarioHasChanged(true); - } - } - UpdateScenarioNodeTreeNode(CurrentScenarioNode); - } - - private void ScenarioClusterPointProbabilityUpDown_ValueChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.ClusterMyPoint == null) return; - byte v = (byte)ScenarioClusterPointProbabilityUpDown.Value; - lock (scenariosyncroot) - { - if (CurrentScenarioNode.ClusterMyPoint.Probability != v) - { - CurrentScenarioNode.ClusterMyPoint.Probability = v; - SetScenarioHasChanged(true); - } - } - } - - private void ScenarioClusterPointAnimalFlagUpDown_ValueChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.ClusterMyPoint == null) return; - byte v = (byte)ScenarioClusterPointAnimalFlagUpDown.Value; - lock (scenariosyncroot) - { - if (CurrentScenarioNode.ClusterMyPoint.AvailableMpSp != v) - { - CurrentScenarioNode.ClusterMyPoint.AvailableMpSp = v; - SetScenarioHasChanged(true); - } - } - } - - private void ScenarioClusterPointRadiusUpDown_ValueChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.ClusterMyPoint == null) return; - byte v = (byte)ScenarioClusterPointRadiusUpDown.Value; - lock (scenariosyncroot) - { - if (CurrentScenarioNode.ClusterMyPoint.Radius != v) - { - CurrentScenarioNode.ClusterMyPoint.Radius = v; - SetScenarioHasChanged(true); - } - } - } - - private void ScenarioClusterPointWaitTimeUpDown_ValueChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.ClusterMyPoint == null) return; - byte v = (byte)ScenarioClusterPointWaitTimeUpDown.Value; - lock (scenariosyncroot) - { - if (CurrentScenarioNode.ClusterMyPoint.WaitTime != v) - { - CurrentScenarioNode.ClusterMyPoint.WaitTime = v; - SetScenarioHasChanged(true); - } - } - } - - private void ScenarioClusterPointFlagsUpDown_ValueChanged(object sender, EventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.ClusterMyPoint == null) return; - var iflags = (uint)ScenarioClusterPointFlagsUpDown.Value; - populatingui = true; - for (int i = 0; i < ScenarioClusterPointFlagsCheckedListBox.Items.Count; i++) - { - var c = ((iflags & (1 << i)) > 0); - ScenarioClusterPointFlagsCheckedListBox.SetItemCheckState(i, c ? CheckState.Checked : CheckState.Unchecked); - } - populatingui = false; - Unk_700327466 f = (Unk_700327466)iflags; - lock (scenariosyncroot) - { - if (CurrentScenarioNode.ClusterMyPoint.Flags != f) - { - CurrentScenarioNode.ClusterMyPoint.Flags = f; - SetScenarioHasChanged(true); - } - } - } - - private void ScenarioClusterPointFlagsCheckedListBox_ItemCheck(object sender, ItemCheckEventArgs e) - { - if (populatingui) return; - if (CurrentScenarioNode == null) return; - if (CurrentScenarioNode.ClusterMyPoint == null) return; - uint iflags = 0; - for (int i = 0; i < ScenarioClusterPointFlagsCheckedListBox.Items.Count; i++) - { - if (e.Index == i) - { - if (e.NewValue == CheckState.Checked) - { - iflags += (uint)(1 << i); - } - } - else - { - if (ScenarioClusterPointFlagsCheckedListBox.GetItemChecked(i)) - { - iflags += (uint)(1 << i); - } - } - } - populatingui = true; - ScenarioClusterPointFlagsUpDown.Value = iflags; - populatingui = false; - Unk_700327466 f = (Unk_700327466)iflags; - lock (scenariosyncroot) - { - if (CurrentScenarioNode.ClusterMyPoint.Flags != f) - { - CurrentScenarioNode.ClusterMyPoint.Flags = f; - SetScenarioHasChanged(true); - } - } - } - } -} diff --git a/Project/ProjectFormOLD.resx b/Project/ProjectFormOLD.resx deleted file mode 100644 index 5170a5b..0000000 --- a/Project/ProjectFormOLD.resx +++ /dev/null @@ -1,436 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 - - - - AAEAAAD/////AQAAAAAAAAAMAgAAAFdGYXN0Q29sb3JlZFRleHRCb3gsIF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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////////////w////4 - P///+D////g8//D4MH/geCB/4Dggf+A4IH/wOCD/+DAB//hgAf//gAP//wAAB/AAAAPwAAAD8AAAA/AA - AAfjAAEHgYADAQPgBwEDEAEBAghgAQwIIEH8CCB//Bggf/wYMH/8ODD///h/////////////KAAAABAA - AAAgAAAAAQAYAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///+vv/fL1/v///wAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///4+Vx7/F5v///wAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAP///4CHtrS62////////////////////wAAAAAAAAAAAP////H0/vf6/v// - /////////4yTwrrB4f///+zw+7rA6P39/////wAAAAAAAAAAAP///56l2BkcguXr/P///////42Uw8jO - 6P///ysvjWVqtP///////wAAAAAAAAAAAP////D0/0hPpsDG6////////6y02d7k8////3qAx+/z/f// - /wAAAAAAAAAAAAAAAAAAAP///////////////8zT8V5ns1Rcrdzh9f///////////wAAAAAAAAAAAAAA - AAAAAP////////7+/6ix3nmBxFthtmdwu09WqbC54/v9//r8//j6//39/wAAAAAAAAAAAOjt/H6I0FJc - skpSqHF+wRMahFZhs4iT1AsNc1pgrm52v2RsuO/z/gAAAP////////L2/cLJ7rrD64+V4DY+ozU+mYmU - 0X2Hy1hfss7V8urv/PP2/v///wAAAP///+Pp+d/k9////////+Pp/4uR3ysymW14xYOM0fD0/P///+Xq - +ri/6Pj6/wAAAOrv/j5DnbS75P////////////X4/+/0/ubr+/r7/////////9rh+hgZhKGo2QAAAPDz - /eLn+f////j6/2Nqttrg9////+Hn+P3+//3+/1hescLJ6/////L2/eru/AAAAAAAAAAAAP///8rR70tR - p/3+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AA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//////// - ///////4D/////////AH////////8Af////////wB/////////AH////////8Af////////wB/////// - //AH////////8Af////////wB/////////AH////////8AfwP//////wB8Af//+Af/AHgB///wA/8AcA - H///AB/wBgAf//8AD/AGAB///wAH8AYAH///AAPwBAAf//8AA/AEAD///wAD8AQAP///AAPwBAB///+A - A/AEAP///8AD4AAA////4AcAAAH////wDgAAAf/////8AAAH//////gAAAf/////4AAAAf/////gAAAA - /f//+AAAAAAAD//AAAAAAAAH/4AAAAAAAAf/gAAAAAAAB/+AAAAAAAAH/4AAAAAAAAf/gAAAAAAAB/+A - AAAAAAAP/4AAAAAAAB//wAAAAABAf/4HwAAAAYAf8APAAAADgA/gA+AAAAMAA8AD8AAABwADgAP8AAAf - AAOAA/4AAB8AA4ADAAAAAQADgAIAcA4AgAOABgBwDgBAA4AMAGAMADADwDwAYAwAOAfg+ABgBAAeH//4 - AEAEAB////gAwAYAH///+ADABgAf///4AcAGAB////gBwAcAH///+APAB4A////8B+AHwH//////4A// - ///////gD/////////Af//////////////8= - - - \ No newline at end of file From 010350db7ab45aa7ad68fe63b76a3437b101620b Mon Sep 17 00:00:00 2001 From: dexyfex Date: Tue, 4 Dec 2018 17:09:28 +1100 Subject: [PATCH 24/24] Fixed build warnings --- Project/Panels/GenerateNavMeshPanel.cs | 4 ++-- WorldForm.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Project/Panels/GenerateNavMeshPanel.cs b/Project/Panels/GenerateNavMeshPanel.cs index 2745394..be39eec 100644 --- a/Project/Panels/GenerateNavMeshPanel.cs +++ b/Project/Panels/GenerateNavMeshPanel.cs @@ -944,8 +944,8 @@ namespace CodeWalker.Project.Panels //find the next bottom and top indexes, step by the max offset int nqib = qib; int nqit = qit; - int ndyb = 0; - int ndyt = 0; + //int ndyb = 0; + //int ndyt = 0; diff --git a/WorldForm.cs b/WorldForm.cs index 36b9b99..0c002c7 100644 --- a/WorldForm.cs +++ b/WorldForm.cs @@ -78,7 +78,7 @@ namespace CodeWalker int ControlBrushTimer = 0; bool ControlBrushEnabled; - float ControlBrushRadius; + //float ControlBrushRadius; Entity camEntity = new Entity(); PedEntity pedEntity = new PedEntity();