Skip to content

Commit 15f4c09

Browse files
committed
Merge branch '2.XDev' into Release
2 parents a19565b + 7c4cc93 commit 15f4c09

File tree

446 files changed

+137456
-1573
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

446 files changed

+137456
-1573
lines changed

.gitignore

+10-5
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
# Visual Studio
66
.vs/
77
*.vcxproj*
8-
VS_Solution/*.sln
9-
VS_Solution/CMakeCache.txt
10-
VS_Solution/cmake_install.cmake
11-
VS_Solution/*.proj*
8+
VS_Solution/*
9+
!VS_Solution/generate_vs_solution.bat
1210

1311
# Build results
1412
[Dd]ebug/
@@ -30,8 +28,12 @@ Output/
3028
ue4ss_rewrite_maybe_main.dir/
3129
VS_Solution/vendor/
3230
VS_Solution/Dependencies/
31+
/VS_Solution/cppsdk/
3332
Releases/
3433

34+
# standard cmake build directory
35+
/build
36+
3537
# Others
3638
*.tlog
3739
*.log
@@ -58,4 +60,7 @@ _ReSharper*/
5860
*.code-workspace
5961

6062
# Local History for Visual Studio Code
61-
.history/
63+
.history/
64+
65+
/generated_include/build_number.hpp
66+
/generated_src

.gitmodules

+1-76
Original file line numberDiff line numberDiff line change
@@ -2,89 +2,14 @@
22
path = Dependencies/Unreal
33
url = [email protected]:Re-UE4SS/UEPseudo.git
44
branch = main
5-
[submodule "Dependencies/Helpers"]
6-
path = Dependencies/Helpers
7-
url = [email protected]:UE4SS-RE/Helpers.git
8-
branch = main
9-
[submodule "Dependencies/File"]
10-
path = Dependencies/File
11-
url = [email protected]:UE4SS-RE/File.git
12-
branch = main
13-
[submodule "Dependencies/Function"]
14-
path = Dependencies/Function
15-
url = [email protected]:UE4SS-RE/Function.git
16-
branch = main
17-
[submodule "Dependencies/Constructs"]
18-
path = Dependencies/Constructs
19-
url = [email protected]:UE4SS-RE/Constructs.git
20-
branch = main
21-
[submodule "Dependencies/SinglePassSigScanner"]
22-
path = Dependencies/SinglePassSigScanner
23-
url = [email protected]:UE4SS-RE/SinglePassSigScanner.git
24-
branch = main
25-
[submodule "Dependencies/ScopedTimer"]
26-
path = Dependencies/ScopedTimer
27-
url = [email protected]:UE4SS-RE/ScopedTimer.git
28-
branch = main
29-
[submodule "Dependencies/DynamicOutput"]
30-
path = Dependencies/DynamicOutput
31-
url = [email protected]:UE4SS-RE/DynamicOutput.git
32-
branch = main
33-
[submodule "Dependencies/MProgram"]
34-
path = Dependencies/MProgram
35-
url = [email protected]:UE4SS-RE/MProgram.git
36-
branch = main
37-
[submodule "Dependencies/LuaMadeSimple"]
38-
path = Dependencies/LuaMadeSimple
39-
url = [email protected]:UE4SS-RE/LuaMadeSimple.git
40-
branch = main
41-
[submodule "Dependencies/Input"]
42-
path = Dependencies/Input
43-
url = [email protected]:UE4SS-RE/Input.git
44-
branch = main
45-
[submodule "Dependencies/JSON"]
46-
path = Dependencies/JSON
47-
url = [email protected]:UE4SS-RE/JSON.git
48-
branch = main
49-
[submodule "Dependencies/IniParser"]
50-
path = Dependencies/IniParser
51-
url = [email protected]:UE4SS-RE/IniParser.git
52-
branch = main
53-
[submodule "Dependencies/FunctionTimer"]
54-
path = Dependencies/FunctionTimer
55-
url = [email protected]:UE4SS-RE/FunctionTimer.git
56-
branch = main
57-
[submodule "Dependencies/LuaRaw"]
58-
path = Dependencies/LuaRaw
59-
url = [email protected]:UE4SS-RE/LuaRaw.git
60-
branch = main
615
[submodule "Dependencies/PolyHook_2_0"]
626
path = Dependencies/PolyHook_2_0
63-
url = [email protected]:UE4SS-RE/PolyHook_2_0.git
7+
url = [email protected]:stevemk14ebr/PolyHook_2_0.git
648
branch = main
659
[submodule "Dependencies/fmt"]
6610
path = Dependencies/fmt
6711
url = [email protected]:fmtlib/fmt.git
6812
branch = master
69-
[submodule "Dependencies/ParserBase"]
70-
path = Dependencies/ParserBase
71-
url = [email protected]:UE4SS-RE/ParserBase.git
72-
branch = main
73-
[submodule "Dependencies/ImGuiColorTextEdit"]
74-
path = Dependencies/ImGuiColorTextEdit
75-
url = https://github.com/UE4SS-RE/ImGuiColorTextEdit.git
76-
[submodule "Dependencies/LuaBindingsGenerator"]
77-
path = Dependencies/LuaBindingsGenerator
78-
url = https://github.com/UE4SS-RE/LuaBindingsGenerator.git
79-
[submodule "Dependencies/ArgsParser"]
80-
path = Dependencies/ArgsParser
81-
url = https://github.com/UE4SS-RE/ArgsParser.git
82-
[submodule "Dependencies/imgui"]
83-
path = Dependencies/imgui
84-
url = https://github.com/narknon/imgui.git
8513
[submodule "Dependencies/zydis"]
8614
path = Dependencies/zydis
8715
url = [email protected]:zyantific/zydis.git
88-
[submodule "Dependencies/ASMHelper"]
89-
path = Dependencies/ASMHelper
90-
url = [email protected]:UE4SS-RE/ASMHelper.git

CMakeLists.txt

+71-37
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ message("IPO - Supported: ${supported}; ${error}")
66
message("Project: UE4SS")
77

88
set(MAKE_DEPENDENCIES_SHARED 0)
9+
set(STATIC_EXPORTS 1)
910

1011
if (${MAKE_DEPENDENCIES_SHARED} EQUAL 0)
1112
set(MAKE_DEPENDENCIES_STATIC 1)
@@ -59,12 +60,19 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${UE4SS_OUTPUT_RELEASE_DIR})
5960
set(PRIVATE_COMPILE_DEFINITIONS
6061
$<${MAKE_DEPENDENCIES_SHARED}:RC_EXPORT RC_FUNCTION_EXPORTS>
6162
$<${MAKE_DEPENDENCIES_STATIC}:RC_FUNCTION_BUILD_STATIC>)
62-
set(PRIVATE_COMPILE_OPTIONS /MP $<$<CONFIG:RELEASE>:/Zi> /W3 /wd4005 /wd4251)
63-
set(PRIVATE_MASM_COMPILE_OPTIONS /MP $<$<CONFIG:RELEASE>:/Zi>)
64-
set(PRIVATE_LINK_OPTIONS /DEBUG:FULL)
63+
if (${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC)
64+
set(PRIVATE_COMPILE_OPTIONS /MP $<$<CONFIG:RELEASE>:/Zi> /W3 /wd4005 /wd4251 /wd4068)
65+
set(PRIVATE_MASM_COMPILE_OPTIONS /MP $<$<CONFIG:RELEASE>:/Zi> /wd4005 /wd4251 /wd4068)
66+
set(PRIVATE_LINK_OPTIONS /DEBUG:FULL)
67+
elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL Clang)
68+
set(PRIVATE_COMPILE_OPTIONS "$<IF:$<COMPILE_LANGUAGE:ASM_MASM>,,-g;-gcodeview;-fcolor-diagnostics;-Wall;-Wextra;-Wno-unknown-pragmas;-Wno-unused-parameter>")
69+
set(PRIVATE_LINK_OPTIONS "$<IF:$<COMPILE_LANGUAGE:ASM_MASM>,,-g>")
70+
endif ()
6571
set(PUBLIC_COMPILE_FEATURES cxx_std_20)
72+
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
6673

6774
set(UE4SS_COMPILE_DEFINITIONS
75+
RC_UE4SS_EXPORTS
6876
RC_ASM_HELPER_BUILD_STATIC
6977
RC_FILE_BUILD_STATIC
7078
RC_DYNAMIC_OUTPUT_BUILD_STATIC
@@ -101,16 +109,22 @@ else ()
101109
set(ZYDIS_BUILD_SHARED_LIB OFF CACHE BOOL "Build zydis as shared libary" FORCE)
102110
set(ZYCORE_BUILD_SHARED_LIB OFF CACHE BOOL "Build zycore as shared libary" FORCE)
103111
endif ()
112+
set(ZYDIS_BUILD_TOOLS OFF CACHE BOOL "")
104113
add_subdirectory("Dependencies/zydis")
105114
include_directories(Dependencies/zydis/include)
106115
include_directories(Dependencies/zydis/dependencies/zycore/include)
107116
include_directories(${CMAKE_CURRENT_BINARY_DIR}/Dependencies/zydis)
108117
include_directories(${CMAKE_CURRENT_BINARY_DIR}/Dependencies/zydis/zycore)
109118
set(CMAKE_PREFIX_PATH
110119
${LIBRARY_OUTPUT_PATH}/${CMAKE_BUILD_TYPE}
111-
${CMAKE_HOME_DIRECTORY}/Dependencies/zydis/include
112-
${CMAKE_HOME_DIRECTORY}/Dependencies/zydis/dependencies/zycore/include
120+
${CMAKE_CURRENT_SOURCE_DIR}/Dependencies/zydis/include
121+
${CMAKE_CURRENT_SOURCE_DIR}/Dependencies/zydis/dependencies/zycore/include
113122
)
123+
# needed for PolyHook
124+
set(ZYDIS_LIBRARY Zydis)
125+
set(ZYCORE_LIBRARY Zycore)
126+
set(ZYDIS_INCLUDE_DIR Dependencies/zydis/include)
127+
set(ZYCORE_INCLUDE_DIR Dependencies/zydis/dependencies/zycore/include)
114128

115129
add_subdirectory(Dependencies/ASMHelper)
116130

@@ -123,20 +137,31 @@ else ()
123137
set(MAKE_POLYHOOK_DEPENDENCIES_STATIC ON)
124138
endif ()
125139
set(POLYHOOK_BUILD_DLL ON CACHE BOOL "Build dll & lib instead of tests" FORCE)
126-
set(POLYHOOK_BUILD_SHARED_LIB ${MAKE_POLYHOOK_DEPENDENCIES_SHARED} CACHE BOOL "Build polyhook as shared libary" FORCE)
127-
set(POLYHOOK_BUILD_SHARED_ASMJIT ${MAKE_POLYHOOK_DEPENDENCIES_SHARED} CACHE BOOL "Build polyhook as shared libary" FORCE)
128-
set(POLYHOOK_BUILD_SHARED_CAPSTONE ${MAKE_POLYHOOK_DEPENDENCIES_SHARED} CACHE BOOL "Build polyhook as shared libary" FORCE)
129-
set(POLYHOOK_BUILD_SHARED_ZYDIS ${MAKE_POLYHOOK_DEPENDENCIES_SHARED} CACHE BOOL "Build polyhook as shared libary" FORCE)
140+
set(POLYHOOK_BUILD_SHARED_LIB ${MAKE_POLYHOOK_DEPENDENCIES_SHARED} CACHE BOOL "Build polyhook2 as shared libary" FORCE)
130141
set(POLYHOOK_USE_EXTERNAL_ZYDIS ON CACHE BOOL "Use external zydis libary" FORCE)
131-
set(ASMJIT_STATIC ${MAKE_POLYHOOK_DEPENDENCIES_STATIC} CACHE BOOL "Build asmjit as shared libary" FORCE)
142+
set(ASMJIT_STATIC ${MAKE_POLYHOOK_DEPENDENCIES_STATIC} CACHE BOOL "Build 'asmjit' library as static" FORCE)
132143
set(POLYHOOK_BUILD_STATIC_RUNTIME OFF CACHE BOOL "Use static runtime" FORCE)
133-
set(POLYHOOK_DISASM_CAPSTONE OFF CACHE BOOL "Enable capstone support" FORCE)
134-
set(POLYHOOK_DISASM_CAPSTONE_FULL OFF CACHE BOOL "Build all features of capstone." FORCE)
135-
set(POLYHOOK_DISASM_ZYDIS ON CACHE BOOL "Enable Zydis support." FORCE)
144+
145+
# disable 'install' by replacing with no-op before calling add_subdirectory
146+
macro (install)
147+
endmacro ()
148+
# disable 'set_target_properties' to prevent PolyHook from setting MSVC_RUNTIME_LIBRARY to "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL"
149+
# seriously, this can't be good, but it keeps working
150+
macro (set_target_properties)
151+
endmacro ()
136152
add_subdirectory(Dependencies/PolyHook_2_0)
137-
# For some reason, PolyHook isn't adding the capstone or zydis include directories
138-
include_directories(Dependencies/PolyHook_2_0)
139-
include_directories(Dependencies/PolyHook_2_0/capstone/include)
153+
# clean up macros
154+
macro (set_target_properties)
155+
_set_target_properties(${ARGV})
156+
endmacro ()
157+
macro (install)
158+
_install(${ARGV})
159+
endmacro ()
160+
161+
if (${CMAKE_CXX_COMPILER_ID} STREQUAL Clang)
162+
target_compile_options(asmjit PRIVATE -Wno-bitwise-instead-of-logical -Wno-sign-conversion -Wno-unused-command-line-argument -Wno-unused-but-set-variable)
163+
target_compile_options(PolyHook_2 PRIVATE -Wno-unused-value -Wno-missing-field-initializers -Wno-missing-braces -Wno-unused-variable -Wno-bitwise-instead-of-logical -Wno-reorder-ctor -Wno-unused-private-field)
164+
endif ()
140165

141166
add_subdirectory("Dependencies/Unreal")
142167
add_subdirectory("Dependencies/MProgram")
@@ -156,7 +181,6 @@ add_subdirectory("Dependencies/ParserBase")
156181
add_subdirectory("Dependencies/IniParser")
157182
add_subdirectory("Dependencies/JSON")
158183
add_subdirectory("Dependencies/ArgsParser")
159-
add_subdirectory("Dependencies/LuaBindingsGenerator")
160184

161185
# UE4SS
162186
# Settings override -> START
@@ -189,6 +213,22 @@ file(WRITE ${UE4SS_GENERATED_SOURCE_DIR}/version.cache "${UE4SS_LIB_VERSION}")
189213
message("UE4SS")
190214
message("Major: ${UE4SS_LIB_VERSION_MAJOR}, Minor: ${UE4SS_LIB_VERSION_MINOR}, Hotfix: ${UE4SS_LIB_VERSION_HOTFIX}, PreRelease: ${UE4SS_LIB_VERSION_PRERELEASE}, Beta: ${UE4SS_LIB_VERSION_BETA}")
191215

216+
find_package(Git REQUIRED)
217+
218+
# Build number is now git sha/hash
219+
execute_process(
220+
COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
221+
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
222+
RESULT_VARIABLE res
223+
OUTPUT_VARIABLE UE4SS_LIB_BUILD_GITSHA
224+
OUTPUT_STRIP_TRAILING_WHITESPACE)
225+
if(NOT res EQUAL 0)
226+
set(UE4SS_LIB_BUILD_GITSHA "0")
227+
endif()
228+
229+
set(RC_BUILD_NUMBER_HEADER_FILE "${UE4SS_GENERATED_INCLUDE_DIR}/build_number.hpp")
230+
file(WRITE ${RC_BUILD_NUMBER_HEADER_FILE} "#define UE4SS_LIB_BUILD_GITSHA \"${UE4SS_LIB_BUILD_GITSHA}\"")
231+
192232
# Make the hard-coded build numbers available to source files
193233
add_compile_definitions(
194234
UE4SS_LIB_VERSION_MAJOR=${UE4SS_LIB_VERSION_MAJOR}
@@ -211,10 +251,13 @@ set(${TARGET}_Sources
211251
"${CMAKE_CURRENT_SOURCE_DIR}/src/SettingsManager.cpp"
212252
"${CMAKE_CURRENT_SOURCE_DIR}/src/ObjectDumper/ObjectToString.cpp"
213253
"${CMAKE_CURRENT_SOURCE_DIR}/src/Signatures.cpp"
214-
"${CMAKE_CURRENT_SOURCE_DIR}/src/Mod.cpp"
254+
"${CMAKE_CURRENT_SOURCE_DIR}/src/Mod/Mod.cpp"
255+
"${CMAKE_CURRENT_SOURCE_DIR}/src/Mod/LuaMod.cpp"
256+
"${CMAKE_CURRENT_SOURCE_DIR}/src/Mod/CppMod.cpp"
257+
"${CMAKE_CURRENT_SOURCE_DIR}/src/Mod/CppUserModBase.cpp"
215258
"${CMAKE_CURRENT_SOURCE_DIR}/src/UnrealCustom/CustomProperty.cpp"
216259
"${CMAKE_CURRENT_SOURCE_DIR}/src/LuaLibrary.cpp"
217-
"${CMAKE_CURRENT_SOURCE_DIR}/src/LuaType/LuaMod.cpp"
260+
"${CMAKE_CURRENT_SOURCE_DIR}/src/LuaType/LuaModRef.cpp"
218261
"${CMAKE_CURRENT_SOURCE_DIR}/src/LuaType/LuaUObject.cpp"
219262
"${CMAKE_CURRENT_SOURCE_DIR}/src/LuaType/LuaUStruct.cpp"
220263
"${CMAKE_CURRENT_SOURCE_DIR}/src/LuaType/LuaUClass.cpp"
@@ -272,25 +315,25 @@ set(${TARGET}_Sources
272315
#"${CMAKE_CURRENT_SOURCE_DIR}/Dependencies/imgui/imgui_demo.cpp"
273316
)
274317
add_library(${TARGET} SHARED ${${TARGET}_Sources})
275-
target_include_directories(${TARGET} PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/generated_include> $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/LuaBindings/include>)
318+
target_include_directories(${TARGET} PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/generated_include>)
276319
target_compile_options(${TARGET} PRIVATE ${PRIVATE_COMPILE_OPTIONS})
277320
target_link_options(${TARGET} PRIVATE ${PRIVATE_LINK_OPTIONS})
278321
target_compile_features(${TARGET} PUBLIC ${PUBLIC_COMPILE_FEATURES})
279322
target_compile_definitions(${TARGET} PUBLIC $<${MAKE_DEPENDENCIES_SHARED}:LUA_BUILD_AS_DLL>)
280323
set(UE4SS_LINK_WITH_LIBRARIES File DynamicOutput Unreal SinglePassSigScanner LuaMadeSimple FunctionTimer Function IniParser JSON Input PolyHook_2 d3d11 GLFW opengl32)
281324
set(UE4SS_LINK_WITH_INTERFACE_LIBRARIES fmt::fmt-header-only Function Constructs Helpers MProgram ScopedTimer)
282-
target_link_libraries(${TARGET} PRIVATE ${UE4SS_LINK_WITH_LIBRARIES} ${UE4SS_LINK_WITH_INTERFACE_LIBRARIES})
325+
target_link_libraries(${TARGET} PUBLIC ${UE4SS_LINK_WITH_LIBRARIES} ${UE4SS_LINK_WITH_INTERFACE_LIBRARIES})
283326

284327
set(XINPUT_TARGET xinput1_3)
285328
enable_language(ASM_MASM)
286329
file(GLOB XINPUT_SOURCES "xinput/*")
287330
add_library(${XINPUT_TARGET} SHARED ${${TARGET}_Sources} ${XINPUT_SOURCES})
288-
target_include_directories(${XINPUT_TARGET} PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/generated_include> $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/LuaBindings/include>)
331+
target_include_directories(${XINPUT_TARGET} PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/generated_include>)
289332
target_compile_features(${XINPUT_TARGET} PUBLIC cxx_std_20)
290333
target_compile_definitions(${XINPUT_TARGET} PUBLIC $<${MAKE_DEPENDENCIES_SHARED}:LUA_BUILD_AS_DLL> UE4SS_LIB_BUILD_AS_XINPUT=1)
291334
target_compile_options(${XINPUT_TARGET} PRIVATE ${PRIVATE_MASM_COMPILE_OPTIONS})
292335
target_link_options(${XINPUT_TARGET} PRIVATE ${PRIVATE_LINK_OPTIONS})
293-
target_link_libraries(${XINPUT_TARGET} PRIVATE ${UE4SS_LINK_WITH_LIBRARIES} ${UE4SS_LINK_WITH_INTERFACE_LIBRARIES})
336+
target_link_libraries(${XINPUT_TARGET} PUBLIC ${UE4SS_LINK_WITH_LIBRARIES} ${UE4SS_LINK_WITH_INTERFACE_LIBRARIES})
294337

295338
if (${MAKE_DEPENDENCIES_STATIC} EQUAL 1)
296339
target_compile_definitions(${TARGET} PRIVATE ${UE4SS_COMPILE_DEFINITIONS})
@@ -300,6 +343,10 @@ endif()
300343
set_property(TARGET ${TARGET} PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
301344
set_property(TARGET ${XINPUT_TARGET} PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
302345

346+
# Making sure that the linked C runtime is a dll so that C++ mods will work correctly
347+
set_property(TARGET ${TARGET} PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
348+
set_property(TARGET ${XINPUT_TARGET} PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
349+
303350
# imgui -> START
304351
set(IMGUI_INCLUDES Dependencies/imgui Dependencies/ImGuiColorTextEdit)
305352
target_include_directories(${TARGET} PUBLIC ${IMGUI_INCLUDES})
@@ -313,17 +360,4 @@ target_include_directories(${TARGET} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/Depend
313360
target_include_directories(${XINPUT_TARGET} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/Dependencies/GLFW/include")
314361
# GLFW -> END
315362

316-
# Auto incrementing build number -> START
317-
# Fetch the auto incrementing build number
318-
# file(READ ${UE4SS_GENERATED_SOURCE_DIR}/build_number.cache UE4SS_LIB_BUILD_NUMBER)
319-
# message("Build #${UE4SS_LIB_BUILD_NUMBER} (Target: ${TARGET})")
320-
# add_custom_target(IncrementBuildNumber
321-
# COMMAND ${CMAKE_COMMAND}
322-
# -DRC_SOURCE_DIR:PATH="${PROJECT_SOURCE_DIR}"
323-
# -DUE4SS_GENERATED_SOURCE_DIR:PATH="${UE4SS_GENERATED_SOURCE_DIR}"
324-
# -DUE4SS_GENERATED_INCLUDE_DIR:PATH="${UE4SS_GENERATED_INCLUDE_DIR}"
325-
# -P "${UE4SS_GENERATED_SOURCE_DIR}/build_number.cmake"
326-
# )
327-
# add_dependencies(${TARGET} IncrementBuildNumber)
328-
# add_dependencies(${XINPUT_TARGET} IncrementBuildNumber)
329-
# Auto incrementing build number -> END
363+
add_subdirectory("cppsdk")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
function Register()
2+
return "48 8D ?? ?? ?? ?? ?? E8 ?? ?? ?? ?? 45 33 C9 4C 89 74 24 20 4C 8D 44 24 20 4C 89 7C 24 28 48 8D 54 24 60 48 8D 4E 08 E8 ?? ?? ?? ?? 48 85 DB"
3+
end
4+
5+
function OnMatchFound(matchAddress)
6+
local leaInstr = matchAddress
7+
local nextInstr = leaInstr + 0x7
8+
local offset = leaInstr + 0x3
9+
local arrayAddress = nextInstr + DerefToInt32(offset)
10+
11+
return arrayAddress
12+
end

0 commit comments

Comments
 (0)