From ae6b2b336dce8c1f3cb9a14cb9a43b0b0002b8fd Mon Sep 17 00:00:00 2001 From: Not Officer Date: Wed, 30 Dec 2020 14:41:37 +0100 Subject: [PATCH] fixed fieldpathproperty parsing --- .../PakReader/Parsers/Objects/FFieldClass.cs | 161 +++++++++--------- 1 file changed, 76 insertions(+), 85 deletions(-) diff --git a/FModel/PakReader/Parsers/Objects/FFieldClass.cs b/FModel/PakReader/Parsers/Objects/FFieldClass.cs index e4980848..6ffed2fb 100644 --- a/FModel/PakReader/Parsers/Objects/FFieldClass.cs +++ b/FModel/PakReader/Parsers/Objects/FFieldClass.cs @@ -3,95 +3,86 @@ public readonly struct FFieldClass { public readonly FName Name; - public readonly ulong Id; - public readonly ulong CastFlags; - public readonly EClassFlags ClassFlags; + //public readonly ulong Id; + //public readonly ulong CastFlags; + public readonly EClassFlags ClassFlags; - internal FFieldClass(PackageReader reader) + internal FFieldClass(PackageReader reader) { Name = reader.ReadFName(); - Id = reader.ReadUInt64(); - CastFlags = reader.ReadUInt64(); - ClassFlags = (EClassFlags)reader.ReadUInt32(); - //TODO finish this - } + //Id = reader.ReadUInt64(); + //CastFlags = reader.ReadUInt64(); + ClassFlags = (EClassFlags)reader.ReadUInt32(); + } } public enum EClassFlags : uint - { - /** No Flags */ - CLASS_None = 0x00000000u, - /** Class is abstract and can't be instantiated directly. */ - CLASS_Abstract = 0x00000001u, - /** Save object configuration only to Default INIs, never to local INIs. Must be combined with CLASS_Config */ - CLASS_DefaultConfig = 0x00000002u, - /** Load object configuration at construction time. */ - CLASS_Config = 0x00000004u, - /** This object type can't be saved; null it out at save time. */ - CLASS_Transient = 0x00000008u, - /** Successfully parsed. */ - CLASS_Parsed = 0x00000010u, - /** */ - CLASS_MatchedSerializers = 0x00000020u, - /** Indicates that the config settings for this class will be saved to Project/User*.ini (similar to CLASS_GlobalUserConfig) */ - CLASS_ProjectUserConfig = 0x00000040u, - /** Class is a native class - native interfaces will have CLASS_Native set, but not RF_MarkAsNative */ - CLASS_Native = 0x00000080u, - /** Don't export to C++ header. */ - CLASS_NoExport = 0x00000100u, - /** Do not allow users to create in the editor. */ - CLASS_NotPlaceable = 0x00000200u, - /** Handle object configuration on a per-object basis, rather than per-class. */ - CLASS_PerObjectConfig = 0x00000400u, - - /** Whether SetUpRuntimeReplicationData still needs to be called for this class */ - CLASS_ReplicationDataIsSetUp = 0x00000800u, - - /** Class can be constructed from editinline New button. */ - CLASS_EditInlineNew = 0x00001000u, - /** Display properties in the editor without using categories. */ - CLASS_CollapseCategories = 0x00002000u, - /** Class is an interface **/ - CLASS_Interface = 0x00004000u, - /** Do not export a constructor for this class, assuming it is in the cpptext **/ - CLASS_CustomConstructor = 0x00008000u, - /** all properties and functions in this class are const and should be exported as const */ - CLASS_Const = 0x00010000u, - - /** Class flag indicating the class is having its layout changed, and therefore is not ready for a CDO to be created */ - CLASS_LayoutChanging = 0x00020000u, - - /** Indicates that the class was created from blueprint source material */ - CLASS_CompiledFromBlueprint = 0x00040000u, - - /** Indicates that only the bare minimum bits of this class should be DLL exported/imported */ - CLASS_MinimalAPI = 0x00080000u, - - /** Indicates this class must be DLL exported/imported (along with all of it's members) */ - CLASS_RequiredAPI = 0x00100000u, - - /** Indicates that references to this class default to instanced. Used to be subclasses of UComponent, but now can be any UObject */ - CLASS_DefaultToInstanced = 0x00200000u, - - /** Indicates that the parent token stream has been merged with ours. */ - CLASS_TokenStreamAssembled = 0x00400000u, - /** Class has component properties. */ - CLASS_HasInstancedReference = 0x00800000u, - /** Don't show this class in the editor class browser or edit inline new menus. */ - CLASS_Hidden = 0x01000000u, - /** Don't save objects of this class when serializing */ - CLASS_Deprecated = 0x02000000u, - /** Class not shown in editor drop down for class selection */ - CLASS_HideDropDown = 0x04000000u, - /** Class settings are saved to /..../Blah.ini (as opposed to CLASS_DefaultConfig) */ - CLASS_GlobalUserConfig = 0x08000000u, - /** Class was declared directly in C++ and has no boilerplate generated by UnrealHeaderTool */ - CLASS_Intrinsic = 0x10000000u, - /** Class has already been constructed (maybe in a previous DLL version before hot-reload). */ - CLASS_Constructed = 0x20000000u, - /** Indicates that object configuration will not check against ini base/defaults when serialized */ - CLASS_ConfigDoNotCheckDefaults = 0x40000000u, - /** Class has been consigned to oblivion as part of a blueprint recompile, and a newer version currently exists. */ - CLASS_NewerVersionExists = 0x80000000u, - }; + { + /** No Flags */ + CLASS_None = 0x00000000u, + /** Class is abstract and can't be instantiated directly. */ + CLASS_Abstract = 0x00000001u, + /** Save object configuration only to Default INIs, never to local INIs. Must be combined with CLASS_Config */ + CLASS_DefaultConfig = 0x00000002u, + /** Load object configuration at construction time. */ + CLASS_Config = 0x00000004u, + /** This object type can't be saved; null it out at save time. */ + CLASS_Transient = 0x00000008u, + /** Successfully parsed. */ + CLASS_Parsed = 0x00000010u, + /** */ + CLASS_MatchedSerializers = 0x00000020u, + /** Indicates that the config settings for this class will be saved to Project/User*.ini (similar to CLASS_GlobalUserConfig) */ + CLASS_ProjectUserConfig = 0x00000040u, + /** Class is a native class - native interfaces will have CLASS_Native set, but not RF_MarkAsNative */ + CLASS_Native = 0x00000080u, + /** Don't export to C++ header. */ + CLASS_NoExport = 0x00000100u, + /** Do not allow users to create in the editor. */ + CLASS_NotPlaceable = 0x00000200u, + /** Handle object configuration on a per-object basis, rather than per-class. */ + CLASS_PerObjectConfig = 0x00000400u, + /** Whether SetUpRuntimeReplicationData still needs to be called for this class */ + CLASS_ReplicationDataIsSetUp = 0x00000800u, + /** Class can be constructed from editinline New button. */ + CLASS_EditInlineNew = 0x00001000u, + /** Display properties in the editor without using categories. */ + CLASS_CollapseCategories = 0x00002000u, + /** Class is an interface **/ + CLASS_Interface = 0x00004000u, + /** Do not export a constructor for this class, assuming it is in the cpptext **/ + CLASS_CustomConstructor = 0x00008000u, + /** all properties and functions in this class are const and should be exported as const */ + CLASS_Const = 0x00010000u, + /** Class flag indicating the class is having its layout changed, and therefore is not ready for a CDO to be created */ + CLASS_LayoutChanging = 0x00020000u, + /** Indicates that the class was created from blueprint source material */ + CLASS_CompiledFromBlueprint = 0x00040000u, + /** Indicates that only the bare minimum bits of this class should be DLL exported/imported */ + CLASS_MinimalAPI = 0x00080000u, + /** Indicates this class must be DLL exported/imported (along with all of it's members) */ + CLASS_RequiredAPI = 0x00100000u, + /** Indicates that references to this class default to instanced. Used to be subclasses of UComponent, but now can be any UObject */ + CLASS_DefaultToInstanced = 0x00200000u, + /** Indicates that the parent token stream has been merged with ours. */ + CLASS_TokenStreamAssembled = 0x00400000u, + /** Class has component properties. */ + CLASS_HasInstancedReference = 0x00800000u, + /** Don't show this class in the editor class browser or edit inline new menus. */ + CLASS_Hidden = 0x01000000u, + /** Don't save objects of this class when serializing */ + CLASS_Deprecated = 0x02000000u, + /** Class not shown in editor drop down for class selection */ + CLASS_HideDropDown = 0x04000000u, + /** Class settings are saved to /..../Blah.ini (as opposed to CLASS_DefaultConfig) */ + CLASS_GlobalUserConfig = 0x08000000u, + /** Class was declared directly in C++ and has no boilerplate generated by UnrealHeaderTool */ + CLASS_Intrinsic = 0x10000000u, + /** Class has already been constructed (maybe in a previous DLL version before hot-reload). */ + CLASS_Constructed = 0x20000000u, + /** Indicates that object configuration will not check against ini base/defaults when serialized */ + CLASS_ConfigDoNotCheckDefaults = 0x40000000u, + /** Class has been consigned to oblivion as part of a blueprint recompile, and a newer version currently exists. */ + CLASS_NewerVersionExists = 0x80000000u, + }; }