private static SongInformation AnalyzeEVD(string path, SongInformation si, Difficulty difficulty) { try { IEVDData[] data = null; if (si.IsOld) { data = EVDReader.Read(path); } else { var pr = new PackReader(path); var pppsr = pr.Read("evd"); data = EVDReader.Read(pppsr); pr.Close(); } foreach (ChangeVolumeEvent evddata in Array.FindAll(data, (evd) => (evd is ChangeVolumeEvent))) { if (evddata.Channel == 0 && evddata.Time == 0) { si.MovieVolume = -100 * (100 - evddata.Volume); break; } } foreach (ChangeNoteTypeEvent evddata in Array.FindAll(data, (evd) => (evd is ChangeNoteTypeEvent))) { if (evddata.NoteType == NoteType.AC || evddata.NoteType == NoteType.ACFT) { switch (difficulty) { case PPDFrameworkCore.Difficulty.Easy: si.EasyNoteType = evddata.NoteType; break; case PPDFrameworkCore.Difficulty.Normal: si.NormalNoteType = evddata.NoteType; break; case PPDFrameworkCore.Difficulty.Hard: si.HardNoteType = evddata.NoteType; break; case PPDFrameworkCore.Difficulty.Extreme: si.ExtremeNoteType = evddata.NoteType; break; } break; } } } catch { } return(si); }
private void LoadData(Stream stream) { try { data = EVDReader.Read(stream); initialized = true; } catch { initialized = false; } }
private void LoadData(string dir, Difficulty difficulty) { string filename = DifficultyUtility.ConvertDifficulty(difficulty) + ".evd"; string path = dir + "\\" + filename; if (File.Exists(path)) { data = EVDReader.Read(path); initialized = true; } else { initialized = false; } }