aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/core/tier0.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'NorthstarDLL/core/tier0.cpp')
-rw-r--r--NorthstarDLL/core/tier0.cpp30
1 files changed, 0 insertions, 30 deletions
diff --git a/NorthstarDLL/core/tier0.cpp b/NorthstarDLL/core/tier0.cpp
deleted file mode 100644
index 1f59722c..00000000
--- a/NorthstarDLL/core/tier0.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-#include "tier0.h"
-
-IMemAlloc* g_pMemAllocSingleton = nullptr;
-
-CommandLineType CommandLine;
-Plat_FloatTimeType Plat_FloatTime;
-ThreadInServerFrameThreadType ThreadInServerFrameThread;
-
-typedef IMemAlloc* (*CreateGlobalMemAllocType)();
-CreateGlobalMemAllocType CreateGlobalMemAlloc;
-
-// needs to be a seperate function, since memalloc.cpp calls it
-void TryCreateGlobalMemAlloc()
-{
- // init memalloc stuff
- CreateGlobalMemAlloc =
- reinterpret_cast<CreateGlobalMemAllocType>(GetProcAddress(GetModuleHandleA("tier0.dll"), "CreateGlobalMemAlloc"));
- g_pMemAllocSingleton = CreateGlobalMemAlloc(); // if it already exists, this returns the preexisting IMemAlloc instance
-}
-
-ON_DLL_LOAD("tier0.dll", Tier0GameFuncs, (CModule module))
-{
- // shouldn't be necessary, but do this just in case
- TryCreateGlobalMemAlloc();
-
- // setup tier0 funcs
- CommandLine = module.GetExport("CommandLine").RCast<CommandLineType>();
- Plat_FloatTime = module.GetExport("Plat_FloatTime").RCast<Plat_FloatTimeType>();
- ThreadInServerFrameThread = module.GetExport("ThreadInServerFrameThread").RCast<ThreadInServerFrameThreadType>();
-}