private void Add(string path, object data, CachedFileType type, bool allowOverwrite = true) { var cachedFile = new CachedFile(path, data, allowOverwrite); if (data.GetType() == typeof(EffectContainerFile)) { EffectContainerFile ecf = EffectContainerFile.New(); ecf.AddEffects(((EffectContainerFile)data).Effects); cachedFile.backupEffectContainerFile = ecf; } else if (data.GetType() == typeof(ACB_File)) { //Might be better to change this to a shallow-copy ACB_File acb = ACB_File.NewXv2Acb(); foreach (var cue in ((ACB_File)data).Cues) { acb.CopyCue((int)cue.ID, (ACB_File)data); } cachedFile.backupBgmFile = acb; } cachedFiles.Add(cachedFile); }
public void CopyCues(IList <Cue_Wrapper> cues) { ACB_File newAcb = ACB_File.NewXv2Acb(); foreach (var cue in cues) { newAcb.CopyCue((int)cue.CueRef.ID, AcbFile); } newAcb.SaveToClipboard(); }
public static ACB_Wrapper NewXv2Acb() { return(new ACB_Wrapper(ACB_File.NewXv2Acb())); }