aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/gameutils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'NorthstarDedicatedTest/gameutils.cpp')
-rw-r--r--NorthstarDedicatedTest/gameutils.cpp8
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");