diff --git a/include/uevr/API.h b/include/uevr/API.h index 3e87b671..4ec1ce98 100644 --- a/include/uevr/API.h +++ b/include/uevr/API.h @@ -36,7 +36,7 @@ SOFTWARE. #define UEVR_OUT #define UEVR_PLUGIN_VERSION_MAJOR 2 -#define UEVR_PLUGIN_VERSION_MINOR 20 +#define UEVR_PLUGIN_VERSION_MINOR 21 #define UEVR_PLUGIN_VERSION_PATCH 0 #define UEVR_RENDERER_D3D11 0 @@ -282,12 +282,19 @@ typedef struct { typedef struct { int (*get_offset)(UEVR_FPropertyHandle prop); + unsigned long long (*get_property_flags)(UEVR_FPropertyHandle prop); + bool (*is_param)(UEVR_FPropertyHandle prop); + bool (*is_out_param)(UEVR_FPropertyHandle prop); + bool (*is_return_param)(UEVR_FPropertyHandle prop); + bool (*is_reference_param)(UEVR_FPropertyHandle prop); + bool (*is_pod)(UEVR_FPropertyHandle prop); } UEVR_FPropertyFunctions; typedef struct { UEVR_UStructHandle (*get_super_struct)(UEVR_UStructHandle klass); UEVR_FFieldHandle (*get_child_properties)(UEVR_UStructHandle klass); UEVR_UFunctionHandle (*find_function)(UEVR_UStructHandle klass, const wchar_t* name); + UEVR_FPropertyHandle (*find_property)(UEVR_UStructHandle klass, const wchar_t* name); } UEVR_UStructFunctions; typedef struct { diff --git a/include/uevr/API.hpp b/include/uevr/API.hpp index a451d699..e09bd204 100644 --- a/include/uevr/API.hpp +++ b/include/uevr/API.hpp @@ -591,6 +591,36 @@ class API { return fn(to_handle()); } + uint64_t get_property_flags() const { + static const auto fn = initialize()->get_property_flags; + return fn(to_handle()); + } + + bool is_param() const { + static const auto fn = initialize()->is_param; + return fn(to_handle()); + } + + bool is_out_param() const { + static const auto fn = initialize()->is_out_param; + return fn(to_handle()); + } + + bool is_return_param() const { + static const auto fn = initialize()->is_return_param; + return fn(to_handle()); + } + + bool is_reference_param() const { + static const auto fn = initialize()->is_reference_param; + return fn(to_handle()); + } + + bool is_pod() const { + static const auto fn = initialize()->is_pod; + return fn(to_handle()); + } + private: static inline const UEVR_FPropertyFunctions* s_functions{nullptr}; static inline const UEVR_FPropertyFunctions* initialize() { diff --git a/src/mods/PluginLoader.cpp b/src/mods/PluginLoader.cpp index 2166460a..a2d8056b 100644 --- a/src/mods/PluginLoader.cpp +++ b/src/mods/PluginLoader.cpp @@ -400,9 +400,27 @@ UEVR_FFieldFunctions g_ffield_functions { UEVR_FPropertyFunctions g_fproperty_functions { // get_offset - [](UEVR_FPropertyHandle prop) -> int { + .get_offset = [](UEVR_FPropertyHandle prop) -> int { return FPROPERTY(prop)->get_offset(); }, + .get_property_flags = [](UEVR_FPropertyHandle prop) -> uint64_t { + return FPROPERTY(prop)->get_property_flags(); + }, + .is_param = [](UEVR_FPropertyHandle prop) -> bool { + return FPROPERTY(prop)->is_param(); + }, + .is_out_param = [](UEVR_FPropertyHandle prop) -> bool { + return FPROPERTY(prop)->is_out_param(); + }, + .is_return_param = [](UEVR_FPropertyHandle prop) -> bool { + return FPROPERTY(prop)->is_return_param(); + }, + .is_reference_param = [](UEVR_FPropertyHandle prop) -> bool { + return FPROPERTY(prop)->is_reference_param(); + }, + .is_pod = [](UEVR_FPropertyHandle prop) -> bool { + return FPROPERTY(prop)->is_pod(); + }, }; #define USTRUCT(x) ((sdk::UStruct*)x)