From fbf510a77f6243e9d27c6f878a202fc6c6188dda Mon Sep 17 00:00:00 2001 From: szymmirr Date: Tue, 5 Jan 2021 06:25:29 +0100 Subject: [PATCH] Manually merge adituv fork --- GHNamespace8/Class246.cs | 18 +-- GHNamespace8/Class247.cs | 2 +- GHNamespace8/Class248.cs | 2 +- GHNamespace8/Class249.cs | 10 +- GHNamespace8/Class250.cs | 4 +- GHNamespace8/MainMenu.cs | 4 +- GHNamespace9/QbEditor.cs | 4 +- GHNamespaceA/CustomMenuCreator.cs | 114 +++++++++--------- GHNamespaceA/GameSettingsChecker.cs | 16 +-- GHNamespaceA/QbDatabaseInitialModifier.cs | 28 ++--- GHNamespaceA/SongData.cs | 2 +- GHNamespaceA/UpdateSetlistSwitcher.cs | 4 +- ...ZipperClass.cs => zzEmbeddedResourceDB.cs} | 6 +- GHNamespaceA/zzFxBoost.cs | 50 ++++---- GHNamespaceA/zzSetListParser.cs | 40 +++--- GHNamespaceA/zzSetListUpdater.cs | 4 +- GHNamespaceB/AbstractTreeNode1.cs | 6 +- ...TagStructureNode.cs => StructItemQbKey.cs} | 14 +-- GHNamespaceB/zzUnkNode295.cs | 2 +- GHNamespaceC/ArrayPointerNode.cs | 2 +- GHNamespaceC/zzPakNode1.cs | 2 +- GHNamespaceC/zzPakNode2.cs | 4 +- GHNamespaceE/Class309.cs | 2 +- GHNamespaceE/zzGenericNode1.cs | 4 +- GHNamespaceF/StructureHeaderNode.cs | 6 +- GHNamespaceN/QBCParser.cs | 44 +++---- GHTCP-cleaned.csproj | 4 +- GuitarHero.Setlist/GH3Setlist.cs | 16 +-- GuitarHero.Songlist/GH3Song.cs | 96 +++++++-------- GuitarHero.Songlist/GH3Songlist.cs | 16 +-- GuitarHero.Songlist/GHASong.cs | 26 ++-- GuitarHero.Tier/GH3Tier.cs | 54 ++++----- GuitarHero/GHLink.cs | 8 +- 33 files changed, 307 insertions(+), 307 deletions(-) rename GHNamespaceA/{zzQbScriptZipperClass.cs => zzEmbeddedResourceDB.cs} (86%) rename GHNamespaceB/{TagStructureNode.cs => StructItemQbKey.cs} (80%) diff --git a/GHNamespace8/Class246.cs b/GHNamespace8/Class246.cs index 04cb7bc..c0e8a51 100644 --- a/GHNamespace8/Class246.cs +++ b/GHNamespace8/Class246.cs @@ -27,15 +27,15 @@ public Class246(int int1, ZzPakNode2 class3181, Gh3Songlist gh3Songlist1, bool b _bool0 = bool1; } - public override void vmethod_0() + public override void CreateCustomMenu() { string text; ZzGenericNode1 @class; - if (!_class3180.method_6(text = "scripts\\guitar\\custom_menu\\guitar_custom_progression.qb")) + if (!_class3180.zzQbFileExists(text = "scripts\\guitar\\custom_menu\\guitar_custom_progression.qb")) { - _class3180.method_0(text, new ZzGenericNode1()); + _class3180.zzCreateQbFileFrom(text, new ZzGenericNode1()); @class = _class3180.ZzGetNode1(text); - @class.method_3(new IntegerRootNode("custom_setlist_bitmask", text, 0)); + @class.addChild(new IntegerRootNode("custom_setlist_bitmask", text, 0)); } else { @@ -43,16 +43,16 @@ public override void vmethod_0() } if (_bool0) { - @class.method_3(new StructurePointerRootNode(_int0, text, _gh3Songlist0.Dictionary1[_int0].method_1())); - @class.method_3(new StructurePointerRootNode(_gh3Songlist0.method_10(_int0), text, + @class.addChild(new StructurePointerRootNode(_int0, text, _gh3Songlist0.Dictionary1[_int0].method_1())); + @class.addChild(new StructurePointerRootNode(_gh3Songlist0.method_10(_int0), text, _gh3Songlist0.method_11(_int0).method_6())); } else { try { - @class.method_5(new StructurePointerRootNode(_int0)).Remove(); - @class.method_5(new StructurePointerRootNode(_gh3Songlist0.method_10(_int0))).Remove(); + @class.zzFindNode(new StructurePointerRootNode(_int0)).Remove(); + @class.zzFindNode(new StructurePointerRootNode(_gh3Songlist0.method_10(_int0))).Remove(); } catch { @@ -62,7 +62,7 @@ public override void vmethod_0() _gh3Songlist0.Dictionary1.Remove(_int0); _gh3Songlist0.Class2140.Remove(_gh3Songlist0.Class2140.method_0(_int0)); } - @class.method_5(new IntegerRootNode("custom_setlist_bitmask")).method_8(_gh3Songlist0.CustomBitMask); + @class.zzFindNode(new IntegerRootNode("custom_setlist_bitmask")).method_8(_gh3Songlist0.CustomBitMask); } public override string ToString() diff --git a/GHNamespace8/Class247.cs b/GHNamespace8/Class247.cs index 3d3b18b..2ecd9fd 100644 --- a/GHNamespace8/Class247.cs +++ b/GHNamespace8/Class247.cs @@ -17,7 +17,7 @@ public Class247(ZzPakNode2 class3181, Gh3Songlist gh3Songlist1) _gh3Songlist0 = gh3Songlist1; } - public override void vmethod_0() + public override void CreateCustomMenu() { ZzGenericNode1 class308 = _class3180.ZzGetNode1("scripts\\guitar\\songlist.qb"); _gh3Songlist0.method_13(class308); diff --git a/GHNamespace8/Class248.cs b/GHNamespace8/Class248.cs index 14ce8d4..d8ba0bf 100644 --- a/GHNamespace8/Class248.cs +++ b/GHNamespace8/Class248.cs @@ -68,7 +68,7 @@ public Class248(string string4, string[] string5, TimeSpan timeSpan2, TimeSpan t Bool1 = (_string0.Length == 6); } - public override void vmethod_0() + public override void CreateCustomMenu() { if (_class3230 != null) { diff --git a/GHNamespace8/Class249.cs b/GHNamespace8/Class249.cs index 6e824ca..efeb23d 100644 --- a/GHNamespace8/Class249.cs +++ b/GHNamespace8/Class249.cs @@ -18,17 +18,17 @@ public Class249(ZzPakNode2 class3181) _class3180 = class3181; } - public override void vmethod_0() + public override void CreateCustomMenu() { Console.WriteLine("-=- " + ToString() + " -=-"); ZzGenericNode1 @class = _class3180.ZzGetNode1("scripts\\guitar\\menu\\menu_cheats.qb"); - foreach (var current in @class.method_5(new ArrayPointerRootNode("guitar_hero_cheats")) + foreach (var current in @class.zzFindNode(new ArrayPointerRootNode("guitar_hero_cheats")) .method_7() .method_8()) { - var flag = current.method_5(new TagStructureNode("name", "unlockall")) != null; - var flag2 = current.method_5(new TagStructureNode("name", "unlockalleverything")) != null; - var class2 = current.method_5(new ArrayPointerNode("unlock_pattern")).method_8() as IntegerArrayNode; + var flag = current.zzFindNode(new StructItemQbKey("name", "unlockall")) != null; + var flag2 = current.zzFindNode(new StructItemQbKey("name", "unlockalleverything")) != null; + var class2 = current.zzFindNode(new ArrayPointerNode("unlock_pattern")).GetFirstChild() as IntegerArrayNode; if (class2.Nodes.Count == 1) { _bool0 = true; diff --git a/GHNamespace8/Class250.cs b/GHNamespace8/Class250.cs index def9c09..b9428c7 100644 --- a/GHNamespace8/Class250.cs +++ b/GHNamespace8/Class250.cs @@ -22,11 +22,11 @@ public Class250(string string2, QbcParser class3621, ZzPakNode2 class3181, strin _string1 = string3; } - public override void vmethod_0() + public override void CreateCustomMenu() { using (var @class = new ZzPakNode2()) { - @class.method_0("songs\\" + _string0 + ".mid.qb", Class3620.method_4(_string0)); + @class.zzCreateQbFileFrom("songs\\" + _string0 + ".mid.qb", Class3620.method_4(_string0)); @class.method_16(_string1 + "songs\\" + _string0 + "_song.pak.xen"); } } diff --git a/GHNamespace8/MainMenu.cs b/GHNamespace8/MainMenu.cs index 046dec2..b4e9de1 100644 --- a/GHNamespace8/MainMenu.cs +++ b/GHNamespace8/MainMenu.cs @@ -805,7 +805,7 @@ private void LoadChart_EditorBtn_Click(object sender, EventArgs e) var str = KeyGenerator.GetFileName(fileName).Replace("_song.pak.xen", ""); using (var @class = new ZzPakNode2(fileName, false)) { - if (!@class.method_6("songs\\" + str + ".mid.qb")) + if (!@class.zzQbFileExists("songs\\" + str + ".mid.qb")) { throw new Exception("MID.QB song file not found."); } @@ -1424,7 +1424,7 @@ public MainMenu() } _ghtcpRegistry = (_isAerosmith ? "SOFTWARE\\SigmaInc\\GHTCPAero\\" : "SOFTWARE\\SigmaInc\\GHTCP\\"); _backupName = (_isAerosmith ? "backupAero\\" : "backup\\"); - ZzQbScriptZipperClass.GameName = (_isAerosmith ? "GHA" : "GH3"); + zzEmbeddedResourceDB.GameName = (_isAerosmith ? "GHA" : "GH3"); if (_isAerosmith) { Text += " - Aerosmith"; diff --git a/GHNamespace9/QbEditor.cs b/GHNamespace9/QbEditor.cs index 53ae279..2773a57 100644 --- a/GHNamespace9/QbEditor.cs +++ b/GHNamespace9/QbEditor.cs @@ -11,7 +11,7 @@ public bool method_0() bool result; try { - vmethod_0(); + CreateCustomMenu(); return true; } catch (Exception ex) @@ -22,7 +22,7 @@ public bool method_0() return result; } - public abstract void vmethod_0(); + public abstract void CreateCustomMenu(); public abstract override string ToString(); diff --git a/GHNamespaceA/CustomMenuCreator.cs b/GHNamespaceA/CustomMenuCreator.cs index c8e56f7..755a2c0 100644 --- a/GHNamespaceA/CustomMenuCreator.cs +++ b/GHNamespaceA/CustomMenuCreator.cs @@ -9,81 +9,81 @@ namespace GHNamespaceA { public class CustomMenuCreator : QbEditor { - private readonly ZzPakNode2 _class3180; + private readonly ZzPakNode2 _zzQbPak; - private bool _bool0; + private bool _created; - private readonly bool _bool1; + private readonly bool _isGHA; - public CustomMenuCreator(ZzPakNode2 class3181, bool bool2) + public CustomMenuCreator(ZzPakNode2 zzQbPak, bool isGHA) { - _class3180 = class3181; - _bool1 = bool2; + _zzQbPak = zzQbPak; + _isGHA = isGHA; } - public override void vmethod_0() + public override void CreateCustomMenu() { Console.WriteLine("-=- " + ToString() + " -=-"); - if (!_bool0) + if (!_created) { - _bool0 = _class3180.method_6("scripts\\guitar\\custom_menu\\guitar_custom_menu.qb"); + _created = _zzQbPak.zzQbFileExists("scripts\\guitar\\custom_menu\\guitar_custom_menu.qb"); } - if (!_bool0) + if (!_created) { Console.WriteLine("Creating Custom Menu."); - _class3180.method_0("scripts\\guitar\\custom_menu\\guitar_custom_menu.qb", - ZzQbScriptZipperClass.smethod_3("guitar_custom_menu")); - _class3180.method_0("scripts\\guitar\\custom_menu\\guitar_custom_gem_scale.qb", - ZzQbScriptZipperClass.smethod_3("guitar_custom_gem_scale")); - _class3180.method_0("scripts\\guitar\\custom_menu\\guitar_custom_menu_credits.qb", - ZzQbScriptZipperClass.smethod_3("guitar_custom_menu_credits")); - _class3180.method_0("scripts\\guitar\\custom_menu\\guitar_custom_menu_cutoff_viewer.qb", - ZzQbScriptZipperClass.smethod_3("guitar_custom_menu_cutoff_viewer")); - _class3180.method_0("scripts\\guitar\\custom_menu\\guitar_custom_menu_gfx_options.qb", - ZzQbScriptZipperClass.smethod_3("guitar_custom_menu_gfx_options")); - _class3180.method_0("scripts\\guitar\\custom_menu\\guitar_custom_menu_setlist_switcher.qb", - ZzQbScriptZipperClass.smethod_3("guitar_custom_menu_setlist_switcher")); - ZzGenericNode1 @class = _class3180.ZzGetNode1(_bool1 + _zzQbPak.zzCreateQbFileFrom("scripts\\guitar\\custom_menu\\guitar_custom_menu.qb", + zzEmbeddedResourceDB.unpackQbFile("guitar_custom_menu")); + _zzQbPak.zzCreateQbFileFrom("scripts\\guitar\\custom_menu\\guitar_custom_gem_scale.qb", + zzEmbeddedResourceDB.unpackQbFile("guitar_custom_gem_scale")); + _zzQbPak.zzCreateQbFileFrom("scripts\\guitar\\custom_menu\\guitar_custom_menu_credits.qb", + zzEmbeddedResourceDB.unpackQbFile("guitar_custom_menu_credits")); + _zzQbPak.zzCreateQbFileFrom("scripts\\guitar\\custom_menu\\guitar_custom_menu_cutoff_viewer.qb", + zzEmbeddedResourceDB.unpackQbFile("guitar_custom_menu_cutoff_viewer")); + _zzQbPak.zzCreateQbFileFrom("scripts\\guitar\\custom_menu\\guitar_custom_menu_gfx_options.qb", + zzEmbeddedResourceDB.unpackQbFile("guitar_custom_menu_gfx_options")); + _zzQbPak.zzCreateQbFileFrom("scripts\\guitar\\custom_menu\\guitar_custom_menu_setlist_switcher.qb", + zzEmbeddedResourceDB.unpackQbFile("guitar_custom_menu_setlist_switcher")); + ZzGenericNode1 activeQbFile = _zzQbPak.ZzGetNode1(_isGHA ? "scripts\\guitar\\menu\\menu_main.qb" : "scripts\\guitar\\guitar_menu.qb"); - ZzQbScriptZipperClass.smethod_1(@class.method_5(new ScriptRootNode("create_main_menu"))); - @class = _class3180.ZzGetNode1("scripts\\guitar\\guitar_progression.qb"); - ZzQbScriptZipperClass.smethod_1(@class.method_5(new ScriptRootNode("get_progression_globals"))); - @class = _class3180.ZzGetNode1("scripts\\guitar\\guitar_gems.qb"); - ZzQbScriptZipperClass.smethod_1(@class.method_5(new ScriptRootNode("load_venue"))); - ZzQbScriptZipperClass.smethod_1(@class.method_5(new ScriptRootNode("start_gem_scroller"))); - ZzQbScriptZipperClass.smethod_1(@class.method_5(new ScriptRootNode("kill_gem_scroller"))); - @class = _class3180.ZzGetNode1("scripts\\guitar\\guitar_events.qb"); - ZzQbScriptZipperClass.smethod_1(@class.method_5(new ScriptRootNode("guitarevent_songwon_spawned"))); - @class = _class3180.ZzGetNode1("scripts\\game\\net\\guitar_net.qb"); - ZzQbScriptZipperClass.smethod_1(@class.method_5(new ScriptRootNode("net_write_single_player_stats"))); - @class = _class3180.ZzGetNode1("scripts\\guitar\\guitar_globaltags.qb"); - ZzQbScriptZipperClass.smethod_1(@class.method_5(new ScriptRootNode("setup_globaltags"))); - ZzQbScriptZipperClass.smethod_1(@class.method_5(new ScriptRootNode("setup_songtags"))); - ZzQbScriptZipperClass.smethod_1(@class.method_5(new ScriptRootNode("push_bandtags"))); - @class = _class3180.ZzGetNode1("scripts\\guitar\\menu\\menu_credits.qb"); - ZzQbScriptZipperClass.smethod_1(@class.method_5(new ScriptRootNode("scrolling_list_add_item"))); - if (!_bool1) + zzEmbeddedResourceDB.unpackQbScriptTo(activeQbFile.zzFindNode(new ScriptRootNode("create_main_menu"))); + activeQbFile = _zzQbPak.ZzGetNode1("scripts\\guitar\\guitar_progression.qb"); + zzEmbeddedResourceDB.unpackQbScriptTo(activeQbFile.zzFindNode(new ScriptRootNode("get_progression_globals"))); + activeQbFile = _zzQbPak.ZzGetNode1("scripts\\guitar\\guitar_gems.qb"); + zzEmbeddedResourceDB.unpackQbScriptTo(activeQbFile.zzFindNode(new ScriptRootNode("load_venue"))); + zzEmbeddedResourceDB.unpackQbScriptTo(activeQbFile.zzFindNode(new ScriptRootNode("start_gem_scroller"))); + zzEmbeddedResourceDB.unpackQbScriptTo(activeQbFile.zzFindNode(new ScriptRootNode("kill_gem_scroller"))); + activeQbFile = _zzQbPak.ZzGetNode1("scripts\\guitar\\guitar_events.qb"); + zzEmbeddedResourceDB.unpackQbScriptTo(activeQbFile.zzFindNode(new ScriptRootNode("guitarevent_songwon_spawned"))); + activeQbFile = _zzQbPak.ZzGetNode1("scripts\\game\\net\\guitar_net.qb"); + zzEmbeddedResourceDB.unpackQbScriptTo(activeQbFile.zzFindNode(new ScriptRootNode("net_write_single_player_stats"))); + activeQbFile = _zzQbPak.ZzGetNode1("scripts\\guitar\\guitar_globaltags.qb"); + zzEmbeddedResourceDB.unpackQbScriptTo(activeQbFile.zzFindNode(new ScriptRootNode("setup_globaltags"))); + zzEmbeddedResourceDB.unpackQbScriptTo(activeQbFile.zzFindNode(new ScriptRootNode("setup_songtags"))); + zzEmbeddedResourceDB.unpackQbScriptTo(activeQbFile.zzFindNode(new ScriptRootNode("push_bandtags"))); + activeQbFile = _zzQbPak.ZzGetNode1("scripts\\guitar\\menu\\menu_credits.qb"); + zzEmbeddedResourceDB.unpackQbScriptTo(activeQbFile.zzFindNode(new ScriptRootNode("scrolling_list_add_item"))); + if (!_isGHA) { - ZzQbScriptZipperClass.smethod_1(@class.method_5(new ScriptRootNode("start_team_photos"))); + zzEmbeddedResourceDB.unpackQbScriptTo(activeQbFile.zzFindNode(new ScriptRootNode("start_team_photos"))); } - if (_bool1) + if (_isGHA) { - @class = _class3180.ZzGetNode1("scripts\\guitar\\custom_menu\\guitar_custom_menu_cutoff_viewer.qb"); - ZzQbScriptZipperClass.smethod_1( - @class.method_5(new ScriptRootNode("custom_menu_cutoff_viewer_create_paper"))); - ZzQbScriptZipperClass.smethod_1( - @class.method_5(new ScriptRootNode("custom_menu_cutoff_viewer_create_poster"))); + activeQbFile = _zzQbPak.ZzGetNode1("scripts\\guitar\\custom_menu\\guitar_custom_menu_cutoff_viewer.qb"); + zzEmbeddedResourceDB.unpackQbScriptTo(activeQbFile.zzFindNode( + new ScriptRootNode("custom_menu_cutoff_viewer_create_paper"))); + zzEmbeddedResourceDB.unpackQbScriptTo(activeQbFile.zzFindNode( + new ScriptRootNode("custom_menu_cutoff_viewer_create_poster"))); } - @class = _class3180.ZzGetNode1("scripts\\guitar\\menu\\main_menu_flow.qb"); - var class2 = new StructureHeaderNode(); - class2.method_3(new TagStructureNode("action", "select_custom_menu")); - class2.method_3(new TagStructureNode("flow_state", "custom_menu_fs")); - class2.method_3(new TagStructureNode(0, "transition_right")); - @class.method_5(new StructurePointerRootNode("main_menu_fs")) - .method_5(new ArrayPointerNode("actions")) - .method_8() - .method_3(class2); + activeQbFile = _zzQbPak.ZzGetNode1("scripts\\guitar\\menu\\main_menu_flow.qb"); + var customMenuFS = new StructureHeaderNode(); + customMenuFS.addChild(new StructItemQbKey("action", "select_custom_menu")); + customMenuFS.addChild(new StructItemQbKey("flow_state", "custom_menu_fs")); + customMenuFS.addChild(new StructItemQbKey(0, "transition_right")); + activeQbFile.zzFindNode(new StructurePointerRootNode("main_menu_fs")) + .zzFindNode(new ArrayPointerNode("actions")) + .GetFirstChild() + .addChild(customMenuFS); } } diff --git a/GHNamespaceA/GameSettingsChecker.cs b/GHNamespaceA/GameSettingsChecker.cs index 1c582d7..e9661ea 100644 --- a/GHNamespaceA/GameSettingsChecker.cs +++ b/GHNamespaceA/GameSettingsChecker.cs @@ -39,16 +39,16 @@ public GameSettingsChecker(bool alreadyLoaded) public GameSettingsChecker(ZzPakNode2 class3180) { - if (!class3180.method_6(HashPath)) + if (!class3180.zzQbFileExists(HashPath)) { return; } var @class = new ZzGenericNode1(HashPath, KeyGenerator.smethod_8(class3180.method_12(HashPath), "MaC39SubInfo1245")); - Version = new Version(@class.method_5(new UnicodeRootNode("version")).method_7()); - var array = @class.method_5(new ArrayPointerRootNode("date")).method_7().method_7(); + Version = new Version(@class.zzFindNode(new UnicodeRootNode("version")).method_7()); + var array = @class.zzFindNode(new ArrayPointerRootNode("date")).method_7().method_7(); Date = new DateTime((int) array[0], (int) array[1], (int) array[2]); - UnkBuffer = @class.method_5(new ArrayPointerRootNode("hash")).method_7().method_7(); + UnkBuffer = @class.zzFindNode(new ArrayPointerRootNode("hash")).method_7().method_7(); class3180.method_7(HashPath); using (var stream = class3180.method_17()) { @@ -73,22 +73,22 @@ public GameSettingsChecker(ZzPakNode2 class3180) public static void SignHash(ZzPakNode2 pakNode) { - if (pakNode.method_6(HashPath)) + if (pakNode.zzQbFileExists(HashPath)) { pakNode.method_7(HashPath); } var @class = new ZzGenericNode1(); - @class.method_3(new UnicodeRootNode("version", HashPath, + @class.addChild(new UnicodeRootNode("version", HashPath, Assembly.GetExecutingAssembly().GetName().Version.ToString())); using (var stream = pakNode.method_17()) { stream.Position = 0L; - @class.method_3(new ArrayPointerRootNode("hash", HashPath, + @class.addChild(new ArrayPointerRootNode("hash", HashPath, new IntegerArrayNode(KeyGenerator.smethod_21(KeyGenerator.HashStream(stream.Stream))))); } GC.Collect(); var now = DateTime.Now; - @class.method_3(new ArrayPointerRootNode("date", HashPath, new FloatArrayNode(new[] + @class.addChild(new ArrayPointerRootNode("date", HashPath, new FloatArrayNode(new[] { now.Year, now.Month, diff --git a/GHNamespaceA/QbDatabaseInitialModifier.cs b/GHNamespaceA/QbDatabaseInitialModifier.cs index 41ae031..f900662 100644 --- a/GHNamespaceA/QbDatabaseInitialModifier.cs +++ b/GHNamespaceA/QbDatabaseInitialModifier.cs @@ -23,7 +23,7 @@ public QbDatabaseInitialModifier(ZzPakNode2 class3181, bool bool2) _bool1 = bool2; } - public override void vmethod_0() + public override void CreateCustomMenu() { Console.WriteLine("-=- " + ToString() + " -=-"); ZzGenericNode1 @class = _pakNode.ZzGetNode1("scripts\\guitar\\guitar_globaltags.qb"); @@ -57,7 +57,7 @@ public override void vmethod_0() while (num < 5 && !_qbDatabaseAlreadyEdited) { Console.WriteLine(array[num]); - var class2 = @class.method_5(new UnicodeStructureNode("name" + (num + 1))); + var class2 = @class.zzFindNode(new UnicodeStructureNode("name" + (num + 1))); if (class2.method_8().Equals(_bool1 ? array3[num] : array2[num])) { class2.method_9(array[num]); @@ -73,9 +73,9 @@ public override void vmethod_0() { ZzGenericNode1 class3 = _pakNode.ZzGetNode1("scripts\\guitar\\guitar_memcard.qb"); Console.WriteLine("Changing Save File Size to 5MB."); - class3.method_5(new IntegerStructureNode("fixed_size")).method_9(5242880); + class3.zzFindNode(new IntegerStructureNode("fixed_size")).method_9(5242880); Console.WriteLine("Changing Save Folder Name."); - class3.method_5(new UnicodeRootNode("memcard_content_name")) + class3.zzFindNode(new UnicodeRootNode("memcard_content_name")) .method_8(string.Format("Progress{0}", (new[] { "A", @@ -98,24 +98,24 @@ public override void vmethod_0() { ZzGenericNode1 class4 = _pakNode.ZzGetNode1("scripts\\guitar\\menu\\menu_setlist.qb"); Console.WriteLine("Changing Setlist Scroller."); - ZzQbScriptZipperClass.smethod_1(class4.method_5(new ScriptRootNode("setlist_scroll"))); + zzEmbeddedResourceDB.unpackQbScriptTo(class4.zzFindNode(new ScriptRootNode("setlist_scroll"))); Console.WriteLine("Changing Tier Name Display."); - ZzQbScriptZipperClass.smethod_1(class4.method_5(new ScriptRootNode("create_sl_assets"))); + zzEmbeddedResourceDB.unpackQbScriptTo(class4.zzFindNode(new ScriptRootNode("create_sl_assets"))); } if (!_qbDatabaseAlreadyEdited) { ZzGenericNode1 node = _pakNode.ZzGetNode1("scripts\\guitar\\guitar.qb"); - node.method_5(new StructurePointerNode("load_z_soundcheck")) - .method_5(new UnicodeStructureNode("title")) + node.zzFindNode(new StructurePointerNode("load_z_soundcheck")) + .zzFindNode(new UnicodeStructureNode("title")) .method_9("Sound Check"); - node.method_5(new StructurePointerNode("load_z_credits")) - .method_5(new UnicodeStructureNode("title")) + node.zzFindNode(new StructurePointerNode("load_z_credits")) + .zzFindNode(new UnicodeStructureNode("title")) .method_9("Guitar Hero Tower"); - node.method_5(new StructurePointerNode("viewer")) - .method_5(new UnicodeStructureNode("title")) + node.zzFindNode(new StructurePointerNode("viewer")) + .zzFindNode(new UnicodeStructureNode("title")) .method_9("Black Background"); - node.method_5(new StructurePointerNode("load_z_viewer")) - .method_5(new UnicodeStructureNode("title")) + node.zzFindNode(new StructurePointerNode("load_z_viewer")) + .zzFindNode(new UnicodeStructureNode("title")) .method_9("Black Background"); } } diff --git a/GHNamespaceA/SongData.cs b/GHNamespaceA/SongData.cs index ded782d..b576188 100644 --- a/GHNamespaceA/SongData.cs +++ b/GHNamespaceA/SongData.cs @@ -1466,7 +1466,7 @@ private void ChartFileBtn_Click(object sender, EventArgs e) var text2 = KeyGenerator.GetFileName(fileName).Replace("_song.pak.xen", ""); using (var @class = new ZzPakNode2(fileName, false)) { - if (!@class.method_6("songs\\" + text2 + ".mid.qb")) + if (!@class.zzQbFileExists("songs\\" + text2 + ".mid.qb")) { throw new Exception("MID.QB song file not found."); } diff --git a/GHNamespaceA/UpdateSetlistSwitcher.cs b/GHNamespaceA/UpdateSetlistSwitcher.cs index 4c2e0ba..fa446a8 100644 --- a/GHNamespaceA/UpdateSetlistSwitcher.cs +++ b/GHNamespaceA/UpdateSetlistSwitcher.cs @@ -20,12 +20,12 @@ public UpdateSetlistSwitcher(ZzPakNode2 class3181, Gh3Songlist gh3Songlist1, boo _bool0 = bool1; } - public override void vmethod_0() + public override void CreateCustomMenu() { ZzGenericNode1 @class = _class3180.ZzGetNode1( "scripts\\guitar\\custom_menu\\guitar_custom_menu_setlist_switcher.qb"); @class - .method_5(new ArrayPointerRootNode("custom_menu_setlist_switcher_progressions_" + + .zzFindNode(new ArrayPointerRootNode("custom_menu_setlist_switcher_progressions_" + (_bool0 ? "gha" : "gh3"))) .method_8(_gh3Songlist0.method_7()); } diff --git a/GHNamespaceA/zzQbScriptZipperClass.cs b/GHNamespaceA/zzEmbeddedResourceDB.cs similarity index 86% rename from GHNamespaceA/zzQbScriptZipperClass.cs rename to GHNamespaceA/zzEmbeddedResourceDB.cs index 60a3631..d7811f9 100644 --- a/GHNamespaceA/zzQbScriptZipperClass.cs +++ b/GHNamespaceA/zzEmbeddedResourceDB.cs @@ -6,7 +6,7 @@ namespace GHNamespaceA { - public static class ZzQbScriptZipperClass + public static class zzEmbeddedResourceDB { public static string GameName = "GH3"; @@ -19,7 +19,7 @@ public static byte[] smethod_0(string string1) "MinimizedScript1f2g4h"), string1 + ".qbs"); } - public static void smethod_1(ScriptRootNode class2740) + public static void unpackQbScriptTo(ScriptRootNode class2740) { class2740.method_7().method_7(smethod_0(QbSongClass1.GetDictString(class2740.Int0))); } @@ -32,7 +32,7 @@ public static byte[] smethod_2(string string1) "MinimizedQBFile4f4g9h"), string1 + ".qb"); } - public static ZzGenericNode1 smethod_3(string string1) + public static ZzGenericNode1 unpackQbFile(string string1) { return new ZzGenericNode1(string1, smethod_2(string1)); } diff --git a/GHNamespaceA/zzFxBoost.cs b/GHNamespaceA/zzFxBoost.cs index 81f7ef2..ca17660 100644 --- a/GHNamespaceA/zzFxBoost.cs +++ b/GHNamespaceA/zzFxBoost.cs @@ -18,82 +18,82 @@ public ZzFxBoost(ZzPakNode2 class3181) { _class3180 = class3181; var @class = ((StructureHeaderNode) _class3180.ZzGetNode1("scripts\\guitar\\guitar_events.qb") - .method_5(new TagStructureNode("event", "star_power_on")) - .Parent).method_5(new TagStructureNode("scr")); + .zzFindNode(new StructItemQbKey("event", "star_power_on")) + .Parent).zzFindNode(new StructItemQbKey("scr")); _bool0 = (@class.method_8() == "guitarevent_starpoweron"); } - public override void vmethod_0() + public override void CreateCustomMenu() { ZzGenericNode1 @class = _class3180.ZzGetNode1("scripts\\guitar\\guitar_events.qb"); - ((StructureHeaderNode) @class.method_5(new TagStructureNode("event", "star_power_on")).Parent) - .method_5(new TagStructureNode("scr")) + ((StructureHeaderNode) @class.zzFindNode(new StructItemQbKey("event", "star_power_on")).Parent) + .zzFindNode(new StructItemQbKey("scr")) .method_9(_bool0 ? "guitarevent_starpoweroff" : "guitarevent_starpoweron"); if (!_bool0) { - @class.method_5(new ScriptRootNode("hit_note_fx")).Int0 = + @class.zzFindNode(new ScriptRootNode("hit_note_fx")).Int0 = QbSongClass1.AddKeyToDictionary("hit_note_fx_empty"); - @class.method_5(new ScriptRootNode("guitarevent_starsequencebonus")).Int0 = + @class.zzFindNode(new ScriptRootNode("guitarevent_starsequencebonus")).Int0 = QbSongClass1.AddKeyToDictionary("guitarevent_starsequencebonus_empty"); - @class.method_5(new ScriptRootNode("guitarevent_multiplier4xon_spawned")).Int0 = + @class.zzFindNode(new ScriptRootNode("guitarevent_multiplier4xon_spawned")).Int0 = QbSongClass1.AddKeyToDictionary("guitarevent_multiplier4xon_spawned_empty"); - @class.method_5(new ScriptRootNode("first_gem_fx")).Int0 = + @class.zzFindNode(new ScriptRootNode("first_gem_fx")).Int0 = QbSongClass1.AddKeyToDictionary("first_gem_fx_empty"); - @class.method_5(new ScriptRootNode("hit_note_fx_original")).Int0 = + @class.zzFindNode(new ScriptRootNode("hit_note_fx_original")).Int0 = QbSongClass1.AddKeyToDictionary("hit_note_fx"); - @class.method_5(new ScriptRootNode("guitarevent_starsequencebonus_original")).Int0 = + @class.zzFindNode(new ScriptRootNode("guitarevent_starsequencebonus_original")).Int0 = QbSongClass1.AddKeyToDictionary("guitarevent_starsequencebonus"); - @class.method_5(new ScriptRootNode("guitarevent_multiplier4xon_spawned_original")).Int0 = + @class.zzFindNode(new ScriptRootNode("guitarevent_multiplier4xon_spawned_original")).Int0 = QbSongClass1.AddKeyToDictionary("guitarevent_multiplier4xon_spawned"); - @class.method_5(new ScriptRootNode("first_gem_fx_original")).Int0 = + @class.zzFindNode(new ScriptRootNode("first_gem_fx_original")).Int0 = QbSongClass1.AddKeyToDictionary("first_gem_fx"); return; } - @class.method_5(new ScriptRootNode("hit_note_fx")).Int0 = + @class.zzFindNode(new ScriptRootNode("hit_note_fx")).Int0 = QbSongClass1.AddKeyToDictionary("hit_note_fx_original"); - @class.method_5(new ScriptRootNode("guitarevent_starsequencebonus")).Int0 = + @class.zzFindNode(new ScriptRootNode("guitarevent_starsequencebonus")).Int0 = QbSongClass1.AddKeyToDictionary("guitarevent_starsequencebonus_original"); - @class.method_5(new ScriptRootNode("guitarevent_multiplier4xon_spawned")).Int0 = + @class.zzFindNode(new ScriptRootNode("guitarevent_multiplier4xon_spawned")).Int0 = QbSongClass1.AddKeyToDictionary("guitarevent_multiplier4xon_spawned_original"); - @class.method_5(new ScriptRootNode("first_gem_fx")).Int0 = + @class.zzFindNode(new ScriptRootNode("first_gem_fx")).Int0 = QbSongClass1.AddKeyToDictionary("first_gem_fx_original"); - var class2 = @class.method_5(new ScriptRootNode("hit_note_fx_empty")); + var class2 = @class.zzFindNode(new ScriptRootNode("hit_note_fx_empty")); if (class2 != null) { class2.Int0 = QbSongClass1.AddKeyToDictionary("hit_note_fx"); } else { - @class.method_3(new ScriptRootNode("hit_note_fx", "scripts\\guitar\\guitar_events.qb", + @class.addChild(new ScriptRootNode("hit_note_fx", "scripts\\guitar\\guitar_events.qb", new QbScriptNode())); } - class2 = @class.method_5(new ScriptRootNode("guitarevent_starsequencebonus_empty")); + class2 = @class.zzFindNode(new ScriptRootNode("guitarevent_starsequencebonus_empty")); if (class2 != null) { class2.Int0 = QbSongClass1.AddKeyToDictionary("guitarevent_starsequencebonus"); } else { - @class.method_3(new ScriptRootNode("guitarevent_starsequencebonus", "scripts\\guitar\\guitar_events.qb", + @class.addChild(new ScriptRootNode("guitarevent_starsequencebonus", "scripts\\guitar\\guitar_events.qb", new QbScriptNode())); } - class2 = @class.method_5(new ScriptRootNode("guitarevent_multiplier4xon_spawned_empty")); + class2 = @class.zzFindNode(new ScriptRootNode("guitarevent_multiplier4xon_spawned_empty")); if (class2 != null) { class2.Int0 = QbSongClass1.AddKeyToDictionary("guitarevent_multiplier4xon_spawned"); } else { - @class.method_3(new ScriptRootNode("guitarevent_multiplier4xon_spawned", + @class.addChild(new ScriptRootNode("guitarevent_multiplier4xon_spawned", "scripts\\guitar\\guitar_events.qb", new QbScriptNode())); } - class2 = @class.method_5(new ScriptRootNode("first_gem_fx_empty")); + class2 = @class.zzFindNode(new ScriptRootNode("first_gem_fx_empty")); if (class2 != null) { class2.Int0 = QbSongClass1.AddKeyToDictionary("first_gem_fx"); return; } - @class.method_3(new ScriptRootNode("first_gem_fx", "scripts\\guitar\\guitar_events.qb", + @class.addChild(new ScriptRootNode("first_gem_fx", "scripts\\guitar\\guitar_events.qb", new QbScriptNode())); } diff --git a/GHNamespaceA/zzSetListParser.cs b/GHNamespaceA/zzSetListParser.cs index 71a6e6a..ebab4e9 100644 --- a/GHNamespaceA/zzSetListParser.cs +++ b/GHNamespaceA/zzSetListParser.cs @@ -22,59 +22,59 @@ public ZzSetListParser(ZzPakNode2 class3181, Gh3Songlist gh3Songlist1, bool bool _bool0 = bool1; } - public override void vmethod_0() + public override void CreateCustomMenu() { var text = "scripts\\guitar\\guitar_progression.qb"; ZzGenericNode1 @class = _class3180.ZzGetNode1(text); - _gh3Songlist0.method_4(text, @class.method_5(new StructurePointerRootNode("gh3_career_songs"))); - _gh3Songlist0.method_4(text, @class.method_5(new StructurePointerRootNode("gh3_general_songs"))); + _gh3Songlist0.method_4(text, @class.zzFindNode(new StructurePointerRootNode("gh3_career_songs"))); + _gh3Songlist0.method_4(text, @class.zzFindNode(new StructurePointerRootNode("gh3_general_songs"))); if (!_bool0) { - _gh3Songlist0.method_4(text, @class.method_5(new StructurePointerRootNode("gh3_generalp2_songs"))); - _gh3Songlist0.method_4(text, @class.method_5(new StructurePointerRootNode("gh3_generalp2_songs_coop"))); + _gh3Songlist0.method_4(text, @class.zzFindNode(new StructurePointerRootNode("gh3_generalp2_songs"))); + _gh3Songlist0.method_4(text, @class.zzFindNode(new StructurePointerRootNode("gh3_generalp2_songs_coop"))); } - _gh3Songlist0.method_5(text, @class.method_5(new StructurePointerRootNode("p1_career_progression"))); + _gh3Songlist0.method_5(text, @class.zzFindNode(new StructurePointerRootNode("p1_career_progression"))); if (!_bool0) { - _gh3Songlist0.method_5(text, @class.method_5(new StructurePointerRootNode("p2_career_progression"))); + _gh3Songlist0.method_5(text, @class.zzFindNode(new StructurePointerRootNode("p2_career_progression"))); } - _gh3Songlist0.method_5(text, @class.method_5(new StructurePointerRootNode("bonus_progression"))); - _gh3Songlist0.method_5(text, @class.method_5(new StructurePointerRootNode("download_progression"))); - _gh3Songlist0.method_5(text, @class.method_5(new StructurePointerRootNode("general_progression"))); + _gh3Songlist0.method_5(text, @class.zzFindNode(new StructurePointerRootNode("bonus_progression"))); + _gh3Songlist0.method_5(text, @class.zzFindNode(new StructurePointerRootNode("download_progression"))); + _gh3Songlist0.method_5(text, @class.zzFindNode(new StructurePointerRootNode("general_progression"))); if (!_bool0) { - _gh3Songlist0.method_5(text, @class.method_5(new StructurePointerRootNode("generalp2_progression"))); - _gh3Songlist0.method_5(text, @class.method_5(new StructurePointerRootNode("p2_coop_progression"))); + _gh3Songlist0.method_5(text, @class.zzFindNode(new StructurePointerRootNode("generalp2_progression"))); + _gh3Songlist0.method_5(text, @class.zzFindNode(new StructurePointerRootNode("p2_coop_progression"))); } @class = _class3180.ZzGetNode1(text = "scripts\\guitar\\guitar_download.qb"); - _gh3Songlist0.method_4(text, @class.method_5(new StructurePointerRootNode("gh3_download_songs"))); + _gh3Songlist0.method_4(text, @class.zzFindNode(new StructurePointerRootNode("gh3_download_songs"))); if (!_bool0) { @class = _class3180.ZzGetNode1(text = "scripts\\guitar\\guitar_coop.qb"); - _gh3Songlist0.method_4(text, @class.method_5(new StructurePointerRootNode("gh3_coopcareer_songs"))); + _gh3Songlist0.method_4(text, @class.zzFindNode(new StructurePointerRootNode("gh3_coopcareer_songs"))); } @class = _class3180.ZzGetNode1(text = "scripts\\guitar\\store_data.qb"); - _gh3Songlist0.method_4(text, @class.method_5(new StructurePointerRootNode("gh3_bonus_songs"))); - if (_class3180.method_6(text = "scripts\\guitar\\custom_menu\\guitar_custom_progression.qb")) + _gh3Songlist0.method_4(text, @class.zzFindNode(new StructurePointerRootNode("gh3_bonus_songs"))); + if (_class3180.zzQbFileExists(text = "scripts\\guitar\\custom_menu\\guitar_custom_progression.qb")) { @class = _class3180.ZzGetNode1(text); - var num = @class.method_5(new IntegerRootNode("custom_setlist_bitmask")).method_7(); + var num = @class.zzFindNode(new IntegerRootNode("custom_setlist_bitmask")).method_7(); for (var i = 0; i < 32; i++) { if (num >> i != 0) { _gh3Songlist0.method_4(text, - @class.method_5(new StructurePointerRootNode("gh3_custom" + (i + 1) + "_songs"))) + @class.zzFindNode(new StructurePointerRootNode("gh3_custom" + (i + 1) + "_songs"))) .CustomBit = 1 << i; _gh3Songlist0.method_5(text, - @class.method_5(new StructurePointerRootNode("custom" + (i + 1) + "_progression"))); + @class.zzFindNode(new StructurePointerRootNode("custom" + (i + 1) + "_progression"))); } } _gh3Songlist0.CustomBitMask = num; } @class = _class3180.ZzGetNode1("scripts\\guitar\\custom_menu\\guitar_custom_menu_setlist_switcher.qb"); _gh3Songlist0.method_6((StructureArrayNode) @class - .method_5(new ArrayPointerRootNode("custom_menu_setlist_switcher_progressions_" + + .zzFindNode(new ArrayPointerRootNode("custom_menu_setlist_switcher_progressions_" + (_bool0 ? "gha" : "gh3"))) .method_7()); } diff --git a/GHNamespaceA/zzSetListUpdater.cs b/GHNamespaceA/zzSetListUpdater.cs index 5b3b90e..3c6ebf1 100644 --- a/GHNamespaceA/zzSetListUpdater.cs +++ b/GHNamespaceA/zzSetListUpdater.cs @@ -23,10 +23,10 @@ public ZzSetListUpdater(int int1, ZzPakNode2 class3181, Gh3Songlist gh3Songlist1 _gh3Songlist0 = gh3Songlist1; } - public override void vmethod_0() + public override void CreateCustomMenu() { ZzGenericNode1 @class = _class3180.ZzGetNode1(_gh3Songlist0.Gh3SetlistList[_int0].method_2()); - @class.method_5(new StructurePointerRootNode(_int0)) + @class.zzFindNode(new StructurePointerRootNode(_int0)) .method_8(_gh3Songlist0.Gh3SetlistList[_int0].method_6()); } diff --git a/GHNamespaceB/AbstractTreeNode1.cs b/GHNamespaceB/AbstractTreeNode1.cs index d01206b..166a16a 100644 --- a/GHNamespaceB/AbstractTreeNode1.cs +++ b/GHNamespaceB/AbstractTreeNode1.cs @@ -46,7 +46,7 @@ public AbstractBaseTreeNode1 method_2(int int0) return (AbstractBaseTreeNode1) Nodes[int0]; } - public int method_3(AbstractBaseTreeNode1 class2580) + public int addChild(AbstractBaseTreeNode1 class2580) { return Nodes.Add(class2580); } @@ -66,7 +66,7 @@ public void method_4(Stream26 stream260) public abstract void vmethod_14(Stream26 stream260); - public T method_5(T gparam0) where T : AbstractTreeNode1 + public T zzFindNode(T gparam0) where T : AbstractTreeNode1 { if (CompareTo(gparam0) == 0) { @@ -82,7 +82,7 @@ public T method_5(T gparam0) where T : AbstractTreeNode1 { var @class = (AbstractTreeNode1) enumerator.Current; T t; - if ((t = @class.method_5(gparam0)) != null) + if ((t = @class.zzFindNode(gparam0)) != null) { result = t; return result; diff --git a/GHNamespaceB/TagStructureNode.cs b/GHNamespaceB/StructItemQbKey.cs similarity index 80% rename from GHNamespaceB/TagStructureNode.cs rename to GHNamespaceB/StructItemQbKey.cs index 6a287d2..0149db5 100644 --- a/GHNamespaceB/TagStructureNode.cs +++ b/GHNamespaceB/StructItemQbKey.cs @@ -3,38 +3,38 @@ namespace GHNamespaceB { - public class TagStructureNode : ZzUnkNode295 + public class StructItemQbKey : ZzUnkNode295 { - public TagStructureNode() + public StructItemQbKey() { vmethod_0(); } - public TagStructureNode(string string0) : this(QbSongClass1.AddKeyToDictionary(string0)) + public StructItemQbKey(string string0) : this(QbSongClass1.AddKeyToDictionary(string0)) { } - public TagStructureNode(int int1) + public StructItemQbKey(int int1) { Int0 = int1; vmethod_0(); } - public TagStructureNode(int int1, string string0) + public StructItemQbKey(int int1, string string0) { Int0 = int1; Nodes.Add(new TagValueNode(string0)); vmethod_0(); } - public TagStructureNode(string string0, string string1) + public StructItemQbKey(string string0, string string1) { Int0 = QbSongClass1.AddKeyToDictionary(string0); Nodes.Add(new TagValueNode(string1)); vmethod_0(); } - public TagStructureNode(string string0, int int1) + public StructItemQbKey(string string0, int int1) { Int0 = QbSongClass1.AddKeyToDictionary(string0); Nodes.Add(new TagValueNode(int1)); diff --git a/GHNamespaceB/zzUnkNode295.cs b/GHNamespaceB/zzUnkNode295.cs index d2cb352..d4fd8e6 100644 --- a/GHNamespaceB/zzUnkNode295.cs +++ b/GHNamespaceB/zzUnkNode295.cs @@ -20,7 +20,7 @@ public override void vmethod_13(Stream26 stream260) { Nodes.Add(new IntegerValueNode(stream260.ReadInt())); } - else if (this is TagStructureNode || this is FileTagStructureNode) + else if (this is StructItemQbKey || this is FileTagStructureNode) { Nodes.Add(new TagValueNode(stream260.ReadInt())); } diff --git a/GHNamespaceC/ArrayPointerNode.cs b/GHNamespaceC/ArrayPointerNode.cs index 5cbc28b..bb8f055 100644 --- a/GHNamespaceC/ArrayPointerNode.cs +++ b/GHNamespaceC/ArrayPointerNode.cs @@ -37,7 +37,7 @@ public override int vmethod_1() return 28; } - public AbsTreeNode11 method_8() + public AbsTreeNode11 GetFirstChild() { if (Nodes.Count != 0) { diff --git a/GHNamespaceC/zzPakNode1.cs b/GHNamespaceC/zzPakNode1.cs index 2f31322..13502e3 100644 --- a/GHNamespaceC/zzPakNode1.cs +++ b/GHNamespaceC/zzPakNode1.cs @@ -32,7 +32,7 @@ public ZzPakNode1(string string0) : base(string0) SelectedImageIndex = 38; } - public void method_0(string string0, ZzGenericNode1 class3080) + public void zzCreateQbFileFrom(string string0, ZzGenericNode1 class3080) { method_1(string0, new Class309(string0, class3080)); } diff --git a/GHNamespaceC/zzPakNode2.cs b/GHNamespaceC/zzPakNode2.cs index f9683ae..843eefc 100644 --- a/GHNamespaceC/zzPakNode2.cs +++ b/GHNamespaceC/zzPakNode2.cs @@ -243,7 +243,7 @@ public override string vmethod_0() return ""; } - public bool method_6(string string2) + public bool zzQbFileExists(string string2) { return method_10(string2) != null; } @@ -428,7 +428,7 @@ public void method_18(Stream26 stream261, Stream26 stream262) if (current2 is Class309 && (current2 as Class309).vmethod_8()) { var string_ = current2.imethod_9().Replace(".qb", ".qs"); - if (!Class3180.method_6(string_)) + if (!Class3180.zzQbFileExists(string_)) { if (!current2.imethod_18()) { diff --git a/GHNamespaceE/Class309.cs b/GHNamespaceE/Class309.cs index 1b4003d..945b9f8 100644 --- a/GHNamespaceE/Class309.cs +++ b/GHNamespaceE/Class309.cs @@ -182,7 +182,7 @@ public void imethod_17(byte[] byte1) var string_ = imethod_9().Contains(".qb") ? imethod_9().Replace(".qb", ".qs") : (imethod_9() + ".qs"); - if ((treeNode as ZzPakNode2).Class3180.method_6(string_)) + if ((treeNode as ZzPakNode2).Class3180.zzQbFileExists(string_)) { @class = new ZzGenericNode1("TempFile", stream26, (treeNode as ZzPakNode2).Class3180.method_9(string_).Dictionary0); diff --git a/GHNamespaceE/zzGenericNode1.cs b/GHNamespaceE/zzGenericNode1.cs index 3ed17e2..b72cde7 100644 --- a/GHNamespaceE/zzGenericNode1.cs +++ b/GHNamespaceE/zzGenericNode1.cs @@ -259,7 +259,7 @@ public override AbstractTreeNode1 vmethod_12(int int0) } if (num == 27) { - return new TagStructureNode(); + return new StructItemQbKey(); } if (num == 53) { @@ -309,7 +309,7 @@ public override AbstractTreeNode1 vmethod_12(int int0) } if (num2 == 13) { - return new TagStructureNode(); + return new StructItemQbKey(); } throw ex; } diff --git a/GHNamespaceF/StructureHeaderNode.cs b/GHNamespaceF/StructureHeaderNode.cs index aff9c8b..141c4b9 100644 --- a/GHNamespaceF/StructureHeaderNode.cs +++ b/GHNamespaceF/StructureHeaderNode.cs @@ -108,7 +108,7 @@ public AbstractTreeNode1 method_11(int int0) } if (num2 == 13) { - return new TagStructureNode(); + return new StructItemQbKey(); } if (num2 == 26) { @@ -156,7 +156,7 @@ public AbstractTreeNode1 method_11(int int0) } if (num == 27) { - return new TagStructureNode(); + return new StructItemQbKey(); } if (num == 53) { @@ -206,7 +206,7 @@ public AbstractTreeNode1 method_11(int int0) } if (num2 == 13) { - return new TagStructureNode(); + return new StructItemQbKey(); } throw ex; } diff --git a/GHNamespaceN/QBCParser.cs b/GHNamespaceN/QBCParser.cs index e29f720..3ed2c72 100644 --- a/GHNamespaceN/QBCParser.cs +++ b/GHNamespaceN/QBCParser.cs @@ -468,7 +468,7 @@ public QbcParser(string string0, ZzGenericNode1 class3080, ZzGenericNode1 class3 var text3 = (text.ToLower() + ((a == "Double") ? "coop" : "") + "_" + text2.ToLower()) .Replace("guitar_", ""); - @class = class3080.method_5(new ArrayPointerRootNode(string0 + "_song_" + text3)); + @class = class3080.zzFindNode(new ArrayPointerRootNode(string0 + "_song_" + text3)); if (@class != null && @class.method_7() is IntegerArrayNode) { var class2 = new Track(); @@ -479,7 +479,7 @@ public QbcParser(string string0, ZzGenericNode1 class3080, ZzGenericNode1 class3 } NoteList.Add(text3, class2); } - @class = class3080.method_5(new ArrayPointerRootNode(string0 + "_" + text3 + "_star")); + @class = class3080.zzFindNode(new ArrayPointerRootNode(string0 + "_" + text3 + "_star")); if (@class != null && @class.method_7() is ListArrayNode) { var class3 = new Track(); @@ -493,7 +493,7 @@ public QbcParser(string string0, ZzGenericNode1 class3080, ZzGenericNode1 class3 } SpList.Add(text3, class3); } - @class = class3080.method_5( + @class = class3080.zzFindNode( new ArrayPointerRootNode(string0 + "_" + text3 + "_starbattlemode")); if (@class != null && @class.method_7() is ListArrayNode) { @@ -511,7 +511,7 @@ public QbcParser(string string0, ZzGenericNode1 class3080, ZzGenericNode1 class3 } } } - @class = class3080.method_5(new ArrayPointerRootNode(string0 + "_faceoffp1")); + @class = class3080.zzFindNode(new ArrayPointerRootNode(string0 + "_faceoffp1")); if (@class != null && @class.method_7() is ListArrayNode) { foreach (var current3 in @class.method_7().method_8()) @@ -519,7 +519,7 @@ public QbcParser(string string0, ZzGenericNode1 class3080, ZzGenericNode1 class3 Class2282.Add(current3[0], current3[1]); } } - @class = class3080.method_5(new ArrayPointerRootNode(string0 + "_faceoffp2")); + @class = class3080.zzFindNode(new ArrayPointerRootNode(string0 + "_faceoffp2")); if (@class != null && @class.method_7() is ListArrayNode) { foreach (var current4 in @class.method_7().method_8()) @@ -527,7 +527,7 @@ public QbcParser(string string0, ZzGenericNode1 class3080, ZzGenericNode1 class3 Class2283.Add(current4[0], current4[1]); } } - @class = class3080.method_5(new ArrayPointerRootNode(string0 + "_bossbattlep1")); + @class = class3080.zzFindNode(new ArrayPointerRootNode(string0 + "_bossbattlep1")); if (@class != null && @class.method_7() is ListArrayNode) { foreach (var current5 in @class.method_7().method_8()) @@ -535,7 +535,7 @@ public QbcParser(string string0, ZzGenericNode1 class3080, ZzGenericNode1 class3 BpmList.Add(current5[0], current5[1]); } } - @class = class3080.method_5(new ArrayPointerRootNode(string0 + "_bossbattlep2")); + @class = class3080.zzFindNode(new ArrayPointerRootNode(string0 + "_bossbattlep2")); if (@class != null && @class.method_7() is ListArrayNode) { foreach (var current6 in @class.method_7().method_8()) @@ -543,7 +543,7 @@ public QbcParser(string string0, ZzGenericNode1 class3080, ZzGenericNode1 class3 Class2285.Add(current6[0], current6[1]); } } - @class = class3080.method_5(new ArrayPointerRootNode(string0 + "_timesig")); + @class = class3080.zzFindNode(new ArrayPointerRootNode(string0 + "_timesig")); if (@class != null && @class.method_7() is ListArrayNode) { foreach (var current7 in @class.method_7().method_8()) @@ -555,7 +555,7 @@ public QbcParser(string string0, ZzGenericNode1 class3080, ZzGenericNode1 class3 }); } } - @class = class3080.method_5(new ArrayPointerRootNode(string0 + "_fretbars")); + @class = class3080.zzFindNode(new ArrayPointerRootNode(string0 + "_fretbars")); if (@class != null && @class.method_7() is IntegerArrayNode) { FretbarList = new Fretbar(@class.method_7().method_8()); @@ -563,7 +563,7 @@ public QbcParser(string string0, ZzGenericNode1 class3080, ZzGenericNode1 class3 try { var dictionary = new Dictionary(); - @class = class3080.method_5(new ArrayPointerRootNode(string0 + "_markers")); + @class = class3080.zzFindNode(new ArrayPointerRootNode(string0 + "_markers")); if (class3081 != null && @class != null && @class.method_7() is StructureArrayNode) { foreach (UnicodeRootNode class5 in class3081.Nodes) @@ -599,7 +599,7 @@ public QbcParser(string string0, ZzGenericNode1 class3080, ZzGenericNode1 class3 { if (class3082 != null) { - Gh3Song0 = new Gh3Song(class3082.method_5(new StructurePointerNode(string0))); + Gh3Song0 = new Gh3Song(class3082.zzFindNode(new StructurePointerNode(string0))); } return; } @@ -1001,7 +1001,7 @@ private void method_5(int int2, string string0, ZzGenericNode1 class3080, Track< list.Add(class2287[current].SustainLength); list.Add(class2287[current].method_0()); } - class3080.method_3(new ArrayPointerRootNode(string0, int2, new IntegerArrayNode(list))); + class3080.addChild(new ArrayPointerRootNode(string0, int2, new IntegerArrayNode(list))); } private void method_6(int int2, string string0, ZzGenericNode1 class3080, Track class2287) @@ -1014,14 +1014,14 @@ private void method_6(int int2, string string0, ZzGenericNode1 class3080, Track< var @class = new ListArrayNode(); foreach (var current in class2287.Keys) { - @class.method_3(new IntegerArrayNode(new[] + @class.addChild(new IntegerArrayNode(new[] { current, class2287[current][0], class2287[current][1] })); } - class3080.method_3(new ArrayPointerRootNode(string0, int2, @class)); + class3080.addChild(new ArrayPointerRootNode(string0, int2, @class)); } private void method_7(int int2, string string0, ZzGenericNode1 class3080, Track class2287) @@ -1034,13 +1034,13 @@ private void method_7(int int2, string string0, ZzGenericNode1 class3080, Track< var @class = new ListArrayNode(); foreach (var current in class2287.Keys) { - @class.method_3(new IntegerArrayNode(new[] + @class.addChild(new IntegerArrayNode(new[] { current, class2287[current] })); } - class3080.method_3(new ArrayPointerRootNode(string0, int2, @class)); + class3080.addChild(new ArrayPointerRootNode(string0, int2, @class)); } private void method_8(int int2, string string0, ZzGenericNode1 class3080) @@ -1048,19 +1048,19 @@ private void method_8(int int2, string string0, ZzGenericNode1 class3080) var @class = new ListArrayNode(); foreach (var current in TsList.Keys) { - @class.method_3(new IntegerArrayNode(new[] + @class.addChild(new IntegerArrayNode(new[] { current, TsList[current][0], TsList[current][1] })); } - class3080.method_3(new ArrayPointerRootNode(string0, int2, @class)); + class3080.addChild(new ArrayPointerRootNode(string0, int2, @class)); } private void method_9(int int2, string string0, ZzGenericNode1 class3080) { - class3080.method_3(new ArrayPointerRootNode(string0, int2, new IntegerArrayNode(FretbarList))); + class3080.addChild(new ArrayPointerRootNode(string0, int2, new IntegerArrayNode(FretbarList))); } private void method_10(int int2, string string0, ZzGenericNode1 class3080) @@ -1073,18 +1073,18 @@ private void method_10(int int2, string string0, ZzGenericNode1 class3080) var @class = new StructureArrayNode(); foreach (var current in Class2281.Keys) { - @class.method_3(new StructureHeaderNode(new ZzUnkNode294[] + @class.addChild(new StructureHeaderNode(new ZzUnkNode294[] { new IntegerStructureNode("time", current), new UnicodeStructureNode("marker", Class2281[current]) })); } - class3080.method_3(new ArrayPointerRootNode(string0, int2, @class)); + class3080.addChild(new ArrayPointerRootNode(string0, int2, @class)); } private void method_11(int int2, string string0, ZzGenericNode1 class3080) { - class3080.method_3(new ArrayPointerRootNode(string0, int2, _class2870)); + class3080.addChild(new ArrayPointerRootNode(string0, int2, _class2870)); } } } \ No newline at end of file diff --git a/GHTCP-cleaned.csproj b/GHTCP-cleaned.csproj index 2dfba0d..38b9d41 100644 --- a/GHTCP-cleaned.csproj +++ b/GHTCP-cleaned.csproj @@ -713,7 +713,7 @@ - + @@ -737,7 +737,7 @@ - + diff --git a/GuitarHero.Setlist/GH3Setlist.cs b/GuitarHero.Setlist/GH3Setlist.cs index faaae99..0aab107 100644 --- a/GuitarHero.Setlist/GH3Setlist.cs +++ b/GuitarHero.Setlist/GH3Setlist.cs @@ -59,21 +59,21 @@ public bool method_4() public void method_5(StructureHeaderNode class2860, Gh3Songlist gh3Songlist0) { AsciiStructureNode @class; - Prefix = (((@class = class2860.method_5(new AsciiStructureNode("prefix"))) != null) + Prefix = (((@class = class2860.zzFindNode(new AsciiStructureNode("prefix"))) != null) ? @class.method_8() : "general"); - InitialMovie = (((@class = class2860.method_5(new AsciiStructureNode("initial_movie"))) != null) + InitialMovie = (((@class = class2860.zzFindNode(new AsciiStructureNode("initial_movie"))) != null) ? @class.method_8() : ""); IntegerStructureNode class2; - var num = ((class2 = class2860.method_5(new IntegerStructureNode("num_tiers"))) != null) + var num = ((class2 = class2860.zzFindNode(new IntegerStructureNode("num_tiers"))) != null) ? class2.method_8() : 0; try { for (var i = 1; i <= num; i++) { - Tiers.Add(new Gh3Tier(class2860.method_5(new StructurePointerNode("tier" + i)).method_8(), + Tiers.Add(new Gh3Tier(class2860.zzFindNode(new StructurePointerNode("tier" + i)).method_8(), gh3Songlist0)); } } @@ -86,12 +86,12 @@ public void method_5(StructureHeaderNode class2860, Gh3Songlist gh3Songlist0) public StructureHeaderNode method_6() { var @class = new StructureHeaderNode(); - @class.method_3(new AsciiStructureNode("prefix", Prefix)); - @class.method_3(new IntegerStructureNode("num_tiers", Tiers.Count)); - @class.method_3(new AsciiStructureNode("initial_movie", InitialMovie)); + @class.addChild(new AsciiStructureNode("prefix", Prefix)); + @class.addChild(new IntegerStructureNode("num_tiers", Tiers.Count)); + @class.addChild(new AsciiStructureNode("initial_movie", InitialMovie)); for (var i = 0; i < Tiers.Count; i++) { - @class.method_3(new StructurePointerNode("tier" + (i + 1), Tiers[i].method_3())); + @class.addChild(new StructurePointerNode("tier" + (i + 1), Tiers[i].method_3())); } return @class; } diff --git a/GuitarHero.Songlist/GH3Song.cs b/GuitarHero.Songlist/GH3Song.cs index 8903f87..faf9c42 100644 --- a/GuitarHero.Songlist/GH3Song.cs +++ b/GuitarHero.Songlist/GH3Song.cs @@ -142,74 +142,74 @@ public override string ToString() public virtual void vmethod_4(StructurePointerNode class3020) { - Name = class3020.method_5(new AsciiStructureNode("name")).method_8().ToLower(); + Name = class3020.zzFindNode(new AsciiStructureNode("name")).method_8().ToLower(); if (Name != null && !Name.Equals("")) { UnicodeStructureNode @class; - Title = (((@class = class3020.method_5(new UnicodeStructureNode("title"))) != null) + Title = (((@class = class3020.zzFindNode(new UnicodeStructureNode("title"))) != null) ? @class.method_8() : ""); - Artist = (((@class = class3020.method_5(new UnicodeStructureNode("artist"))) != null) + Artist = (((@class = class3020.zzFindNode(new UnicodeStructureNode("artist"))) != null) ? @class.method_8() : ""); - Year = (((@class = class3020.method_5(new UnicodeStructureNode("year"))) != null) + Year = (((@class = class3020.zzFindNode(new UnicodeStructureNode("year"))) != null) ? @class.method_8() : ""); - Bassist = (((@class = class3020.method_5(new UnicodeStructureNode("bassist"))) != null) + Bassist = (((@class = class3020.zzFindNode(new UnicodeStructureNode("bassist"))) != null) ? CultureInfo.CurrentCulture.TextInfo.ToTitleCase(@class.method_8()) : "Generic Bassist"); AsciiStructureNode class2; - Countoff = (((class2 = class3020.method_5(new AsciiStructureNode("countoff"))) != null) + Countoff = (((class2 = class3020.zzFindNode(new AsciiStructureNode("countoff"))) != null) ? class2.method_8() : ""); FloatStructureNode class3; - BandVol = (((class3 = class3020.method_5(new FloatStructureNode("band_playback_volume"))) != null) + BandVol = (((class3 = class3020.zzFindNode(new FloatStructureNode("band_playback_volume"))) != null) ? class3.method_8() : 0f); - GuitarVol = (((class3 = class3020.method_5(new FloatStructureNode("guitar_playback_volume"))) != null) + GuitarVol = (((class3 = class3020.zzFindNode(new FloatStructureNode("guitar_playback_volume"))) != null) ? class3.method_8() : 0f); - HammerOn = (((class3 = class3020.method_5(new FloatStructureNode("hammer_on_measure_scale"))) != null) + HammerOn = (((class3 = class3020.zzFindNode(new FloatStructureNode("hammer_on_measure_scale"))) != null) ? class3.method_8() : 0f); IntegerStructureNode class4; - GemOffset = (((class4 = class3020.method_5(new IntegerStructureNode("gem_offset"))) != null) + GemOffset = (((class4 = class3020.zzFindNode(new IntegerStructureNode("gem_offset"))) != null) ? class4.method_8() : 0); - FretbarOffset = (((class4 = class3020.method_5(new IntegerStructureNode("fretbar_offset"))) != null) + FretbarOffset = (((class4 = class3020.zzFindNode(new IntegerStructureNode("fretbar_offset"))) != null) ? class4.method_8() : 0); - InputOffset = (((class4 = class3020.method_5(new IntegerStructureNode("input_offset"))) != null) + InputOffset = (((class4 = class3020.zzFindNode(new IntegerStructureNode("input_offset"))) != null) ? class4.method_8() : 0); - OriginalArtist = ((class4 = class3020.method_5(new IntegerStructureNode("original_artist"))) != null && + OriginalArtist = ((class4 = class3020.zzFindNode(new IntegerStructureNode("original_artist"))) != null && class4.method_8() == 1); - Leaderboard = ((class4 = class3020.method_5(new IntegerStructureNode("leaderboard"))) != null && + Leaderboard = ((class4 = class3020.zzFindNode(new IntegerStructureNode("leaderboard"))) != null && class4.method_8() == 1); - NotBass = ((class4 = class3020.method_5(new IntegerStructureNode("rhythm_track"))) != null && + NotBass = ((class4 = class3020.zzFindNode(new IntegerStructureNode("rhythm_track"))) != null && class4.method_8() == 1); - TagStructureNode class5; - Keyboard = ((class5 = class3020.method_5(new TagStructureNode("keyboard"))) != null && + StructItemQbKey class5; + Keyboard = ((class5 = class3020.zzFindNode(new StructItemQbKey("keyboard"))) != null && class5.method_8() == "true"); - Singer = (((class5 = class3020.method_5(new TagStructureNode("singer"))) != null) + Singer = (((class5 = class3020.zzFindNode(new StructItemQbKey("singer"))) != null) ? class5.method_8() : ""); - Boss = (((class5 = class3020.method_5(new TagStructureNode("boss"))) != null) ? class5.method_8() : ""); - Version = (((class5 = class3020.method_5(new TagStructureNode("version"))) != null) + Boss = (((class5 = class3020.zzFindNode(new StructItemQbKey("boss"))) != null) ? class5.method_8() : ""); + Version = (((class5 = class3020.zzFindNode(new StructItemQbKey("version"))) != null) ? Convert.ToInt32(string.Concat(class5.method_8()[2])) : 3); - UseCoopNotetracks = (class3020.method_5(new TagStructureNode(0, "use_coop_notetracks")) != null); - NoRhythmTrack = (class3020.method_5(new TagStructureNode(0, "no_rhythm_track")) != null); + UseCoopNotetracks = (class3020.zzFindNode(new StructItemQbKey(0, "use_coop_notetracks")) != null); + NoRhythmTrack = (class3020.zzFindNode(new StructItemQbKey(0, "no_rhythm_track")) != null); try { - ArtistText = class3020.method_5(new FileTagStructureNode("artist_text")) + ArtistText = class3020.zzFindNode(new FileTagStructureNode("artist_text")) .method_8() .Equals("artist_text_by"); return; } catch { - ArtistText = (((@class = class3020.method_5(new UnicodeStructureNode("artist_text"))) != null) + ArtistText = (((@class = class3020.zzFindNode(new UnicodeStructureNode("artist_text"))) != null) ? @class.method_8() : "by"); return; @@ -221,79 +221,79 @@ public virtual void vmethod_4(StructurePointerNode class3020) public virtual StructurePointerNode vmethod_5() { var @class = new StructureHeaderNode(); - @class.method_3(new TagStructureNode("checksum", Name)); - @class.method_3(new AsciiStructureNode("name", Name)); - @class.method_3(new UnicodeStructureNode("title", Title)); - @class.method_3(new UnicodeStructureNode("artist", Artist.Equals("") ? " " : Artist)); - @class.method_3(new UnicodeStructureNode("year", Year.Equals("") ? " " : Year)); + @class.addChild(new StructItemQbKey("checksum", Name)); + @class.addChild(new AsciiStructureNode("name", Name)); + @class.addChild(new UnicodeStructureNode("title", Title)); + @class.addChild(new UnicodeStructureNode("artist", Artist.Equals("") ? " " : Artist)); + @class.addChild(new UnicodeStructureNode("year", Year.Equals("") ? " " : Year)); if (ArtistText is bool) { - @class.method_3(new FileTagStructureNode("artist_text", + @class.addChild(new FileTagStructureNode("artist_text", ((bool) ArtistText) ? "artist_text_by" : "artist_text_as_made_famous_by")); } else if (ArtistText is string) { - @class.method_3(new UnicodeStructureNode("artist_text", (string) ArtistText)); + @class.addChild(new UnicodeStructureNode("artist_text", (string) ArtistText)); } - @class.method_3(new IntegerStructureNode("original_artist", OriginalArtist ? 1 : 0)); + @class.addChild(new IntegerStructureNode("original_artist", OriginalArtist ? 1 : 0)); if (Version == 0) { Version = 3; } - @class.method_3(new TagStructureNode("version", "gh" + Version)); - @class.method_3(new IntegerStructureNode("leaderboard", Leaderboard ? 1 : 0)); + @class.addChild(new StructItemQbKey("version", "gh" + Version)); + @class.addChild(new IntegerStructureNode("leaderboard", Leaderboard ? 1 : 0)); if (GemOffset != 0) { - @class.method_3(new IntegerStructureNode("gem_offset", GemOffset)); + @class.addChild(new IntegerStructureNode("gem_offset", GemOffset)); } if (FretbarOffset != 0) { - @class.method_3(new IntegerStructureNode("fretbar_offset", FretbarOffset)); + @class.addChild(new IntegerStructureNode("fretbar_offset", FretbarOffset)); } if (InputOffset != 0) { - @class.method_3(new IntegerStructureNode("input_offset", InputOffset)); + @class.addChild(new IntegerStructureNode("input_offset", InputOffset)); } if (!Singer.Equals("")) { - @class.method_3(new TagStructureNode("singer", Singer)); + @class.addChild(new StructItemQbKey("singer", Singer)); } if (!Boss.Equals("")) { - @class.method_3(new TagStructureNode("boss", Boss)); + @class.addChild(new StructItemQbKey("boss", Boss)); } if (!Keyboard) { - @class.method_3(new TagStructureNode("keyboard", "false")); + @class.addChild(new StructItemQbKey("keyboard", "false")); } if (!Bassist.Equals("Generic Bassist")) { - @class.method_3(new UnicodeStructureNode("bassist", Bassist)); + @class.addChild(new UnicodeStructureNode("bassist", Bassist)); } if (!Countoff.Equals("")) { - @class.method_3(new AsciiStructureNode("countoff", Countoff)); + @class.addChild(new AsciiStructureNode("countoff", Countoff)); } - @class.method_3(new IntegerStructureNode("rhythm_track", NotBass ? 1 : 0)); + @class.addChild(new IntegerStructureNode("rhythm_track", NotBass ? 1 : 0)); if (BandVol != 0f) { - @class.method_3(new FloatStructureNode("band_playback_volume", BandVol)); + @class.addChild(new FloatStructureNode("band_playback_volume", BandVol)); } if (GuitarVol != 0f) { - @class.method_3(new FloatStructureNode("guitar_playback_volume", GuitarVol)); + @class.addChild(new FloatStructureNode("guitar_playback_volume", GuitarVol)); } if (HammerOn != 0f) { - @class.method_3(new FloatStructureNode("hammer_on_measure_scale", HammerOn)); + @class.addChild(new FloatStructureNode("hammer_on_measure_scale", HammerOn)); } if (UseCoopNotetracks) { - @class.method_3(new TagStructureNode(0, "use_coop_notetracks")); + @class.addChild(new StructItemQbKey(0, "use_coop_notetracks")); } if (NoRhythmTrack) { - @class.method_3(new TagStructureNode(0, "no_rhythm_track")); + @class.addChild(new StructItemQbKey(0, "no_rhythm_track")); } return new StructurePointerNode(Name, @class); } diff --git a/GuitarHero.Songlist/GH3Songlist.cs b/GuitarHero.Songlist/GH3Songlist.cs index 24b88f5..7f6cf16 100644 --- a/GuitarHero.Songlist/GH3Songlist.cs +++ b/GuitarHero.Songlist/GH3Songlist.cs @@ -163,10 +163,10 @@ public void method_6(StructureArrayNode class2920) { foreach (StructureHeaderNode @class in class2920.Nodes) { - var num = @class.method_5(new TagStructureNode("tag")).method_10(); + var num = @class.zzFindNode(new StructItemQbKey("tag")).method_10(); if (Dictionary1.ContainsKey(num)) { - Class2140.Add(@class.method_5(new UnicodeStructureNode("text")).method_8(), num); + Class2140.Add(@class.zzFindNode(new UnicodeStructureNode("text")).method_8(), num); } } } @@ -176,9 +176,9 @@ public StructureArrayNode method_7() var @class = new StructureArrayNode(); foreach (var current in Class2140.Keys) { - @class.method_3(new StructureHeaderNode(new List + @class.addChild(new StructureHeaderNode(new List { - new TagStructureNode("tag", Class2140[current]), + new StructItemQbKey("tag", Class2140[current]), new UnicodeStructureNode("text", current) })); } @@ -214,8 +214,8 @@ public Gh3Setlist method_11(int int0) public void FindEditableSongs(ZzGenericNode1 class3080, Gh3Songlist gh3Songlist0) { - var @class = class3080.method_5(new StructurePointerRootNode("permanent_songlist_props")).method_7(); - var flag = class3080.method_5(new TagStructureNode("band")) != null; + var @class = class3080.zzFindNode(new StructurePointerRootNode("permanent_songlist_props")).method_7(); + var flag = class3080.zzFindNode(new StructItemQbKey("band")) != null; Clear(); foreach (StructurePointerNode class2 in @class.Nodes) { @@ -238,8 +238,8 @@ public void method_13(ZzGenericNode1 class3080) list.Add(QbSongClass1.AddKeyToDictionary(current)); list2.Add(base[current].vmethod_5()); } - ((TagArray) class3080.method_5(new ArrayPointerRootNode("gh3_songlist")).method_7()).method_12(list); - class3080.method_5(new StructurePointerRootNode("permanent_songlist_props")).method_7().method_9(list2); + ((TagArray) class3080.zzFindNode(new ArrayPointerRootNode("gh3_songlist")).method_7()).method_12(list); + class3080.zzFindNode(new StructurePointerRootNode("permanent_songlist_props")).method_7().method_9(list2); } } } \ No newline at end of file diff --git a/GuitarHero.Songlist/GHASong.cs b/GuitarHero.Songlist/GHASong.cs index f158214..edc2b54 100644 --- a/GuitarHero.Songlist/GHASong.cs +++ b/GuitarHero.Songlist/GHASong.cs @@ -58,25 +58,25 @@ public override void vmethod_4(StructurePointerNode class3020) { base.vmethod_4(class3020); UnicodeStructureNode @class; - CoveredBy = (((@class = class3020.method_5(new UnicodeStructureNode("covered_by"))) != null) + CoveredBy = (((@class = class3020.zzFindNode(new UnicodeStructureNode("covered_by"))) != null) ? @class.method_8() : ""); - TagStructureNode class2; - Band = (((class2 = class3020.method_5(new TagStructureNode("band"))) != null) + StructItemQbKey class2; + Band = (((class2 = class3020.zzFindNode(new StructItemQbKey("band"))) != null) ? class2.method_8() : "default_band"); - GuitaristChecksum = ((class2 = class3020.method_5(new TagStructureNode("guitarist_checksum"))) != null && + GuitaristChecksum = ((class2 = class3020.zzFindNode(new StructItemQbKey("guitarist_checksum"))) != null && class2.method_8() == "aerosmith"); AsciiStructureNode class3; - SingerAnimPak = (((class3 = class3020.method_5(new AsciiStructureNode("singer_anim_pak"))) != null) + SingerAnimPak = (((class3 = class3020.zzFindNode(new AsciiStructureNode("singer_anim_pak"))) != null) ? class3.method_8() : ""); IntegerStructureNode class4; ThinFretbar_8NoteParamsHighBpm = - (((class4 = class3020.method_5(new IntegerStructureNode("thin_fretbar_8note_params_high_bpm"))) != null) + (((class4 = class3020.zzFindNode(new IntegerStructureNode("thin_fretbar_8note_params_high_bpm"))) != null) ? class4.method_8() : 0); - PerryMicStand = ((class4 = class3020.method_5(new IntegerStructureNode("perry_mic_stand"))) != null && + PerryMicStand = ((class4 = class3020.zzFindNode(new IntegerStructureNode("perry_mic_stand"))) != null && class4.method_8() == 1); } @@ -86,24 +86,24 @@ public override StructurePointerNode vmethod_5() var class2 = @class.method_8(); if (!CoveredBy.Equals("")) { - class2.method_3(new UnicodeStructureNode("covered_by", CoveredBy)); + class2.addChild(new UnicodeStructureNode("covered_by", CoveredBy)); } - class2.method_3(new TagStructureNode("band", Band)); + class2.addChild(new StructItemQbKey("band", Band)); if (GuitaristChecksum) { - class2.method_3(new TagStructureNode("guitarist_checksum", "aerosmith")); + class2.addChild(new StructItemQbKey("guitarist_checksum", "aerosmith")); } if (!SingerAnimPak.Equals("")) { - class2.method_3(new AsciiStructureNode("singer_anim_pak", SingerAnimPak)); + class2.addChild(new AsciiStructureNode("singer_anim_pak", SingerAnimPak)); } if (ThinFretbar_8NoteParamsHighBpm != 0) { - class2.method_3(new IntegerStructureNode("band_playback_volume", ThinFretbar_8NoteParamsHighBpm)); + class2.addChild(new IntegerStructureNode("band_playback_volume", ThinFretbar_8NoteParamsHighBpm)); } if (PerryMicStand) { - class2.method_3(new IntegerStructureNode("band_playback_volume", 1)); + class2.addChild(new IntegerStructureNode("band_playback_volume", 1)); } return @class; } diff --git a/GuitarHero.Tier/GH3Tier.cs b/GuitarHero.Tier/GH3Tier.cs index 597c5ea..ef6f6d2 100644 --- a/GuitarHero.Tier/GH3Tier.cs +++ b/GuitarHero.Tier/GH3Tier.cs @@ -74,32 +74,32 @@ public void method_2(StructureHeaderNode class2860, Gh3Songlist gh3Songlist0) { UnicodeStructureNode @class; Title = - (((@class = class2860.method_5(new UnicodeStructureNode("title"))) != null) ? @class.method_8() : ""); + (((@class = class2860.zzFindNode(new UnicodeStructureNode("title"))) != null) ? @class.method_8() : ""); AsciiStructureNode class2; - CompletionMovie = (((class2 = class2860.method_5(new AsciiStructureNode("completion_movie"))) != null) + CompletionMovie = (((class2 = class2860.zzFindNode(new AsciiStructureNode("completion_movie"))) != null) ? class2.method_8() : ""); IntegerStructureNode class3; - Defaultunlocked = (((class3 = class2860.method_5(new IntegerStructureNode("defaultunlocked"))) != null) + Defaultunlocked = (((class3 = class2860.zzFindNode(new IntegerStructureNode("defaultunlocked"))) != null) ? class3.method_8() : 0); - TagStructureNode class4; - Level = (((class4 = class2860.method_5(new TagStructureNode("level"))) != null) + StructItemQbKey class4; + Level = (((class4 = class2860.zzFindNode(new StructItemQbKey("level"))) != null) ? class4.method_8() : "No Preset Stage"); - SetlistIcon = (((class4 = class2860.method_5(new TagStructureNode("setlist_icon"))) != null) + SetlistIcon = (((class4 = class2860.zzFindNode(new StructItemQbKey("setlist_icon"))) != null) ? class4.method_8() : "No Icon"); - Encorep1 = (class2860.method_5(new TagStructureNode(0, "encorep1")) != null); - Encorep2 = (class2860.method_5(new TagStructureNode(0, "encorep2")) != null); - AerosmithEncoreP1 = (class2860.method_5(new TagStructureNode(0, "aerosmith_encore_p1")) != null); - Boss = (class2860.method_5(new TagStructureNode(0, "boss")) != null); - Nocash = (class2860.method_5(new TagStructureNode(0, "nocash")) != null); - Unlockall = (class2860.method_5(new TagStructureNode(0, "unlockall")) != null); + Encorep1 = (class2860.zzFindNode(new StructItemQbKey(0, "encorep1")) != null); + Encorep2 = (class2860.zzFindNode(new StructItemQbKey(0, "encorep2")) != null); + AerosmithEncoreP1 = (class2860.zzFindNode(new StructItemQbKey(0, "aerosmith_encore_p1")) != null); + Boss = (class2860.zzFindNode(new StructItemQbKey(0, "boss")) != null); + Nocash = (class2860.zzFindNode(new StructItemQbKey(0, "nocash")) != null); + Unlockall = (class2860.zzFindNode(new StructItemQbKey(0, "unlockall")) != null); var class5 = new ArrayPointerNode("songs"); - if (class2860.method_6(ref class5) && !(class5.method_8() is FloatListNode)) + if (class2860.method_6(ref class5) && !(class5.GetFirstChild() is FloatListNode)) { - foreach (var current in class5.method_8().method_8()) + foreach (var current in class5.GetFirstChild().method_8()) { if (gh3Songlist0.ContainsKey(current)) { @@ -116,10 +116,10 @@ public void method_2(StructureHeaderNode class2860, Gh3Songlist gh3Songlist0) public StructureHeaderNode method_3() { var @class = new StructureHeaderNode(); - @class.method_3(new UnicodeStructureNode("title", Title)); + @class.addChild(new UnicodeStructureNode("title", Title)); if (Songs.Count == 0) { - @class.method_3(new ArrayPointerNode("songs", new FloatListNode(true))); + @class.addChild(new ArrayPointerNode("songs", new FloatListNode(true))); } else { @@ -128,47 +128,47 @@ public StructureHeaderNode method_3() { list.Add(QbSongClass1.AddKeyToDictionary(current.Name)); } - @class.method_3(new ArrayPointerNode("songs", new TagArray(list))); + @class.addChild(new ArrayPointerNode("songs", new TagArray(list))); } if (Boss) { - @class.method_3(new TagStructureNode(0, "boss")); + @class.addChild(new StructItemQbKey(0, "boss")); } if (Encorep1) { - @class.method_3(new TagStructureNode(0, "encorep1")); + @class.addChild(new StructItemQbKey(0, "encorep1")); } if (Encorep2) { - @class.method_3(new TagStructureNode(0, "encorep2")); + @class.addChild(new StructItemQbKey(0, "encorep2")); } if (AerosmithEncoreP1) { - @class.method_3(new TagStructureNode(0, "aerosmith_encore_p1")); + @class.addChild(new StructItemQbKey(0, "aerosmith_encore_p1")); } if (Level != null && Level != "No Preset Stage") { - @class.method_3(new TagStructureNode("level", Level)); + @class.addChild(new StructItemQbKey("level", Level)); } if (Defaultunlocked != 0) { - @class.method_3(new IntegerStructureNode("defaultunlocked", Defaultunlocked)); + @class.addChild(new IntegerStructureNode("defaultunlocked", Defaultunlocked)); } if (!CompletionMovie.Equals("")) { - @class.method_3(new AsciiStructureNode("completion_movie", CompletionMovie)); + @class.addChild(new AsciiStructureNode("completion_movie", CompletionMovie)); } if (!SetlistIcon.Equals("No Icon")) { - @class.method_3(new TagStructureNode("setlist_icon", SetlistIcon)); + @class.addChild(new StructItemQbKey("setlist_icon", SetlistIcon)); } if (Nocash) { - @class.method_3(new TagStructureNode(0, "nocash")); + @class.addChild(new StructItemQbKey(0, "nocash")); } if (Unlockall) { - @class.method_3(new TagStructureNode(0, "unlockall")); + @class.addChild(new StructItemQbKey(0, "unlockall")); } return @class; } diff --git a/GuitarHero/GHLink.cs b/GuitarHero/GHLink.cs index 6c3d609..755cbc5 100644 --- a/GuitarHero/GHLink.cs +++ b/GuitarHero/GHLink.cs @@ -37,15 +37,15 @@ public GhLink(string string0, StructureHeaderNode class2860) public void method_0(StructureHeaderNode class2860) { - Setlist = class2860.method_5(new TagStructureNode("tier_global")).method_10(); - Progression = class2860.method_5(new TagStructureNode("progression_global")).method_10(); + Setlist = class2860.zzFindNode(new StructItemQbKey("tier_global")).method_10(); + Progression = class2860.zzFindNode(new StructItemQbKey("progression_global")).method_10(); } public StructureHeaderNode method_1() { var @class = new StructureHeaderNode(); - @class.method_3(new TagStructureNode("tier_global", Setlist)); - @class.method_3(new TagStructureNode("progression_global", Progression)); + @class.addChild(new StructItemQbKey("tier_global", Setlist)); + @class.addChild(new StructItemQbKey("progression_global", Progression)); return @class; } }