diff --git a/.vs/Switch_Toolbox/v15/.suo b/.vs/Switch_Toolbox/v15/.suo index b471cd6b..dfea7d44 100644 Binary files a/.vs/Switch_Toolbox/v15/.suo and b/.vs/Switch_Toolbox/v15/.suo differ diff --git a/Switch_FileFormatsMain/FileFormats/Audio/Archives/BARS.cs b/Switch_FileFormatsMain/FileFormats/Audio/Archives/BARS.cs index 1a0b54d7..d5332293 100644 --- a/Switch_FileFormatsMain/FileFormats/Audio/Archives/BARS.cs +++ b/Switch_FileFormatsMain/FileFormats/Audio/Archives/BARS.cs @@ -72,8 +72,20 @@ namespace FirstPlugin public class AudioEntry : TreeNodeCustom { + public BARSAudioFile audioFile; + public string Magic; - public byte[] Data; + public byte[] Data + { + get + { + return audioFile.data; + } + set + { + audioFile.data = value; + } + } public AudioEntry() { @@ -248,8 +260,8 @@ namespace FirstPlugin BARSAudioFile audio = bars.AudioEntries[i].AudioFile; AudioEntry node = new AudioEntry(); + node.audioFile = audio; node.Magic = audio.Magic; - node.Data = audio.data; node.SetupMusic(); if (audio.Magic == "FWAV") @@ -290,23 +302,6 @@ namespace FirstPlugin public byte[] Save() { MemoryStream mem = new MemoryStream(); - - foreach (TreeNode node in Nodes[1].Nodes) - { - if (node is AudioEntry) - { - for (int i = 0; i < bars.AudioEntries.Count; i++) - { - string audioName = bars.AudioEntries[i].MetaData.Name; - - if (Path.GetFileNameWithoutExtension(node.Text) == audioName) - { - bars.AudioEntries[i].AudioFile.data = ((AudioEntry)node).Data; - } - } - } - } - bars.Save(mem); return mem.ToArray(); } diff --git a/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache b/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache index d79637cf..7c68c2cc 100644 Binary files a/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache and b/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache differ