aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/core
diff options
context:
space:
mode:
authorGeckoEidechse <gecko.eidechse+git@pm.me>2023-09-17 01:45:16 +0200
committerGeckoEidechse <gecko.eidechse+git@pm.me>2023-09-17 01:45:16 +0200
commit5cbe9f7317899cd815b38d9f083bc99738fc1dd3 (patch)
tree9afdce5ae5e76f68be85c25a84afcff86f31d3f8 /NorthstarDLL/core
parentb7823492e802456d44e4919940267081bf436f08 (diff)
downloadNorthstarLauncher-indentation-test.tar.gz
NorthstarLauncher-indentation-test.zip
test ci format checkindentation-test
Diffstat (limited to 'NorthstarDLL/core')
-rw-r--r--NorthstarDLL/core/convar/concommand.cpp4
-rw-r--r--NorthstarDLL/core/convar/concommand.h4
-rw-r--r--NorthstarDLL/core/convar/convar.cpp40
-rw-r--r--NorthstarDLL/core/convar/convar.h96
-rw-r--r--NorthstarDLL/core/filesystem/filesystem.cpp2
-rw-r--r--NorthstarDLL/core/filesystem/filesystem.h2
-rw-r--r--NorthstarDLL/core/filesystem/rpakfilesystem.cpp4
-rw-r--r--NorthstarDLL/core/hooks.cpp20
-rw-r--r--NorthstarDLL/core/hooks.h28
-rw-r--r--NorthstarDLL/core/math/bitbuf.h462
-rw-r--r--NorthstarDLL/core/memalloc.cpp2
-rw-r--r--NorthstarDLL/core/memalloc.h2
-rw-r--r--NorthstarDLL/core/memory.cpp6
-rw-r--r--NorthstarDLL/core/memory.h2
-rw-r--r--NorthstarDLL/core/structs.h4
-rw-r--r--NorthstarDLL/core/tier0.cpp2
16 files changed, 340 insertions, 340 deletions
diff --git a/NorthstarDLL/core/convar/concommand.cpp b/NorthstarDLL/core/convar/concommand.cpp
index 732e0d1f..2be16ca5 100644
--- a/NorthstarDLL/core/convar/concommand.cpp
+++ b/NorthstarDLL/core/convar/concommand.cpp
@@ -123,7 +123,7 @@ char* ConCommandBase::CopyString(const char* szFrom) const
}
typedef void (*ConCommandConstructorType)(
- ConCommand* newCommand, const char* name, FnCommandCallback_t callback, const char* helpString, int flags, void* parent);
+ ConCommand* newCommand, const char* name, FnCommandCallback_t callback, const char* helpString, int flags, void* parent);
ConCommandConstructorType ConCommandConstructor;
void RegisterConCommand(const char* name, FnCommandCallback_t callback, const char* helpString, int flags)
@@ -136,7 +136,7 @@ void RegisterConCommand(const char* name, FnCommandCallback_t callback, const ch
}
void RegisterConCommand(
- const char* name, FnCommandCallback_t callback, const char* helpString, int flags, FnCommandCompletionCallback completionCallback)
+ const char* name, FnCommandCallback_t callback, const char* helpString, int flags, FnCommandCompletionCallback completionCallback)
{
spdlog::info("Registering ConCommand {}", name);
diff --git a/NorthstarDLL/core/convar/concommand.h b/NorthstarDLL/core/convar/concommand.h
index 89363bc7..4f77451c 100644
--- a/NorthstarDLL/core/convar/concommand.h
+++ b/NorthstarDLL/core/convar/concommand.h
@@ -84,7 +84,7 @@ typedef void (*FnCommandCallback_t)(const CCommand& command);
// Returns 0 to COMMAND_COMPLETION_MAXITEMS worth of completion strings
//-----------------------------------------------------------------------------
typedef int (*__fastcall FnCommandCompletionCallback)(
- const char* partial, char commands[COMMAND_COMPLETION_MAXITEMS][COMMAND_COMPLETION_ITEM_LENGTH]);
+ const char* partial, char commands[COMMAND_COMPLETION_MAXITEMS][COMMAND_COMPLETION_ITEM_LENGTH]);
// From r5reloaded
class ConCommandBase
@@ -137,4 +137,4 @@ class ConCommand : public ConCommandBase
void RegisterConCommand(const char* name, void (*callback)(const CCommand&), const char* helpString, int flags);
void RegisterConCommand(
- const char* name, void (*callback)(const CCommand&), const char* helpString, int flags, FnCommandCompletionCallback completionCallback);
+ const char* name, void (*callback)(const CCommand&), const char* helpString, int flags, FnCommandCompletionCallback completionCallback);
diff --git a/NorthstarDLL/core/convar/convar.cpp b/NorthstarDLL/core/convar/convar.cpp
index 9aaaca66..15d93fa7 100644
--- a/NorthstarDLL/core/convar/convar.cpp
+++ b/NorthstarDLL/core/convar/convar.cpp
@@ -8,16 +8,16 @@
#include <float.h>
typedef void (*ConVarRegisterType)(
- ConVar* pConVar,
- const char* pszName,
- const char* pszDefaultValue,
- int nFlags,
- const char* pszHelpString,
- bool bMin,
- float fMin,
- bool bMax,
- float fMax,
- void* pCallback);
+ ConVar* pConVar,
+ const char* pszName,
+ const char* pszDefaultValue,
+ int nFlags,
+ const char* pszHelpString,
+ bool bMin,
+ float fMin,
+ bool bMax,
+ float fMax,
+ void* pCallback);
ConVarRegisterType conVarRegister;
typedef void (*ConVarMallocType)(void* pConVarMaloc, int a2, int a3);
@@ -64,15 +64,15 @@ ConVar::ConVar(const char* pszName, const char* pszDefaultValue, int nFlags, con
// Purpose: constructor
//-----------------------------------------------------------------------------
ConVar::ConVar(
- const char* pszName,
- const char* pszDefaultValue,
- int nFlags,
- const char* pszHelpString,
- bool bMin,
- float fMin,
- bool bMax,
- float fMax,
- FnChangeCallback_t pCallback)
+ const char* pszName,
+ const char* pszDefaultValue,
+ int nFlags,
+ const char* pszHelpString,
+ bool bMin,
+ float fMin,
+ bool bMax,
+ float fMax,
+ FnChangeCallback_t pCallback)
{
spdlog::info("Registering Convar {}", pszName);
@@ -423,7 +423,7 @@ bool ConVar::SetColorFromString(const char* pszValue)
}
if (nRGBA[0] >= 0 && nRGBA[0] <= 255 && nRGBA[1] >= 0 && nRGBA[1] <= 255 && nRGBA[2] >= 0 && nRGBA[2] <= 255 && nRGBA[3] >= 0 &&
- nRGBA[3] <= 255)
+ nRGBA[3] <= 255)
{
// printf("*** WOW! Found a color!! ***\n");
diff --git a/NorthstarDLL/core/convar/convar.h b/NorthstarDLL/core/convar/convar.h
index 4b00e25f..532f60e7 100644
--- a/NorthstarDLL/core/convar/convar.h
+++ b/NorthstarDLL/core/convar/convar.h
@@ -20,7 +20,7 @@
// ConVar only
#define FCVAR_PROTECTED \
(1 << 5) // It's a server cvar, but we don't send the data since it's a password, etc. Sends 1 if it's not bland/zero, 0 otherwise as
- // value.
+ // value.
#define FCVAR_SPONLY (1 << 6) // This cvar cannot be changed by clients connected to a multiplayer server.
#define FCVAR_ARCHIVE (1 << 7) // set to cause it to be saved to vars.rc
#define FCVAR_NOTIFY (1 << 8) // notifies players when changed
@@ -29,8 +29,8 @@
#define FCVAR_PRINTABLEONLY (1 << 10) // This cvar's string cannot contain unprintable characters ( e.g., used for player name etc ).
#define FCVAR_GAMEDLL_FOR_REMOTE_CLIENTS \
(1 << 10) // When on concommands this allows remote clients to execute this cmd on the server.
- // We are changing the default behavior of concommands to disallow execution by remote clients without
- // this flag due to the number existing concommands that can lag or crash the server when clients abuse them.
+ // We are changing the default behavior of concommands to disallow execution by remote clients without
+ // this flag due to the number existing concommands that can lag or crash the server when clients abuse them.
#define FCVAR_UNLOGGED (1 << 11) // If this is a FCVAR_SERVER, don't log changes to the log file / console if we are creating a log
#define FCVAR_NEVER_AS_STRING (1 << 12) // never try to print that cvar
@@ -55,7 +55,7 @@
#define FCVAR_SERVER_CAN_EXECUTE \
(1 << 28) // the server is allowed to execute this command on clients via
- // ClientCommand/NET_StringCmd/CBaseClientState::ProcessStringCmd.
+ // ClientCommand/NET_StringCmd/CBaseClientState::ProcessStringCmd.
#define FCVAR_SERVER_CANNOT_QUERY \
(1 << 29) // If this is set, then the server is not allowed to query this cvar's value (via IServerPluginHelpers::StartQueryCvarValue).
@@ -64,7 +64,7 @@
// FCVAR_GAMEDLL_FOR_REMOTE_CLIENTS in all places this flag was previously used
#define FCVAR_CLIENTCMD_CAN_EXECUTE \
(1 << 30) // IVEngineClient::ClientCmd is allowed to execute this command.
- // Note: IVEngineClient::ClientCmd_Unrestricted can run any client command.
+ // Note: IVEngineClient::ClientCmd_Unrestricted can run any client command.
#define FCVAR_ACCESSIBLE_FROM_THREADS (1 << 25) // used as a debugging tool necessary to check material system thread convars
@@ -75,40 +75,40 @@
// flag => string stuff
const std::multimap<int, const char*> g_PrintCommandFlags = {
- {FCVAR_UNREGISTERED, "UNREGISTERED"},
- {FCVAR_DEVELOPMENTONLY, "DEVELOPMENTONLY"},
- {FCVAR_GAMEDLL, "GAMEDLL"},
- {FCVAR_CLIENTDLL, "CLIENTDLL"},
- {FCVAR_HIDDEN, "HIDDEN"},
- {FCVAR_PROTECTED, "PROTECTED"},
- {FCVAR_SPONLY, "SPONLY"},
- {FCVAR_ARCHIVE, "ARCHIVE"},
- {FCVAR_NOTIFY, "NOTIFY"},
- {FCVAR_USERINFO, "USERINFO"},
-
- // TODO: PRINTABLEONLY and GAMEDLL_FOR_REMOTE_CLIENTS are both 1<<10, one is for vars and one is for commands
- // this fucking sucks i think
- {FCVAR_PRINTABLEONLY, "PRINTABLEONLY"},
- {FCVAR_GAMEDLL_FOR_REMOTE_CLIENTS, "GAMEDLL_FOR_REMOTE_CLIENTS"},
-
- {FCVAR_UNLOGGED, "UNLOGGED"},
- {FCVAR_NEVER_AS_STRING, "NEVER_AS_STRING"},
- {FCVAR_REPLICATED, "REPLICATED"},
- {FCVAR_CHEAT, "CHEAT"},
- {FCVAR_SS, "SS"},
- {FCVAR_DEMO, "DEMO"},
- {FCVAR_DONTRECORD, "DONTRECORD"},
- {FCVAR_SS_ADDED, "SS_ADDED"},
- {FCVAR_RELEASE, "RELEASE"},
- {FCVAR_RELOAD_MATERIALS, "RELOAD_MATERIALS"},
- {FCVAR_RELOAD_TEXTURES, "RELOAD_TEXTURES"},
- {FCVAR_NOT_CONNECTED, "NOT_CONNECTED"},
- {FCVAR_MATERIAL_SYSTEM_THREAD, "MATERIAL_SYSTEM_THREAD"},
- {FCVAR_ARCHIVE_PLAYERPROFILE, "ARCHIVE_PLAYERPROFILE"},
- {FCVAR_SERVER_CAN_EXECUTE, "SERVER_CAN_EXECUTE"},
- {FCVAR_SERVER_CANNOT_QUERY, "SERVER_CANNOT_QUERY"},
- {FCVAR_CLIENTCMD_CAN_EXECUTE, "UNKNOWN"},
- {FCVAR_ACCESSIBLE_FROM_THREADS, "ACCESSIBLE_FROM_THREADS"}};
+ {FCVAR_UNREGISTERED, "UNREGISTERED"},
+ {FCVAR_DEVELOPMENTONLY, "DEVELOPMENTONLY"},
+ {FCVAR_GAMEDLL, "GAMEDLL"},
+ {FCVAR_CLIENTDLL, "CLIENTDLL"},
+ {FCVAR_HIDDEN, "HIDDEN"},
+ {FCVAR_PROTECTED, "PROTECTED"},
+ {FCVAR_SPONLY, "SPONLY"},
+ {FCVAR_ARCHIVE, "ARCHIVE"},
+ {FCVAR_NOTIFY, "NOTIFY"},
+ {FCVAR_USERINFO, "USERINFO"},
+
+ // TODO: PRINTABLEONLY and GAMEDLL_FOR_REMOTE_CLIENTS are both 1<<10, one is for vars and one is for commands
+ // this fucking sucks i think
+ {FCVAR_PRINTABLEONLY, "PRINTABLEONLY"},
+ {FCVAR_GAMEDLL_FOR_REMOTE_CLIENTS, "GAMEDLL_FOR_REMOTE_CLIENTS"},
+
+ {FCVAR_UNLOGGED, "UNLOGGED"},
+ {FCVAR_NEVER_AS_STRING, "NEVER_AS_STRING"},
+ {FCVAR_REPLICATED, "REPLICATED"},
+ {FCVAR_CHEAT, "CHEAT"},
+ {FCVAR_SS, "SS"},
+ {FCVAR_DEMO, "DEMO"},
+ {FCVAR_DONTRECORD, "DONTRECORD"},
+ {FCVAR_SS_ADDED, "SS_ADDED"},
+ {FCVAR_RELEASE, "RELEASE"},
+ {FCVAR_RELOAD_MATERIALS, "RELOAD_MATERIALS"},
+ {FCVAR_RELOAD_TEXTURES, "RELOAD_TEXTURES"},
+ {FCVAR_NOT_CONNECTED, "NOT_CONNECTED"},
+ {FCVAR_MATERIAL_SYSTEM_THREAD, "MATERIAL_SYSTEM_THREAD"},
+ {FCVAR_ARCHIVE_PLAYERPROFILE, "ARCHIVE_PLAYERPROFILE"},
+ {FCVAR_SERVER_CAN_EXECUTE, "SERVER_CAN_EXECUTE"},
+ {FCVAR_SERVER_CANNOT_QUERY, "SERVER_CANNOT_QUERY"},
+ {FCVAR_CLIENTCMD_CAN_EXECUTE, "UNKNOWN"},
+ {FCVAR_ACCESSIBLE_FROM_THREADS, "ACCESSIBLE_FROM_THREADS"}};
//-----------------------------------------------------------------------------
// Forward declarations
@@ -128,15 +128,15 @@ class ConVar
ConVar(void) {};
ConVar(const char* pszName, const char* pszDefaultValue, int nFlags, const char* pszHelpString);
ConVar(
- const char* pszName,
- const char* pszDefaultValue,
- int nFlags,
- const char* pszHelpString,
- bool bMin,
- float fMin,
- bool bMax,
- float fMax,
- FnChangeCallback_t pCallback);
+ const char* pszName,
+ const char* pszDefaultValue,
+ int nFlags,
+ const char* pszHelpString,
+ bool bMin,
+ float fMin,
+ bool bMax,
+ float fMax,
+ FnChangeCallback_t pCallback);
~ConVar(void);
const char* GetBaseName(void) const;
diff --git a/NorthstarDLL/core/filesystem/filesystem.cpp b/NorthstarDLL/core/filesystem/filesystem.cpp
index e4da647f..e3b76a45 100644
--- a/NorthstarDLL/core/filesystem/filesystem.cpp
+++ b/NorthstarDLL/core/filesystem/filesystem.cpp
@@ -74,7 +74,7 @@ void SetNewModSearchPaths(Mod* mod)
if ((fs::absolute(mod->m_ModDirectory) / MOD_OVERRIDE_DIR).string().compare(sCurrentModPath))
{
AddSearchPath(
- &*(*g_pFilesystem), (fs::absolute(mod->m_ModDirectory) / MOD_OVERRIDE_DIR).string().c_str(), "GAME", PATH_ADD_TO_HEAD);
+ &*(*g_pFilesystem), (fs::absolute(mod->m_ModDirectory) / MOD_OVERRIDE_DIR).string().c_str(), "GAME", PATH_ADD_TO_HEAD);
sCurrentModPath = (fs::absolute(mod->m_ModDirectory) / MOD_OVERRIDE_DIR).string();
}
}
diff --git a/NorthstarDLL/core/filesystem/filesystem.h b/NorthstarDLL/core/filesystem/filesystem.h
index ac1c5986..c2c6b7d0 100644
--- a/NorthstarDLL/core/filesystem/filesystem.h
+++ b/NorthstarDLL/core/filesystem/filesystem.h
@@ -52,7 +52,7 @@ class IFileSystem
int (*Read)(IFileSystem::VTable2** fileSystem, void* pOutput, int size, FileHandle_t file);
void* unknown[1];
FileHandle_t (*Open)(
- IFileSystem::VTable2** fileSystem, const char* pFileName, const char* pOptions, const char* pathID, int64_t unknown);
+ IFileSystem::VTable2** fileSystem, const char* pFileName, const char* pOptions, const char* pathID, int64_t unknown);
void (*Close)(IFileSystem* fileSystem, FileHandle_t file);
long long (*Seek)(IFileSystem::VTable2** fileSystem, FileHandle_t file, long long offset, long long whence);
void* unknown2[5];
diff --git a/NorthstarDLL/core/filesystem/rpakfilesystem.cpp b/NorthstarDLL/core/filesystem/rpakfilesystem.cpp
index 8d50b07a..bb936006 100644
--- a/NorthstarDLL/core/filesystem/rpakfilesystem.cpp
+++ b/NorthstarDLL/core/filesystem/rpakfilesystem.cpp
@@ -165,7 +165,7 @@ void LoadCustomMapPaks(char** pakName, bool* bNeedToFreePakName)
bHasOriginalPak = true;
*bNeedToFreePakName =
- true; // we can't free this memory until we're done with the pak, so let whatever's calling this deal with it
+ true; // we can't free this memory until we're done with the pak, so let whatever's calling this deal with it
}
else
g_pPakLoadManager->LoadPakAsync((modPakPath / pak.m_sPakName).string().c_str(), ePakLoadSource::MAP);
@@ -210,7 +210,7 @@ int, __fastcall, (char* pPath, void* unknownSingleton, int flags, void* pCallbac
// sp_<map> rpaks contain tutorial ghost data
// sucks to have to load the entire rpak for that but sp was never meant to be done on dedi
if (IsDedicatedServer() && (Tier0::CommandLine()->CheckParm("-nopakdedi") ||
- strncmp(&originalPath[0], "common", 6) && strncmp(&originalPath[0], "sp_", 3)))
+ strncmp(&originalPath[0], "common", 6) && strncmp(&originalPath[0], "sp_", 3)))
{
if (bNeedToFreePakName)
delete[] pPath;
diff --git a/NorthstarDLL/core/hooks.cpp b/NorthstarDLL/core/hooks.cpp
index 4363c0e2..1d251a58 100644
--- a/NorthstarDLL/core/hooks.cpp
+++ b/NorthstarDLL/core/hooks.cpp
@@ -13,7 +13,7 @@ AUTOHOOK_INIT()
// called from the ON_DLL_LOAD macros
__dllLoadCallback::__dllLoadCallback(
- eDllLoadCallbackSide side, const std::string dllName, DllLoadCallbackFuncType callback, std::string uniqueStr, std::string reliesOn)
+ eDllLoadCallbackSide side, const std::string dllName, DllLoadCallbackFuncType callback, std::string uniqueStr, std::string reliesOn)
{
// parse reliesOn array from string
std::vector<std::string> reliesOnArray;
@@ -78,7 +78,7 @@ void __fileAutohook::DispatchForModule(const char* pModuleName)
for (__autohook* hook : hooks)
if ((hook->iAddressResolutionMode == __autohook::OFFSET_STRING && !strncmp(pModuleName, hook->pAddrString, iModuleNameLen)) ||
- (hook->iAddressResolutionMode == __autohook::PROCADDRESS && !strcmp(pModuleName, hook->pModuleName)))
+ (hook->iAddressResolutionMode == __autohook::PROCADDRESS && !strcmp(pModuleName, hook->pModuleName)))
hook->Dispatch();
}
@@ -184,7 +184,7 @@ void AddDllLoadCallback(std::string dll, DllLoadCallbackFuncType callback, std::
}
void AddDllLoadCallbackForDedicatedServer(
- std::string dll, DllLoadCallbackFuncType callback, std::string tag, std::vector<std::string> reliesOn)
+ std::string dll, DllLoadCallbackFuncType callback, std::string tag, std::vector<std::string> reliesOn)
{
if (!IsDedicatedServer())
return;
@@ -254,13 +254,13 @@ AUTOHOOK_ABSOLUTEADDR(_GetCommandLineA, (LPVOID)GetCommandLineA, LPSTR, WINAPI,
// both either space after or ending with
if (!isDedi && argBuffer.str().find("-northstar") != std::string::npos)
MessageBoxA(
- NULL,
- "The \"-northstar\" command line option is NOT supposed to go into ns_startup_args.txt file!\n\nThis option is "
- "supposed to go into Origin/Steam game launch options, and then you are supposed to launch the original "
- "Titanfall2.exe "
- "rather than NorthstarLauncher.exe to make use of it.",
- "Northstar Warning",
- MB_ICONWARNING);
+ NULL,
+ "The \"-northstar\" command line option is NOT supposed to go into ns_startup_args.txt file!\n\nThis option is "
+ "supposed to go into Origin/Steam game launch options, and then you are supposed to launch the original "
+ "Titanfall2.exe "
+ "rather than NorthstarLauncher.exe to make use of it.",
+ "Northstar Warning",
+ MB_ICONWARNING);
args.append(argBuffer.str());
}
diff --git a/NorthstarDLL/core/hooks.h b/NorthstarDLL/core/hooks.h
index 8721628a..1aac5bf3 100644
--- a/NorthstarDLL/core/hooks.h
+++ b/NorthstarDLL/core/hooks.h
@@ -9,9 +9,9 @@ void InstallInitialHooks();
typedef void (*DllLoadCallbackFuncType)(CModule moduleAddress);
void AddDllLoadCallback(std::string dll, DllLoadCallbackFuncType callback, std::string tag = "", std::vector<std::string> reliesOn = {});
void AddDllLoadCallbackForDedicatedServer(
- std::string dll, DllLoadCallbackFuncType callback, std::string tag = "", std::vector<std::string> reliesOn = {});
+ std::string dll, DllLoadCallbackFuncType callback, std::string tag = "", std::vector<std::string> reliesOn = {});
void AddDllLoadCallbackForClient(
- std::string dll, DllLoadCallbackFuncType callback, std::string tag = "", std::vector<std::string> reliesOn = {});
+ std::string dll, DllLoadCallbackFuncType callback, std::string tag = "", std::vector<std::string> reliesOn = {});
void CallAllPendingDLLLoadCallbacks();
@@ -28,11 +28,11 @@ class __dllLoadCallback
public:
__dllLoadCallback() = delete;
__dllLoadCallback(
- eDllLoadCallbackSide side,
- const std::string dllName,
- DllLoadCallbackFuncType callback,
- std::string uniqueStr,
- std::string reliesOn);
+ eDllLoadCallbackSide side,
+ const std::string dllName,
+ DllLoadCallbackFuncType callback,
+ std::string uniqueStr,
+ std::string reliesOn);
};
#define __CONCAT3(x, y, z) x##y##z
@@ -47,7 +47,7 @@ class __dllLoadCallback
namespace \
{ \
__dllLoadCallback CONCAT2(__dllLoadCallbackInstance, __LINE__)( \
- side, dllName, CONCAT2(__dllLoadCallback, uniquestr), __STR(uniquestr), reliesOn); \
+ side, dllName, CONCAT2(__dllLoadCallback, uniquestr), __STR(uniquestr), reliesOn); \
} \
void CONCAT2(__dllLoadCallback, uniquestr) args
@@ -115,7 +115,7 @@ class __autohook
__autohook() = delete;
__autohook(__fileAutohook* autohook, const char* funcName, LPVOID absoluteAddress, LPVOID* orig, LPVOID func)
- : pHookFunc(func), ppOrigFunc(orig), iAbsoluteAddress(absoluteAddress)
+ : pHookFunc(func), ppOrigFunc(orig), iAbsoluteAddress(absoluteAddress)
{
iAddressResolutionMode = ABSOLUTE_ADDR;
@@ -127,7 +127,7 @@ class __autohook
}
__autohook(__fileAutohook* autohook, const char* funcName, const char* addrString, LPVOID* orig, LPVOID func)
- : pHookFunc(func), ppOrigFunc(orig)
+ : pHookFunc(func), ppOrigFunc(orig)
{
iAddressResolutionMode = OFFSET_STRING;
@@ -143,7 +143,7 @@ class __autohook
}
__autohook(__fileAutohook* autohook, const char* funcName, const char* moduleName, const char* procName, LPVOID* orig, LPVOID func)
- : pHookFunc(func), ppOrigFunc(orig)
+ : pHookFunc(func), ppOrigFunc(orig)
{
iAddressResolutionMode = PROCADDRESS;
@@ -221,7 +221,7 @@ class __autohook
{ \
type(*callingConvention name) args; \
__autohook CONCAT2(__autohook, __LINE__)( \
- &__FILEAUTOHOOK, __STR(name), __STR(addrString), (LPVOID*)&name, (LPVOID)CONCAT2(__autohookfunc, name)); \
+ &__FILEAUTOHOOK, __STR(name), __STR(addrString), (LPVOID*)&name, (LPVOID)CONCAT2(__autohookfunc, name)); \
} \
type callingConvention CONCAT2(__autohookfunc, name) args
@@ -232,7 +232,7 @@ class __autohook
{ \
type(*callingConvention name) args; \
__autohook \
- CONCAT2(__autohook, __LINE__)(&__FILEAUTOHOOK, __STR(name), addr, (LPVOID*)&name, (LPVOID)CONCAT2(__autohookfunc, name)); \
+ CONCAT2(__autohook, __LINE__)(&__FILEAUTOHOOK, __STR(name), addr, (LPVOID*)&name, (LPVOID)CONCAT2(__autohookfunc, name)); \
} \
type callingConvention CONCAT2(__autohookfunc, name) args
@@ -243,7 +243,7 @@ class __autohook
{ \
type(*callingConvention name) args; \
__autohook CONCAT2(__autohook, __LINE__)( \
- &__FILEAUTOHOOK, __STR(name), __STR(moduleName), __STR(procName), (LPVOID*)&name, (LPVOID)CONCAT2(__autohookfunc, name)); \
+ &__FILEAUTOHOOK, __STR(name), __STR(moduleName), __STR(procName), (LPVOID*)&name, (LPVOID)CONCAT2(__autohookfunc, name)); \
} \
type callingConvention CONCAT2(__autohookfunc, name) \
args
diff --git a/NorthstarDLL/core/math/bitbuf.h b/NorthstarDLL/core/math/bitbuf.h
index 8e8e216f..fbcc1b51 100644
--- a/NorthstarDLL/core/math/bitbuf.h
+++ b/NorthstarDLL/core/math/bitbuf.h
@@ -7,9 +7,9 @@
INLINE int GetBitForBitnum(int bitNum)
{
static int bitsForBitnum[] = {
- (1 << 0), (1 << 1), (1 << 2), (1 << 3), (1 << 4), (1 << 5), (1 << 6), (1 << 7), (1 << 8), (1 << 9), (1 << 10),
- (1 << 11), (1 << 12), (1 << 13), (1 << 14), (1 << 15), (1 << 16), (1 << 17), (1 << 18), (1 << 19), (1 << 20), (1 << 21),
- (1 << 22), (1 << 23), (1 << 24), (1 << 25), (1 << 26), (1 << 27), (1 << 28), (1 << 29), (1 << 30), (1 << 31),
+ (1 << 0), (1 << 1), (1 << 2), (1 << 3), (1 << 4), (1 << 5), (1 << 6), (1 << 7), (1 << 8), (1 << 9), (1 << 10),
+ (1 << 11), (1 << 12), (1 << 13), (1 << 14), (1 << 15), (1 << 16), (1 << 17), (1 << 18), (1 << 19), (1 << 20), (1 << 21),
+ (1 << 22), (1 << 23), (1 << 24), (1 << 25), (1 << 26), (1 << 27), (1 << 28), (1 << 29), (1 << 30), (1 << 31),
};
return bitsForBitnum[(bitNum) & (BITS_PER_INT - 1)];
@@ -45,39 +45,39 @@ static INLINE u32 LoadLittleDWord(u32* base, size_t dwordIndex)
#include <algorithm>
static inline const u32 s_nMaskTable[33] = {
- 0,
- (1 << 1) - 1,
- (1 << 2) - 1,
- (1 << 3) - 1,
- (1 << 4) - 1,
- (1 << 5) - 1,
- (1 << 6) - 1,
- (1 << 7) - 1,
- (1 << 8) - 1,
- (1 << 9) - 1,
- (1 << 10) - 1,
- (1 << 11) - 1,
- (1 << 12) - 1,
- (1 << 13) - 1,
- (1 << 14) - 1,
- (1 << 15) - 1,
- (1 << 16) - 1,
- (1 << 17) - 1,
- (1 << 18) - 1,
- (1 << 19) - 1,
- (1 << 20) - 1,
- (1 << 21) - 1,
- (1 << 22) - 1,
- (1 << 23) - 1,
- (1 << 24) - 1,
- (1 << 25) - 1,
- (1 << 26) - 1,
- (1 << 27) - 1,
- (1 << 28) - 1,
- (1 << 29) - 1,
- (1 << 30) - 1,
- 0x7fffffff,
- 0xffffffff,
+ 0,
+ (1 << 1) - 1,
+ (1 << 2) - 1,
+ (1 << 3) - 1,
+ (1 << 4) - 1,
+ (1 << 5) - 1,
+ (1 << 6) - 1,
+ (1 << 7) - 1,
+ (1 << 8) - 1,
+ (1 << 9) - 1,
+ (1 << 10) - 1,
+ (1 << 11) - 1,
+ (1 << 12) - 1,
+ (1 << 13) - 1,
+ (1 << 14) - 1,
+ (1 << 15) - 1,
+ (1 << 16) - 1,
+ (1 << 17) - 1,
+ (1 << 18) - 1,
+ (1 << 19) - 1,
+ (1 << 20) - 1,
+ (1 << 21) - 1,
+ (1 << 22) - 1,
+ (1 << 23) - 1,
+ (1 << 24) - 1,
+ (1 << 25) - 1,
+ (1 << 26) - 1,
+ (1 << 27) - 1,
+ (1 << 28) - 1,
+ (1 << 29) - 1,
+ (1 << 30) - 1,
+ 0x7fffffff,
+ 0xffffffff,
};
enum EBitCoordType
@@ -273,158 +273,158 @@ class BFRead : public BitBufferBase
}
/*INLINE float ReadBitCoord() {
- i32 intval = 0, fractval = 0, signbit = 0;
- float value = 0.0;
-
- // Read the required integer and fraction flags
- intval = ReadOneBit();
- fractval = ReadOneBit();
-
- // If we got either parse them, otherwise it's a zero.
- if (intval || fractval) {
- // Read the sign bit
- signbit = ReadOneBit();
-
- // If there's an integer, read it in
- if (intval) {
- // Adjust the integers from [0..MAX_COORD_VALUE-1] to [1..MAX_COORD_VALUE]
- intval = ReadUBitLong(COORD_INTEGER_BITS) + 1;
- }
+ i32 intval = 0, fractval = 0, signbit = 0;
+ float value = 0.0;
- // If there's a fraction, read it in
- if (fractval) {
- fractval = ReadUBitLong(COORD_FRACTIONAL_BITS);
- }
+ // Read the required integer and fraction flags
+ intval = ReadOneBit();
+ fractval = ReadOneBit();
- // Calculate the correct floating point value
- value = intval + ((float)fractval * COORD_RESOLUTION);
+ // If we got either parse them, otherwise it's a zero.
+ if (intval || fractval) {
+ // Read the sign bit
+ signbit = ReadOneBit();
- // Fixup the sign if negative.
- if (signbit)
- value = -value;
- }
+ // If there's an integer, read it in
+ if (intval) {
+ // Adjust the integers from [0..MAX_COORD_VALUE-1] to [1..MAX_COORD_VALUE]
+ intval = ReadUBitLong(COORD_INTEGER_BITS) + 1;
+ }
+
+ // If there's a fraction, read it in
+ if (fractval) {
+ fractval = ReadUBitLong(COORD_FRACTIONAL_BITS);
+ }
+
+ // Calculate the correct floating point value
+ value = intval + ((float)fractval * COORD_RESOLUTION);
+
+ // Fixup the sign if negative.
+ if (signbit)
+ value = -value;
+ }
- return value;
+ return value;
}
INLINE float ReadBitCoordMP() {
- i32 intval = 0, fractval = 0, signbit = 0;
- float value = 0.0;
+ i32 intval = 0, fractval = 0, signbit = 0;
+ float value = 0.0;
- bool inBounds = ReadOneBit() ? true : false;
+ bool inBounds = ReadOneBit() ? true : false;
- // Read the required integer and fraction flags
- intval = ReadOneBit();
+ // Read the required integer and fraction flags
+ intval = ReadOneBit();
- // If we got either parse them, otherwise it's a zero.
- if (intval) {
- // Read the sign bit
- signbit = ReadOneBit();
+ // If we got either parse them, otherwise it's a zero.
+ if (intval) {
+ // Read the sign bit
+ signbit = ReadOneBit();
- // If there's an integer, read it in
- // Adjust the integers from [0..MAX_COORD_VALUE-1] to [1..MAX_COORD_VALUE]
- if (inBounds)
- value = ReadUBitLong(COORD_INTEGER_BITS_MP) + 1;
- else
- value = ReadUBitLong(COORD_INTEGER_BITS) + 1;
- }
+ // If there's an integer, read it in
+ // Adjust the integers from [0..MAX_COORD_VALUE-1] to [1..MAX_COORD_VALUE]
+ if (inBounds)
+ value = ReadUBitLong(COORD_INTEGER_BITS_MP) + 1;
+ else
+ value = ReadUBitLong(COORD_INTEGER_BITS) + 1;
+ }
- // Fixup the sign if negative.
- if (signbit)
- value = -value;
+ // Fixup the sign if negative.
+ if (signbit)
+ value = -value;
- return value;
+ return value;
}
INLINE float ReadBitCellCoord(int bits, EBitCoordType coordType) {
- bool bIntegral = (coordType == kCW_Integral);
- bool bLowPrecision = (coordType == kCW_LowPrecision);
+ bool bIntegral = (coordType == kCW_Integral);
+ bool bLowPrecision = (coordType == kCW_LowPrecision);
- int intval = 0, fractval = 0;
- float value = 0.0;
+ int intval = 0, fractval = 0;
+ float value = 0.0;
- if (bIntegral)
- value = ReadUBitLong(bits);
- else {
- intval = ReadUBitLong(bits);
+ if (bIntegral)
+ value = ReadUBitLong(bits);
+ else {
+ intval = ReadUBitLong(bits);
- // If there's a fraction, read it in
- fractval = ReadUBitLong(bLowPrecision ? COORD_FRACTIONAL_BITS_MP_LOWPRECISION : COORD_FRACTIONAL_BITS);
+ // If there's a fraction, read it in
+ fractval = ReadUBitLong(bLowPrecision ? COORD_FRACTIONAL_BITS_MP_LOWPRECISION : COORD_FRACTIONAL_BITS);
- // Calculate the correct floating point value
- value = intval + ((float)fractval * (bLowPrecision ? COORD_RESOLUTION_LOWPRECISION : COORD_RESOLUTION));
- }
+ // Calculate the correct floating point value
+ value = intval + ((float)fractval * (bLowPrecision ? COORD_RESOLUTION_LOWPRECISION : COORD_RESOLUTION));
+ }
- return value;
+ return value;
}
INLINE float ReadBitNormal() {
- // Read the sign bit
- i32 signbit = ReadOneBit();
+ // Read the sign bit
+ i32 signbit = ReadOneBit();
- // Read the fractional part
- u32 fractval = ReadUBitLong(NORMAL_FRACTIONAL_BITS);
+ // Read the fractional part
+ u32 fractval = ReadUBitLong(NORMAL_FRACTIONAL_BITS);
- // Calculate the correct floating point value
- float value = (float)fractval * NORMAL_RESOLUTION;
+ // Calculate the correct floating point value
+ float value = (float)fractval * NORMAL_RESOLUTION;
- // Fixup the sign if negative.
- if (signbit)
- value = -value;
+ // Fixup the sign if negative.
+ if (signbit)
+ value = -value;
- return value;
+ return value;
}
INLINE void ReadBitVec3Coord(Vector& fa) {
- i32 xflag, yflag, zflag;
+ i32 xflag, yflag, zflag;
- // This vector must be initialized! Otherwise, If any of the flags aren't set,
- // the corresponding component will not be read and will be stack garbage.
- fa.Init(0, 0, 0);
+ // This vector must be initialized! Otherwise, If any of the flags aren't set,
+ // the corresponding component will not be read and will be stack garbage.
+ fa.Init(0, 0, 0);
- xflag = ReadOneBit();
- yflag = ReadOneBit();
- zflag = ReadOneBit();
+ xflag = ReadOneBit();
+ yflag = ReadOneBit();
+ zflag = ReadOneBit();
- if (xflag)
- fa[0] = ReadBitCoord();
- if (yflag)
- fa[1] = ReadBitCoord();
- if (zflag)
- fa[2] = ReadBitCoord();
+ if (xflag)
+ fa[0] = ReadBitCoord();
+ if (yflag)
+ fa[1] = ReadBitCoord();
+ if (zflag)
+ fa[2] = ReadBitCoord();
}
INLINE void ReadBitVec3Normal(Vector& fa) {
- i32 xflag = ReadOneBit();
- i32 yflag = ReadOneBit();
+ i32 xflag = ReadOneBit();
+ i32 yflag = ReadOneBit();
- if (xflag)
- fa[0] = ReadBitNormal();
- else
- fa[0] = 0.0f;
+ if (xflag)
+ fa[0] = ReadBitNormal();
+ else
+ fa[0] = 0.0f;
- if (yflag)
- fa[1] = ReadBitNormal();
- else
- fa[1] = 0.0f;
+ if (yflag)
+ fa[1] = ReadBitNormal();
+ else
+ fa[1] = 0.0f;
- // The first two imply the third (but not its sign)
- i32 znegative = ReadOneBit();
+ // The first two imply the third (but not its sign)
+ i32 znegative = ReadOneBit();
- float fafafbfb = fa[0] * fa[0] + fa[1] * fa[1];
- if (fafafbfb < 1.0f)
- fa[2] = sqrt(1.0f - fafafbfb);
- else
- fa[2] = 0.0f;
+ float fafafbfb = fa[0] * fa[0] + fa[1] * fa[1];
+ if (fafafbfb < 1.0f)
+ fa[2] = sqrt(1.0f - fafafbfb);
+ else
+ fa[2] = 0.0f;
- if (znegative)
- fa[2] = -fa[2];
+ if (znegative)
+ fa[2] = -fa[2];
}
INLINE void ReadBitAngles(QAngle& fa) {
- Vector tmp;
- ReadBitVec3Coord(tmp);
- fa.Init(tmp.x, tmp.y, tmp.z);
+ Vector tmp;
+ ReadBitVec3Coord(tmp);
+ fa.Init(tmp.x, tmp.y, tmp.z);
}*/
INLINE float ReadBitAngle(int numBits)
@@ -970,72 +970,72 @@ class BFWrite : public BitBufferBase
}
/*INLINE void WriteBitCoord(const float f) {
- i32 signbit = (f <= -COORD_RESOLUTION);
- i32 intval = (i32)abs(f);
- i32 fractval = abs((i32)(f * COORD_DENOMINATOR)) & (COORD_DENOMINATOR - 1);
-
- // Send the bit flags that indicate whether we have an integer part and/or a fraction part.
- WriteOneBit(intval);
- WriteOneBit(fractval);
-
- if (intval || fractval) {
- // Send the sign bit
- WriteOneBit(signbit);
-
- // Send the integer if we have one.
- if (intval) {
- // Adjust the integers from [1..MAX_COORD_VALUE] to [0..MAX_COORD_VALUE-1]
- intval--;
- WriteUBitLong((u32)intval, COORD_INTEGER_BITS);
- }
+ i32 signbit = (f <= -COORD_RESOLUTION);
+ i32 intval = (i32)abs(f);
+ i32 fractval = abs((i32)(f * COORD_DENOMINATOR)) & (COORD_DENOMINATOR - 1);
- // Send the fraction if we have one
- if (fractval) {
- WriteUBitLong((u32)fractval, COORD_FRACTIONAL_BITS);
- }
- }
+ // Send the bit flags that indicate whether we have an integer part and/or a fraction part.
+ WriteOneBit(intval);
+ WriteOneBit(fractval);
+
+ if (intval || fractval) {
+ // Send the sign bit
+ WriteOneBit(signbit);
+
+ // Send the integer if we have one.
+ if (intval) {
+ // Adjust the integers from [1..MAX_COORD_VALUE] to [0..MAX_COORD_VALUE-1]
+ intval--;
+ WriteUBitLong((u32)intval, COORD_INTEGER_BITS);
+ }
+
+ // Send the fraction if we have one
+ if (fractval) {
+ WriteUBitLong((u32)fractval, COORD_FRACTIONAL_BITS);
+ }
+ }
}
INLINE void WriteBitCoordMP(const float f) {
- i32 signbit = (f <= -COORD_RESOLUTION);
- i32 intval = (i32)abs(f);
- i32 fractval = (abs((i32)(f * COORD_DENOMINATOR)) & (COORD_DENOMINATOR - 1));
+ i32 signbit = (f <= -COORD_RESOLUTION);
+ i32 intval = (i32)abs(f);
+ i32 fractval = (abs((i32)(f * COORD_DENOMINATOR)) & (COORD_DENOMINATOR - 1));
- bool bInBounds = intval < (1 << COORD_INTEGER_BITS_MP);
+ bool bInBounds = intval < (1 << COORD_INTEGER_BITS_MP);
- WriteOneBit(bInBounds);
+ WriteOneBit(bInBounds);
- // Send the sign bit
- WriteOneBit(intval);
+ // Send the sign bit
+ WriteOneBit(intval);
- if (intval) {
- WriteOneBit(signbit);
+ if (intval) {
+ WriteOneBit(signbit);
- // Send the integer if we have one.
- // Adjust the integers from [1..MAX_COORD_VALUE] to [0..MAX_COORD_VALUE-1]
- intval--;
+ // Send the integer if we have one.
+ // Adjust the integers from [1..MAX_COORD_VALUE] to [0..MAX_COORD_VALUE-1]
+ intval--;
- if (bInBounds)
- WriteUBitLong((u32)intval, COORD_INTEGER_BITS_MP);
- else
- WriteUBitLong((u32)intval, COORD_INTEGER_BITS);
- }
+ if (bInBounds)
+ WriteUBitLong((u32)intval, COORD_INTEGER_BITS_MP);
+ else
+ WriteUBitLong((u32)intval, COORD_INTEGER_BITS);
+ }
}
INLINE void WriteBitCellCoord(const float f, int bits, EBitCoordType coordType) {
- bool bIntegral = (coordType == kCW_Integral);
- bool bLowPrecision = (coordType == kCW_LowPrecision);
+ bool bIntegral = (coordType == kCW_Integral);
+ bool bLowPrecision = (coordType == kCW_LowPrecision);
- i32 intval = (i32)abs(f);
- i32 fractval = bLowPrecision ? (abs((i32)(f * COORD_DENOMINATOR_LOWPRECISION)) & (COORD_DENOMINATOR_LOWPRECISION - 1)) :
+ i32 intval = (i32)abs(f);
+ i32 fractval = bLowPrecision ? (abs((i32)(f * COORD_DENOMINATOR_LOWPRECISION)) & (COORD_DENOMINATOR_LOWPRECISION - 1)) :
(abs((i32)(f * COORD_DENOMINATOR)) & (COORD_DENOMINATOR - 1));
- if (bIntegral)
- WriteUBitLong((u32)intval, bits);
- else {
- WriteUBitLong((u32)intval, bits);
- WriteUBitLong((u32)fractval, bLowPrecision ? COORD_FRACTIONAL_BITS_MP_LOWPRECISION : COORD_FRACTIONAL_BITS);
- }
+ if (bIntegral)
+ WriteUBitLong((u32)intval, bits);
+ else {
+ WriteUBitLong((u32)intval, bits);
+ WriteUBitLong((u32)fractval, bLowPrecision ? COORD_FRACTIONAL_BITS_MP_LOWPRECISION : COORD_FRACTIONAL_BITS);
+ }
}*/
INLINE void SeekToBit(int bit)
@@ -1048,58 +1048,58 @@ class BFWrite : public BitBufferBase
}
/*INLINE void WriteBitVec3Coord(const Vector& fa) {
- i32 xflag, yflag, zflag;
+ i32 xflag, yflag, zflag;
- xflag = (fa[0] >= COORD_RESOLUTION) || (fa[0] <= -COORD_RESOLUTION);
- yflag = (fa[1] >= COORD_RESOLUTION) || (fa[1] <= -COORD_RESOLUTION);
- zflag = (fa[2] >= COORD_RESOLUTION) || (fa[2] <= -COORD_RESOLUTION);
+ xflag = (fa[0] >= COORD_RESOLUTION) || (fa[0] <= -COORD_RESOLUTION);
+ yflag = (fa[1] >= COORD_RESOLUTION) || (fa[1] <= -COORD_RESOLUTION);
+ zflag = (fa[2] >= COORD_RESOLUTION) || (fa[2] <= -COORD_RESOLUTION);
- WriteOneBit(xflag);
- WriteOneBit(yflag);
- WriteOneBit(zflag);
+ WriteOneBit(xflag);
+ WriteOneBit(yflag);
+ WriteOneBit(zflag);
- if (xflag)
- WriteBitCoord(fa[0]);
- if (yflag)
- WriteBitCoord(fa[1]);
- if (zflag)
- WriteBitCoord(fa[2]);
+ if (xflag)
+ WriteBitCoord(fa[0]);
+ if (yflag)
+ WriteBitCoord(fa[1]);
+ if (zflag)
+ WriteBitCoord(fa[2]);
}
INLINE void WriteBitNormal(float f) {
- i32 signbit = (f <= -NORMAL_RESOLUTION);
+ i32 signbit = (f <= -NORMAL_RESOLUTION);
- // NOTE: Since +/-1 are valid values for a normal, I'm going to encode that as all ones
- u32 fractval = abs((i32)(f * NORMAL_DENOMINATOR));
+ // NOTE: Since +/-1 are valid values for a normal, I'm going to encode that as all ones
+ u32 fractval = abs((i32)(f * NORMAL_DENOMINATOR));
- // clamp..
- if (fractval > NORMAL_DENOMINATOR)
- fractval = NORMAL_DENOMINATOR;
+ // clamp..
+ if (fractval > NORMAL_DENOMINATOR)
+ fractval = NORMAL_DENOMINATOR;
- // Send the sign bit
- WriteOneBit(signbit);
+ // Send the sign bit
+ WriteOneBit(signbit);
- // Send the fractional component
- WriteUBitLong(fractval, NORMAL_FRACTIONAL_BITS);
+ // Send the fractional component
+ WriteUBitLong(fractval, NORMAL_FRACTIONAL_BITS);
}
INLINE void WriteBitVec3Normal(const Vector& fa) {
- i32 xflag, yflag;
+ i32 xflag, yflag;
- xflag = (fa[0] >= NORMAL_RESOLUTION) || (fa[0] <= -NORMAL_RESOLUTION);
- yflag = (fa[1] >= NORMAL_RESOLUTION) || (fa[1] <= -NORMAL_RESOLUTION);
+ xflag = (fa[0] >= NORMAL_RESOLUTION) || (fa[0] <= -NORMAL_RESOLUTION);
+ yflag = (fa[1] >= NORMAL_RESOLUTION) || (fa[1] <= -NORMAL_RESOLUTION);
- WriteOneBit(xflag);
- WriteOneBit(yflag);
+ WriteOneBit(xflag);
+ WriteOneBit(yflag);
- if (xflag)
- WriteBitNormal(fa[0]);
- if (yflag)
- WriteBitNormal(fa[1]);
+ if (xflag)
+ WriteBitNormal(fa[0]);
+ if (yflag)
+ WriteBitNormal(fa[1]);
- // Write z sign bit
- i32 signbit = (fa[2] <= -NORMAL_RESOLUTION);
- WriteOneBit(signbit);
+ // Write z sign bit
+ i32 signbit = (fa[2] <= -NORMAL_RESOLUTION);
+ WriteOneBit(signbit);
}*/
INLINE void WriteBitAngle(float angle, int numBits)
@@ -1126,9 +1126,9 @@ class BFWrite : public BitBufferBase
}
/*INLINE void WriteBitAngles(const QAngle& fa) {
- // FIXME:
- Vector tmp(fa.x, fa.y, fa.z);
- WriteBitVec3Coord(tmp);
+ // FIXME:
+ Vector tmp(fa.x, fa.y, fa.z);
+ WriteBitVec3Coord(tmp);
}*/
private:
diff --git a/NorthstarDLL/core/memalloc.cpp b/NorthstarDLL/core/memalloc.cpp
index 69ce6f54..4f3df43c 100644
--- a/NorthstarDLL/core/memalloc.cpp
+++ b/NorthstarDLL/core/memalloc.cpp
@@ -16,7 +16,7 @@ extern "C" void* _malloc_base(size_t n)
/*extern "C" void* malloc(size_t n)
{
- return _malloc_base(n);
+ return _malloc_base(n);
}*/
extern "C" void _free_base(void* p)
diff --git a/NorthstarDLL/core/memalloc.h b/NorthstarDLL/core/memalloc.h
index 7df68429..97f60012 100644
--- a/NorthstarDLL/core/memalloc.h
+++ b/NorthstarDLL/core/memalloc.h
@@ -1,7 +1,7 @@
#pragma once
#include "rapidjson/document.h"
-//#include "include/rapidjson/allocators.h"
+// #include "include/rapidjson/allocators.h"
extern "C" void* _malloc_base(size_t size);
extern "C" void* _calloc_base(size_t const count, size_t const size);
diff --git a/NorthstarDLL/core/memory.cpp b/NorthstarDLL/core/memory.cpp
index 3770586f..603dcd84 100644
--- a/NorthstarDLL/core/memory.cpp
+++ b/NorthstarDLL/core/memory.cpp
@@ -199,9 +199,9 @@ CModule::CModule(const HMODULE pModule)
const IMAGE_SECTION_HEADER& hCurrentSection = hSection[i]; // Get current section.
ModuleSections_t moduleSection = ModuleSections_t(
- std::string(reinterpret_cast<const char*>(hCurrentSection.Name)),
- static_cast<uintptr_t>(m_pModuleBase + hCurrentSection.VirtualAddress),
- hCurrentSection.SizeOfRawData);
+ std::string(reinterpret_cast<const char*>(hCurrentSection.Name)),
+ static_cast<uintptr_t>(m_pModuleBase + hCurrentSection.VirtualAddress),
+ hCurrentSection.SizeOfRawData);
if (!strcmp((const char*)hCurrentSection.Name, ".text"))
m_ExecutableCode = moduleSection;
diff --git a/NorthstarDLL/core/memory.h b/NorthstarDLL/core/memory.h
index db0a38b3..6aeb1d45 100644
--- a/NorthstarDLL/core/memory.h
+++ b/NorthstarDLL/core/memory.h
@@ -52,7 +52,7 @@ class CModule : public CMemoryAddress
{
ModuleSections_t(void) = default;
ModuleSections_t(const std::string& svSectionName, uintptr_t pSectionBase, size_t nSectionSize)
- : m_svSectionName(svSectionName), m_pSectionBase(pSectionBase), m_nSectionSize(nSectionSize)
+ : m_svSectionName(svSectionName), m_pSectionBase(pSectionBase), m_nSectionSize(nSectionSize)
{
}
diff --git a/NorthstarDLL/core/structs.h b/NorthstarDLL/core/structs.h
index ac29f711..4bdd73c9 100644
--- a/NorthstarDLL/core/structs.h
+++ b/NorthstarDLL/core/structs.h
@@ -18,8 +18,8 @@
/*
OFFSET_STRUCT(Name)
{
- STRUCT_SIZE(0x100) // Total in-memory struct size
- FIELD(0x0, int field) // offset, signature
+ STRUCT_SIZE(0x100) // Total in-memory struct size
+ FIELD(0x0, int field) // offset, signature
}
*/
diff --git a/NorthstarDLL/core/tier0.cpp b/NorthstarDLL/core/tier0.cpp
index 3b9996a1..d81433de 100644
--- a/NorthstarDLL/core/tier0.cpp
+++ b/NorthstarDLL/core/tier0.cpp
@@ -19,7 +19,7 @@ void TryCreateGlobalMemAlloc()
{
// init memalloc stuff
CreateGlobalMemAlloc =
- reinterpret_cast<CreateGlobalMemAllocType>(GetProcAddress(GetModuleHandleA("tier0.dll"), "CreateGlobalMemAlloc"));
+ reinterpret_cast<CreateGlobalMemAllocType>(GetProcAddress(GetModuleHandleA("tier0.dll"), "CreateGlobalMemAlloc"));
Tier0::g_pMemAllocSingleton = CreateGlobalMemAlloc(); // if it already exists, this returns the preexisting IMemAlloc instance
}