mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
These get reconverted to masked byte patterns at runtime. With the signature map cache system, this will only happen when building the cache.
49 lines
2.3 KiB
C++
49 lines
2.3 KiB
C++
#pragma once
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
inline CMemory SCR_BeginLoadingPlaque;
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
inline bool* scr_drawloading = nullptr;
|
|
inline bool* scr_engineevent_loadingstarted = nullptr;
|
|
|
|
void SCR_EndLoadingPlaque(void);
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
class VGL_Screen : public IDetour
|
|
{
|
|
virtual void GetAdr(void) const
|
|
{
|
|
spdlog::debug("| FUN: SCR_BeginLoadingPlaque : {:#18x} |\n", SCR_BeginLoadingPlaque.GetPtr());
|
|
spdlog::debug("| VAR: scr_drawloading : {:#18x} |\n", reinterpret_cast<uintptr_t>(scr_drawloading));
|
|
spdlog::debug("| VAR: scr_engineevent_loadingstarted : {:#18x} |\n", reinterpret_cast<uintptr_t>(scr_engineevent_loadingstarted));
|
|
spdlog::debug("+----------------------------------------------------------------+\n");
|
|
}
|
|
virtual void GetFun(void) const
|
|
{
|
|
#if defined (GAMEDLL_S0) || defined (GAMEDLL_S1)
|
|
SCR_BeginLoadingPlaque = g_GameDll.FindPatternSIMD("48 89 5C 24 ?? 48 89 74 24 ?? 57 48 83 EC 30 0F 29 74 24 ?? 48 8B F9");
|
|
// 0x14022A4A0 // 48 89 5C 24 ? 48 89 74 24 ? 57 48 83 EC 30 0F 29 74 24 ? 48 8B F9 //
|
|
#elif defined (GAMEDLL_S2) || defined (GAMEDLL_S3)
|
|
SCR_BeginLoadingPlaque = g_GameDll.FindPatternSIMD("48 83 EC 38 0F 29 74 24 ?? 48 89 5C 24 ??");
|
|
// 0x14022A4A0 // 48 83 EC 38 0F 29 74 24 ? 48 89 5C 24 ? //
|
|
#endif
|
|
}
|
|
virtual void GetVar(void) const
|
|
{
|
|
scr_drawloading = g_GameDll.FindPatternSIMD("0F B6 05 ?? ?? ?? ?? C3 CC CC CC CC CC CC CC CC 48 83 EC 28").ResolveRelativeAddressSelf(0x3, 0x7).RCast<bool*>();
|
|
#if defined (GAMEDLL_S0) || defined (GAMEDLL_S1)
|
|
scr_engineevent_loadingstarted = SCR_BeginLoadingPlaque.Offset(0x130).FindPatternSelf("C6 05 ?? ?? ?? ?? 01", CMemory::Direction::DOWN).ResolveRelativeAddress(0x2, 0x7).RCast<bool*>();
|
|
#elif defined (GAMEDLL_S2) || defined (GAMEDLL_S3)
|
|
scr_engineevent_loadingstarted = SCR_BeginLoadingPlaque.Offset(0x60).FindPatternSelf("C6 05 ?? ?? ?? ?? 01", CMemory::Direction::DOWN).ResolveRelativeAddress(0x2, 0x7).RCast<bool*>();
|
|
#endif
|
|
|
|
}
|
|
virtual void GetCon(void) const { }
|
|
virtual void Attach(void) const { }
|
|
virtual void Detach(void) const { }
|
|
};
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
REGISTER(VGL_Screen);
|