aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBobTheBob <for.oliver.kirkham@gmail.com>2023-02-22 15:05:31 +0000
committerBobTheBob <for.oliver.kirkham@gmail.com>2023-02-22 15:05:31 +0000
commit474dfd041c3c73f867afb38fd689405799a29bef (patch)
treec78729a3d575c5009e1d3829165c65052bb613a8
parent8c5fcbfb7083ec74343398c22ed0b6b49925a3c9 (diff)
downloadNorthstarLauncher-474dfd041c3c73f867afb38fd689405799a29bef.tar.gz
NorthstarLauncher-474dfd041c3c73f867afb38fd689405799a29bef.zip
add PREDEFINED_VAR_AT
-rw-r--r--NorthstarDLL/core/hooks.h8
1 files changed, 8 insertions, 0 deletions
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); \
+ }