Ejemplo n.º 1
0
        public TreeNode ToTree()
        {
            TreeNode res = new TreeNode(pcc.Exports[index].ObjectName);

            for (int i = 0; i < Textures.Count(); i++)
            {
                string s = Textures[i].Desc + " :# " + (Textures[i].TexIndex - 1);
                s += " " + pcc.getObjectName(Textures[i].TexIndex);
                res.Nodes.Add(s);
            }
            return(res);
        }
Ejemplo n.º 2
0
        private static PropertyInfo getProperty(ME3Package pcc, IExportEntry entry)
        {
            PropertyInfo p = new PropertyInfo();
            switch (entry.ClassName)
            {
                case "IntProperty":
                    p.type = PropertyType.IntProperty;
                    break;
                case "StringRefProperty":
                    p.type = PropertyType.StringRefProperty;
                    break;
                case "FloatProperty":
                    p.type = PropertyType.FloatProperty;
                    break;
                case "BoolProperty":
                    p.type = PropertyType.BoolProperty;
                    break;
                case "StrProperty":
                    p.type = PropertyType.StrProperty;
                    break;
                case "NameProperty":
                    p.type = PropertyType.NameProperty;
                    break;
                case "DelegateProperty":
                    p.type = PropertyType.DelegateProperty;
                    break;
                case "ObjectProperty":
                case "ClassProperty":
                case "ComponentProperty":
                    p.type = PropertyType.ObjectProperty;
                    p.reference = pcc.getObjectName(BitConverter.ToInt32(entry.Data, entry.Data.Length - 4));
                    break;
                case "StructProperty":
                    p.type = PropertyType.StructProperty;
                    p.reference = pcc.getObjectName(BitConverter.ToInt32(entry.Data, entry.Data.Length - 4));
                    break;
                case "BioMask4Property":
                case "ByteProperty":
                    p.type = PropertyType.ByteProperty;
                    p.reference = pcc.getObjectName(BitConverter.ToInt32(entry.Data, entry.Data.Length - 4));
                    break;
                case "ArrayProperty":
                    p.type = PropertyType.ArrayProperty;
                    PropertyInfo arrayTypeProp = getProperty(pcc, pcc.Exports[BitConverter.ToInt32(entry.Data, 44) - 1]);
                    if (arrayTypeProp != null)
                    {
                        switch (arrayTypeProp.type)
                        {
                            case PropertyType.ObjectProperty:
                            case PropertyType.StructProperty:
                            case PropertyType.ArrayProperty:
                                p.reference = arrayTypeProp.reference;
                                break;
                            case PropertyType.ByteProperty:
                                if (arrayTypeProp.reference == "")
                                    p.reference = arrayTypeProp.type.ToString();
                                else
                                    p.reference = arrayTypeProp.reference;
                                break;
                            case PropertyType.IntProperty:
                            case PropertyType.FloatProperty:
                            case PropertyType.NameProperty:
                            case PropertyType.BoolProperty:
                            case PropertyType.StrProperty:
                            case PropertyType.StringRefProperty:
                            case PropertyType.DelegateProperty:
                                p.reference = arrayTypeProp.type.ToString();
                                break;
                            case PropertyType.None:
                            case PropertyType.Unknown:
                            default:
                                System.Diagnostics.Debugger.Break();
                                p = null;
                                break;
                        }
                    }
                    else
                    {
                        p = null;
                    }
                    break;
                case "InterfaceProperty":
                default:
                    p = null;
                    break;
            }

            return p;
        }
        private static PropertyInfo getProperty(ME3Package pcc, IExportEntry entry)
        {
            PropertyInfo p = new PropertyInfo();

            switch (entry.ClassName)
            {
            case "IntProperty":
                p.type = PropertyType.IntProperty;
                break;

            case "StringRefProperty":
                p.type = PropertyType.StringRefProperty;
                break;

            case "FloatProperty":
                p.type = PropertyType.FloatProperty;
                break;

            case "BoolProperty":
                p.type = PropertyType.BoolProperty;
                break;

            case "StrProperty":
                p.type = PropertyType.StrProperty;
                break;

            case "NameProperty":
                p.type = PropertyType.NameProperty;
                break;

            case "DelegateProperty":
                p.type = PropertyType.DelegateProperty;
                break;

            case "ObjectProperty":
            case "ClassProperty":
            case "ComponentProperty":
                p.type      = PropertyType.ObjectProperty;
                p.reference = pcc.getObjectName(BitConverter.ToInt32(entry.Data, entry.Data.Length - 4));
                break;

            case "StructProperty":
                p.type      = PropertyType.StructProperty;
                p.reference = pcc.getObjectName(BitConverter.ToInt32(entry.Data, entry.Data.Length - 4));
                break;

            case "BioMask4Property":
            case "ByteProperty":
                p.type      = PropertyType.ByteProperty;
                p.reference = pcc.getObjectName(BitConverter.ToInt32(entry.Data, entry.Data.Length - 4));
                break;

            case "ArrayProperty":
                p.type = PropertyType.ArrayProperty;
                PropertyInfo arrayTypeProp = getProperty(pcc, pcc.Exports[BitConverter.ToInt32(entry.Data, 44) - 1]);
                if (arrayTypeProp != null)
                {
                    switch (arrayTypeProp.type)
                    {
                    case PropertyType.ObjectProperty:
                    case PropertyType.StructProperty:
                    case PropertyType.ArrayProperty:
                        p.reference = arrayTypeProp.reference;
                        break;

                    case PropertyType.ByteProperty:
                        if (arrayTypeProp.reference == "Class")
                        {
                            p.reference = arrayTypeProp.type.ToString();
                        }
                        else
                        {
                            p.reference = arrayTypeProp.reference;
                        }
                        break;

                    case PropertyType.IntProperty:
                    case PropertyType.FloatProperty:
                    case PropertyType.NameProperty:
                    case PropertyType.BoolProperty:
                    case PropertyType.StrProperty:
                    case PropertyType.StringRefProperty:
                    case PropertyType.DelegateProperty:
                        p.reference = arrayTypeProp.type.ToString();
                        break;

                    case PropertyType.None:
                    case PropertyType.Unknown:
                    default:
                        System.Diagnostics.Debugger.Break();
                        p = null;
                        break;
                    }
                }
                else
                {
                    p = null;
                }
                break;

            case "InterfaceProperty":
            default:
                p = null;
                break;
            }
            if (p != null && (BitConverter.ToUInt64(entry.Data, 24) & 0x0000000000002000) != 0)
            {
                //Transient
                p.transient = true;
            }
            return(p);
        }
Ejemplo n.º 4
0
        public virtual void ToTree()
        {
            propView.Nodes.Clear();
            TreeNode t = new TreeNode("Group Name : \"" + GroupName + "\" (#" + index + " " + pcc.getObjectName(index + 1) + ")");

            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);
            }
        }