r5sdk/r5dev/studiorender/studiorendercontext.h

33 lines
2.2 KiB
C
Raw Normal View History

2022-02-19 16:42:40 +01:00
#pragma once
//-------------------------------------------------------------------------
// CSTUDIORENDERCONTEXT
//-------------------------------------------------------------------------
#if defined (GAMEDLL_S1)
inline CMemory CStudioRenderContext__LoadModel = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x4C\x89\x44\x24\x00\x53\x55\x56\x41\x54\x41\x57"), "xxxx?xxxxxxx");
2022-02-19 16:42:40 +01:00
#elif defined (GAMEDLL_S2)
inline CMemory CStudioRenderContext__LoadModel = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x4C\x89\x44\x24\x00\x48\x89\x54\x24\x00\x53\x57\x41\x55\x48\x81\xEC\x00\x00\x00\x00"), "xxxx?xxxx?xxxxxxx????");
2022-02-19 16:42:40 +01:00
#elif defined (GAMEDLL_S3)
inline CMemory CStudioRenderContext__LoadModel = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x4C\x89\x44\x24\x00\x48\x89\x54\x24\x00\x48\x89\x4C\x24\x00\x53\x55\x56\x57\x48\x83\xEC\x78"), "xxxx?xxxx?xxxx?xxxxxxxx");
2022-02-19 16:42:40 +01: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)
inline CMemory CStudioRenderContext__LoadMaterials = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x4C\x89\x44\x24\x00\x55\x56\x41\x57"), "xxxx?xxxx");
2022-02-19 16:42:40 +01:00
#elif defined (GAMEDLL_S2) || defined (GAMEDLL_S3)
inline CMemory CStudioRenderContext__LoadMaterials = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x48\x8B\xC4\x4C\x89\x40\x18\x55\x56\x41\x55"), "xxxxxxxxxxx");
2022-02-19 16:42:40 +01:00
#endif// 0x140456B50 // 48 8B C4 4C 89 40 18 55 56 41 55 //
///////////////////////////////////////////////////////////////////////////////
class HStudioRenderContext : public IDetour
{
virtual void debugp()
{
std::cout << "| FUN: CStudioRenderContext::LoadModel : 0x" << std::hex << std::uppercase << CStudioRenderContext__LoadModel.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CStudioRenderContext::LoadMaterials : 0x" << std::hex << std::uppercase << CStudioRenderContext__LoadMaterials.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
};
///////////////////////////////////////////////////////////////////////////////
REGISTER(HStudioRenderContext);