2022-09-25 13:36:55 +02:00
|
|
|
|
//===== Copyright <20> 1996-2005, Valve Corporation, All rights reserved. ======//
|
|
|
|
|
//
|
|
|
|
|
// Purpose:
|
|
|
|
|
//
|
|
|
|
|
//===========================================================================//
|
|
|
|
|
#include "public/igame.h"
|
|
|
|
|
|
|
|
|
|
inline CMemory p_CGame__PlayStartupVideos;
|
|
|
|
|
inline auto v_CGame__PlayStartupVideos = p_CGame__PlayStartupVideos.RCast<void (*)(void)>();
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
// Purpose: Main game interface, including message pump and window creation
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
class CGame : public IGame
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
static void PlayStartupVideos(void);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
void SysGame_Attach();
|
|
|
|
|
void SysGame_Detach();
|
|
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
class VGame : public IDetour
|
|
|
|
|
{
|
|
|
|
|
virtual void GetAdr(void) const
|
|
|
|
|
{
|
|
|
|
|
spdlog::debug("| FUN: CGame::PlayStartupVideos : {:#18x} |\n", p_CGame__PlayStartupVideos.GetPtr());
|
|
|
|
|
spdlog::debug("+----------------------------------------------------------------+\n");
|
|
|
|
|
}
|
|
|
|
|
virtual void GetFun(void) const
|
|
|
|
|
{
|
|
|
|
|
#if defined (GAMEDLL_S0) || defined (GAMEDLL_S1)
|
2022-12-01 22:44:55 +01:00
|
|
|
|
p_CGame__PlayStartupVideos = g_GameDll.FindPatternSIMD("48 8B C4 48 81 EC ?? ?? ?? ?? 80 3D ?? ?? ?? ?? ?? 0F 85 ?? ?? ?? ?? 48 8B 0D ?? ?? ?? ??");
|
2022-09-25 13:36:55 +02:00
|
|
|
|
#elif defined (GAMEDLL_S2) || defined (GAMEDLL_S3)
|
2022-12-01 22:44:55 +01:00
|
|
|
|
p_CGame__PlayStartupVideos = g_GameDll.FindPatternSIMD("48 8B C4 55 48 8D A8 ?? ?? ?? ?? 48 81 EC ?? ?? ?? ?? 80 3D ?? ?? ?? ?? ??");
|
2022-09-25 13:36:55 +02:00
|
|
|
|
#endif
|
|
|
|
|
v_CGame__PlayStartupVideos = p_CGame__PlayStartupVideos.RCast<void (*)(void)>();
|
|
|
|
|
}
|
|
|
|
|
virtual void GetVar(void) const { }
|
|
|
|
|
virtual void GetCon(void) const { }
|
|
|
|
|
virtual void Attach(void) const { }
|
|
|
|
|
virtual void Detach(void) const { }
|
|
|
|
|
};
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
REGISTER(VGame);
|