public static bool ImportSPCs(string fullPath) { var spcs = new Audio.SPCTrack[SPCs.Length]; for (int i = 0; i < spcs.Length; i++) { spcs[i] = new Audio.SPCTrack(); } try { Do.Import(spcs, fullPath + "\\" + "spc", "SPC", true); } catch { MessageBox.Show("One or more files not an SPC data file.", "LAZY SHELL", MessageBoxButtons.OK, MessageBoxIcon.Stop); return(false); } for (int i = 0; i < spcs.Length; i++) { if (spcs[i].Data == null) { continue; } SPCs[i] = spcs[i]; SPCs[i].ParseScript(); } return(true); }
public static bool ImportSPC(int index, string fullPath) { var spc = new Audio.SPCTrack(); try { spc = (Audio.SPCTrack)Do.Import(spc, fullPath); } catch { MessageBox.Show("File not an SPC data file.", "LAZY SHELL", MessageBoxButtons.OK, MessageBoxIcon.Stop); return(false); } spc.ParseScript(); SPCs[index] = spc; // return(true); }