public override bool ResolveLinks() { var result = base.ResolveLinks(); FunctionMap = new List <ME3Function>(); foreach (var funcEntry in _FunctionMap) { var func = PCC.GetExportObject(funcEntry.FunctionObjectIndex) as ME3Function; if (func == null) { return(false); } FunctionMap.Add(func); } DefinedFunctions = new List <ME3Function>(); foreach (var member in Members) { if (member.GetType() == typeof(ME3Function)) { DefinedFunctions.Add(member as ME3Function); } } return(result); }
public override bool ResolveLinks() { var result = base.ResolveLinks(); InnerProperty = PCC.GetExportObject(_InnerIndex) as ME3Property; return(result); }
public override bool ResolveLinks() { var result = base.ResolveLinks(); SuperField = PCC.GetExportObject(_SuperIndex) as ME3Field; NextField = PCC.GetExportObject(_NextIndex) as ME3Field; return(result); }
public override bool ResolveLinks() { var result = base.ResolveLinks(); OuterClass = PCC.GetExportObject(_OuterClassIndex) as ME3Class; ImplementedInterfaces = new List <ME3Class>(); Components = new List <ME3Object>(); FunctionRefs = new List <ME3Function>(); foreach (var interfaceRef in _ImplInterfaces) // TODO: overhaul to objectableentry, or provide native object support. { var obj = PCC.GetExportObject(interfaceRef.ClassIndex); if (obj != null) { ImplementedInterfaces.Add(obj as ME3Class); } } foreach (var component in _Components) // TODO: overhaul to objectableentry, or provide native object support. { var obj = PCC.GetExportObject(component.ComponentObjectIndex); if (obj != null) { Components.Add(obj); } } foreach (var funcRef in _FunctionRefs) // TODO: overhaul { var entry = PCC.GetObjectEntry(funcRef); if (entry != null) // TODO: this shoud probably never happen. { ME3Function func = entry.Object as ME3Function; FunctionRefs.Add(func); } } States = new List <ME3State>(); foreach (var state in Members.Where(s => typeof(ME3State) == s.GetType())) { States.Add(state as ME3State); } return(result); }
public override bool ResolveLinks() { var result = base.ResolveLinks(); Members = new List <ME3Object>(); Structs = new List <ME3Struct>(); Enums = new List <ME3Enum>(); Variables = new List <ME3Property>(); Constants = new List <ME3Const>(); ME3Field obj = PCC.GetExportObject(FirstChildIndex) as ME3Field; while (obj != null) { Members.Add(obj); if (obj.GetType().IsSubclassOf(typeof(ME3Property))) { Variables.Add(obj as ME3Property); } else if (String.Compare(obj.ExportEntry.ClassName, "enum", StringComparison.OrdinalIgnoreCase) == 0) { Enums.Add(obj as ME3Enum); } else if (String.Compare(obj.ExportEntry.ClassName, "const", StringComparison.OrdinalIgnoreCase) == 0) { Constants.Add(obj as ME3Const); // TODO: does this happen? If so, handle in decompiler, locals etc. } else if (String.Compare(obj.ExportEntry.ClassName, "Struct", StringComparison.OrdinalIgnoreCase) == 0 || String.Compare(obj.ExportEntry.ClassName, "ScriptStruct", StringComparison.OrdinalIgnoreCase) == 0) { // TODO: is this correct, struct/scriptstruct? Structs.Add(obj as ME3Struct); } obj = obj.NextField; } return(result); }