// Token: 0x060000ED RID: 237 RVA: 0x0000502C File Offset: 0x0000322C private bool HandleNote(string title, string entry) { Note note = Note.Parse(entry); bool result; if (note == null) { result = false; } else { if (!this.NoteTracks.ContainsTrack(title)) { this.NoteTracks.Add(new NoteTrack(title)); } NoteTrack noteTrack = this.NoteTracks[title]; if (note.Offset > this.LastIndex) { this.LastIndex = note.Offset; } noteTrack.Add(note); result = true; } return(result); }
public Optimizer(NoteTrack nt) { foreach (Note note in nt) { if (note.IsANote) { this.addNote(note); } } }
public QbcNoteTrack(NoteTrack track, OffsetTransformer ot) { this._ot = ot; foreach (Note note in track) { if (note.Type == NoteType.Regular) { this.AddNote(note); } } }
// Token: 0x06000088 RID: 136 RVA: 0x00003724 File Offset: 0x00001924 public Optimizer(NoteTrack nt) { foreach (Note note in nt) { if (note.IsANote) { this.addNote(note); } } MessageBox.Show(this.count.ToString() + " " + this.calculateBaseScore().ToString()); }
// Token: 0x06000124 RID: 292 RVA: 0x00006694 File Offset: 0x00004894 public int prevNIndex(int Offset, NoteTrack Notes) { if (Notes != null) { for (int i = this.nearNIndex(Offset, Notes); i >= 0; i--) { if (Notes[i].Offset < Offset) { return(i); } } } return(0); }
// Token: 0x06000121 RID: 289 RVA: 0x00006588 File Offset: 0x00004788 public int nextNIndex(int Offset, NoteTrack Notes) { int result; if (Notes == null) { result = 0; } else { int i; for (i = this.nearNIndex(Offset, Notes); i < Notes.Count <Note>(); i++) { if (Notes[i].Offset > Offset) { return(i); } } result = i - 1; } return(result); }
// Token: 0x060000F4 RID: 244 RVA: 0x00005480 File Offset: 0x00003680 private void WriteNoteTrackData(StringBuilder chartData, NoteTrack noteTrack) { chartData.Append("[" + noteTrack.Name + "]\r\n"); chartData.Append("{\r\n"); foreach (Note note in noteTrack) { chartData.Append("\t" + note.Offset + " = "); switch (note.Type) { case NoteType.Regular: chartData.Append(string.Concat(new object[] { "N ", note.Fret, " ", note.Length * 192 / 480 })); break; case NoteType.Special: chartData.Append(string.Concat(new object[] { "S ", note.SpecialFlag, " ", note.Length })); break; case NoteType.Event: chartData.Append("E " + note.EventName); break; } chartData.Append("\r\n"); } chartData.Append("}\r\n"); }
// Token: 0x0600011F RID: 287 RVA: 0x000063B4 File Offset: 0x000045B4 public int nearNIndexEnd(int Offset, NoteTrack Notes, int fret) { int result; if (Notes == null) { result = 0; } else { int num = 0; int num2 = Notes.Count(fret) - 1; switch (num2) { case -1: case 0: result = 0; break; case 1: { int num3 = Math.Abs(Notes[0, fret].OffsetEnd - Offset); int num4 = Math.Abs(Notes[1, fret].OffsetEnd - Offset); if (num3 >= num4) { result = 1; } else { result = 0; } break; } default: { int num5 = num2 / 2; while (Notes[num5, fret].OffsetEnd != Offset) { num5 = (num + num2) / 2; if (Notes[num5, fret].OffsetEnd > Offset) { num2 = num5; } else { num = num5; } if (num2 - num <= 1) { int num6 = Math.Abs(Notes[num5, fret].OffsetEnd - Offset); int num7 = Math.Abs(Notes[num5 - 1, fret].OffsetEnd - Offset); int num8 = Math.Abs(Notes[num5 + 1, fret].OffsetEnd - Offset); if (num6 <= num7 && num6 <= num8) { return(num5); } if (num7 <= num8) { return(num5 - 1); } return(num5 + 1); } } result = num5; break; } } } return(result); }