/// <summary> /// Initializes a new instance of the <see cref="frmDisassembly"/> class. /// </summary> /// <param name="romFilename">The rom filename.</param> /// <param name="music">The music information.</param> public frmDisassembly(string romFilename, MusicData music) { InitializeComponent(); this.musicData = music; this.filename = romFilename; }
public frmReassemble(string romFilename, MusicData music) { InitializeComponent(); this.musicData = music; this.filename = romFilename; this.executablePath = Path.GetDirectoryName(Application.ExecutablePath); txtImportDirectory.Text = Path.Combine(this.executablePath, this.musicData.GameShortName); }
public void LoadMusicData() { string configurationFilename = Path.Combine(executablePath, "MusicData.xml"); if (System.IO.File.Exists(configurationFilename) == true) { XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load(configurationFilename); musicData = new List<MusicData>(); foreach (XmlNode node in xmlDoc.DocumentElement.ChildNodes) { if (node.Name == "music") { MusicData data = new MusicData(); foreach (XmlAttribute att in node.Attributes) { if (att.Name == "name") { data.GameName = att.InnerText; } else if (att.Name == "shortname") { data.GameShortName = att.InnerText; } else if (att.Name == "tablestart") { if (!string.IsNullOrEmpty(att.InnerText)) { data.MusicTableOffset = Convert.ToInt32("0x" + att.InnerText, 16); } } else if (att.Name == "datasize") { if (!string.IsNullOrEmpty(att.InnerText)) { data.MusicDataSize = Convert.ToInt32("0x" + att.InnerText, 16); } } } musicData.Add(data); } } } }