diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-12-03 20:55:19 +0000 |
---|---|---|
committer | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-12-03 20:55:19 +0000 |
commit | 9e8232e97db1cfe9f0f9a69bdfde5048a6290df1 (patch) | |
tree | be1324c39dd1680335f4bfaf3d1660b5d6e31514 /NorthstarDedicatedTest/gameutils.cpp | |
parent | f33bab4fb3586fd06896a7730bce8913c2616b78 (diff) | |
download | NorthstarLauncher-9e8232e97db1cfe9f0f9a69bdfde5048a6290df1.tar.gz NorthstarLauncher-9e8232e97db1cfe9f0f9a69bdfde5048a6290df1.zip |
slightly awful fix for allocation issues
Diffstat (limited to 'NorthstarDedicatedTest/gameutils.cpp')
-rw-r--r-- | NorthstarDedicatedTest/gameutils.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/NorthstarDedicatedTest/gameutils.cpp b/NorthstarDedicatedTest/gameutils.cpp index 714395c6..c0c01aad 100644 --- a/NorthstarDedicatedTest/gameutils.cpp +++ b/NorthstarDedicatedTest/gameutils.cpp @@ -3,6 +3,11 @@ #include "convar.h" #include "concommand.h" +// memory +IMemAlloc* g_pMemAllocSingleton; +typedef IMemAlloc* (*CreateGlobalMemAllocType)(); +CreateGlobalMemAllocType CreateGlobalMemAlloc; + // cmd.h Cbuf_GetCurrentPlayerType Cbuf_GetCurrentPlayer; Cbuf_AddTextType Cbuf_AddText; @@ -75,6 +80,9 @@ void InitialiseTier0GameUtilFunctions(HMODULE baseAddress) { baseAddress = GetModuleHandleA("tier0.dll"); + CreateGlobalMemAlloc = (CreateGlobalMemAllocType)GetProcAddress(baseAddress, "CreateGlobalMemAlloc"); + g_pMemAllocSingleton = CreateGlobalMemAlloc(); + Error = (ErrorType)GetProcAddress(baseAddress, "Error"); CommandLine = (CommandLineType)GetProcAddress(baseAddress, "CommandLine"); Plat_FloatTime = (Plat_FloatTimeType)GetProcAddress(baseAddress, "Plat_FloatTime"); |