r5sdk/r5dev/rtech/rui/rui.cpp
Kawe Mazidjatari e32cc6ae6a Code overhaul
Moved every pattern to IDetour interface. This allows for debugging patterns scans more easily, and create threads during pattern searching (Operation is now fired in APIENTRY).

Also cleaned up some unused code/extraneous comments.
Slightly increased performance by purging duplicate patterns.
Made variable search less dependent from other results (except if pattern-to-scan results is within the same header)
2022-04-18 03:35:08 +02:00

35 lines
861 B
C++

//=============================================================================//
//
// Purpose: rUI Utilities
//
//=============================================================================//
#include "core/stdafx.h"
#ifndef DEDICATED
#include "rui.h"
#include "tier1/cvar.h"
//-----------------------------------------------------------------------------
// Purpose: Probably responsible to decide if rUI is allowed to draw.
//-----------------------------------------------------------------------------
bool __fastcall HRuiDraw(__int64* a1, __m128* a2, const __m128i* a3, __int64 a4, __m128* a5)
{
if (!rui_drawEnable->GetBool())
return false;
return v_RuiDraw(a1, a2, a3, a4, a5);
}
void Rui_Attach()
{
DetourAttach((LPVOID*)&v_RuiDraw, &HRuiDraw);
}
void Rui_Detach()
{
DetourDetach((LPVOID*)&v_RuiDraw, &HRuiDraw);
}
#endif // !DEDICATED