mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2026-10-10 11:53:07 +08:00
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:
+13
-9
@@ -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.";
|
||||
}();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user