示例#1
0
        private void method_4(int int_0, int int_1, string string_2)
        {
            if (int_0 == 4)
            {
                if (string_2.Contains("section "))
                {
                    this.sectionInterpreter.sectionList.Add(int_1, string_2);
                    return;
                }
                if (this.sectionInterpreter.otherList.method_4(int_1))
                {
                    this.sectionInterpreter.otherList[int_1].Add(string_2);
                    return;
                }
                this.sectionInterpreter.otherList.Add(int_1, new List <string>(new string[]
                {
                    string_2
                }));
                return;
            }
            else
            {
                NoteEventInterpreter @class = null;
                NoteEventInterpreter class2 = null;
                NoteEventInterpreter class3 = null;
                NoteEventInterpreter class4 = null;
                switch (int_0)
                {
                case 0:
                    @class = this.expertSingle;
                    class2 = this.hardSingle;
                    class3 = this.mediumSingle;
                    class4 = this.easySingle;
                    break;

                case 1:
                    @class = this.expertDoubleGuitar;
                    class2 = this.hardDoubleGuitar;
                    class3 = this.mediumDoubleGuitar;
                    class4 = this.easyDoubleGuitar;
                    break;

                case 3:
                    @class = this.expertDoubleBass;
                    class2 = this.hardDoubleBass;
                    class3 = this.mediumDoubleBass;
                    class4 = this.easyDoubleBass;
                    break;

                case 5:
                    this.expertDrums.method_5(int_1, string_2);
                    this.hardDrums.method_5(int_1, string_2);
                    this.mediumDrums.method_5(int_1, string_2);
                    this.easyDrums.method_5(int_1, string_2);
                    return;

                case 7:
                    this.expertKeyboard.method_5(int_1, string_2);
                    this.hardKeyboard.method_5(int_1, string_2);
                    this.mediumKeyboard.method_5(int_1, string_2);
                    this.easyKeyboard.method_5(int_1, string_2);
                    return;
                }
                if (@class != null && @class.eventList.method_4(int_1))
                {
                    @class.eventList[int_1].Add(string_2);
                    class2.eventList[int_1].Add(string_2);
                    class3.eventList[int_1].Add(string_2);
                    class4.eventList[int_1].Add(string_2);
                    return;
                }
                @class.eventList.Add(int_1, new List <string>(new string[]
                {
                    string_2
                }));
                class2.eventList.Add(int_1, new List <string>(new string[]
                {
                    string_2
                }));
                class3.eventList.Add(int_1, new List <string>(new string[]
                {
                    string_2
                }));
                class4.eventList.Add(int_1, new List <string>(new string[]
                {
                    string_2
                }));
                return;
            }
        }
示例#2
0
 public ChartParser method_2(GH3Song gh3Song_1)
 {
     ChartParser @class = new ChartParser(this.gh3Song_0);
     @class.constant480 = this.int_1;
     if (gh3Song_1 != null)
     {
         @class.gh3SongInfo.vmethod_0(gh3Song_1);
     }
     this.class228_6 = new Track<int, int>();
     if (this.class239_0 != null)
     {
         int value = this.class239_0[0];
         this.class239_0[0] = 0;
         int num = 0;
         for (int i = 1; i < this.class239_0.Count; i++)
         {
             int num2 = this.class239_0[i] - this.class239_0[i - 1];
             int num3 = Convert.ToInt32(60000000.0 / (double)num2);
             if (num3 != num)
             {
                 @class.bpmInterpreter.bpmList.Add((i - 1) * this.int_1, num3);
                 num = num3;
             }
             this.class228_6.Add(this.class239_0[i - 1], num2);
         }
         this.class239_0[0] = value;
         @class.sectionInterpreter.otherList.Add(this.method_0(this.class239_0[this.class239_0.Count - 1]), new List<string>(new string[]
         {
             "end"
         }));
         foreach (int current in this.class228_1.Keys)
         {
             @class.sectionInterpreter.sectionList.Add(this.method_0(current), this.class228_1[current]);
         }
         foreach (int current2 in this.tsList.Keys)
         {
             @class.bpmInterpreter.TSList.Add(this.method_0(current2), this.tsList[current2][0]);
         }
         Track<int, int> class2 = new Track<int, int>();
         Track<int, int> class3 = new Track<int, int>();
         foreach (int current3 in this.class228_2.Keys)
         {
             int num4 = this.method_0(current3);
             int num5 = this.method_0(current3 + this.class228_2[current3] - this.int_0) - num4;
             class2.Add(num4, (num5 <= this.int_1 / 4) ? 0 : num5);
         }
         foreach (int current4 in this.class228_3.Keys)
         {
             int num4 = this.method_0(current4);
             int num5 = this.method_0(current4 + this.class228_3[current4] - this.int_0) - num4;
             class3.Add(num4, (num5 <= this.int_1 / 4) ? 0 : num5);
         }
         Track<int, int> class4 = new Track<int, int>();
         Track<int, int> class5 = new Track<int, int>();
         foreach (int current5 in this.bpmList.Keys)
         {
             int num4 = this.method_0(current5);
             int num5 = this.method_0(current5 + this.bpmList[current5] - this.int_0) - num4;
             class4.Add(num4, (num5 <= this.int_1 / 4) ? 0 : num5);
         }
         foreach (int current6 in this.class228_5.Keys)
         {
             int num4 = this.method_0(current6);
             int num5 = this.method_0(current6 + this.class228_5[current6] - this.int_0) - num4;
             class5.Add(num4, (num5 <= this.int_1 / 4) ? 0 : num5);
         }
         string[] array = new string[]
         {
             "Easy",
             "Medium",
             "Hard",
             "Expert"
         };
         string[] array2 = new string[]
         {
             "Single",
             "Double"
         };
         for (int j = 0; j < array2.Length; j++)
         {
             string text = array2[j];
             string[] array3 = new string[]
             {
                 "Guitar",
                 "Rhythm"
             };
             for (int k = 0; k < array3.Length; k++)
             {
                 string text2 = array3[k];
                 string[] array4 = array;
                 for (int l = 0; l < array4.Length; l++)
                 {
                     string text3 = array4[l];
                     string key = (text2.ToLower() + ((text == "Double") ? "coop" : "") + "_" + text3.ToLower()).Replace("guitar_", "");
                     if (this.noteList.ContainsKey(key))
                     {
                         NoteEventInterpreter class6 = new NoteEventInterpreter();
                         Track<int, NotesAtOffset> class7 = this.noteList[key];
                         foreach (int current7 in class7.Keys)
                         {
                             int num4 = this.method_0(current7);
                             int num5 = this.method_0(current7 + class7[current7].sustainLength - this.int_0) - num4;
                             class6.noteList.Add(num4, new NotesAtOffset(class7[current7].noteValues, (num5 <= this.int_1 / 4) ? 0 : num5));
                         }
                         class6.alwaysTrue = false;
                         if (this.spList.ContainsKey(key))
                         {
                             Track<int, int[]> class8 = this.spList[key];
                             foreach (int current8 in class8.Keys)
                             {
                                 int num4 = this.method_0(current8);
                                 int num5 = this.method_0(current8 + class8[current8][0] - this.int_0) - num4;
                                 class6.class228_1.Add(num4, (num5 <= this.int_1 / 4) ? 0 : num5);
                             }
                         }
                         if (this.battleNoteList.ContainsKey(key))
                         {
                             Track<int, int[]> class9 = this.spList[key];
                             foreach (int current9 in class9.Keys)
                             {
                                 int num4 = this.method_0(current9);
                                 int num5 = this.method_0(current9 + class9[current9][0] - this.int_0) - num4;
                                 class6.class228_4.Add(num4, (num5 <= this.int_1 / 4) ? 0 : num5);
                             }
                         }
                         class6.class228_2 = class2;
                         class6.class228_3 = class3;
                         class6.class228_5 = class4;
                         class6.class228_6 = class5;
                         @class.difficultyWithNotes.Add(text3 + text + text2, class6);
                     }
                 }
             }
         }
         this.class228_6.Clear();
         this.class228_6 = null;
         return @class;
     }
     return null;
 }
示例#3
0
        private void method_3(int instrumentType, int int_1, MIDINote midiNote, int int_2)
        {
            NoteEventInterpreter noteEvenInterpreter = null;

            switch (midiNote.getDifficulty())
            {
            case Difficulty.Easy:
                switch (instrumentType)
                {
                case 0:
                    noteEvenInterpreter = this.easySingle;
                    break;

                case 1:
                    noteEvenInterpreter = this.easyDoubleGuitar;
                    break;

                case 3:
                    noteEvenInterpreter = this.easyDoubleBass;
                    break;
                }
                break;

            case Difficulty.Medium:
                switch (instrumentType)
                {
                case 0:
                    noteEvenInterpreter = this.mediumSingle;
                    break;

                case 1:
                    noteEvenInterpreter = this.mediumDoubleGuitar;
                    break;

                case 3:
                    noteEvenInterpreter = this.mediumDoubleBass;
                    break;
                }
                break;

            case Difficulty.Hard:
                switch (instrumentType)
                {
                case 0:
                    noteEvenInterpreter = this.hardSingle;
                    break;

                case 1:
                    noteEvenInterpreter = this.hardDoubleGuitar;
                    break;

                case 3:
                    noteEvenInterpreter = this.hardDoubleBass;
                    break;
                }
                break;

            case Difficulty.Expert:
                switch (instrumentType)
                {
                case 0:
                    noteEvenInterpreter = this.expertSingle;
                    break;

                case 1:
                    noteEvenInterpreter = this.expertDoubleGuitar;
                    break;

                case 3:
                    noteEvenInterpreter = this.expertDoubleBass;
                    break;
                }
                break;

            default:
                if (!this.bool_3 && midiNote.method_2() == MIDINoteMask.StarPower)
                {
                    this.bool_3 = true;
                    this.expertSingle.class228_1.Clear();
                    this.hardSingle.class228_1.Clear();
                    this.mediumSingle.class228_1.Clear();
                    this.easySingle.class228_1.Clear();
                }
                else if (!this.bool_3)
                {
                    return;
                }
                break;
            }
            if (midiNote.method_3() != Fret.Invalid)
            {
                if (noteEvenInterpreter.noteList.method_4(int_1))
                {
                    noteEvenInterpreter.noteList[int_1].noteValues[(int)midiNote.method_3()] = true;
                    return;
                }
                bool[] array = new bool[32];
                array[(int)midiNote.method_3()] = true;
                noteEvenInterpreter.noteList.Add(int_1, new NotesAtOffset(array, int_2));
                return;
            }
            else
            {
                if (midiNote.method_2() == MIDINoteMask.StarPower && !this.expertSingle.class228_1.ContainsKey(int_1))
                {
                    this.expertSingle.class228_1.Add(int_1, int_2);
                    this.hardSingle.class228_1.Add(int_1, int_2);
                    this.mediumSingle.class228_1.Add(int_1, int_2);
                    this.easySingle.class228_1.Add(int_1, int_2);
                    return;
                }
                if (midiNote.method_2() == MIDINoteMask.Unk7 && !noteEvenInterpreter.class228_1.ContainsKey(int_1) && !this.bool_3)
                {
                    noteEvenInterpreter.class228_1.Add(int_1, int_2);
                    return;
                }
                if (midiNote.method_2() == MIDINoteMask.Unk9 && !noteEvenInterpreter.class228_2.ContainsKey(int_1))
                {
                    noteEvenInterpreter.class228_2.Add(int_1, int_2);
                    return;
                }
                if (midiNote.method_2() == MIDINoteMask.Unk10 && !noteEvenInterpreter.class228_3.ContainsKey(int_1))
                {
                    noteEvenInterpreter.class228_3.Add(int_1, int_2);
                }
                return;
            }
        }