Ejemplo n.º 1
0
 public QbcNoteTrack(NoteTrack track, OffsetTransformer ot)
 {
     this._ot = ot;
     foreach (Note note in track)
     {
         if (note.Type == NoteType.Regular)
         {
             this.AddNote(note);
         }
     }
 }
Ejemplo n.º 2
0
 // Token: 0x06000172 RID: 370 RVA: 0x00007E3C File Offset: 0x0000603C
 public void Save(Chart chart)
 {
     _ot = new OffsetTransformer(chart);
     foreach (NoteTrack noteTrack in chart.NoteTracks)
     {
         using (StreamWriter streamWriter = new StreamWriter(noteTrack.Name))
         {
             StringBuilder value = new QbcNoteTrack(noteTrack, this._ot).AsString();
             streamWriter.Write(value);
         }
     }
     using (StreamWriter streamWriter = new StreamWriter("NoteTrackList"))
     {
         foreach (NoteTrack notetrack in chart.NoteTracks)
         {
             streamWriter.Write(notetrack.Name + Environment.NewLine);
         }
     }
     using (StreamWriter streamWriter = new StreamWriter("Resolution"))
     {
         streamWriter.Write(_ot.GetTime(chart.Resolution).ToString());
     }
     using (StreamWriter streamWriter = new StreamWriter("Tempos"))
     {
         foreach (SyncTrackEntry syncTrack in chart.SyncTrack)
         {
             if (syncTrack.Type == SyncType.BPM)
             {
                 streamWriter.Write(_ot.GetTime(syncTrack.Offset).ToString() + Environment.NewLine + syncTrack.FloatBPM.ToString() + Environment.NewLine);
             }
         }
     }
     using (StreamWriter streamWriter = new StreamWriter("TimeSig"))
     {
         foreach (SyncTrackEntry syncTrack in chart.SyncTrack)
         {
             if (syncTrack.Type == SyncType.TimeSignature)
             {
                 streamWriter.Write(Math.Round(_ot.GetTime(syncTrack.Offset) * 1000).ToString() + Environment.NewLine + syncTrack.TimeSignature.ToString() + Environment.NewLine + "4\n");
             }
         }
     }
     using (StreamWriter streamWriter = new StreamWriter("Markers"))
     {
         foreach (EventsSectionEntry eventEntry in chart.Events)
         {
             if (eventEntry.TextValue.StartsWith("section "))
             {
                 streamWriter.Write(Math.Round(_ot.GetTime(eventEntry.Offset) * 1000).ToString() + Environment.NewLine + eventEntry.TextValue.Substring(8) + Environment.NewLine);
             }
         }
     }
 }
Ejemplo n.º 3
0
 // Token: 0x06000007 RID: 7 RVA: 0x000022FC File Offset: 0x000004FC
 public float TimeOffset(OffsetTransformer ot)
 {
     return(ot.GetTime(this.Offset));
 }
Ejemplo n.º 4
0
 // Token: 0x06000004 RID: 4 RVA: 0x0000210C File Offset: 0x0000030C
 public int OffsetMilliseconds(OffsetTransformer ot)
 {
     return((int)Math.Round(1000.0 * (double)this.TimeOffset(ot)));
 }
Ejemplo n.º 5
0
 // Token: 0x06000003 RID: 3 RVA: 0x000020D8 File Offset: 0x000002D8
 public int LengthMilliseconds(OffsetTransformer ot)
 {
     return((int)Math.Round(1000.0 * (double)(this.TimeEndOffset(ot) - this.TimeOffset(ot))));
 }