public GameSettingsChecker(zzPakNode2 class318_0)
 {
     if (!class318_0.method_6(GameSettingsChecker._hashPath))
     {
         return;
     }
     zzGenericNode1 @class = new zzGenericNode1(GameSettingsChecker._hashPath, KeyGenerator.smethod_8(class318_0.method_12(GameSettingsChecker._hashPath), "MaC39SubInfo1245"));
     this.version = new Version(@class.method_5<UnicodeRootNode>(new UnicodeRootNode("version")).method_7());
     float[] array = @class.method_5<ArrayPointerRootNode>(new ArrayPointerRootNode("date")).method_7().method_7<float>();
     this.date = new DateTime((int)array[0], (int)array[1], (int)array[2]);
     this.unkBuffer = @class.method_5<ArrayPointerRootNode>(new ArrayPointerRootNode("hash")).method_7().method_7<int>();
     class318_0.method_7(GameSettingsChecker._hashPath);
     using (Stream26 stream = class318_0.method_17())
     {
         stream.Position = 0L;
         // Ignore checks for external tools modifying game settings because we're not children who will dictate how people can play their game
         // Possibly turn this on later softly for warning the player of possible data integrity issues
         // this._GameSettingsUntampered = Class244.smethod_53<int>(Class244.smethod_21(Class244.smethod_43(stream.stream_0)), this.int_0);
         this._GameSettingsUntampered = true;
     }
     GC.Collect();
     this._AssemblyVersionMatches = (Assembly.GetExecutingAssembly().GetName().Version.CompareTo(this.version) == 0);
     this._LoadedSuccessfully = true;
     if (!this._AssemblyVersionMatches)
     {
         MessageBox.Show("The game settings were created under a different version.");
     }
     if (!this._GameSettingsUntampered)
     {
         MessageBox.Show("The game settings were modified by an external tool!");
     }
 }
Beispiel #2
0
 public QBCParser(string string_0, zzGenericNode1 class308_0, zzGenericNode1 class308_1, zzGenericNode1 class308_2)
 {
     string[] array = new string[]
     {
         "Easy",
         "Medium",
         "Hard",
         "Expert"
     };
     string[] array2 = new string[]
     {
         "Single",
         "Double"
     };
     ArrayPointerRootNode @class;
     for (int i = 0; i < array2.Length; i++)
     {
         string a = array2[i];
         string[] array3 = new string[]
         {
             "Guitar",
             "Rhythm"
         };
         for (int j = 0; j < array3.Length; j++)
         {
             string text = array3[j];
             string[] array4 = array;
             for (int k = 0; k < array4.Length; k++)
             {
                 string text2 = array4[k];
                 string text3 = (text.ToLower() + ((a == "Double") ? "coop" : "") + "_" + text2.ToLower()).Replace("guitar_", "");
                 @class = class308_0.method_5<ArrayPointerRootNode>(new ArrayPointerRootNode(string_0 + "_song_" + text3));
                 if (@class != null && @class.method_7() is IntegerArrayNode)
                 {
                     Track<int, NotesAtOffset> class2 = new Track<int, NotesAtOffset>();
                     int[] array5 = @class.method_7().method_7<int>();
                     for (int l = 0; l < array5.Length; l += 3)
                     {
                         class2.Add(array5[l], new NotesAtOffset(array5[l + 2], array5[l + 1]));
                     }
                     this.noteList.Add(text3, class2);
                 }
                 @class = class308_0.method_5<ArrayPointerRootNode>(new ArrayPointerRootNode(string_0 + "_" + text3 + "_star"));
                 if (@class != null && @class.method_7() is ListArrayNode)
                 {
                     Track<int, int[]> class3 = new Track<int, int[]>();
                     foreach (IntegerArrayNode current in @class.method_7().method_8<IntegerArrayNode>())
                     {
                         class3.Add(current[0], new int[]
                         {
                             current[1],
                             current[2]
                         });
                     }
                     this.spList.Add(text3, class3);
                 }
                 @class = class308_0.method_5<ArrayPointerRootNode>(new ArrayPointerRootNode(string_0 + "_" + text3 + "_starbattlemode"));
                 if (@class != null && @class.method_7() is ListArrayNode)
                 {
                     Track<int, int[]> class4 = new Track<int, int[]>();
                     foreach (IntegerArrayNode current2 in @class.method_7().method_8<IntegerArrayNode>())
                     {
                         class4.Add(current2[0], new int[]
                         {
                             current2[1],
                             current2[2]
                         });
                     }
                     this.battleNoteList.Add(text3, class4);
                 }
             }
         }
     }
     @class = class308_0.method_5<ArrayPointerRootNode>(new ArrayPointerRootNode(string_0 + "_faceoffp1"));
     if (@class != null && @class.method_7() is ListArrayNode)
     {
         foreach (IntegerArrayNode current3 in @class.method_7().method_8<IntegerArrayNode>())
         {
             this.class228_2.Add(current3[0], current3[1]);
         }
     }
     @class = class308_0.method_5<ArrayPointerRootNode>(new ArrayPointerRootNode(string_0 + "_faceoffp2"));
     if (@class != null && @class.method_7() is ListArrayNode)
     {
         foreach (IntegerArrayNode current4 in @class.method_7().method_8<IntegerArrayNode>())
         {
             this.class228_3.Add(current4[0], current4[1]);
         }
     }
     @class = class308_0.method_5<ArrayPointerRootNode>(new ArrayPointerRootNode(string_0 + "_bossbattlep1"));
     if (@class != null && @class.method_7() is ListArrayNode)
     {
         foreach (IntegerArrayNode current5 in @class.method_7().method_8<IntegerArrayNode>())
         {
             this.bpmList.Add(current5[0], current5[1]);
         }
     }
     @class = class308_0.method_5<ArrayPointerRootNode>(new ArrayPointerRootNode(string_0 + "_bossbattlep2"));
     if (@class != null && @class.method_7() is ListArrayNode)
     {
         foreach (IntegerArrayNode current6 in @class.method_7().method_8<IntegerArrayNode>())
         {
             this.class228_5.Add(current6[0], current6[1]);
         }
     }
     @class = class308_0.method_5<ArrayPointerRootNode>(new ArrayPointerRootNode(string_0 + "_timesig"));
     if (@class != null && @class.method_7() is ListArrayNode)
     {
         foreach (IntegerArrayNode current7 in @class.method_7().method_8<IntegerArrayNode>())
         {
             this.tsList.Add(current7[0], new int[]
             {
                 current7[1],
                 current7[2]
             });
         }
     }
     @class = class308_0.method_5<ArrayPointerRootNode>(new ArrayPointerRootNode(string_0 + "_fretbars"));
     if (@class != null && @class.method_7() is IntegerArrayNode)
     {
         this.class239_0 = new Class239<int>(@class.method_7().method_8<int>());
         this.int_0 = (this.class239_0[1] - this.class239_0[0]) / 4;
         try
         {
             Dictionary<int, string> dictionary = new Dictionary<int, string>();
             @class = class308_0.method_5<ArrayPointerRootNode>(new ArrayPointerRootNode(string_0 + "_markers"));
             if (class308_1 != null && @class != null && @class.method_7() is StructureArrayNode)
             {
                 foreach (UnicodeRootNode class5 in class308_1.Nodes)
                 {
                     dictionary.Add(class5.int_0, class5.method_7());
                 }
                 using (List<StructureHeaderNode>.Enumerator enumerator9 = @class.method_7().method_8<StructureHeaderNode>().GetEnumerator())
                 {
                     while (enumerator9.MoveNext())
                     {
                         StructureHeaderNode current8 = enumerator9.Current;
                         this.class228_1.Add(((IntegerStructureNode)current8[0]).method_8(), dictionary[((FileTagStructureNode)current8[1]).method_9()]);
                     }
                     goto IL_7C2;
                 }
             }
             if (@class != null && @class.method_7() is StructureArrayNode)
             {
                 foreach (StructureHeaderNode current9 in @class.method_7().method_8<StructureHeaderNode>())
                 {
                     this.class228_1.Add(((IntegerStructureNode)current9[0]).method_8(), ((UnicodeStructureNode)current9[1]).method_8());
                 }
             }
             IL_7C2:;
         }
         catch
         {
         }
         try
         {
             if (class308_2 != null)
             {
                 this.gh3Song_0 = new GH3Song(class308_2.method_5<StructurePointerNode>(new StructurePointerNode(string_0)));
             }
             return;
         }
         catch
         {
             return;
         }
     }
     throw new Exception("Not a MID.QB!");
 }