public static Arrangement Read(BinaryReader r) { Arrangement a = new() { Difficulty = r.ReadInt32(), Anchors = SngCollection <Anchor> .Read(r), AnchorExtensions = SngCollection <AnchorExtension> .Read(r), Fingerprints1 = SngCollection <Fingerprint> .Read(r), Fingerprints2 = SngCollection <Fingerprint> .Read(r), Notes = SngCollection <Notes> .Read(r), PhraseCount = r.ReadInt32() }; a.AverageNotesPerIteration = new float[a.PhraseCount]; for (int i = 0; i < a.PhraseCount; i++) { a.AverageNotesPerIteration[i] = r.ReadSingle(); } a.PhraseIterationCount1 = r.ReadInt32(); a.NotesInIteration1 = new int[a.PhraseIterationCount1]; for (int i = 0; i < a.PhraseIterationCount1; i++) { a.NotesInIteration1[i] = r.ReadInt32(); } a.PhraseIterationCount2 = r.ReadInt32(); a.NotesInIteration2 = new int[a.PhraseIterationCount2]; for (int i = 0; i < a.PhraseIterationCount2; i++) { a.NotesInIteration2[i] = r.ReadInt32(); } return(a); }
public static SngData Read(BinaryReader r) { SngData sd = new() { BPMs = SngCollection <Bpm> .Read(r), Phrases = SngCollection <Phrase> .Read(r), Chords = SngCollection <Chord> .Read(r), ChordNotes = SngCollection <ChordNotes> .Read(r), Vocals = SngCollection <Vocal> .Read(r) }; if (sd.Vocals.Count > 0) { sd.SymbolsHeader = SngCollection <SymbolsHeader> .Read(r); sd.SymbolsTexture = SngCollection <SymbolsTexture> .Read(r); sd.SymbolsDefinition = SngCollection <SymbolDefinition> .Read(r); } sd.PhraseIterations = SngCollection <PhraseIteration> .Read(r); sd.PhraseExtraInfo = SngCollection <PhraseExtraInfoByLevel> .Read(r); sd.NLD = SngCollection <NLinkedDifficulty> .Read(r); sd.Actions = SngCollection <Action> .Read(r); sd.Events = SngCollection <Event> .Read(r); sd.Tones = SngCollection <Tone> .Read(r); sd.DNAs = SngCollection <Dna> .Read(r); sd.Sections = SngCollection <Section> .Read(r); sd.Arrangements = SngCollection <Arrangement> .Read(r); sd.Meta = Metadata.Read(r); return(sd); }