Skip to content

Commit

Permalink
fix formatting hopefully
Browse files Browse the repository at this point in the history
  • Loading branch information
ASpoonPlaysGames committed Sep 16, 2023
1 parent 2bb07c7 commit b4efcdc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
3 changes: 1 addition & 2 deletions NorthstarDLL/core/convar/concommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ typedef void (*FnCommandCallback_t)(const CCommand& command);
//-----------------------------------------------------------------------------
// Returns 0 to COMMAND_COMPLETION_MAXITEMS worth of completion strings
//-----------------------------------------------------------------------------
typedef int (*FnCommandCompletionCallback)(
const char* partial, char commands[COMMAND_COMPLETION_MAXITEMS][COMMAND_COMPLETION_ITEM_LENGTH]);
typedef int (*FnCommandCompletionCallback)(const char* partial, char commands[COMMAND_COMPLETION_MAXITEMS][COMMAND_COMPLETION_ITEM_LENGTH]);

// From r5reloaded
class ConCommandBase
Expand Down
10 changes: 5 additions & 5 deletions NorthstarDLL/core/hooks.h
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ class __autohook
type callingConvention CONCAT2(__autohookfunc, name) args; \
namespace \
{ \
type(*name) args; \
type(*name) args; \
__autohook CONCAT2(__autohook, __LINE__)( \
&__FILEAUTOHOOK, __STR(name), __STR(addrString), (LPVOID*)&name, (LPVOID)CONCAT2(__autohookfunc, name)); \
} \
Expand All @@ -230,7 +230,7 @@ class __autohook
type callingConvention CONCAT2(__autohookfunc, name) args; \
namespace \
{ \
type(*name) args; \
type(*name) args; \
__autohook \
CONCAT2(__autohook, __LINE__)(&__FILEAUTOHOOK, __STR(name), addr, (LPVOID*)&name, (LPVOID)CONCAT2(__autohookfunc, name)); \
} \
Expand All @@ -241,7 +241,7 @@ class __autohook
type callingConvention CONCAT2(__autohookfunc, name) args; \
namespace \
{ \
type(*name) args; \
type(*name) args; \
__autohook CONCAT2(__autohook, __LINE__)( \
&__FILEAUTOHOOK, __STR(name), __STR(moduleName), __STR(procName), (LPVOID*)&name, (LPVOID)CONCAT2(__autohookfunc, name)); \
} \
Expand All @@ -267,7 +267,7 @@ class ManualHook
#define HOOK(varName, originalFunc, type, callingConvention, args) \
namespace \
{ \
type(*originalFunc) args; \
type(*originalFunc) args; \
} \
type callingConvention CONCAT2(__manualhookfunc, varName) args; \
ManualHook varName = ManualHook(__STR(varName), (LPVOID*)&originalFunc, (LPVOID)CONCAT2(__manualhookfunc, varName)); \
Expand Down Expand Up @@ -316,7 +316,7 @@ class __autovar

// FUNCTION_AT(engine.dll + 0xDEADBEEF, void, __fastcall, SomeFunc, (void* a1))
#define FUNCTION_AT(addrString, type, callingConvention, name, args) \
type(*name) args; \
type(*name) args; \
namespace \
{ \
__autovar CONCAT2(__autovar, __LINE__)(&__FILEAUTOHOOK, __STR(addrString), (void**)&name); \
Expand Down
6 changes: 2 additions & 4 deletions NorthstarDLL/squirrel/squirrel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -447,8 +447,7 @@ template <ScriptContext context> void __fastcall DestroyVMHook(void* a1, CSquirr
spdlog::info("DestroyVM {} {}", GetContextName(realContext), (void*)sqvm);
}

template <ScriptContext context>
void (*SQCompileError)(HSquirrelVM* sqvm, const char* error, const char* file, int line, int column);
template <ScriptContext context> void (*SQCompileError)(HSquirrelVM* sqvm, const char* error, const char* file, int line, int column);
template <ScriptContext context>
void __fastcall ScriptCompileErrorHook(HSquirrelVM* sqvm, const char* error, const char* file, int line, int column)
{
Expand Down Expand Up @@ -496,8 +495,7 @@ void __fastcall ScriptCompileErrorHook(HSquirrelVM* sqvm, const char* error, con
// dont call the original function since it kills game lol
}

template <ScriptContext context>
int64_t (*RegisterSquirrelFunction)(CSquirrelVM* sqvm, SQFuncRegistration* funcReg, char unknown);
template <ScriptContext context> int64_t (*RegisterSquirrelFunction)(CSquirrelVM* sqvm, SQFuncRegistration* funcReg, char unknown);
template <ScriptContext context>
int64_t __fastcall RegisterSquirrelFunctionHook(CSquirrelVM* sqvm, SQFuncRegistration* funcReg, char unknown)
{
Expand Down

0 comments on commit b4efcdc

Please sign in to comment.