aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/modlocalisation.cpp
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2022-05-26 23:09:15 +0100
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2022-05-26 23:09:15 +0100
commit2171d95e1221442081bade7929c05b82ca0f2a08 (patch)
tree78e2d33c13fb0353e3869b08b15c3a6cc3c60393 /NorthstarDedicatedTest/modlocalisation.cpp
parentcc7b0ded08e3dc26fc970169a79c74c54e4f923b (diff)
downloadNorthstarLauncher-2171d95e1221442081bade7929c05b82ca0f2a08.tar.gz
NorthstarLauncher-2171d95e1221442081bade7929c05b82ca0f2a08.zip
update more stuff to new hook macros
Diffstat (limited to 'NorthstarDedicatedTest/modlocalisation.cpp')
-rw-r--r--NorthstarDedicatedTest/modlocalisation.cpp12
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