diff --git a/pk3DS/Structs.cs b/pk3DS/Structs.cs index 8a7ccdc..e515f9b 100644 --- a/pk3DS/Structs.cs +++ b/pk3DS/Structs.cs @@ -1092,15 +1092,16 @@ public class ZoneEntities public byte[] Data; // File details unknown. public Int32 Length; - public Int32 FurnitureCount, NPCCount, WarpCount, TriggerCount; - public Int32 UNKNOWN; - public Byte[] UnknownBytes; + public Int32 FurnitureCount, NPCCount, WarpCount, TriggerCount, UnknownCount; public EntityFurniture[] Furniture; public EntityNPC[] NPCs; public EntityWarp[] Warps; public EntityTrigger[] Triggers; + public EntityUnk[] Unks; + public Int32 ScriptLength; public Byte[] ScriptData; + public ZoneEntities(byte[] data) { Data = data; @@ -1113,7 +1114,7 @@ public ZoneEntities(byte[] data) NPCs = new EntityNPC[NPCCount = br.ReadByte()]; Warps = new EntityWarp[WarpCount = br.ReadByte()]; Triggers = new EntityTrigger[TriggerCount = br.ReadByte()]; - UNKNOWN = br.ReadInt32(); + Unks = new EntityUnk[UnknownCount = br.ReadInt32()]; // not sure if there's other types or if the remaining 3 bytes are padding. // Load Entitites for (int i = 0; i < FurnitureCount; i++) @@ -1122,14 +1123,10 @@ public ZoneEntities(byte[] data) NPCs[i] = new EntityNPC(br.ReadBytes(EntityNPC.Size)); for (int i = 0; i < WarpCount; i++) Warps[i] = new EntityWarp(br.ReadBytes(EntityWarp.Size)); - for (int i = 0; i < TriggerCount; i++) + for (int i = 0; i < TriggerCount; i++) Triggers[i] = new EntityTrigger(br.ReadBytes(EntityTrigger.Size)); - - int ScriptDataOffset = Length + 4; - - UnknownBytes = (br.BaseStream.Position == ScriptDataOffset) - ? new byte[0] - : br.ReadBytes(ScriptDataOffset - (int)br.BaseStream.Position); + for (int i = 0; i < UnknownCount; i++) + Unks[i] = new EntityUnk(br.ReadBytes(EntityUnk.Size)); // Load Script Data ScriptLength = br.ReadInt32(); @@ -1144,34 +1141,38 @@ public byte[] Write() byte[] N = new byte[NPCs.Length * EntityNPC.Size]; for (int i = 0; i < NPCs.Length; i++) - NPCs[i].Write().CopyTo(F, i * EntityNPC.Size); + NPCs[i].Write().CopyTo(N, i * EntityNPC.Size); byte[] W = new byte[Warps.Length * EntityWarp.Size]; for (int i = 0; i < Warps.Length; i++) - Warps[i].Write().CopyTo(F, i * EntityWarp.Size); + Warps[i].Write().CopyTo(W, i * EntityWarp.Size); byte[] T = new byte[Triggers.Length * EntityTrigger.Size]; for (int i = 0; i < Triggers.Length; i++) - Triggers[i].Write().CopyTo(F, i * EntityTrigger.Size); + Triggers[i].Write().CopyTo(T, i * EntityTrigger.Size); + + byte[] U = new byte[Unks.Length * EntityUnk.Size]; + for (int i = 0; i < Triggers.Length; i++) + Unks[i].Write().CopyTo(U, i * EntityUnk.Size); // Assemble entity information - byte[] OWEntities = F.Concat(N).Concat(W).Concat(T).ToArray(); - byte[] EntityCounts = {(byte)Furniture.Length, (byte)NPCs.Length, (byte)Warps.Length, (byte)Triggers.Length}; - byte[] EntityLength = BitConverter.GetBytes(8 + OWEntities.Length + 4 + UnknownBytes.Length); - byte[] UNKNOWNCT = BitConverter.GetBytes(UNKNOWN); - + byte[] OWEntities = F.Concat(N).Concat(W).Concat(T).Concat(U).ToArray(); + byte[] EntityLength = BitConverter.GetBytes(8 + OWEntities.Length); + byte[] EntityCounts = {(byte)Furniture.Length, (byte)NPCs.Length, (byte)Warps.Length, (byte)Triggers.Length, (byte)Unks.Length, 0, 0, 0 }; + // Reassemble NPC portion - byte[] OWEntityData = EntityLength.Concat(EntityCounts).Concat(UNKNOWNCT).Concat(OWEntities).Concat(UnknownBytes).ToArray(); - - // Add padding zeroes if required (yield above section % 4 == 0) - if (OWEntityData.Length % 4 != 0) - Array.Resize(ref OWEntityData, OWEntityData.Length + 4 - (OWEntityData.Length % 4)); + byte[] OWEntityData = EntityLength.Concat(EntityCounts).Concat(OWEntities).ToArray(); // Reassemble Script portion byte[] OWScriptData = ScriptData; + + byte[] finalData = OWEntityData.Concat(OWScriptData).ToArray(); - // Return final data - return OWEntityData.Concat(OWScriptData).ToArray(); + // Add padding zeroes if required (yield size % 4 == 0) + if (finalData.Length % 4 != 0) + Array.Resize(ref finalData, finalData.Length + 4 - (finalData.Length % 4)); + + return finalData; } // Entity Classes @@ -1254,6 +1255,22 @@ public byte[] Write() return Raw; } } + public class EntityUnk + { + // Usable Attributes + // Unknown + + public byte[] Raw; + internal static readonly byte Size = 0x18; + public EntityUnk(byte[] data = null) + { + Raw = data ?? new byte[Size]; + } + public byte[] Write() + { + return Raw; + } + } } public class ZoneScript { diff --git a/pk3DS/Subforms/OWSE.cs b/pk3DS/Subforms/OWSE.cs index 2a4eb0d..a48dad9 100644 --- a/pk3DS/Subforms/OWSE.cs +++ b/pk3DS/Subforms/OWSE.cs @@ -189,19 +189,22 @@ private void getZoneData() } private void getOWSData() { - File.WriteAllBytes("zd.bin", CurrentZone.Entities.Data); - RTB_F.Text = RTB_N.Text = RTB_W.Text = RTB_T.Text = string.Empty; + // Reset Fields a little. + RTB_F.Text = RTB_N.Text = RTB_W.Text = RTB_T.Text = RTB_U.Text = string.Empty; + fEntry = nEntry = wEntry = tEntry = uEntry = -1; // Set Counters NUD_FurnCount.Value = CurrentZone.Entities.FurnitureCount; changeFurnitureCount(null, null); NUD_NPCCount.Value = CurrentZone.Entities.NPCCount; changeNPCCount(null, null); NUD_WarpCount.Value = CurrentZone.Entities.WarpCount; changeWarpCount(null, null); NUD_TrigCount.Value = CurrentZone.Entities.TriggerCount; changeTriggerCount(null, null); + NUD_UnkCount.Value = CurrentZone.Entities.UnknownCount; changeUnkCount(null, null); // Collect/Load Data NUD_FE.Value = (NUD_FE.Maximum < 0) ? -1 : 0; changeFurniture(null, null); NUD_NE.Value = (NUD_NE.Maximum < 0) ? -1 : 0; changeOverworld(null, null); NUD_WE.Value = (NUD_WE.Maximum < 0) ? -1 : 0; changeWarp(null, null); NUD_TE.Value = (NUD_TE.Maximum < 0) ? -1 : 0; changeTrigger(null, null); + NUD_UE.Value = (NUD_UE.Maximum < 0) ? -1 : 0; changeUnk(null, null); // Process Scripts OWScriptData = CurrentZone.Entities.ScriptData; @@ -251,10 +254,10 @@ private void getOWSData() // Overworld Functions #region Enabling - internal static void toggleEnable(NumericUpDown master, NumericUpDown slave) + internal static void toggleEnable(NumericUpDown master, NumericUpDown slave, GroupBox display) { slave.Maximum = master.Value - 1; - slave.Enabled = slave.Maximum > -1; + slave.Enabled = display.Visible = slave.Maximum > -1; slave.Minimum = (slave.Enabled) ? 0 : -1; } private void changeFurnitureCount(object sender, EventArgs e) @@ -266,7 +269,7 @@ private void changeFurnitureCount(object sender, EventArgs e) for (int i = 0; i < count; i++) CurrentZone.Entities.Furniture[i] = CurrentZone.Entities.Furniture[i] ?? new Zone.ZoneEntities.EntityFurniture(); - toggleEnable(NUD_FurnCount, NUD_FE); + toggleEnable(NUD_FurnCount, NUD_FE, GB_F); } private void changeNPCCount(object sender, EventArgs e) { @@ -277,7 +280,7 @@ private void changeNPCCount(object sender, EventArgs e) for (int i = 0; i < count; i++) CurrentZone.Entities.NPCs[i] = CurrentZone.Entities.NPCs[i] ?? new Zone.ZoneEntities.EntityNPC(); - toggleEnable(NUD_NPCCount, NUD_NE); + toggleEnable(NUD_NPCCount, NUD_NE, GB_N); } private void changeWarpCount(object sender, EventArgs e) { @@ -288,7 +291,7 @@ private void changeWarpCount(object sender, EventArgs e) for (int i = 0; i < count; i++) CurrentZone.Entities.Warps[i] = CurrentZone.Entities.Warps[i] ?? new Zone.ZoneEntities.EntityWarp(); - toggleEnable(NUD_WarpCount, NUD_WE); + toggleEnable(NUD_WarpCount, NUD_WE, GB_W); } private void changeTriggerCount(object sender, EventArgs e) { @@ -299,10 +302,21 @@ private void changeTriggerCount(object sender, EventArgs e) for (int i = 0; i < count; i++) CurrentZone.Entities.Triggers[i] = CurrentZone.Entities.Triggers[i] ?? new Zone.ZoneEntities.EntityTrigger(); - toggleEnable(NUD_TrigCount, NUD_TE); + toggleEnable(NUD_TrigCount, NUD_TE, GB_T); + } + private void changeUnkCount(object sender, EventArgs e) + { + // Resize array + int count = (int)NUD_UnkCount.Value; + CurrentZone.Entities.UnknownCount = count; + Array.Resize(ref CurrentZone.Entities.Unks, count); + for (int i = 0; i < count; i++) + CurrentZone.Entities.Unks[i] = CurrentZone.Entities.Unks[i] ?? new Zone.ZoneEntities.EntityUnk(); + + toggleEnable(NUD_UnkCount, NUD_UE, GB_U); } #endregion - private int fEntry, nEntry, wEntry, tEntry = -1; + private int fEntry, nEntry, wEntry, tEntry, uEntry = -1; private void changeFurniture(object sender, EventArgs e) { if (NUD_FE.Value < 0) return; @@ -390,6 +404,21 @@ private void changeTrigger(object sender, EventArgs e) var Trigger = CurrentZone.Entities.Triggers[tEntry]; RTB_T.Text = Util.getHexString(Trigger.Raw); } + private void changeUnk(object sender, EventArgs e) + { + if (NUD_UE.Value < 0) return; + + // Set Old Data + if (uEntry > 0) + { + // No attributes editable atm + } + uEntry = (int)NUD_UE.Value; + + // Load New Data + var Unk = CurrentZone.Entities.Unks[uEntry]; + RTB_U.Text = Util.getHexString(Unk.Raw); + } private void B_HLCMD_Click(object sender, EventArgs e) { @@ -518,5 +547,10 @@ private void B_Redraw_Click(object sender, EventArgs e) CB_LocationID.SelectedIndex = 0; Util.Alert("All images have been dumped to " + folder + "."); } + + private void changeNModel(object sender, EventArgs e) + { + L_ModelAsHex.Text = "0x"+((int)NUD_NModel.Value).ToString("X4"); + } } } \ No newline at end of file diff --git a/pk3DS/Subforms/OWSE.designer.cs b/pk3DS/Subforms/OWSE.designer.cs index 50f24fa..481a9e6 100644 --- a/pk3DS/Subforms/OWSE.designer.cs +++ b/pk3DS/Subforms/OWSE.designer.cs @@ -59,11 +59,9 @@ private void InitializeComponent() this.NUD_WMap = new System.Windows.Forms.NumericUpDown(); this.L_DestWarpTile = new System.Windows.Forms.Label(); this.L_DestMap = new System.Windows.Forms.Label(); - this.RTB_W = new System.Windows.Forms.RichTextBox(); this.NUD_WE = new System.Windows.Forms.NumericUpDown(); this.L_WE = new System.Windows.Forms.Label(); this.tb_Trigger = new System.Windows.Forms.TabPage(); - this.RTB_T = new System.Windows.Forms.RichTextBox(); this.NUD_TE = new System.Windows.Forms.NumericUpDown(); this.L_TE = new System.Windows.Forms.Label(); this.tb_Script = new System.Windows.Forms.TabPage(); @@ -117,6 +115,19 @@ private void InitializeComponent() this.L_NScript = new System.Windows.Forms.Label(); this.NUD_NFlag = new System.Windows.Forms.NumericUpDown(); this.L_NFlag = new System.Windows.Forms.Label(); + this.tb_OUnk = new System.Windows.Forms.TabPage(); + this.NUD_UnkCount = new System.Windows.Forms.NumericUpDown(); + this.L_Unk = new System.Windows.Forms.Label(); + this.NUD_UE = new System.Windows.Forms.NumericUpDown(); + this.L_UE = new System.Windows.Forms.Label(); + this.L_ModelAsHex = new System.Windows.Forms.Label(); + this.GB_F = new System.Windows.Forms.GroupBox(); + this.GB_W = new System.Windows.Forms.GroupBox(); + this.RTB_W = new System.Windows.Forms.RichTextBox(); + this.GB_T = new System.Windows.Forms.GroupBox(); + this.RTB_T = new System.Windows.Forms.RichTextBox(); + this.GB_U = new System.Windows.Forms.GroupBox(); + this.RTB_U = new System.Windows.Forms.RichTextBox(); this.tabControl1.SuspendLayout(); this.tb_ZoneData.SuspendLayout(); this.tb_OWSC.SuspendLayout(); @@ -152,6 +163,13 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.NUD_NFace)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NUD_NScript)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NUD_NFlag)).BeginInit(); + this.tb_OUnk.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.NUD_UnkCount)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUD_UE)).BeginInit(); + this.GB_F.SuspendLayout(); + this.GB_W.SuspendLayout(); + this.GB_T.SuspendLayout(); + this.GB_U.SuspendLayout(); this.SuspendLayout(); // // CB_LocationID @@ -225,6 +243,8 @@ private void InitializeComponent() // // tb_OWSC // + this.tb_OWSC.Controls.Add(this.NUD_UnkCount); + this.tb_OWSC.Controls.Add(this.L_Unk); this.tb_OWSC.Controls.Add(this.L_OWEntities); this.tb_OWSC.Controls.Add(this.NUD_TrigCount); this.tb_OWSC.Controls.Add(this.L_TriggerCount); @@ -334,6 +354,7 @@ private void InitializeComponent() this.tc_OWSC.Controls.Add(this.tb_Overworld); this.tc_OWSC.Controls.Add(this.tb_Warp); this.tc_OWSC.Controls.Add(this.tb_Trigger); + this.tc_OWSC.Controls.Add(this.tb_OUnk); this.tc_OWSC.Controls.Add(this.tb_Script); this.tc_OWSC.Location = new System.Drawing.Point(6, 6); this.tc_OWSC.Name = "tc_OWSC"; @@ -343,7 +364,7 @@ private void InitializeComponent() // // tb_Furniture // - this.tb_Furniture.Controls.Add(this.RTB_F); + this.tb_Furniture.Controls.Add(this.GB_F); this.tb_Furniture.Controls.Add(this.NUD_FE); this.tb_Furniture.Controls.Add(this.L_FE); this.tb_Furniture.Location = new System.Drawing.Point(4, 22); @@ -357,7 +378,7 @@ private void InitializeComponent() // RTB_F // this.RTB_F.Font = new System.Drawing.Font("Courier New", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.RTB_F.Location = new System.Drawing.Point(2, 268); + this.RTB_F.Location = new System.Drawing.Point(6, 275); this.RTB_F.Name = "RTB_F"; this.RTB_F.ReadOnly = true; this.RTB_F.Size = new System.Drawing.Size(245, 42); @@ -367,7 +388,7 @@ private void InitializeComponent() // // NUD_FE // - this.NUD_FE.Location = new System.Drawing.Point(75, 3); + this.NUD_FE.Location = new System.Drawing.Point(75, 11); this.NUD_FE.Maximum = new decimal(new int[] { 255, 0, @@ -380,7 +401,7 @@ private void InitializeComponent() // // L_FE // - this.L_FE.Location = new System.Drawing.Point(3, 3); + this.L_FE.Location = new System.Drawing.Point(3, 11); this.L_FE.Name = "L_FE"; this.L_FE.Size = new System.Drawing.Size(66, 15); this.L_FE.TabIndex = 424; @@ -423,7 +444,7 @@ private void InitializeComponent() // // NUD_NE // - this.NUD_NE.Location = new System.Drawing.Point(75, 3); + this.NUD_NE.Location = new System.Drawing.Point(75, 11); this.NUD_NE.Maximum = new decimal(new int[] { 255, 0, @@ -436,7 +457,7 @@ private void InitializeComponent() // // L_NE // - this.L_NE.Location = new System.Drawing.Point(3, 3); + this.L_NE.Location = new System.Drawing.Point(3, 11); this.L_NE.Name = "L_NE"; this.L_NE.Size = new System.Drawing.Size(66, 15); this.L_NE.TabIndex = 426; @@ -457,12 +478,7 @@ private void InitializeComponent() // // tb_Warp // - this.tb_Warp.Controls.Add(this.L_WarpDest); - this.tb_Warp.Controls.Add(this.NUD_WTile); - this.tb_Warp.Controls.Add(this.NUD_WMap); - this.tb_Warp.Controls.Add(this.L_DestWarpTile); - this.tb_Warp.Controls.Add(this.L_DestMap); - this.tb_Warp.Controls.Add(this.RTB_W); + this.tb_Warp.Controls.Add(this.GB_W); this.tb_Warp.Controls.Add(this.NUD_WE); this.tb_Warp.Controls.Add(this.L_WE); this.tb_Warp.Location = new System.Drawing.Point(4, 22); @@ -474,7 +490,7 @@ private void InitializeComponent() // // L_WarpDest // - this.L_WarpDest.Location = new System.Drawing.Point(188, 34); + this.L_WarpDest.Location = new System.Drawing.Point(58, 31); this.L_WarpDest.Name = "L_WarpDest"; this.L_WarpDest.Size = new System.Drawing.Size(120, 15); this.L_WarpDest.TabIndex = 432; @@ -483,7 +499,7 @@ private void InitializeComponent() // // NUD_WTile // - this.NUD_WTile.Location = new System.Drawing.Point(129, 54); + this.NUD_WTile.Location = new System.Drawing.Point(125, 70); this.NUD_WTile.Maximum = new decimal(new int[] { 255, 0, @@ -495,7 +511,7 @@ private void InitializeComponent() // // NUD_WMap // - this.NUD_WMap.Location = new System.Drawing.Point(129, 33); + this.NUD_WMap.Location = new System.Drawing.Point(125, 49); this.NUD_WMap.Maximum = new decimal(new int[] { 999, 0, @@ -507,7 +523,7 @@ private void InitializeComponent() // // L_DestWarpTile // - this.L_DestWarpTile.Location = new System.Drawing.Point(3, 55); + this.L_DestWarpTile.Location = new System.Drawing.Point(-1, 71); this.L_DestWarpTile.Name = "L_DestWarpTile"; this.L_DestWarpTile.Size = new System.Drawing.Size(120, 15); this.L_DestWarpTile.TabIndex = 429; @@ -516,27 +532,16 @@ private void InitializeComponent() // // L_DestMap // - this.L_DestMap.Location = new System.Drawing.Point(3, 34); + this.L_DestMap.Location = new System.Drawing.Point(-1, 50); this.L_DestMap.Name = "L_DestMap"; this.L_DestMap.Size = new System.Drawing.Size(120, 15); this.L_DestMap.TabIndex = 428; this.L_DestMap.Text = "Destination Map:"; this.L_DestMap.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // RTB_W - // - this.RTB_W.Font = new System.Drawing.Font("Courier New", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.RTB_W.Location = new System.Drawing.Point(2, 268); - this.RTB_W.Name = "RTB_W"; - this.RTB_W.ReadOnly = true; - this.RTB_W.Size = new System.Drawing.Size(245, 42); - this.RTB_W.TabIndex = 427; - this.RTB_W.Text = "00 11 22 33 44 55 66 77 88 99 AA BB CC DD EE FF 00 11 22 33 44 55 66 77 88 99 AA " + - "BB CC DD EE FF 00 11 22 33 44 55 66 77 88 99 AA BB CC DD EE FF "; // // NUD_WE // - this.NUD_WE.Location = new System.Drawing.Point(75, 3); + this.NUD_WE.Location = new System.Drawing.Point(75, 11); this.NUD_WE.Maximum = new decimal(new int[] { 255, 0, @@ -549,7 +554,7 @@ private void InitializeComponent() // // L_WE // - this.L_WE.Location = new System.Drawing.Point(3, 3); + this.L_WE.Location = new System.Drawing.Point(3, 11); this.L_WE.Name = "L_WE"; this.L_WE.Size = new System.Drawing.Size(66, 15); this.L_WE.TabIndex = 426; @@ -558,7 +563,7 @@ private void InitializeComponent() // // tb_Trigger // - this.tb_Trigger.Controls.Add(this.RTB_T); + this.tb_Trigger.Controls.Add(this.GB_T); this.tb_Trigger.Controls.Add(this.NUD_TE); this.tb_Trigger.Controls.Add(this.L_TE); this.tb_Trigger.Location = new System.Drawing.Point(4, 22); @@ -567,21 +572,10 @@ private void InitializeComponent() this.tb_Trigger.TabIndex = 3; this.tb_Trigger.Text = "Trigger"; this.tb_Trigger.UseVisualStyleBackColor = true; - // - // RTB_T - // - this.RTB_T.Font = new System.Drawing.Font("Courier New", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.RTB_T.Location = new System.Drawing.Point(2, 268); - this.RTB_T.Name = "RTB_T"; - this.RTB_T.ReadOnly = true; - this.RTB_T.Size = new System.Drawing.Size(245, 42); - this.RTB_T.TabIndex = 427; - this.RTB_T.Text = "00 11 22 33 44 55 66 77 88 99 AA BB CC DD EE FF 00 11 22 33 44 55 66 77 88 99 AA " + - "BB CC DD EE FF 00 11 22 33 44 55 66 77 88 99 AA BB CC DD EE FF "; // // NUD_TE // - this.NUD_TE.Location = new System.Drawing.Point(75, 3); + this.NUD_TE.Location = new System.Drawing.Point(75, 11); this.NUD_TE.Maximum = new decimal(new int[] { 255, 0, @@ -594,7 +588,7 @@ private void InitializeComponent() // // L_TE // - this.L_TE.Location = new System.Drawing.Point(3, 3); + this.L_TE.Location = new System.Drawing.Point(3, 11); this.L_TE.Name = "L_TE"; this.L_TE.Size = new System.Drawing.Size(66, 15); this.L_TE.TabIndex = 426; @@ -1020,6 +1014,7 @@ private void InitializeComponent() // // GB_N // + this.GB_N.Controls.Add(this.L_ModelAsHex); this.GB_N.Controls.Add(this.NUD_NFlag); this.GB_N.Controls.Add(this.L_NFlag); this.GB_N.Controls.Add(this.NUD_NScript); @@ -1035,7 +1030,7 @@ private void InitializeComponent() this.GB_N.Controls.Add(this.RTB_N); this.GB_N.Controls.Add(this.NUD_NID); this.GB_N.Controls.Add(this.L_NID); - this.GB_N.Location = new System.Drawing.Point(6, 60); + this.GB_N.Location = new System.Drawing.Point(6, 40); this.GB_N.Name = "GB_N"; this.GB_N.Size = new System.Drawing.Size(256, 323); this.GB_N.TabIndex = 436; @@ -1053,6 +1048,7 @@ private void InitializeComponent() this.NUD_NModel.Name = "NUD_NModel"; this.NUD_NModel.Size = new System.Drawing.Size(53, 20); this.NUD_NModel.TabIndex = 437; + this.NUD_NModel.ValueChanged += new System.EventHandler(this.changeNModel); // // L_NModel // @@ -1167,6 +1163,153 @@ private void InitializeComponent() this.L_NFlag.TabIndex = 446; this.L_NFlag.Text = "Spawn Flag:"; this.L_NFlag.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // tb_OUnk + // + this.tb_OUnk.Controls.Add(this.GB_U); + this.tb_OUnk.Controls.Add(this.NUD_UE); + this.tb_OUnk.Controls.Add(this.L_UE); + this.tb_OUnk.Location = new System.Drawing.Point(4, 22); + this.tb_OUnk.Name = "tb_OUnk"; + this.tb_OUnk.Padding = new System.Windows.Forms.Padding(3); + this.tb_OUnk.Size = new System.Drawing.Size(334, 436); + this.tb_OUnk.TabIndex = 5; + this.tb_OUnk.Text = "Unk"; + this.tb_OUnk.UseVisualStyleBackColor = true; + // + // NUD_UnkCount + // + this.NUD_UnkCount.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.NUD_UnkCount.Location = new System.Drawing.Point(422, 108); + this.NUD_UnkCount.Maximum = new decimal(new int[] { + 255, + 0, + 0, + 0}); + this.NUD_UnkCount.Name = "NUD_UnkCount"; + this.NUD_UnkCount.Size = new System.Drawing.Size(53, 20); + this.NUD_UnkCount.TabIndex = 428; + this.NUD_UnkCount.ValueChanged += new System.EventHandler(this.changeUnkCount); + // + // L_Unk + // + this.L_Unk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.L_Unk.Location = new System.Drawing.Point(350, 108); + this.L_Unk.Name = "L_Unk"; + this.L_Unk.Size = new System.Drawing.Size(66, 15); + this.L_Unk.TabIndex = 429; + this.L_Unk.Text = "Unk:"; + this.L_Unk.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // NUD_UE + // + this.NUD_UE.Location = new System.Drawing.Point(75, 11); + this.NUD_UE.Maximum = new decimal(new int[] { + 255, + 0, + 0, + 0}); + this.NUD_UE.Name = "NUD_UE"; + this.NUD_UE.Size = new System.Drawing.Size(53, 20); + this.NUD_UE.TabIndex = 427; + this.NUD_UE.ValueChanged += new System.EventHandler(this.changeUnk); + // + // L_UE + // + this.L_UE.Location = new System.Drawing.Point(3, 11); + this.L_UE.Name = "L_UE"; + this.L_UE.Size = new System.Drawing.Size(66, 15); + this.L_UE.TabIndex = 428; + this.L_UE.Text = "Entry:"; + this.L_UE.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // L_ModelAsHex + // + this.L_ModelAsHex.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.L_ModelAsHex.AutoSize = true; + this.L_ModelAsHex.Location = new System.Drawing.Point(152, 44); + this.L_ModelAsHex.Name = "L_ModelAsHex"; + this.L_ModelAsHex.Size = new System.Drawing.Size(29, 13); + this.L_ModelAsHex.TabIndex = 448; + this.L_ModelAsHex.Text = "HEX"; + // + // GB_F + // + this.GB_F.Controls.Add(this.RTB_F); + this.GB_F.Location = new System.Drawing.Point(6, 40); + this.GB_F.Name = "GB_F"; + this.GB_F.Size = new System.Drawing.Size(256, 323); + this.GB_F.TabIndex = 437; + this.GB_F.TabStop = false; + this.GB_F.Text = "Info:"; + // + // GB_W + // + this.GB_W.Controls.Add(this.RTB_W); + this.GB_W.Controls.Add(this.L_WarpDest); + this.GB_W.Controls.Add(this.L_DestMap); + this.GB_W.Controls.Add(this.NUD_WTile); + this.GB_W.Controls.Add(this.L_DestWarpTile); + this.GB_W.Controls.Add(this.NUD_WMap); + this.GB_W.Location = new System.Drawing.Point(6, 40); + this.GB_W.Name = "GB_W"; + this.GB_W.Size = new System.Drawing.Size(256, 323); + this.GB_W.TabIndex = 438; + this.GB_W.TabStop = false; + this.GB_W.Text = "Info:"; + // + // RTB_W + // + this.RTB_W.Font = new System.Drawing.Font("Courier New", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.RTB_W.Location = new System.Drawing.Point(6, 275); + this.RTB_W.Name = "RTB_W"; + this.RTB_W.ReadOnly = true; + this.RTB_W.Size = new System.Drawing.Size(245, 42); + this.RTB_W.TabIndex = 425; + this.RTB_W.Text = "00 11 22 33 44 55 66 77 88 99 AA BB CC DD EE FF 00 11 22 33 44 55 66 77 88 99 AA " + + "BB CC DD EE FF 00 11 22 33 44 55 66 77 88 99 AA BB CC DD EE FF "; + // + // GB_T + // + this.GB_T.Controls.Add(this.RTB_T); + this.GB_T.Location = new System.Drawing.Point(6, 40); + this.GB_T.Name = "GB_T"; + this.GB_T.Size = new System.Drawing.Size(256, 323); + this.GB_T.TabIndex = 439; + this.GB_T.TabStop = false; + this.GB_T.Text = "Info:"; + // + // RTB_T + // + this.RTB_T.Font = new System.Drawing.Font("Courier New", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.RTB_T.Location = new System.Drawing.Point(6, 275); + this.RTB_T.Name = "RTB_T"; + this.RTB_T.ReadOnly = true; + this.RTB_T.Size = new System.Drawing.Size(245, 42); + this.RTB_T.TabIndex = 425; + this.RTB_T.Text = "00 11 22 33 44 55 66 77 88 99 AA BB CC DD EE FF 00 11 22 33 44 55 66 77 88 99 AA " + + "BB CC DD EE FF 00 11 22 33 44 55 66 77 88 99 AA BB CC DD EE FF "; + // + // GB_U + // + this.GB_U.Controls.Add(this.RTB_U); + this.GB_U.Location = new System.Drawing.Point(6, 40); + this.GB_U.Name = "GB_U"; + this.GB_U.Size = new System.Drawing.Size(256, 323); + this.GB_U.TabIndex = 440; + this.GB_U.TabStop = false; + this.GB_U.Text = "Info:"; + // + // RTB_U + // + this.RTB_U.Font = new System.Drawing.Font("Courier New", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.RTB_U.Location = new System.Drawing.Point(6, 275); + this.RTB_U.Name = "RTB_U"; + this.RTB_U.ReadOnly = true; + this.RTB_U.Size = new System.Drawing.Size(245, 42); + this.RTB_U.TabIndex = 425; + this.RTB_U.Text = "00 11 22 33 44 55 66 77 88 99 AA BB CC DD EE FF 00 11 22 33 44 55 66 77 88 99 AA " + + "BB CC DD EE FF 00 11 22 33 44 55 66 77 88 99 AA BB CC DD EE FF "; // // OWSE // @@ -1219,12 +1362,20 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.NUD_Flavor)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.PB_Map)).EndInit(); this.GB_N.ResumeLayout(false); + this.GB_N.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.NUD_NModel)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.NUD_NX)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.NUD_NY)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.NUD_NFace)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.NUD_NScript)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.NUD_NFlag)).EndInit(); + this.tb_OUnk.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.NUD_UnkCount)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUD_UE)).EndInit(); + this.GB_F.ResumeLayout(false); + this.GB_W.ResumeLayout(false); + this.GB_T.ResumeLayout(false); + this.GB_U.ResumeLayout(false); this.ResumeLayout(false); this.PerformLayout(); @@ -1270,8 +1421,6 @@ private void InitializeComponent() private System.Windows.Forms.TabPage tb_Script; private System.Windows.Forms.RichTextBox RTB_ZDMaster; private System.Windows.Forms.RichTextBox RTB_F; - private System.Windows.Forms.RichTextBox RTB_W; - private System.Windows.Forms.RichTextBox RTB_T; private System.Windows.Forms.RichTextBox RTB_OWSCMD; private System.Windows.Forms.NumericUpDown NUD_WTile; private System.Windows.Forms.NumericUpDown NUD_WMap; @@ -1321,6 +1470,19 @@ private void InitializeComponent() private System.Windows.Forms.Label L_NScript; private System.Windows.Forms.NumericUpDown NUD_NFlag; private System.Windows.Forms.Label L_NFlag; + private System.Windows.Forms.NumericUpDown NUD_UnkCount; + private System.Windows.Forms.Label L_Unk; + private System.Windows.Forms.TabPage tb_OUnk; + private System.Windows.Forms.NumericUpDown NUD_UE; + private System.Windows.Forms.Label L_UE; + private System.Windows.Forms.Label L_ModelAsHex; + private System.Windows.Forms.GroupBox GB_F; + private System.Windows.Forms.GroupBox GB_W; + private System.Windows.Forms.RichTextBox RTB_W; + private System.Windows.Forms.GroupBox GB_T; + private System.Windows.Forms.RichTextBox RTB_T; + private System.Windows.Forms.GroupBox GB_U; + private System.Windows.Forms.RichTextBox RTB_U; } }