From ebc44f6aa103c11e14a9af859bfadb68a2228a0b Mon Sep 17 00:00:00 2001 From: wghost Date: Thu, 19 Dec 2013 22:23:29 +0400 Subject: [PATCH] Updated flags info --- FindObjectEntry.cpp | 12 ++++++------ UPKUtils.cpp | 4 ++-- UPKUtils.h | 34 ++++++++++++++++++++++++++++++---- 3 files changed, 38 insertions(+), 12 deletions(-) diff --git a/FindObjectEntry.cpp b/FindObjectEntry.cpp index 0757bf5..5f9fcfc 100644 --- a/FindObjectEntry.cpp +++ b/FindObjectEntry.cpp @@ -37,17 +37,17 @@ int main(int argN, char* argV[]) ObjectListEntry EntryToRead = package.GetObjectListEntryByIdx(idx); cout << hex << showbase << "Object table index: " << idx << " (" << dec << idx << ")" << endl << hex << "Object type: " << EntryToRead.ObjTypeRef << endl - << "Type string: " << package.GetObjectOrImportNameByIdx(EntryToRead.ObjTypeRef) << endl + << "\tType string: " << package.GetObjectOrImportNameByIdx(EntryToRead.ObjTypeRef) << endl << "Parent class reference: " << EntryToRead.ParentClassRef << endl - << "Parent class string: " << package.GetObjectOrImportNameByIdx(EntryToRead.ParentClassRef) << endl + << "\tParent class string: " << package.GetObjectOrImportNameByIdx(EntryToRead.ParentClassRef) << endl << "Owner reference: " << EntryToRead.OwnerRef << endl - << "Owner string: " << package.GetObjectOrImportNameByIdx(EntryToRead.OwnerRef) << endl + << "\tOwner string: " << package.GetObjectOrImportNameByIdx(EntryToRead.OwnerRef) << endl << "Index to name list table: " << EntryToRead.NameListIdx << endl - << "Name list string: " << package.GetNameByIdx(EntryToRead.NameListIdx) << endl + << "\tName list string: " << package.GetNameByIdx(EntryToRead.NameListIdx) << endl << "Unknown Field 5: " << EntryToRead.Field5 << endl - << "Unknown Field 6: " << EntryToRead.Field5 << endl - << "Property flags: " << EntryToRead.PropertyFlags << endl << "Unknown Field 6: " << EntryToRead.Field6 << endl + << "Object flags H: " << EntryToRead.ObjectFlagsH << endl + << "Object flags L: " << EntryToRead.ObjectFlagsL << endl << "Object file size: " << EntryToRead.ObjectFileSize << endl << "Object data offset: " << EntryToRead.DataOffset << endl << "Unknown Field 11: " << EntryToRead.Field11 << endl diff --git a/UPKUtils.cpp b/UPKUtils.cpp index 4f56c0b..a714086 100644 --- a/UPKUtils.cpp +++ b/UPKUtils.cpp @@ -123,8 +123,8 @@ bool UPKUtils::ReadUPKHeader() upkFile.read(reinterpret_cast(&EntryToRead.NameLength), sizeof(EntryToRead.NameLength)); getline(upkFile, EntryToRead.NameString, '\0'); - upkFile.read(reinterpret_cast(&EntryToRead.Field1), sizeof(EntryToRead.Field1)); - upkFile.read(reinterpret_cast(&EntryToRead.Field2), sizeof(EntryToRead.Field2)); + upkFile.read(reinterpret_cast(&EntryToRead.NameFlagsH), sizeof(EntryToRead.NameFlagsH)); + upkFile.read(reinterpret_cast(&EntryToRead.NameFlagsL), sizeof(EntryToRead.NameFlagsL)); NameList.push_back(EntryToRead); } diff --git a/UPKUtils.h b/UPKUtils.h index d843bc4..54bbb55 100644 --- a/UPKUtils.h +++ b/UPKUtils.h @@ -6,6 +6,32 @@ #include #include +struct UnrealFunctionFlags +{ + uint32_t Static = 0x00002000; + uint32_t Singular = 0x00000020; + uint32_t Native = 0x00000400; + uint32_t NoExport = 0x00004000; + uint32_t Exec = 0x00000200; + uint32_t Latent = 0x00000008; + uint32_t Iterator = 0x00000004; + uint32_t Simulated = 0x00000100; + uint32_t Server = 0x00200000; + uint32_t Client = 0x01000000; + uint32_t Reliable = 0x00000080; +//??? Unreliable + uint32_t Public = 0x00020000; + uint32_t Private = 0x00040000; + uint32_t Protected = 0x00080000; + uint32_t Operator = 0x00001000; + uint32_t PreOperator = 0x00000010; +//??? PostOperator + uint32_t Event = 0x00000800; + uint32_t Const = 0x00008000; + uint32_t Final = 0x00000001; + uint32_t Defined = 0x00000002; +}; + struct Generation { uint32_t ExportCount; @@ -45,8 +71,8 @@ struct NameListEntry { uint32_t NameLength; std::string NameString; - uint32_t Field1; - uint32_t Field2; + uint32_t NameFlagsH; + uint32_t NameFlagsL; }; struct ObjectListEntry @@ -57,8 +83,8 @@ struct ObjectListEntry uint32_t NameListIdx; uint32_t Field5; uint32_t Field6; - uint32_t PropertyFlags; - uint32_t Field8; + uint32_t ObjectFlagsH; + uint32_t ObjectFlagsL; uint32_t ObjectFileSize; uint32_t DataOffset; uint32_t Field11;