diff options
author | BobTheBob9 <for.oliver.kirkham@gmail.com> | 2022-07-24 20:55:34 +0100 |
---|---|---|
committer | BobTheBob9 <for.oliver.kirkham@gmail.com> | 2022-07-24 20:55:34 +0100 |
commit | 52dc6d143fec8eabb9958bacbdbf6f1b4b4af592 (patch) | |
tree | 61473cc529921fa622d7815b06c8530234248034 /NorthstarDLL/tier0.cpp | |
parent | b0bef05111a95a4cce6250d2b79e2aa5baa6dd98 (diff) | |
download | NorthstarLauncher-52dc6d143fec8eabb9958bacbdbf6f1b4b4af592.tar.gz NorthstarLauncher-52dc6d143fec8eabb9958bacbdbf6f1b4b4af592.zip |
add new memory lib
Diffstat (limited to 'NorthstarDLL/tier0.cpp')
-rw-r--r-- | NorthstarDLL/tier0.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/NorthstarDLL/tier0.cpp b/NorthstarDLL/tier0.cpp index a4ac7752..b2461c7f 100644 --- a/NorthstarDLL/tier0.cpp +++ b/NorthstarDLL/tier0.cpp @@ -19,19 +19,19 @@ CreateGlobalMemAllocType CreateGlobalMemAlloc; void TryCreateGlobalMemAlloc()
{
// init memalloc stuff
- CreateGlobalMemAlloc = reinterpret_cast<CreateGlobalMemAllocType>(GetProcAddress(GetModuleHandleA("tier0.dll"), "CreateGlobalMemAlloc"));
+ CreateGlobalMemAlloc =
+ reinterpret_cast<CreateGlobalMemAllocType>(GetProcAddress(GetModuleHandleA("tier0.dll"), "CreateGlobalMemAlloc"));
Tier0::g_pMemAllocSingleton = CreateGlobalMemAlloc(); // if it already exists, this returns the preexisting IMemAlloc instance
}
-ON_DLL_LOAD("tier0.dll", Tier0GameFuncs, (HMODULE baseAddress))
+ON_DLL_LOAD("tier0.dll", Tier0GameFuncs, (CModule module))
{
// shouldn't be necessary, but do this just in case
TryCreateGlobalMemAlloc();
// setup tier0 funcs
- Tier0::Error = reinterpret_cast<Tier0::ErrorType>(GetProcAddress(baseAddress, "Error"));
- Tier0::CommandLine = reinterpret_cast<Tier0::CommandLineType>(GetProcAddress(baseAddress, "CommandLine"));
- Tier0::Plat_FloatTime = reinterpret_cast<Tier0::Plat_FloatTimeType>(GetProcAddress(baseAddress, "Plat_FloatTime"));
- Tier0::ThreadInServerFrameThread =
- reinterpret_cast<Tier0::ThreadInServerFrameThreadType>(GetProcAddress(baseAddress, "ThreadInServerFrameThread"));
+ Tier0::Error = module.GetExport("Error").As<Tier0::ErrorType>();
+ Tier0::CommandLine = module.GetExport("CommandLine").As<Tier0::CommandLineType>();
+ Tier0::Plat_FloatTime = module.GetExport("Plat_FloatTime").As<Tier0::Plat_FloatTimeType>();
+ Tier0::ThreadInServerFrameThread = module.GetExport("ThreadInServerFrameThread").As<Tier0::ThreadInServerFrameThreadType>();
}
\ No newline at end of file |