internal GhNotesItem(string name, NotesType type, NotesDifficulty difficulty, string songName) { this.Name = name; this.Type = type; this.Difficulty = difficulty; this.IsMapped = false; this.MappedFile = null; this.MappedFileItem = null; switch (type) { case NotesType.Guitar: this.SongNotesQbKey = QbKey.Create(string.Format("{0}_Song_{1}", songName, difficulty.ToString())); this.SongStarPowerQbKey = QbKey.Create(string.Format("{0}_{1}_Star", songName, difficulty.ToString())); this.SongStarPowerBattleQbKey = QbKey.Create(string.Format("{0}_{1}_StarBattleMode", songName, difficulty.ToString())); break; case NotesType.Rhythm: this.SongNotesQbKey = QbKey.Create(string.Format("{0}_Song_Rhythm_{1}", songName, difficulty.ToString())); this.SongStarPowerQbKey = QbKey.Create(string.Format("{0}_Rhythm_{1}_Star", songName, difficulty.ToString())); this.SongStarPowerBattleQbKey = QbKey.Create(string.Format("{0}_Rhythm_{1}_StarBattleMode", songName, difficulty.ToString())); break; case NotesType.GuitarCoop: this.SongNotesQbKey = QbKey.Create(string.Format("{0}_Song_GuitarCoop_{1}", songName, difficulty.ToString())); this.SongStarPowerQbKey = QbKey.Create(string.Format("{0}_GuitarCoop_{1}_Star", songName, difficulty.ToString())); this.SongStarPowerBattleQbKey = QbKey.Create(string.Format("{0}_GuitarCoop_{1}_StarBattleMode", songName, difficulty.ToString())); break; case NotesType.RhythmCoop: this.SongNotesQbKey = QbKey.Create(string.Format("{0}_Song_RhythmCoop_{1}", songName, difficulty.ToString())); this.SongStarPowerQbKey = QbKey.Create(string.Format("{0}_RhythmCoop_{1}_Star", songName, difficulty.ToString())); this.SongStarPowerBattleQbKey = QbKey.Create(string.Format("{0}_RhythmCoop_{1}_StarBattleMode", songName, difficulty.ToString())); break; } }
internal NotesFileItem(string sourceName, NotesFile baseFile, NotesFileItem sourceItem, NotesDifficulty sourceDifficulty, NotesDifficulty difficulty) { this.construct(sourceName, new int[0], new int[0], new int[0], new int[0], new int[0], sourceItem.SustainTrigger); this.GenerateNotes(baseFile.Frets, difficulty, sourceItem.Notes, sourceItem.StarPower, sourceItem.BattlePower, sourceDifficulty); }
internal void GenerateNotes(int[] frets, NotesDifficulty difficulty, int[] sourceNotes, int[] sourceSp, int[] sourceBattle, NotesDifficulty sourceDifficulty) { List<int> sp = new List<int>(sourceSp); int[] n = NotesGenerator.CreateDifficulty(difficulty, sourceNotes, NotesDifficulty.Expert); construct(this.SourceName, n, NotesGenerator.GenerateStarPower(frets, n, sourceSp), this.BattlePower, this.FaceOffP1, this.FaceOffP2, this.SustainTrigger); this.HasGeneratedStarPower = true; this.HasGeneratedNotes = true; this.LastChanged = DateTime.Now; }
string INotesParser.MatchType(NotesType type, NotesDifficulty difficulty) { string val = string.Empty; string diff = string.Empty; string t = string.Empty; switch (difficulty) { case NotesDifficulty.Easy: diff = "Easy"; break; case NotesDifficulty.Medium: diff = "Medium"; break; case NotesDifficulty.Hard: diff = "Hard"; break; case NotesDifficulty.Expert: diff = "Expert"; break; } if (diff.Length != 0) { switch (type) { case NotesType.Guitar: t = "Single"; break; case NotesType.Rhythm: t = "DoubleBass"; break; case NotesType.GuitarCoop: t = "CoopLead"; break; case NotesType.RhythmCoop: t = "CoopBass"; break; } t = string.Concat(diff, t); if (_headerNames.ContainsKey(t)) val = t; } return val; }
private bool findMatch(NotesFile nf, GhNotesItem ghi, NotesType type, NotesDifficulty difficulty) { string match; if (nf.Parser != null) { match = nf.Parser.MatchType(type, difficulty); if (match.Length != 0) { int j = 0; foreach (NotesFileItem nfi in nf.Items) { if (!ghi.IsMapped && nfi.SourceName == match && nfi.Notes.Length > 1 * 3) { this.MapToGhItem(nf, nfi.UniqueId, ghi, false); return true; } j++; } } } return false; }
public GhNotesItem SourceGenerationItem(NotesType type, NotesDifficulty difficulty) { foreach (GhNotesItem ghi in _ghItems) { if (type == ghi.Type && difficulty == ghi.Difficulty) return ghi; } if (type != NotesType.Guitar) return SourceGenerationItem(NotesType.Guitar, difficulty); return null; }