2022-02-19 16:42:40 +01:00
|
|
|
#pragma once
|
|
|
|
|
2022-04-09 02:18:57 +02:00
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
// CGAME
|
|
|
|
//-------------------------------------------------------------------------
|
2022-02-28 01:01:40 +01:00
|
|
|
#if defined (GAMEDLL_S0) || defined (GAMEDLL_S1)
|
2022-04-10 19:59:34 +02:00
|
|
|
inline CMemory p_CVideoMode_Common__CreateGameWindow = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x40\x56\x57\x48\x83\xEC\x38\x48\x8B\xF9\xE8\x00\x00\x00\x00"), "xxxxxxxxxxx????");
|
2022-04-09 06:05:47 +02:00
|
|
|
inline auto CVideoMode_Common__CreateGameWindow = p_CVideoMode_Common__CreateGameWindow.RCast<bool (*)(int* pnRect)>(); /*40 56 57 48 83 EC 38 48 8B F9 E8 ? ? ? ?*/
|
2022-02-28 01:01:40 +01:00
|
|
|
#elif defined (GAMEDLL_S2) || defined (GAMEDLL_S3)
|
2022-04-10 19:59:34 +02:00
|
|
|
inline CMemory p_CVideoMode_Common__CreateGameWindow = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x40\x56\x57\x48\x83\xEC\x28\x48\x8B\xF9\xE8\x00\x00\x00\x00\x48\x8B\xF0"), "xxxxxxxxxxx????xxx");
|
2022-04-09 06:05:47 +02:00
|
|
|
inline auto CVideoMode_Common__CreateGameWindow = p_CVideoMode_Common__CreateGameWindow.RCast<bool (*)(int* pnRect)>(); /*40 56 57 48 83 EC 28 48 8B F9 E8 ? ? ? ? 48 8B F0*/
|
2022-02-28 01:01:40 +01:00
|
|
|
#endif
|
2022-02-19 16:42:40 +01:00
|
|
|
|
2022-02-28 01:01:40 +01:00
|
|
|
void HCVideoMode_Common_Attach();
|
|
|
|
void HCVideoMode_Common_Detach();
|
|
|
|
|
2022-02-19 16:42:40 +01:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
class HVideoMode_Common : public IDetour
|
|
|
|
{
|
2022-04-11 01:44:30 +02:00
|
|
|
virtual void GetAdr(void) const
|
2022-02-19 16:42:40 +01:00
|
|
|
{
|
2022-04-11 01:44:30 +02:00
|
|
|
std::cout << "| FUN: CVideoMode_Common::CreateGameWindow : 0x" << std::hex << std::uppercase << p_CVideoMode_Common__CreateGameWindow.GetPtr() << std::setw(nPad) << " |" << std::endl;
|
2022-02-19 16:42:40 +01:00
|
|
|
std::cout << "+----------------------------------------------------------------+" << std::endl;
|
|
|
|
}
|
2022-04-11 01:44:30 +02:00
|
|
|
virtual void GetFun(void) const { }
|
|
|
|
virtual void GetVar(void) const { }
|
|
|
|
virtual void GetCon(void) const { }
|
|
|
|
virtual void Attach(void) const { }
|
|
|
|
virtual void Detach(void) const { }
|
2022-02-19 16:42:40 +01:00
|
|
|
};
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
REGISTER(HVideoMode_Common);
|