From 367205b409fc6dec1d9731b29631fecabe953dfa Mon Sep 17 00:00:00 2001 From: MattNL Date: Wed, 10 May 2023 05:35:17 -0400 Subject: [PATCH 1/5] Corrected box and offset names in Model Generator --- .../Forms/Skins-And-Textures/generateModel.cs | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/PCK-Studio/Forms/Skins-And-Textures/generateModel.cs b/PCK-Studio/Forms/Skins-And-Textures/generateModel.cs index b49a4938..3714536a 100644 --- a/PCK-Studio/Forms/Skins-And-Textures/generateModel.cs +++ b/PCK-Studio/Forms/Skins-And-Textures/generateModel.cs @@ -53,19 +53,18 @@ namespace PckStudio "WAIST", "PANTS0", "PANTS1", - "SOCK0", - "SOCK1", // Armor Parts - "HELMET", - "CHEST", "BODYARMOR", - "SHOULDER0", "ARMARMOR0", - "SHOULDER1", "ARMARMOR0", + "BODYARMOR", + "ARMARMOR0", + "ARMARMOR1", "BELT", "LEGGING0", "LEGGING1", + "SOCK0", + "SOCK1", "BOOT0", - "BOOT1", + "BOOT1" }; private static readonly string[] ValidModelOffsetTypes = new string[] @@ -86,8 +85,8 @@ namespace PckStudio "BELT", "LEGGING0", "LEGGING1", - "BOOT0", - "BOOT1", + "SOCK0", "BOOT0", + "SOCK1", "BOOT1", "TOOL0", "TOOL1", From 97bf6a11db1c20b6e12485b8e7c3c0d15d910bfc Mon Sep 17 00:00:00 2001 From: MattNL Date: Wed, 10 May 2023 05:38:23 -0400 Subject: [PATCH 2/5] Added a warning when using the Model Generator --- PCK-Studio/Forms/Skins-And-Textures/generateModel.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/PCK-Studio/Forms/Skins-And-Textures/generateModel.cs b/PCK-Studio/Forms/Skins-And-Textures/generateModel.cs index 3714536a..d66d0215 100644 --- a/PCK-Studio/Forms/Skins-And-Textures/generateModel.cs +++ b/PCK-Studio/Forms/Skins-And-Textures/generateModel.cs @@ -114,6 +114,7 @@ namespace PckStudio public generateModel(PckFile.PCKProperties skinProperties, Image texture) { + MessageBox.Show(this, "This feature is now considered obsolete and will no longer recieve updates. A better alternative is currently under development. Use at your own risk.", "Obsolete Feature", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); InitializeComponent(); boxes = skinProperties; texturePreview.Image = texture; From 0190c18be2569800b5c10e9c8db4a46cb34e2acb Mon Sep 17 00:00:00 2001 From: MattNL Date: Wed, 10 May 2023 07:16:28 -0400 Subject: [PATCH 3/5] Fix for backslash bug in Audio Editor --- PCK-Studio/Forms/Editor/AudioEditor.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/PCK-Studio/Forms/Editor/AudioEditor.cs b/PCK-Studio/Forms/Editor/AudioEditor.cs index 309b9be6..6cc90670 100644 --- a/PCK-Studio/Forms/Editor/AudioEditor.cs +++ b/PCK-Studio/Forms/Editor/AudioEditor.cs @@ -17,8 +17,7 @@ using OMI.Formats.Languages; using OMI.Formats.Pck; using PckStudio.Forms.Additional_Popups; -// Audio Editor by MattNL -// additional work and optimization by Miku-666 +// Audio Editor by MattNL and Miku-666 namespace PckStudio.Forms.Editor { @@ -75,9 +74,15 @@ namespace PckStudio.Forms.Editor { treeView1.BeginUpdate(); treeView1.Nodes.Clear(); + foreach (var category in audioFile.Categories) { - if(category.audioType == PckAudioFile.AudioCategory.EAudioType.Creative) + // fix songs with directories using backslash instead of forward slash + // Songs with a backslash instead of a forward slash would not play in RPCS3 + foreach (string songname in category.SongNames.FindAll(s => s.Contains('\\'))) + category.SongNames[category.SongNames.IndexOf(songname)] = songname.Replace('\\', '/'); + + if (category.audioType == PckAudioFile.AudioCategory.EAudioType.Creative) { if (category.Name == "include_overworld" && audioFile.TryGetCategory(PckAudioFile.AudioCategory.EAudioType.Overworld, out PckAudioFile.AudioCategory overworldCategory)) From 71fe1e4cd8c3aa6f7b04b884ac438a4855ca67f4 Mon Sep 17 00:00:00 2001 From: MattNL Date: Wed, 10 May 2023 07:17:17 -0400 Subject: [PATCH 4/5] Fix for crash when organizing binka files --- PCK-Studio/Forms/Editor/AudioEditor.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/PCK-Studio/Forms/Editor/AudioEditor.cs b/PCK-Studio/Forms/Editor/AudioEditor.cs index 6cc90670..53650f1e 100644 --- a/PCK-Studio/Forms/Editor/AudioEditor.cs +++ b/PCK-Studio/Forms/Editor/AudioEditor.cs @@ -612,12 +612,14 @@ namespace PckStudio.Forms.Editor { string song = category.SongNames[i]; string songpath = Path.Combine(parent.GetDataPath(), song + ".binka"); - if (File.Exists(songpath)) + string new_path = Path.Combine(musicdir, Path.GetFileName(song) + ".binka"); + if (File.Exists(songpath) && !File.Exists(new_path)) { - File.Move(songpath, Path.Combine(musicdir, song + ".binka")); - } + File.Move(songpath, new_path); - category.SongNames[i] = Path.Combine("Music", song.Replace(song, Path.GetFileNameWithoutExtension(songpath))); + // Songs with a backslash instead of a forward slash were not playing in RPCS3 + category.SongNames[i] = "Music/" + song.Replace(song, Path.GetFileNameWithoutExtension(songpath)); + } } } treeView2.Nodes.Clear(); From 3c56551b63f9eca17e60b829e1ee7eaf95586d61 Mon Sep 17 00:00:00 2001 From: MattNL Date: Wed, 10 May 2023 07:17:55 -0400 Subject: [PATCH 5/5] Removed credits editor from Audio Editor --- .../Forms/Editor/AudioEditor.Designer.cs | 541 +++++++++--------- PCK-Studio/Forms/Editor/AudioEditor.cs | 4 +- PCK-Studio/Forms/Editor/AudioEditor.resx | 152 +++-- PCK-Studio/MainForm.cs | 15 +- 4 files changed, 341 insertions(+), 371 deletions(-) diff --git a/PCK-Studio/Forms/Editor/AudioEditor.Designer.cs b/PCK-Studio/Forms/Editor/AudioEditor.Designer.cs index a9011a57..a88248d0 100644 --- a/PCK-Studio/Forms/Editor/AudioEditor.Designer.cs +++ b/PCK-Studio/Forms/Editor/AudioEditor.Designer.cs @@ -29,312 +29,304 @@ namespace PckStudio.Forms.Editor /// private void InitializeComponent() { - this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AudioEditor)); - this.treeView1 = new System.Windows.Forms.TreeView(); - this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); - this.addCategoryStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.removeCategoryStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.changeCategoryToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.catImages = new System.Windows.Forms.ImageList(this.components); - this.menuStrip = new System.Windows.Forms.MenuStrip(); - this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.saveToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); - this.toolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.creditsEditorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.deleteUnusedBINKAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.openDataFolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.bulkReplaceExistingTracksToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.organizeTracksToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.howToAddSongsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.whatAreTheCategoriesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.howToEditCreditsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.optimizeDataFolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.bINKACompressionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.treeView2 = new System.Windows.Forms.TreeView(); - this.contextMenuStrip2 = new System.Windows.Forms.ContextMenuStrip(this.components); - this.addEntryMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.removeEntryMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.verifyFileLocationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.playOverworldInCreative = new MetroFramework.Controls.MetroCheckBox(); - this.compressionUpDown = new System.Windows.Forms.NumericUpDown(); - this.metroLabel1 = new MetroFramework.Controls.MetroLabel(); - this.convertToWAVToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.contextMenuStrip1.SuspendLayout(); - this.menuStrip.SuspendLayout(); - this.contextMenuStrip2.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.compressionUpDown)).BeginInit(); - this.SuspendLayout(); - // - // treeView1 - // - resources.ApplyResources(this.treeView1, "treeView1"); - this.treeView1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - this.treeView1.ContextMenuStrip = this.contextMenuStrip1; - this.treeView1.ForeColor = System.Drawing.Color.White; - this.treeView1.ImageList = this.catImages; - this.treeView1.LabelEdit = true; - this.treeView1.Name = "treeView1"; - this.treeView1.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterSelect); - this.treeView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.treeView1_KeyDown); - // - // contextMenuStrip1 - // - this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AudioEditor)); + this.treeView1 = new System.Windows.Forms.TreeView(); + this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); + this.addCategoryStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.removeCategoryStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.changeCategoryToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.catImages = new System.Windows.Forms.ImageList(this.components); + this.menuStrip = new System.Windows.Forms.MenuStrip(); + this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.saveToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.deleteUnusedBINKAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.openDataFolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.bulkReplaceExistingTracksToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.organizeTracksToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.howToAddSongsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.whatAreTheCategoriesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.howToEditCreditsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.optimizeDataFolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.bINKACompressionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.treeView2 = new System.Windows.Forms.TreeView(); + this.contextMenuStrip2 = new System.Windows.Forms.ContextMenuStrip(this.components); + this.addEntryMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.removeEntryMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.verifyFileLocationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.convertToWAVToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.playOverworldInCreative = new MetroFramework.Controls.MetroCheckBox(); + this.compressionUpDown = new System.Windows.Forms.NumericUpDown(); + this.metroLabel1 = new MetroFramework.Controls.MetroLabel(); + this.contextMenuStrip1.SuspendLayout(); + this.menuStrip.SuspendLayout(); + this.contextMenuStrip2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.compressionUpDown)).BeginInit(); + this.SuspendLayout(); + // + // treeView1 + // + resources.ApplyResources(this.treeView1, "treeView1"); + this.treeView1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.treeView1.ContextMenuStrip = this.contextMenuStrip1; + this.treeView1.ForeColor = System.Drawing.Color.White; + this.treeView1.ImageList = this.catImages; + this.treeView1.LabelEdit = true; + this.treeView1.Name = "treeView1"; + this.treeView1.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterSelect); + this.treeView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.treeView1_KeyDown); + // + // contextMenuStrip1 + // + this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.addCategoryStripMenuItem, this.removeCategoryStripMenuItem, this.changeCategoryToolStripMenuItem}); - this.contextMenuStrip1.Name = "contextMenuStrip1"; - resources.ApplyResources(this.contextMenuStrip1, "contextMenuStrip1"); - // - // addCategoryStripMenuItem - // - resources.ApplyResources(this.addCategoryStripMenuItem, "addCategoryStripMenuItem"); - this.addCategoryStripMenuItem.Name = "addCategoryStripMenuItem"; - this.addCategoryStripMenuItem.Click += new System.EventHandler(this.addCategoryStripMenuItem_Click); - // - // removeCategoryStripMenuItem - // - this.removeCategoryStripMenuItem.Name = "removeCategoryStripMenuItem"; - resources.ApplyResources(this.removeCategoryStripMenuItem, "removeCategoryStripMenuItem"); - this.removeCategoryStripMenuItem.Click += new System.EventHandler(this.removeCategoryStripMenuItem_Click); - // - // changeCategoryToolStripMenuItem - // - this.changeCategoryToolStripMenuItem.Name = "changeCategoryToolStripMenuItem"; - resources.ApplyResources(this.changeCategoryToolStripMenuItem, "changeCategoryToolStripMenuItem"); - this.changeCategoryToolStripMenuItem.Click += new System.EventHandler(this.setCategoryToolStripMenuItem_Click); - // - // catImages - // - this.catImages.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("catImages.ImageStream"))); - this.catImages.TransparentColor = System.Drawing.Color.Transparent; - this.catImages.Images.SetKeyName(0, "0_overworld.png"); - this.catImages.Images.SetKeyName(1, "1_nether.png"); - this.catImages.Images.SetKeyName(2, "2_end.png"); - this.catImages.Images.SetKeyName(3, "4_creative.png"); - this.catImages.Images.SetKeyName(4, "3_menu.png"); - this.catImages.Images.SetKeyName(5, "5_mg01.png"); - this.catImages.Images.SetKeyName(6, "6_mg02.png"); - this.catImages.Images.SetKeyName(7, "7_mg03.png"); - this.catImages.Images.SetKeyName(8, "8_unused.png"); - // - // menuStrip - // - resources.ApplyResources(this.menuStrip, "menuStrip"); - this.menuStrip.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.contextMenuStrip1.Name = "contextMenuStrip1"; + resources.ApplyResources(this.contextMenuStrip1, "contextMenuStrip1"); + // + // addCategoryStripMenuItem + // + resources.ApplyResources(this.addCategoryStripMenuItem, "addCategoryStripMenuItem"); + this.addCategoryStripMenuItem.Name = "addCategoryStripMenuItem"; + this.addCategoryStripMenuItem.Click += new System.EventHandler(this.addCategoryStripMenuItem_Click); + // + // removeCategoryStripMenuItem + // + this.removeCategoryStripMenuItem.Name = "removeCategoryStripMenuItem"; + resources.ApplyResources(this.removeCategoryStripMenuItem, "removeCategoryStripMenuItem"); + this.removeCategoryStripMenuItem.Click += new System.EventHandler(this.removeCategoryStripMenuItem_Click); + // + // changeCategoryToolStripMenuItem + // + this.changeCategoryToolStripMenuItem.Name = "changeCategoryToolStripMenuItem"; + resources.ApplyResources(this.changeCategoryToolStripMenuItem, "changeCategoryToolStripMenuItem"); + this.changeCategoryToolStripMenuItem.Click += new System.EventHandler(this.setCategoryToolStripMenuItem_Click); + // + // catImages + // + this.catImages.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("catImages.ImageStream"))); + this.catImages.TransparentColor = System.Drawing.Color.Transparent; + this.catImages.Images.SetKeyName(0, "0_overworld.png"); + this.catImages.Images.SetKeyName(1, "1_nether.png"); + this.catImages.Images.SetKeyName(2, "2_end.png"); + this.catImages.Images.SetKeyName(3, "4_creative.png"); + this.catImages.Images.SetKeyName(4, "3_menu.png"); + this.catImages.Images.SetKeyName(5, "5_mg01.png"); + this.catImages.Images.SetKeyName(6, "6_mg02.png"); + this.catImages.Images.SetKeyName(7, "7_mg03.png"); + this.catImages.Images.SetKeyName(8, "8_unused.png"); + // + // menuStrip + // + resources.ApplyResources(this.menuStrip, "menuStrip"); + this.menuStrip.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.fileToolStripMenuItem, this.toolsToolStripMenuItem, this.helpToolStripMenuItem}); - this.menuStrip.Name = "menuStrip"; - // - // fileToolStripMenuItem - // - this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.menuStrip.Name = "menuStrip"; + // + // fileToolStripMenuItem + // + this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.saveToolStripMenuItem1}); - this.fileToolStripMenuItem.ForeColor = System.Drawing.Color.White; - this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; - resources.ApplyResources(this.fileToolStripMenuItem, "fileToolStripMenuItem"); - // - // saveToolStripMenuItem1 - // - resources.ApplyResources(this.saveToolStripMenuItem1, "saveToolStripMenuItem1"); - this.saveToolStripMenuItem1.Name = "saveToolStripMenuItem1"; - this.saveToolStripMenuItem1.Click += new System.EventHandler(this.saveToolStripMenuItem1_Click); - // - // toolsToolStripMenuItem - // - this.toolsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.creditsEditorToolStripMenuItem, + this.fileToolStripMenuItem.ForeColor = System.Drawing.Color.White; + this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; + resources.ApplyResources(this.fileToolStripMenuItem, "fileToolStripMenuItem"); + // + // saveToolStripMenuItem1 + // + resources.ApplyResources(this.saveToolStripMenuItem1, "saveToolStripMenuItem1"); + this.saveToolStripMenuItem1.Name = "saveToolStripMenuItem1"; + this.saveToolStripMenuItem1.Click += new System.EventHandler(this.saveToolStripMenuItem1_Click); + // + // toolsToolStripMenuItem + // + this.toolsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.deleteUnusedBINKAsToolStripMenuItem, this.openDataFolderToolStripMenuItem, this.bulkReplaceExistingTracksToolStripMenuItem, this.organizeTracksToolStripMenuItem}); - this.toolsToolStripMenuItem.ForeColor = System.Drawing.Color.White; - this.toolsToolStripMenuItem.Name = "toolsToolStripMenuItem"; - resources.ApplyResources(this.toolsToolStripMenuItem, "toolsToolStripMenuItem"); - // - // creditsEditorToolStripMenuItem - // - this.creditsEditorToolStripMenuItem.Name = "creditsEditorToolStripMenuItem"; - resources.ApplyResources(this.creditsEditorToolStripMenuItem, "creditsEditorToolStripMenuItem"); - this.creditsEditorToolStripMenuItem.Click += new System.EventHandler(this.creditsEditorToolStripMenuItem_Click); - // - // deleteUnusedBINKAsToolStripMenuItem - // - this.deleteUnusedBINKAsToolStripMenuItem.Name = "deleteUnusedBINKAsToolStripMenuItem"; - resources.ApplyResources(this.deleteUnusedBINKAsToolStripMenuItem, "deleteUnusedBINKAsToolStripMenuItem"); - this.deleteUnusedBINKAsToolStripMenuItem.Click += new System.EventHandler(this.deleteUnusedBINKAsToolStripMenuItem_Click); - // - // openDataFolderToolStripMenuItem - // - this.openDataFolderToolStripMenuItem.Name = "openDataFolderToolStripMenuItem"; - resources.ApplyResources(this.openDataFolderToolStripMenuItem, "openDataFolderToolStripMenuItem"); - this.openDataFolderToolStripMenuItem.Click += new System.EventHandler(this.openDataFolderToolStripMenuItem_Click); - // - // bulkReplaceExistingTracksToolStripMenuItem - // - this.bulkReplaceExistingTracksToolStripMenuItem.Name = "bulkReplaceExistingTracksToolStripMenuItem"; - resources.ApplyResources(this.bulkReplaceExistingTracksToolStripMenuItem, "bulkReplaceExistingTracksToolStripMenuItem"); - this.bulkReplaceExistingTracksToolStripMenuItem.Click += new System.EventHandler(this.bulkReplaceExistingFilesToolStripMenuItem_Click); - // - // organizeTracksToolStripMenuItem - // - this.organizeTracksToolStripMenuItem.Name = "organizeTracksToolStripMenuItem"; - resources.ApplyResources(this.organizeTracksToolStripMenuItem, "organizeTracksToolStripMenuItem"); - this.organizeTracksToolStripMenuItem.Click += new System.EventHandler(this.organizeTracksToolStripMenuItem_Click); - // - // helpToolStripMenuItem - // - this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolsToolStripMenuItem.ForeColor = System.Drawing.Color.White; + this.toolsToolStripMenuItem.Name = "toolsToolStripMenuItem"; + resources.ApplyResources(this.toolsToolStripMenuItem, "toolsToolStripMenuItem"); + // + // deleteUnusedBINKAsToolStripMenuItem + // + this.deleteUnusedBINKAsToolStripMenuItem.Name = "deleteUnusedBINKAsToolStripMenuItem"; + resources.ApplyResources(this.deleteUnusedBINKAsToolStripMenuItem, "deleteUnusedBINKAsToolStripMenuItem"); + this.deleteUnusedBINKAsToolStripMenuItem.Click += new System.EventHandler(this.deleteUnusedBINKAsToolStripMenuItem_Click); + // + // openDataFolderToolStripMenuItem + // + this.openDataFolderToolStripMenuItem.Name = "openDataFolderToolStripMenuItem"; + resources.ApplyResources(this.openDataFolderToolStripMenuItem, "openDataFolderToolStripMenuItem"); + this.openDataFolderToolStripMenuItem.Click += new System.EventHandler(this.openDataFolderToolStripMenuItem_Click); + // + // bulkReplaceExistingTracksToolStripMenuItem + // + this.bulkReplaceExistingTracksToolStripMenuItem.Name = "bulkReplaceExistingTracksToolStripMenuItem"; + resources.ApplyResources(this.bulkReplaceExistingTracksToolStripMenuItem, "bulkReplaceExistingTracksToolStripMenuItem"); + this.bulkReplaceExistingTracksToolStripMenuItem.Click += new System.EventHandler(this.bulkReplaceExistingFilesToolStripMenuItem_Click); + // + // organizeTracksToolStripMenuItem + // + this.organizeTracksToolStripMenuItem.Name = "organizeTracksToolStripMenuItem"; + resources.ApplyResources(this.organizeTracksToolStripMenuItem, "organizeTracksToolStripMenuItem"); + this.organizeTracksToolStripMenuItem.Click += new System.EventHandler(this.organizeTracksToolStripMenuItem_Click); + // + // helpToolStripMenuItem + // + this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.howToAddSongsToolStripMenuItem, this.whatAreTheCategoriesToolStripMenuItem, this.howToEditCreditsToolStripMenuItem, this.optimizeDataFolderToolStripMenuItem, this.bINKACompressionToolStripMenuItem}); - this.helpToolStripMenuItem.ForeColor = System.Drawing.Color.White; - this.helpToolStripMenuItem.Name = "helpToolStripMenuItem"; - resources.ApplyResources(this.helpToolStripMenuItem, "helpToolStripMenuItem"); - // - // howToAddSongsToolStripMenuItem - // - this.howToAddSongsToolStripMenuItem.Name = "howToAddSongsToolStripMenuItem"; - resources.ApplyResources(this.howToAddSongsToolStripMenuItem, "howToAddSongsToolStripMenuItem"); - this.howToAddSongsToolStripMenuItem.Click += new System.EventHandler(this.howToAddSongsToolStripMenuItem_Click); - // - // whatAreTheCategoriesToolStripMenuItem - // - this.whatAreTheCategoriesToolStripMenuItem.Name = "whatAreTheCategoriesToolStripMenuItem"; - resources.ApplyResources(this.whatAreTheCategoriesToolStripMenuItem, "whatAreTheCategoriesToolStripMenuItem"); - this.whatAreTheCategoriesToolStripMenuItem.Click += new System.EventHandler(this.whatAreTheCategoriesToolStripMenuItem_Click); - // - // howToEditCreditsToolStripMenuItem - // - this.howToEditCreditsToolStripMenuItem.Name = "howToEditCreditsToolStripMenuItem"; - resources.ApplyResources(this.howToEditCreditsToolStripMenuItem, "howToEditCreditsToolStripMenuItem"); - this.howToEditCreditsToolStripMenuItem.Click += new System.EventHandler(this.howToEditCreditsToolStripMenuItem_Click); - // - // optimizeDataFolderToolStripMenuItem - // - this.optimizeDataFolderToolStripMenuItem.Name = "optimizeDataFolderToolStripMenuItem"; - resources.ApplyResources(this.optimizeDataFolderToolStripMenuItem, "optimizeDataFolderToolStripMenuItem"); - this.optimizeDataFolderToolStripMenuItem.Click += new System.EventHandler(this.optimizeDataFolderToolStripMenuItem_Click); - // - // bINKACompressionToolStripMenuItem - // - this.bINKACompressionToolStripMenuItem.Name = "bINKACompressionToolStripMenuItem"; - resources.ApplyResources(this.bINKACompressionToolStripMenuItem, "bINKACompressionToolStripMenuItem"); - this.bINKACompressionToolStripMenuItem.Click += new System.EventHandler(this.BINKACompressionToolStripMenuItem_Click); - // - // treeView2 - // - this.treeView2.AllowDrop = true; - resources.ApplyResources(this.treeView2, "treeView2"); - this.treeView2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - this.treeView2.ContextMenuStrip = this.contextMenuStrip2; - this.treeView2.ForeColor = System.Drawing.Color.White; - this.treeView2.Name = "treeView2"; - this.treeView2.DragDrop += new System.Windows.Forms.DragEventHandler(this.Binka_DragDrop); - this.treeView2.DragEnter += new System.Windows.Forms.DragEventHandler(this.treeView2_DragEnter); - this.treeView2.KeyDown += new System.Windows.Forms.KeyEventHandler(this.treeView2_KeyDown); - // - // contextMenuStrip2 - // - this.contextMenuStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.helpToolStripMenuItem.ForeColor = System.Drawing.Color.White; + this.helpToolStripMenuItem.Name = "helpToolStripMenuItem"; + resources.ApplyResources(this.helpToolStripMenuItem, "helpToolStripMenuItem"); + // + // howToAddSongsToolStripMenuItem + // + this.howToAddSongsToolStripMenuItem.Name = "howToAddSongsToolStripMenuItem"; + resources.ApplyResources(this.howToAddSongsToolStripMenuItem, "howToAddSongsToolStripMenuItem"); + this.howToAddSongsToolStripMenuItem.Click += new System.EventHandler(this.howToAddSongsToolStripMenuItem_Click); + // + // whatAreTheCategoriesToolStripMenuItem + // + this.whatAreTheCategoriesToolStripMenuItem.Name = "whatAreTheCategoriesToolStripMenuItem"; + resources.ApplyResources(this.whatAreTheCategoriesToolStripMenuItem, "whatAreTheCategoriesToolStripMenuItem"); + this.whatAreTheCategoriesToolStripMenuItem.Click += new System.EventHandler(this.whatAreTheCategoriesToolStripMenuItem_Click); + // + // howToEditCreditsToolStripMenuItem + // + this.howToEditCreditsToolStripMenuItem.Name = "howToEditCreditsToolStripMenuItem"; + resources.ApplyResources(this.howToEditCreditsToolStripMenuItem, "howToEditCreditsToolStripMenuItem"); + this.howToEditCreditsToolStripMenuItem.Click += new System.EventHandler(this.howToEditCreditsToolStripMenuItem_Click); + // + // optimizeDataFolderToolStripMenuItem + // + this.optimizeDataFolderToolStripMenuItem.Name = "optimizeDataFolderToolStripMenuItem"; + resources.ApplyResources(this.optimizeDataFolderToolStripMenuItem, "optimizeDataFolderToolStripMenuItem"); + this.optimizeDataFolderToolStripMenuItem.Click += new System.EventHandler(this.optimizeDataFolderToolStripMenuItem_Click); + // + // bINKACompressionToolStripMenuItem + // + this.bINKACompressionToolStripMenuItem.Name = "bINKACompressionToolStripMenuItem"; + resources.ApplyResources(this.bINKACompressionToolStripMenuItem, "bINKACompressionToolStripMenuItem"); + this.bINKACompressionToolStripMenuItem.Click += new System.EventHandler(this.BINKACompressionToolStripMenuItem_Click); + // + // treeView2 + // + this.treeView2.AllowDrop = true; + resources.ApplyResources(this.treeView2, "treeView2"); + this.treeView2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.treeView2.ContextMenuStrip = this.contextMenuStrip2; + this.treeView2.ForeColor = System.Drawing.Color.White; + this.treeView2.Name = "treeView2"; + this.treeView2.DragDrop += new System.Windows.Forms.DragEventHandler(this.Binka_DragDrop); + this.treeView2.DragEnter += new System.Windows.Forms.DragEventHandler(this.treeView2_DragEnter); + this.treeView2.KeyDown += new System.Windows.Forms.KeyEventHandler(this.treeView2_KeyDown); + // + // contextMenuStrip2 + // + this.contextMenuStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.addEntryMenuItem, this.removeEntryMenuItem, this.verifyFileLocationToolStripMenuItem, this.convertToWAVToolStripMenuItem}); - this.contextMenuStrip2.Name = "contextMenuStrip1"; - resources.ApplyResources(this.contextMenuStrip2, "contextMenuStrip2"); - // - // addEntryMenuItem - // - resources.ApplyResources(this.addEntryMenuItem, "addEntryMenuItem"); - this.addEntryMenuItem.Name = "addEntryMenuItem"; - this.addEntryMenuItem.Click += new System.EventHandler(this.addEntryMenuItem_Click); - // - // removeEntryMenuItem - // - this.removeEntryMenuItem.Name = "removeEntryMenuItem"; - resources.ApplyResources(this.removeEntryMenuItem, "removeEntryMenuItem"); - this.removeEntryMenuItem.Click += new System.EventHandler(this.removeEntryMenuItem_Click); - // - // verifyFileLocationToolStripMenuItem - // - this.verifyFileLocationToolStripMenuItem.Name = "verifyFileLocationToolStripMenuItem"; - resources.ApplyResources(this.verifyFileLocationToolStripMenuItem, "verifyFileLocationToolStripMenuItem"); - this.verifyFileLocationToolStripMenuItem.Click += new System.EventHandler(this.verifyFileLocationToolStripMenuItem_Click); - // - // playOverworldInCreative - // - resources.ApplyResources(this.playOverworldInCreative, "playOverworldInCreative"); - this.playOverworldInCreative.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - this.playOverworldInCreative.ForeColor = System.Drawing.SystemColors.Window; - this.playOverworldInCreative.Name = "playOverworldInCreative"; - this.playOverworldInCreative.Theme = MetroFramework.MetroThemeStyle.Dark; - this.playOverworldInCreative.UseCustomBackColor = true; - this.playOverworldInCreative.UseCustomForeColor = true; - this.playOverworldInCreative.UseSelectable = true; - // - // compressionUpDown - // - this.compressionUpDown.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - this.compressionUpDown.ForeColor = System.Drawing.SystemColors.Window; - resources.ApplyResources(this.compressionUpDown, "compressionUpDown"); - this.compressionUpDown.Maximum = new decimal(new int[] { + this.contextMenuStrip2.Name = "contextMenuStrip1"; + resources.ApplyResources(this.contextMenuStrip2, "contextMenuStrip2"); + // + // addEntryMenuItem + // + resources.ApplyResources(this.addEntryMenuItem, "addEntryMenuItem"); + this.addEntryMenuItem.Name = "addEntryMenuItem"; + this.addEntryMenuItem.Click += new System.EventHandler(this.addEntryMenuItem_Click); + // + // removeEntryMenuItem + // + this.removeEntryMenuItem.Name = "removeEntryMenuItem"; + resources.ApplyResources(this.removeEntryMenuItem, "removeEntryMenuItem"); + this.removeEntryMenuItem.Click += new System.EventHandler(this.removeEntryMenuItem_Click); + // + // verifyFileLocationToolStripMenuItem + // + this.verifyFileLocationToolStripMenuItem.Name = "verifyFileLocationToolStripMenuItem"; + resources.ApplyResources(this.verifyFileLocationToolStripMenuItem, "verifyFileLocationToolStripMenuItem"); + this.verifyFileLocationToolStripMenuItem.Click += new System.EventHandler(this.verifyFileLocationToolStripMenuItem_Click); + // + // convertToWAVToolStripMenuItem + // + this.convertToWAVToolStripMenuItem.Name = "convertToWAVToolStripMenuItem"; + resources.ApplyResources(this.convertToWAVToolStripMenuItem, "convertToWAVToolStripMenuItem"); + this.convertToWAVToolStripMenuItem.Click += new System.EventHandler(this.convertToWAVToolStripMenuItem_Click); + // + // playOverworldInCreative + // + resources.ApplyResources(this.playOverworldInCreative, "playOverworldInCreative"); + this.playOverworldInCreative.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.playOverworldInCreative.ForeColor = System.Drawing.SystemColors.Window; + this.playOverworldInCreative.Name = "playOverworldInCreative"; + this.playOverworldInCreative.Theme = MetroFramework.MetroThemeStyle.Dark; + this.playOverworldInCreative.UseCustomBackColor = true; + this.playOverworldInCreative.UseCustomForeColor = true; + this.playOverworldInCreative.UseSelectable = true; + // + // compressionUpDown + // + this.compressionUpDown.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.compressionUpDown.ForeColor = System.Drawing.SystemColors.Window; + resources.ApplyResources(this.compressionUpDown, "compressionUpDown"); + this.compressionUpDown.Maximum = new decimal(new int[] { 9, 0, 0, 0}); - this.compressionUpDown.Minimum = new decimal(new int[] { + this.compressionUpDown.Minimum = new decimal(new int[] { 1, 0, 0, 0}); - this.compressionUpDown.Name = "compressionUpDown"; - this.compressionUpDown.Value = new decimal(new int[] { + this.compressionUpDown.Name = "compressionUpDown"; + this.compressionUpDown.Value = new decimal(new int[] { 4, 0, 0, 0}); - // - // metroLabel1 - // - resources.ApplyResources(this.metroLabel1, "metroLabel1"); - this.metroLabel1.Name = "metroLabel1"; - this.metroLabel1.Theme = MetroFramework.MetroThemeStyle.Dark; - // - // convertToWAVToolStripMenuItem - // - this.convertToWAVToolStripMenuItem.Name = "convertToWAVToolStripMenuItem"; - resources.ApplyResources(this.convertToWAVToolStripMenuItem, "convertToWAVToolStripMenuItem"); - this.convertToWAVToolStripMenuItem.Click += new System.EventHandler(this.convertToWAVToolStripMenuItem_Click); - // - // AudioEditor - // - resources.ApplyResources(this, "$this"); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.metroLabel1); - this.Controls.Add(this.compressionUpDown); - this.Controls.Add(this.playOverworldInCreative); - this.Controls.Add(this.treeView1); - this.Controls.Add(this.treeView2); - this.Controls.Add(this.menuStrip); - this.Name = "AudioEditor"; - this.Style = MetroFramework.MetroColorStyle.Silver; - this.Theme = MetroFramework.MetroThemeStyle.Dark; - this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.AudioEditor_FormClosed); - this.Shown += new System.EventHandler(this.AudioEditor_Shown); - this.contextMenuStrip1.ResumeLayout(false); - this.menuStrip.ResumeLayout(false); - this.menuStrip.PerformLayout(); - this.contextMenuStrip2.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.compressionUpDown)).EndInit(); - this.ResumeLayout(false); - this.PerformLayout(); + // + // metroLabel1 + // + resources.ApplyResources(this.metroLabel1, "metroLabel1"); + this.metroLabel1.Name = "metroLabel1"; + this.metroLabel1.Theme = MetroFramework.MetroThemeStyle.Dark; + // + // AudioEditor + // + resources.ApplyResources(this, "$this"); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.metroLabel1); + this.Controls.Add(this.compressionUpDown); + this.Controls.Add(this.playOverworldInCreative); + this.Controls.Add(this.treeView1); + this.Controls.Add(this.treeView2); + this.Controls.Add(this.menuStrip); + this.Name = "AudioEditor"; + this.Style = MetroFramework.MetroColorStyle.Silver; + this.Theme = MetroFramework.MetroThemeStyle.Dark; + this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.AudioEditor_FormClosed); + this.Shown += new System.EventHandler(this.AudioEditor_Shown); + this.contextMenuStrip1.ResumeLayout(false); + this.menuStrip.ResumeLayout(false); + this.menuStrip.PerformLayout(); + this.contextMenuStrip2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.compressionUpDown)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); } @@ -354,7 +346,6 @@ namespace PckStudio.Forms.Editor private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem; private System.Windows.Forms.ImageList catImages; private System.Windows.Forms.ToolStripMenuItem toolsToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem creditsEditorToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem verifyFileLocationToolStripMenuItem; private MetroFramework.Controls.MetroCheckBox playOverworldInCreative; private System.Windows.Forms.ToolStripMenuItem deleteUnusedBINKAsToolStripMenuItem; diff --git a/PCK-Studio/Forms/Editor/AudioEditor.cs b/PCK-Studio/Forms/Editor/AudioEditor.cs index 53650f1e..85a59416 100644 --- a/PCK-Studio/Forms/Editor/AudioEditor.cs +++ b/PCK-Studio/Forms/Editor/AudioEditor.cs @@ -26,7 +26,6 @@ namespace PckStudio.Forms.Editor public string defaultType = "yes"; PckAudioFile audioFile = null; PckFile.FileData audioPCK; - LOCFile loc; bool _isLittleEndian = false; MainForm parent = null; @@ -54,10 +53,9 @@ namespace PckStudio.Forms.Editor return (PckAudioFile.AudioCategory.EAudioType)Categories.IndexOf(category); } - public AudioEditor(PckFile.FileData file, LOCFile locFile, bool isLittleEndian) + public AudioEditor(PckFile.FileData file, bool isLittleEndian) { InitializeComponent(); - loc = locFile; _isLittleEndian = isLittleEndian; audioPCK = file; diff --git a/PCK-Studio/Forms/Editor/AudioEditor.resx b/PCK-Studio/Forms/Editor/AudioEditor.resx index e032d6ce..75d316c3 100644 --- a/PCK-Studio/Forms/Editor/AudioEditor.resx +++ b/PCK-Studio/Forms/Editor/AudioEditor.resx @@ -125,6 +125,32 @@ 127, 8 + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + vAAADrwBlbxySQAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMkMEa+wAAABSSURBVDhP5c0x + DsAgDENRxt7/wmkNSpRGf0CCCZAegxNMM7MlGMp3dIU6dxhKf/QMNxRogeQC8ivw5Vn7C0heJlFA+kL5 + jWAohxRkde4wnGftBS90axNmphIGAAAAAElFTkSuQmCC + + + + 168, 22 + + + Add Category + + + 168, 22 + + + Remove Category + + + 168, 22 + + + Set Category + 169, 70 @@ -146,7 +172,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADk - MAAAAk1TRnQBSQFMAgEBCQEAAagBAAGoAQABEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA + MAAAAk1TRnQBSQFMAgEBCQEAAbABAAGwAQABEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA AwABMAMAAQEBAAEgBgABMBIAAzgB/wM1Af8DNQH/AzMB/wMwAf8DLwH/Ay0B/wMtAf8DJAH/AzsB/wM4 Af8DNQH/Ay0B/wMnAf8DNgH/AzIB/8AAAzgB/wN/Af8DeQH/A3kB/wN5Af8DcQH/A3EB/wN5Af8DeQH/ A3EB/wNxAf8DcQH/A3kB/wN5Af8DfwH/AzIB/8AAAzIB/wN2Af8DsAH/A7AB/wOvAf8DrwH/A68B/wOo @@ -384,68 +410,12 @@ 5 - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - vAAADrwBlbxySQAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMkMEa+wAAABSSURBVDhP5c0x - DsAgDENRxt7/wmkNSpRGf0CCCZAegxNMM7MlGMp3dIU6dxhKf/QMNxRogeQC8ivw5Vn7C0heJlFA+kL5 - jWAohxRkde4wnGftBS90axNmphIGAAAAAElFTkSuQmCC - - - - 168, 22 - - - Add Category - - - 168, 22 - - - Remove Category - - - 168, 22 - - - Set Category - 19, 8 False - - 20, 60 - - - 410, 24 - - - 11 - - - menuStrip1 - - - menuStrip - - - System.Windows.Forms.MenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 7 - - - 37, 20 - - - File - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO @@ -462,17 +432,11 @@ Save - - 46, 20 + + 37, 20 - - Tools - - - 220, 22 - - - Credits Editor + + File 220, 22 @@ -498,11 +462,11 @@ Organize Tracks - - 44, 20 + + 46, 20 - - Help + + Tools 243, 22 @@ -534,6 +498,36 @@ BINKA Compression + + 44, 20 + + + Help + + + 20, 60 + + + 410, 24 + + + 11 + + + menuStrip1 + + + menuStrip + + + System.Windows.Forms.MenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 7 + Top, Bottom, Left, Right @@ -549,31 +543,31 @@ - 180, 22 + 173, 22 Add Entry - 180, 22 + 173, 22 Remove Entry - 180, 22 + 173, 22 Verify File Location - 180, 22 + 173, 22 Convert To WAV - 181, 114 + 174, 92 contextMenuStrip2 @@ -743,12 +737,6 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - creditsEditorToolStripMenuItem - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - deleteUnusedBINKAsToolStripMenuItem diff --git a/PCK-Studio/MainForm.cs b/PCK-Studio/MainForm.cs index 7f735e35..31fec5ac 100644 --- a/PCK-Studio/MainForm.cs +++ b/PCK-Studio/MainForm.cs @@ -403,13 +403,10 @@ namespace PckStudio private void HandleAudioFile(PckFile.FileData file) { - if (!TryGetLocFile(out LOCFile locFile)) - throw new Exception("No .loc File found."); - using AudioEditor audioEditor = new AudioEditor(file, locFile, LittleEndianCheckBox.Checked); + using AudioEditor audioEditor = new AudioEditor(file, LittleEndianCheckBox.Checked); if (audioEditor.ShowDialog(this) == DialogResult.OK) { wasModified = true; - TrySetLocFile(locFile); } } @@ -868,7 +865,7 @@ namespace PckStudio } else if (currentPCK.Files.FindIndex(file => file.Filename == "audio.pck") != -1) { - // the chances of this happening is really really slim but just in case + // the chance of this happening is really really slim but just in case MessageBox.Show("There is already a file in this PCK named \"audio.pck\"!", "Can't create audio.pck"); return; } @@ -878,13 +875,9 @@ namespace PckStudio return; } - if (!TryGetLocFile(out LOCFile locFile)) - throw new Exception("No .loc file found."); var file = CreateNewAudioFile(LittleEndianCheckBox.Checked); - AudioEditor diag = new AudioEditor(file, locFile, LittleEndianCheckBox.Checked); - if (diag.ShowDialog(this) == DialogResult.OK) - TrySetLocFile(locFile); - else + AudioEditor diag = new AudioEditor(file, LittleEndianCheckBox.Checked); + if(diag.ShowDialog(this) != DialogResult.OK) { currentPCK.Files.Remove(file); //delete file if not saved }