diff --git a/AssetStudioGUI/AssetStudioGUIForm.Designer.cs b/AssetStudioGUI/AssetStudioGUIForm.Designer.cs index f869c3a..9245b29 100644 --- a/AssetStudioGUI/AssetStudioGUIForm.Designer.cs +++ b/AssetStudioGUI/AssetStudioGUIForm.Designer.cs @@ -101,6 +101,7 @@ this.showConsoleToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem15 = new System.Windows.Forms.ToolStripMenuItem(); this.writeLogToFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.showAssetDebugInfoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.exportClassStructuresMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.colorThemeToolStripMenu = new System.Windows.Forms.ToolStripMenuItem(); @@ -791,6 +792,7 @@ this.showConsoleToolStripMenuItem, this.toolStripMenuItem15, this.writeLogToFileToolStripMenuItem, + this.showAssetDebugInfoToolStripMenuItem, this.exportClassStructuresMenuItem}); this.debugMenuItem.Name = "debugMenuItem"; this.debugMenuItem.Size = new System.Drawing.Size(54, 20); @@ -822,6 +824,14 @@ this.writeLogToFileToolStripMenuItem.Text = "Write log to file"; this.writeLogToFileToolStripMenuItem.CheckedChanged += new System.EventHandler(this.writeLogToFileToolStripMenuItem_CheckedChanged); // + // showAssetDebugInfoToolStripMenuItem + // + this.showAssetDebugInfoToolStripMenuItem.CheckOnClick = true; + this.showAssetDebugInfoToolStripMenuItem.Name = "showAssetDebugInfoToolStripMenuItem"; + this.showAssetDebugInfoToolStripMenuItem.Size = new System.Drawing.Size(288, 22); + this.showAssetDebugInfoToolStripMenuItem.Text = "Display asset debug info"; + this.showAssetDebugInfoToolStripMenuItem.Click += new System.EventHandler(this.showAssetDebugInfoToolStripMenuItem_Click); + // // exportClassStructuresMenuItem // this.exportClassStructuresMenuItem.Name = "exportClassStructuresMenuItem"; @@ -1940,6 +1950,7 @@ private System.Windows.Forms.ToolStripMenuItem jsonDumpAllToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem jsonDumpSelectToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem jsonDumpFilterToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem showAssetDebugInfoToolStripMenuItem; } } diff --git a/AssetStudioGUI/AssetStudioGUIForm.cs b/AssetStudioGUI/AssetStudioGUIForm.cs index 5206fdb..0414a8b 100644 --- a/AssetStudioGUI/AssetStudioGUIForm.cs +++ b/AssetStudioGUI/AssetStudioGUIForm.cs @@ -38,6 +38,7 @@ namespace AssetStudioGUI private string tempClipboard; private bool isDarkMode; private GameOptionsForm gameOptionsForm; + private bool showAssetDebugInfo; #region FMODControl private FMOD.System system; @@ -1138,7 +1139,7 @@ namespace AssetStudioGUI FMODinfoLabel.Text = frequency + " Hz"; FMODtimerLabel.Text = $"00:00.00 / {(FMODlenms / 1000 / 60):00}:{(FMODlenms / 1000 % 60):00}.{(FMODlenms / 10 % 100):00}"; - sound.getFormat(out _, out _, out var audioChannels, out _); + sound.getFormat(out var soundType, out var soundFormat, out var audioChannels, out _); switch (audioChannels) { case 1: @@ -1151,6 +1152,12 @@ namespace AssetStudioGUI FMODaudioChannelsLabel.Text = $"{audioChannels}-Channel"; break; } + + if (showAssetDebugInfo) + { + assetItem.InfoText += $"\nSound type: {soundType}"; + assetItem.InfoText += $"\nSound format: {soundFormat}"; + } } private void PreviewVideoClip(AssetItem assetItem, VideoClip m_VideoClip) @@ -2728,6 +2735,11 @@ namespace AssetStudioGUI assetsManager.Options.GameSpecific.CustomUnityVersion = null; } + private void showAssetDebugInfoToolStripMenuItem_Click(object sender, EventArgs e) + { + showAssetDebugInfo = !showAssetDebugInfo; + } + #region FMOD private void FMODinit() {