Exemplo n.º 1
0
        public void method_0()
        {
            byte[] byte_;
            ZipManager.ExtractBytesFrom(_string1, out byte_, "songs.info", "TGH9ZIP2PASS4MXKR");
            var @class = new ZzGenericNode1("songs", KeyGenerator.smethod_8(byte_, "SNG4AES4KEY9MXKR"));

            foreach (StructurePointerNode class302 in @class.Nodes)
            {
                var gH3Song = new Gh3Song(class302);
                gH3Song.Editable = true;
                _gh3Songlist0.method_0(gH3Song, _string0 != null);
            }
            ZipManager.ExtractBytesFrom(_string1, out byte_, "tier.info", "TGH9ZIP2PASS4MXKR");
            Gh3Tier0.method_1(new Gh3Tier(
                                  (StructureHeaderNode) new ZzGenericNode1("tier", KeyGenerator.smethod_8(byte_, "TIR4AES4KEY9MXKR"))
                                  .Nodes[0], _gh3Songlist0));
            if (_string0 != null)
            {
                var list  = new List <string>();
                var list2 = new List <string>();
                foreach (var current in Gh3Tier0.Songs)
                {
                    if (current.Editable)
                    {
                        list.Add(current.Name + "_song.pak.xen");
                        list2.Add(_string0 + "songs\\" + current.Name + "_song.pak.xen");
                        list.Add(current.Name + ".dat.xen");
                        list2.Add(_string0 + "music\\" + current.Name + ".dat.xen");
                        list.Add(current.Name + ".fsb.xen");
                        list2.Add(_string0 + "music\\" + current.Name + ".fsb.xen");
                    }
                }
                ZipManager.smethod_11(_string1, list2, list, "TGH9ZIP2PASS4MXKR");
            }
        }
Exemplo n.º 2
0
 public SongProperties(string songName)
 {
     InitializeComponent();
     _song = new Gh3Song();
     Text  = Text + " (" + songName + ")";
     _singerBox.SelectedIndex   = 0;
     _countOffBox.SelectedIndex = 0;
     _bassistBox.SelectedIndex  = 0;
     _bossBox.SelectedIndex     = 0;
 }
Exemplo n.º 3
0
        public void ImportSGH()
        {
            byte[] byte_;
            ZipManager.ExtractBytesFrom(_saveLocation, out byte_, "songs.info", "SGH9ZIP2PASS4MXKR");
            var @class = new ZzGenericNode1("songs", KeyGenerator.smethod_8(byte_, "SNG4AES4KEY9MXKR"));

            foreach (StructurePointerNode class302 in @class.Nodes)
            {
                var gH3Song = new Gh3Song(class302)
                {
                    Editable = true
                };
                _gh3SongList.method_0(gH3Song, _string0 != null);
            }
            ZipManager.ExtractBytesFrom(_saveLocation, out byte_, "setlist.info", "SGH9ZIP2PASS4MXKR");
            SetlistToExport.method_1(new Gh3Setlist(
                                         (StructureHeaderNode) new ZzGenericNode1("setlist", KeyGenerator.smethod_8(byte_, "SET4AES4KEY9MXKR"))
                                         .Nodes[0], _gh3SongList));
            if (_string0 == null)
            {
                return;
            }
            var list  = new List <string>();
            var list2 = new List <string>();

            foreach (var current in SetlistToExport.Tiers)
            {
                foreach (var current2 in current.Songs)
                {
                    if (!current2.Editable)
                    {
                        continue;
                    }
                    list.Add(current2.Name + "_song.pak.xen");
                    list2.Add(_string0 + "songs\\" + current2.Name + "_song.pak.xen");
                    list.Add(current2.Name + ".dat.xen");
                    list2.Add(_string0 + "music\\" + current2.Name + ".dat.xen");
                    list.Add(current2.Name + ".fsb.xen");
                    list2.Add(_string0 + "music\\" + current2.Name + ".fsb.xen");
                }
            }
            ZipManager.smethod_11(_saveLocation, list2, list, "SGH9ZIP2PASS4MXKR");
        }
Exemplo n.º 4
0
        public void QbcCreator(string fileLocation, Gh3Song song)
        {
            Gh3Song0 = song;
            var streamWriter = new StreamWriter(fileLocation);

            streamWriter.WriteLine("[Song]");
            streamWriter.WriteLine("{");
            streamWriter.WriteLine("\tName = \"" + Gh3Song0.Title + "\"");
            streamWriter.WriteLine("\tArtist = \"" + Gh3Song0.Artist + "\"");
            streamWriter.WriteLine("\tYear = \"" + Gh3Song0.Year + "\"");
            streamWriter.WriteLine("\tPlayer2 = " + (Gh3Song0.NotBass ? "Rhythm" : "Bass"));
            streamWriter.WriteLine("\tArtistText = \"" + ((Gh3Song0.ArtistText is bool)
                                       ? (((bool)Gh3Song0.ArtistText) ? "by" : "as made famous by")
                                       : ((string)Gh3Song0.ArtistText)) + "\"");
            streamWriter.WriteLine("\tOffset = " + Gh3Song0.InputOffset / -1000.0);
            if (!Gh3Song0.Singer.Equals(""))
            {
                streamWriter.WriteLine("\tSinger = \"" + Gh3Song0.Singer + "\"");
            }
            if (!Gh3Song0.Bassist.Equals("Generic Bassist"))
            {
                streamWriter.WriteLine("\tBassist = \"" + Gh3Song0.Bassist + "\"");
            }
            if (!Gh3Song0.Boss.Equals(""))
            {
                streamWriter.WriteLine("\tBoss = \"" + Gh3Song0.Boss + "\"");
            }
            streamWriter.WriteLine("\tCountOff = \"" + Gh3Song0.Countoff + "\"");
            streamWriter.WriteLine("\tGuitarVol = " + Gh3Song0.GuitarVol);
            streamWriter.WriteLine("\tBandVol = " + Gh3Song0.BandVol);
            streamWriter.WriteLine("\tHoPo = " + Gh3Song0.HammerOn);
            streamWriter.WriteLine("\tOriginalArtist = " + (Gh3Song0.OriginalArtist ? "true" : "false"));
            streamWriter.WriteLine("\tResolution = " + Int1);
            streamWriter.WriteLine("}");
            streamWriter.WriteLine("[SyncTrack]");
            streamWriter.WriteLine("{");
            foreach (var current in TsList.Keys)
            {
                streamWriter.WriteLine(string.Concat("\t", current, " = TS ", TsList[current][0], " ",
                                                     TsList[current][1]));
            }
            streamWriter.WriteLine("}");
            streamWriter.WriteLine("[FretBars]");
            streamWriter.WriteLine("{");
            foreach (var current2 in FretbarList)
            {
                streamWriter.WriteLine("\t" + current2);
            }
            streamWriter.WriteLine("}");
            streamWriter.WriteLine("[Events]");
            streamWriter.WriteLine("{");
            foreach (var current3 in Class2281.Keys)
            {
                streamWriter.WriteLine(string.Concat("\t", current3, " = S \"", Class2281[current3], "\""));
            }
            streamWriter.WriteLine("}");
            string[] array =
            {
                "",
                "rhythm_",
                "guitarcoop_",
                "rhythmcoop_"
            };
            for (var i = 0; i < array.Length; i++)
            {
                var      str    = array[i];
                string[] array2 =
                {
                    "easy",
                    "medium",
                    "hard",
                    "expert"
                };
                for (var j = 0; j < array2.Length; j++)
                {
                    var str2   = array2[j];
                    var text   = str + str2;
                    var @class = NoteList.ContainsKey(text) ? NoteList[text] : new Track <int, NotesAtOffset>();
                    var class2 = SpList.ContainsKey(text) ? SpList[text] : new Track <int, int[]>();
                    var class3 = BattleNoteList.ContainsKey(text) ? BattleNoteList[text] : new Track <int, int[]>();
                    var class4 = new Class221 <int>(@class.Keys);
                    class4.vmethod_1(class2.Keys);
                    class4.vmethod_1(class3.Keys);
                    class4.Sort();
                    var stringBuilder = new StringBuilder(text);
                    stringBuilder[0] = char.ToUpper(stringBuilder[0]);
                    if (text.Contains("_"))
                    {
                        stringBuilder[text.IndexOf('_') + 1] = char.ToUpper(stringBuilder[text.IndexOf('_') + 1]);
                    }
                    streamWriter.WriteLine("[" + stringBuilder + "]");
                    streamWriter.WriteLine("{");
                    foreach (var current4 in class4)
                    {
                        if (@class.ContainsKey(current4))
                        {
                            streamWriter.WriteLine(string.Concat("\t", current4, " = N ", @class[current4].method_0(),
                                                                 " ", @class[current4].SustainLength));
                        }
                        if (class2.ContainsKey(current4))
                        {
                            streamWriter.WriteLine(string.Concat("\t", current4, " = S ", class2[current4][1], " ",
                                                                 class2[current4][0]));
                        }
                        if (class3.ContainsKey(current4))
                        {
                            streamWriter.WriteLine(string.Concat("\t", current4, " = B ", class3[current4][1], " ",
                                                                 class3[current4][0]));
                        }
                    }
                    streamWriter.WriteLine("}");
                }
            }
            streamWriter.WriteLine("[FaceOffP1]");
            streamWriter.WriteLine("{");
            foreach (var current5 in Class2282.Keys)
            {
                streamWriter.WriteLine(string.Concat("\t", current5, " = F ", Class2282[current5]));
            }
            streamWriter.WriteLine("}");
            streamWriter.WriteLine("[FaceOffP2]");
            streamWriter.WriteLine("{");
            foreach (var current6 in Class2283.Keys)
            {
                streamWriter.WriteLine(string.Concat("\t", current6, " = F ", Class2283[current6]));
            }
            streamWriter.WriteLine("}");
            streamWriter.WriteLine("[BossBattleP1]");
            streamWriter.WriteLine("{");
            foreach (var current7 in BpmList.Keys)
            {
                streamWriter.WriteLine(string.Concat("\t", current7, " = B ", BpmList[current7]));
            }
            streamWriter.WriteLine("}");
            streamWriter.WriteLine("[BossBattleP2]");
            streamWriter.WriteLine("{");
            foreach (var current8 in Class2285.Keys)
            {
                streamWriter.WriteLine(string.Concat("\t", current8, " = B ", Class2285[current8]));
            }
            streamWriter.WriteLine("}");
            streamWriter.Close();
        }
Exemplo n.º 5
0
        public ChartParser method_2(Gh3Song gh3Song1)
        {
            var @class = new ChartParser(Gh3Song0);

            @class.Constant480 = Int1;
            if (gh3Song1 != null)
            {
                @class.Gh3SongInfo.vmethod_0(gh3Song1);
            }
            _class2286 = new Track <int, int>();
            if (FretbarList != null)
            {
                var value = FretbarList[0];
                FretbarList[0] = 0;
                var num = 0;
                for (var i = 1; i < FretbarList.Count; i++)
                {
                    var num2 = FretbarList[i] - FretbarList[i - 1];
                    var num3 = Convert.ToInt32(60000000.0 / num2);
                    if (num3 != num)
                    {
                        @class.BpmInterpreter.BpmList.Add((i - 1) * Int1, num3);
                        num = num3;
                    }
                    _class2286.Add(FretbarList[i - 1], num2);
                }
                FretbarList[0] = value;
                @class.SectionInterpreter.OtherList.Add(method_0(FretbarList[FretbarList.Count - 1]), new List <string>(
                                                            new[]
                {
                    "end"
                }));
                foreach (var current in Class2281.Keys)
                {
                    @class.SectionInterpreter.SectionList.Add(method_0(current), Class2281[current]);
                }
                foreach (var current2 in TsList.Keys)
                {
                    @class.BpmInterpreter.TsList.Add(method_0(current2), TsList[current2][0]);
                }
                var class2 = new Track <int, int>();
                var class3 = new Track <int, int>();
                foreach (var current3 in Class2282.Keys)
                {
                    var num4 = method_0(current3);
                    var num5 = method_0(current3 + Class2282[current3] - Int0) - num4;
                    class2.Add(num4, (num5 <= Int1 / 4) ? 0 : num5);
                }
                foreach (var current4 in Class2283.Keys)
                {
                    var num4 = method_0(current4);
                    var num5 = method_0(current4 + Class2283[current4] - Int0) - num4;
                    class3.Add(num4, (num5 <= Int1 / 4) ? 0 : num5);
                }
                var class4 = new Track <int, int>();
                var class5 = new Track <int, int>();
                foreach (var current5 in BpmList.Keys)
                {
                    var num4 = method_0(current5);
                    var num5 = method_0(current5 + BpmList[current5] - Int0) - num4;
                    class4.Add(num4, (num5 <= Int1 / 4) ? 0 : num5);
                }
                foreach (var current6 in Class2285.Keys)
                {
                    var num4 = method_0(current6);
                    var num5 = method_0(current6 + Class2285[current6] - Int0) - num4;
                    class5.Add(num4, (num5 <= Int1 / 4) ? 0 : num5);
                }
                string[] array =
                {
                    "Easy",
                    "Medium",
                    "Hard",
                    "Expert"
                };
                string[] array2 =
                {
                    "Single",
                    "Double"
                };
                for (var j = 0; j < array2.Length; j++)
                {
                    var      text   = array2[j];
                    string[] array3 =
                    {
                        "Guitar",
                        "Rhythm"
                    };
                    for (var k = 0; k < array3.Length; k++)
                    {
                        var text2  = array3[k];
                        var array4 = array;
                        for (var l = 0; l < array4.Length; l++)
                        {
                            var text3 = array4[l];
                            var key   = (text2.ToLower() + ((text == "Double") ? "coop" : "") + "_" + text3.ToLower())
                                        .Replace("guitar_", "");
                            if (NoteList.ContainsKey(key))
                            {
                                var class6 = new NoteEventInterpreter();
                                var class7 = NoteList[key];
                                foreach (var current7 in class7.Keys)
                                {
                                    var num4 = method_0(current7);
                                    var num5 = method_0(current7 + class7[current7].SustainLength - Int0) - num4;
                                    class6.NoteList.Add(num4,
                                                        new NotesAtOffset(class7[current7].NoteValues, (num5 <= Int1 / 4) ? 0 : num5));
                                }
                                class6.AlwaysTrue = false;
                                if (SpList.ContainsKey(key))
                                {
                                    var class8 = SpList[key];
                                    foreach (var current8 in class8.Keys)
                                    {
                                        var num4 = method_0(current8);
                                        var num5 = method_0(current8 + class8[current8][0] - Int0) - num4;
                                        class6.Class2281.Add(num4, (num5 <= Int1 / 4) ? 0 : num5);
                                    }
                                }
                                if (BattleNoteList.ContainsKey(key))
                                {
                                    var class9 = SpList[key];
                                    foreach (var current9 in class9.Keys)
                                    {
                                        var num4 = method_0(current9);
                                        var num5 = method_0(current9 + class9[current9][0] - Int0) - num4;
                                        class6.Class2284.Add(num4, (num5 <= Int1 / 4) ? 0 : num5);
                                    }
                                }
                                class6.Class2282 = class2;
                                class6.Class2283 = class3;
                                class6.Class2285 = class4;
                                class6.Class2286 = class5;
                                @class.DifficultyWithNotes.Add(text3 + text + text2, class6);
                            }
                        }
                    }
                }
                _class2286.Clear();
                _class2286 = null;
                return(@class);
            }
            return(null);
        }
Exemplo n.º 6
0
 public QbcParser(Gh3Song gh3Song1) : this()
 {
     Gh3Song0 = gh3Song1;
 }
Exemplo n.º 7
0
        public QbcParser(string string0, ZzGenericNode1 class3080, ZzGenericNode1 class3081, ZzGenericNode1 class3082)
        {
            string[] array =
            {
                "Easy",
                "Medium",
                "Hard",
                "Expert"
            };
            string[] array2 =
            {
                "Single",
                "Double"
            };
            ArrayPointerRootNode @class;

            for (var i = 0; i < array2.Length; i++)
            {
                var      a      = array2[i];
                string[] array3 =
                {
                    "Guitar",
                    "Rhythm"
                };
                for (var j = 0; j < array3.Length; j++)
                {
                    var text   = array3[j];
                    var array4 = array;
                    for (var k = 0; k < array4.Length; k++)
                    {
                        var text2 = array4[k];
                        var text3 =
                            (text.ToLower() + ((a == "Double") ? "coop" : "") + "_" + text2.ToLower())
                            .Replace("guitar_", "");
                        @class = class3080.method_5(new ArrayPointerRootNode(string0 + "_song_" + text3));
                        if (@class != null && @class.method_7() is IntegerArrayNode)
                        {
                            var class2 = new Track <int, NotesAtOffset>();
                            var array5 = @class.method_7().method_7 <int>();
                            for (var l = 0; l < array5.Length; l += 3)
                            {
                                class2.Add(array5[l], new NotesAtOffset(array5[l + 2], array5[l + 1]));
                            }
                            NoteList.Add(text3, class2);
                        }
                        @class = class3080.method_5(new ArrayPointerRootNode(string0 + "_" + text3 + "_star"));
                        if (@class != null && @class.method_7() is ListArrayNode)
                        {
                            var class3 = new Track <int, int[]>();
                            foreach (var current in @class.method_7().method_8 <IntegerArrayNode>())
                            {
                                class3.Add(current[0], new[]
                                {
                                    current[1],
                                    current[2]
                                });
                            }
                            SpList.Add(text3, class3);
                        }
                        @class = class3080.method_5(
                            new ArrayPointerRootNode(string0 + "_" + text3 + "_starbattlemode"));
                        if (@class != null && @class.method_7() is ListArrayNode)
                        {
                            var class4 = new Track <int, int[]>();
                            foreach (var current2 in @class.method_7().method_8 <IntegerArrayNode>())
                            {
                                class4.Add(current2[0], new[]
                                {
                                    current2[1],
                                    current2[2]
                                });
                            }
                            BattleNoteList.Add(text3, class4);
                        }
                    }
                }
            }
            @class = class3080.method_5(new ArrayPointerRootNode(string0 + "_faceoffp1"));
            if (@class != null && @class.method_7() is ListArrayNode)
            {
                foreach (var current3 in @class.method_7().method_8 <IntegerArrayNode>())
                {
                    Class2282.Add(current3[0], current3[1]);
                }
            }
            @class = class3080.method_5(new ArrayPointerRootNode(string0 + "_faceoffp2"));
            if (@class != null && @class.method_7() is ListArrayNode)
            {
                foreach (var current4 in @class.method_7().method_8 <IntegerArrayNode>())
                {
                    Class2283.Add(current4[0], current4[1]);
                }
            }
            @class = class3080.method_5(new ArrayPointerRootNode(string0 + "_bossbattlep1"));
            if (@class != null && @class.method_7() is ListArrayNode)
            {
                foreach (var current5 in @class.method_7().method_8 <IntegerArrayNode>())
                {
                    BpmList.Add(current5[0], current5[1]);
                }
            }
            @class = class3080.method_5(new ArrayPointerRootNode(string0 + "_bossbattlep2"));
            if (@class != null && @class.method_7() is ListArrayNode)
            {
                foreach (var current6 in @class.method_7().method_8 <IntegerArrayNode>())
                {
                    Class2285.Add(current6[0], current6[1]);
                }
            }
            @class = class3080.method_5(new ArrayPointerRootNode(string0 + "_timesig"));
            if (@class != null && @class.method_7() is ListArrayNode)
            {
                foreach (var current7 in @class.method_7().method_8 <IntegerArrayNode>())
                {
                    TsList.Add(current7[0], new[]
                    {
                        current7[1],
                        current7[2]
                    });
                }
            }
            @class = class3080.method_5(new ArrayPointerRootNode(string0 + "_fretbars"));
            if (@class != null && @class.method_7() is IntegerArrayNode)
            {
                FretbarList = new Fretbar <int>(@class.method_7().method_8 <int>());
                Int0        = (FretbarList[1] - FretbarList[0]) / 4;
                try
                {
                    var dictionary = new Dictionary <int, string>();
                    @class = class3080.method_5(new ArrayPointerRootNode(string0 + "_markers"));
                    if (class3081 != null && @class != null && @class.method_7() is StructureArrayNode)
                    {
                        foreach (UnicodeRootNode class5 in class3081.Nodes)
                        {
                            dictionary.Add(class5.Int0, class5.method_7());
                        }
                        using (var enumerator9 = @class.method_7().method_8 <StructureHeaderNode>().GetEnumerator())
                        {
                            while (enumerator9.MoveNext())
                            {
                                var current8 = enumerator9.Current;
                                Class2281.Add(((IntegerStructureNode)current8[0]).method_8(),
                                              dictionary[((FileTagStructureNode)current8[1]).method_9()]);
                            }
                            goto IL_7C2;
                        }
                    }
                    if (@class != null && @class.method_7() is StructureArrayNode)
                    {
                        foreach (var current9 in @class.method_7().method_8 <StructureHeaderNode>())
                        {
                            Class2281.Add(((IntegerStructureNode)current9[0]).method_8(),
                                          ((UnicodeStructureNode)current9[1]).method_8());
                        }
                    }
IL_7C2:
                    ;
                }
                catch
                {
                }
                try
                {
                    if (class3082 != null)
                    {
                        Gh3Song0 = new Gh3Song(class3082.method_5(new StructurePointerNode(string0)));
                    }
                    return;
                }
                catch
                {
                    return;
                }
            }
            throw new Exception("Not a MID.QB!");
        }
Exemplo n.º 8
0
 public SongProperties(Gh3Song song) : this(song.Name)
 {
     _song = song;
     if (_song is GhaSong)
     {
         _bassistBox.Enabled = false;
         _bossBox.Items.Add("Joe Perry Props");
         _bossBox.Items.Add("Tom Morello Props");
     }
     else
     {
         _aeroGroupBox.Enabled = false;
         _singerBox.Items.Add("Bret Michaels");
         _bossBox.Items.Add("Tom Morello Props");
         _bossBox.Items.Add("Slash Props");
         _bossBox.Items.Add("Lou Props");
     }
     _btnApply.Enabled    = true; // this.gh3Song_0.editable;
     _titleTxt.Text       = _song.Title;
     _artistTxt.Text      = _song.Artist;
     _yearTxt.Text        = _song.Year;
     _chkOriginal.Checked = _song.OriginalArtist;
     _chkRhythm.Checked   = !_song.NoRhythmTrack;
     _chkKeyboard.Checked = _song.Keyboard;
     _chkCoop.Checked     = _song.UseCoopNotetracks;
     _rBtnBass.Checked    = !(_rBtnRhythm.Checked = _song.NotBass);
     if (_song.ArtistText is bool)
     {
         _famousByBtn.Checked = !(_byBtn.Checked = (bool)_song.ArtistText);
     }
     else
     {
         _artistTextBox.Text   = (string)_song.ArtistText;
         _customTxtBtn.Checked = true;
     }
     _guitarVolBox.Value = (decimal)_song.GuitarVol;
     _bandVolBox.Value   = (decimal)_song.BandVol;
     _hammerOnBox.Value  = (decimal)_song.HammerOn;
     _offsetBox.Value    = _song.GemOffset;
     if (_song.Singer.Equals(""))
     {
         _singerBox.SelectedIndex = 0;
     }
     else if (_song.Singer.Equals("male"))
     {
         _singerBox.SelectedIndex = 1;
     }
     else if (_song.Singer.Equals("female"))
     {
         _singerBox.SelectedIndex = 2;
     }
     else if (_song.Singer.Equals("bret"))
     {
         _singerBox.SelectedItem = "Bret Michaels";
     }
     _countOffBox.SelectedItem = _song.Countoff.ToLower();
     _bassistBox.SelectedItem  = _song.Bassist;
     if (_song.Boss.Equals(""))
     {
         _bossBox.SelectedIndex = 0;
     }
     else if (_song.Boss.Equals("boss_tommorello_props"))
     {
         _bossBox.SelectedItem = "Tom Morello Props";
     }
     else if (_song.Boss.Equals("boss_slash_props"))
     {
         _bossBox.SelectedItem = "Slash Props";
     }
     else if (_song.Boss.Equals("boss_devil_props"))
     {
         _bossBox.SelectedItem = "Lou Props";
     }
     else if (_song.Boss.Equals("boss_joe_props"))
     {
         _bossBox.SelectedItem = "Joe Perry Props";
     }
     if (_aeroGroupBox.Enabled)
     {
         var gHaSong = (GhaSong)_song;
         _coveredTxt.Text          = gHaSong.CoveredBy;
         _singAnimPakTxt.Text      = gHaSong.SingerAnimPak;
         _bandBox.SelectedItem     = gHaSong.Band;
         _bpm8NoteBox.Value        = gHaSong.ThinFretbar_8NoteParamsHighBpm;
         _aeroGuitaristBox.Checked = gHaSong.GuitaristChecksum;
         _perryMicBox.Checked      = gHaSong.PerryMicStand;
     }
 }