aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/core/tier0.h
diff options
context:
space:
mode:
authorJack <66967891+ASpoonPlaysGames@users.noreply.github.com>2023-12-20 13:24:07 +0000
committerGitHub <noreply@github.com>2023-12-20 14:24:07 +0100
commit0438b5c8cfa99ac01c7e142d959aa40f88f1cc70 (patch)
treebbfdded20f8686cf188dba148db4b6c1b1211872 /NorthstarDLL/core/tier0.h
parent210dab2b0e5c686829bafdc857d2910f6b216b85 (diff)
downloadNorthstarLauncher-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.h')
-rw-r--r--NorthstarDLL/core/tier0.h99
1 files changed, 47 insertions, 52 deletions
diff --git a/NorthstarDLL/core/tier0.h b/NorthstarDLL/core/tier0.h
index eebe98f2..047610b2 100644
--- a/NorthstarDLL/core/tier0.h
+++ b/NorthstarDLL/core/tier0.h
@@ -1,68 +1,63 @@
#pragma once
-namespace Tier0
+
+class IMemAlloc
{
- class IMemAlloc
+ public:
+ struct VTable
{
- public:
- struct VTable
- {
- void* unknown[1]; // alloc debug
- void* (*Alloc)(IMemAlloc* memAlloc, size_t nSize);
- void* unknown2[1]; // realloc debug
- void* (*Realloc)(IMemAlloc* memAlloc, void* pMem, size_t nSize);
- void* unknown3[1]; // free #1
- void (*Free)(IMemAlloc* memAlloc, void* pMem);
- void* unknown4[2]; // nullsubs, maybe CrtSetDbgFlag
- size_t (*GetSize)(IMemAlloc* memAlloc, void* pMem);
- void* unknown5[9]; // they all do literally nothing
- void (*DumpStats)(IMemAlloc* memAlloc);
- void (*DumpStatsFileBase)(IMemAlloc* memAlloc, const char* pchFileBase);
- void* unknown6[4];
- int (*heapchk)(IMemAlloc* memAlloc);
- };
-
- VTable* m_vtable;
+ void* unknown[1]; // alloc debug
+ void* (*Alloc)(IMemAlloc* memAlloc, size_t nSize);
+ void* unknown2[1]; // realloc debug
+ void* (*Realloc)(IMemAlloc* memAlloc, void* pMem, size_t nSize);
+ void* unknown3[1]; // free #1
+ void (*Free)(IMemAlloc* memAlloc, void* pMem);
+ void* unknown4[2]; // nullsubs, maybe CrtSetDbgFlag
+ size_t (*GetSize)(IMemAlloc* memAlloc, void* pMem);
+ void* unknown5[9]; // they all do literally nothing
+ void (*DumpStats)(IMemAlloc* memAlloc);
+ void (*DumpStatsFileBase)(IMemAlloc* memAlloc, const char* pchFileBase);
+ void* unknown6[4];
+ int (*heapchk)(IMemAlloc* memAlloc);
};
- class CCommandLine
- {
- public:
- // based on the defs in the 2013 source sdk, but for some reason has an extra function (may be another CreateCmdLine overload?)
- // these seem to line up with what they should be though
- virtual void CreateCmdLine(const char* commandline) = 0;
- virtual void CreateCmdLine(int argc, char** argv) = 0;
- virtual void unknown() = 0;
- virtual const char* GetCmdLine(void) const = 0;
+ VTable* m_vtable;
+};
- virtual const char* CheckParm(const char* psz, const char** ppszValue = 0) const = 0;
- virtual void RemoveParm() const = 0;
- virtual void AppendParm(const char* pszParm, const char* pszValues) = 0;
+class CCommandLine
+{
+ public:
+ // based on the defs in the 2013 source sdk, but for some reason has an extra function (may be another CreateCmdLine overload?)
+ // these seem to line up with what they should be though
+ virtual void CreateCmdLine(const char* commandline) = 0;
+ virtual void CreateCmdLine(int argc, char** argv) = 0;
+ virtual void unknown() = 0;
+ virtual const char* GetCmdLine(void) const = 0;
- virtual const char* ParmValue(const char* psz, const char* pDefaultVal = 0) const = 0;
- virtual int ParmValue(const char* psz, int nDefaultVal) const = 0;
- virtual float ParmValue(const char* psz, float flDefaultVal) const = 0;
+ virtual const char* CheckParm(const char* psz, const char** ppszValue = 0) const = 0;
+ virtual void RemoveParm() const = 0;
+ virtual void AppendParm(const char* pszParm, const char* pszValues) = 0;
- virtual int ParmCount() const = 0;
- virtual int FindParm(const char* psz) const = 0;
- virtual const char* GetParm(int nIndex) const = 0;
- virtual void SetParm(int nIndex, char const* pParm) = 0;
+ virtual const char* ParmValue(const char* psz, const char* pDefaultVal = 0) const = 0;
+ virtual int ParmValue(const char* psz, int nDefaultVal) const = 0;
+ virtual float ParmValue(const char* psz, float flDefaultVal) const = 0;
- // virtual const char** GetParms() const {}
- };
+ virtual int ParmCount() const = 0;
+ virtual int FindParm(const char* psz) const = 0;
+ virtual const char* GetParm(int nIndex) const = 0;
+ virtual void SetParm(int nIndex, char const* pParm) = 0;
- extern IMemAlloc* g_pMemAllocSingleton;
+ // virtual const char** GetParms() const {}
+};
- typedef void (*ErrorType)(const char* fmt, ...);
- extern ErrorType Error;
+extern IMemAlloc* g_pMemAllocSingleton;
- typedef CCommandLine* (*CommandLineType)();
- extern CommandLineType CommandLine;
+typedef CCommandLine* (*CommandLineType)();
+extern CommandLineType CommandLine;
- typedef double (*Plat_FloatTimeType)();
- extern Plat_FloatTimeType Plat_FloatTime;
+typedef double (*Plat_FloatTimeType)();
+extern Plat_FloatTimeType Plat_FloatTime;
- typedef bool (*ThreadInServerFrameThreadType)();
- extern ThreadInServerFrameThreadType ThreadInServerFrameThread;
-} // namespace Tier0
+typedef bool (*ThreadInServerFrameThreadType)();
+extern ThreadInServerFrameThreadType ThreadInServerFrameThread;
void TryCreateGlobalMemAlloc();