From 256300d99a7f64b87631cb36ec3df38cf49d3d80 Mon Sep 17 00:00:00 2001 From: Kurt Date: Tue, 10 Nov 2015 21:33:48 -0800 Subject: [PATCH] Add separate map view window Also uncropped the map images for self explanatory coordinates. --- pk3DS/Subforms/MapPermView.Designer.cs | 192 +++++++++++++++++++++++++ pk3DS/Subforms/MapPermView.cs | 84 +++++++++++ pk3DS/Subforms/MapPermView.resx | 120 ++++++++++++++++ pk3DS/Subforms/OWSE.cs | 59 ++------ pk3DS/Subforms/OWSE.designer.cs | 154 ++------------------ pk3DS/pk3DS.csproj | 9 ++ 6 files changed, 433 insertions(+), 185 deletions(-) create mode 100644 pk3DS/Subforms/MapPermView.Designer.cs create mode 100644 pk3DS/Subforms/MapPermView.cs create mode 100644 pk3DS/Subforms/MapPermView.resx diff --git a/pk3DS/Subforms/MapPermView.Designer.cs b/pk3DS/Subforms/MapPermView.Designer.cs new file mode 100644 index 0000000..81573fe --- /dev/null +++ b/pk3DS/Subforms/MapPermView.Designer.cs @@ -0,0 +1,192 @@ +namespace pk3DS.Subforms +{ + partial class MapPermView + { + /// + /// 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.L_MapCoord = new System.Windows.Forms.Label(); + this.PAN_MAP = new System.Windows.Forms.Panel(); + this.PB_Map = new System.Windows.Forms.PictureBox(); + this.CHK_AutoDraw = new System.Windows.Forms.CheckBox(); + this.B_Redraw = new System.Windows.Forms.Button(); + this.L_Scale = new System.Windows.Forms.Label(); + this.NUD_Scale = new System.Windows.Forms.NumericUpDown(); + this.L_Flavor = new System.Windows.Forms.Label(); + this.NUD_Flavor = new System.Windows.Forms.NumericUpDown(); + this.PAN_MAP.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.PB_Map)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUD_Scale)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUD_Flavor)).BeginInit(); + this.SuspendLayout(); + // + // L_MapCoord + // + this.L_MapCoord.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.L_MapCoord.Location = new System.Drawing.Point(349, 2); + this.L_MapCoord.Name = "L_MapCoord"; + this.L_MapCoord.Size = new System.Drawing.Size(131, 28); + this.L_MapCoord.TabIndex = 20; + this.L_MapCoord.Text = "V:0x00000000\r\nX: 1 Y: 1"; + this.L_MapCoord.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // PAN_MAP + // + this.PAN_MAP.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.PAN_MAP.AutoScroll = true; + this.PAN_MAP.Controls.Add(this.PB_Map); + this.PAN_MAP.Location = new System.Drawing.Point(9, 31); + this.PAN_MAP.Name = "PAN_MAP"; + this.PAN_MAP.Size = new System.Drawing.Size(470, 430); + this.PAN_MAP.TabIndex = 19; + // + // PB_Map + // + this.PB_Map.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; + this.PB_Map.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.PB_Map.Location = new System.Drawing.Point(0, 0); + this.PB_Map.Name = "PB_Map"; + this.PB_Map.Size = new System.Drawing.Size(470, 430); + this.PB_Map.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; + this.PB_Map.TabIndex = 2; + this.PB_Map.TabStop = false; + this.PB_Map.MouseMove += new System.Windows.Forms.MouseEventHandler(this.hoverMap); + // + // CHK_AutoDraw + // + this.CHK_AutoDraw.AutoSize = true; + this.CHK_AutoDraw.Location = new System.Drawing.Point(267, 2); + this.CHK_AutoDraw.Name = "CHK_AutoDraw"; + this.CHK_AutoDraw.Size = new System.Drawing.Size(76, 17); + this.CHK_AutoDraw.TabIndex = 18; + this.CHK_AutoDraw.Text = "Auto-Draw"; + this.CHK_AutoDraw.UseVisualStyleBackColor = true; + // + // B_Redraw + // + this.B_Redraw.Location = new System.Drawing.Point(186, 5); + this.B_Redraw.Name = "B_Redraw"; + this.B_Redraw.Size = new System.Drawing.Size(75, 23); + this.B_Redraw.TabIndex = 17; + this.B_Redraw.Text = "Redraw"; + this.B_Redraw.UseVisualStyleBackColor = true; + this.B_Redraw.Click += new System.EventHandler(this.B_Redraw_Click); + // + // L_Scale + // + this.L_Scale.AutoSize = true; + this.L_Scale.Location = new System.Drawing.Point(100, 9); + this.L_Scale.Name = "L_Scale"; + this.L_Scale.Size = new System.Drawing.Size(37, 13); + this.L_Scale.TabIndex = 16; + this.L_Scale.Text = "Scale:"; + // + // NUD_Scale + // + this.NUD_Scale.Location = new System.Drawing.Point(143, 7); + this.NUD_Scale.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.NUD_Scale.Name = "NUD_Scale"; + this.NUD_Scale.Size = new System.Drawing.Size(37, 20); + this.NUD_Scale.TabIndex = 15; + this.NUD_Scale.Value = new decimal(new int[] { + 3, + 0, + 0, + 0}); + // + // L_Flavor + // + this.L_Flavor.AutoSize = true; + this.L_Flavor.Location = new System.Drawing.Point(12, 9); + this.L_Flavor.Name = "L_Flavor"; + this.L_Flavor.Size = new System.Drawing.Size(39, 13); + this.L_Flavor.TabIndex = 14; + this.L_Flavor.Text = "Flavor:"; + // + // NUD_Flavor + // + this.NUD_Flavor.Location = new System.Drawing.Point(57, 7); + this.NUD_Flavor.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.NUD_Flavor.Name = "NUD_Flavor"; + this.NUD_Flavor.Size = new System.Drawing.Size(37, 20); + this.NUD_Flavor.TabIndex = 13; + this.NUD_Flavor.Value = new decimal(new int[] { + 5, + 0, + 0, + 0}); + // + // MapPermView + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(489, 467); + this.Controls.Add(this.L_MapCoord); + this.Controls.Add(this.PAN_MAP); + this.Controls.Add(this.CHK_AutoDraw); + this.Controls.Add(this.B_Redraw); + this.Controls.Add(this.L_Scale); + this.Controls.Add(this.NUD_Scale); + this.Controls.Add(this.L_Flavor); + this.Controls.Add(this.NUD_Flavor); + this.Name = "MapPermView"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "MapPermView"; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MapPermView_FormClosing); + this.PAN_MAP.ResumeLayout(false); + this.PAN_MAP.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.PB_Map)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUD_Scale)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUD_Flavor)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label L_MapCoord; + private System.Windows.Forms.Panel PAN_MAP; + private System.Windows.Forms.PictureBox PB_Map; + private System.Windows.Forms.CheckBox CHK_AutoDraw; + private System.Windows.Forms.Button B_Redraw; + private System.Windows.Forms.Label L_Scale; + private System.Windows.Forms.NumericUpDown NUD_Scale; + private System.Windows.Forms.Label L_Flavor; + private System.Windows.Forms.NumericUpDown NUD_Flavor; + + } +} \ No newline at end of file diff --git a/pk3DS/Subforms/MapPermView.cs b/pk3DS/Subforms/MapPermView.cs new file mode 100644 index 0000000..5f069c3 --- /dev/null +++ b/pk3DS/Subforms/MapPermView.cs @@ -0,0 +1,84 @@ +using System; +using System.Drawing; +using System.IO; +using System.Windows.Forms; + +namespace pk3DS.Subforms +{ + public partial class MapPermView : Form + { + public MapPermView() + { + InitializeComponent(); + } + + private ToolTip mapCoord = new ToolTip(); + public int mapScale = -1; + public int DrawMap = -1; + public void drawMap(int Map) + { + DrawMap = Map; + PB_Map.Image = (CHK_AutoDraw.Checked) ? getMapImage() : null; + } + public Image getMapImage(bool crop = false) + { + // Load MM + byte[][] MM = CTR.mini.unpackMini(File.ReadAllBytes(OWSE.MapMatrixes[DrawMap]), "MM"); + var mm = new MapMatrix(MM[0]); + + // Load GR TileMaps + for (int i = 0; i < mm.EntryList.Length; i++) + { + if (mm.EntryList[i] == 0xFFFF) // Mystery Zone + continue; + byte[][] GR = CTR.mini.unpackMini(File.ReadAllBytes(OWSE.MapGRs[mm.EntryList[i]]), "GR"); + mm.Entries[i] = new MapMatrix.Entry(GR[0]); + } + Image img = mm.Preview((int)NUD_Scale.Value, (int)NUD_Flavor.Value); + if (crop) + img = Util.TrimBitmap((Bitmap)img); + mapScale = (int)NUD_Scale.Value; + OWSE.mm = mm; + return img; + } + + // UI + private void hoverMap(object sender, MouseEventArgs e) + { + if (mapScale < 0) + return; + + int X = e.X / (mapScale); + int Y = e.Y / (mapScale); + + int entryX = X/40; + int entryY = Y/40; + + int entry = entryY*(PB_Map.Image.Width/40/mapScale) + entryX; + int epX = X%40; + int epY = Y%40; + int tile = epY * 40 + epX; + try + { + var tileVal = (OWSE.mm.Entries[entry] == null) + ? "No Tile" + : OWSE.mm.Entries[entry].Tiles[tile].ToString("X8"); + + L_MapCoord.Text = String.Format("V:0x{3}{2}X:{0,3} Y:{1,3}", X, Y, Environment.NewLine, tileVal); + } + catch { } + } + private void B_Redraw_Click(object sender, EventArgs e) + { + if (DrawMap != -1) + PB_Map.Image = getMapImage(); + } + + private void MapPermView_FormClosing(object sender, FormClosingEventArgs e) + { + CHK_AutoDraw.Checked = false; + Hide(); + e.Cancel = true; + } + } +} diff --git a/pk3DS/Subforms/MapPermView.resx b/pk3DS/Subforms/MapPermView.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/pk3DS/Subforms/MapPermView.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/pk3DS/Subforms/OWSE.cs b/pk3DS/Subforms/OWSE.cs index 090c92b..5fc7ff2 100644 --- a/pk3DS/Subforms/OWSE.cs +++ b/pk3DS/Subforms/OWSE.cs @@ -4,6 +4,7 @@ using System.IO; using System.Linq; using System.Windows.Forms; +using pk3DS.Subforms; namespace pk3DS { @@ -18,10 +19,11 @@ public OWSE() MapMatrixes = Directory.GetFiles("mapMatrix"); MapGRs = Directory.GetFiles("mapGR"); openQuick(Directory.GetFiles("encdata")); - tabControl1.SelectedIndex = 2; // Map Script Tab + mapView.Show(); + tabControl1.SelectedIndex = 1; // Overworlds } - private string[] MapMatrixes; - private string[] MapGRs; + internal static string[] MapMatrixes; + internal static string[] MapGRs; private string[] encdatapaths; private string[] filepaths; private string[] gameLocations = Main.getText((Main.oras) ? 90 : 72); @@ -130,14 +132,14 @@ private void setEntry() } // Loading of Data + private MapPermView mapView = new MapPermView(); private void getZoneData() { L_ZDPreview.Text = "Text File: " + CurrentZone.ZD.TextFile + Environment.NewLine + "Map File: " + CurrentZone.ZD.MapMatrix; // Fetch Map Image - DrawMap = CurrentZone.ZD.MapMatrix; - PB_Map.Image = (CHK_AutoDraw.Checked) ? getMapImage() : null; + mapView.drawMap(CurrentZone.ZD.MapMatrix); } private void getOWSData() { @@ -420,34 +422,7 @@ private void parseScriptInput(byte[] data) RTB_CompressedScript.Lines = Scripts.getHexLines(scr.CompressedBytes); System.Media.SystemSounds.Asterisk.Play(); } - - private int DrawMap = -1; - private MapMatrix mm; - private Image getMapImage() - { - // Load MM - byte[][] MM = CTR.mini.unpackMini(File.ReadAllBytes(MapMatrixes[DrawMap]), "MM"); - mm = new MapMatrix(MM[0]); - - // Load GR TileMaps - for (int i = 0; i < mm.EntryList.Length; i++) - { - if (mm.EntryList[i] == 0xFFFF) // Mystery Zone - continue; - byte[][] GR = CTR.mini.unpackMini(File.ReadAllBytes(MapGRs[mm.EntryList[i]]), "GR"); - mm.Entries[i] = new MapMatrix.Entry(GR[0]); - } - Image img = mm.Preview((int)NUD_Scale.Value, (int)NUD_Flavor.Value); - img = Util.TrimBitmap((Bitmap)img); - mapScale = (int)NUD_Scale.Value; - return img; - } - private void B_Redraw_Click(object sender, EventArgs e) - { - if (DrawMap != -1) - PB_Map.Image = getMapImage(); - } - + // User Enhancements private void changeNModel(object sender, EventArgs e) { @@ -584,6 +559,8 @@ private void B_DumpUnk_Click(object sender, EventArgs e) CB_LocationID.SelectedIndex = 0; } + + internal static MapMatrix mm; private void B_DumpMaps_Click(object sender, EventArgs e) { if (Util.Prompt(MessageBoxButtons.YesNoCancel, "Export all MapImages?") != DialogResult.Yes) @@ -596,8 +573,8 @@ private void B_DumpMaps_Click(object sender, EventArgs e) string[] result = new string[CB_LocationID.Items.Count]; for (int i = 0; i < CB_LocationID.Items.Count; i++) { - DrawMap = BitConverter.ToUInt16(zonedata, 56 * i + 4); - Image img = getMapImage(); + int DrawMap = BitConverter.ToUInt16(zonedata, 56 * i + 4); + Image img = mapView.getMapImage(crop: true); using (MemoryStream ms = new MemoryStream()) { //error will throw from here @@ -650,16 +627,10 @@ private void changeWarp_Y(object sender, EventArgs e) L_WpY.Text = (NUD_WY.Value / 18).ToString(); } - private int mapScale = -1; - private void hoverMap(object sender, MouseEventArgs e) + private void B_Map_Click(object sender, EventArgs e) { - if (mapScale < 0) - return; - - int X = e.X / (mapScale); - int Y = e.Y / (mapScale); - - L_MapCoord.Text = String.Format("X: {0}{2}Y: {1}", X, Y, Environment.NewLine); + if (!mapView.Visible) + mapView.Show(); } } } \ No newline at end of file diff --git a/pk3DS/Subforms/OWSE.designer.cs b/pk3DS/Subforms/OWSE.designer.cs index 08104ca..d3e9490 100644 --- a/pk3DS/Subforms/OWSE.designer.cs +++ b/pk3DS/Subforms/OWSE.designer.cs @@ -153,15 +153,6 @@ private void InitializeComponent() this.RTB_Encounter = new System.Windows.Forms.RichTextBox(); this.RTB_MapSC = new System.Windows.Forms.RichTextBox(); this.tb_Map = new System.Windows.Forms.TabPage(); - this.L_MapCoord = new System.Windows.Forms.Label(); - this.PAN_MAP = new System.Windows.Forms.Panel(); - this.PB_Map = new System.Windows.Forms.PictureBox(); - this.CHK_AutoDraw = new System.Windows.Forms.CheckBox(); - this.B_Redraw = new System.Windows.Forms.Button(); - this.L_Scale = new System.Windows.Forms.Label(); - this.NUD_Scale = new System.Windows.Forms.NumericUpDown(); - this.L_Flavor = new System.Windows.Forms.Label(); - this.NUD_Flavor = new System.Windows.Forms.NumericUpDown(); this.tb_Dev = new System.Windows.Forms.TabPage(); this.L_DeComp = new System.Windows.Forms.Label(); this.RTB_CompressedScript = new System.Windows.Forms.RichTextBox(); @@ -175,6 +166,7 @@ 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_Map = new System.Windows.Forms.Button(); this.tabControl1.SuspendLayout(); this.tb_ZoneData.SuspendLayout(); this.tb_OWSC.SuspendLayout(); @@ -227,10 +219,6 @@ private void InitializeComponent() this.tb_File5.SuspendLayout(); this.tb_RAW.SuspendLayout(); this.tb_Map.SuspendLayout(); - this.PAN_MAP.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.PB_Map)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.NUD_Scale)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.NUD_Flavor)).BeginInit(); this.tb_Dev.SuspendLayout(); this.SuspendLayout(); // @@ -1644,14 +1632,7 @@ private void InitializeComponent() // // tb_Map // - this.tb_Map.Controls.Add(this.L_MapCoord); - this.tb_Map.Controls.Add(this.PAN_MAP); - this.tb_Map.Controls.Add(this.CHK_AutoDraw); - this.tb_Map.Controls.Add(this.B_Redraw); - this.tb_Map.Controls.Add(this.L_Scale); - this.tb_Map.Controls.Add(this.NUD_Scale); - this.tb_Map.Controls.Add(this.L_Flavor); - this.tb_Map.Controls.Add(this.NUD_Flavor); + this.tb_Map.Controls.Add(this.B_Map); this.tb_Map.Location = new System.Drawing.Point(4, 22); this.tb_Map.Name = "tb_Map"; this.tb_Map.Padding = new System.Windows.Forms.Padding(3); @@ -1660,111 +1641,6 @@ private void InitializeComponent() this.tb_Map.Text = "Map Preview"; this.tb_Map.UseVisualStyleBackColor = true; // - // L_MapCoord - // - this.L_MapCoord.Location = new System.Drawing.Point(343, 1); - this.L_MapCoord.Name = "L_MapCoord"; - this.L_MapCoord.Size = new System.Drawing.Size(131, 28); - this.L_MapCoord.TabIndex = 12; - this.L_MapCoord.Text = "X: ~\r\nY: ~"; - this.L_MapCoord.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // PAN_MAP - // - this.PAN_MAP.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.PAN_MAP.AutoScroll = true; - this.PAN_MAP.Controls.Add(this.PB_Map); - this.PAN_MAP.Location = new System.Drawing.Point(3, 30); - this.PAN_MAP.Name = "PAN_MAP"; - this.PAN_MAP.Size = new System.Drawing.Size(477, 435); - this.PAN_MAP.TabIndex = 11; - // - // PB_Map - // - this.PB_Map.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; - this.PB_Map.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.PB_Map.Location = new System.Drawing.Point(0, 0); - this.PB_Map.Name = "PB_Map"; - this.PB_Map.Size = new System.Drawing.Size(471, 429); - this.PB_Map.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; - this.PB_Map.TabIndex = 2; - this.PB_Map.TabStop = false; - this.PB_Map.MouseMove += new System.Windows.Forms.MouseEventHandler(this.hoverMap); - // - // CHK_AutoDraw - // - this.CHK_AutoDraw.AutoSize = true; - this.CHK_AutoDraw.Location = new System.Drawing.Point(261, 7); - this.CHK_AutoDraw.Name = "CHK_AutoDraw"; - this.CHK_AutoDraw.Size = new System.Drawing.Size(76, 17); - this.CHK_AutoDraw.TabIndex = 10; - this.CHK_AutoDraw.Text = "Auto-Draw"; - this.CHK_AutoDraw.UseVisualStyleBackColor = true; - // - // B_Redraw - // - this.B_Redraw.Location = new System.Drawing.Point(180, 4); - this.B_Redraw.Name = "B_Redraw"; - this.B_Redraw.Size = new System.Drawing.Size(75, 23); - this.B_Redraw.TabIndex = 9; - this.B_Redraw.Text = "Redraw"; - this.B_Redraw.UseVisualStyleBackColor = true; - this.B_Redraw.Click += new System.EventHandler(this.B_Redraw_Click); - // - // L_Scale - // - this.L_Scale.AutoSize = true; - this.L_Scale.Location = new System.Drawing.Point(94, 8); - this.L_Scale.Name = "L_Scale"; - this.L_Scale.Size = new System.Drawing.Size(37, 13); - this.L_Scale.TabIndex = 6; - this.L_Scale.Text = "Scale:"; - // - // NUD_Scale - // - this.NUD_Scale.Location = new System.Drawing.Point(137, 6); - this.NUD_Scale.Minimum = new decimal(new int[] { - 1, - 0, - 0, - 0}); - this.NUD_Scale.Name = "NUD_Scale"; - this.NUD_Scale.Size = new System.Drawing.Size(37, 20); - this.NUD_Scale.TabIndex = 5; - this.NUD_Scale.Value = new decimal(new int[] { - 3, - 0, - 0, - 0}); - // - // L_Flavor - // - this.L_Flavor.AutoSize = true; - this.L_Flavor.Location = new System.Drawing.Point(6, 8); - this.L_Flavor.Name = "L_Flavor"; - this.L_Flavor.Size = new System.Drawing.Size(39, 13); - this.L_Flavor.TabIndex = 4; - this.L_Flavor.Text = "Flavor:"; - // - // NUD_Flavor - // - this.NUD_Flavor.Location = new System.Drawing.Point(51, 6); - this.NUD_Flavor.Minimum = new decimal(new int[] { - 1, - 0, - 0, - 0}); - this.NUD_Flavor.Name = "NUD_Flavor"; - this.NUD_Flavor.Size = new System.Drawing.Size(37, 20); - this.NUD_Flavor.TabIndex = 3; - this.NUD_Flavor.Value = new decimal(new int[] { - 5, - 0, - 0, - 0}); - // // tb_Dev // this.tb_Dev.Controls.Add(this.L_DeComp); @@ -1902,6 +1778,16 @@ private void InitializeComponent() this.B_HLCMD.UseVisualStyleBackColor = true; this.B_HLCMD.Click += new System.EventHandler(this.B_HLCMD_Click); // + // B_Map + // + this.B_Map.Location = new System.Drawing.Point(145, 165); + this.B_Map.Name = "B_Map"; + this.B_Map.Size = new System.Drawing.Size(190, 130); + this.B_Map.TabIndex = 420; + this.B_Map.Text = "Show Map"; + this.B_Map.UseVisualStyleBackColor = true; + this.B_Map.Click += new System.EventHandler(this.B_Map_Click); + // // OWSE // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -1977,12 +1863,6 @@ private void InitializeComponent() this.tb_File5.PerformLayout(); this.tb_RAW.ResumeLayout(false); this.tb_Map.ResumeLayout(false); - this.tb_Map.PerformLayout(); - this.PAN_MAP.ResumeLayout(false); - this.PAN_MAP.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.PB_Map)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.NUD_Scale)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.NUD_Flavor)).EndInit(); this.tb_Dev.ResumeLayout(false); this.tb_Dev.PerformLayout(); this.ResumeLayout(false); @@ -2059,13 +1939,6 @@ private void InitializeComponent() private System.Windows.Forms.RichTextBox RTB_MSP; private System.Windows.Forms.Button B_HLCMD; private System.Windows.Forms.TabPage tb_Map; - private System.Windows.Forms.Label L_Flavor; - private System.Windows.Forms.NumericUpDown NUD_Flavor; - private System.Windows.Forms.PictureBox PB_Map; - private System.Windows.Forms.Button B_Redraw; - private System.Windows.Forms.Label L_Scale; - private System.Windows.Forms.NumericUpDown NUD_Scale; - private System.Windows.Forms.CheckBox CHK_AutoDraw; private System.Windows.Forms.GroupBox GB_N; private System.Windows.Forms.NumericUpDown NUD_NModel; private System.Windows.Forms.Label L_NModel; @@ -2137,8 +2010,7 @@ private void InitializeComponent() private System.Windows.Forms.Label L_T2Y; private System.Windows.Forms.NumericUpDown NUD_T2X; private System.Windows.Forms.Label L_T2X; - private System.Windows.Forms.Panel PAN_MAP; - private System.Windows.Forms.Label L_MapCoord; + private System.Windows.Forms.Button B_Map; } } diff --git a/pk3DS/pk3DS.csproj b/pk3DS/pk3DS.csproj index d2590ff..06ff86e 100644 --- a/pk3DS/pk3DS.csproj +++ b/pk3DS/pk3DS.csproj @@ -81,6 +81,12 @@ Gifts.cs + + Form + + + MapPermView.cs + Form @@ -252,6 +258,9 @@ Gifts.cs + + MapPermView.cs + TypeChart.cs