aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <for.oliver.kirkham@gmail.com>2023-02-14 13:39:33 +0000
committerunknown <for.oliver.kirkham@gmail.com>2023-02-14 13:39:33 +0000
commit263af88bb67349b5193dea6dac33664fc70bfede (patch)
tree88dd00e65af78147c336138e8ed3997030234830
parentf30f6b002646bbb0bb0a78ed0e253de0ae371c68 (diff)
downloadNorthstarLauncher-263af88bb67349b5193dea6dac33664fc70bfede.tar.gz
NorthstarLauncher-263af88bb67349b5193dea6dac33664fc70bfede.zip
fix formatting
-rw-r--r--NorthstarDLL/core/hooks.cpp2
-rw-r--r--NorthstarDLL/core/hooks.h17
-rw-r--r--NorthstarDLL/shared/playlist.cpp8
3 files changed, 17 insertions, 10 deletions
diff --git a/NorthstarDLL/core/hooks.cpp b/NorthstarDLL/core/hooks.cpp
index 91cb9a90..d3b9cfc5 100644
--- a/NorthstarDLL/core/hooks.cpp
+++ b/NorthstarDLL/core/hooks.cpp
@@ -68,7 +68,7 @@ void __fileAutohook::Dispatch()
{
for (__autovar* var : vars)
var->Dispatch();
-
+
for (__autohook* hook : hooks)
hook->Dispatch();
}
diff --git a/NorthstarDLL/core/hooks.h b/NorthstarDLL/core/hooks.h
index 2f7e21b4..0eb3f7fb 100644
--- a/NorthstarDLL/core/hooks.h
+++ b/NorthstarDLL/core/hooks.h
@@ -307,10 +307,17 @@ class __autovar
};
// VAR_AT(engine.dll+0x404, ConVar*, Cvar_host_timescale)
-#define VAR_AT(addrString, type, name) \
-type name; namespace { __autovar CONCAT2(__autovar, __LINE__)(&__FILEAUTOHOOK, __STR(addrString), (void**)&name); }
+#define VAR_AT(addrString, type, name) \
+ type name; \
+ namespace \
+ { \
+ __autovar CONCAT2(__autovar, __LINE__)(&__FILEAUTOHOOK, __STR(addrString), (void**)&name); \
+ }
// FUNCTION_AT(engine.dll + 0xDEADBEEF, void, __fastcall, SomeFunc, (void* a1))
-#define FUNCTION_AT(addrString, type, callingConvention, name, args) \
-type(*callingConvention name) args; namespace { __autovar CONCAT2(__autovar, __LINE__)(&__FILEAUTOHOOK, __STR(addrString), (void**)&name); }
-
+#define FUNCTION_AT(addrString, type, callingConvention, name, args) \
+ type(*callingConvention name) args; \
+ namespace \
+ { \
+ __autovar CONCAT2(__autovar, __LINE__)(&__FILEAUTOHOOK, __STR(addrString), (void**)&name); \
+ }
diff --git a/NorthstarDLL/shared/playlist.cpp b/NorthstarDLL/shared/playlist.cpp
index 4d4c8906..0f20a957 100644
--- a/NorthstarDLL/shared/playlist.cpp
+++ b/NorthstarDLL/shared/playlist.cpp
@@ -11,10 +11,10 @@ AUTOHOOK_INIT()
// use the R2 namespace for game funcs
namespace R2
{
- FUNCTION_AT(engine.dll + 0x18C640, const char*,, GetCurrentPlaylistName, ());
- FUNCTION_AT(engine.dll + 0x18EB20, void,, SetCurrentPlaylist, (const char* pPlaylistName));
- FUNCTION_AT(engine.dll + 0x18ED00, void,, SetPlaylistVarOverride, (const char* pVarName, const char* pValue));
- FUNCTION_AT(engine.dll + 0x18C680, const char*,, GetCurrentPlaylistVar, (const char* pVarName, bool bUseOverrides));
+ FUNCTION_AT(engine.dll + 0x18C640, const char*, , GetCurrentPlaylistName, ());
+ FUNCTION_AT(engine.dll + 0x18EB20, void, , SetCurrentPlaylist, (const char* pPlaylistName));
+ FUNCTION_AT(engine.dll + 0x18ED00, void, , SetPlaylistVarOverride, (const char* pVarName, const char* pValue));
+ FUNCTION_AT(engine.dll + 0x18C680, const char*, , GetCurrentPlaylistVar, (const char* pVarName, bool bUseOverrides));
} // namespace R2
ConVar* Cvar_ns_use_clc_SetPlaylistVarOverride;