forked from ItsBranK/UE3SDKGenerator
-
Notifications
You must be signed in to change notification settings - Fork 5
/
dllmain.hpp
95 lines (84 loc) · 3.6 KB
/
dllmain.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#pragma once
#include "pch.hpp"
#include "Printer.hpp"
#include "Engine/Engine.hpp"
namespace Utils
{
void Messagebox(const std::string& message, const std::string& title, uint64_t flags);
MODULEINFO GetModuleInfo(LPCTSTR moduleName);
uintptr_t FindPattern(HMODULE module, const uint8_t* pattern, const char* mask);
bool MapExists(std::multimap<std::string, std::string>& map, const std::string& key, const std::string& value);
bool SortPropertyPair(std::pair<class UProperty*, std::string> uPropertyA, std::pair<class UProperty*, std::string> uPropertyB);
bool SortProperty(class UProperty* uPropertyA, class UProperty* uPropertyB);
bool IsStructProperty(EPropertyTypes propertyType);
bool IsBitField(EPropertyTypes propertyType);
bool IsBitField(unsigned long dimension);
bool AreGObjectsValid();
bool AreGNamesValid();
}
namespace Retrievers
{
void GetAllPropertyFlags(std::ostringstream& stream, uint64_t propertyFlags);
void GetAllFunctionFlags(std::ostringstream& stream, uint64_t functionFlags);
EPropertyTypes GetPropertyType(class UProperty* property, std::string& propertyType, bool returnFunction);
size_t GetPropertySize(class UProperty* property);
uintptr_t GetEntryPoint();
uintptr_t GetOffset(uintptr_t address);
}
namespace ConstGenerator
{
void GenerateConst(std::ofstream& file, class UConst* constant);
void ProcessConsts(std::ofstream& file, class UObject* packageObj);
}
namespace EnumGenerator
{
void GenerateEnum(std::ofstream& file, class UEnum* uEnum);
void ProcessEnums(std::ofstream& file, class UObject* packageObj);
}
namespace StructGenerator
{
class UScriptStruct* FindLargestStruct(const std::string& structFullName);
void GenerateStructFields(std::ofstream& structStream, EClassTypes structType);
void GenerateStruct(std::ofstream& file, class UScriptStruct* scriptStruct);
void GenerateStructProperties(std::ofstream& file, class UScriptStruct* scriptStruct, class UObject* packageObj);
void ProcessStructs(std::ofstream& file, class UObject* packageObj);
}
namespace ClassGenerator
{
void GenerateClassFields(std::ostringstream& classStream, class UClass* uClass, EClassTypes classType);
void GenerateClass(std::ofstream& file, class UClass* uClass);
void GenerateClassProperties(std::ofstream& file, class UClass* uClass, class UObject* packageObj);
void ProcessClasses(std::ofstream& file, class UObject* packageObj);
}
namespace ParameterGenerator
{
void GenerateParameter(std::ofstream& file, class UClass* uClass);
void ProcessParameters(std::ofstream& file, class UObject* packageObj);
}
namespace FunctionGenerator
{
void GenerateVirtualFunctions(std::ofstream& file);
void GenerateFunctionCode(std::ofstream& file, class UClass* uClass);
void GenerateFunctionDescription(std::ofstream& file, class UClass* uClass);
void ProcessFunctions(std::ofstream& file, class UObject* packageObj);
}
namespace Generator
{
extern bool GlobalsInitialized;
extern std::ofstream LogFile;
extern std::vector<class UObject*> vPackages;
extern std::vector<class UObject*> vIncludes;
extern std::vector<std::pair<std::string, int32_t>> vConstants;
std::string CreateValidName(const std::string& invalidName);
std::string CreateUniqueName(class UClass* uClass);
std::string CreateUniqueName(class UFunction* uFunction, class UClass* uClass);
std::string CreateIndexName(class UObject* uObject, bool pushBack);
void MakeWindowsFunction(std::string& functionName);
void GenerateConstants();
void GenerateHeaders();
void GenerateDefines();
void ProcessPackages(std::filesystem::path directory);
void GenerateSDK();
void DumpInstances(bool dumpNames, bool dumpObjects);
bool Initialize(bool createLogFile);
}