From a2f507193b4240ee682c705efc4e1d684c26784b Mon Sep 17 00:00:00 2001 From: Kurt Date: Sun, 8 Nov 2015 18:16:01 -0800 Subject: [PATCH] Internal facelift using Script class All script handling and attributes are now accessible within the object, easier for rewriting when done. --- pk3DS/Structs.cs | 45 +++++++- pk3DS/Subforms/OWSE.cs | 170 ++++++----------------------- pk3DS/Subforms/OWSE.designer.cs | 182 ++++++++++++++++---------------- 3 files changed, 166 insertions(+), 231 deletions(-) diff --git a/pk3DS/Structs.cs b/pk3DS/Structs.cs index 7de4369..31c415b 100644 --- a/pk3DS/Structs.cs +++ b/pk3DS/Structs.cs @@ -1344,12 +1344,15 @@ public byte[] Write() public class ZoneScript { public byte[] Data; // File details unknown. + public Script Script; public ZoneScript(byte[] data) { Data = data; + Script = new Script(data); } public byte[] Write() { + Data = Script.Write(); return Data; } } @@ -1420,15 +1423,53 @@ public byte[] Write() } } } - public class Script { + public int Length { get { return BitConverter.ToInt32(Raw, 0x00); } } + public uint Magic { get { return BitConverter.ToUInt32(Raw, 0x04); } } + // case 0x0A0AF1E0: code = read_code_block(f); break; + // case 0x0A0AF1EF: debug = read_debug_block(f); break; + public bool Debug { get { return Magic == 0x0A0AF1EF; } } + + public ushort PtrOffset { get { return BitConverter.ToUInt16(Raw, 0x08); } } + public ushort PtrCount { get { return BitConverter.ToUInt16(Raw, 0x0A); } } + + public int ScriptInstructionStart { get { return BitConverter.ToInt32(Raw, 0x0C); } } + public int ScriptMovementStart { get { return BitConverter.ToInt32(Raw, 0x10); } } + public int FinalOffset { get { return BitConverter.ToInt32(Raw, 0x14); } } + public int AllocatedMemory { get { return BitConverter.ToInt32(Raw, 0x18); } } + + // Generated Attributes + public int CompressedLength { get { return Length - ScriptInstructionStart; } } + public byte[] CompressedBytes { get { return Raw.Skip(ScriptInstructionStart).ToArray(); } } + public int DecompressedLength { get { return FinalOffset - ScriptInstructionStart; } } + public uint[] DecompressedInstructions { get { return Scripts.quickDecompress(CompressedBytes, DecompressedLength/4); } } + + public uint[] ScriptCommands { get { return DecompressedInstructions.Take((ScriptMovementStart - ScriptInstructionStart) / 4).ToArray(); } } + public uint[] MoveCommands { get { return DecompressedInstructions.Skip((ScriptMovementStart - ScriptInstructionStart) / 4).ToArray(); } } + public string[] ParseScript { get { return Scripts.parseScript(ScriptCommands); } } + public string[] ParseMoves { get { return Scripts.parseMovement(MoveCommands); } } + + public string Info + { + get + { + return "Data Start: 0x" + ScriptInstructionStart.ToString("X4") + + Environment.NewLine + "Movement Offset: 0x" + ScriptMovementStart.ToString("X4") + + Environment.NewLine + "Total Used Size: 0x" + FinalOffset.ToString("X4") + + Environment.NewLine + "Reserved Size: 0x" + AllocatedMemory.ToString("X4") + + Environment.NewLine + "Compressed Len: 0x" + CompressedLength.ToString("X4") + + Environment.NewLine + "Decompressed Len: 0x" + DecompressedLength.ToString("X4") + + Environment.NewLine + "Compression Ratio: " + + ((DecompressedLength - CompressedLength)/(decimal)DecompressedLength).ToString("p1"); + } + } + public byte[] Raw; public Script(byte[] data = null) { Raw = data ?? new byte[0]; } - public byte[] Write() { return Raw; diff --git a/pk3DS/Subforms/OWSE.cs b/pk3DS/Subforms/OWSE.cs index 6f38898..1d48805 100644 --- a/pk3DS/Subforms/OWSE.cs +++ b/pk3DS/Subforms/OWSE.cs @@ -66,6 +66,7 @@ private void openQuick(string[] encdata) } private int entry = -1; + private Zone CurrentZone; private byte[][] locationData; private string[] rawLocations; private void CB_LocationID_SelectedIndexChanged(object sender, EventArgs e) @@ -128,57 +129,7 @@ private void setEntry() //File.WriteAllBytes(filepaths[entry], raw); } - private byte[] OWScriptData; - private Zone CurrentZone; - - private void getScriptData() - { - byte[] data = locationData[2]; - if (data.Length > 4) - { - byte[] ScriptData = data; - int length = BitConverter.ToInt32(ScriptData, 0); - Array.Resize(ref ScriptData, length); // Cap Size - - RTB_MS.Lines = Scripts.getHexLines(ScriptData); - - int start = BitConverter.ToInt32(ScriptData, 0xC); - int moves = BitConverter.ToInt32(ScriptData, 0x10); - int finaloffset = BitConverter.ToInt32(ScriptData, 0x14); - int reserved = BitConverter.ToInt32(ScriptData, 0x18); - int compressedLength = length - start; - int decompressedLength = finaloffset - start; - - L_MSSCDesc.Text = "Data Start: 0x" + start.ToString("X4") - + Environment.NewLine + "Movement Offset: 0x" + moves.ToString("X4") - + Environment.NewLine + "Total Used Size: 0x" + finaloffset.ToString("X4") - + Environment.NewLine + "Reserved Size: 0x" + reserved.ToString("X4") - + Environment.NewLine + "Compressed Len: 0x" + compressedLength.ToString("X4") - + Environment.NewLine + "Decompressed Len: 0x" + decompressedLength.ToString("X4"); - - byte[] compressed = ScriptData.Skip(start).ToArray(); - // string c = Util.getHexString(compressed); - uint[] decompressed = Scripts.quickDecompress(compressed, decompressedLength/4) ?? new uint[0]; - // string d = Util.getHexString(decompressed); - - RTB_MSCMD.Lines = Scripts.getHexLines(decompressed); - - if (decompressedLength/4 != decompressed.Length) - RTB_MSCMD.Text = RTB_MSP.Text = "DCMP FAIL"; - else - { - uint[] rawCMD = decompressed.Take((moves - start)/4).ToArray(); - string[] instructions = Scripts.parseScript(rawCMD); - uint[] moveCMD = decompressed.Skip((moves - start)/4).ToArray(); - string[] movements = Scripts.parseMovement(moveCMD); - RTB_MSP.Lines = instructions.Concat(movements).ToArray(); - } - - } - else - RTB_MSCMD.Lines = RTB_MS.Lines = new[] {"No Data"}; - } - + // Loading of Data private void getZoneData() { L_ZDPreview.Text = "Text File: " + CurrentZone.ZD.TextFile @@ -208,50 +159,42 @@ private void getOWSData() NUD_UE.Value = (NUD_UE.Maximum < 0) ? -1 : 0; changeUnk(null, null); // Process Scripts - OWScriptData = CurrentZone.Entities.Script.Raw; - if (OWScriptData.Length > 4) + var script = CurrentZone.Entities.Script; + if (script.Raw.Length > 4) { - byte[] ScriptData = OWScriptData; - int length = CurrentZone.Entities.Script.Raw.Length; + RTB_OS.Lines = Scripts.getHexLines(script.Raw); + L_OWSCDesc.Text = script.Info; - RTB_OS.Lines = Scripts.getHexLines(ScriptData); + uint[] Instructions = script.DecompressedInstructions; + RTB_OWSCMD.Lines = Scripts.getHexLines(Instructions); - int start = BitConverter.ToInt32(ScriptData, 0xC); - int moves = BitConverter.ToInt32(ScriptData, 0x10); - int finaloffset = BitConverter.ToInt32(ScriptData, 0x14); - int reserved = BitConverter.ToInt32(ScriptData, 0x18); - int compressedLength = length - start; - int decompressedLength = finaloffset - start; - - L_OWSCDesc.Text = "Data Start: 0x" + start.ToString("X4") - + Environment.NewLine + "Movement Offset: 0x" + moves.ToString("X4") - + Environment.NewLine + "Total Used Size: 0x" + finaloffset.ToString("X4") - + Environment.NewLine + "Reserved Size: 0x" + reserved.ToString("X4") - + Environment.NewLine + "Compressed Len: 0x" + compressedLength.ToString("X4") - + Environment.NewLine + "Decompressed Len: 0x" + decompressedLength.ToString("X4"); - - byte[] compressed = ScriptData.Skip(start).ToArray(); - // string c = Util.getHexString(compressed); - uint[] decompressed = Scripts.quickDecompress(compressed, decompressedLength/4) ?? new uint[0]; - // byte[] decompressed = Scripts.decompressScript(compressed) ?? new byte[0]; -- DEPRECATED - // string d = Util.getHexString(decompressed); - - RTB_OWSCMD.Lines = Scripts.getHexLines(decompressed); - - if (decompressedLength/4 != decompressed.Length) + if (script.DecompressedLength / 4 != Instructions.Length) RTB_OWSCMD.Text = RTB_OSP.Text = "DCMP FAIL"; else - { - uint[] rawCMD = decompressed.Take((moves - start) / 4).ToArray(); - string[] instructions = Scripts.parseScript(rawCMD); - uint[] moveCMD = decompressed.Skip((moves - start) / 4).ToArray(); - string[] movements = Scripts.parseMovement(moveCMD); - RTB_OSP.Lines = instructions.Concat(movements).ToArray(); - } + RTB_OSP.Lines = script.ParseScript.Concat(script.ParseMoves).ToArray(); } else RTB_OWSCMD.Lines = RTB_OS.Lines = new[] {"No Data"}; } + private void getScriptData() + { + var script = CurrentZone.MapScript.Script; + if (script.Raw.Length > 4) + { + RTB_MS.Lines = Scripts.getHexLines(script.Raw); + L_MSSCDesc.Text = script.Info; + + uint[] Instructions = script.DecompressedInstructions; + RTB_MSCMD.Lines = Scripts.getHexLines(Instructions); + + if (script.DecompressedLength / 4 != Instructions.Length) + RTB_MSCMD.Text = RTB_OSP.Text = "DCMP FAIL"; + else + RTB_MSP.Lines = script.ParseScript.Concat(script.ParseMoves).ToArray(); + } + else + RTB_MSCMD.Lines = RTB_OS.Lines = new[] { "No Data" }; + } // Overworld Functions #region Enabling @@ -438,59 +381,10 @@ private void tabMain_DragDrop(object sender, DragEventArgs e) if (new FileInfo(path).Length < 10000000) parseScriptInput(File.ReadAllBytes(path)); } - internal static void parseScriptInput(byte[] OWScriptData) + private void parseScriptInput(byte[] data) { - string[] ret, raw, raw2; - if (OWScriptData.Length > 4) - { - byte[] ScriptData = OWScriptData; - int length = BitConverter.ToInt32(ScriptData, 0); - Array.Resize(ref ScriptData, length); // Cap Size - - raw = Scripts.getHexLines(ScriptData); - - int start = BitConverter.ToInt32(ScriptData, 0xC); - int moves = BitConverter.ToInt32(ScriptData, 0x10); - int finaloffset = BitConverter.ToInt32(ScriptData, 0x14); - // int reserved = BitConverter.ToInt32(ScriptData, 0x18); - // int compressedLength = length - start; - int decompressedLength = finaloffset - start; - - byte[] compressed = ScriptData.Skip(start).ToArray(); - // string c = Util.getHexString(compressed); - uint[] decompressed = Scripts.quickDecompress(compressed, decompressedLength / 4) ?? new uint[0]; - - raw2 = Scripts.getHexLines(decompressed); - - if (decompressedLength / 4 != decompressed.Length) - raw2 = ret = new [] {"DCMP FAIL"}; - else - { - uint[] rawCMD = decompressed.Take((moves - start) / 4).ToArray(); - string[] instructions = Scripts.parseScript(rawCMD); - uint[] moveCMD = decompressed.Skip((moves - start) / 4).ToArray(); - string[] movements = Scripts.parseMovement(moveCMD); - ret = instructions.Concat(movements).ToArray(); - } - } - else - raw = raw2 = ret = new[] { "No Data" }; - - if (ModifierKeys == Keys.Control) - { - Clipboard.SetText(String.Join(Environment.NewLine, raw2)); - //Util.Alert("Set cmd to clipboard."); - } - else if (ModifierKeys == Keys.Alt) - { - Clipboard.SetText(String.Join(Environment.NewLine, raw)); - //Util.Alert("Set raw to clipboard."); - } - else - { - Clipboard.SetText(String.Join(Environment.NewLine, ret)); - //Util.Alert("Set parse to clipboard."); - } + Script scr = new Script(data); + RTB_CompressedScript.Lines = Scripts.getHexLines(scr.CompressedBytes); System.Media.SystemSounds.Asterisk.Play(); } diff --git a/pk3DS/Subforms/OWSE.designer.cs b/pk3DS/Subforms/OWSE.designer.cs index deabc67..18c9def 100644 --- a/pk3DS/Subforms/OWSE.designer.cs +++ b/pk3DS/Subforms/OWSE.designer.cs @@ -80,12 +80,12 @@ private void InitializeComponent() this.NUD_WMap = new System.Windows.Forms.NumericUpDown(); 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.tb_Trigger1 = new System.Windows.Forms.TabPage(); this.GB_T = new System.Windows.Forms.GroupBox(); 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_OUnk = new System.Windows.Forms.TabPage(); + this.tb_Trigger2 = new System.Windows.Forms.TabPage(); this.GB_U = new System.Windows.Forms.GroupBox(); this.RTB_U = new System.Windows.Forms.RichTextBox(); this.NUD_UE = new System.Windows.Forms.NumericUpDown(); @@ -127,6 +127,11 @@ private void InitializeComponent() this.NUD_Flavor = new System.Windows.Forms.NumericUpDown(); this.PB_Map = new System.Windows.Forms.PictureBox(); this.tb_Dev = new System.Windows.Forms.TabPage(); + this.label1 = new System.Windows.Forms.Label(); + this.RTB_CompressedScript = new System.Windows.Forms.RichTextBox(); + this.RTB_DecompressedScript = new System.Windows.Forms.RichTextBox(); + this.L_Comp = new System.Windows.Forms.Label(); + this.B_DumpMaps = new System.Windows.Forms.Button(); this.B_DumpUnk = new System.Windows.Forms.Button(); this.B_DumpTrigger = new System.Windows.Forms.Button(); this.B_DumpWarp = new System.Windows.Forms.Button(); @@ -134,11 +139,6 @@ private void InitializeComponent() this.B_DumpFurniture = new System.Windows.Forms.Button(); this.L_ZDPreview = new System.Windows.Forms.Label(); this.B_HLCMD = new System.Windows.Forms.Button(); - this.B_DumpMaps = new System.Windows.Forms.Button(); - this.L_Comp = new System.Windows.Forms.Label(); - this.RTB_CompressedScript = new System.Windows.Forms.RichTextBox(); - this.RTB_DecompressedScript = new System.Windows.Forms.RichTextBox(); - this.label1 = new System.Windows.Forms.Label(); this.tabControl1.SuspendLayout(); this.tb_ZoneData.SuspendLayout(); this.tb_OWSC.SuspendLayout(); @@ -165,10 +165,10 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.NUD_WTile)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NUD_WMap)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NUD_WE)).BeginInit(); - this.tb_Trigger.SuspendLayout(); + this.tb_Trigger1.SuspendLayout(); this.GB_T.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.NUD_TE)).BeginInit(); - this.tb_OUnk.SuspendLayout(); + this.tb_Trigger2.SuspendLayout(); this.GB_U.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.NUD_UE)).BeginInit(); this.tb_Script.SuspendLayout(); @@ -390,13 +390,13 @@ private void InitializeComponent() this.tc_OWSC.Controls.Add(this.tb_Furniture); 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_Trigger1); + this.tc_OWSC.Controls.Add(this.tb_Trigger2); this.tc_OWSC.Controls.Add(this.tb_Script); this.tc_OWSC.Location = new System.Drawing.Point(6, 6); this.tc_OWSC.Name = "tc_OWSC"; this.tc_OWSC.SelectedIndex = 0; - this.tc_OWSC.Size = new System.Drawing.Size(342, 462); + this.tc_OWSC.Size = new System.Drawing.Size(345, 462); this.tc_OWSC.TabIndex = 415; // // tb_Furniture @@ -407,7 +407,7 @@ private void InitializeComponent() this.tb_Furniture.Location = new System.Drawing.Point(4, 22); this.tb_Furniture.Name = "tb_Furniture"; this.tb_Furniture.Padding = new System.Windows.Forms.Padding(3); - this.tb_Furniture.Size = new System.Drawing.Size(334, 436); + this.tb_Furniture.Size = new System.Drawing.Size(337, 436); this.tb_Furniture.TabIndex = 0; this.tb_Furniture.Text = "Furniture"; this.tb_Furniture.UseVisualStyleBackColor = true; @@ -463,7 +463,7 @@ private void InitializeComponent() this.tb_Overworld.Location = new System.Drawing.Point(4, 22); this.tb_Overworld.Name = "tb_Overworld"; this.tb_Overworld.Padding = new System.Windows.Forms.Padding(3); - this.tb_Overworld.Size = new System.Drawing.Size(334, 436); + this.tb_Overworld.Size = new System.Drawing.Size(337, 436); this.tb_Overworld.TabIndex = 1; this.tb_Overworld.Text = "Overworld"; this.tb_Overworld.UseVisualStyleBackColor = true; @@ -692,7 +692,7 @@ private void InitializeComponent() this.tb_Warp.Controls.Add(this.L_WE); this.tb_Warp.Location = new System.Drawing.Point(4, 22); this.tb_Warp.Name = "tb_Warp"; - this.tb_Warp.Size = new System.Drawing.Size(334, 436); + this.tb_Warp.Size = new System.Drawing.Size(337, 436); this.tb_Warp.TabIndex = 2; this.tb_Warp.Text = "Warp"; this.tb_Warp.UseVisualStyleBackColor = true; @@ -797,17 +797,17 @@ private void InitializeComponent() this.L_WE.Text = "Entry:"; this.L_WE.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // tb_Trigger + // tb_Trigger1 // - 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); - this.tb_Trigger.Name = "tb_Trigger"; - this.tb_Trigger.Size = new System.Drawing.Size(334, 436); - this.tb_Trigger.TabIndex = 3; - this.tb_Trigger.Text = "Trigger"; - this.tb_Trigger.UseVisualStyleBackColor = true; + this.tb_Trigger1.Controls.Add(this.GB_T); + this.tb_Trigger1.Controls.Add(this.NUD_TE); + this.tb_Trigger1.Controls.Add(this.L_TE); + this.tb_Trigger1.Location = new System.Drawing.Point(4, 22); + this.tb_Trigger1.Name = "tb_Trigger1"; + this.tb_Trigger1.Size = new System.Drawing.Size(337, 436); + this.tb_Trigger1.TabIndex = 3; + this.tb_Trigger1.Text = "Trigger1"; + this.tb_Trigger1.UseVisualStyleBackColor = true; // // GB_T // @@ -852,18 +852,18 @@ private void InitializeComponent() this.L_TE.Text = "Entry:"; this.L_TE.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // - // tb_OUnk + // tb_Trigger2 // - 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; + this.tb_Trigger2.Controls.Add(this.GB_U); + this.tb_Trigger2.Controls.Add(this.NUD_UE); + this.tb_Trigger2.Controls.Add(this.L_UE); + this.tb_Trigger2.Location = new System.Drawing.Point(4, 22); + this.tb_Trigger2.Name = "tb_Trigger2"; + this.tb_Trigger2.Padding = new System.Windows.Forms.Padding(3); + this.tb_Trigger2.Size = new System.Drawing.Size(337, 436); + this.tb_Trigger2.TabIndex = 5; + this.tb_Trigger2.Text = "Trigger2"; + this.tb_Trigger2.UseVisualStyleBackColor = true; // // GB_U // @@ -916,9 +916,9 @@ private void InitializeComponent() this.tb_Script.Controls.Add(this.RTB_OWSCMD); this.tb_Script.Location = new System.Drawing.Point(4, 22); this.tb_Script.Name = "tb_Script"; - this.tb_Script.Size = new System.Drawing.Size(334, 436); + this.tb_Script.Size = new System.Drawing.Size(337, 436); this.tb_Script.TabIndex = 4; - this.tb_Script.Text = "ScriptData"; + this.tb_Script.Text = "Script"; this.tb_Script.UseVisualStyleBackColor = true; // // RTB_OSP @@ -930,7 +930,7 @@ private void InitializeComponent() this.RTB_OSP.Location = new System.Drawing.Point(6, 234); this.RTB_OSP.Name = "RTB_OSP"; this.RTB_OSP.ReadOnly = true; - this.RTB_OSP.Size = new System.Drawing.Size(328, 202); + this.RTB_OSP.Size = new System.Drawing.Size(331, 202); this.RTB_OSP.TabIndex = 425; this.RTB_OSP.Text = "Parse Output"; // @@ -1326,6 +1326,54 @@ private void InitializeComponent() this.tb_Dev.Text = "Dev"; this.tb_Dev.UseVisualStyleBackColor = true; // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(395, 224); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(78, 13); + this.label1.TabIndex = 430; + this.label1.Text = "Decompressed"; + // + // RTB_CompressedScript + // + this.RTB_CompressedScript.Font = new System.Drawing.Font("Courier New", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.RTB_CompressedScript.Location = new System.Drawing.Point(304, 240); + this.RTB_CompressedScript.Name = "RTB_CompressedScript"; + this.RTB_CompressedScript.Size = new System.Drawing.Size(85, 225); + this.RTB_CompressedScript.TabIndex = 429; + this.RTB_CompressedScript.Text = "Script CMDs"; + this.RTB_CompressedScript.TextChanged += new System.EventHandler(this.pasteScript); + // + // RTB_DecompressedScript + // + this.RTB_DecompressedScript.Font = new System.Drawing.Font("Courier New", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.RTB_DecompressedScript.Location = new System.Drawing.Point(395, 240); + this.RTB_DecompressedScript.Name = "RTB_DecompressedScript"; + this.RTB_DecompressedScript.ReadOnly = true; + this.RTB_DecompressedScript.Size = new System.Drawing.Size(85, 225); + this.RTB_DecompressedScript.TabIndex = 428; + this.RTB_DecompressedScript.Text = "Raw Data"; + // + // L_Comp + // + this.L_Comp.AutoSize = true; + this.L_Comp.Location = new System.Drawing.Point(301, 224); + this.L_Comp.Name = "L_Comp"; + this.L_Comp.Size = new System.Drawing.Size(65, 13); + this.L_Comp.TabIndex = 426; + this.L_Comp.Text = "Compressed"; + // + // B_DumpMaps + // + this.B_DumpMaps.Location = new System.Drawing.Point(149, 6); + this.B_DumpMaps.Name = "B_DumpMaps"; + this.B_DumpMaps.Size = new System.Drawing.Size(89, 39); + this.B_DumpMaps.TabIndex = 425; + this.B_DumpMaps.Text = "Dump all Maps"; + this.B_DumpMaps.UseVisualStyleBackColor = true; + this.B_DumpMaps.Click += new System.EventHandler(this.B_DumpMaps_Click); + // // B_DumpUnk // this.B_DumpUnk.Location = new System.Drawing.Point(6, 186); @@ -1395,54 +1443,6 @@ private void InitializeComponent() this.B_HLCMD.UseVisualStyleBackColor = true; this.B_HLCMD.Click += new System.EventHandler(this.B_HLCMD_Click); // - // B_DumpMaps - // - this.B_DumpMaps.Location = new System.Drawing.Point(149, 6); - this.B_DumpMaps.Name = "B_DumpMaps"; - this.B_DumpMaps.Size = new System.Drawing.Size(89, 39); - this.B_DumpMaps.TabIndex = 425; - this.B_DumpMaps.Text = "Dump all Maps"; - this.B_DumpMaps.UseVisualStyleBackColor = true; - this.B_DumpMaps.Click += new System.EventHandler(this.B_DumpMaps_Click); - // - // L_Comp - // - this.L_Comp.AutoSize = true; - this.L_Comp.Location = new System.Drawing.Point(301, 224); - this.L_Comp.Name = "L_Comp"; - this.L_Comp.Size = new System.Drawing.Size(65, 13); - this.L_Comp.TabIndex = 426; - this.L_Comp.Text = "Compressed"; - // - // RTB_CompressedScript - // - this.RTB_CompressedScript.Font = new System.Drawing.Font("Courier New", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.RTB_CompressedScript.Location = new System.Drawing.Point(304, 240); - this.RTB_CompressedScript.Name = "RTB_CompressedScript"; - this.RTB_CompressedScript.Size = new System.Drawing.Size(85, 225); - this.RTB_CompressedScript.TabIndex = 429; - this.RTB_CompressedScript.Text = "Script CMDs"; - this.RTB_CompressedScript.TextChanged += new System.EventHandler(this.pasteScript); - // - // RTB_DecompressedScript - // - this.RTB_DecompressedScript.Font = new System.Drawing.Font("Courier New", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.RTB_DecompressedScript.Location = new System.Drawing.Point(395, 240); - this.RTB_DecompressedScript.Name = "RTB_DecompressedScript"; - this.RTB_DecompressedScript.ReadOnly = true; - this.RTB_DecompressedScript.Size = new System.Drawing.Size(85, 225); - this.RTB_DecompressedScript.TabIndex = 428; - this.RTB_DecompressedScript.Text = "Raw Data"; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(395, 224); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(78, 13); - this.label1.TabIndex = 430; - this.label1.Text = "Decompressed"; - // // OWSE // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -1487,10 +1487,10 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.NUD_WTile)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.NUD_WMap)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.NUD_WE)).EndInit(); - this.tb_Trigger.ResumeLayout(false); + this.tb_Trigger1.ResumeLayout(false); this.GB_T.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.NUD_TE)).EndInit(); - this.tb_OUnk.ResumeLayout(false); + this.tb_Trigger2.ResumeLayout(false); this.GB_U.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.NUD_UE)).EndInit(); this.tb_Script.ResumeLayout(false); @@ -1531,7 +1531,7 @@ private void InitializeComponent() private System.Windows.Forms.TabPage tb_Overworld; private System.Windows.Forms.RichTextBox RTB_N; private System.Windows.Forms.TabPage tb_Warp; - private System.Windows.Forms.TabPage tb_Trigger; + private System.Windows.Forms.TabPage tb_Trigger1; private System.Windows.Forms.RichTextBox RTB_OWSC; private System.Windows.Forms.RichTextBox RTB_MapSC; private System.Windows.Forms.RichTextBox RTB_Encounter; @@ -1606,7 +1606,7 @@ private void InitializeComponent() 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.TabPage tb_Trigger2; private System.Windows.Forms.NumericUpDown NUD_UE; private System.Windows.Forms.Label L_UE; private System.Windows.Forms.Label L_ModelAsHex;