diff options
Diffstat (limited to 'NorthstarDedicatedTest/modlocalisation.cpp')
-rw-r--r-- | NorthstarDedicatedTest/modlocalisation.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/NorthstarDedicatedTest/modlocalisation.cpp b/NorthstarDedicatedTest/modlocalisation.cpp index 85df8902..ad01192d 100644 --- a/NorthstarDedicatedTest/modlocalisation.cpp +++ b/NorthstarDedicatedTest/modlocalisation.cpp @@ -1,9 +1,10 @@ #include "pch.h" #include "modmanager.h" -typedef bool (*AddLocalisationFileType)(void* pVguiLocalize, const char* path, const char* pathId, char unknown); -AddLocalisationFileType AddLocalisationFile; -bool AddLocalisationFileHook(void* pVguiLocalize, const char* path, const char* pathId, char unknown) +AUTOHOOK_INIT() + +AUTOHOOK(AddLocalisationFile, localize.dll + 0x6D80, +bool,, (void* pVguiLocalize, const char* path, const char* pathId, char unknown), { static bool bLoadModLocalisationFiles = true; bool ret = AddLocalisationFile(pVguiLocalize, path, pathId, unknown); @@ -24,10 +25,9 @@ bool AddLocalisationFileHook(void* pVguiLocalize, const char* path, const char* bLoadModLocalisationFiles = true; return ret; -} +}) ON_DLL_LOAD_CLIENT("localize.dll", Localize, [](HMODULE baseAddress) { - HookEnabler hook; - ENABLER_CREATEHOOK(hook, (char*)baseAddress + 0x6D80, AddLocalisationFileHook, reinterpret_cast<LPVOID*>(&AddLocalisationFile)); + AUTOHOOK_DISPATCH() })
\ No newline at end of file |