Example #1
0
        private void openInInterpEditorToolStripMenuItem_Click(object sender, EventArgs e)
        {
            int n = CurrentObjects[listBox1.SelectedIndex];

            if (n == -1)
            {
                return;
            }
            InterpEditor.InterpEditor p = new InterpEditor.InterpEditor();
            p.MdiParent   = this.MdiParent;
            p.WindowState = FormWindowState.Maximized;
            p.Show();
            p.LoadPCC(CurrentFile);
            if (pcc.getClassName(Objects[listBox1.SelectedIndex].Index) == "InterpData")
            {
                p.toolStripComboBox1.SelectedIndex = p.objects.IndexOf(n);
                p.loadInterpData(n);
            }
            else
            {
                p.toolStripComboBox1.SelectedIndex = p.objects.IndexOf(((SAction)Objects[listBox1.SelectedIndex]).Varlinks[0].Links[0]);
                p.loadInterpData(((SAction)Objects[listBox1.SelectedIndex]).Varlinks[0].Links[0]);
            }
        }
Example #2
0
        public virtual void ToTree()
        {
            propView.Nodes.Clear();
            TreeNode t = new TreeNode("Group Name : \"" + GroupName + "\" (#" + index + " " + pcc.getClassName(index) + ")");

            t.Name = "GroupName";
            propView.Nodes.Add(t);
            t = new TreeNode("GroupColor");
            t.Nodes.Add("Alpha: " + groupColor.A);
            t.Nodes.Add("Red: " + groupColor.R);
            t.Nodes.Add("Green: " + groupColor.G);
            t.Nodes.Add("Blue: " + groupColor.B);
            propView.Nodes.Add(t);
            propView.Nodes.Add("Find Actor Mode: " + m_eSFXFindActorMode.ToString(pcc));
            if (m_nmSFXFindActor != -1)
            {
                propView.Nodes.Add("m_nmSFXFindActor : " + m_nmSFXFindActor);
            }
        }
Example #3
0
        public void InitStuff()
        {
            textBox1.Text = pcc.Exports[ObjectIndex].ObjectName;
            comboBox1.Items.Clear();
            foreach (string name in pcc.Names)
            {
                comboBox1.Items.Add(name);
            }
            Classes = new List <int>();
            foreach (PCCObject.ExportEntry e in pcc.Exports)
            {
                bool found = false;
                foreach (int index in Classes)
                {
                    if (e.idxClassName == index)
                    {
                        found = true;
                    }
                }
                if (!found)
                {
                    Classes.Add(e.idxClassName);
                }
            }
            bool run = true;

            while (run)
            {
                run = false;
                for (int i = 0; i < Classes.Count - 1; i++)
                {
                    if (pcc.getClassName(Classes[i]).CompareTo(pcc.getClassName(Classes[i + 1])) > 0)
                    {
                        int t = Classes[i];
                        Classes[i]     = Classes[i + 1];
                        Classes[i + 1] = t;
                        run            = true;
                    }
                }
            }
            comboBox2.Items.Clear();
            foreach (int index in Classes)
            {
                comboBox2.Items.Add(pcc.getClassName(index));
            }
            treeView1.Nodes.Clear();
            TreeNode Root = new TreeNode("Root");

            Root.Name = "0";
            List <int> Links = new List <int>();

            for (int i = 0; i < pcc.Exports.Count; i++)
            {
                PCCObject.ExportEntry e = pcc.Exports[i];
                bool found = false;
                foreach (int index in Links)
                {
                    if (index == e.idxLink)
                    {
                        found = true;
                    }
                }
                if (!found)
                {
                    Links.Add(e.idxLink);
                }
            }
            Links.Sort();
            foreach (int index in Links)
            {
                if (index != 0)
                {
                    if (index > 0)
                    {
                        PCCObject.ExportEntry e = pcc.Exports[index - 1];
                        string s = (index - 1).ToString() + " : ";
                        if (e.PackageFullName != "Class" && e.PackageFullName != "Package")
                        {
                            s += e.PackageFullName + ".";
                        }
                        s += e.ObjectName;
                        TreeNode newlink = new TreeNode(s);
                        newlink.Name = index.ToString();
                        Root.Nodes.Add(newlink);
                    }
                    else
                    {
                        //PCCObject.ImportEntry e = pcc.Imports[index * -1 - 1];
                        //string s = "";
                        //if (e.PackageFullName != "Class" && e.PackageFullName != "Package")
                        //    s += e.PackageFullName + ".";
                        //s += e.ObjectName;
                        //TreeNode newlink = new TreeNode(s);
                        //newlink.Name = index.ToString();
                        //Root.Nodes.Add(newlink);
                    }
                }
            }
            treeView1.Nodes.Add(Root);
            treeView1.ExpandAll();
        }