diff options
author | Jack <66967891+ASpoonPlaysGames@users.noreply.github.com> | 2023-12-20 13:24:07 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-20 14:24:07 +0100 |
commit | 0438b5c8cfa99ac01c7e142d959aa40f88f1cc70 (patch) | |
tree | bbfdded20f8686cf188dba148db4b6c1b1211872 /NorthstarDLL/core/tier0.cpp | |
parent | 210dab2b0e5c686829bafdc857d2910f6b216b85 (diff) | |
download | NorthstarLauncher-0438b5c8cfa99ac01c7e142d959aa40f88f1cc70.tar.gz NorthstarLauncher-0438b5c8cfa99ac01c7e142d959aa40f88f1cc70.zip |
Cherry pick "remove unnecessary namespaces" from primedev (#618)v1.21.2-rc2
Cherry-picks the removal of unnecessary namespaces from `primedev`
https://github.com/F1F7Y/NorthstarPrime/
Co-authored-by: F1F7Y <filip.bartos07@proton.me>
Diffstat (limited to 'NorthstarDLL/core/tier0.cpp')
-rw-r--r-- | NorthstarDLL/core/tier0.cpp | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/NorthstarDLL/core/tier0.cpp b/NorthstarDLL/core/tier0.cpp index 16709384..1f59722c 100644 --- a/NorthstarDLL/core/tier0.cpp +++ b/NorthstarDLL/core/tier0.cpp @@ -1,17 +1,12 @@ #include "tier0.h" -// use the Tier0 namespace for tier0 funcs -namespace Tier0 -{ - IMemAlloc* g_pMemAllocSingleton = nullptr; +IMemAlloc* g_pMemAllocSingleton = nullptr; - ErrorType Error; - CommandLineType CommandLine; - Plat_FloatTimeType Plat_FloatTime; - ThreadInServerFrameThreadType ThreadInServerFrameThread; -} // namespace Tier0 +CommandLineType CommandLine; +Plat_FloatTimeType Plat_FloatTime; +ThreadInServerFrameThreadType ThreadInServerFrameThread; -typedef Tier0::IMemAlloc* (*CreateGlobalMemAllocType)(); +typedef IMemAlloc* (*CreateGlobalMemAllocType)(); CreateGlobalMemAllocType CreateGlobalMemAlloc; // needs to be a seperate function, since memalloc.cpp calls it @@ -20,7 +15,7 @@ void TryCreateGlobalMemAlloc() // init memalloc stuff CreateGlobalMemAlloc = reinterpret_cast<CreateGlobalMemAllocType>(GetProcAddress(GetModuleHandleA("tier0.dll"), "CreateGlobalMemAlloc")); - Tier0::g_pMemAllocSingleton = CreateGlobalMemAlloc(); // if it already exists, this returns the preexisting IMemAlloc instance + g_pMemAllocSingleton = CreateGlobalMemAlloc(); // if it already exists, this returns the preexisting IMemAlloc instance } ON_DLL_LOAD("tier0.dll", Tier0GameFuncs, (CModule module)) @@ -29,8 +24,7 @@ ON_DLL_LOAD("tier0.dll", Tier0GameFuncs, (CModule module)) TryCreateGlobalMemAlloc(); // setup tier0 funcs - Tier0::Error = module.GetExport("Error").RCast<Tier0::ErrorType>(); - Tier0::CommandLine = module.GetExport("CommandLine").RCast<Tier0::CommandLineType>(); - Tier0::Plat_FloatTime = module.GetExport("Plat_FloatTime").RCast<Tier0::Plat_FloatTimeType>(); - Tier0::ThreadInServerFrameThread = module.GetExport("ThreadInServerFrameThread").RCast<Tier0::ThreadInServerFrameThreadType>(); + CommandLine = module.GetExport("CommandLine").RCast<CommandLineType>(); + Plat_FloatTime = module.GetExport("Plat_FloatTime").RCast<Plat_FloatTimeType>(); + ThreadInServerFrameThread = module.GetExport("ThreadInServerFrameThread").RCast<ThreadInServerFrameThreadType>(); } |