Prepared version 1.0.5a

fixed wrong numbers when resizing matrices
added a warning when attempting to resize matrix 0
This commit is contained in:
AdAstra-LD 2021-01-11 15:22:39 +01:00
parent 7cddb4f2c0
commit 2f673a2d8c
5 changed files with 289 additions and 236 deletions

View File

@ -29,21 +29,21 @@
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle23 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle24 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle25 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle26 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle27 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle28 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle29 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle30 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainProgram));
this.mainTabControl = new System.Windows.Forms.TabControl();
this.headerEditorTabPage = new System.Windows.Forms.TabPage();
@ -697,7 +697,7 @@
//
// openMessageFileButton
//
this.openMessageFileButton.Location = new System.Drawing.Point(419, 28);
this.openMessageFileButton.Location = new System.Drawing.Point(432, 28);
this.openMessageFileButton.Name = "openMessageFileButton";
this.openMessageFileButton.Size = new System.Drawing.Size(117, 36);
this.openMessageFileButton.TabIndex = 46;
@ -1085,7 +1085,7 @@
//
// openLevelScriptButton
//
this.openLevelScriptButton.Location = new System.Drawing.Point(419, 30);
this.openLevelScriptButton.Location = new System.Drawing.Point(432, 30);
this.openLevelScriptButton.Name = "openLevelScriptButton";
this.openLevelScriptButton.Size = new System.Drawing.Size(117, 38);
this.openLevelScriptButton.TabIndex = 17;
@ -1200,7 +1200,7 @@
//
// areaDataUpDown
//
this.areaDataUpDown.Location = new System.Drawing.Point(21, 100);
this.areaDataUpDown.Location = new System.Drawing.Point(21, 101);
this.areaDataUpDown.Maximum = new decimal(new int[] {
255,
0,
@ -1538,45 +1538,45 @@
this.headersGridView.AllowUserToDeleteRows = false;
this.headersGridView.AllowUserToResizeColumns = false;
this.headersGridView.AllowUserToResizeRows = false;
dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.headersGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle16;
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.headersGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.headersGridView.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.headersGridView.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle17.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle17.Font = new System.Drawing.Font("Microsoft Sans Serif", 7F);
dataGridViewCellStyle17.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle17.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle17.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle17.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.headersGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle17;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("Microsoft Sans Serif", 7F);
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.headersGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.headersGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle18.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle18.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
dataGridViewCellStyle18.ForeColor = System.Drawing.SystemColors.ControlText;
dataGridViewCellStyle18.Format = "D4";
dataGridViewCellStyle18.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle18.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle18.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.headersGridView.DefaultCellStyle = dataGridViewCellStyle18;
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle3.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText;
dataGridViewCellStyle3.Format = "D4";
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.headersGridView.DefaultCellStyle = dataGridViewCellStyle3;
this.headersGridView.Location = new System.Drawing.Point(0, 0);
this.headersGridView.Name = "headersGridView";
dataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle19.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle19.Font = new System.Drawing.Font("Microsoft Sans Serif", 7F);
dataGridViewCellStyle19.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle19.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle19.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.headersGridView.RowHeadersDefaultCellStyle = dataGridViewCellStyle19;
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle4.Font = new System.Drawing.Font("Microsoft Sans Serif", 7F);
dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.headersGridView.RowHeadersDefaultCellStyle = dataGridViewCellStyle4;
this.headersGridView.RowHeadersWidth = 50;
this.headersGridView.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
dataGridViewCellStyle20.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle20.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.headersGridView.RowsDefaultCellStyle = dataGridViewCellStyle20;
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle5.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.headersGridView.RowsDefaultCellStyle = dataGridViewCellStyle5;
this.headersGridView.RowTemplate.DefaultCellStyle.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.headersGridView.RowTemplate.Height = 18;
this.headersGridView.RowTemplate.Resizable = System.Windows.Forms.DataGridViewTriState.False;
@ -1604,45 +1604,45 @@
this.heightsGridView.AllowUserToDeleteRows = false;
this.heightsGridView.AllowUserToResizeColumns = false;
this.heightsGridView.AllowUserToResizeRows = false;
dataGridViewCellStyle21.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.heightsGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle21;
dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.heightsGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle6;
this.heightsGridView.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.heightsGridView.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
dataGridViewCellStyle22.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle22.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle22.Font = new System.Drawing.Font("Microsoft Sans Serif", 7F);
dataGridViewCellStyle22.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle22.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle22.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle22.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.heightsGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle22;
dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle7.Font = new System.Drawing.Font("Microsoft Sans Serif", 7F);
dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.heightsGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7;
this.heightsGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
dataGridViewCellStyle23.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle23.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle23.Font = new System.Drawing.Font("Tahoma", 8.25F);
dataGridViewCellStyle23.ForeColor = System.Drawing.SystemColors.ControlText;
dataGridViewCellStyle23.Format = "D2";
dataGridViewCellStyle23.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle23.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle23.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.heightsGridView.DefaultCellStyle = dataGridViewCellStyle23;
dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle8.Font = new System.Drawing.Font("Tahoma", 8.25F);
dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.ControlText;
dataGridViewCellStyle8.Format = "D2";
dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.heightsGridView.DefaultCellStyle = dataGridViewCellStyle8;
this.heightsGridView.Location = new System.Drawing.Point(0, 0);
this.heightsGridView.Name = "heightsGridView";
dataGridViewCellStyle24.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle24.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle24.Font = new System.Drawing.Font("Microsoft Sans Serif", 7F);
dataGridViewCellStyle24.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle24.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle24.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle24.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.heightsGridView.RowHeadersDefaultCellStyle = dataGridViewCellStyle24;
dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle9.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle9.Font = new System.Drawing.Font("Microsoft Sans Serif", 7F);
dataGridViewCellStyle9.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle9.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.heightsGridView.RowHeadersDefaultCellStyle = dataGridViewCellStyle9;
this.heightsGridView.RowHeadersWidth = 50;
this.heightsGridView.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
dataGridViewCellStyle25.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle25.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.heightsGridView.RowsDefaultCellStyle = dataGridViewCellStyle25;
dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle10.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.heightsGridView.RowsDefaultCellStyle = dataGridViewCellStyle10;
this.heightsGridView.RowTemplate.DefaultCellStyle.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.heightsGridView.RowTemplate.Height = 18;
this.heightsGridView.RowTemplate.Resizable = System.Windows.Forms.DataGridViewTriState.False;
@ -1668,45 +1668,45 @@
this.mapFilesGridView.AllowUserToDeleteRows = false;
this.mapFilesGridView.AllowUserToResizeColumns = false;
this.mapFilesGridView.AllowUserToResizeRows = false;
dataGridViewCellStyle26.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.mapFilesGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle26;
dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.mapFilesGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle11;
this.mapFilesGridView.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.mapFilesGridView.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
dataGridViewCellStyle27.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle27.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle27.Font = new System.Drawing.Font("Microsoft Sans Serif", 7F);
dataGridViewCellStyle27.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle27.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle27.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle27.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.mapFilesGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle27;
dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle12.Font = new System.Drawing.Font("Microsoft Sans Serif", 7F);
dataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.mapFilesGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle12;
this.mapFilesGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
dataGridViewCellStyle28.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle28.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle28.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
dataGridViewCellStyle28.ForeColor = System.Drawing.SystemColors.ControlText;
dataGridViewCellStyle28.Format = "D4";
dataGridViewCellStyle28.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle28.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle28.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.mapFilesGridView.DefaultCellStyle = dataGridViewCellStyle28;
dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle13.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle13.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
dataGridViewCellStyle13.ForeColor = System.Drawing.SystemColors.ControlText;
dataGridViewCellStyle13.Format = "D4";
dataGridViewCellStyle13.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle13.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.mapFilesGridView.DefaultCellStyle = dataGridViewCellStyle13;
this.mapFilesGridView.Location = new System.Drawing.Point(0, 0);
this.mapFilesGridView.Name = "mapFilesGridView";
dataGridViewCellStyle29.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle29.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle29.Font = new System.Drawing.Font("Microsoft Sans Serif", 7F);
dataGridViewCellStyle29.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle29.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle29.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle29.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.mapFilesGridView.RowHeadersDefaultCellStyle = dataGridViewCellStyle29;
dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle14.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle14.Font = new System.Drawing.Font("Microsoft Sans Serif", 7F);
dataGridViewCellStyle14.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle14.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle14.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.mapFilesGridView.RowHeadersDefaultCellStyle = dataGridViewCellStyle14;
this.mapFilesGridView.RowHeadersWidth = 50;
this.mapFilesGridView.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
dataGridViewCellStyle30.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle30.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.mapFilesGridView.RowsDefaultCellStyle = dataGridViewCellStyle30;
dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle15.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.mapFilesGridView.RowsDefaultCellStyle = dataGridViewCellStyle15;
this.mapFilesGridView.RowTemplate.DefaultCellStyle.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.mapFilesGridView.RowTemplate.Height = 18;
this.mapFilesGridView.RowTemplate.Resizable = System.Windows.Forms.DataGridViewTriState.False;
@ -2539,9 +2539,9 @@
this.unsupport3DText.ReadOnly = true;
this.unsupport3DText.Size = new System.Drawing.Size(317, 77);
this.unsupport3DText.TabIndex = 26;
this.unsupport3DText.Text = "Editing 3D models is not supported in this program.\r\nThey must be modeled in a 3D" +
" editor like Sketchup\r\nor Blender, or (recommended) they can be created\r\nwith \'P" +
"okémon DS Map Studio\' by Trifindo.";
this.unsupport3DText.Text = "Editing 3D models is not supported by this program.\r\nThey must be modeled in a 3D" +
" editor like Sketchup\r\nor Blender, or (recommended option) they can be created\r\nwith \'P" +
"okemon DS Map Studio\' by Trifindo.";
//
// importMapButton
//
@ -2590,8 +2590,8 @@
this.textBox1.ReadOnly = true;
this.textBox1.Size = new System.Drawing.Size(238, 58);
this.textBox1.TabIndex = 28;
this.textBox1.Text = "Editing BDHC files is not supported in\r\nthis program. They can be created with \r\n" +
"\'Pokémon DS Map Studio\' by Trifindo.";
this.textBox1.Text = "Editing BDHC files is not supported by\r\nthis program. They can be created with \r\n" +
"\'Pokemon DS Map Studio\' by Trifindo.";
//
// bdhcImportButton
//
@ -5489,10 +5489,10 @@
this.importTextFileButton.UseVisualStyleBackColor = true;
this.importTextFileButton.Click += new System.EventHandler(this.importTextFileButton_Click);
//
// saveMessageFileButton
// saveTextArchiveButton
//
this.saveTextArchiveButton.Location = new System.Drawing.Point(10, 48);
this.saveTextArchiveButton.Name = "saveMessageFileButton";
this.saveTextArchiveButton.Name = "saveTextArchiveButton";
this.saveTextArchiveButton.Size = new System.Drawing.Size(164, 23);
this.saveTextArchiveButton.TabIndex = 21;
this.saveTextArchiveButton.Text = "&Save Current";
@ -5947,7 +5947,7 @@
// asmHacksToolStripMenuItem
//
this.asmHacksToolStripMenuItem.Name = "asmHacksToolStripMenuItem";
this.asmHacksToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.asmHacksToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
this.asmHacksToolStripMenuItem.Text = "ROM Toolbox";
this.asmHacksToolStripMenuItem.Click += new System.EventHandler(this.asmHacksToolStripMenuItem_Click);
//
@ -6091,7 +6091,7 @@
this.MainMenuStrip = this.menuStrip1;
this.MaximizeBox = false;
this.Name = "MainProgram";
this.Text = "DS Pokémon Rom Editor 1.0.5 (Nømura, AdAstra, Mixone)";
this.Text = "DS Pokémon Rom Editor 1.0.5a (Nømura, AdAstra, Mixone)";
this.Load += new System.EventHandler(this.Form1_Load);
this.mainTabControl.ResumeLayout(false);
this.headerEditorTabPage.ResumeLayout(false);

View File

@ -1073,7 +1073,7 @@ namespace DSPRE {
}
private void aboutToolStripMenuItem1_Click(object sender, EventArgs e)
{
string message = "DS Pokémon Rom Editor by Nømura (Unofficial Branch)" + Environment.NewLine + "version 1.0.5" + Environment.NewLine
string message = "DS Pokémon Rom Editor by Nømura (Unofficial Branch)" + Environment.NewLine + "version 1.0.5a" + Environment.NewLine
+ Environment.NewLine + "This tool was largely inspired by Markitus95's Spiky's DS Map Editor, from which certain assets were also recycled. Credits go to Markitus, Ark, Zark, Florian, and everyone else who owes credit for SDSME." + Environment.NewLine +
"Special thanks go to Trifindo, Mikelan98, BagBoy, and JackHack96, whose help, research and expertise in the field of NDS Rom Hacking made the development of this tool possible.";
@ -1873,9 +1873,19 @@ namespace DSPRE {
private void importMatrixButton_Click(object sender, EventArgs e)
{
/* Prompt user to select .mtx file */
DialogResult d;
if (selectMatrixComboBox.SelectedIndex == 0) {
d = MessageBox.Show("Replacing a matrix - especially Matrix 0 - with a new file is risky.\nDo not do it unless you are absolutely sure.\nProceed?", "Risky operation",
MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
if (d == DialogResult.No)
return;
}
OpenFileDialog importMatrix = new OpenFileDialog();
importMatrix.Filter = "Matrix File (*.mtx)|*.mtx";
if (importMatrix.ShowDialog(this) != DialogResult.OK) return;
if (importMatrix.ShowDialog(this) != DialogResult.OK)
return;
/* Update matrix object in memory */
currentMatrix = new Matrix(new FileStream(importMatrix.FileName, FileMode.Open));
@ -1890,6 +1900,7 @@ namespace DSPRE {
widthUpDown.Value = currentMatrix.width;
heightUpDown.Value = currentMatrix.height;
disableHandlers = false;
}
private void heightUpDown_ValueChanged(object sender, EventArgs e)
{
@ -1933,10 +1944,16 @@ namespace DSPRE {
disableHandlers = false;
}
private void mapFilesGridView_CellMouseDoubleClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex >= 0 && e.ColumnIndex >= 0)
{
private void mapFilesGridView_CellMouseDoubleClick(object sender, DataGridViewCellEventArgs e) {
if (e.RowIndex >= 0 && e.ColumnIndex >= 0) {
if (currentMatrix.maps[e.RowIndex, e.ColumnIndex] == Matrix.VOID) {
MessageBox.Show("You can't load a VOID map.\nSelect a valid map and try again.\n" +
"If you only meant to change the value of this cell, wait some time between one mouse click and the other.\n" +
"Alternatively, highlight the cell and press F2 on your keyboard.",
"User attempted to load VOID", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
/* Determine area data */
int header;
if (currentMatrix.hasHeadersSection) {
@ -1945,9 +1962,15 @@ namespace DSPRE {
header = headerListBox.SelectedIndex;
}
/* Get texture file numbers from area data */
AreaData areaData = LoadAreaData(LoadHeader(header).areaDataID);
AreaData areaData;
if (header > internalNames.Count) {
MessageBox.Show("This map is associated to a non-existent header.\nThis will lead to unpredictable behaviour and, possibily, problems, if you attempt to load it in game.",
"Invalid header", MessageBoxButtons.OK, MessageBoxIcon.Information);
header = 0;
}
/* Get texture file numbers from area data */
areaData = LoadAreaData(LoadHeader(header).areaDataID);
/* Load Map File and switch to Map Editor tab */
disableHandlers = true;
@ -1956,9 +1979,9 @@ namespace DSPRE {
buildTextureComboBox.SelectedIndex = areaData.buildingsTileset + 1;
mainTabControl.SelectedTab = mapEditorTabPage;
if (mapPartsTabControl.SelectedTab == permissionsTabPage)
if (mapPartsTabControl.SelectedTab == permissionsTabPage) //what's this IF for??
if (areaData.areaType == 0)
interiorRadioButton.Checked = true;
@ -1968,12 +1991,14 @@ namespace DSPRE {
}
private void mapFilesGridView_CellValueChanged(object sender, DataGridViewCellEventArgs e)
{
if (disableHandlers) return;
if (e.RowIndex > -1 && e.ColumnIndex > -1)
if (disableHandlers)
return;
if (e.RowIndex >= 0 && e.ColumnIndex >= 0)
{
/* If input is junk, use VOID (FF FF) as placeholder value */
ushort cellValue;
if (!UInt16.TryParse(mapFilesGridView.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString(), out cellValue)) cellValue = Matrix.VOID;
if (!UInt16.TryParse(mapFilesGridView.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString(), out cellValue))
cellValue = Matrix.VOID;
/* Change value in matrix object */
currentMatrix.maps[e.RowIndex, e.ColumnIndex] = cellValue;
@ -2032,11 +2057,15 @@ namespace DSPRE {
private void saveMatrixButton_Click(object sender, EventArgs e)
{
string matrixPath = romInfo.GetMatrixFolderPath() + "\\" + selectMatrixComboBox.SelectedIndex.ToString("D4");
using (BinaryWriter matrixWriter = new BinaryWriter(new FileStream(matrixPath, FileMode.Create))) matrixWriter.Write(currentMatrix.Save());
using (BinaryWriter matrixWriter = new BinaryWriter(new FileStream(matrixPath, FileMode.Create)))
matrixWriter.Write(currentMatrix.Save());
eventMatrix = LoadMatrix(selectMatrixComboBox.SelectedIndex);
}
private void selectMatrixComboBox_SelectedIndexChanged(object sender, EventArgs e)
{
if (disableHandlers) return;
if (disableHandlers)
return;
Clear_Matrix_Tables();
currentMatrix = LoadMatrix(selectMatrixComboBox.SelectedIndex);
@ -2051,25 +2080,22 @@ namespace DSPRE {
}
private void widthUpDown_ValueChanged(object sender, EventArgs e)
{
if (disableHandlers) return;
if (disableHandlers)
return;
disableHandlers = true;
/* Add or remove rows in DataGridView control */
int delta = (int)widthUpDown.Value - currentMatrix.width;
for (int i = 0; i < Math.Abs(delta); i++)
{
if (delta < 0)
{
for (int i = 0; i < Math.Abs(delta); i++) {
if (delta < 0) {
headersGridView.Columns.RemoveAt(currentMatrix.width - 1 - i);
heightsGridView.Columns.RemoveAt(currentMatrix.width - 1 - i);
mapFilesGridView.Columns.RemoveAt(currentMatrix.width - 1 - i);
}
else
{
} else {
/* Add columns */
headersGridView.Columns.Add(" ", (currentMatrix.width + i + 1).ToString());
heightsGridView.Columns.Add(" ", (currentMatrix.width + i + 1).ToString());
mapFilesGridView.Columns.Add(" ", (currentMatrix.width + i + 1).ToString());
headersGridView.Columns.Add(" ", (currentMatrix.width + i).ToString());
heightsGridView.Columns.Add(" ", (currentMatrix.width + i).ToString());
mapFilesGridView.Columns.Add(" ", (currentMatrix.width + i).ToString());
/* Adjust column width */
headersGridView.Columns[currentMatrix.width + i].Width = 34;
@ -2077,8 +2103,7 @@ namespace DSPRE {
mapFilesGridView.Columns[currentMatrix.width + i].Width = 34;
/* Fill new rows */
for (int j = 0; j < currentMatrix.height; j++)
{
for (int j = 0; j < currentMatrix.height; j++) {
headersGridView.Rows[j].Cells[currentMatrix.width + i].Value = 0;
heightsGridView.Rows[j].Cells[currentMatrix.width + i].Value = 0;
mapFilesGridView.Rows[j].Cells[currentMatrix.width + i].Value = Matrix.VOID;

View File

@ -117,86 +117,6 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="messageColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="mainTabImageList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>239, 17</value>
</metadata>
<data name="mainTabImageList.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACA
DwAAAk1TRnQBSQFMAgEBBwEAAXQBAgF0AQIBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAASADAA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AAGzAwABQwFHBJQFRwFDAwAB7wEAASwDwwFT
AQAB9wIAAfMB8AIAARABRwEAAkcBAAFHARAGAAEQAQABswEAC3gBAAGzBAABQwSUBEcBQwQAAe8BAAF0
AywBdAEAAfcBAAHzAfADAAEQAkcCAAJHARAGAAEQAQABswEAC3gBAAGzBQACQwGUA0cCQwUAAe8IAAHz
AfAEAAEQBkcBEAYAARABAAGzDQABswcABEMHAAEHCO8BBwUADxABAAEJDbMBCREAAUIBTQE+BwABPgMA
ASgDAAFAAwABIAMAAQEBAAEBBgABARYAA/8BAAH/AY8BvwH/AeABBwIAAfgBBwKPAcABAwIAAcABBwGP
AQcBwAEDAgABgAEHAY4BAwGAAQECAAGAAQMBgAEBAYABAQIAAYABAwGAAQEBgAEBAgABgAEBAYABAAGA
AQECAAHAAQEBwAEAAYABAQIAAcABAAHAAQEBgAEBAgABwAEAAcABAQGAAQECAAHAAQAB4AEPAYABAQIA
AYABAAHgAR8BwAEDBAAB4AE/AcABAwMAAQEB4AH/AeABBwIAAZgBDwHwAf8B8AEPAgAB+AF/Av8B/AE/
AgABgAEDAv8BgAEDAv8BgAEDAQABAQEAAQEB/AE/AaABGwEAAQEBfwH9AfABDwGvAdsBAAExAX8B/QHg
AQcBqAFbAQABSQFAAQUBwAEDAagBSwEAAUkBQAEFAcABAwGoAUsBAAExAUABBQGBAQEBqAFLAQABAQFA
AQUBgAEBAa8BywEAAQEBQAEFAYABAQGgAQsBAAH9AUABBQGAAQEBoAF7ARgBxQFAAQUBwAEDAaABiwEk
Ae0BQAEFAcABAwGgAbMBJAHNAUABBQHgAQcBoAGnARgB7QFAAQUB8AEPAb8BzwEAAf0BfwH9AfwBPwGA
AR8BAAEBAQABAQL/Cw==
</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="messageButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
@ -486,6 +406,83 @@
50GccR7EGedBnHEexBm/+WdhnHEexBnnQZxxHsQZ50GccR7EGedBnHEexPt2+7DhWedBnHEexBnnQZxx
HsQZ50GccR7EGedBnPGbfxbGGedBnHEexBnnQZxxHsQZ50GccR7EGedBvG+3DxuedR7EGedBnHEexBnn
QZxxHsQZ50GccR7EEX8+38T8gAGeHzYoAAAAAElFTkSuQmCC
</value>
</data>
<metadata name="mainTabImageList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>239, 17</value>
</metadata>
<data name="mainTabImageList.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACA
DwAAAk1TRnQBSQFMAgEBBwEAAXwBAgF8AQIBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
AWYDAAGZAwABzAIAATMDAAIzAgABMwFmAgABMwGZAgABMwHMAgABMwH/AgABZgMAAWYBMwIAAmYCAAFm
AZkCAAFmAcwCAAFmAf8CAAGZAwABmQEzAgABmQFmAgACmQIAAZkBzAIAAZ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gABgAEHAY4BAwGAAQECAAGAAQMBgAEBAYABAQIAAYABAwGAAQEBgAEBAgABgAEBAYABAAGA
AQECAAHAAQEBwAEAAYABAQIAAcABAAHAAQEBgAEBAgABwAEAAcABAQGAAQECAAHAAQAB4AEPAYABAQIA
AYABAAHgAR8BwAEDBAAB4AE/AcABAwMAAQEB4AH/AeABBwIAAZgBDwHwAf8B8AEPAgAB+AF/Av8B/AE/
AgABgAEDAv8BgAEDAv8BgAEDAQABAQEAAQEB/AE/AaABGwEAAQEBfwH9AfABDwGvAdsBAAExAX8B/QHg
AQcBqAFbAQABSQFAAQUBwAEDAagBSwEAAUkBQAEFAcABAwGoAUsBAAExAUABBQGBAQEBqAFLAQABAQFA
AQUBgAEBAa8BywEAAQEBQAEFAYABAQGgAQsBAAH9AUABBQGAAQEBoAF7ARgBxQFAAQUBwAEDAaABiwEk
Ae0BQAEFAcABAwGgAbMBJAHNAUABBQHgAQcBoAGnARgB7QFAAQUB8AEPAb8BzwEAAf0BfwH9AfwBPwGA
AR8BAAEBAQABAQL/Cw==
</value>
</data>
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">

View File

@ -73,13 +73,29 @@ namespace DSPRE
ushort[,] newMaps = new ushort[newHeight, newWidth];
/* Copy existing headers and altitudes rows into new arrays. If new matrix is larger in any dimension, new entries will be zero */
if (hasHeadersSection) for (int i = 0; i < Math.Min(height, newHeight); i++) for (int j = 0; j < Math.Min(width, newWidth); j++) newHeaders[i, j] = headers[i, j];
if (hasAltitudesSection) for (int i = 0; i < Math.Min(height, newHeight); i++) for (int j = 0; j < Math.Min(width, newWidth); j++) newAltitudes[i, j] = altitudes[i, j];
if (hasHeadersSection)
for (int i = 0; i < Math.Min(height, newHeight); i++)
for (int j = 0; j < Math.Min(width, newWidth); j++)
newHeaders[i, j] = headers[i, j];
if (hasAltitudesSection)
for (int i = 0; i < Math.Min(height, newHeight); i++)
for (int j = 0; j < Math.Min(width, newWidth); j++)
newAltitudes[i, j] = altitudes[i, j];
/* Copy existing map rows into new array, and fill eventual new ones with Matrix.VOID (FF FF) */
for (int i = 0; i < Math.Min(height, newHeight); i++) for (int j = 0; j < Math.Min(width, newWidth); j++) newMaps[i, j] = maps[i, j];
if (newHeight > height) for (int i = height; i < newHeight; i++) for (int j = 0; j < newWidth; j++) newMaps[i, j] = Matrix.VOID;
if (newWidth > width) for (int j = width; j < newWidth; j++) for (int i = 0; i < newHeight; i++) newMaps[i, j] = Matrix.VOID;
for (int i = 0; i < Math.Min(height, newHeight); i++)
for (int j = 0; j < Math.Min(width, newWidth); j++)
newMaps[i, j] = maps[i, j];
if (newHeight > height)
for (int i = height; i < newHeight; i++)
for (int j = 0; j < newWidth; j++)
newMaps[i, j] = Matrix.VOID;
if (newWidth > width)
for (int j = width; j < newWidth; j++)
for (int i = 0; i < newHeight; i++)
newMaps[i, j] = Matrix.VOID;
/* Substitute old arrays with new arrays */
headers = newHeaders;
@ -89,6 +105,8 @@ namespace DSPRE
/* Set new width and height */
height = (byte)newHeight;
width = (byte)newWidth;
}
public void AddHeadersSection()
{
@ -117,9 +135,22 @@ namespace DSPRE
writer.Write(hasAltitudesSection);
writer.Write(name);
if (hasHeadersSection) for (int i = 0; i < height; i++) for (int j = 0; j < width; j++) writer.Write(headers[i, j]);
if (hasAltitudesSection) for (int i = 0; i < height; i++) for (int j = 0; j < width; j++) writer.Write(altitudes[i, j]);
for (int i = 0; i < height; i++) for (int j = 0; j < width; j++) writer.Write(maps[i, j]);
if (hasHeadersSection) {
for (int i = 0; i < height; i++)
for (int j = 0; j < width; j++)
writer.Write(headers[i, j]);
}
if (hasAltitudesSection) {
for (int i = 0; i < height; i++)
for (int j = 0; j < width; j++)
writer.Write(altitudes[i, j]);
}
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++)
writer.Write(maps[i, j]);
}
}
return newData.ToArray();

View File

@ -4,12 +4,12 @@ using System.Runtime.InteropServices;
// Le informazioni generali relative a un assembly sono controllate dal seguente
// set di attributi. Modificare i valori di questi attributi per modificare le informazioni
// associate a un assembly.
[assembly: AssemblyTitle("DSPRE Reloaded 1.0.5")]
[assembly: AssemblyTitle("DSPRE Reloaded 1.0.5a")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("DSPRE Reloaded 1.0.5")]
[assembly: AssemblyCopyright("Copyright © 2019")]
[assembly: AssemblyProduct("DSPRE Reloaded 1.0.5a")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]