From 3144227ec8b9c05ef1babe3600638e24d193b3aa Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Fri, 13 May 2022 14:53:25 +0200 Subject: [PATCH] Update GetAdr implementations to feature spdlog Fixed all alignments and reduced code verbosity --- r5dev/bsplib/bsplib.h | 34 +++++------ r5dev/client/cdll_engine_int.h | 22 +++---- r5dev/client/client.h | 8 +-- r5dev/client/vengineclient_impl.cpp | 2 +- r5dev/client/vengineclient_impl.h | 14 ++--- r5dev/common/netmessages.h | 8 +-- r5dev/common/opcodes.h | 68 +++++++++++----------- r5dev/core/init.cpp | 2 +- r5dev/datacache/mdlcache.h | 28 +++++---- r5dev/ebisusdk/EbisuSDK.h | 20 +++---- r5dev/engine/baseclient.h | 12 ++-- r5dev/engine/baseclientstate.h | 12 ++-- r5dev/engine/baseserver.h | 6 +- r5dev/engine/cl_main.h | 10 ++-- r5dev/engine/cmodel_bsp.h | 10 ++-- r5dev/engine/common.h | 8 +-- r5dev/engine/debugoverlay.h | 26 ++++----- r5dev/engine/gl_matsysiface.h | 8 +-- r5dev/engine/gl_rsurf.h | 12 ++-- r5dev/engine/gl_screen.h | 12 ++-- r5dev/engine/host.h | 18 +++--- r5dev/engine/host_cmd.h | 14 ++--- r5dev/engine/host_state.h | 16 +++-- r5dev/engine/modelloader.h | 24 ++++---- r5dev/engine/net.h | 20 +++---- r5dev/engine/sv_main.h | 12 ++-- r5dev/engine/sys_dll.h | 10 ++-- r5dev/engine/sys_dll2.h | 16 ++--- r5dev/engine/sys_engine.h | 8 +-- r5dev/engine/sys_getmodes.h | 6 +- r5dev/engine/sys_utils.h | 14 ++--- r5dev/filesystem/basefilesystem.h | 14 ++--- r5dev/filesystem/filesystem.h | 8 +-- r5dev/game/server/ai_network.h | 8 +-- r5dev/game/server/ai_networkmanager.h | 20 +++---- r5dev/game/server/detour_impl.h | 12 ++-- r5dev/game/server/fairfight_impl.h | 8 +-- r5dev/game/server/gameinterface.h | 10 ++-- r5dev/game/shared/animation.h | 8 +-- r5dev/inputsystem/inputsystem.h | 8 +-- r5dev/launcher/IApplication.h | 14 ++--- r5dev/launcher/launcher.h | 12 ++-- r5dev/launcher/prx.h | 8 +-- r5dev/materialsystem/cmaterialglue.h | 10 ++-- r5dev/materialsystem/cmaterialsystem.h | 18 +++--- r5dev/milessdk/win64_rrthreads.h | 8 +-- r5dev/public/include/edict.h | 10 ++-- r5dev/rtech/rtech_game.h | 14 ++--- r5dev/rtech/rtech_utils.h | 10 ++-- r5dev/rtech/rui/rui.h | 10 ++-- r5dev/rtech/stryder/stryder.h | 10 ++-- r5dev/server/server.h | 14 ++--- r5dev/server/vengineserver_impl.h | 12 ++-- r5dev/squirrel/sqapi.h | 30 +++++----- r5dev/squirrel/sqinit.h | 14 ++--- r5dev/squirrel/sqstdaux.h | 8 +-- r5dev/squirrel/sqvm.h | 34 +++++------ r5dev/studiorender/studiorendercontext.h | 10 ++-- r5dev/thirdparty/detours/include/idetour.h | 5 +- r5dev/tier0/commandline.h | 8 +-- r5dev/tier0/jobthread.h | 10 ++-- r5dev/tier0/threadtools.h | 10 ++-- r5dev/tier0/tslist.h | 14 ++--- r5dev/tier1/IConVar.h | 16 ++--- r5dev/tier1/cmd.h | 28 ++++----- r5dev/tier1/cvar.h | 12 ++-- r5dev/vgui/vgui_baseui_interface.h | 12 ++-- r5dev/vgui/vgui_fpspanel.h | 8 +-- r5dev/vguimatsurface/MatSystemSurface.h | 10 ++-- r5dev/vpc/IAppSystem.h | 8 +-- r5dev/vpc/interfaces.h | 8 +-- r5dev/vpc/keyvalues.h | 16 ++--- r5dev/vphysics/QHull.h | 10 ++-- r5dev/vstdlib/callback.h | 8 +-- r5dev/vstdlib/completion.h | 10 ++-- r5dev/vstdlib/keyvaluessystem.cpp | 2 +- r5dev/vstdlib/keyvaluessystem.h | 10 ++-- r5dev/windows/id3dx.cpp | 12 ++-- 78 files changed, 516 insertions(+), 523 deletions(-) diff --git a/r5dev/bsplib/bsplib.h b/r5dev/bsplib/bsplib.h index 7c7f0a94..a620de6b 100644 --- a/r5dev/bsplib/bsplib.h +++ b/r5dev/bsplib/bsplib.h @@ -27,25 +27,25 @@ void* __fastcall BuildPropStaticFrustumCullMap(int64_t a1, int64_t a2, unsigned void BspLib_Attach(); void BspLib_Detach(); /////////////////////////////////////////////////////////////////////////////// -class HBspLib : public IDetour +class VBspLib : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: BuildPropStaticFrustumCullMap : 0x" << std::hex << std::uppercase << p_BuildPropStaticFrustumCullMap.GetPtr() << std::setw(nPad) << " |" << std::endl; - //std::cout << "| FUN: sub_1404365A0 : 0x" << std::hex << std::uppercase << sub_1404365A0 << std::setw(0) << " |" << std::endl; - //std::cout << "| FUN: sub_140270130 : 0x" << std::hex << std::uppercase << sub_140270130 << std::setw(0) << " |" << std::endl; - //std::cout << "| FUN: sub_14028F170 : 0x" << std::hex << std::uppercase << sub_14028F170 << std::setw(0) << " |" << std::endl; - //std::cout << "| FUN: sub_140257F20 : 0x" << std::hex << std::uppercase << sub_140257F20 << std::setw(0) << " |" << std::endl; - //std::cout << "| VAR: dword_1696A9D20 : 0x" << std::hex << std::uppercase << dword_1696A9D20 << std::setw(0) << " |" << std::endl; - //std::cout << "| VAR: dword_141744EBC : 0x" << std::hex << std::uppercase << dword_141744EBC << std::setw(0) << " |" << std::endl; - //std::cout << "| VAR: dword_141744EE8 : 0x" << std::hex << std::uppercase << dword_141744EE8 << std::setw(0) << " |" << std::endl; - //std::cout << "| VAR: qword_141744EA8 : 0x" << std::hex << std::uppercase << qword_141744EA8 << std::setw(0) << " |" << std::endl; - //std::cout << "| VAR: qword_141744EA0 : 0x" << std::hex << std::uppercase << qword_141744EA0 << std::setw(0) << " |" << std::endl; - //std::cout << "| VAR: qword_141744E88 : 0x" << std::hex << std::uppercase << qword_141744E88 << std::setw(0) << " |" << std::endl; - //std::cout << "| VAR: xmmword_1415BD270 : 0x" << std::hex << std::uppercase << xmmword_1415BD270 << std::setw(0) << " |" << std::endl; - //std::cout << "| VAR: off_141744E70 : 0x" << std::hex << std::uppercase << off_141744E70 << std::setw(0) << " |" << std::endl; - //std::cout << "| VAR: off_141731448 : 0x" << std::hex << std::uppercase << off_141731448 << std::setw(0) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: BuildPropStaticFrustumCullMap : {:#18x} |\n", p_BuildPropStaticFrustumCullMap.GetPtr()); + //spdlog::debug("| FUN: sub_1404365A0 : {:#18x} |\n", reinterpret_cast(sub_1404365A0)); + //spdlog::debug("| FUN: sub_140270130 : {:#18x} |\n", reinterpret_cast(sub_140270130)); + //spdlog::debug("| FUN: sub_14028F170 : {:#18x} |\n", reinterpret_cast(sub_14028F170)); + //spdlog::debug("| FUN: sub_140257F20 : {:#18x} |\n", reinterpret_cast(sub_140257F20)); + //spdlog::debug("| VAR: dword_1696A9D20 : {:#18x} |\n", reinterpret_cast(dword_1696A9D20)); + //spdlog::debug("| VAR: dword_141744EBC : {:#18x} |\n", reinterpret_cast(dword_141744EBC)); + //spdlog::debug("| VAR: dword_141744EE8 : {:#18x} |\n", reinterpret_cast(dword_141744EE8)); + //spdlog::debug("| VAR: qword_141744EA8 : {:#18x} |\n", reinterpret_cast(qword_141744EA8)); + //spdlog::debug("| VAR: qword_141744EA0 : {:#18x} |\n", reinterpret_cast(qword_141744EA0)); + //spdlog::debug("| VAR: qword_141744E88 : {:#18x} |\n", reinterpret_cast(qword_141744E88)); + //spdlog::debug("| VAR: xmmword_1415BD270 : {:#18x} |\n", reinterpret_cast(xmmword_1415BD270)); + //spdlog::debug("| VAR: off_141744E70 : {:#18x} |\n", reinterpret_cast(off_141744E70)); + //spdlog::debug("| VAR: off_141731448 : {:#18x} |\n", reinterpret_cast(off_141731448)); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -82,4 +82,4 @@ class HBspLib : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HBspLib); +REGISTER(VBspLib); diff --git a/r5dev/client/cdll_engine_int.h b/r5dev/client/cdll_engine_int.h index a176385b..d36191b8 100644 --- a/r5dev/client/cdll_engine_int.h +++ b/r5dev/client/cdll_engine_int.h @@ -65,23 +65,23 @@ void CHLClient_Attach(); void CHLClient_Detach(); /////////////////////////////////////////////////////////////////////////////// -class HDll_Engine_Int : public IDetour +class VDll_Engine_Int : public IDetour { virtual void GetAdr(void) const { #ifndef DEDICATED - std::cout << "| FUN: CHLClient::PostInit : 0x" << std::hex << std::uppercase << p_CHLClient_PostInit.GetPtr() << std::setw(nPad) << " |" << std::endl; + spdlog::debug("| FUN: CHLClient::PostInit : {:#18x} |\n", p_CHLClient_PostInit.GetPtr()); #endif // !DEDICATED - std::cout << "| FUN: CHLClient::LevelShutdown : 0x" << std::hex << std::uppercase << p_CHLClient_LevelShutdown.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: CHLClient::HudProcessInput : 0x" << std::hex << std::uppercase << p_CHLClient_HudProcessInput.GetPtr() << std::setw(nPad) << " |" << std::endl; + spdlog::debug("| FUN: CHLClient::LevelShutdown : {:#18x} |\n", p_CHLClient_LevelShutdown.GetPtr()); + spdlog::debug("| FUN: CHLClient::HudProcessInput : {:#18x} |\n", p_CHLClient_HudProcessInput.GetPtr()); #ifndef DEDICATED - std::cout << "| FUN: CHLClient::FrameStageNotify : 0x" << std::hex << std::uppercase << p_CHLClient_FrameStageNotify.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: CHLClient::GetAllClasses : 0x" << std::hex << std::uppercase << p_CHLClient_GetAllClasses.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| VAR: cl_time_use_host_tickcount : 0x" << std::hex << std::uppercase << cl_time_use_host_tickcount << std::setw(0) << " |" << std::endl; + spdlog::debug("| FUN: CHLClient::FrameStageNotify : {:#18x} |\n", p_CHLClient_FrameStageNotify.GetPtr()); + spdlog::debug("| FUN: CHLClient::GetAllClasses : {:#18x} |\n", p_CHLClient_GetAllClasses.GetPtr()); + spdlog::debug("| VAR: cl_time_use_host_tickcount : {:#18x} |\n", reinterpret_cast(cl_time_use_host_tickcount)); #endif // !DEDICATED - std::cout << "| VAR: gHLClient : 0x" << std::hex << std::uppercase << gHLClient << std::setw(0) << " |" << std::endl; - std::cout << "| VAR: g_pHLClient : 0x" << std::hex << std::uppercase << g_pHLClient << std::setw(0) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| VAR: gHLClient : {:#18x} |\n", reinterpret_cast(gHLClient)); + spdlog::debug("| VAR: g_pHLClient : {:#18x} |\n", reinterpret_cast(g_pHLClient)); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -128,4 +128,4 @@ class HDll_Engine_Int : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HDll_Engine_Int); +REGISTER(VDll_Engine_Int); diff --git a/r5dev/client/client.h b/r5dev/client/client.h index 9ef7e3c7..bb759ff3 100644 --- a/r5dev/client/client.h +++ b/r5dev/client/client.h @@ -3,12 +3,12 @@ inline CMemory CClientState__RunFrame; /////////////////////////////////////////////////////////////////////////////// -class HClient : public IDetour +class VClient : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: CClientState::RunFrame : 0x" << std::hex << std::uppercase << CClientState__RunFrame.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: CClientState::RunFrame : {:#18x} |\n", CClientState__RunFrame.GetPtr()); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -25,5 +25,5 @@ class HClient : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HClient); +REGISTER(VClient); #endif // CLIENT_H diff --git a/r5dev/client/vengineclient_impl.cpp b/r5dev/client/vengineclient_impl.cpp index f08610cb..5f452f30 100644 --- a/r5dev/client/vengineclient_impl.cpp +++ b/r5dev/client/vengineclient_impl.cpp @@ -57,7 +57,7 @@ bool CEngineClient::GetRestrictClientCommands() const // Input : // Output : void* (C_Player) //--------------------------------------------------------------------------------- -void* CEngineClient::GetLocalPlayer() +void* CEngineClient::GetLocalPlayer() const { return CEngineClient_GetLocalPlayer(); } \ No newline at end of file diff --git a/r5dev/client/vengineclient_impl.h b/r5dev/client/vengineclient_impl.h index 6cda9793..a8b70e1d 100644 --- a/r5dev/client/vengineclient_impl.h +++ b/r5dev/client/vengineclient_impl.h @@ -7,7 +7,7 @@ public: bool GetRestrictServerCommands() const; void SetRestrictClientCommands(bool bRestrict); bool GetRestrictClientCommands() const; - void* GetLocalPlayer(); // Is actually C_Player. + void* GetLocalPlayer() const; // Is actually C_Player. }; /* ==== CVENGINECLIENT ================================================================================================================================================== */ @@ -29,12 +29,12 @@ class HVEngineClient : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: IVEngineClient::CommandExecute : 0x" << std::hex << std::uppercase << p_CEngineClient_CommandExecute.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| VAR: m_bRestrictServerCommands : 0x" << std::hex << std::uppercase << m_bRestrictServerCommands << std::setw(0) << " |" << std::endl; - std::cout << "| VAR: m_bRestrictClientCommands : 0x" << std::hex << std::uppercase << m_bRestrictClientCommands << std::setw(0) << " |" << std::endl; - std::cout << "| CON: g_ppEngineClient : 0x" << std::hex << std::uppercase << g_ppEngineClient << std::setw(0) << " |" << std::endl; - std::cout << "| CON: g_pEngineClient_VTable : 0x" << std::hex << std::uppercase << g_pEngineClient_VTable.GetPtr() << std::setw(0) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: IVEngineClient::CommandExecute : {:#18x} |\n", p_CEngineClient_CommandExecute.GetPtr()); + spdlog::debug("| VAR: m_bRestrictServerCommands : {:#18x} |\n", reinterpret_cast(m_bRestrictServerCommands)); + spdlog::debug("| VAR: m_bRestrictClientCommands : {:#18x} |\n", reinterpret_cast(m_bRestrictClientCommands)); + spdlog::debug("| CON: g_ppEngineClient : {:#18x} |\n", reinterpret_cast(g_ppEngineClient)); + spdlog::debug("| CON: g_pEngineClient_VTable : {:#18x} |\n", g_pEngineClient_VTable.GetPtr()); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { diff --git a/r5dev/common/netmessages.h b/r5dev/common/netmessages.h index 4246ed3a..d47ae99f 100644 --- a/r5dev/common/netmessages.h +++ b/r5dev/common/netmessages.h @@ -85,10 +85,10 @@ class HMM_Heartbeat : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: MM_Heartbeat::ToString : 0x" << std::hex << std::uppercase << MM_Heartbeat__ToString.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| VAR: SVC_Print_VTable : 0x" << std::hex << std::uppercase << g_pSVC_Print_VTable << std::setw(nPad) << " |" << std::endl; - std::cout << "| VAR: SVC_UserMessage_VTable : 0x" << std::hex << std::uppercase << g_pSVC_UserMessage_VTable << std::setw(nPad) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: MM_Heartbeat::ToString : {:#18x} |\n", MM_Heartbeat__ToString.GetPtr()); + spdlog::debug("| VAR: SVC_Print_VTable : {:#18x} |\n", reinterpret_cast(g_pSVC_Print_VTable)); + spdlog::debug("| VAR: SVC_UserMessage_VTable : {:#18x} |\n", reinterpret_cast(g_pSVC_UserMessage_VTable)); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { diff --git a/r5dev/common/opcodes.h b/r5dev/common/opcodes.h index e1c1cceb..de6a7281 100644 --- a/r5dev/common/opcodes.h +++ b/r5dev/common/opcodes.h @@ -93,46 +93,46 @@ inline CMemory g_pClientSP; /////////////////////////////////////////////////////////////////////////////// -class HOpcodes : public IDetour +class VOpcodes : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: CShaderSystem::Init : 0x" << std::hex << std::uppercase << CShaderSystem__Init.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; - std::cout << "| FUN: CVGui::RunFrame : 0x" << std::hex << std::uppercase << CVGui__RunFrame.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; - std::cout << "| FUN: CEngineVGui::Shutdown : 0x" << std::hex << std::uppercase << CEngineVGui__Shutdown.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: CEngineVGui::ActivateGameUI : 0x" << std::hex << std::uppercase << CEngineVGui__ActivateGameUI.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; - std::cout << "| FUN: Sys_InitGame : 0x" << std::hex << std::uppercase << Sys_InitGame.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; - std::cout << "| FUN: Host_Init_0 : 0x" << std::hex << std::uppercase << gHost_Init_0.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: Host_Init_1 : 0x" << std::hex << std::uppercase << gHost_Init_1.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: Host_Init_2 : 0x" << std::hex << std::uppercase << gHost_Init_2.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: Host_Disconnect : 0x" << std::hex << std::uppercase << Host_Disconnect.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: CShaderSystem::Init : {:#18x} |\n", CShaderSystem__Init.GetPtr()); + spdlog::debug("+----------------------------------------------------------------+\n"); + spdlog::debug("| FUN: CVGui::RunFrame : {:#18x} |\n", CVGui__RunFrame.GetPtr()); + spdlog::debug("+----------------------------------------------------------------+\n"); + spdlog::debug("| FUN: CEngineVGui::Shutdown : {:#18x} |\n", CEngineVGui__Shutdown.GetPtr()); + spdlog::debug("| FUN: CEngineVGui::ActivateGameUI : {:#18x} |\n", CEngineVGui__ActivateGameUI.GetPtr()); + spdlog::debug("+----------------------------------------------------------------+\n"); + spdlog::debug("| FUN: Sys_InitGame : {:#18x} |\n", Sys_InitGame.GetPtr()); + spdlog::debug("+----------------------------------------------------------------+\n"); + spdlog::debug("| FUN: Host_Init_0 : {:#18x} |\n", gHost_Init_0.GetPtr()); + spdlog::debug("| FUN: Host_Init_1 : {:#18x} |\n", gHost_Init_1.GetPtr()); + spdlog::debug("| FUN: Host_Init_2 : {:#18x} |\n", gHost_Init_2.GetPtr()); + spdlog::debug("| FUN: Host_Disconnect : {:#18x} |\n", Host_Disconnect.GetPtr()); + spdlog::debug("+----------------------------------------------------------------+\n"); #ifndef CLIENT_DLL - std::cout << "| FUN: Server_S2C_CONNECT_1 : 0x" << std::hex << std::uppercase << Server_S2C_CONNECT_1.GetPtr() << std::setw(nPad) << " |" << std::endl; + spdlog::debug("| FUN: Server_S2C_CONNECT_1 : {:#18x} |\n", Server_S2C_CONNECT_1.GetPtr()); #endif // !CLIENT_DLL - std::cout << "+----------------------------------------------------------------+" << std::endl; - std::cout << "| FUN: UpdateMaterialSystemConfig : 0x" << std::hex << std::uppercase << UpdateMaterialSystemConfig.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: UpdateCurrentVideoConfig : 0x" << std::hex << std::uppercase << UpdateCurrentVideoConfig.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: HandleConfigFile : 0x" << std::hex << std::uppercase << HandleConfigFile.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: ResetPreviousGameState : 0x" << std::hex << std::uppercase << ResetPreviousGameState.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: LoadPlayerConfig : 0x" << std::hex << std::uppercase << LoadPlayerConfig.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("+----------------------------------------------------------------+\n"); + spdlog::debug("| FUN: UpdateMaterialSystemConfig : {:#18x} |\n", UpdateMaterialSystemConfig.GetPtr()); + spdlog::debug("| FUN: UpdateCurrentVideoConfig : {:#18x} |\n", UpdateCurrentVideoConfig.GetPtr()); + spdlog::debug("| FUN: HandleConfigFile : {:#18x} |\n", HandleConfigFile.GetPtr()); + spdlog::debug("| FUN: ResetPreviousGameState : {:#18x} |\n", ResetPreviousGameState.GetPtr()); + spdlog::debug("| FUN: LoadPlayerConfig : {:#18x} |\n", LoadPlayerConfig.GetPtr()); + spdlog::debug("+----------------------------------------------------------------+\n"); #if !defined (GAMEDLL_S0) || !defined (GAMEDLL_S1) - std::cout << "| FUN: CWin32Surface::initStaticData : 0x" << std::hex << std::uppercase << CWin32Surface_initStaticData.GetPtr() << std::setw(nPad) << " |" << std::endl; + spdlog::debug("| FUN: CWin32Surface::initStaticData : {:#18x} |\n", CWin32Surface_initStaticData.GetPtr()); #endif - std::cout << "| FUN: KeyboardLayout_Init : 0x" << std::hex << std::uppercase << KeyboardLayout_Init.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; - std::cout << "| CON: g_pClientVPKDir : 0x" << std::hex << std::uppercase << g_pClientVPKDir.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| CON: g_pClientBSP : 0x" << std::hex << std::uppercase << g_pClientBSP.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| CON: g_pClientCommonBSP : 0x" << std::hex << std::uppercase << g_pClientCommonBSP.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| CON: g_pClientMPLobby : 0x" << std::hex << std::uppercase << g_pClientMPLobby.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| CON: g_pClientMP : 0x" << std::hex << std::uppercase << g_pClientMP.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| CON: g_pClientSP : 0x" << std::hex << std::uppercase << g_pClientSP.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: KeyboardLayout_Init : {:#18x} |\n", KeyboardLayout_Init.GetPtr()); + spdlog::debug("+----------------------------------------------------------------+\n"); + spdlog::debug("| CON: g_pClientVPKDir : {:#18x} |\n", g_pClientVPKDir.GetPtr()); + spdlog::debug("| CON: g_pClientBSP : {:#18x} |\n", g_pClientBSP.GetPtr()); + spdlog::debug("| CON: g_pClientCommonBSP : {:#18x} |\n", g_pClientCommonBSP.GetPtr()); + spdlog::debug("| CON: g_pClientMPLobby : {:#18x} |\n", g_pClientMPLobby.GetPtr()); + spdlog::debug("| CON: g_pClientMP : {:#18x} |\n", g_pClientMP.GetPtr()); + spdlog::debug("| CON: g_pClientSP : {:#18x} |\n", g_pClientSP.GetPtr()); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { } virtual void GetVar(void) const @@ -237,4 +237,4 @@ class HOpcodes : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HOpcodes); +REGISTER(VOpcodes); diff --git a/r5dev/core/init.cpp b/r5dev/core/init.cpp index 1bff7dfd..54ff50bd 100644 --- a/r5dev/core/init.cpp +++ b/r5dev/core/init.cpp @@ -406,7 +406,7 @@ void QuerySystemInfo() void PrintHAddress() // Test the sigscan results { - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("+----------------------------------------------------------------+\n"); for (IDetour* pDetour : vDetour) { pDetour->GetAdr(); diff --git a/r5dev/datacache/mdlcache.h b/r5dev/datacache/mdlcache.h index ec0c8b27..f8417dde 100644 --- a/r5dev/datacache/mdlcache.h +++ b/r5dev/datacache/mdlcache.h @@ -101,21 +101,21 @@ inline CMDLCache* g_MDLCache = nullptr; void MDLCache_Attach(); void MDLCache_Detach(); /////////////////////////////////////////////////////////////////////////////// -class HMDLCache : public IDetour +class VMDLCache : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: CMDLCache::FindMDL : 0x" << std::hex << std::uppercase << p_CMDLCache__FindMDL.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: CMDLCache::FindCachedMDL : 0x" << std::hex << std::uppercase << p_CMDLCache__FindCachedMDL.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: CMDLCache::FindUncachedMDL : 0x" << std::hex << std::uppercase << p_CMDLCache__FindUncachedMDL.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: CMDLCache::GetStudioHDR : 0x" << std::hex << std::uppercase << p_CMDLCache__GetStudioHDR.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: CMDLCache::GetHardwareData : 0x" << std::hex << std::uppercase << p_CMDLCache__GetHardwareData.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: CStudioHWDataRef::SetFlags : 0x" << std::hex << std::uppercase << p_CStudioHWDataRef__SetFlags.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| VAR: m_MDLMutex : 0x" << std::hex << std::uppercase << m_MDLMutex << std::setw(0) << " |" << std::endl; - std::cout << "| VAR: m_MDLLock : 0x" << std::hex << std::uppercase << m_MDLLock << std::setw(0) << " |" << std::endl; - std::cout << "| VAR: m_MDLDict : 0x" << std::hex << std::uppercase << m_MDLDict << std::setw(0) << " |" << std::endl; - std::cout << "| VAR: g_MDLCache : 0x" << std::hex << std::uppercase << g_MDLCache << std::setw(0) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: CMDLCache::FindMDL : {:#18x} |\n", p_CMDLCache__FindMDL.GetPtr()); + spdlog::debug("| FUN: CMDLCache::FindCachedMDL : {:#18x} |\n", p_CMDLCache__FindCachedMDL.GetPtr()); + spdlog::debug("| FUN: CMDLCache::FindUncachedMDL : {:#18x} |\n", p_CMDLCache__FindUncachedMDL.GetPtr()); + spdlog::debug("| FUN: CMDLCache::GetStudioHDR : {:#18x} |\n", p_CMDLCache__GetStudioHDR.GetPtr()); + spdlog::debug("| FUN: CMDLCache::GetHardwareData : {:#18x} |\n", p_CMDLCache__GetHardwareData.GetPtr()); + spdlog::debug("| FUN: CStudioHWDataRef::SetFlags : {:#18x} |\n", p_CStudioHWDataRef__SetFlags.GetPtr()); + spdlog::debug("| VAR: m_MDLMutex : {:#18x} |\n", reinterpret_cast(m_MDLMutex)); + spdlog::debug("| VAR: m_MDLLock : {:#18x} |\n", reinterpret_cast(m_MDLLock)); + spdlog::debug("| VAR: m_MDLDict : {:#18x} |\n", reinterpret_cast(m_MDLDict)); + spdlog::debug("| VAR: g_MDLCache : {:#18x} |\n", reinterpret_cast(g_MDLCache)); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -155,7 +155,5 @@ class HMDLCache : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -#ifdef GAMEDLL_S3 -REGISTER(HMDLCache); -#endif // GAMEDLL_S3 +REGISTER(VMDLCache); #endif // MDLCACHE_H diff --git a/r5dev/ebisusdk/EbisuSDK.h b/r5dev/ebisusdk/EbisuSDK.h index acdb6d2e..dc931087 100644 --- a/r5dev/ebisusdk/EbisuSDK.h +++ b/r5dev/ebisusdk/EbisuSDK.h @@ -26,19 +26,17 @@ void EbisuSDK_Detach(); /////////////////////////////////////////////////////////////////////////////// -class HEbisuSDK : public IDetour +class VEbisuSDK : public IDetour { virtual void GetAdr(void) const { -#ifdef DEDICATED - std::cout << "| FUN: EbisuSDK_Init_Tier0 : 0x" << std::hex << std::uppercase << p_EbisuSDK_Init_Tier0.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: EbisuSDK_CVar_Init : 0x" << std::hex << std::uppercase << p_EbisuSDK_CVar_Init.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: EbisuSDK_SetState : 0x" << std::hex << std::uppercase << p_EbisuSDK_SetState.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| VAR: g_bEbisuSDKInitialized : 0x" << std::hex << std::uppercase << g_bEbisuSDKInitialized << std::setw(0) << " |" << std::endl; - std::cout << "| VAR: g_bEbisuSDKCvarInitialized : 0x" << std::hex << std::uppercase << g_bEbisuSDKCvarInitialized << std::setw(0) << " |" << std::endl; - std::cout << "| VAR: g_qEbisuSDKCvarInitialized : 0x" << std::hex << std::uppercase << g_qEbisuSDKCvarInitialized << std::setw(0) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; -#endif // DEDICATED + spdlog::debug("| FUN: EbisuSDK_Init_Tier0 : {:#18x} |\n", p_EbisuSDK_Init_Tier0.GetPtr()); + spdlog::debug("| FUN: EbisuSDK_CVar_Init : {:#18x} |\n", p_EbisuSDK_CVar_Init.GetPtr()); + spdlog::debug("| FUN: EbisuSDK_SetState : {:#18x} |\n", p_EbisuSDK_SetState.GetPtr()); + spdlog::debug("| VAR: g_bEbisuSDKInitialized : {:#18x} |\n", reinterpret_cast(g_bEbisuSDKInitialized)); + spdlog::debug("| VAR: g_bEbisuSDKCvarInitialized : {:#18x} |\n", reinterpret_cast(g_bEbisuSDKCvarInitialized)); + spdlog::debug("| VAR: g_qEbisuSDKCvarInitialized : {:#18x} |\n", reinterpret_cast(g_qEbisuSDKCvarInitialized)); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -63,4 +61,4 @@ class HEbisuSDK : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HEbisuSDK); +REGISTER(VEbisuSDK); diff --git a/r5dev/engine/baseclient.h b/r5dev/engine/baseclient.h index 1cafc174..86beba08 100644 --- a/r5dev/engine/baseclient.h +++ b/r5dev/engine/baseclient.h @@ -92,14 +92,14 @@ void CBaseClient_Attach(); void CBaseClient_Detach(); /////////////////////////////////////////////////////////////////////////////// -class HBaseClient : public IDetour +class VBaseClient : public IDetour { virtual void GetAdr(void) const { - std::cout << "| VAR: g_pClient : 0x" << std::hex << std::uppercase << g_pClient << std::setw(0) << " |" << std::endl; - std::cout << "| FUN: CBaseClient::Connect : 0x" << std::hex << std::uppercase << p_CBaseClient_Connect.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: CBaseClient::Clear : 0x" << std::hex << std::uppercase << p_CBaseClient_Clear.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: CBaseClient::Connect : {:#18x} |\n", p_CBaseClient_Connect.GetPtr()); + spdlog::debug("| FUN: CBaseClient::Clear : {:#18x} |\n", p_CBaseClient_Clear.GetPtr()); + spdlog::debug("| VAR: g_pClient : {:#18x} |\n", reinterpret_cast(g_pClient)); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -121,4 +121,4 @@ class HBaseClient : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HBaseClient); +REGISTER(VBaseClient); diff --git a/r5dev/engine/baseclientstate.h b/r5dev/engine/baseclientstate.h index 21566877..dd7ff4fe 100644 --- a/r5dev/engine/baseclientstate.h +++ b/r5dev/engine/baseclientstate.h @@ -28,14 +28,14 @@ extern CBaseClientState* g_pBaseClientState; #endif /////////////////////////////////////////////////////////////////////////////// -class HClientState : public IDetour +class VBaseClientState : public IDetour { virtual void GetAdr(void) const { - //std::cout << "| FUN: CClientState::CheckForResend : 0x" << std::hex << std::uppercase << p_CClientState__CheckForResend.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| VAR: cl_m_bPaused : 0x" << std::hex << std::uppercase << cl_m_bPaused << std::setw(0) << " |" << std::endl; - std::cout << "| VAR: cl_host_tickcount : 0x" << std::hex << std::uppercase << cl_host_tickcount << std::setw(0) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + //spdlog::debug("| FUN: CClientState::CheckForResend : {:#18x} |\n", p_CClientState__CheckForResend.GetPtr()); + spdlog::debug("| VAR: cl_m_bPaused : {:#18x} |\n", reinterpret_cast(cl_m_bPaused)); + spdlog::debug("| VAR: cl_host_tickcount : {:#18x} |\n", reinterpret_cast(cl_host_tickcount)); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { } virtual void GetVar(void) const @@ -71,4 +71,4 @@ class HClientState : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HClientState); +REGISTER(VBaseClientState); diff --git a/r5dev/engine/baseserver.h b/r5dev/engine/baseserver.h index c8484541..260ab20f 100644 --- a/r5dev/engine/baseserver.h +++ b/r5dev/engine/baseserver.h @@ -9,11 +9,11 @@ public: extern CBaseServer* g_pServer; /////////////////////////////////////////////////////////////////////////////// -class HBaseServer : public IDetour +class VBaseServer : public IDetour { virtual void GetAdr(void) const { - //std::cout << "+----------------------------------------------------------------+" << std::endl; + //spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { } virtual void GetVar(void) const { } @@ -23,4 +23,4 @@ class HBaseServer : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HBaseServer); +REGISTER(VBaseServer); diff --git a/r5dev/engine/cl_main.h b/r5dev/engine/cl_main.h index 4f379cb9..81323ede 100644 --- a/r5dev/engine/cl_main.h +++ b/r5dev/engine/cl_main.h @@ -11,13 +11,13 @@ inline auto CL_EndMovie = p_CL_EndMovie.RCast(); /////////////////////////////////////////////////////////////////////////////// -class HCL_Main : public IDetour +class VCL_Main : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: CL_EndMovie : 0x" << std::hex << std::uppercase << p_CL_EndMovie.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: CL_ClearState : 0x" << std::hex << std::uppercase << p_CL_ClearState.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: CL_EndMovie : {:#18x} |\n", p_CL_EndMovie.GetPtr()); + spdlog::debug("| FUN: CL_ClearState : {:#18x} |\n", p_CL_ClearState.GetPtr()); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -38,4 +38,4 @@ class HCL_Main : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HCL_Main); +REGISTER(VCL_Main); diff --git a/r5dev/engine/cmodel_bsp.h b/r5dev/engine/cmodel_bsp.h index ff276b9c..e4a274ba 100644 --- a/r5dev/engine/cmodel_bsp.h +++ b/r5dev/engine/cmodel_bsp.h @@ -15,13 +15,13 @@ void MOD_PreloadPak(); void CModelBsp_Attach(); void CModelBsp_Detach(); /////////////////////////////////////////////////////////////////////////////// -class HModel_BSP : public IDetour +class VModel_BSP : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: CollisionBSPData_LinkPhysics : 0x" << std::hex << std::uppercase << p_CollisionBSPData_LinkPhysics.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: MOD_LoadPakForMap : 0x" << std::hex << std::uppercase << p_MOD_LoadPakForMap.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: CollisionBSPData_LinkPhysics : {:#18x} |\n", p_CollisionBSPData_LinkPhysics.GetPtr()); + spdlog::debug("| FUN: MOD_LoadPakForMap : {:#18x} |\n", p_MOD_LoadPakForMap.GetPtr()); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -46,4 +46,4 @@ class HModel_BSP : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HModel_BSP); +REGISTER(VModel_BSP); diff --git a/r5dev/engine/common.h b/r5dev/engine/common.h index b89cd2b7..51d866ec 100644 --- a/r5dev/engine/common.h +++ b/r5dev/engine/common.h @@ -5,12 +5,12 @@ inline CMemory p_COM_ExplainDisconnection; inline auto COM_ExplainDisconnection = p_COM_ExplainDisconnection.RCast(); /////////////////////////////////////////////////////////////////////////////// -class HCommon : public IDetour +class VCommon : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: COM_ExplainDisconnection : 0x" << std::hex << std::uppercase << p_COM_ExplainDisconnection.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: COM_ExplainDisconnection : {:#18x} |\n", p_COM_ExplainDisconnection.GetPtr()); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -24,4 +24,4 @@ class HCommon : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HCommon); +REGISTER(VCommon); diff --git a/r5dev/engine/debugoverlay.h b/r5dev/engine/debugoverlay.h index 10ff3448..5e30ac10 100644 --- a/r5dev/engine/debugoverlay.h +++ b/r5dev/engine/debugoverlay.h @@ -121,21 +121,21 @@ inline int* render_tickcount = nullptr; inline int* overlay_tickcount = nullptr; /////////////////////////////////////////////////////////////////////////////// -class HDebugOverlay : public IDetour +class VDebugOverlay : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: DrawAllOverlays : 0x" << std::hex << std::uppercase << p_DrawAllOverlays.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: RenderBox : 0x" << std::hex << std::uppercase << p_RenderBox.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: RenderLine : 0x" << std::hex << std::uppercase << p_RenderLine.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: DestroyOverlay : 0x" << std::hex << std::uppercase << p_DestroyOverlay.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| VAR: s_pOverlays : 0x" << std::hex << std::uppercase << s_pOverlays << std::setw(0) << " |" << std::endl; - std::cout << "| VAR: s_OverlayMutex : 0x" << std::hex << std::uppercase << s_OverlayMutex << std::setw(0) << " |" << std::endl; - std::cout << "| VAR: client_debugdraw_int_unk : 0x" << std::hex << std::uppercase << client_debugdraw_int_unk << std::setw(0) << " |" << std::endl; - std::cout << "| VAR: client_debugdraw_float_unk : 0x" << std::hex << std::uppercase << client_debugdraw_float_unk << std::setw(0) << " |" << std::endl; - std::cout << "| VAR: overlay_tickcount : 0x" << std::hex << std::uppercase << overlay_tickcount << std::setw(0) << " |" << std::endl; - std::cout << "| VAR: render_tickcount : 0x" << std::hex << std::uppercase << render_tickcount << std::setw(0) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: DrawAllOverlays : {:#18x} |\n", p_DrawAllOverlays.GetPtr()); + spdlog::debug("| FUN: RenderBox : {:#18x} |\n", p_RenderBox.GetPtr()); + spdlog::debug("| FUN: RenderLine : {:#18x} |\n", p_RenderLine.GetPtr()); + spdlog::debug("| FUN: DestroyOverlay : {:#18x} |\n", p_DestroyOverlay.GetPtr()); + spdlog::debug("| VAR: s_pOverlays : {:#18x} |\n", reinterpret_cast(s_pOverlays)); + spdlog::debug("| VAR: s_OverlayMutex : {:#18x} |\n", reinterpret_cast(s_OverlayMutex)); + spdlog::debug("| VAR: client_debugdraw_int_unk : {:#18x} |\n", reinterpret_cast(client_debugdraw_int_unk)); + spdlog::debug("| VAR: client_debugdraw_float_unk : {:#18x} |\n", reinterpret_cast(client_debugdraw_float_unk)); + spdlog::debug("| VAR: overlay_tickcount : {:#18x} |\n", reinterpret_cast(overlay_tickcount)); + spdlog::debug("| VAR: render_tickcount : {:#18x} |\n", reinterpret_cast(render_tickcount)); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -176,4 +176,4 @@ class HDebugOverlay : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HDebugOverlay); +REGISTER(VDebugOverlay); diff --git a/r5dev/engine/gl_matsysiface.h b/r5dev/engine/gl_matsysiface.h index 687882b7..ed744f2c 100644 --- a/r5dev/engine/gl_matsysiface.h +++ b/r5dev/engine/gl_matsysiface.h @@ -6,12 +6,12 @@ inline auto v_InitMaterialSystem = p_InitMaterialSystem.RCast() // 0x14024B390 // 48 83 EC 28 48 8B 0D ? ? ? ? 48 8D 15 ? ? ? ? 48 8B 01 FF 90 ? ? ? ? 48 8B 0D ? ? ? ? 48 8D 15 ? ? ? ? 48 8B 01 FF 90 ? ? ? ? // /////////////////////////////////////////////////////////////////////////////// -class HGL_MatSysIFace : public IDetour +class VGL_MatSysIFace : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: InitMaterialSystem : 0x" << std::hex << std::uppercase << p_InitMaterialSystem.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: InitMaterialSystem : {:#18x} |\n", p_InitMaterialSystem.GetPtr()); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -27,4 +27,4 @@ class HGL_MatSysIFace : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HGL_MatSysIFace); +REGISTER(VGL_MatSysIFace); diff --git a/r5dev/engine/gl_rsurf.h b/r5dev/engine/gl_rsurf.h index 8608c61e..77c9e91d 100644 --- a/r5dev/engine/gl_rsurf.h +++ b/r5dev/engine/gl_rsurf.h @@ -14,14 +14,14 @@ inline auto V_DrawWorldMeshesDepthAtTheEnd = P_DrawWorldMeshesDepthAtTheEnd.RCas void RSurf_Attach(); void RSurf_Detach(); /////////////////////////////////////////////////////////////////////////////// -class HGL_RSurf : public IDetour +class VGL_RSurf : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: R_DrawWorldMeshes : 0x" << std::hex << std::uppercase << P_DrawWorldMeshes.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: R_DrawWorldMeshesDepthOnly : 0x" << std::hex << std::uppercase << P_DrawWorldMeshesDepthOnly.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: R_DrawWorldMeshesDepthAtTheEnd : 0x" << std::hex << std::uppercase << P_DrawWorldMeshesDepthAtTheEnd.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: R_DrawWorldMeshes : {:#18x} |\n", P_DrawWorldMeshes.GetPtr()); + spdlog::debug("| FUN: R_DrawWorldMeshesDepthOnly : {:#18x} |\n", P_DrawWorldMeshesDepthOnly.GetPtr()); + spdlog::debug("| FUN: R_DrawWorldMeshesDepthAtTheEnd : {:#18x} |\n", P_DrawWorldMeshesDepthAtTheEnd.GetPtr()); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -44,6 +44,6 @@ class HGL_RSurf : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HGL_RSurf); +REGISTER(VGL_RSurf); #endif // GL_RSURF_H diff --git a/r5dev/engine/gl_screen.h b/r5dev/engine/gl_screen.h index b7883d09..1bfaa40f 100644 --- a/r5dev/engine/gl_screen.h +++ b/r5dev/engine/gl_screen.h @@ -10,14 +10,14 @@ inline bool* scr_engineevent_loadingstarted = nullptr; void SCR_EndLoadingPlaque(void); /////////////////////////////////////////////////////////////////////////////// -class HGL_Screen : public IDetour +class VGL_Screen : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: SCR_BeginLoadingPlaque : 0x" << std::hex << std::uppercase << SCR_BeginLoadingPlaque.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| VAR: scr_drawloading : 0x" << std::hex << std::uppercase << scr_drawloading << std::setw(0) << " |" << std::endl; - std::cout << "| VAR: scr_engineevent_loadingstarted : 0x" << std::hex << std::uppercase << scr_engineevent_loadingstarted << std::setw(0) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: SCR_BeginLoadingPlaque : {:#18x} |\n", SCR_BeginLoadingPlaque.GetPtr()); + spdlog::debug("| VAR: scr_drawloading : {:#18x} |\n", reinterpret_cast(scr_drawloading)); + spdlog::debug("| VAR: scr_engineevent_loadingstarted : {:#18x} |\n", reinterpret_cast(scr_engineevent_loadingstarted)); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -46,4 +46,4 @@ class HGL_Screen : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HGL_Screen); +REGISTER(VGL_Screen); diff --git a/r5dev/engine/host.h b/r5dev/engine/host.h index 3f9c5561..0d88f4f5 100644 --- a/r5dev/engine/host.h +++ b/r5dev/engine/host.h @@ -16,17 +16,17 @@ inline bool* g_bAbortServerSet = nullptr; inline jmp_buf* host_abortserver = nullptr; /////////////////////////////////////////////////////////////////////////////// -class HHost : public IDetour +class VHost : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: _Host_RunFrame : 0x" << std::hex << std::uppercase << p_Host_RunFrame.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: _Host_RunFrame_Render : 0x" << std::hex << std::uppercase << p_Host_RunFrame_Render.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: Host_Error : 0x" << std::hex << std::uppercase << p_Host_Error.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: VCR_EnterPausedState : 0x" << std::hex << std::uppercase << p_VCR_EnterPausedState.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| VAR: host_abortserver : 0x" << std::hex << std::uppercase << host_abortserver << std::setw(0) << " |" << std::endl; - std::cout << "| VAR: g_bAbortServerSet : 0x" << std::hex << std::uppercase << g_bAbortServerSet << std::setw(0) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: _Host_RunFrame : {:#18x} |\n", p_Host_RunFrame.GetPtr()); + spdlog::debug("| FUN: _Host_RunFrame_Render : {:#18x} |\n", p_Host_RunFrame_Render.GetPtr()); + spdlog::debug("| FUN: Host_Error : {:#18x} |\n", p_Host_Error.GetPtr()); + spdlog::debug("| FUN: VCR_EnterPausedState : {:#18x} |\n", p_VCR_EnterPausedState.GetPtr()); + spdlog::debug("| VAR: host_abortserver : {:#18x} |\n", reinterpret_cast(host_abortserver)); + spdlog::debug("| VAR: g_bAbortServerSet : {:#18x} |\n", reinterpret_cast(g_bAbortServerSet)); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -60,4 +60,4 @@ class HHost : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HHost); \ No newline at end of file +REGISTER(VHost); \ No newline at end of file diff --git a/r5dev/engine/host_cmd.h b/r5dev/engine/host_cmd.h index f56edbd3..b3a3481a 100644 --- a/r5dev/engine/host_cmd.h +++ b/r5dev/engine/host_cmd.h @@ -25,15 +25,15 @@ extern EngineParms_t* g_pEngineParms; /////////////////////////////////////////////////////////////////////////////// -class HHostCmd : public IDetour +class VHostCmd : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: Host_Init : 0x" << std::hex << std::uppercase << p_Host_Init.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: Host_NewGame : 0x" << std::hex << std::uppercase << p_Host_NewGame.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: Host_ChangeLevel : 0x" << std::hex << std::uppercase << p_Host_ChangeLevel.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| VAR: g_pEngineParms : 0x" << std::hex << std::uppercase << g_pEngineParmsBuffer.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: Host_Init : {:#18x} |\n", p_Host_Init.GetPtr()); + spdlog::debug("| FUN: Host_NewGame : {:#18x} |\n", p_Host_NewGame.GetPtr()); + spdlog::debug("| FUN: Host_ChangeLevel : {:#18x} |\n", p_Host_ChangeLevel.GetPtr()); + spdlog::debug("| VAR: g_pEngineParms : {:#18x} |\n", g_pEngineParmsBuffer.GetPtr()); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -65,4 +65,4 @@ class HHostCmd : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HHostCmd); +REGISTER(VHostCmd); diff --git a/r5dev/engine/host_state.h b/r5dev/engine/host_state.h index 7cdff537..5869ddd0 100644 --- a/r5dev/engine/host_state.h +++ b/r5dev/engine/host_state.h @@ -72,15 +72,15 @@ void CHostState_Detach(); extern CHostState* g_pHostState; /////////////////////////////////////////////////////////////////////////////// -class HHostState : public IDetour +class VHostState : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: CHostState::FrameUpdate : 0x" << std::hex << std::uppercase << p_CHostState_FrameUpdate.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: CHostState::State_Run : 0x" << std::hex << std::uppercase << p_CHostState_State_Run.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: CHostState::State_GameShutDown : 0x" << std::hex << std::uppercase << p_CHostState_State_GameShutDown.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| VAR: g_pHostState : 0x" << std::hex << std::uppercase << g_pHostState << std::setw(0) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: CHostState::FrameUpdate : {:#18x} |\n", p_CHostState_FrameUpdate.GetPtr()); + spdlog::debug("| FUN: CHostState::State_Run : {:#18x} |\n", p_CHostState_State_Run.GetPtr()); + spdlog::debug("| FUN: CHostState::State_GameShutDown : {:#18x} |\n", p_CHostState_State_GameShutDown.GetPtr()); + spdlog::debug("| VAR: g_pHostState : {:#18x} |\n", reinterpret_cast(g_pHostState)); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -93,11 +93,9 @@ class HHostState : public IDetour #elif defined (GAMEDLL_S3) p_CHostState_State_GameShutDown = g_mGameDll.FindPatternSIMD(reinterpret_cast("\x48\x89\x5C\x24\x00\x57\x48\x83\xEC\x20\x48\x8B\xD9\xE8\x00\x00\x00\x00\x48\x8B\x0D\x00\x00\x00\x00"), "xxxx?xxxxxxxxx????xxx????"); #endif - CHostState_FrameUpdate = p_CHostState_FrameUpdate.RCast(); /*48 89 5C 24 08 48 89 6C 24 20 F3 0F 11 54 24 18*/ CHostState_State_Run = p_CHostState_State_Run.RCast(); /*48 8B C4 48 89 58 10 48 89 70 18 48 89 78 20 55 41 54 41 55 41 56 41 57 48 8D A8 ?? ?? ?? ?? 48 81 EC ?? ?? ?? ?? 0F 29 70 C8 45 33 E4*/ CHostState_State_GameShutDown = p_CHostState_State_GameShutDown.RCast(); /*48 89 5C 24 ?? 57 48 83 EC 20 48 8B D9 E8 ?? ?? ?? ?? 48 8B 0D ?? ?? ?? ??*/ - } virtual void GetVar(void) const { @@ -109,4 +107,4 @@ class HHostState : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HHostState); +REGISTER(VHostState); diff --git a/r5dev/engine/modelloader.h b/r5dev/engine/modelloader.h index 0b413df7..8a26a1a4 100644 --- a/r5dev/engine/modelloader.h +++ b/r5dev/engine/modelloader.h @@ -80,20 +80,20 @@ void CModelLoader_Attach(); void CModelLoader_Detach(); /////////////////////////////////////////////////////////////////////////////// -class HModelLoader : public IDetour +class VModelLoader : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: CModelLoader::FindModel : 0x" << std::hex << std::uppercase << p_CModelLoader__FindModel.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: CModelLoader::LoadModel : 0x" << std::hex << std::uppercase << p_CModelLoader__LoadModel.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: CModelLoader::UnloadModel : 0x" << std::hex << std::uppercase << p_CModelLoader__UnloadModel.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: CModelLoader::Map_LoadModelGuts : 0x" << std::hex << std::uppercase << p_CModelLoader__Map_LoadModelGuts.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: CModelLoader::Map_IsValid : 0x" << std::hex << std::uppercase << p_CModelLoader__Map_IsValid.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: CModelLoader::Studio_LoadModel : 0x" << std::hex << std::uppercase << p_CModelLoader__Studio_LoadModel.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: GetSpriteInfo : 0x" << std::hex << std::uppercase << p_GetSpriteInfo.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: BuildSpriteLoadName : 0x" << std::hex << std::uppercase << p_BuildSpriteLoadName.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| VAR: g_pModelLoader : 0x" << std::hex << std::uppercase << g_pModelLoader << std::setw(0) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: CModelLoader::FindModel : {:#18x} |\n", p_CModelLoader__FindModel.GetPtr()); + spdlog::debug("| FUN: CModelLoader::LoadModel : {:#18x} |\n", p_CModelLoader__LoadModel.GetPtr()); + spdlog::debug("| FUN: CModelLoader::UnloadModel : {:#18x} |\n", p_CModelLoader__UnloadModel.GetPtr()); + spdlog::debug("| FUN: CModelLoader::Map_LoadModelGuts : {:#18x} |\n", p_CModelLoader__Map_LoadModelGuts.GetPtr()); + spdlog::debug("| FUN: CModelLoader::Map_IsValid : {:#18x} |\n", p_CModelLoader__Map_IsValid.GetPtr()); + spdlog::debug("| FUN: CModelLoader::Studio_LoadModel : {:#18x} |\n", p_CModelLoader__Studio_LoadModel.GetPtr()); + spdlog::debug("| FUN: GetSpriteInfo : {:#18x} |\n", p_GetSpriteInfo.GetPtr()); + spdlog::debug("| FUN: BuildSpriteLoadName : {:#18x} |\n", p_BuildSpriteLoadName.GetPtr()); + spdlog::debug("| VAR: g_pModelLoader : {:#18x} |\n", reinterpret_cast(g_pModelLoader)); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -137,4 +137,4 @@ class HModelLoader : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HModelLoader); +REGISTER(VModelLoader); diff --git a/r5dev/engine/net.h b/r5dev/engine/net.h index 891749f0..1806e1a2 100644 --- a/r5dev/engine/net.h +++ b/r5dev/engine/net.h @@ -42,18 +42,18 @@ extern string g_szNetKey; extern uintptr_t g_pNetKey; /////////////////////////////////////////////////////////////////////////////// -class HNetChan : public IDetour +class VNetChan : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: NET_Init : 0x" << std::hex << std::uppercase << p_NET_Init.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: NET_Shutdown : 0x" << std::hex << std::uppercase << p_NET_Shutdown.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: NET_SetKey : 0x" << std::hex << std::uppercase << p_NET_SetKey.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: NET_ReceiveDatagram : 0x" << std::hex << std::uppercase << p_NET_ReceiveDatagram.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: NET_SendDatagram : 0x" << std::hex << std::uppercase << p_NET_SendDatagram.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: NET_PrintFunc : 0x" << std::hex << std::uppercase << p_NET_PrintFunc.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| VAR: g_pNetKey : 0x" << std::hex << std::uppercase << g_pNetKey << std::setw(nPad) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: NET_Init : {:#18x} |\n", p_NET_Init.GetPtr()); + spdlog::debug("| FUN: NET_Shutdown : {:#18x} |\n", p_NET_Shutdown.GetPtr()); + spdlog::debug("| FUN: NET_SetKey : {:#18x} |\n", p_NET_SetKey.GetPtr()); + spdlog::debug("| FUN: NET_ReceiveDatagram : {:#18x} |\n", p_NET_ReceiveDatagram.GetPtr()); + spdlog::debug("| FUN: NET_SendDatagram : {:#18x} |\n", p_NET_SendDatagram.GetPtr()); + spdlog::debug("| FUN: NET_PrintFunc : {:#18x} |\n", p_NET_PrintFunc.GetPtr()); + spdlog::debug("| VAR: g_pNetKey : {:#18x} |\n", g_pNetKey); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -86,7 +86,7 @@ class HNetChan : public IDetour virtual void Detach(void) const { } }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HNetChan); +REGISTER(VNetChan); #endif // !NETCONSOLE const char* NET_ErrorString(int iCode); diff --git a/r5dev/engine/sv_main.h b/r5dev/engine/sv_main.h index efa9b1bf..0ee9f5d4 100644 --- a/r5dev/engine/sv_main.h +++ b/r5dev/engine/sv_main.h @@ -26,12 +26,12 @@ class HSV_Main : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: SV_InitGameDLL : 0x" << std::hex << std::uppercase << p_SV_ShutdownGameDLL.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: SV_ShutdownGameDLL : 0x" << std::hex << std::uppercase << p_SV_ShutdownGameDLL.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: SV_CreateBaseline : 0x" << std::hex << std::uppercase << p_SV_CreateBaseline.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: CGameServer::SpawnServer : 0x" << std::hex << std::uppercase << p_CGameServer__SpawnServer.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| VAR: s_bDedicated : 0x" << std::hex << std::uppercase << s_bDedicated << std::setw(0) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: SV_InitGameDLL : {:#18x} |\n", p_SV_ShutdownGameDLL.GetPtr()); + spdlog::debug("| FUN: SV_ShutdownGameDLL : {:#18x} |\n", p_SV_ShutdownGameDLL.GetPtr()); + spdlog::debug("| FUN: SV_CreateBaseline : {:#18x} |\n", p_SV_CreateBaseline.GetPtr()); + spdlog::debug("| FUN: CGameServer::SpawnServer : {:#18x} |\n", p_CGameServer__SpawnServer.GetPtr()); + spdlog::debug("| VAR: s_bDedicated : {:#18x} |\n", reinterpret_cast(s_bDedicated)); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { diff --git a/r5dev/engine/sys_dll.h b/r5dev/engine/sys_dll.h index a3cc7d85..1ef0e22a 100644 --- a/r5dev/engine/sys_dll.h +++ b/r5dev/engine/sys_dll.h @@ -14,13 +14,13 @@ void SysDll_Attach(); void SysDll_Detach(); /////////////////////////////////////////////////////////////////////////////// -class HSys_Dll : public IDetour +class VSys_Dll : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: Sys_Error_Internal : 0x" << std::hex << std::uppercase << p_Sys_Error_Internal.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| VAR: gfExtendedError : 0x" << std::hex << std::uppercase << gfExtendedError << std::setw(0) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: Sys_Error_Internal : {:#18x} |\n", p_Sys_Error_Internal.GetPtr()); + spdlog::debug("| VAR: gfExtendedError : {:#18x} |\n", reinterpret_cast(gfExtendedError)); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -37,4 +37,4 @@ class HSys_Dll : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HSys_Dll); \ No newline at end of file +REGISTER(VSys_Dll); \ No newline at end of file diff --git a/r5dev/engine/sys_dll2.h b/r5dev/engine/sys_dll2.h index 3168622a..91d5d636 100644 --- a/r5dev/engine/sys_dll2.h +++ b/r5dev/engine/sys_dll2.h @@ -26,16 +26,16 @@ inline CMemory g_pMapVPKCache; void SysDll2_Attach(); void SysDll2_Detach(); /////////////////////////////////////////////////////////////////////////////// -class HSys_Dll2 : public IDetour +class VSys_Dll2 : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: CEngineAPI::Connect : 0x" << std::hex << std::uppercase << p_CEngineAPI_Connect.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: CEngineAPI::ModInit : 0x" << std::hex << std::uppercase << p_CEngineAPI_ModInit.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: CEngineAPI::MainLoop : 0x" << std::hex << std::uppercase << p_CEngineAPI_MainLoop.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: PakFile_Init : 0x" << std::hex << std::uppercase << p_PakFile_Init.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| VAR: g_pMapVPKCache : 0x" << std::hex << std::uppercase << g_pMapVPKCache.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: CEngineAPI::Connect : {:#18x} |\n", p_CEngineAPI_Connect.GetPtr()); + spdlog::debug("| FUN: CEngineAPI::ModInit : {:#18x} |\n", p_CEngineAPI_ModInit.GetPtr()); + spdlog::debug("| FUN: CEngineAPI::MainLoop : {:#18x} |\n", p_CEngineAPI_MainLoop.GetPtr()); + spdlog::debug("| FUN: PakFile_Init : {:#18x} |\n", p_PakFile_Init.GetPtr()); + spdlog::debug("| VAR: g_pMapVPKCache : {:#18x} |\n", g_pMapVPKCache.GetPtr()); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -68,4 +68,4 @@ class HSys_Dll2 : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HSys_Dll2); \ No newline at end of file +REGISTER(VSys_Dll2); \ No newline at end of file diff --git a/r5dev/engine/sys_engine.h b/r5dev/engine/sys_engine.h index a0e4bdb0..e814e4b0 100644 --- a/r5dev/engine/sys_engine.h +++ b/r5dev/engine/sys_engine.h @@ -53,12 +53,12 @@ extern CEngine* g_pEngine; /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// -class HEngine : public IDetour +class VEngine : public IDetour { virtual void GetAdr(void) const { - std::cout << "| VAR: g_pEngine : 0x" << std::hex << std::uppercase << g_pEngine << std::setw(0) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| VAR: g_pEngine : {:#18x} |\n", reinterpret_cast(g_pEngine)); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { } virtual void GetVar(void) const @@ -75,4 +75,4 @@ class HEngine : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HEngine); \ No newline at end of file +REGISTER(VEngine); \ No newline at end of file diff --git a/r5dev/engine/sys_getmodes.h b/r5dev/engine/sys_getmodes.h index a9c42232..baa972e6 100644 --- a/r5dev/engine/sys_getmodes.h +++ b/r5dev/engine/sys_getmodes.h @@ -17,9 +17,9 @@ class HVideoMode_Common : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: CVideoMode_Common::CreateGameWindow : 0x" << std::hex << std::uppercase << p_CVideoMode_Common__CreateGameWindow.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: CVideoMode_Common::CreateWindowClass : 0x" << std::hex << std::uppercase << p_CVideoMode_Common__CreateWindowClass.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: CVideoMode_Common::CreateGameWindow : {:#18x} |\n", p_CVideoMode_Common__CreateGameWindow.GetPtr()); + spdlog::debug("| FUN: CVideoMode_Common::CreateWindowClass : {:#18x} |\n", p_CVideoMode_Common__CreateWindowClass.GetPtr()); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { diff --git a/r5dev/engine/sys_utils.h b/r5dev/engine/sys_utils.h index d8c8ed93..d61b93da 100644 --- a/r5dev/engine/sys_utils.h +++ b/r5dev/engine/sys_utils.h @@ -65,15 +65,15 @@ void SysUtils_Attach(); void SysUtils_Detach(); /////////////////////////////////////////////////////////////////////////////// -class HSys_Utils : public IDetour +class VSys_Utils : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: Sys_Error : 0x" << std::hex << std::uppercase << p_Sys_Error.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: Sys_Warning : 0x" << std::hex << std::uppercase << p_Warning.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: Sys_LoadAssetHelper : 0x" << std::hex << std::uppercase << p_Sys_LoadAssetHelper.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: Con_NPrintf : 0x" << std::hex << std::uppercase << p_Con_NPrintf.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: Sys_Error : {:#18X} |\n", p_Sys_Error.GetPtr()); + spdlog::debug("| FUN: Sys_Warning : {:#18X} |\n", p_Warning.GetPtr()); + spdlog::debug("| FUN: Sys_LoadAssetHelper : {:#18X} |\n", p_Sys_LoadAssetHelper.GetPtr()); + spdlog::debug("| FUN: Con_NPrintf : {:#18X} |\n", p_Con_NPrintf.GetPtr()); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -94,4 +94,4 @@ class HSys_Utils : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HSys_Utils); +REGISTER(VSys_Utils); diff --git a/r5dev/filesystem/basefilesystem.h b/r5dev/filesystem/basefilesystem.h index c690daac..20db9401 100644 --- a/r5dev/filesystem/basefilesystem.h +++ b/r5dev/filesystem/basefilesystem.h @@ -30,15 +30,15 @@ void CBaseFileSystem_Attach(); void CBaseFileSystem_Detach(); /////////////////////////////////////////////////////////////////////////////// -class HBaseFileSystem : public IDetour +class VBaseFileSystem : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: CBaseFileSystem::Warning : 0x" << std::hex << std::uppercase << p_CBaseFileSystem_Warning.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: CBaseFileSystem::LoadFromVPK : 0x" << std::hex << std::uppercase << p_CBaseFileSystem_LoadFromVPK.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: CBaseFileSystem::LoadFromCache : 0x" << std::hex << std::uppercase << p_CBaseFileSystem_LoadFromCache.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| VAR: g_pFileSystem : 0x" << std::hex << std::uppercase << g_pFileSystem << std::setw(0) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: CBaseFileSystem::Warning : {:#18x} |\n", p_CBaseFileSystem_Warning.GetPtr()); + spdlog::debug("| FUN: CBaseFileSystem::LoadFromVPK : {:#18x} |\n", p_CBaseFileSystem_LoadFromVPK.GetPtr()); + spdlog::debug("| FUN: CBaseFileSystem::LoadFromCache : {:#18x} |\n", p_CBaseFileSystem_LoadFromCache.GetPtr()); + spdlog::debug("| VAR: g_pFileSystem : {:#18x} |\n", reinterpret_cast(g_pFileSystem)); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -61,4 +61,4 @@ class HBaseFileSystem : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HBaseFileSystem); +REGISTER(VBaseFileSystem); diff --git a/r5dev/filesystem/filesystem.h b/r5dev/filesystem/filesystem.h index bde2ce06..7ed2f286 100644 --- a/r5dev/filesystem/filesystem.h +++ b/r5dev/filesystem/filesystem.h @@ -33,12 +33,12 @@ public: extern CFileSystem_Stdio* g_pFileSystem_Stdio; /////////////////////////////////////////////////////////////////////////////// -class HFileSystem_Stdio : public IDetour +class VFileSystem_Stdio : public IDetour { virtual void GetAdr(void) const { - std::cout << "| VAR: g_pFileSystem_Stdio : 0x" << std::hex << std::uppercase << g_pFileSystem_Stdio << std::setw(0) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| VAR: g_pFileSystem_Stdio : {:#18x} |\n", reinterpret_cast(g_pFileSystem_Stdio)); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { } virtual void GetVar(void) const @@ -52,5 +52,5 @@ class HFileSystem_Stdio : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HFileSystem_Stdio); +REGISTER(VFileSystem_Stdio); #endif // !FILESYSTEM_H diff --git a/r5dev/game/server/ai_network.h b/r5dev/game/server/ai_network.h index 30103e45..4a40ec65 100644 --- a/r5dev/game/server/ai_network.h +++ b/r5dev/game/server/ai_network.h @@ -51,12 +51,12 @@ inline CMemory p_CAI_Network__DebugConnectMsg; inline auto v_CAI_Network__DebugConnectMsg = p_CAI_Network__DebugConnectMsg.RCast(); /////////////////////////////////////////////////////////////////////////////// -class HAI_Network : public IDetour +class VAI_Network : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: CAI_Network::DebugConnectMsg : 0x" << std::hex << std::uppercase << p_CAI_Network__DebugConnectMsg.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: CAI_Network::DebugConnectMsg : {:#18x} |\n", p_CAI_Network__DebugConnectMsg.GetPtr()); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -70,4 +70,4 @@ class HAI_Network : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HAI_Network); +REGISTER(VAI_Network); diff --git a/r5dev/game/server/ai_networkmanager.h b/r5dev/game/server/ai_networkmanager.h index 3d962553..a4f64424 100644 --- a/r5dev/game/server/ai_networkmanager.h +++ b/r5dev/game/server/ai_networkmanager.h @@ -72,18 +72,18 @@ public: }; /////////////////////////////////////////////////////////////////////////////// -class HCAI_NetworkManager : public IDetour +class VAI_NetworkManager : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: CAI_NetworkManager::LoadNetworkGraph : 0x" << std::hex << std::uppercase << p_CAI_NetworkManager__ShouldRebuild.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: CAI_NetworkManager::ShouldRebuild : 0x" << std::hex << std::uppercase << p_CAI_NetworkManager__ShouldRebuild.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: CAI_NetworkBuilder::Build : 0x" << std::hex << std::uppercase << p_CAI_NetworkBuilder__Build.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| VAR: g_nAiNodeClusters : 0x" << std::hex << std::uppercase << g_nAiNodeClusters << std::setw(0) << " |" << std::endl; - std::cout << "| VAR: g_pppAiNodeClusters : 0x" << std::hex << std::uppercase << g_pppAiNodeClusters << std::setw(0) << " |" << std::endl; - std::cout << "| VAR: g_nAiNodeClusterLinks : 0x" << std::hex << std::uppercase << g_nAiNodeClusterLinks << std::setw(0) << " |" << std::endl; - std::cout << "| VAR: g_pppAiNodeClusterLinks : 0x" << std::hex << std::uppercase << g_pppAiNodeClusterLinks << std::setw(0) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: CAI_NetworkManager::LoadNetworkGraph : {:#18x} |\n", p_CAI_NetworkManager__ShouldRebuild.GetPtr()); + spdlog::debug("| FUN: CAI_NetworkManager::ShouldRebuild : {:#18x} |\n", p_CAI_NetworkManager__ShouldRebuild.GetPtr()); + spdlog::debug("| FUN: CAI_NetworkBuilder::Build : {:#18x} |\n", p_CAI_NetworkBuilder__Build.GetPtr() ); + spdlog::debug("| VAR: g_nAiNodeClusters : {:#18x} |\n", reinterpret_cast(g_nAiNodeClusters )); + spdlog::debug("| VAR: g_pppAiNodeClusters : {:#18x} |\n", reinterpret_cast(g_pppAiNodeClusters )); + spdlog::debug("| VAR: g_nAiNodeClusterLinks : {:#18x} |\n", reinterpret_cast(g_nAiNodeClusterLinks )); + spdlog::debug("| VAR: g_pppAiNodeClusterLinks : {:#18x} |\n", reinterpret_cast(g_pppAiNodeClusterLinks)); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -121,4 +121,4 @@ class HCAI_NetworkManager : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HCAI_NetworkManager); +REGISTER(VAI_NetworkManager); diff --git a/r5dev/game/server/detour_impl.h b/r5dev/game/server/detour_impl.h index 0d4ed335..ee88adce 100644 --- a/r5dev/game/server/detour_impl.h +++ b/r5dev/game/server/detour_impl.h @@ -14,14 +14,14 @@ inline auto dtNavMesh__addTile = p_dtNavMesh__addTile.RCast(); /////////////////////////////////////////////////////////////////////////////// -class HRecast : public IDetour +class VRecast : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: dtNavMesh::Init : 0x" << std::hex << std::uppercase << p_dtNavMesh__Init.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: dtNavMesh::addTile : 0x" << std::hex << std::uppercase << p_dtNavMesh__addTile.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: dtNavMesh::isPolyReachable : 0x" << std::hex << std::uppercase << p_dtNavMesh__isPolyReachable.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: dtNavMesh::Init : {:#18x} |\n", p_dtNavMesh__Init.GetPtr()); + spdlog::debug("| FUN: dtNavMesh::addTile : {:#18x} |\n", p_dtNavMesh__addTile.GetPtr()); + spdlog::debug("| FUN: dtNavMesh::isPolyReachable : {:#18x} |\n", p_dtNavMesh__isPolyReachable.GetPtr()); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -40,4 +40,4 @@ class HRecast : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HRecast); +REGISTER(VRecast); diff --git a/r5dev/game/server/fairfight_impl.h b/r5dev/game/server/fairfight_impl.h index 053053c8..c79d6344 100644 --- a/r5dev/game/server/fairfight_impl.h +++ b/r5dev/game/server/fairfight_impl.h @@ -6,12 +6,12 @@ inline CMemory FairFight_Init; /////////////////////////////////////////////////////////////////////////////// -class HFairFight : public IDetour +class VFairFight : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: FairFight_Init : 0x" << std::hex << std::uppercase << FairFight_Init.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: FairFight_Init : {:#18x} |\n", FairFight_Init.GetPtr()); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -28,4 +28,4 @@ class HFairFight : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HFairFight); +REGISTER(VFairFight); diff --git a/r5dev/game/server/gameinterface.h b/r5dev/game/server/gameinterface.h index f6d5096f..70e6318b 100644 --- a/r5dev/game/server/gameinterface.h +++ b/r5dev/game/server/gameinterface.h @@ -22,13 +22,13 @@ extern CServerGameDLL* g_pServerGameDLL; extern CServerGameClients* g_pServerGameClients; /////////////////////////////////////////////////////////////////////////////// -class HServerGameDLL : public IDetour +class VServerGameDLL : public IDetour { virtual void GetAdr(void) const { - std::cout << "| VAR: g_pServerGameDLL : 0x" << std::hex << std::uppercase << g_pServerGameDLL << std::setw(0) << " |" << std::endl; - std::cout << "| VAR: g_pServerGameClients : 0x" << std::hex << std::uppercase << g_pServerGameClients << std::setw(0) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| VAR: g_pServerGameDLL : {:#18x} |\n", reinterpret_cast(g_pServerGameDLL)); + spdlog::debug("| VAR: g_pServerGameClients : {:#18x} |\n", reinterpret_cast(g_pServerGameClients)); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { } virtual void GetVar(void) const @@ -43,4 +43,4 @@ class HServerGameDLL : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HServerGameDLL); +REGISTER(VServerGameDLL); diff --git a/r5dev/game/shared/animation.h b/r5dev/game/shared/animation.h index c462d717..aa34c043 100644 --- a/r5dev/game/shared/animation.h +++ b/r5dev/game/shared/animation.h @@ -7,12 +7,12 @@ inline auto v_CStudioHdr__LookupSequence = p_CStudioHdr__LookupSequence.RCast(g_pInputSystem)); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { } virtual void GetVar(void) const @@ -40,4 +40,4 @@ class HInputSystem : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HInputSystem); +REGISTER(VInputSystem); diff --git a/r5dev/launcher/IApplication.h b/r5dev/launcher/IApplication.h index 2fd592fd..168a6044 100644 --- a/r5dev/launcher/IApplication.h +++ b/r5dev/launcher/IApplication.h @@ -61,15 +61,15 @@ void IApplication_Detach(); inline bool g_bAppSystemInit = false; /////////////////////////////////////////////////////////////////////////////// -class HApplication : public IDetour +class VApplication : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: CModAppSystemGroup::Main : 0x" << std::hex << std::uppercase << p_CModAppSystemGroup_Main.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: CModAppSystemGroup::Create : 0x" << std::hex << std::uppercase << p_CModAppSystemGroup_Create.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: CSourceAppSystemGroup::Create : 0x" << std::hex << std::uppercase << p_CSourceAppSystemGroup__Create.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: CSourceAppSystemGroup::PreInit : 0x" << std::hex << std::uppercase << p_CSourceAppSystemGroup__PreInit.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: CModAppSystemGroup::Main : {:#18x} |\n", p_CModAppSystemGroup_Main.GetPtr()); + spdlog::debug("| FUN: CModAppSystemGroup::Create : {:#18x} |\n", p_CModAppSystemGroup_Create.GetPtr()); + spdlog::debug("| FUN: CSourceAppSystemGroup::Create : {:#18x} |\n", p_CSourceAppSystemGroup__Create.GetPtr()); + spdlog::debug("| FUN: CSourceAppSystemGroup::PreInit : {:#18x} |\n", p_CSourceAppSystemGroup__PreInit.GetPtr()); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -99,4 +99,4 @@ class HApplication : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HApplication); +REGISTER(VApplication); diff --git a/r5dev/launcher/launcher.h b/r5dev/launcher/launcher.h index 6f91b809..bb30e854 100644 --- a/r5dev/launcher/launcher.h +++ b/r5dev/launcher/launcher.h @@ -21,16 +21,16 @@ void Launcher_Attatch(); void Launcher_Detatch(); /////////////////////////////////////////////////////////////////////////////// -class HLauncher : public IDetour +class VLauncher : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: WinMain : 0x" << std::hex << std::uppercase << p_WinMain.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: LauncherMain : 0x" << std::hex << std::uppercase << p_LauncherMain.GetPtr() << std::setw(nPad) << " |" << std::endl; + spdlog::debug("| FUN: WinMain : {:#18x} |\n", p_WinMain.GetPtr()); + spdlog::debug("| FUN: LauncherMain : {:#18x} |\n", p_LauncherMain.GetPtr()); #if !defined (GAMEDLL_S0) && !defined (GAMEDLL_S1) - std::cout << "| FUN: RemoveSpuriousGameParameters : 0x" << std::hex << std::uppercase << p_RemoveSpuriousGameParameters.GetPtr() << std::setw(nPad) << " |" << std::endl; + spdlog::debug("| FUN: RemoveSpuriousGameParameters : {:#18x} |\n", p_RemoveSpuriousGameParameters.GetPtr()); #endif // !GAMEDLL_S0 || !GAMEDLL_S1 - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -52,5 +52,5 @@ class HLauncher : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HLauncher); +REGISTER(VLauncher); #endif // LAUNCHER_H \ No newline at end of file diff --git a/r5dev/launcher/prx.h b/r5dev/launcher/prx.h index 42a48c0f..2c5643cd 100644 --- a/r5dev/launcher/prx.h +++ b/r5dev/launcher/prx.h @@ -8,12 +8,12 @@ void PRX_Attach(); void PRX_Detach(); /////////////////////////////////////////////////////////////////////////////// -class HPRX : public IDetour +class VPRX : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: exit_or_terminate_process : 0x" << std::hex << std::uppercase << p_exit_or_terminate_process.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: exit_or_terminate_process : {:#18x} |\n", p_exit_or_terminate_process.GetPtr()); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -27,4 +27,4 @@ class HPRX : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HPRX); +REGISTER(VPRX); diff --git a/r5dev/materialsystem/cmaterialglue.h b/r5dev/materialsystem/cmaterialglue.h index 9ad3fce0..e5bc2acb 100644 --- a/r5dev/materialsystem/cmaterialglue.h +++ b/r5dev/materialsystem/cmaterialglue.h @@ -54,13 +54,13 @@ inline auto GetMaterialAtCrossHair = p_GetMaterialAtCrossHair.RCast(g_pMaterialGlueVTable)); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -78,4 +78,4 @@ class HCMaterialGlue : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HCMaterialGlue); \ No newline at end of file +REGISTER(VMaterialGlue); \ No newline at end of file diff --git a/r5dev/materialsystem/cmaterialsystem.h b/r5dev/materialsystem/cmaterialsystem.h index 69e4b229..f75af485 100644 --- a/r5dev/materialsystem/cmaterialsystem.h +++ b/r5dev/materialsystem/cmaterialsystem.h @@ -29,19 +29,19 @@ inline int* unusable_streaming_tex_memory = nullptr; void CMaterialSystem_Attach(); void CMaterialSystem_Detach(); /////////////////////////////////////////////////////////////////////////////// -class HMaterialSystem : public IDetour +class VMaterialSystem : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: CMaterialSystem::Init : 0x" << std::hex << std::uppercase << p_CMaterialSystem__Init.GetPtr() << std::setw(nPad) << " |" << std::endl; + spdlog::debug("| FUN: CMaterialSystem::Init : {:#18x} |\n", p_CMaterialSystem__Init.GetPtr()); #ifndef DEDICATED - std::cout << "| FUN: DispatchDrawCall : 0x" << std::hex << std::uppercase << p_DispatchDrawCall.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: DrawStreamOverlay : 0x" << std::hex << std::uppercase << p_DrawStreamOverlay.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| VAR: s_pRenderContext : 0x" << std::hex << std::uppercase << s_pRenderContext.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: StreamDB_Init : 0x" << std::hex << std::uppercase << p_StreamDB_Init.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| VAR: g_pMaterialSystem : 0x" << std::hex << std::uppercase << g_pMaterialSystem << std::setw(0) << " |" << std::endl; + spdlog::debug("| FUN: DispatchDrawCall : {:#18x} |\n", p_DispatchDrawCall.GetPtr()); + spdlog::debug("| FUN: DrawStreamOverlay : {:#18x} |\n", p_DrawStreamOverlay.GetPtr()); + spdlog::debug("| VAR: s_pRenderContext : {:#18x} |\n", s_pRenderContext.GetPtr()); + spdlog::debug("| FUN: StreamDB_Init : {:#18x} |\n", p_StreamDB_Init.GetPtr()); + spdlog::debug("| VAR: g_pMaterialSystem : {:#18x} |\n", reinterpret_cast(g_pMaterialSystem)); #endif // !DEDICATED - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -80,4 +80,4 @@ class HMaterialSystem : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HMaterialSystem); +REGISTER(VMaterialSystem); diff --git a/r5dev/milessdk/win64_rrthreads.h b/r5dev/milessdk/win64_rrthreads.h index ed5c61dc..c619abdc 100644 --- a/r5dev/milessdk/win64_rrthreads.h +++ b/r5dev/milessdk/win64_rrthreads.h @@ -4,12 +4,12 @@ inline CMemory p_WASAPI_GetAudioDevice; /////////////////////////////////////////////////////////////////////////////// -class HWASAPIServiceThread : public IDetour +class VWASAPIServiceThread : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: WASAPI_GetAudioDevice : 0x" << std::hex << std::uppercase << p_WASAPI_GetAudioDevice.GetPtr() << std::setw(6) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: WASAPI_GetAudioDevice : {:#18x} |\n", p_WASAPI_GetAudioDevice.GetPtr()); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -23,4 +23,4 @@ class HWASAPIServiceThread : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HWASAPIServiceThread); +REGISTER(VWASAPIServiceThread); diff --git a/r5dev/public/include/edict.h b/r5dev/public/include/edict.h index 4845185b..b26d1a43 100644 --- a/r5dev/public/include/edict.h +++ b/r5dev/public/include/edict.h @@ -46,17 +46,17 @@ inline CGlobalVarsBase* g_ClientGlobalVariables = nullptr; #endif // !DEDICATED /////////////////////////////////////////////////////////////////////////////// -class HEdict : public IDetour +class VEdict : public IDetour { virtual void GetAdr(void) const { #ifndef CLIENT_DLL - std::cout << "| VAR: g_ServerGlobalVariables : 0x" << std::hex << std::uppercase << g_ServerGlobalVariables << std::setw(0) << " |" << std::endl; + spdlog::debug("| VAR: g_ServerGlobalVariables : {:#18x} |\n", reinterpret_cast(g_ServerGlobalVariables)); #endif // !CLIENT_DLL #ifndef DEDICATED - std::cout << "| VAR: g_ClientGlobalVariables : 0x" << std::hex << std::uppercase << g_ClientGlobalVariables << std::setw(0) << " |" << std::endl; + spdlog::debug("| VAR: g_ClientGlobalVariables : {:#18x} |\n", reinterpret_cast(g_ClientGlobalVariables)); #endif // !DEDICATED - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { } virtual void GetVar(void) const @@ -84,4 +84,4 @@ class HEdict : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HEdict); +REGISTER(VEdict); diff --git a/r5dev/rtech/rtech_game.h b/r5dev/rtech/rtech_game.h index 5b7d8d6c..d3b5e477 100644 --- a/r5dev/rtech/rtech_game.h +++ b/r5dev/rtech/rtech_game.h @@ -50,17 +50,17 @@ void RTech_Game_Detach(); extern vector g_LoadedPakHandle; /////////////////////////////////////////////////////////////////////////////// -class HRTechGame : public IDetour +class VRTechGame : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: CPakFile::AsyncLoad : 0x" << std::hex << std::uppercase << p_CPakFile_AsyncLoad.GetPtr() << std::setw(nPad) << " |" << std::endl; + spdlog::debug("| FUN: CPakFile::AsyncLoad : {:#18x} |\n", p_CPakFile_AsyncLoad.GetPtr()); #if defined (GAMEDLL_S2) || defined (GAMEDLL_S3) - std::cout << "| FUN: CPakFile::LoadPak : 0x" << std::hex << std::uppercase << p_CPakFile_LoadPak.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: CPakFile::LoadMapPak : 0x" << std::hex << std::uppercase << p_CPakFile_LoadMapPak.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: CPakFile::UnloadPak : 0x" << std::hex << std::uppercase << p_CPakFile_UnloadPak.GetPtr() << std::setw(nPad) << " |" << std::endl; + spdlog::debug("| FUN: CPakFile::LoadPak : {:#18x} |\n", p_CPakFile_LoadPak.GetPtr()); + spdlog::debug("| FUN: CPakFile::LoadMapPak : {:#18x} |\n", p_CPakFile_LoadMapPak.GetPtr()); + spdlog::debug("| FUN: CPakFile::UnloadPak : {:#18x} |\n", p_CPakFile_UnloadPak.GetPtr()); #endif // GAMEDLL_S2 || GAMEDLL_S3 - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -89,4 +89,4 @@ class HRTechGame : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HRTechGame); +REGISTER(VRTechGame); diff --git a/r5dev/rtech/rtech_utils.h b/r5dev/rtech/rtech_utils.h index 6e2ed09a..7a84a1e6 100644 --- a/r5dev/rtech/rtech_utils.h +++ b/r5dev/rtech/rtech_utils.h @@ -177,13 +177,13 @@ public: extern RTech* g_pRTech; /////////////////////////////////////////////////////////////////////////////// -class HPakFile : public IDetour +class VPakFile : public IDetour { virtual void GetAdr(void) const { - std::cout << "| VAR: g_pLoadedPakInfo : 0x" << std::hex << std::uppercase << g_pLoadedPakInfo << std::setw(0) << " |" << std::endl; - std::cout << "| VAR: s_pLoadedPakCount : 0x" << std::hex << std::uppercase << s_pLoadedPakCount << std::setw(0) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| VAR: g_pLoadedPakInfo : {:#18x} |\n", reinterpret_cast(g_pLoadedPakInfo )); + spdlog::debug("| VAR: s_pLoadedPakCount : {:#18x} |\n", reinterpret_cast(s_pLoadedPakCount)); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { } virtual void GetVar(void) const @@ -199,4 +199,4 @@ class HPakFile : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HPakFile); +REGISTER(VPakFile); diff --git a/r5dev/rtech/rui/rui.h b/r5dev/rtech/rui/rui.h index 5e05f280..d1e9b27a 100644 --- a/r5dev/rtech/rui/rui.h +++ b/r5dev/rtech/rui/rui.h @@ -11,13 +11,13 @@ void Rui_Attach(); void Rui_Detach(); /////////////////////////////////////////////////////////////////////////////// -class HRui : public IDetour +class VRui : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: RuiDraw : 0x" << std::hex << std::uppercase << p_RuiDraw.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: RuiLoadAsset : 0x" << std::hex << std::uppercase << p_RuiLoadAsset.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: RuiDraw : {:#18x} |\n", p_RuiDraw.GetPtr()); + spdlog::debug("| FUN: RuiLoadAsset : {:#18x} |\n", p_RuiLoadAsset.GetPtr()); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -34,4 +34,4 @@ class HRui : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HRui); +REGISTER(VRui); diff --git a/r5dev/rtech/stryder/stryder.h b/r5dev/rtech/stryder/stryder.h index c2666d25..47fb392a 100644 --- a/r5dev/rtech/stryder/stryder.h +++ b/r5dev/rtech/stryder/stryder.h @@ -8,13 +8,13 @@ inline CMemory p_Stryder_SendOfflineRequest; inline auto Stryder_SendOfflineRequest = p_Stryder_SendOfflineRequest.RCast(); /////////////////////////////////////////////////////////////////////////////// -class HStryder : public IDetour +class VStryder : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: Stryder_StitchRequest : 0x" << std::hex << std::uppercase << p_Stryder_StitchRequest.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: Stryder_SendOfflineRequest : 0x" << std::hex << std::uppercase << p_Stryder_SendOfflineRequest.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: Stryder_StitchRequest : {:#18x} |\n", p_Stryder_StitchRequest.GetPtr()); + spdlog::debug("| FUN: Stryder_SendOfflineRequest : {:#18x} |\n", p_Stryder_SendOfflineRequest.GetPtr()); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -35,4 +35,4 @@ class HStryder : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HStryder); \ No newline at end of file +REGISTER(VStryder); \ No newline at end of file diff --git a/r5dev/server/server.h b/r5dev/server/server.h index d001358b..f38b8a79 100644 --- a/r5dev/server/server.h +++ b/r5dev/server/server.h @@ -33,15 +33,15 @@ void* HCServer_Authenticate(void* cserver, user_creds* inpacket); extern bool g_bCheckCompBanDB; /////////////////////////////////////////////////////////////////////////////// -class HServer : public IDetour +class VServer : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: CServer::Think : 0x" << std::hex << std::uppercase << p_CServer_Think.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: CServer::Authenticate : 0x" << std::hex << std::uppercase << p_CServer_Authenticate.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: CServer::RejectConnection : 0x" << std::hex << std::uppercase << p_CServer_RejectConnection.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| VAR: sv_m_nTickCount : 0x" << std::hex << std::uppercase << sv_m_nTickCount << std::setw(0) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: CServer::Think : {:#18x} |\n", p_CServer_Think.GetPtr()); + spdlog::debug("| FUN: CServer::Authenticate : {:#18x} |\n", p_CServer_Authenticate.GetPtr()); + spdlog::debug("| FUN: CServer::RejectConnection : {:#18x} |\n", p_CServer_RejectConnection.GetPtr()); + spdlog::debug("| VAR: sv_m_nTickCount : {:#18x} |\n", reinterpret_cast(sv_m_nTickCount)); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -69,4 +69,4 @@ class HServer : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HServer); +REGISTER(VServer); diff --git a/r5dev/server/vengineserver_impl.h b/r5dev/server/vengineserver_impl.h index 9725884b..e03cb087 100644 --- a/r5dev/server/vengineserver_impl.h +++ b/r5dev/server/vengineserver_impl.h @@ -29,12 +29,12 @@ class HVEngineServer : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: IVEngineServer::PersistenceAvailable : 0x" << std::hex << std::uppercase << p_IVEngineServer__PersistenceAvailable.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: IVEngineServer::IsDedicatedServer : 0x" << std::hex << std::uppercase << p_IVEngineServer__IsDedicatedServer.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: IVEngineServer::GetNumHumanPlayers : 0x" << std::hex << std::uppercase << p_IVEngineServer__GetNumHumanPlayers.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: IVEngineServer::GetNumFakeClients : 0x" << std::hex << std::uppercase << p_IVEngineServer__GetNumFakeClients.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| VAR: g_bDedicated : 0x" << std::hex << std::uppercase << g_bDedicated << std::setw(0) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: IVEngineServer::PersistenceAvailable : {:#18x} |\n", p_IVEngineServer__PersistenceAvailable.GetPtr()); + spdlog::debug("| FUN: IVEngineServer::IsDedicatedServer : {:#18x} |\n", p_IVEngineServer__IsDedicatedServer.GetPtr()); + spdlog::debug("| FUN: IVEngineServer::GetNumHumanPlayers : {:#18x} |\n", p_IVEngineServer__GetNumHumanPlayers.GetPtr()); + spdlog::debug("| FUN: IVEngineServer::GetNumFakeClients : {:#18x} |\n", p_IVEngineServer__GetNumFakeClients.GetPtr()); + spdlog::debug("| VAR: g_bDedicated : {:#18x} |\n", reinterpret_cast(g_bDedicated)); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { diff --git a/r5dev/squirrel/sqapi.h b/r5dev/squirrel/sqapi.h index a8f0e4b8..364cb2e2 100644 --- a/r5dev/squirrel/sqapi.h +++ b/r5dev/squirrel/sqapi.h @@ -66,23 +66,23 @@ inline CMemory p_sq_call; inline auto v_sq_call = p_sq_call.RCast(); /////////////////////////////////////////////////////////////////////////////// -class HSqapi : public IDetour +class VSqapi : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: sq_pushroottable : 0x" << std::hex << std::uppercase << p_sq_pushroottable.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: sq_pushbool : 0x" << std::hex << std::uppercase << p_sq_pushbool.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: sq_pushstring : 0x" << std::hex << std::uppercase << p_sq_pushstring.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: sq_pushinteger : 0x" << std::hex << std::uppercase << p_sq_pushinteger.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: sq_pushconstant : 0x" << std::hex << std::uppercase << p_sq_pushconstant.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: sq_newarray : 0x" << std::hex << std::uppercase << p_sq_newarray.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: sq_arrayappend : 0x" << std::hex << std::uppercase << p_sq_arrayappend.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: sq_newtable : 0x" << std::hex << std::uppercase << p_sq_newtable.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: sq_newslot : 0x" << std::hex << std::uppercase << p_sq_newslot.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: sq_pushstructure : 0x" << std::hex << std::uppercase << p_sq_pushstructure.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: sq_compilebuffer : 0x" << std::hex << std::uppercase << p_sq_compilebuffer.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: sq_call : 0x" << std::hex << std::uppercase << p_sq_call.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: sq_pushroottable : {:#18x} |\n", p_sq_pushroottable.GetPtr()); + spdlog::debug("| FUN: sq_pushbool : {:#18x} |\n", p_sq_pushbool.GetPtr()); + spdlog::debug("| FUN: sq_pushstring : {:#18x} |\n", p_sq_pushstring.GetPtr()); + spdlog::debug("| FUN: sq_pushinteger : {:#18x} |\n", p_sq_pushinteger.GetPtr()); + spdlog::debug("| FUN: sq_pushconstant : {:#18x} |\n", p_sq_pushconstant.GetPtr()); + spdlog::debug("| FUN: sq_newarray : {:#18x} |\n", p_sq_newarray.GetPtr()); + spdlog::debug("| FUN: sq_arrayappend : {:#18x} |\n", p_sq_arrayappend.GetPtr()); + spdlog::debug("| FUN: sq_newtable : {:#18x} |\n", p_sq_newtable.GetPtr()); + spdlog::debug("| FUN: sq_newslot : {:#18x} |\n", p_sq_newslot.GetPtr()); + spdlog::debug("| FUN: sq_pushstructure : {:#18x} |\n", p_sq_pushstructure.GetPtr()); + spdlog::debug("| FUN: sq_compilebuffer : {:#18x} |\n", p_sq_compilebuffer.GetPtr()); + spdlog::debug("| FUN: sq_call : {:#18x} |\n", p_sq_call.GetPtr()); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -128,4 +128,4 @@ class HSqapi : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HSqapi); +REGISTER(VSqapi); diff --git a/r5dev/squirrel/sqinit.h b/r5dev/squirrel/sqinit.h index 18a777dd..7a216e44 100644 --- a/r5dev/squirrel/sqinit.h +++ b/r5dev/squirrel/sqinit.h @@ -51,19 +51,19 @@ namespace VSquirrel } /////////////////////////////////////////////////////////////////////////////// -class HSqInit : public IDetour +class VSqInit : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: Remote_BeginRegisteringFunctions : 0x" << std::hex << std::uppercase << p_Script_Remote_BeginRegisteringFunctions.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: RestoreRemoteChecksumsFromSaveGame : 0x" << std::hex << std::uppercase << p_RestoreRemoteChecksumsFromSaveGame.GetPtr() << std::setw(nPad) << " |" << std::endl; + spdlog::debug("| FUN: Remote_BeginRegisteringFunctions : {:#18x} |\n", p_Script_Remote_BeginRegisteringFunctions.GetPtr()); + spdlog::debug("| FUN: RestoreRemoteChecksumsFromSaveGame : {:#18x} |\n", p_RestoreRemoteChecksumsFromSaveGame.GetPtr()); #ifndef CLIENT_DLL - std::cout << "| VAR: g_nServerRemoteChecksum : 0x" << std::hex << std::uppercase << g_nServerRemoteChecksum << std::setw(0) << " |" << std::endl; + spdlog::debug("| VAR: g_nServerRemoteChecksum : {:#18x} |\n", reinterpret_cast(g_nServerRemoteChecksum)); #endif // !CLIENT_DLL #ifndef DEDICATED - std::cout << "| VAR: g_nClientRemoteChecksum : 0x" << std::hex << std::uppercase << g_nClientRemoteChecksum << std::setw(0) << " |" << std::endl; + spdlog::debug("| VAR: g_nClientRemoteChecksum : {:#18x} |\n", reinterpret_cast(g_nClientRemoteChecksum)); #endif // !DEDICATED - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -88,4 +88,4 @@ class HSqInit : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HSqInit); +REGISTER(VSqInit); diff --git a/r5dev/squirrel/sqstdaux.h b/r5dev/squirrel/sqstdaux.h index 46e9a093..be73f7d9 100644 --- a/r5dev/squirrel/sqstdaux.h +++ b/r5dev/squirrel/sqstdaux.h @@ -10,12 +10,12 @@ inline auto v_sqstd_aux_printerror = p_sqstd_aux_printerror.RCast vDetour; std::size_t AddDetour(IDetour* pDetour) { @@ -40,5 +39,5 @@ namespace } } -REGISTER(HDetour); +REGISTER(VDetour); #endif // IDETOUR_H diff --git a/r5dev/tier0/commandline.h b/r5dev/tier0/commandline.h index 711e3132..90d7c9ed 100644 --- a/r5dev/tier0/commandline.h +++ b/r5dev/tier0/commandline.h @@ -23,12 +23,12 @@ extern CCommandLine* g_pCmdLine; CCommandLine* CommandLine(void); /////////////////////////////////////////////////////////////////////////////// -class HCommandLine : public IDetour +class VCommandLine : public IDetour { virtual void GetAdr(void) const { - std::cout << "| VAR: g_pCmdLine : 0x" << std::hex << std::uppercase << CommandLine() << std::setw(0) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| VAR: g_pCmdLine : {:#18x} |\n", reinterpret_cast(g_pCmdLine)); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { } virtual void GetVar(void) const @@ -43,4 +43,4 @@ class HCommandLine : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HCommandLine); +REGISTER(VCommandLine); diff --git a/r5dev/tier0/jobthread.h b/r5dev/tier0/jobthread.h index 69d3bb90..f560f571 100644 --- a/r5dev/tier0/jobthread.h +++ b/r5dev/tier0/jobthread.h @@ -10,13 +10,13 @@ inline auto JT_AcquireFifoLock = p_JT_AcquireFifoLock.RCast(); void JT_Attach(); void JT_Detach(); /////////////////////////////////////////////////////////////////////////////// -class HJobThread : public IDetour +class VJobThread : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: JT_HelpWithAnything : 0x" << std::hex << std::uppercase << p_JT_HelpWithAnything.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: JT_AcquireFifoLock : 0x" << std::hex << std::uppercase << p_JT_AcquireFifoLock.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: JT_HelpWithAnything : {:#18x} |\n", p_JT_HelpWithAnything.GetPtr()); + spdlog::debug("| FUN: JT_AcquireFifoLock : {:#18x} |\n", p_JT_AcquireFifoLock.GetPtr()); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -37,6 +37,6 @@ class HJobThread : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HJobThread); +REGISTER(VJobThread); #endif // JOBTHREAD_H diff --git a/r5dev/tier0/threadtools.h b/r5dev/tier0/threadtools.h index ee1ff9a8..d2138505 100644 --- a/r5dev/tier0/threadtools.h +++ b/r5dev/tier0/threadtools.h @@ -33,13 +33,13 @@ private: }; /////////////////////////////////////////////////////////////////////////////// -class HThreadTools : public IDetour +class VThreadTools : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: CThreadFastMutex::WaitForLock : 0x" << std::hex << std::uppercase << p_MutexInternal_WaitForLock.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: CThreadFastMutex::ReleaseWaiter : 0x" << std::hex << std::uppercase << p_MutexInternal_ReleaseWaiter.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: CThreadFastMutex::WaitForLock : {:#18x} |\n", p_MutexInternal_WaitForLock.GetPtr()); + spdlog::debug("| FUN: CThreadFastMutex::ReleaseWaiter : {:#18x} |\n", p_MutexInternal_ReleaseWaiter.GetPtr()); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -56,6 +56,6 @@ class HThreadTools : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HThreadTools); +REGISTER(VThreadTools); #endif // THREADTOOLS_H diff --git a/r5dev/tier0/tslist.h b/r5dev/tier0/tslist.h index b395d539..f497ea78 100644 --- a/r5dev/tier0/tslist.h +++ b/r5dev/tier0/tslist.h @@ -13,15 +13,15 @@ inline auto CTSListBase_Wrapper = p_CTSListBase_Wrapper.RCast() inline CMemory g_pMallocPool; /////////////////////////////////////////////////////////////////////////////// -class HTSListBase : public IDetour +class VTSListBase : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: MemAlloc_Internal : 0x" << std::hex << std::uppercase << p_MemAlloc_Internal.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: MemAlloc_Wrapper : 0x" << std::hex << std::uppercase << p_MemAlloc_Wrapper.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: CTSListBase_Wrapper : 0x" << std::hex << std::uppercase << p_CTSListBase_Wrapper.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| VAR: g_pMallocPool : 0x" << std::hex << std::uppercase << g_pMallocPool.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: MemAlloc_Internal : {:#18x} |\n", p_MemAlloc_Internal.GetPtr()); + spdlog::debug("| FUN: MemAlloc_Wrapper : {:#18x} |\n", p_MemAlloc_Wrapper.GetPtr()); + spdlog::debug("| FUN: CTSListBase_Wrapper : {:#18x} |\n", p_CTSListBase_Wrapper.GetPtr()); + spdlog::debug("| VAR: g_pMallocPool : {:#18x} |\n", g_pMallocPool.GetPtr()); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -57,6 +57,6 @@ class HTSListBase : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HTSListBase); +REGISTER(VTSListBase); #endif // TSLIST_H diff --git a/r5dev/tier1/IConVar.h b/r5dev/tier1/IConVar.h index 61fb56b4..558414de 100644 --- a/r5dev/tier1/IConVar.h +++ b/r5dev/tier1/IConVar.h @@ -188,16 +188,16 @@ void IConVar_Detach(); extern ConVar* g_pConVar; /////////////////////////////////////////////////////////////////////////////// -class HConVar : public IDetour +class VConVar : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: IConVar::IsFlagSet : 0x" << std::hex << std::uppercase << p_IConVar_IsFlagSet.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: IConVar::SetInfo : 0x" << std::hex << std::uppercase << p_ConVar_SetInfo.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: IConVar::Register : 0x" << std::hex << std::uppercase << p_ConVar_Register.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| VAR: g_pConVarVtable : 0x" << std::hex << std::uppercase << g_pConVarVtable.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| VAR: g_pIConVarVtable : 0x" << std::hex << std::uppercase << g_pIConVarVtable.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: IConVar::IsFlagSet : {:#18x} |\n", p_IConVar_IsFlagSet.GetPtr()); + spdlog::debug("| FUN: IConVar::SetInfo : {:#18x} |\n", p_ConVar_SetInfo.GetPtr()); + spdlog::debug("| FUN: IConVar::Register : {:#18x} |\n", p_ConVar_Register.GetPtr()); + spdlog::debug("| VAR: g_pConVarVtable : {:#18x} |\n", g_pConVarVtable.GetPtr()); + spdlog::debug("| VAR: g_pIConVarVtable : {:#18x} |\n", g_pIConVarVtable.GetPtr()); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -224,4 +224,4 @@ class HConVar : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HConVar); +REGISTER(VConVar); diff --git a/r5dev/tier1/cmd.h b/r5dev/tier1/cmd.h index 964c77e3..d2d97993 100644 --- a/r5dev/tier1/cmd.h +++ b/r5dev/tier1/cmd.h @@ -167,22 +167,22 @@ void ConCommand_Detach(); extern ConCommand* g_pConCommand; /////////////////////////////////////////////////////////////////////////////// -class HConCommand : public IDetour +class VConCommand : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: Cbuf_AddText : 0x" << std::hex << std::uppercase << p_Cbuf_AddText.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: Cbuf_Execute : 0x" << std::hex << std::uppercase << p_Cbuf_Execute.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; - std::cout << "| FUN: ConCommandBase::IsFlagSet : 0x" << std::hex << std::uppercase << p_ConCommandBase_IsFlagSet.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: ConCommand::CMaterialSystemCmdInit : 0x" << std::hex << std::uppercase << p_ConCommand_CMaterialSystemCmdInit.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: ConCommand::RegisterConCommand : 0x" << std::hex << std::uppercase << p_ConCommand_RegisterConCommand.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; - std::cout << "| FUN: CallbackStub : 0x" << std::hex << std::uppercase << p_CallbackStub.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: NullSub : 0x" << std::hex << std::uppercase << p_NullSub.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; - std::cout << "| VAR: g_pConCommandVtable : 0x" << std::hex << std::uppercase << g_pConCommandVtable.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: Cbuf_AddText : {:#18x} |\n", p_Cbuf_AddText.GetPtr()); + spdlog::debug("| FUN: Cbuf_Execute : {:#18x} |\n", p_Cbuf_Execute.GetPtr()); + spdlog::debug("+----------------------------------------------------------------+\n"); + spdlog::debug("| FUN: ConCommandBase::IsFlagSet : {:#18x} |\n", p_ConCommandBase_IsFlagSet.GetPtr()); + spdlog::debug("| FUN: ConCommand::CMaterialSystemCmdInit : {:#18x} |\n", p_ConCommand_CMaterialSystemCmdInit.GetPtr()); + spdlog::debug("| FUN: ConCommand::RegisterConCommand : {:#18x} |\n", p_ConCommand_RegisterConCommand.GetPtr()); + spdlog::debug("+----------------------------------------------------------------+\n"); + spdlog::debug("| FUN: CallbackStub : {:#18x} |\n", p_CallbackStub.GetPtr()); + spdlog::debug("| FUN: NullSub : {:#18x} |\n", p_NullSub.GetPtr()); + spdlog::debug("+----------------------------------------------------------------+\n"); + spdlog::debug("| VAR: g_pConCommandVtable : {:#18x} |\n", g_pConCommandVtable.GetPtr()); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -212,4 +212,4 @@ class HConCommand : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HConCommand); +REGISTER(VConCommand); diff --git a/r5dev/tier1/cvar.h b/r5dev/tier1/cvar.h index 0ff01f21..00034424 100644 --- a/r5dev/tier1/cvar.h +++ b/r5dev/tier1/cvar.h @@ -161,14 +161,14 @@ inline CMemory p_CCVar_GetCommandLineValue; inline auto CCVar_GetCommandLineValue = p_CCVar_GetCommandLineValue.RCast(); /////////////////////////////////////////////////////////////////////////////// -class HCvar : public IDetour +class VCVar : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: CCVar::Disconnect : 0x" << std::hex << std::uppercase << p_CCVar_Disconnect.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: CCVar::GetCommandLineValue : 0x" << std::hex << std::uppercase << p_CCVar_GetCommandLineValue.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| VAR: g_pCVar : 0x" << std::hex << std::uppercase << g_pCVar << std::setw(0) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: CCVar::Disconnect : {:#18x} |\n", p_CCVar_Disconnect.GetPtr()); + spdlog::debug("| FUN: CCVar::GetCommandLineValue : {:#18x} |\n", p_CCVar_GetCommandLineValue.GetPtr()); + spdlog::debug("| VAR: g_pCVar : {:#18x} |\n", reinterpret_cast(g_pCVar)); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -194,4 +194,4 @@ class HCvar : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HCvar); +REGISTER(VCVar); diff --git a/r5dev/vgui/vgui_baseui_interface.h b/r5dev/vgui/vgui_baseui_interface.h index da5a3994..07bc414f 100644 --- a/r5dev/vgui/vgui_baseui_interface.h +++ b/r5dev/vgui/vgui_baseui_interface.h @@ -38,14 +38,14 @@ inline auto CEngineVGui_Unknown = p_CEngineVGui_Unknown.RCast(g_pEngineVGui)); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -75,4 +75,4 @@ class HEngineVGui : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HEngineVGui); \ No newline at end of file +REGISTER(VEngineVGui); \ No newline at end of file diff --git a/r5dev/vgui/vgui_fpspanel.h b/r5dev/vgui/vgui_fpspanel.h index d7cc43e3..1e96083c 100644 --- a/r5dev/vgui/vgui_fpspanel.h +++ b/r5dev/vgui/vgui_fpspanel.h @@ -9,12 +9,12 @@ void CFPSPanel_Attach(); void CFPSPanel_Detach(); /////////////////////////////////////////////////////////////////////////////// -class HFPSPanel : public IDetour +class VFPSPanel : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: CFPSPanel::Paint : 0x" << std::hex << std::uppercase << p_CFPSPanel_Paint.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: CFPSPanel::Paint : {:#18x} |\n", p_CFPSPanel_Paint.GetPtr()); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -28,4 +28,4 @@ class HFPSPanel : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HFPSPanel); +REGISTER(VFPSPanel); diff --git a/r5dev/vguimatsurface/MatSystemSurface.h b/r5dev/vguimatsurface/MatSystemSurface.h index eb6f4c01..48907fb3 100644 --- a/r5dev/vguimatsurface/MatSystemSurface.h +++ b/r5dev/vguimatsurface/MatSystemSurface.h @@ -8,13 +8,13 @@ inline auto CMatSystemSurface_DrawColoredText = p_CMatSystemSurface_DrawColoredT inline CMemory g_pMatSystemSurface; /////////////////////////////////////////////////////////////////////////////// -class HMatSystemSurface : public IDetour +class VMatSystemSurface : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: CMatSystemSurface::DrawColoredText : 0x" << std::hex << std::uppercase << p_CMatSystemSurface_DrawColoredText.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| VAR: g_pMatSystemSurface : 0x" << std::hex << std::uppercase << g_pMatSystemSurface.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: CMatSystemSurface::DrawColoredText : {:#18x} |\n", p_CMatSystemSurface_DrawColoredText.GetPtr()); + spdlog::debug("| VAR: g_pMatSystemSurface : {:#18x} |\n", g_pMatSystemSurface.GetPtr()); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -39,4 +39,4 @@ class HMatSystemSurface : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HMatSystemSurface); +REGISTER(VMatSystemSurface); diff --git a/r5dev/vpc/IAppSystem.h b/r5dev/vpc/IAppSystem.h index d4231ae5..2e255175 100644 --- a/r5dev/vpc/IAppSystem.h +++ b/r5dev/vpc/IAppSystem.h @@ -5,12 +5,12 @@ inline CMemory p_IAppSystem_LoadLibrary; // C initializers/terminators inline auto IAppSystem_LoadLibrary = p_IAppSystem_LoadLibrary.RCast(); /////////////////////////////////////////////////////////////////////////////// -class HAppSystem : public IDetour +class VAppSystem : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: IAppSystem::LoadLibrary : 0x" << std::hex << std::uppercase << p_IAppSystem_LoadLibrary.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: IAppSystem::LoadLibrary : {:#18x} |\n", p_IAppSystem_LoadLibrary.GetPtr()); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -24,4 +24,4 @@ class HAppSystem : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HAppSystem); +REGISTER(VAppSystem); diff --git a/r5dev/vpc/interfaces.h b/r5dev/vpc/interfaces.h index b112fc86..10655a54 100644 --- a/r5dev/vpc/interfaces.h +++ b/r5dev/vpc/interfaces.h @@ -92,12 +92,12 @@ extern CFactory* g_pFactory; inline CMemory s_pInterfacesRegs; /////////////////////////////////////////////////////////////////////////////// -class HFactory : public IDetour +class VFactory : public IDetour { virtual void GetAdr(void) const { - std::cout << "| VAR: s_pInterfacesRegs : 0x" << std::hex << std::uppercase << s_pInterfacesRegs.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| VAR: s_pInterfacesRegs : {:#18x} |\n", s_pInterfacesRegs.GetPtr()); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { } virtual void GetVar(void) const @@ -111,4 +111,4 @@ class HFactory : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HFactory); \ No newline at end of file +REGISTER(VFactory); \ No newline at end of file diff --git a/r5dev/vpc/keyvalues.h b/r5dev/vpc/keyvalues.h index fef444ee..9ef120ec 100644 --- a/r5dev/vpc/keyvalues.h +++ b/r5dev/vpc/keyvalues.h @@ -79,16 +79,16 @@ void CKeyValueSystem_Detach(); extern KeyValues** g_pPlaylistKeyValues; /////////////////////////////////////////////////////////////////////////////// -class HKeyValues : public IDetour +class VKeyValues : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: KeyValues::Init : 0x" << std::hex << std::uppercase << p_KeyValues_Init.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: KeyValues::FindKey : 0x" << std::hex << std::uppercase << p_KeyValues_FindKey.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: KeyValues::LoadPlaylist : 0x" << std::hex << std::uppercase << p_KeyValues_LoadPlaylist.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| FUN: KeyValues::GetCurrentPlaylist : 0x" << std::hex << std::uppercase << p_KeyValues_GetCurrentPlaylist.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "| VAR: g_pPlaylistKeyValues : 0x" << std::hex << std::uppercase << g_pPlaylistKeyValues << std::setw(0) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: KeyValues::Init : {:#18x} |\n", p_KeyValues_Init.GetPtr()); + spdlog::debug("| FUN: KeyValues::FindKey : {:#18x} |\n", p_KeyValues_FindKey.GetPtr()); + spdlog::debug("| FUN: KeyValues::LoadPlaylist : {:#18x} |\n", p_KeyValues_LoadPlaylist.GetPtr()); + spdlog::debug("| FUN: KeyValues::GetCurrentPlaylist : {:#18x} |\n", p_KeyValues_GetCurrentPlaylist.GetPtr()); + spdlog::debug("| VAR: g_pPlaylistKeyValues : {:#18x} |\n", reinterpret_cast(g_pPlaylistKeyValues)); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -127,4 +127,4 @@ class HKeyValues : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HKeyValues); +REGISTER(VKeyValues); diff --git a/r5dev/vphysics/QHull.h b/r5dev/vphysics/QHull.h index dbd971b4..dddbe5dd 100644 --- a/r5dev/vphysics/QHull.h +++ b/r5dev/vphysics/QHull.h @@ -13,13 +13,13 @@ void QHull_Attach(); void QHull_Detach(); /////////////////////////////////////////////////////////////////////////////// -class HQHull : public IDetour +class VQHull : public IDetour { virtual void GetAdr(void) const { - std::cout << "| FUN: QHull_PrintFunc : 0x" << std::hex << std::uppercase << p_QHull_PrintFunc.GetPtr() << std::setw(nPad) << " |" << std::endl; - //std::cout << "| FUN: speex_warning_int : 0x" << std::hex << std::uppercase << p_speex_warning_int.GetPtr() << std::setw(nPad) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| FUN: QHull_PrintFunc : {:#18x} |\n", p_QHull_PrintFunc.GetPtr()); + //spdlog::debug("| FUN: speex_warning_int : {:#18x} |\n", p_speex_warning_int.GetPtr()); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { @@ -36,4 +36,4 @@ class HQHull : public IDetour }; /////////////////////////////////////////////////////////////////////////////// -REGISTER(HQHull); +REGISTER(VQHull); diff --git a/r5dev/vstdlib/callback.h b/r5dev/vstdlib/callback.h index d9d93464..da9b0c07 100644 --- a/r5dev/vstdlib/callback.h +++ b/r5dev/vstdlib/callback.h @@ -6,12 +6,12 @@ inline auto SetupGamemode = p_SetupGamemode.RCast(g_pKeyValuesMemPool); // May need to dereference this once more not sure right now. + return g_pKeyValuesMemPool; // May need to dereference this once more not sure right now. } //----------------------------------------------------------------------------- diff --git a/r5dev/vstdlib/keyvaluessystem.h b/r5dev/vstdlib/keyvaluessystem.h index b845549d..a28e8643 100644 --- a/r5dev/vstdlib/keyvaluessystem.h +++ b/r5dev/vstdlib/keyvaluessystem.h @@ -36,7 +36,7 @@ public: }; /* ==== KEYVALUESSYSTEM ================================================================================================================================================= */ -inline uintptr_t g_pKeyValuesMemPool = NULL; +inline void* g_pKeyValuesMemPool = nullptr; inline CKeyValuesSystem* g_pKeyValuesSystem = nullptr; /////////////////////////////////////////////////////////////////////////////// @@ -44,9 +44,9 @@ class HKeyValuesSystem : public IDetour { virtual void GetAdr(void) const { - std::cout << "| VAR: g_pKeyValuesMemPool : 0x" << std::hex << std::uppercase << g_pKeyValuesMemPool << std::setw(nPad) << " |" << std::endl; - std::cout << "| VAR: g_pKeyValuesSystem : 0x" << std::hex << std::uppercase << g_pKeyValuesSystem << std::setw(0) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| VAR: g_pKeyValuesMemPool : {:#18x} |\n", reinterpret_cast(g_pKeyValuesMemPool)); + spdlog::debug("| VAR: g_pKeyValuesSystem : {:#18x} |\n", reinterpret_cast(g_pKeyValuesSystem)); + spdlog::debug("+----------------------------------------------------------------+\n"); } virtual void GetFun(void) const { } virtual void GetVar(void) const @@ -57,7 +57,7 @@ class HKeyValuesSystem : public IDetour g_pKeyValuesMemPool = g_mGameDll.FindPatternSIMD( reinterpret_cast("\x48\x8B\x05\x00\x00\x00\x00\xC3\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\x48\x85\xD2"), "xxx????xxxxxxxxxxxx"). - ResolveRelativeAddressSelf(0x3, 0x7).GetPtr(); + ResolveRelativeAddressSelf(0x3, 0x7).RCast(); } virtual void GetCon(void) const { } virtual void Attach(void) const { } diff --git a/r5dev/windows/id3dx.cpp b/r5dev/windows/id3dx.cpp index 9591eb95..cbb1582e 100644 --- a/r5dev/windows/id3dx.cpp +++ b/r5dev/windows/id3dx.cpp @@ -535,12 +535,12 @@ void DirectX_Shutdown() void HIDXGI::GetAdr(void) const { /////////////////////////////////////////////////////////////////////////////// - std::cout << "| VAR: ID3D11DeviceContext : " << std::hex << std::uppercase << g_pDeviceContext << std::setw(4) << " |" << std::endl; - std::cout << "| VAR: ID3D11Device : " << std::hex << std::uppercase << g_pDevice << std::setw(4) << " |" << std::endl; - std::cout << "| VAR: ID3D11RenderTargetView : " << std::hex << std::uppercase << g_pRenderTargetView << std::setw(4) << " |" << std::endl; - std::cout << "| VAR: IDXGISwapChain : " << std::hex << std::uppercase << g_pSwapChain << std::setw(4) << " |" << std::endl; - std::cout << "| VAR: IDXGISwapChainPresent : " << std::hex << std::uppercase << g_fnIDXGISwapChainPresent << std::setw(4) << " |" << std::endl; - std::cout << "+----------------------------------------------------------------+" << std::endl; + spdlog::debug("| VAR: ID3D11DeviceContext : {:#18x} |\n", reinterpret_cast(g_pDeviceContext) ); + spdlog::debug("| VAR: ID3D11Device : {:#18x} |\n", reinterpret_cast(g_pDevice) ); + spdlog::debug("| VAR: ID3D11RenderTargetView : {:#18x} |\n", reinterpret_cast(g_pRenderTargetView) ); + spdlog::debug("| VAR: IDXGISwapChain : {:#18x} |\n", reinterpret_cast(g_pSwapChain) ); + spdlog::debug("| VAR: IDXGISwapChainPresent : {:#18x} |\n", reinterpret_cast(g_fnIDXGISwapChainPresent)); + spdlog::debug("+----------------------------------------------------------------+\n"); } //#################################################################################