2021-12-25 22:36:38 +01:00
# pragma once
2022-04-09 02:18:57 +02:00
/* ==== CMATSYSTEMSURFACE =============================================================================================================================================== */
2024-01-02 15:21:36 +01:00
inline void * ( * CMatSystemSurface__DrawColoredText ) ( void * thisptr , short font , int fontHeight , int offsetX , int offsetY , int red , int green , int blue , int alpha , const char * text , . . . ) ;
2022-01-05 22:56:49 +01:00
2022-06-12 17:50:12 +02:00
class CMatSystemSurface
{
} ;
inline CMatSystemSurface * g_pMatSystemSurface ;
2022-11-10 15:34:41 +01:00
inline CMatSystemSurface * g_pVGuiSurface ;
2022-01-05 22:56:49 +01:00
2021-12-25 22:36:38 +01:00
///////////////////////////////////////////////////////////////////////////////
2022-05-13 14:53:25 +02:00
class VMatSystemSurface : public IDetour
2021-12-25 22:36:38 +01:00
{
2022-04-11 01:44:30 +02:00
virtual void GetAdr ( void ) const
2021-12-25 22:36:38 +01:00
{
2024-01-02 15:21:36 +01:00
LogFunAdr ( " CMatSystemSurface::DrawColoredText " , CMatSystemSurface__DrawColoredText ) ;
LogVarAdr ( " g_pMatSystemSurface " , g_pMatSystemSurface ) ;
LogVarAdr ( " g_pVGuiSurface " , g_pVGuiSurface ) ;
2021-12-25 22:36:38 +01:00
}
2022-04-18 03:35:08 +02:00
virtual void GetFun ( void ) const
{
2024-01-02 15:21:36 +01:00
g_GameDll . FindPatternSIMD ( " 4C 8B DC 48 83 EC 68 49 8D 43 58 0F 57 C0 " ) . GetPtr ( CMatSystemSurface__DrawColoredText ) ;
2022-04-18 03:35:08 +02:00
}
virtual void GetVar ( void ) const
{
2022-12-01 22:44:55 +01:00
g_pMatSystemSurface = g_GameDll . FindPatternSIMD ( " 48 83 EC 28 48 83 3D ?? ?? ?? ?? ?? 48 8D 05 ?? ?? ?? ?? " )
2022-06-12 17:50:12 +02:00
. FindPatternSelf ( " 48 83 3D " , CMemory : : Direction : : DOWN , 40 ) . ResolveRelativeAddressSelf ( 0x3 , 0x8 ) . RCast < CMatSystemSurface * > ( ) ;
2024-01-02 15:21:36 +01:00
2022-12-01 22:44:55 +01:00
g_pVGuiSurface = g_GameDll . FindPatternSIMD ( " 48 8B 05 ?? ?? ?? ?? C3 CC CC CC CC CC CC CC CC 48 8B 05 ?? ?? ?? ?? C3 CC CC CC CC CC CC CC CC 8B 81 ?? ?? ?? ?? " )
2022-06-12 17:50:12 +02:00
. ResolveRelativeAddressSelf ( 0x3 , 0x7 ) . RCast < CMatSystemSurface * > ( ) ;
2022-04-18 03:35:08 +02:00
}
2022-04-11 01:44:30 +02:00
virtual void GetCon ( void ) const { }
2023-11-26 13:21:20 +01:00
virtual void Detour ( const bool bAttach ) const { }
2021-12-25 22:36:38 +01:00
} ;
///////////////////////////////////////////////////////////////////////////////