2022-02-19 16:42:40 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
// CSTUDIORENDERCONTEXT
|
|
|
|
//-------------------------------------------------------------------------
|
2022-04-18 03:35:08 +02:00
|
|
|
inline CMemory CStudioRenderContext__LoadModel;
|
|
|
|
inline CMemory CStudioRenderContext__LoadMaterials;
|
2022-02-19 16:42:40 +01:00
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
2022-05-13 14:53:25 +02:00
|
|
|
class VStudioRenderContext : public IDetour
|
2022-02-19 16:42:40 +01:00
|
|
|
{
|
2022-04-11 01:44:30 +02:00
|
|
|
virtual void GetAdr(void) const
|
2022-02-19 16:42:40 +01:00
|
|
|
{
|
2023-01-25 02:26:52 +01:00
|
|
|
LogFunAdr("CStudioRenderContext::LoadModel", CStudioRenderContext__LoadModel.GetPtr());
|
|
|
|
LogFunAdr("CStudioRenderContext::LoadMaterials", CStudioRenderContext__LoadMaterials.GetPtr());
|
2022-02-19 16:42:40 +01:00
|
|
|
}
|
2022-04-18 03:35:08 +02:00
|
|
|
virtual void GetFun(void) const
|
|
|
|
{
|
|
|
|
#if defined (GAMEDLL_S1)
|
2022-12-01 22:44:55 +01:00
|
|
|
CStudioRenderContext__LoadModel = g_GameDll.FindPatternSIMD("4C 89 44 24 ?? 53 55 56 41 54 41 57");
|
2022-04-18 03:35:08 +02:00
|
|
|
#elif defined (GAMEDLL_S2)
|
2022-12-01 22:44:55 +01:00
|
|
|
CStudioRenderContext__LoadModel = g_GameDll.FindPatternSIMD("4C 89 44 24 ?? 48 89 54 24 ?? 53 57 41 55 48 81 EC ?? ?? ?? ??");
|
2022-04-18 03:35:08 +02:00
|
|
|
#elif defined (GAMEDLL_S3)
|
2022-12-01 22:44:55 +01:00
|
|
|
CStudioRenderContext__LoadModel = g_GameDll.FindPatternSIMD("4C 89 44 24 ?? 48 89 54 24 ?? 48 89 4C 24 ?? 53 55 56 57 48 83 EC 78");
|
2022-04-18 03:35:08 +02:00
|
|
|
#endif// 0x1404554C0 // 4C 89 44 24 ? 48 89 54 24 ? 48 89 4C 24 ? 53 55 56 57 48 83 EC 78 //
|
|
|
|
|
|
|
|
#if defined (GAMEDLL_S0) || defined (GAMEDLL_S1)
|
2022-12-01 22:44:55 +01:00
|
|
|
CStudioRenderContext__LoadMaterials = g_GameDll.FindPatternSIMD("4C 89 44 24 ?? 55 56 41 57");
|
2022-04-18 03:35:08 +02:00
|
|
|
#elif defined (GAMEDLL_S2) || defined (GAMEDLL_S3)
|
2022-12-01 22:44:55 +01:00
|
|
|
CStudioRenderContext__LoadMaterials = g_GameDll.FindPatternSIMD("48 8B C4 4C 89 40 18 55 56 41 55");
|
2022-04-18 03:35:08 +02:00
|
|
|
#endif// 0x140456B50 // 48 8B C4 4C 89 40 18 55 56 41 55 //
|
|
|
|
}
|
2022-04-11 01:44:30 +02:00
|
|
|
virtual void GetVar(void) const { }
|
|
|
|
virtual void GetCon(void) const { }
|
2023-11-26 13:21:20 +01:00
|
|
|
virtual void Detour(const bool bAttach) const { }
|
2022-02-19 16:42:40 +01:00
|
|
|
};
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|