diff options
author | BobTheBob9 <for.oliver.kirkham@gmail.com> | 2022-07-07 21:31:41 +0100 |
---|---|---|
committer | BobTheBob9 <for.oliver.kirkham@gmail.com> | 2022-07-07 21:31:41 +0100 |
commit | 2ae34b67e36b8ba05132d481876eb4ed7a826283 (patch) | |
tree | 63f44c8e2dcdc959d7a5317a3a7b36efedbd7d38 /NorthstarDLL/r2engine.cpp | |
parent | 3406de7aaaf52cbef20b1549f2d7da0255d30f51 (diff) | |
download | NorthstarLauncher-2ae34b67e36b8ba05132d481876eb4ed7a826283.tar.gz NorthstarLauncher-2ae34b67e36b8ba05132d481876eb4ed7a826283.zip |
almost fully replaced hooking lib
Diffstat (limited to 'NorthstarDLL/r2engine.cpp')
-rw-r--r-- | NorthstarDLL/r2engine.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/NorthstarDLL/r2engine.cpp b/NorthstarDLL/r2engine.cpp index c866186a..8bae9082 100644 --- a/NorthstarDLL/r2engine.cpp +++ b/NorthstarDLL/r2engine.cpp @@ -1,23 +1,23 @@ -#include "pch.h" -#include "r2engine.h" - -using namespace R2; - -// use the R2 namespace for game funcs -namespace R2 -{ - Cbuf_GetCurrentPlayerType Cbuf_GetCurrentPlayer; - Cbuf_AddTextType Cbuf_AddText; - Cbuf_ExecuteType Cbuf_Execute; - - CEngine* g_pEngine; -} // namespace R2 - -ON_DLL_LOAD("engine.dll", R2Engine, [](HMODULE baseAddress) -{ - Cbuf_GetCurrentPlayer = (Cbuf_GetCurrentPlayerType)((char*)baseAddress + 0x120630); - Cbuf_AddText = (Cbuf_AddTextType)((char*)baseAddress + 0x1203B0); - Cbuf_Execute = (Cbuf_ExecuteType)((char*)baseAddress + 0x1204B0); - - g_pEngine = *(CEngine**)((char*)baseAddress + 0x7D70C8); +#include "pch.h"
+#include "r2engine.h"
+
+using namespace R2;
+
+// use the R2 namespace for game funcs
+namespace R2
+{
+ Cbuf_GetCurrentPlayerType Cbuf_GetCurrentPlayer;
+ Cbuf_AddTextType Cbuf_AddText;
+ Cbuf_ExecuteType Cbuf_Execute;
+
+ CEngine* g_pEngine;
+} // namespace R2
+
+ON_DLL_LOAD("engine.dll", R2Engine, [](HMODULE baseAddress)
+{
+ Cbuf_GetCurrentPlayer = (Cbuf_GetCurrentPlayerType)((char*)baseAddress + 0x120630);
+ Cbuf_AddText = (Cbuf_AddTextType)((char*)baseAddress + 0x1203B0);
+ Cbuf_Execute = (Cbuf_ExecuteType)((char*)baseAddress + 0x1204B0);
+
+ g_pEngine = *(CEngine**)((char*)baseAddress + 0x7D70C8);
})
\ No newline at end of file |