public Class250(string string_2, QBCParser class362_1, zzPakNode2 class318_1, string string_3) { this.string_0 = string_2; this.class318_0 = class318_1; this.class362_0 = class362_1; this.string_1 = string_3; }
public void method_11(QBCParser class362_1) { this.class362_0 = class362_1; class362_1.class239_0[0] = 0; this.int_6 = this.class362_0.class239_0[this.class362_0.class239_0.Count - 1]; this.decimal_0 = this.size_1.Width / this.class362_0.class239_0[1]; this.method_10(15.0); this.string_0 = "expert"; for (int i = 0; i < this.brush_1.Length; i++) { this.pen_4[i] = new Pen(this.brush_1[i], (float)this.size_1.Height / 24f); } this.method_13(); }
private void ChartFileBtn_Click(object sender, EventArgs e) { string fileName; if (!(fileName = KeyGenerator.OpenOrSaveFile("Select the game track file.", "Any Supported Game Track Formats|*.qbc;*.dbc;*_song.pak.xen;*.mid;*.chart|GH3CP QB Based Chart File|*.qbc|GH3CP dB Based Chart File|*.dbc|GH3 Game Track file|*_song.pak.xen|GH standard Midi file|*.mid|dB standard or GH3CP Chart file|*.chart", true)).Equals("")) { this.bool_4 = false; try { //Configures paks if (fileName.EndsWith("_song.pak.xen")) { string text2 = KeyGenerator.GetFileName(fileName).Replace("_song.pak.xen", ""); using (zzPakNode2 @class = new zzPakNode2(fileName, false)) { if ([email protected]_6("songs\\" + text2 + ".mid.qb")) { throw new Exception("MID.QB song file not found."); } this.qbcParser = new QBCParser(text2, @class.zzGetNode1("songs\\" + text2 + ".mid.qb")); goto IL_F5; } } //Configures qbc if (fileName.EndsWith(".qbc")) { this.qbcParser = new QBCParser(fileName); } //Configures midi else if (fileName.EndsWith(".mid")) { this.qbcParser = Midi2Chart.getMidiSong(fileName, this.forceRB3); } //Configures charts else { //Crashes in this this.qbcParser = new ChartParser(fileName).method_3(); } IL_F5: this.method_6(); this.method_4("No Track"); this.method_5("No Track"); this.method_8(0); Control arg_12B_0 = this.AutoConfigBtn; this.ResetBtn.Enabled = true; arg_12B_0.Enabled = true; foreach (string current in this.qbcParser.noteList.Keys) { this.method_4(current); } if (this.qbcParser.class228_2.Count != 0) { this.method_5("faceoffp1"); } if (this.qbcParser.class228_3.Count != 0) { this.method_5("faceoffp2"); } if (this.qbcParser.bpmList.Count != 0) { this.method_5("bossbattlep1"); } if (this.qbcParser.class228_5.Count != 0) { this.method_5("bossbattlep2"); } this.ChartFileTxt.Text = fileName; this.ChartFileTxt.SelectionStart = this.ChartFileTxt.TextLength; this.bool_4 = true; this.method_7(); } catch (Exception ex) { MessageBox.Show("Game Track cannot be parsed.\n" + ex.Message); } this.method_3(); } }
public SongData(string string_0, QBCParser class362_1, zzQbSongObject class323_1, string[] string_1) { this.InitializeComponent(); this.SongNameTxt.Text = string_0; this.bool_2 = true; this.qbcParser = class362_1; this.method_6(); this.method_4("No Track"); this.method_5("No Track"); this.method_8(0); foreach (string current in this.qbcParser.noteList.Keys) { this.method_4(current); } if (this.qbcParser.class228_2.Count != 0) { this.method_5("faceoffp1"); } if (this.qbcParser.class228_3.Count != 0) { this.method_5("faceoffp2"); } if (this.qbcParser.bpmList.Count != 0) { this.method_5("bossbattlep1"); } if (this.qbcParser.class228_5.Count != 0) { this.method_5("bossbattlep2"); } this.method_7(); if (class323_1 != null) { this.class323_0 = class323_1; return; } if (string_1.Length == 1) { this.SingleAudioBtn.Checked = true; this.GuitarAudioTxt.Text = string_1[0]; } else { string text = null; string text2 = null; string text3 = null; string text4 = null; string text5 = null; string text6 = null; for (int i = 0; i < string_1.Length; i++) { string text7 = string_1[i]; string text8 = KeyGenerator.GetFileName(text7).ToLower(); if (string_1.Length > 4 && text8.Contains("coop")) { if (text5 == null && (text8.Contains("rhythm") || text8.Contains("bass"))) { text5 = text7; } else if (text4 == null && text8.Contains("guitar")) { text4 = text7; } else if (text6 == null) { text6 = text7; } } else if (text2 == null && (text8.Contains("rhythm") || text8.Contains("bass"))) { text2 = text7; } else if (text == null && text8.Contains("guitar")) { text = text7; } else if (text3 == null) { text3 = text7; } } if (text == null) { throw new Exception("File names did not follow format!"); } if (text3 != null) { if (text2 != null) { if (text4 != null && text5 != null && text6 != null) { this.CoopAudioBtn.Checked = true; this.GuitarCoopTxt.Text = text4; this.RhythmCoopTxt.Text = text5; this.BandCoopTxt.Text = text6; } else { this.MultiAudioBtn.Checked = true; } this.RhythmAudioTxt.Text = text2; } else { this.DualAudioBtn.Checked = true; } this.BandAudioTxt.Text = text3; } else { this.SingleAudioBtn.Checked = true; } this.GuitarAudioTxt.Text = text; } this.PreviewSlider.method_18(Convert.ToInt32(AudioManager.getAudioStream(this.GuitarAudioTxt.Text).vmethod_1().timeSpan_0.TotalSeconds)); this.PreviewSlider.method_14(this.PreviewSlider.method_17() / 2); if (this.GuitarAudioTxt.Text == "" || (!this.SingleAudioBtn.Checked && (this.BandAudioTxt.Text == "" || !this.DualAudioBtn.Checked) && (this.RhythmAudioTxt.Text == "" || !this.MultiAudioBtn.Checked) && (this.GuitarCoopTxt.Text == "" || this.RhythmCoopTxt.Text == "" || this.BandCoopTxt.Text == "" || !this.CoopAudioBtn.Checked))) { throw new Exception("File names did not follow format!"); } }
private void MassImporter_MenuItem_Click(object sender, EventArgs e) { FolderBrowserDialog folderBrowserDialog = new FolderBrowserDialog(); folderBrowserDialog.ShowNewFolderButton = false; folderBrowserDialog.Description = "Please select a folder that contains the folder structure for mass song importing."; folderBrowserDialog.RootFolder = Environment.SpecialFolder.DesktopDirectory; if (folderBrowserDialog.ShowDialog() != DialogResult.OK) { return; } string[] directories = Directory.GetDirectories(folderBrowserDialog.SelectedPath, "*", SearchOption.TopDirectoryOnly); List<string> list = new List<string>(directories); string[] array = directories; for (int i = 0; i < array.Length; i++) { string file = array[i]; try { List<string> list2 = KeyGenerator.checkFile(file, "*.mid;*.chart;*.qbc;*.dbc", true); List<string> list3 = KeyGenerator.checkFile(file, "*.wav;*.mp3;*.ogg", true); string[] files = Directory.GetFiles(file, "*.dat", SearchOption.TopDirectoryOnly); if (list2.Count != 0 && (list3.Count != 0 || files.Length != 0)) { GH3Song gH3Song = this.bool_0 ? new GHASong() : new GH3Song(); gH3Song.name = KeyGenerator.GetFileName(file).ToLower().Replace(" ", "").Replace('.', '_'); if (gH3Song.name.Length > 30) { gH3Song.name = gH3Song.name.Remove(30); } if (QbSongClass1.smethod_4(gH3Song.name) || this.gh3Songlist_0.method_3(gH3Song.name)) { int num = 2; while (QbSongClass1.smethod_4(gH3Song.name + num) || this.gh3Songlist_0.method_3(gH3Song.name + num)) { num++; } GH3Song expr_176 = gH3Song; expr_176.name += num; } QBCParser qbcParser = null; foreach (string current in list2) { try { if (current.EndsWith(".qbc")) { qbcParser = new QBCParser(current); } else if (current.EndsWith(".mid")) { qbcParser = Midi2Chart.getMidiSong(current, this.forceRB3MidConversionToolStripMenuItem.Checked); } else { qbcParser = new ChartParser(current).method_3(); } break; } catch { } } if (qbcParser != null) { zzQbSongObject class2 = null; if (files.Length != 0) { string[] array2 = files; for (int j = 0; j < array2.Length; j++) { string text2 = array2[j]; try { if (File.Exists(text2.Replace(".dat.xen", ".fsb.xen"))) { class2 = new zzQbSongObject(text2); if ((int)new FileInfo(text2.Replace(".dat.xen", ".fsb.xen")).Length == class2.int_0) { break; } } } catch { } } } if (class2 != null || list3.Count != 0) { SongData songData = new SongData(gH3Song.name, qbcParser, class2, list3.ToArray()); Class250 class3 = songData.method_1(this.class319_0, this.dataFolder); Class248 class4 = songData.method_0(this.dataFolder); gH3Song.vmethod_0(class3.class362_0.gh3Song_0); if (File.Exists(file + "\\song.ini")) { string[] array3 = File.ReadAllLines(file + "\\song.ini"); for (int k = 0; k < array3.Length; k++) { string text3 = array3[k]; if (text3.StartsWith("name")) { gH3Song.title = text3.Remove(0, text3.IndexOf('=') + 1).Trim(); } else if (text3.StartsWith("artist")) { gH3Song.artist = text3.Remove(0, text3.IndexOf('=') + 1).Trim(); } } } gH3Song.no_rhythm_track = !class4.bool_0; gH3Song.use_coop_notetracks = class4.bool_1; gH3Song.version = 3; gH3Song.leaderboard = true; gH3Song.editable = true; this.method_4(class3); this.method_4(class4); this.gh3Songlist_0.Add(gH3Song.name, gH3Song); list.Remove(file); } } } } catch { } } this.method_4(new Class247(this.class319_0, this.gh3Songlist_0)); this.method_0(); if (list.Count != 0) { string text4 = "The follwing songs (by folder name) failed:"; foreach (string current2 in list) { text4 = text4 + "\n" + KeyGenerator.GetFileName(current2); } MessageBox.Show(text4, "Error!"); } }
private void LoadChart_EditorBtn_Click(object sender, EventArgs e) { string fileName; if (!(fileName = KeyGenerator.OpenOrSaveFile("Select the game track file.", "Any Supported Game Track Formats|*.qbc;*.dbc;*_song.pak.xen;*.mid;*.chart|GH3CP QB Based Chart File|*.qbc|GH3CP dB Based Chart File|*.dbc|GH3 Game Track file|*_song.pak.xen|GH standard Midi file|*.mid|dB standard or GH3CP Chart file|*.chart", true)).Equals("")) { QBCParser qbcParser; try { if (fileName.EndsWith("_song.pak.xen")) { string str = KeyGenerator.GetFileName(fileName).Replace("_song.pak.xen", ""); using (zzPakNode2 @class = new zzPakNode2(fileName, false)) { if ([email protected]_6("songs\\" + str + ".mid.qb")) { throw new Exception("MID.QB song file not found."); } qbcParser = new QBCParser(str, @class.zzGetNode1("songs\\" + str + ".mid.qb")); goto IL_DA; } } if (fileName.EndsWith(".qbc")) { qbcParser = new QBCParser(fileName); } else if (fileName.EndsWith(".mid")) { qbcParser = Midi2Chart.getMidiSong(fileName, this.forceRB3MidConversionToolStripMenuItem.Checked); } else { qbcParser = new ChartParser(fileName).method_3(); } IL_DA:; } catch (Exception ex) { MessageBox.Show("Error loading game track file!\n" + ex.Message); return; } this.SongName_EditorLbl.Text = qbcParser.gh3Song_0.title; this.SelectedTrack_EditorBox.Items.Clear(); foreach (string current in qbcParser.noteList.Keys) { this.SelectedTrack_EditorBox.Items.Add(current); } this.SongEditor_Control.method_11(qbcParser); this.SelectedTrack_EditorBox.SelectedIndex = 0; this.Offset_EditorTxtBox.Text = string.Concat(qbcParser.gh3Song_0.gem_offset); } }
public QBCParser method_3() { QBCParser @class = new QBCParser(this.gh3SongInfo); Track<int, int> track = null; Track<int, int> class3 = null; int largestOffset = 0; //Checks if there are any difficulties if (this.difficultyWithNotes.Count == 0) { throw new Exception("Chart file is empty and cannot be parsed to QB."); } //Finds the largest offset foreach (NoteEventInterpreter notes in this.difficultyWithNotes.Values) { largestOffset = Math.Max(largestOffset, notes.noteList.Keys[notes.noteList.Count - 1] + notes.noteList.Values[notes.noteList.Count - 1].sustainLength); } largestOffset = ((this.sectionInterpreter.otherList.Count == 0) ? largestOffset : Math.Max(largestOffset, this.sectionInterpreter.otherList.Keys[this.sectionInterpreter.otherList.Count - 1])); this.bpmMSTracker = new Track<int, decimal>(); this.bpmMSTracker.Add(0, 0m); //Adds BPMS to local list for (int i = 1; i < this.bpmInterpreter.bpmList.Count; i++) { this.bpmMSTracker.Add(i, this.bpmMSTracker[i - 1] + (decimal)(this.bpmInterpreter.bpmList.Keys[i] - this.bpmInterpreter.bpmList.Keys[i - 1]) / (decimal)this.bpmInterpreter.bpmList.Values[i - 1]); } string[] array = new string[] { "Single", "Double" }; for (int j = 0; j < array.Length; j++) { string text = array[j]; string[] array2 = new string[] { "Guitar", "Rhythm" }; for (int k = 0; k < array2.Length; k++) { string text2 = array2[k]; string[] array3 = new string[] { "Easy", "Medium", "Hard", "Expert" }; for (int l = 0; l < array3.Length; l++) { string text3 = array3[l]; string difficulty = (text2.ToLower() + ((text == "Double") ? "coop" : "") + "_" + text3.ToLower()).Replace("guitar_", ""); if (this.difficultyWithNotes.ContainsKey(text3 + text + text2)) { NoteEventInterpreter noteEventInterpreter = this.difficultyWithNotes[text3 + text + text2]; if (noteEventInterpreter.noteList.Count != 0) { @class.noteList.Add(difficulty, new Track<int, NotesAtOffset>()); this.method_4(@class.noteList[difficulty], noteEventInterpreter.noteList); } if (noteEventInterpreter.class228_1.Count != 0) { @class.spList.Add(difficulty, new Track<int, int[]>()); this.method_5(@class.spList[difficulty], noteEventInterpreter.class228_1, noteEventInterpreter.noteList); } if (noteEventInterpreter.class228_4.Count != 0) { @class.battleNoteList.Add(difficulty, new Track<int, int[]>()); this.method_5(@class.battleNoteList[difficulty], noteEventInterpreter.class228_4, noteEventInterpreter.noteList); } if (track == null || track.Count < noteEventInterpreter.class228_2.Count) { track = noteEventInterpreter.class228_2; } if (class3 == null || class3.Count < noteEventInterpreter.class228_3.Count) { class3 = noteEventInterpreter.class228_3; } } } } } this.method_6(@class.class228_2, track); this.method_6(@class.class228_3, class3); foreach (int current2 in this.bpmInterpreter.TSList.Keys) { @class.tsList.Add(this.calculateOffset(current2), new int[] { this.bpmInterpreter.TSList[current2], 4 }); } int num2 = (int)Math.Ceiling((double)largestOffset / (double)this.constant480); for (int m = 0; m <= num2; m++) { @class.class239_0.method_1(this.calculateOffset(m * this.constant480)); } @class.class239_0[0] = @class.class239_0[1] - 4; @class.int_0 = 1; foreach (int current3 in this.sectionInterpreter.sectionList.Keys) { @class.class228_1.Add(this.calculateOffset(current3), this.sectionInterpreter.sectionList[current3]); } this.bpmMSTracker.Clear(); this.bpmMSTracker = null; GC.Collect(); return @class; }