From 474dfd041c3c73f867afb38fd689405799a29bef Mon Sep 17 00:00:00 2001 From: BobTheBob Date: Wed, 22 Feb 2023 15:05:31 +0000 Subject: add PREDEFINED_VAR_AT --- NorthstarDLL/core/hooks.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'NorthstarDLL/core/hooks.h') diff --git a/NorthstarDLL/core/hooks.h b/NorthstarDLL/core/hooks.h index 0eb3f7fb..1e8f23f2 100644 --- a/NorthstarDLL/core/hooks.h +++ b/NorthstarDLL/core/hooks.h @@ -321,3 +321,11 @@ class __autovar { \ __autovar CONCAT2(__autovar, __LINE__)(&__FILEAUTOHOOK, __STR(addrString), (void**)&name); \ } + +// int* g_pSomeInt; +// PREDEFINED_VAR_AT(engine.dll + 0x5005, g_pSomeInt) +#define PREDEFINED_VAR_AT(addrString, name) \ + namespace \ + { \ + __autovar CONCAT2(__autovar, __LINE__)(&__FILEAUTOHOOK, __STR(addrString), (void**)&name); \ + } -- cgit v1.2.3