From 8ceb15534b68ea9b6367b51dae0926561ff77bf0 Mon Sep 17 00:00:00 2001 From: MattNL Date: Mon, 12 Sep 2022 08:36:23 -0400 Subject: [PATCH] Removed MipMap Support from Animation Editor --- .../Forms/Editor/AnimationEditor.Designer.cs | 99 +++---------------- PCK-Studio/Forms/Editor/AnimationEditor.cs | 18 ---- 2 files changed, 13 insertions(+), 104 deletions(-) diff --git a/PCK-Studio/Forms/Editor/AnimationEditor.Designer.cs b/PCK-Studio/Forms/Editor/AnimationEditor.Designer.cs index c6d922a4..c1adf481 100644 --- a/PCK-Studio/Forms/Editor/AnimationEditor.Designer.cs +++ b/PCK-Studio/Forms/Editor/AnimationEditor.Designer.cs @@ -51,14 +51,9 @@ this.AnimationPlayBtn = new MetroFramework.Controls.MetroButton(); this.AnimationStopBtn = new MetroFramework.Controls.MetroButton(); this.tileLabel = new MetroFramework.Controls.MetroLabel(); - this.MipMapCheckbox = new MetroFramework.Controls.MetroCheckBox(); - this.MipMapLabel = new MetroFramework.Controls.MetroLabel(); - this.MipMapNumericUpDown = new System.Windows.Forms.NumericUpDown(); this.pictureBoxWithInterpolationMode1 = new PckStudio.PictureBoxWithInterpolationMode(); - this.generateMipMapTexturesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.contextMenuStrip1.SuspendLayout(); this.menuStrip.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.MipMapNumericUpDown)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxWithInterpolationMode1)).BeginInit(); this.SuspendLayout(); // @@ -73,7 +68,7 @@ this.frameTreeView.Location = new System.Drawing.Point(20, 88); this.frameTreeView.Margin = new System.Windows.Forms.Padding(0); this.frameTreeView.Name = "frameTreeView"; - this.frameTreeView.Size = new System.Drawing.Size(165, 198); + this.frameTreeView.Size = new System.Drawing.Size(165, 223); this.frameTreeView.TabIndex = 15; this.frameTreeView.ItemDrag += new System.Windows.Forms.ItemDragEventHandler(this.frameTreeView_ItemDrag); this.frameTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.frameTreeView_AfterSelect); @@ -133,7 +128,7 @@ // this.saveToolStripMenuItem1.Image = ((System.Drawing.Image)(resources.GetObject("saveToolStripMenuItem1.Image"))); this.saveToolStripMenuItem1.Name = "saveToolStripMenuItem1"; - this.saveToolStripMenuItem1.Size = new System.Drawing.Size(180, 22); + this.saveToolStripMenuItem1.Size = new System.Drawing.Size(98, 22); this.saveToolStripMenuItem1.Text = "Save"; this.saveToolStripMenuItem1.Click += new System.EventHandler(this.saveToolStripMenuItem1_Click); // @@ -143,8 +138,7 @@ this.bulkAnimationSpeedToolStripMenuItem, this.importJavaAnimationToolStripMenuItem, this.exportJavaAnimationToolStripMenuItem, - this.changeTileToolStripMenuItem, - this.generateMipMapTexturesToolStripMenuItem}); + this.changeTileToolStripMenuItem}); this.editToolStripMenuItem.ForeColor = System.Drawing.Color.White; this.editToolStripMenuItem.Name = "editToolStripMenuItem"; this.editToolStripMenuItem.Size = new System.Drawing.Size(46, 20); @@ -154,7 +148,7 @@ // this.bulkAnimationSpeedToolStripMenuItem.Image = global::PckStudio.Properties.Resources.clock; this.bulkAnimationSpeedToolStripMenuItem.Name = "bulkAnimationSpeedToolStripMenuItem"; - this.bulkAnimationSpeedToolStripMenuItem.Size = new System.Drawing.Size(215, 22); + this.bulkAnimationSpeedToolStripMenuItem.Size = new System.Drawing.Size(210, 22); this.bulkAnimationSpeedToolStripMenuItem.Text = "Set Bulk Animation Speed"; this.bulkAnimationSpeedToolStripMenuItem.Click += new System.EventHandler(this.bulkAnimationSpeedToolStripMenuItem_Click); // @@ -162,7 +156,7 @@ // this.importJavaAnimationToolStripMenuItem.Image = global::PckStudio.Properties.Resources.Replace; this.importJavaAnimationToolStripMenuItem.Name = "importJavaAnimationToolStripMenuItem"; - this.importJavaAnimationToolStripMenuItem.Size = new System.Drawing.Size(215, 22); + this.importJavaAnimationToolStripMenuItem.Size = new System.Drawing.Size(210, 22); this.importJavaAnimationToolStripMenuItem.Text = "Import Java Animation"; this.importJavaAnimationToolStripMenuItem.Click += new System.EventHandler(this.importJavaAnimationToolStripMenuItem_Click); // @@ -170,7 +164,7 @@ // this.exportJavaAnimationToolStripMenuItem.Image = global::PckStudio.Properties.Resources.ExportFile; this.exportJavaAnimationToolStripMenuItem.Name = "exportJavaAnimationToolStripMenuItem"; - this.exportJavaAnimationToolStripMenuItem.Size = new System.Drawing.Size(215, 22); + this.exportJavaAnimationToolStripMenuItem.Size = new System.Drawing.Size(210, 22); this.exportJavaAnimationToolStripMenuItem.Text = "Export Java Animation"; this.exportJavaAnimationToolStripMenuItem.Click += new System.EventHandler(this.exportJavaAnimationToolStripMenuItem_Click); // @@ -178,7 +172,7 @@ // this.changeTileToolStripMenuItem.Image = global::PckStudio.Properties.Resources.changeTile; this.changeTileToolStripMenuItem.Name = "changeTileToolStripMenuItem"; - this.changeTileToolStripMenuItem.Size = new System.Drawing.Size(215, 22); + this.changeTileToolStripMenuItem.Size = new System.Drawing.Size(210, 22); this.changeTileToolStripMenuItem.Text = "Change Tile"; this.changeTileToolStripMenuItem.Click += new System.EventHandler(this.changeTileToolStripMenuItem_Click); // @@ -226,7 +220,7 @@ // this.InterpolationCheckbox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.InterpolationCheckbox.AutoSize = true; - this.InterpolationCheckbox.Location = new System.Drawing.Point(188, 317); + this.InterpolationCheckbox.Location = new System.Drawing.Point(188, 338); this.InterpolationCheckbox.Name = "InterpolationCheckbox"; this.InterpolationCheckbox.Size = new System.Drawing.Size(204, 15); this.InterpolationCheckbox.TabIndex = 17; @@ -237,7 +231,7 @@ // AnimationPlayBtn // this.AnimationPlayBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.AnimationPlayBtn.Location = new System.Drawing.Point(188, 291); + this.AnimationPlayBtn.Location = new System.Drawing.Point(188, 312); this.AnimationPlayBtn.Name = "AnimationPlayBtn"; this.AnimationPlayBtn.Size = new System.Drawing.Size(99, 24); this.AnimationPlayBtn.TabIndex = 18; @@ -250,7 +244,7 @@ // this.AnimationStopBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.AnimationStopBtn.Enabled = false; - this.AnimationStopBtn.Location = new System.Drawing.Point(293, 291); + this.AnimationStopBtn.Location = new System.Drawing.Point(293, 312); this.AnimationStopBtn.Name = "AnimationStopBtn"; this.AnimationStopBtn.Size = new System.Drawing.Size(99, 24); this.AnimationStopBtn.TabIndex = 19; @@ -263,65 +257,14 @@ // this.tileLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.tileLabel.AutoSize = true; - this.tileLabel.Location = new System.Drawing.Point(20, 290); + this.tileLabel.Location = new System.Drawing.Point(20, 311); this.tileLabel.MinimumSize = new System.Drawing.Size(170, 19); this.tileLabel.Name = "tileLabel"; - this.tileLabel.Size = new System.Drawing.Size(57, 19); + this.tileLabel.Size = new System.Drawing.Size(170, 19); this.tileLabel.TabIndex = 20; this.tileLabel.Text = "tileLabel"; this.tileLabel.Theme = MetroFramework.MetroThemeStyle.Dark; // - // MipMapCheckbox - // - this.MipMapCheckbox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.MipMapCheckbox.AutoSize = true; - this.MipMapCheckbox.Location = new System.Drawing.Point(20, 312); - this.MipMapCheckbox.Name = "MipMapCheckbox"; - this.MipMapCheckbox.Size = new System.Drawing.Size(128, 15); - this.MipMapCheckbox.TabIndex = 21; - this.MipMapCheckbox.Text = "Is Mip Map Texture?"; - this.MipMapCheckbox.Theme = MetroFramework.MetroThemeStyle.Dark; - this.MipMapCheckbox.UseSelectable = true; - this.MipMapCheckbox.CheckedChanged += new System.EventHandler(this.MipMapCheckBox_CheckedChanged); - // - // MipMapLabel - // - this.MipMapLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.MipMapLabel.AutoSize = true; - this.MipMapLabel.Location = new System.Drawing.Point(21, 330); - this.MipMapLabel.Name = "MipMapLabel"; - this.MipMapLabel.Size = new System.Drawing.Size(99, 19); - this.MipMapLabel.TabIndex = 22; - this.MipMapLabel.Text = "Mip Map Level:"; - this.MipMapLabel.Theme = MetroFramework.MetroThemeStyle.Dark; - this.MipMapLabel.Visible = false; - // - // MipMapNumericUpDown - // - this.MipMapNumericUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.MipMapNumericUpDown.BackColor = System.Drawing.Color.Black; - this.MipMapNumericUpDown.ForeColor = System.Drawing.SystemColors.Window; - this.MipMapNumericUpDown.Location = new System.Drawing.Point(127, 330); - this.MipMapNumericUpDown.Maximum = new decimal(new int[] { - 5, - 0, - 0, - 0}); - this.MipMapNumericUpDown.Minimum = new decimal(new int[] { - 2, - 0, - 0, - 0}); - this.MipMapNumericUpDown.Name = "MipMapNumericUpDown"; - this.MipMapNumericUpDown.Size = new System.Drawing.Size(44, 20); - this.MipMapNumericUpDown.TabIndex = 23; - this.MipMapNumericUpDown.Value = new decimal(new int[] { - 2, - 0, - 0, - 0}); - this.MipMapNumericUpDown.Visible = false; - // // pictureBoxWithInterpolationMode1 // this.pictureBoxWithInterpolationMode1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) @@ -330,19 +273,11 @@ this.pictureBoxWithInterpolationMode1.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor; this.pictureBoxWithInterpolationMode1.Location = new System.Drawing.Point(188, 88); this.pictureBoxWithInterpolationMode1.Name = "pictureBoxWithInterpolationMode1"; - this.pictureBoxWithInterpolationMode1.Size = new System.Drawing.Size(204, 198); + this.pictureBoxWithInterpolationMode1.Size = new System.Drawing.Size(204, 223); this.pictureBoxWithInterpolationMode1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.pictureBoxWithInterpolationMode1.TabIndex = 16; this.pictureBoxWithInterpolationMode1.TabStop = false; // - // generateMipMapTexturesToolStripMenuItem - // - this.generateMipMapTexturesToolStripMenuItem.Image = global::PckStudio.Properties.Resources.IMAGE_ICON; - this.generateMipMapTexturesToolStripMenuItem.Name = "generateMipMapTexturesToolStripMenuItem"; - this.generateMipMapTexturesToolStripMenuItem.Size = new System.Drawing.Size(215, 22); - this.generateMipMapTexturesToolStripMenuItem.Text = "Generate MipMap Textures"; - this.generateMipMapTexturesToolStripMenuItem.Click += new System.EventHandler(this.generateMipMapTexturesToolStripMenuItem_Click); - // // AnimationEditor // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -350,9 +285,6 @@ this.ClientSize = new System.Drawing.Size(412, 362); this.Controls.Add(this.AnimationStopBtn); this.Controls.Add(this.AnimationPlayBtn); - this.Controls.Add(this.MipMapNumericUpDown); - this.Controls.Add(this.MipMapLabel); - this.Controls.Add(this.MipMapCheckbox); this.Controls.Add(this.tileLabel); this.Controls.Add(this.InterpolationCheckbox); this.Controls.Add(this.pictureBoxWithInterpolationMode1); @@ -367,7 +299,6 @@ this.contextMenuStrip1.ResumeLayout(false); this.menuStrip.ResumeLayout(false); this.menuStrip.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.MipMapNumericUpDown)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxWithInterpolationMode1)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -393,14 +324,10 @@ private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem changeTileToolStripMenuItem; private MetroFramework.Controls.MetroLabel tileLabel; - private MetroFramework.Controls.MetroCheckBox MipMapCheckbox; - private MetroFramework.Controls.MetroLabel MipMapLabel; - private System.Windows.Forms.NumericUpDown MipMapNumericUpDown; private System.Windows.Forms.ToolStripMenuItem exportJavaAnimationToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem howToInterpolation; private System.Windows.Forms.ToolStripMenuItem editorControlsToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem setBulkSpedToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem javaAnimationSupportToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem generateMipMapTexturesToolStripMenuItem; } } \ No newline at end of file diff --git a/PCK-Studio/Forms/Editor/AnimationEditor.cs b/PCK-Studio/Forms/Editor/AnimationEditor.cs index 70242987..003931ee 100644 --- a/PCK-Studio/Forms/Editor/AnimationEditor.cs +++ b/PCK-Studio/Forms/Editor/AnimationEditor.cs @@ -251,15 +251,6 @@ namespace PckStudio.Forms.Editor TileName = Path.GetFileNameWithoutExtension(file.filepath); animationFile = file; - // sanity check - if (TileName.EndsWith("MipMapLevel2") || TileName.EndsWith("MipMapLevel3")) - { - string mipMapLvl = TileName.Last().ToString(); - TileName = TileName.Substring(0, TileName.Length - 12); - MipMapCheckbox.Checked = true; - MipMapNumericUpDown.Value = short.Parse(mipMapLvl); - } - using MemoryStream textureMem = new MemoryStream(animationFile.data); var texture = new Bitmap(textureMem); currentAnimation = animationFile.properties.HasProperty("ANIM") @@ -564,11 +555,6 @@ namespace PckStudio.Forms.Editor } } - private void MipMapCheckBox_CheckedChanged(object sender, EventArgs e) - { - MipMapNumericUpDown.Visible = MipMapLabel.Visible = MipMapCheckbox.Checked; - } - private void exportJavaAnimationToolStripMenuItem_Click(object sender, EventArgs e) { SaveFileDialog fileDialog = new SaveFileDialog(); @@ -619,9 +605,5 @@ namespace PckStudio.Forms.Editor "You can also export your animation as an Java Edition tile animation. It will also export the actual texture in the same spot.", "Java Edition Support"); } - private void generateMipMapTexturesToolStripMenuItem_Click(object sender, EventArgs e) - { - - } } }