Skip to content

Commit

Permalink
Manually merge adituv fork
Browse files Browse the repository at this point in the history
  • Loading branch information
szymmirr committed Jan 5, 2021
1 parent 2826149 commit fbf510a
Show file tree
Hide file tree
Showing 33 changed files with 307 additions and 307 deletions.
18 changes: 9 additions & 9 deletions GHNamespace8/Class246.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,32 +27,32 @@ 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
{
@class = _class3180.ZzGetNode1(text);
}
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
{
Expand All @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion GHNamespace8/Class247.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion GHNamespace8/Class248.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
10 changes: 5 additions & 5 deletions GHNamespace8/Class249.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<StructureHeaderNode>())
{
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;
Expand Down
4 changes: 2 additions & 2 deletions GHNamespace8/Class250.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}
Expand Down
4 changes: 2 additions & 2 deletions GHNamespace8/MainMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
}
Expand Down Expand Up @@ -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";
Expand Down
4 changes: 2 additions & 2 deletions GHNamespace9/QbEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public bool method_0()
bool result;
try
{
vmethod_0();
CreateCustomMenu();
return true;
}
catch (Exception ex)
Expand All @@ -22,7 +22,7 @@ public bool method_0()
return result;
}

public abstract void vmethod_0();
public abstract void CreateCustomMenu();

public abstract override string ToString();

Expand Down
114 changes: 57 additions & 57 deletions GHNamespaceA/CustomMenuCreator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down
16 changes: 8 additions & 8 deletions GHNamespaceA/GameSettingsChecker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<float>();
Version = new Version(@class.zzFindNode(new UnicodeRootNode("version")).method_7());
var array = @class.zzFindNode(new ArrayPointerRootNode("date")).method_7().method_7<float>();
Date = new DateTime((int) array[0], (int) array[1], (int) array[2]);
UnkBuffer = @class.method_5(new ArrayPointerRootNode("hash")).method_7().method_7<int>();
UnkBuffer = @class.zzFindNode(new ArrayPointerRootNode("hash")).method_7().method_7<int>();
class3180.method_7(HashPath);
using (var stream = class3180.method_17())
{
Expand All @@ -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,
Expand Down
Loading

0 comments on commit fbf510a

Please sign in to comment.