r5sdk/r5dev/engine/sv_main.h
IcePixelx f43c5da8ae Huge engine/host commit.
* Rebuild CModGroupApp::Main, did not include the dedicated routine with the empty class global.
* Using a template function now for virtual function calls
* Implemented most of the CEngine class and grabbing its global var now.
* Using local CEngine now in FrameUpdate
* Implemented EngineParms_t fully and grabbing its global var.
* Added macro for adding class member variables at offsets.

A lot of comments added regarding what needs to be done for this commit.

* Check other season compability, wasn't able to do that due to not having access to said binaries at the moment.
* Fix sdklauncher to use widestrings to fix the bug with other languages in path
2022-01-23 18:26:48 +01:00

26 lines
1.2 KiB
C++

#pragma once
///////////////////////////////////////////////////////////////////////////////
namespace
{
/* ==== SV_MAIN ======================================================================================================================================================= */
ADDRESS p_SV_ShutdownGameDLL = g_mGameDll.FindPatternSIMD((std::uint8_t*)"\x48\x83\xEC\x28\x80\x3D\x00\x00\x00\x00\x00\x0F\x84\x00\x00\x00\x00\x48\x8B\x0D\x00\x00\x00\x00\x48\x89\x5C\x24\x00", "xxxxxx?????xx????xxx????xxxx?");
void (*SV_ShutdownGameDLL)() = (void(*)())p_SV_ShutdownGameDLL.GetPtr(); /*48 83 EC 28 80 3D ? ? ? ? ? 0F 84 ? ? ? ? 48 8B 0D ? ? ? ? 48 89 5C 24 ?*/
}
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
class HSV_MAIN : public IDetour
{
virtual void debugp()
{
std::cout << "| FUN: SV_ShutdownGameDLL : 0x" << std::hex << std::uppercase << p_SV_ShutdownGameDLL.GetPtr() << std::setw(npad) << " |" << std::endl;
}
};
///////////////////////////////////////////////////////////////////////////////
REGISTER(HSV_MAIN);