Add more spoofing options and added clang-format (#1020)

* feat(Spoofing): add spoofing
* feat(Spoofing): prepare code for player attach
* remove(PlayerAttach): isn't going to work due to netsync architecture
* fix(GUI): fix scaling
* feat(Project): add clang-format file
* feat(Classes): update classes
* fix(BlackHole): remove unnecessary cleanup
* fix(Formatting): fix formatting for initializer lists
* feat(clang-format): Set tab width and 1 space before comment

Co-authored-by: Yimura <24669514+Yimura@users.noreply.github.com>
This commit is contained in:
maybegreat48
2023-03-01 21:27:15 +00:00
committed by GitHub
parent 92aea20cd6
commit 97a8c5d60b
466 changed files with 55224 additions and 35596 deletions
+13 -9
View File
@@ -1,16 +1,17 @@
#include "invoker.hpp"
#include "common.hpp"
#include "crossmap.hpp"
#include "invoker.hpp"
#include "pointers.hpp"
extern "C" void _call_asm(void* context, void* function, void* ret);
extern "C" void _call_asm(void* context, void* function, void* ret);
namespace big
{
native_call_context::native_call_context()
{
m_return_value = &m_return_stack[0];
m_args = &m_arg_stack[0];
m_args = &m_arg_stack[0];
}
void native_invoker::cache_handlers()
@@ -20,8 +21,8 @@ namespace big
for (const rage::scrNativeMapping& mapping : g_crossmap)
{
rage::scrNativeHandler handler = g_pointers->m_get_native_handler(
g_pointers->m_native_registration_table, mapping.second);
rage::scrNativeHandler handler =
g_pointers->m_get_native_handler(g_pointers->m_native_registration_table, mapping.second);
m_handler_cache.emplace(mapping.first, handler);
}
@@ -39,8 +40,7 @@ namespace big
{
rage::scrNativeHandler handler = it->second;
[this, hash, handler]
{
[this, hash, handler] {
__try
{
_call_asm(&m_call_context, handler, g_pointers->m_native_return);
@@ -49,13 +49,17 @@ namespace big
}
__except (EXCEPTION_EXECUTE_HANDLER)
{
[hash]() { LOG(WARNING) << "Exception caught while trying to call " << hash << " native."; }();
[hash]() {
LOG(WARNING) << "Exception caught while trying to call " << hash << " native.";
}();
}
}();
}
else
{
[hash]() { LOG(WARNING) << "Failed to find " << HEX_TO_UPPER(hash) << " native's handler."; }();
[hash]() {
LOG(WARNING) << "Failed to find " << HEX_TO_UPPER(hash) << " native's handler.";
}();
}
}
}