Esempio n. 1
0
        public override bool ResolveLinks()
        {
            var result = base.ResolveLinks();

            var entry = PCC.GetObjectEntry(_ClassIndex);
            if (entry != null)
            {
                Class = PCC.GetObjectEntry(_ClassIndex).Object as ME3Class;
            }

            if (Class == null) // TODO
                return true; // this should be false, but until native objects are handled by the library this will have to do.

            return result;
        }
Esempio n. 2
0
        public override bool ResolveLinks()
        {
            var result = base.ResolveLinks();

            var entry = PCC.GetObjectEntry(_ClassIndex);

            if (entry != null)
            {
                Class = PCC.GetObjectEntry(_ClassIndex).Object as ME3Class;
            }

            if (Class == null) // TODO
            {
                return(true);  // this should be false, but until native objects are handled by the library this will have to do.
            }
            return(result);
        }
Esempio n. 3
0
        private bool DeserializeExportObject(ExportTableEntry entry)
        {
            switch (entry.ClassName)
            {
            case "Class":
                var classObj = new ME3Class(Data.GetReader(entry.FileOffset, entry.Size), entry, this);
                entry.Object = classObj;
                return(classObj.Deserialize());

            case "Function":
                var funcObj = new ME3Function(Data.GetReader(entry.FileOffset, entry.Size), entry, this);
                entry.Object = funcObj;
                return(funcObj.Deserialize());

            case "Struct":
                var structObj = new ME3Struct(Data.GetReader(entry.FileOffset, entry.Size), entry, this);
                entry.Object = structObj;
                return(structObj.Deserialize());

            case "ScriptStruct":
                var scriptstructObj = new ME3ScriptStruct(Data.GetReader(entry.FileOffset, entry.Size), entry, this);
                entry.Object = scriptstructObj;
                return(scriptstructObj.Deserialize());

            case "Enum":
                var enumObj = new ME3Enum(Data.GetReader(entry.FileOffset, entry.Size), entry, this);
                entry.Object = enumObj;
                return(enumObj.Deserialize());

            case "Const":
                var constObj = new ME3Const(Data.GetReader(entry.FileOffset, entry.Size), entry, this);
                entry.Object = constObj;
                return(constObj.Deserialize());

            case "State":
                var stateObj = new ME3State(Data.GetReader(entry.FileOffset, entry.Size), entry, this);
                entry.Object = stateObj;
                return(stateObj.Deserialize());

            case "ArrayProperty":
                var arrayProp = new ME3ArrayProperty(Data.GetReader(entry.FileOffset, entry.Size), entry, this);
                entry.Object = arrayProp;
                return(arrayProp.Deserialize());

            case "IntProperty":
                var intProp = new ME3IntProperty(Data.GetReader(entry.FileOffset, entry.Size), entry, this);
                entry.Object = intProp;
                return(intProp.Deserialize());

            case "BoolProperty":
                var boolProp = new ME3BoolProperty(Data.GetReader(entry.FileOffset, entry.Size), entry, this);
                entry.Object = boolProp;
                return(boolProp.Deserialize());

            case "ByteProperty":
                var byteProp = new ME3ByteProperty(Data.GetReader(entry.FileOffset, entry.Size), entry, this);
                entry.Object = byteProp;
                return(byteProp.Deserialize());

            case "ObjectProperty":
                var objectProp = new ME3ObjectProperty(Data.GetReader(entry.FileOffset, entry.Size), entry, this);
                entry.Object = objectProp;
                return(objectProp.Deserialize());

            case "ClassProperty":
                var classProp = new ME3ClassProperty(Data.GetReader(entry.FileOffset, entry.Size), entry, this);
                entry.Object = classProp;
                return(classProp.Deserialize());

            case "ComponentProperty":
                var compProp = new ME3ComponentProperty(Data.GetReader(entry.FileOffset, entry.Size), entry, this);
                entry.Object = compProp;
                return(compProp.Deserialize());

            case "DelegateProperty":
                var deleProp = new ME3DelegateProperty(Data.GetReader(entry.FileOffset, entry.Size), entry, this);
                entry.Object = deleProp;
                return(deleProp.Deserialize());

            case "FixedArrayProperty":
                var fixedProp = new ME3FixedArrayProperty(Data.GetReader(entry.FileOffset, entry.Size), entry, this);
                entry.Object = fixedProp;
                return(fixedProp.Deserialize());

            case "FloatProperty":
                var floatProp = new ME3FloatProperty(Data.GetReader(entry.FileOffset, entry.Size), entry, this);
                entry.Object = floatProp;
                return(floatProp.Deserialize());

            case "InterfaceProperty":
                var interfaceProp = new ME3InterfaceProperty(Data.GetReader(entry.FileOffset, entry.Size), entry, this);
                entry.Object = interfaceProp;
                return(interfaceProp.Deserialize());

            case "NameProperty":
                var nameProp = new ME3NameProperty(Data.GetReader(entry.FileOffset, entry.Size), entry, this);
                entry.Object = nameProp;
                return(nameProp.Deserialize());

            case "StrProperty":
                var strProp = new ME3StrProperty(Data.GetReader(entry.FileOffset, entry.Size), entry, this);
                entry.Object = strProp;
                return(strProp.Deserialize());

            case "StructProperty":
                var structProp = new ME3StructProperty(Data.GetReader(entry.FileOffset, entry.Size), entry, this);
                entry.Object = structProp;
                return(structProp.Deserialize());

            default:
                var obj = new ME3Object(Data.GetReader(entry.FileOffset, entry.Size), entry, this);
                entry.Object = obj;
                return(obj.Deserialize());
            }
        }
Esempio n. 4
0
 public ME3ObjectConverter(ME3Class classObject)
 {
     Object = classObject;
 }