public void ResolveObjects() { int off1 = 0; if (objectPointerList.Length > 1) { DataTree.Nodes.Add(new BaseNode("Character Nodes")); while (off1 < objectPointerList.Length) { long pEntry = GetWord(objectPointerList, off1); long lEntry = FromWord(GetWord(objectPointerList, off1 + 0x04)); string Name = GetString(nameList, GetWord(objectPointerList, 0x4 + off1)); if (Name.Contains("aram") || Name.Contains("CollData") || Name.Contains("hitData")) { ParamNode Node = new ParamNode(Name, pEntry, lEntry); Node.BackColor = Color.GreenYellow; DataTree.Nodes[1].Nodes.Add(Node); } else if (Name.Contains("AnimCmd") && !Name.Contains("Disguise")) { ScriptNode Node = new ScriptNode(Name, pEntry); Node.BackColor = Color.Yellow; DataTree.Nodes[1].Nodes.Add(Node); } else { BaseNode Node = new BaseNode(Name); Node.BackColor = Color.Gray; if (Node.Text != "data") { DataTree.Nodes[1].Nodes.Add(Node); } } off1 += 8; } } }
public unsafe void ParseHeaderEXT(long pData) { // Location and length of the Header Extension long pHeaderEXT = pData + 0x7C; long lHeaderEXT = FromWord(pFadeData - pHeaderEXT); // short term variables int ArticleCount = 0; TreeNode root = new TreeNode("Articles"); // Parse the Header Extension, adding articles to the tree only if // they pass redundancies in type class "Article.cs" for (int i = 0; i < lHeaderEXT; i++) { // Current address in the Header Extension long Addr = GetWord(pHeaderEXT + ToWord(i)); if (Addr < movesetData.Length) try { fixed (byte* ptr = movesetData) { // This calls the redundancies in "Article.cs" to check if it's actually an article. Article art = new Article(pFadeData, Addr, ptr); // If it passes, create its node and set up tooltips ArticleNode n = new ArticleNode("Article[" + ArticleCount + "]", GetWord(pHeaderEXT + ToWord(i))); n.ToolTipText = "Subactions: " + art.SubactionCount + "\n" + "Actions: " + art.ActionCount; n.BackColor = Color.Yellow; // Parse collision data if it exists if (art.CollisionData > 0) { //Addresses to the collision data and entry count, NOT the collision data offset list. long pCollData = GetWord(art.CollisionData); long lCollData = GetWord(art.CollisionData + 0x04); for (int b = 0; b < lCollData; b++) { ParamNode param = new ParamNode("Collision Data[" + b + "]", GetWord(pCollData + ToWord(b)) + 0x04, 0x8); param.BackColor = Color.GreenYellow; n.Nodes.Add(param); } } root.Nodes.Add(n); ArticleCount++; } } catch { } } if (ArticleCount > 0) { DataTree.Nodes[0].Nodes.Add(root); } }