From 87f9420889023cc5350bca5f745fe39c721a9b1d Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Sun, 2 Jul 2023 23:01:29 +0200 Subject: [PATCH] Globally reduce the use of auto for function pointer declarations Find regex pattern: inline auto ([a-zA-Z0-9_]+) = ([a-zA-Z0-9_]+)\.RCast<([a-zA-Z0-9_:<>*]+) *\(\*\)\(([^)]*)\)>\(\); Replace regex pattern: inline $3(*$1)($4); This commit also removes the unnecessary initialization (which was required to type the auto variables), and therefore removed 6kb of unnecessary dynamic initialization code. --- r5dev/codecs/Miles/miles_impl.h | 8 +++---- r5dev/codecs/bink/bink_impl.h | 4 ++-- r5dev/common/callback.h | 4 ++-- r5dev/datacache/mdlcache.h | 12 +++++----- r5dev/ebisusdk/EbisuSDK.h | 6 ++--- r5dev/engine/client/cdll_engine_int.h | 10 ++++----- r5dev/engine/client/cl_ents_parse.h | 2 +- r5dev/engine/client/cl_main.h | 10 ++++----- r5dev/engine/client/client.h | 16 +++++++------- r5dev/engine/client/clientstate.h | 8 +++---- r5dev/engine/client/datablock_receiver.h | 4 ++-- r5dev/engine/cmd.h | 6 ++--- r5dev/engine/cmodel_bsp.h | 6 ++--- r5dev/engine/common.h | 4 ++-- r5dev/engine/debugoverlay.h | 10 ++++----- r5dev/engine/gl_matsysiface.h | 2 +- r5dev/engine/gl_rsurf.h | 6 ++--- r5dev/engine/host.h | 10 ++++----- r5dev/engine/host_cmd.h | 14 ++++++------ r5dev/engine/host_state.h | 8 +++---- r5dev/engine/matsys_interface.h | 2 +- r5dev/engine/modelloader.h | 16 +++++++------- r5dev/engine/net.h | 14 ++++++------ r5dev/engine/net_chan.h | 10 ++++----- r5dev/engine/server/datablock_sender.h | 2 +- r5dev/engine/server/persistence.h | 2 +- r5dev/engine/server/server.h | 8 +++---- r5dev/engine/server/sv_main.h | 10 ++++----- r5dev/engine/server/vengineserver_impl.h | 2 +- r5dev/engine/staticpropmgr.h | 2 +- r5dev/engine/sys_dll.h | 10 ++++----- r5dev/engine/sys_dll2.h | 16 +++++++------- r5dev/engine/sys_engine.h | 2 +- r5dev/engine/sys_getmodes.h | 4 ++-- r5dev/engine/sys_mainwind.h | 4 ++-- r5dev/engine/sys_utils.h | 8 +++---- r5dev/engine/traceinit.h | 2 +- r5dev/filesystem/basefilesystem.h | 12 +++++----- r5dev/game/client/input.h | 2 +- r5dev/game/client/viewrender.h | 2 +- r5dev/game/server/ai_network.h | 2 +- r5dev/game/server/ai_networkmanager.h | 8 +++---- r5dev/game/server/baseanimating.h | 2 +- r5dev/game/server/baseentity.h | 2 +- r5dev/game/server/detour_impl.h | 10 ++++----- r5dev/game/server/gameinterface.h | 2 +- r5dev/game/server/physics_main.h | 2 +- r5dev/game/server/player.h | 4 ++-- r5dev/game/shared/animation.h | 2 +- r5dev/game/shared/usercmd.h | 8 +++---- r5dev/game/shared/vscript_shared.h | 4 ++-- r5dev/launcher/launcher.h | 6 ++--- r5dev/launcher/prx.h | 2 +- r5dev/materialsystem/cmaterialglue.h | 2 +- r5dev/materialsystem/cmaterialsystem.h | 12 +++++----- r5dev/public/appframework/IAppSystemGroup.h | 2 +- r5dev/public/tier0/jobthread.h | 8 +++---- r5dev/public/tier0/platform_internal.h | 4 ++-- r5dev/public/tier0/threadtools.h | 2 +- r5dev/public/tier1/cmd.h | 6 ++--- r5dev/public/tier1/cvar.h | 8 +++---- r5dev/rtech/rtech_game.h | 4 ++-- r5dev/rtech/rtech_utils.h | 8 +++---- r5dev/rtech/rui/rui.h | 6 ++--- r5dev/rtech/stryder/stryder.h | 4 ++-- r5dev/tier0/commandline.h | 2 +- r5dev/vgui/vgui_baseui_interface.h | 6 ++--- r5dev/vgui/vgui_fpspanel.h | 2 +- r5dev/vguimatsurface/MatSystemSurface.h | 2 +- r5dev/vpc/IAppSystem.h | 2 +- r5dev/vpc/keyvalues.h | 12 +++++----- r5dev/vphysics/QHull.h | 4 ++-- .../languages/squirrel_re/include/sqstdaux.h | 4 ++-- .../languages/squirrel_re/include/squirrel.h | 22 +++++++++---------- .../languages/squirrel_re/include/sqvm.h | 16 +++++++------- .../vscript/languages/squirrel_re/vsquirrel.h | 6 ++--- r5dev/vscript/vscript.h | 4 ++-- r5dev/windows/id3dx.cpp | 4 ++-- 78 files changed, 243 insertions(+), 243 deletions(-) diff --git a/r5dev/codecs/Miles/miles_impl.h b/r5dev/codecs/Miles/miles_impl.h index 6a645614..1a34ac37 100644 --- a/r5dev/codecs/Miles/miles_impl.h +++ b/r5dev/codecs/Miles/miles_impl.h @@ -3,16 +3,16 @@ /* ==== WASAPI THREAD SERVICE =========================================================================================================================================== */ inline CMemory p_AIL_LogFunc; -inline auto v_AIL_LogFunc = p_AIL_LogFunc.RCast(); +inline void(*v_AIL_LogFunc)(int64_t nLogLevel, const char* pszMessage); inline CMemory p_Miles_Initialize; -inline auto v_Miles_Initialize = p_Miles_Initialize.RCast(); +inline bool(*v_Miles_Initialize)(); inline CMemory p_MilesQueueEventRun; -inline auto v_MilesQueueEventRun = p_MilesQueueEventRun.RCast(); +inline void(*v_MilesQueueEventRun)(Miles::Queue*, const char*); inline CMemory p_MilesBankPatch; -inline auto v_MilesBankPatch = p_MilesBankPatch.RCast(); +inline void(*v_MilesBankPatch)(Miles::Bank*, char*, char*); /////////////////////////////////////////////////////////////////////////////// class MilesCore : public IDetour diff --git a/r5dev/codecs/bink/bink_impl.h b/r5dev/codecs/bink/bink_impl.h index dddad5a0..aee6152a 100644 --- a/r5dev/codecs/bink/bink_impl.h +++ b/r5dev/codecs/bink/bink_impl.h @@ -1,10 +1,10 @@ #pragma once inline CMemory p_BinkOpen; -inline auto v_BinkOpen = p_BinkOpen.RCast(); +inline void*(*v_BinkOpen)(HANDLE hBinkFile, UINT32 nFlags); inline CMemory p_BinkClose; -inline auto v_BinkClose = p_BinkClose.RCast(); +inline void(*v_BinkClose)(HANDLE hBinkFile); inline CMemory p_BinkGetError; inline auto v_BinkGetError = p_BinkGetError.RCast(); diff --git a/r5dev/common/callback.h b/r5dev/common/callback.h index 3938e6c5..9d42da2e 100644 --- a/r5dev/common/callback.h +++ b/r5dev/common/callback.h @@ -1,11 +1,11 @@ #pragma once inline CMemory p_SetupGamemode; -inline auto SetupGamemode = p_SetupGamemode.RCast(); +inline bool(*SetupGamemode)(const char* pszPlayList); /* ==== CONCOMMANDCALLBACK ============================================================================================================================================== */ inline CMemory p_DownloadPlaylists_f; -inline auto _DownloadPlaylists_f = p_DownloadPlaylists_f.RCast(); +inline void(*_DownloadPlaylists_f)(void); /////////////////////////////////////////////////////////////////////////////// void MP_GameMode_Changed_f(IConVar* pConVar, const char* pOldString, float flOldValue); diff --git a/r5dev/datacache/mdlcache.h b/r5dev/datacache/mdlcache.h index f740e62a..1686a04e 100644 --- a/r5dev/datacache/mdlcache.h +++ b/r5dev/datacache/mdlcache.h @@ -109,22 +109,22 @@ private: }; inline CMemory p_CMDLCache__FindMDL; -inline auto v_CMDLCache__FindMDL = p_CMDLCache__FindMDL.RCast(); +inline studiohdr_t*(*v_CMDLCache__FindMDL)(CMDLCache* pCache, void* a2, void* a3); #if !defined (GAMEDLL_S0) && !defined (GAMEDLL_S1) && !defined (GAMEDLL_S2) inline CMemory p_CMDLCache__FindCachedMDL; -inline auto v_CMDLCache__FindCachedMDL = p_CMDLCache__FindCachedMDL.RCast(); +inline void(*v_CMDLCache__FindCachedMDL)(CMDLCache* pCache, void* a2, void* a3); inline CMemory p_CMDLCache__FindUncachedMDL; -inline auto v_CMDLCache__FindUncachedMDL = p_CMDLCache__FindUncachedMDL.RCast(); +inline studiohdr_t*(*v_CMDLCache__FindUncachedMDL)(CMDLCache* pCache, MDLHandle_t handle, void* a3, void* a4); #endif inline CMemory p_CMDLCache__GetStudioHDR; -inline auto v_CMDLCache__GetStudioHDR = p_CMDLCache__GetStudioHDR.RCast(); +inline studiohdr_t*(*v_CMDLCache__GetStudioHDR)(CMDLCache* pCache, MDLHandle_t handle); inline CMemory p_CMDLCache__GetHardwareData; -inline auto v_CMDLCache__GetHardwareData = p_CMDLCache__GetHardwareData.RCast(); +inline studiohwdata_t*(*v_CMDLCache__GetHardwareData)(CMDLCache* pCache, MDLHandle_t handle); #if !defined (GAMEDLL_S0) && !defined (GAMEDLL_S1) && !defined (GAMEDLL_S2) inline CMemory p_CStudioHWDataRef__SetFlags; // Probably incorrect. -inline auto v_CStudioHWDataRef__SetFlags = p_CStudioHWDataRef__SetFlags.RCast(); +inline bool(*v_CStudioHWDataRef__SetFlags)(CStudioHWDataRef* ref, int64_t flags); #endif inline CMDLCache* g_pMDLCache = nullptr; inline PSRWLOCK* g_pMDLLock = nullptr; // Possibly a member? research required. diff --git a/r5dev/ebisusdk/EbisuSDK.h b/r5dev/ebisusdk/EbisuSDK.h index f4aa50ae..384c8a54 100644 --- a/r5dev/ebisusdk/EbisuSDK.h +++ b/r5dev/ebisusdk/EbisuSDK.h @@ -1,13 +1,13 @@ #pragma once inline CMemory p_EbisuSDK_Tier0_Init; -inline auto EbisuSDK_Tier0_Init = p_EbisuSDK_Tier0_Init.RCast(); +inline void(*EbisuSDK_Tier0_Init)(void); inline CMemory p_EbisuSDK_CVar_Init; -inline auto EbisuSDK_CVar_Init = p_EbisuSDK_CVar_Init.RCast(); +inline void(*EbisuSDK_CVar_Init)(void); inline CMemory p_EbisuSDK_SetState; -inline auto EbisuSDK_SetState = p_EbisuSDK_SetState.RCast(); +inline void(*EbisuSDK_SetState)(void); inline uint64_t* g_NucleusID = nullptr; inline char* g_NucleusToken = nullptr; /*SIZE = 1024*/ diff --git a/r5dev/engine/client/cdll_engine_int.h b/r5dev/engine/client/cdll_engine_int.h index 0471a1f4..18455204 100644 --- a/r5dev/engine/client/cdll_engine_int.h +++ b/r5dev/engine/client/cdll_engine_int.h @@ -52,19 +52,19 @@ public: /* ==== CHLCLIENT ======================================================================================================================================================= */ #ifndef DEDICATED inline CMemory p_CHLClient_PostInit; -inline auto CHLClient_PostInit = p_CHLClient_PostInit.RCast(); +inline void*(*CHLClient_PostInit)(void); inline CMemory p_CHLClient_LevelShutdown; -inline auto CHLClient_LevelShutdown = p_CHLClient_LevelShutdown.RCast(); +inline void*(*CHLClient_LevelShutdown)(CHLClient* thisptr); inline CMemory p_CHLClient_HudProcessInput; -inline auto CHLClient_HudProcessInput = p_CHLClient_HudProcessInput.RCast(); +inline void(*CHLClient_HudProcessInput)(CHLClient* thisptr, bool bActive); inline CMemory p_CHLClient_FrameStageNotify; -inline auto CHLClient_FrameStageNotify = p_CHLClient_FrameStageNotify.RCast(); +inline void(*CHLClient_FrameStageNotify)(CHLClient* thisptr, ClientFrameStage_t frameStage); inline CMemory p_CHLClient_GetAllClasses; -inline auto CHLClient_GetAllClasses = p_CHLClient_GetAllClasses.RCast(); +inline ClientClass*(*CHLClient_GetAllClasses)(); #endif // !DEDICATED inline CHLClient* g_pHLClient = nullptr; diff --git a/r5dev/engine/client/cl_ents_parse.h b/r5dev/engine/client/cl_ents_parse.h index 07d362d3..ca95f693 100644 --- a/r5dev/engine/client/cl_ents_parse.h +++ b/r5dev/engine/client/cl_ents_parse.h @@ -2,7 +2,7 @@ #define CL_ENTS_PARSE_H inline CMemory p_CL_CopyExistingEntity; -inline auto v_CL_CopyExistingEntity = p_CL_CopyExistingEntity.RCast(); +inline bool(*v_CL_CopyExistingEntity)(__int64 a1, unsigned int* a2, char* a3); bool CL_CopyExistingEntity(__int64 a1, unsigned int* a2, char* a3); /////////////////////////////////////////////////////////////////////////////// diff --git a/r5dev/engine/client/cl_main.h b/r5dev/engine/client/cl_main.h index 2310c88a..74278853 100644 --- a/r5dev/engine/client/cl_main.h +++ b/r5dev/engine/client/cl_main.h @@ -1,19 +1,19 @@ #pragma once inline CMemory p_CL_Move; -inline auto CL_Move = p_CL_Move.RCast(); +inline void(*CL_Move)(void); inline CMemory p_CL_SendMove; -inline auto CL_SendMove = p_CL_SendMove.RCast(); +inline void(*CL_SendMove)(void); inline CMemory p_CL_EndMovie; -inline auto CL_EndMovie = p_CL_EndMovie.RCast(); +inline int(*CL_EndMovie)(void); inline CMemory p_CL_ClearState; -inline auto CL_ClearState = p_CL_ClearState.RCast(); +inline int(*CL_ClearState)(void); inline CMemory p_CL_RunPrediction; -inline auto CL_RunPrediction = p_CL_RunPrediction.RCast(); +inline void(*CL_RunPrediction)(void); /////////////////////////////////////////////////////////////////////////////// diff --git a/r5dev/engine/client/client.h b/r5dev/engine/client/client.h index 1ef98852..0048f4b2 100644 --- a/r5dev/engine/client/client.h +++ b/r5dev/engine/client/client.h @@ -161,28 +161,28 @@ static_assert(sizeof(CClient) == 0x4A4C0); /* ==== CBASECLIENT ===================================================================================================================================================== */ inline CMemory p_CClient_Connect; -inline auto v_CClient_Connect = p_CClient_Connect.RCast(); +inline bool(*v_CClient_Connect)(CClient* pClient, const char* szName, void* pNetChannel, bool bFakePlayer, void* a5, char* szMessage, int nMessageSize); inline CMemory p_CClient_Disconnect; -inline auto v_CClient_Disconnect = p_CClient_Disconnect.RCast(); +inline bool(*v_CClient_Disconnect)(CClient* pClient, const Reputation_t nRepLvl, const char* szReason, ...); inline CMemory p_CClient_Clear; -inline auto v_CClient_Clear = p_CClient_Clear.RCast(); +inline void(*v_CClient_Clear)(CClient* pClient); inline CMemory p_CClient_ActivatePlayer; -inline auto v_CClient_ActivatePlayer = p_CClient_ActivatePlayer.RCast(); +inline void(*v_CClient_ActivatePlayer)(CClient* pClient); inline CMemory p_CClient_ProcessStringCmd; -inline auto v_CClient_ProcessStringCmd = p_CClient_ProcessStringCmd.RCast(); +inline bool(*v_CClient_ProcessStringCmd)(CClient* pClient, NET_StringCmd* pMsg); inline CMemory p_CClient_SetSignonState; -inline auto v_CClient_SetSignonState = p_CClient_SetSignonState.RCast(); +inline bool(*v_CClient_SetSignonState)(CClient* pClient, SIGNONSTATE signon); inline CMemory p_CClient_SendNetMsgEx; -inline auto v_CClient_SendNetMsgEx = p_CClient_SendNetMsgEx.RCast(); +inline bool(*v_CClient_SendNetMsgEx)(CClient* pClient, CNetMessage* pMsg, bool bLocal, bool bForceReliable, bool bVoice); inline CMemory p_CClient_SendSnapshot; -inline auto v_CClient_SendSnapshot = p_CClient_SendSnapshot.RCast(); +inline void*(*v_CClient_SendSnapshot)(CClient* pClient, CClientFrame* pFrame, int nTick, int nTickAck); /////////////////////////////////////////////////////////////////////////////// class VClient : public IDetour diff --git a/r5dev/engine/client/clientstate.h b/r5dev/engine/client/clientstate.h index 4e38f844..7af0efbc 100644 --- a/r5dev/engine/client/clientstate.h +++ b/r5dev/engine/client/clientstate.h @@ -202,16 +202,16 @@ extern CClientState** g_pClientState_Shifted; // Shifted by 0x10 forward! /* ==== CCLIENTSTATE ==================================================================================================================================================== */ inline CMemory p_CClientState__RunFrame; -inline auto CClientState__RunFrame = p_CClientState__RunFrame.RCast(); +inline void(*CClientState__RunFrame)(CClientState* thisptr); inline CMemory p_CClientState__Disconnect; -inline auto CClientState__Disconnect = p_CClientState__Disconnect.RCast(); +inline void(*CClientState__Disconnect)(CClientState* thisptr, bool bSendTrackingContext); inline CMemory p_CClientState__ConnectionClosing; -inline auto CClientState__ConnectionClosing = p_CClientState__ConnectionClosing.RCast(); +inline void(*CClientState__ConnectionClosing)(CClientState* thisptr, const char* szReason); inline CMemory p_CClientState__ProcessServerTick; -inline auto CClientState__ProcessServerTick = p_CClientState__ProcessServerTick.RCast(); +inline bool(*CClientState__ProcessServerTick)(CClientState* thisptr, SVC_ServerTick* msg); /////////////////////////////////////////////////////////////////////////////// class VClientState : public IDetour diff --git a/r5dev/engine/client/datablock_receiver.h b/r5dev/engine/client/datablock_receiver.h index 134d5484..cc6ee455 100644 --- a/r5dev/engine/client/datablock_receiver.h +++ b/r5dev/engine/client/datablock_receiver.h @@ -28,10 +28,10 @@ protected: }; inline CMemory p_ClientDataBlockReceiver__Destructor; -inline auto v_ClientDataBlockReceiver__Destructor = p_ClientDataBlockReceiver__Destructor.RCast(); +inline void*(*v_ClientDataBlockReceiver__Destructor)(ClientDataBlockReceiver* thisptr); inline CMemory p_ClientDataBlockReceiver__AcknowledgeTransmission; -inline auto v_ClientDataBlockReceiver__AcknowledgeTransmission = p_ClientDataBlockReceiver__AcknowledgeTransmission.RCast(); +inline void*(*v_ClientDataBlockReceiver__AcknowledgeTransmission)(ClientDataBlockReceiver* thisptr); /////////////////////////////////////////////////////////////////////////////// class VClientDataBlockReceiver : public IDetour diff --git a/r5dev/engine/cmd.h b/r5dev/engine/cmd.h index 26f93158..d2ef2fcf 100644 --- a/r5dev/engine/cmd.h +++ b/r5dev/engine/cmd.h @@ -5,13 +5,13 @@ ECommandTarget_t Cbuf_GetCurrentPlayer(void); /* ==== COMMAND_BUFFER ================================================================================================================================================== */ inline CMemory p_Cbuf_AddText; -inline auto Cbuf_AddText = p_Cbuf_AddText.RCast(); +inline void(*Cbuf_AddText)(ECommandTarget_t eTarget, const char* pText, cmd_source_t cmdSource); inline CMemory p_Cbuf_Execute; -inline auto Cbuf_Execute = p_Cbuf_Execute.RCast(); +inline void(*Cbuf_Execute)(void); inline CMemory p_Cmd_ForwardToServer; -inline auto v_Cmd_ForwardToServer = p_Cmd_ForwardToServer.RCast(); +inline bool(*v_Cmd_ForwardToServer)(const CCommand* args); /////////////////////////////////////////////////////////////////////////////// class VCmd : public IDetour diff --git a/r5dev/engine/cmodel_bsp.h b/r5dev/engine/cmodel_bsp.h index 38852580..8d22e74c 100644 --- a/r5dev/engine/cmodel_bsp.h +++ b/r5dev/engine/cmodel_bsp.h @@ -7,10 +7,10 @@ class KeyValues; inline CMemory p_Mod_LoadPakForMap; -inline auto v_Mod_LoadPakForMap = p_Mod_LoadPakForMap.RCast(); +inline void(*v_Mod_LoadPakForMap)(const char* szLevelName); inline CMemory p_Mod_ProcessPakQueue; -inline auto v_Mod_ProcessPakQueue = p_Mod_ProcessPakQueue.RCast(); +inline void(*v_Mod_ProcessPakQueue)(void); inline float* dword_14B383420; inline int32_t * dword_1634F445C; @@ -24,7 +24,7 @@ inline int64_t* qword_167ED7BC0; inline auto sub_14045BAC0 = p_Mod_ProcessPakQueue.RCast<__int64(*)(__int64(__fastcall* a1)(__int64, _DWORD*, __int64, _QWORD*), JobFifoLock_s* pFifoLock, __int64 a3, __int64 a4)>(); inline auto sub_14045A1D0 = p_Mod_ProcessPakQueue.RCast<__int64(*)(unsigned __int8(__fastcall* a1)(_QWORD), JobFifoLock_s* pFifoLock, __int64 a3, __int64 a4, volatile signed __int64* a5, char a6)>(); -inline auto sub_140441220 = p_Mod_ProcessPakQueue.RCast(); +inline void(*sub_140441220)(__int64 a1, __int64 a2); extern bool s_bBasePaksInitialized; extern vector g_InstalledMaps; diff --git a/r5dev/engine/common.h b/r5dev/engine/common.h index 1dd3ae9b..7ef14682 100644 --- a/r5dev/engine/common.h +++ b/r5dev/engine/common.h @@ -2,10 +2,10 @@ /* ==== COMMON ========================================================================================================================================================== */ inline CMemory p_COM_InitFilesystem; -inline auto COM_InitFilesystem = p_COM_InitFilesystem.RCast(); +inline void*(*COM_InitFilesystem)(const char* pFullModPath); inline CMemory p_COM_ExplainDisconnection; -inline auto COM_ExplainDisconnection = p_COM_ExplainDisconnection.RCast(); +inline void*(*COM_ExplainDisconnection)(uint64_t level, const char* fmt, ...); const char* COM_FormatSeconds(int seconds); /////////////////////////////////////////////////////////////////////////////// diff --git a/r5dev/engine/debugoverlay.h b/r5dev/engine/debugoverlay.h index 545c1a3b..5f38e5ca 100644 --- a/r5dev/engine/debugoverlay.h +++ b/r5dev/engine/debugoverlay.h @@ -160,19 +160,19 @@ void DestroyOverlay(OverlayBase_t* pOverlay); void DrawOverlay(OverlayBase_t* pOverlay); inline CMemory p_DrawAllOverlays; -inline auto v_DrawAllOverlays = p_DrawAllOverlays.RCast(); +inline void(*v_DrawAllOverlays)(bool bDraw); inline CMemory p_DestroyOverlay; -inline auto v_DestroyOverlay = p_DestroyOverlay.RCast(); +inline void(*v_DestroyOverlay)(OverlayBase_t* pOverlay); inline CMemory p_RenderLine; -inline auto v_RenderLine = p_RenderLine.RCast(); +inline void*(*v_RenderLine)(const Vector3D& vOrigin, const Vector3D& vDest, Color color, bool bZBuffer); inline CMemory p_RenderBox; -inline auto v_RenderBox = p_RenderBox.RCast(); +inline void*(*v_RenderBox)(const matrix3x4_t& vTransforms, const Vector3D& vMins, const Vector3D& vMaxs, Color color, bool bZBuffer); inline CMemory p_RenderWireframeSphere; -inline auto v_RenderWireframeSphere = p_RenderWireframeSphere.RCast(); +inline void*(*v_RenderWireframeSphere)(const Vector3D& vCenter, float flRadius, int nTheta, int nPhi, Color color, bool bZBuffer); inline OverlayBase_t** s_pOverlays = nullptr; inline LPCRITICAL_SECTION s_OverlayMutex = nullptr; diff --git a/r5dev/engine/gl_matsysiface.h b/r5dev/engine/gl_matsysiface.h index 45109eb7..242fb2e6 100644 --- a/r5dev/engine/gl_matsysiface.h +++ b/r5dev/engine/gl_matsysiface.h @@ -2,7 +2,7 @@ /* ==== MATSYSIFACE ===================================================================================================================================================== */ inline CMemory p_InitMaterialSystem; -inline auto v_InitMaterialSystem = p_InitMaterialSystem.RCast(); +inline void*(*v_InitMaterialSystem)(void); /////////////////////////////////////////////////////////////////////////////// class VGL_MatSysIFace : public IDetour diff --git a/r5dev/engine/gl_rsurf.h b/r5dev/engine/gl_rsurf.h index 26e4b6b7..0c235ec6 100644 --- a/r5dev/engine/gl_rsurf.h +++ b/r5dev/engine/gl_rsurf.h @@ -2,13 +2,13 @@ #include "public/ivrenderview.h" inline CMemory P_DrawWorldMeshes; -inline auto V_DrawWorldMeshes = P_DrawWorldMeshes.RCast(); +inline void*(*V_DrawWorldMeshes)(void* baseEntity, void* renderContext, DrawWorldLists_t worldLists); inline CMemory P_DrawWorldMeshesDepthOnly; -inline auto V_DrawWorldMeshesDepthOnly = P_DrawWorldMeshesDepthOnly.RCast(); +inline void*(*V_DrawWorldMeshesDepthOnly)(void* renderContext, DrawWorldLists_t worldLists); inline CMemory P_DrawWorldMeshesDepthAtTheEnd; -inline auto V_DrawWorldMeshesDepthAtTheEnd = P_DrawWorldMeshesDepthAtTheEnd.RCast(); +inline void*(*V_DrawWorldMeshesDepthAtTheEnd)(void* ptr1, void* ptr2, void* ptr3, DrawWorldLists_t worldLists); /////////////////////////////////////////////////////////////////////////////// class VGL_RSurf : public IDetour diff --git a/r5dev/engine/host.h b/r5dev/engine/host.h index 16ede975..68f7ab36 100644 --- a/r5dev/engine/host.h +++ b/r5dev/engine/host.h @@ -1,19 +1,19 @@ #pragma once inline CMemory p_Host_RunFrame; -inline auto v_Host_RunFrame = p_Host_RunFrame.RCast(); +inline void(*v_Host_RunFrame)(void* unused, float time); //inline CMemory p_Host_RunFrame_Render; // DEDICATED PATCH! -//inline auto v_Host_RunFrame_Render = p_Host_RunFrame_Render.RCast(); +//inline void(*v_Host_RunFrame_Render)(void); inline CMemory p_Host_ShouldRun; -inline auto v_Host_ShouldRun = p_Host_ShouldRun.RCast(); +inline bool(*v_Host_ShouldRun)(); inline CMemory p_Host_Error; -inline auto v_Host_Error = p_Host_Error.RCast(); +inline void(*v_Host_Error)(const char* error, ...); //inline CMemory p_VCR_EnterPausedState; // DEDICATED PATCH! -//inline auto v_VCR_EnterPausedState = p_VCR_EnterPausedState.RCast(); +//inline void(*v_VCR_EnterPausedState)(void); inline bool* g_bAbortServerSet = nullptr; inline float* interval_per_tick = nullptr; diff --git a/r5dev/engine/host_cmd.h b/r5dev/engine/host_cmd.h index fad68b5f..fccd4cea 100644 --- a/r5dev/engine/host_cmd.h +++ b/r5dev/engine/host_cmd.h @@ -19,29 +19,29 @@ extern EngineParms_t* g_pEngineParms; /* ==== HOST ============================================================================================================================================================ */ inline CMemory p_Host_Init; -inline auto v_Host_Init = p_Host_Init.RCast(); +inline void*(*v_Host_Init)(bool* bDedicated); inline CMemory p_Host_Shutdown; -inline auto v_Host_Shutdown = p_Host_Shutdown.RCast(); +inline void(*v_Host_Shutdown)(); inline CMemory p_Host_NewGame; -inline auto v_Host_NewGame = p_Host_NewGame.RCast(); +inline bool(*v_Host_NewGame)(char* pszMapName, char* pszMapGroup, bool bLoadGame, char bBackground, LARGE_INTEGER PerformanceCount); inline CMemory p_Host_Disconnect; -inline auto v_Host_Disconnect = p_Host_Disconnect.RCast(); +inline void(*v_Host_Disconnect)(bool bShowMainMenu); inline CMemory p_Host_ChangeLevel; -inline auto v_Host_ChangeLevel = p_Host_ChangeLevel.RCast(); +inline bool(*v_Host_ChangeLevel)(bool bLoadFromSavedGame, const char* pszMapName, const char* pszMapGroup); inline CMemory p_Host_Status_PrintClient; inline auto v_Host_Status_PrintClient = p_Host_Status_PrintClient.RCast(); inline CMemory p_SetLaunchOptions; -inline auto v_SetLaunchOptions = p_SetLaunchOptions.RCast(); +inline int(*v_SetLaunchOptions)(const CCommand& args); #if !defined (GAMEDLL_S0) && !defined (GAMEDLL_S1) && !defined (GAMEDLL_S2) inline CMemory p_DFS_InitializeFeatureFlagDefinitions; -inline auto v_DFS_InitializeFeatureFlagDefinitions = p_DFS_InitializeFeatureFlagDefinitions.RCast(); +inline bool(*v_DFS_InitializeFeatureFlagDefinitions)(const char* pszFeatureFlags); #endif // !(GAMEDLL_S0) || !(GAMEDLL_S1) || !(GAMEDLL_S2) extern EngineParms_t* g_pEngineParms; diff --git a/r5dev/engine/host_state.h b/r5dev/engine/host_state.h index fa2e22d0..01089ec0 100644 --- a/r5dev/engine/host_state.h +++ b/r5dev/engine/host_state.h @@ -51,16 +51,16 @@ public: /* ==== CHOSTSTATE ====================================================================================================================================================== */ inline CMemory p_CHostState_FrameUpdate; -inline auto CHostState_FrameUpdate = p_CHostState_FrameUpdate.RCast(); +inline void(*CHostState_FrameUpdate)(CHostState* pHostState, double flCurrentTime, float flFrameTime); inline CMemory p_CHostState_State_Run; -inline auto CHostState_State_Run = p_CHostState_State_Run.RCast(); +inline void(*CHostState_State_Run)(HostStates_t* pState, double flCurrentTime, float flFrameTime); inline CMemory p_CHostState_State_GameShutDown; -inline auto CHostState_State_GameShutDown = p_CHostState_State_GameShutDown.RCast(); +inline void(*CHostState_State_GameShutDown)(CHostState* thisptr); inline CMemory p_HostState_ChangeLevelMP; -inline auto v_HostState_ChangeLevelMP = p_HostState_ChangeLevelMP.RCast(); +inline void(*v_HostState_ChangeLevelMP)(char const* pNewLevel, char const* pLandmarkName); /////////////////////////////////////////////////////////////////////////////// extern CHostState* g_pHostState; diff --git a/r5dev/engine/matsys_interface.h b/r5dev/engine/matsys_interface.h index 843e6905..12432969 100644 --- a/r5dev/engine/matsys_interface.h +++ b/r5dev/engine/matsys_interface.h @@ -12,7 +12,7 @@ inline CMemory p_HandleConfigFile; inline CMemory p_ResetPreviousGameState; inline CMemory p_LoadPlayerConfig; -inline auto v_UpdateCurrentVideoConfig = p_UpdateCurrentVideoConfig.RCast(); +inline bool(*v_UpdateCurrentVideoConfig)(MaterialSystem_Config_t* pConfig); /////////////////////////////////////////////////////////////////////////////// diff --git a/r5dev/engine/modelloader.h b/r5dev/engine/modelloader.h index 224d5c73..1357a51a 100644 --- a/r5dev/engine/modelloader.h +++ b/r5dev/engine/modelloader.h @@ -72,22 +72,22 @@ public: }; inline CMemory p_CModelLoader__FindModel; -inline auto CModelLoader__FindModel = p_CModelLoader__FindModel.RCast(); +inline void*(*CModelLoader__FindModel)(CModelLoader* loader, const char* pszModelName); inline CMemory p_CModelLoader__LoadModel; -inline auto CModelLoader__LoadModel = p_CModelLoader__LoadModel.RCast(); +inline void(*CModelLoader__LoadModel)(CModelLoader* loader, model_t* model); inline CMemory p_CModelLoader__UnloadModel; -inline auto CModelLoader__UnloadModel = p_CModelLoader__UnloadModel.RCast(); +inline uint64_t(*CModelLoader__UnloadModel)(CModelLoader* loader, model_t* model); inline CMemory p_CModelLoader__Studio_LoadModel; -inline auto CModelLoader__Studio_LoadModel = p_CModelLoader__Studio_LoadModel.RCast(); +inline void*(*CModelLoader__Studio_LoadModel)(CModelLoader* loader); inline CMemory p_CModelLoader__Map_LoadModelGuts; -inline auto CModelLoader__Map_LoadModelGuts = p_CModelLoader__Map_LoadModelGuts.RCast(); +inline uint64_t(*CModelLoader__Map_LoadModelGuts)(CModelLoader* loader, model_t* model); inline CMemory p_CModelLoader__Map_IsValid; -inline auto CModelLoader__Map_IsValid = p_CModelLoader__Map_IsValid.RCast(); +inline bool(*CModelLoader__Map_IsValid)(CModelLoader* loader, const char* pszMapName); inline CMemory p_CMapLoadHelper__CMapLoadHelper; inline auto CMapLoadHelper__CMapLoadHelper = p_CMapLoadHelper__CMapLoadHelper.RCast(); @@ -99,10 +99,10 @@ inline CMemory p_Map_LoadModel; inline auto v_Map_LoadModel = p_Map_LoadModel.RCast(); //inline CMemory p_GetSpriteInfo; // DEDICATED PATCH! -//inline auto GetSpriteInfo = p_GetSpriteInfo.RCast(); +//inline void*(*GetSpriteInfo)(const char* pName, bool bIsAVI, bool bIsBIK, int& nWidth, int& nHeight, int& nFrameCount, void* a7); //inline CMemory p_BuildSpriteLoadName; // DEDICATED PATCH! -//inline auto BuildSpriteLoadName = p_BuildSpriteLoadName.RCast(); +//inline void*(*BuildSpriteLoadName)(const char* pName, char* pOut, int outLen, bool& bIsAVI, bool& bIsBIK); inline CModelLoader* g_pModelLoader; inline FileHandle_t* s_MapFileHandle; diff --git a/r5dev/engine/net.h b/r5dev/engine/net.h index 83ed8782..616b4727 100644 --- a/r5dev/engine/net.h +++ b/r5dev/engine/net.h @@ -20,25 +20,25 @@ constexpr const char* DEFAULT_NET_ENCRYPTION_KEY = "WDNWLmJYQ2ZlM0VoTid3Yg=="; /* ==== CNETCHAN ======================================================================================================================================================== */ inline CMemory p_NET_Init; -inline auto v_NET_Init = p_NET_Init.RCast(); +inline void*(*v_NET_Init)(bool bDeveloper); inline CMemory p_NET_SetKey; -inline auto v_NET_SetKey = p_NET_SetKey.RCast(); +inline void(*v_NET_SetKey)(netkey_t* pKey, const char* szHash); inline CMemory p_NET_Config; -inline auto v_NET_Config = p_NET_Config.RCast(); +inline void(*v_NET_Config)(void); inline CMemory p_NET_ReceiveDatagram; -inline auto v_NET_ReceiveDatagram = p_NET_ReceiveDatagram.RCast(); +inline bool(*v_NET_ReceiveDatagram)(int iSocket, netpacket_s* pInpacket, bool bRaw); inline CMemory p_NET_SendDatagram; -inline auto v_NET_SendDatagram = p_NET_SendDatagram.RCast(); +inline int(*v_NET_SendDatagram)(SOCKET s, void* pPayload, int iLenght, netadr_t* pAdr, bool bEncrypted); inline CMemory p_NET_Decompress; -inline auto v_NET_Decompress = p_NET_Decompress.RCast(); +inline int(*v_NET_Decompress)(CLZSS* lzss, unsigned char* pInput, unsigned char* pOutput, unsigned int unBufSize); inline CMemory p_NET_PrintFunc; -inline auto v_NET_PrintFunc = p_NET_PrintFunc.RCast(); +inline void(*v_NET_PrintFunc)(const char* fmt); /////////////////////////////////////////////////////////////////////////////// bool NET_ReceiveDatagram(int iSocket, netpacket_s* pInpacket, bool bRaw); diff --git a/r5dev/engine/net_chan.h b/r5dev/engine/net_chan.h index 1ba94178..8f5d60d7 100644 --- a/r5dev/engine/net_chan.h +++ b/r5dev/engine/net_chan.h @@ -79,19 +79,19 @@ enum EBufType }; inline CMemory p_NetChan_Clear; -inline auto v_NetChan_Clear = p_NetChan_Clear.RCast(); +inline void(*v_NetChan_Clear)(CNetChan* pChan, bool bStopProcessing); inline CMemory p_NetChan_Shutdown; -inline auto v_NetChan_Shutdown = p_NetChan_Shutdown.RCast(); +inline void(*v_NetChan_Shutdown)(CNetChan* pChan, const char* szReason, uint8_t bBadRep, bool bRemoveNow); inline CMemory p_NetChan_CanPacket; -inline auto v_NetChan_CanPacket = p_NetChan_CanPacket.RCast(); +inline bool(*v_NetChan_CanPacket)(const CNetChan* pChan); inline CMemory p_NetChan_SendDatagram; -inline auto v_NetChan_SendDatagram = p_NetChan_SendDatagram.RCast(); +inline int(*v_NetChan_SendDatagram)(CNetChan* pChan, bf_write* pMsg); inline CMemory p_NetChan_ProcessMessages; -inline auto v_NetChan_ProcessMessages = p_NetChan_ProcessMessages.RCast(); +inline bool(*v_NetChan_ProcessMessages)(CNetChan* pChan, bf_read* pMsg); //----------------------------------------------------------------------------- class CNetChan diff --git a/r5dev/engine/server/datablock_sender.h b/r5dev/engine/server/datablock_sender.h index bcc49ff1..ed973df8 100644 --- a/r5dev/engine/server/datablock_sender.h +++ b/r5dev/engine/server/datablock_sender.h @@ -53,7 +53,7 @@ struct ServerDataBlock }; inline CMemory p_ServerDataBlockSender__Destructor; -inline auto v_ServerDataBlockSender__Destructor = p_ServerDataBlockSender__Destructor.RCast(); +inline void*(*v_ServerDataBlockSender__Destructor)(ServerDataBlockSender* thisptr); inline CMemory p_ServerDataBlockSender__SendDataBlock; inline auto v_ServerDataBlockSender__SendDataBlock = p_ServerDataBlockSender__SendDataBlock.RCast(); +inline bool(*v_Persistence_SetXP)(int a1, int* a2); #endif /////////////////////////////////////////////////////////////////////////////// diff --git a/r5dev/engine/server/server.h b/r5dev/engine/server/server.h index e02ace8c..d380b8f9 100644 --- a/r5dev/engine/server/server.h +++ b/r5dev/engine/server/server.h @@ -93,16 +93,16 @@ extern CServer* g_pServer; /* ==== CSERVER ========================================================================================================================================================= */ inline CMemory p_CServer_FrameJob; -inline auto v_CServer_FrameJob = p_CServer_FrameJob.RCast(); +inline void(*v_CServer_FrameJob)(double flFrameTime, bool bRunOverlays, bool bUniformSnapshotInterval); inline CMemory p_CServer_RunFrame; -inline auto v_CServer_RunFrame = p_CServer_RunFrame.RCast(); +inline void(*v_CServer_RunFrame)(CServer* pServer); inline CMemory p_CServer_ConnectClient; -inline auto v_CServer_ConnectClient = p_CServer_ConnectClient.RCast(); +inline CClient*(*v_CServer_ConnectClient)(CServer* pServer, user_creds_s* pCreds); inline CMemory p_CServer_RejectConnection; -inline auto v_CServer_RejectConnection = p_CServer_RejectConnection.RCast(); +inline void*(*v_CServer_RejectConnection)(CServer* pServer, int iSocket, netadr_t* pNetAdr, const char* szMessage); /////////////////////////////////////////////////////////////////////////////// class VServer : public IDetour diff --git a/r5dev/engine/server/sv_main.h b/r5dev/engine/server/sv_main.h index 7637c575..a7606db5 100644 --- a/r5dev/engine/server/sv_main.h +++ b/r5dev/engine/server/sv_main.h @@ -9,19 +9,19 @@ class CClient; /* ==== SV_MAIN ======================================================================================================================================================= */ inline CMemory p_SV_InitGameDLL; -inline auto v_SV_InitGameDLL = p_SV_InitGameDLL.RCast(); +inline void(*v_SV_InitGameDLL)(void); inline CMemory p_SV_ShutdownGameDLL; -inline auto v_SV_ShutdownGameDLL = p_SV_ShutdownGameDLL.RCast(); +inline void(*v_SV_ShutdownGameDLL)(void); inline CMemory p_SV_ActivateServer; -inline auto v_SV_ActivateServer = p_SV_ActivateServer.RCast(); +inline bool(*v_SV_ActivateServer)(void); inline CMemory p_SV_CreateBaseline; -inline auto v_SV_CreateBaseline = p_SV_CreateBaseline.RCast(); +inline bool(*v_SV_CreateBaseline)(void); inline CMemory p_CGameServer__SpawnServer; -inline auto CGameServer__SpawnServer = p_CGameServer__SpawnServer.RCast(); +inline bool(*CGameServer__SpawnServer)(void* thisptr, const char* pszMapName, const char* pszMapGroupName); inline CMemory p_SV_BroadcastVoiceData; inline auto v_SV_BroadcastVoiceData = p_SV_BroadcastVoiceData.RCast(); diff --git a/r5dev/engine/server/vengineserver_impl.h b/r5dev/engine/server/vengineserver_impl.h index d657bd32..aec684a6 100644 --- a/r5dev/engine/server/vengineserver_impl.h +++ b/r5dev/engine/server/vengineserver_impl.h @@ -4,7 +4,7 @@ /* ==== CVENGINESERVER ================================================================================================================================================== */ inline CMemory p_IVEngineServer__PersistenceAvailable; -inline auto IVEngineServer__PersistenceAvailable = p_IVEngineServer__PersistenceAvailable.RCast(); +inline bool(*IVEngineServer__PersistenceAvailable)(void* entidx, int clientidx); inline bool* m_bIsDedicated = nullptr; diff --git a/r5dev/engine/staticpropmgr.h b/r5dev/engine/staticpropmgr.h index 8db6ceab..f486a962 100644 --- a/r5dev/engine/staticpropmgr.h +++ b/r5dev/engine/staticpropmgr.h @@ -2,7 +2,7 @@ #include "public/gamebspfile.h" inline CMemory p_CStaticProp_Init; -inline auto v_CStaticProp_Init = p_CStaticProp_Init.RCast(); +inline void*(*v_CStaticProp_Init)(int64_t thisptr, int64_t a2, unsigned int idx, unsigned int a4, StaticPropLump_t* lump, int64_t a6, int64_t a7); void* __fastcall CStaticProp_Init(int64_t thisptr, int64_t a2, unsigned int idx, unsigned int a4, StaticPropLump_t* lump, int64_t a6, int64_t a7); diff --git a/r5dev/engine/sys_dll.h b/r5dev/engine/sys_dll.h index 9ae1664c..ba8e43c3 100644 --- a/r5dev/engine/sys_dll.h +++ b/r5dev/engine/sys_dll.h @@ -41,22 +41,22 @@ private: /* ==== CAPPSYSTEMGROUP ================================================================================================================================================= */ inline CMemory p_CModAppSystemGroup_Main; -inline auto CModAppSystemGroup_Main = p_CModAppSystemGroup_Main.RCast(); +inline int(*CModAppSystemGroup_Main)(CModAppSystemGroup* pModAppSystemGroup); inline CMemory p_CModAppSystemGroup_Create; -inline auto CModAppSystemGroup_Create = p_CModAppSystemGroup_Create.RCast(); +inline bool(*CModAppSystemGroup_Create)(CModAppSystemGroup* pModAppSystemGroup); inline CMemory p_CSourceAppSystemGroup__PreInit; -inline auto CSourceAppSystemGroup__PreInit = p_CSourceAppSystemGroup__PreInit.RCast(); +inline bool(*CSourceAppSystemGroup__PreInit)(CSourceAppSystemGroup* pModAppSystemGroup); inline CMemory p_CSourceAppSystemGroup__Create; -inline auto CSourceAppSystemGroup__Create = p_CSourceAppSystemGroup__Create.RCast(); +inline bool(*CSourceAppSystemGroup__Create)(CSourceAppSystemGroup* pModAppSystemGroup); inline bool g_bAppSystemInit = false; /* ==== UTILITY ========================================================================================================================================================= */ inline CMemory p_Sys_Error_Internal; -inline auto Sys_Error_Internal = p_Sys_Error_Internal.RCast(); +inline int(*Sys_Error_Internal)(char* fmt, va_list args); inline bool* gfExtendedError = nullptr; diff --git a/r5dev/engine/sys_dll2.h b/r5dev/engine/sys_dll2.h index f6ee9d02..6f76c014 100644 --- a/r5dev/engine/sys_dll2.h +++ b/r5dev/engine/sys_dll2.h @@ -40,28 +40,28 @@ public: }; inline CMemory p_CEngineAPI_Init; -inline auto CEngineAPI_Init = p_CEngineAPI_Init.RCast(); +inline InitReturnVal_t(*CEngineAPI_Init)(CEngineAPI* thisp); inline CMemory p_CEngineAPI_Shutdown; -inline auto CEngineAPI_Shutdown = p_CEngineAPI_Shutdown.RCast(); +inline void(*CEngineAPI_Shutdown)(void); inline CMemory p_CEngineAPI_Connect; -inline auto CEngineAPI_Connect = p_CEngineAPI_Connect.RCast(); +inline bool(*CEngineAPI_Connect)(CEngineAPI* thisptr, CreateInterfaceFn factory); inline CMemory p_CEngineAPI_ModInit; -inline auto CEngineAPI_ModInit = p_CEngineAPI_ModInit.RCast(); +inline bool(*CEngineAPI_ModInit)(CEngineAPI* pEngineAPI, const char* pModName, const char* pGameDir); inline CMemory p_CEngineAPI_MainLoop; -inline auto CEngineAPI_MainLoop = p_CEngineAPI_MainLoop.RCast(); +inline bool(*CEngineAPI_MainLoop)(void); inline CMemory p_CEngineAPI_SetStartupInfo; -inline auto v_CEngineAPI_SetStartupInfo = p_CEngineAPI_SetStartupInfo.RCast(); +inline void(*v_CEngineAPI_SetStartupInfo)(CEngineAPI* pEngineAPI, StartupInfo_t* pStartupInfo); inline CMemory p_ResetMTVFTaskItem; -inline auto v_ResetMTVFTaskItem = p_ResetMTVFTaskItem.RCast(); +inline void*(*v_ResetMTVFTaskItem)(void); inline CMemory p_PakFile_Init; -inline auto PakFile_Init = p_PakFile_Init.RCast(); +inline void(*PakFile_Init)(char* buffer, char* source, char vpk_file); inline bool* g_bTextMode = nullptr; inline char* g_szBaseDir = nullptr; // static size = 260 diff --git a/r5dev/engine/sys_engine.h b/r5dev/engine/sys_engine.h index e73f8da4..15b84a48 100644 --- a/r5dev/engine/sys_engine.h +++ b/r5dev/engine/sys_engine.h @@ -22,7 +22,7 @@ private: /* ==== CENGINE ======================================================================================================================================================= */ inline CMemory p_CEngine_Frame; -inline auto v_CEngine_Frame = p_CEngine_Frame.RCast(); +inline bool(*v_CEngine_Frame)(CEngine* thisp); extern CEngine* g_pEngine; diff --git a/r5dev/engine/sys_getmodes.h b/r5dev/engine/sys_getmodes.h index aab323f0..6a7cd1d4 100644 --- a/r5dev/engine/sys_getmodes.h +++ b/r5dev/engine/sys_getmodes.h @@ -4,10 +4,10 @@ // CGAME //------------------------------------------------------------------------- inline CMemory p_CVideoMode_Common__CreateGameWindow; -inline auto CVideoMode_Common__CreateGameWindow = p_CVideoMode_Common__CreateGameWindow.RCast(); +inline bool(*CVideoMode_Common__CreateGameWindow)(int* pnRect); inline CMemory p_CVideoMode_Common__CreateWindowClass; -inline auto CVideoMode_Common__CreateWindowClass = p_CVideoMode_Common__CreateWindowClass.RCast(); +inline HWND(*CVideoMode_Common__CreateWindowClass)(vrect_t* pnRect); /////////////////////////////////////////////////////////////////////////////// class HVideoMode_Common : public IDetour diff --git a/r5dev/engine/sys_mainwind.h b/r5dev/engine/sys_mainwind.h index 8bfa6ad6..83ddb1f4 100644 --- a/r5dev/engine/sys_mainwind.h +++ b/r5dev/engine/sys_mainwind.h @@ -11,10 +11,10 @@ inline CMemory p_CGame__AttachToWindow; inline auto v_CGame__AttachToWindow= p_CGame__AttachToWindow.RCast(); inline CMemory p_CGame__PlayStartupVideos; -inline auto v_CGame__PlayStartupVideos = p_CGame__PlayStartupVideos.RCast(); +inline void(*v_CGame__PlayStartupVideos)(void); inline CMemory p_CGame__WindowProc; -inline auto v_CGame__WindowProc = p_CGame__WindowProc.RCast(); +inline int(*v_CGame__WindowProc)(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); //----------------------------------------------------------------------------- // Purpose: Main game interface, including message pump and window creation //----------------------------------------------------------------------------- diff --git a/r5dev/engine/sys_utils.h b/r5dev/engine/sys_utils.h index 99d9c18c..9ad52cda 100644 --- a/r5dev/engine/sys_utils.h +++ b/r5dev/engine/sys_utils.h @@ -2,16 +2,16 @@ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// inline CMemory p_Error; -inline auto v_Error = p_Error.RCast(); +inline void(*v_Error)(const char* fmt, ...); inline CMemory p_Warning; -inline auto v_Warning = p_Warning.RCast(); +inline void(*v_Warning)(int, const char* fmt, ...); inline CMemory p_Sys_GetProcessUpTime; -inline auto v_Sys_GetProcessUpTime = p_Sys_GetProcessUpTime.RCast(); +inline int(*v_Sys_GetProcessUpTime)(char* szBuffer); #ifndef DEDICATED inline CMemory p_Con_NPrintf; -inline auto v_Con_NPrintf = p_Con_NPrintf.RCast(); +inline void(*v_Con_NPrintf)(int pos, const char* fmt, ...); #endif // !DEDICATED /* ==== ------- ========================================================================================================================================================= */ diff --git a/r5dev/engine/traceinit.h b/r5dev/engine/traceinit.h index 5d147e62..aeee65f9 100644 --- a/r5dev/engine/traceinit.h +++ b/r5dev/engine/traceinit.h @@ -2,7 +2,7 @@ #define TRACEINIT_H inline CMemory p_TRACEINIT; -inline auto v_TRACEINIT = p_TRACEINIT.RCast(); +inline void(*v_TRACEINIT)(void* undef, const char* initfunc, const char* shutdownfunc); /////////////////////////////////////////////////////////////////////////////// class VTraceInit : public IDetour diff --git a/r5dev/filesystem/basefilesystem.h b/r5dev/filesystem/basefilesystem.h index f8cc761f..c4dffb6d 100644 --- a/r5dev/filesystem/basefilesystem.h +++ b/r5dev/filesystem/basefilesystem.h @@ -44,25 +44,25 @@ protected: /* ==== CBASEFILESYSTEM ================================================================================================================================================= */ inline CMemory p_CBaseFileSystem_Warning; -inline auto v_CBaseFileSystem_Warning = p_CBaseFileSystem_Warning.RCast(); +inline void(*v_CBaseFileSystem_Warning)(CBaseFileSystem* pFileSystem, FileWarningLevel_t level, const char* fmt, ...); inline CMemory p_CBaseFileSystem_LoadFromVPK; -inline auto v_CBaseFileSystem_LoadFromVPK = p_CBaseFileSystem_LoadFromVPK.RCast(); +inline FileHandle_t(*v_CBaseFileSystem_LoadFromVPK)(CBaseFileSystem* pFileSystem, FileHandle_t pResults, const char* pszAssetName); inline CMemory p_CBaseFileSystem_LoadFromCache; -inline auto v_CBaseFileSystem_LoadFromCache = p_CBaseFileSystem_LoadFromCache.RCast(); +inline bool(*v_CBaseFileSystem_LoadFromCache)(CBaseFileSystem* pFileSystem, const char* pszAssetName, FileSystemCache* pCache); inline CMemory p_CBaseFileSystem_AddMapPackFile; -inline auto v_CBaseFileSystem_AddMapPackFile = p_CBaseFileSystem_AddMapPackFile.RCast(); +inline void(*v_CBaseFileSystem_AddMapPackFile)(CBaseFileSystem* pFileSystem, const char* pPath, const char* pPathID, SearchPathAdd_t addType); inline CMemory p_CBaseFileSystem_MountVPKFile; -inline auto v_CBaseFileSystem_MountVPKFile = p_CBaseFileSystem_MountVPKFile.RCast(); +inline VPKData_t*(*v_CBaseFileSystem_MountVPKFile)(CBaseFileSystem* pFileSystem, const char* pszVpkPath); inline CMemory p_CBaseFileSystem_UnmountVPKFile; inline auto v_CBaseFileSystem_UnmountVPKFile = p_CBaseFileSystem_UnmountVPKFile.RCast(); inline CMemory p_CBaseFileSystem_GetMountedVPKHandle; -inline auto v_CBaseFileSystem_GetMountedVPKHandle = p_CBaseFileSystem_GetMountedVPKHandle.RCast(); +inline int(*v_CBaseFileSystem_GetMountedVPKHandle)(CBaseFileSystem* pFileSystem, const char* pszVpkPath); extern CBaseFileSystem* g_pFileSystem; diff --git a/r5dev/game/client/input.h b/r5dev/game/client/input.h index 8f0faec7..21fab76e 100644 --- a/r5dev/game/client/input.h +++ b/r5dev/game/client/input.h @@ -10,7 +10,7 @@ private: }; inline CMemory p_CInput__SetCustomWeaponActivity; -inline auto v_CInput__SetCustomWeaponActivity = p_CInput__SetCustomWeaponActivity.RCast(); +inline void(*v_CInput__SetCustomWeaponActivity)(CInput* pInput, int weaponActivity); inline IInput* g_pInput_VFTable = nullptr; inline CInput* g_pInput = nullptr; diff --git a/r5dev/game/client/viewrender.h b/r5dev/game/client/viewrender.h index efd7bb06..13a862f7 100644 --- a/r5dev/game/client/viewrender.h +++ b/r5dev/game/client/viewrender.h @@ -16,7 +16,7 @@ const Vector3D& MainViewOrigin(); const QAngle& MainViewAngles(); inline CMemory p_CViewRender_GetWorldMatrixForView; -inline auto CViewRender_GetWorldMatrixForView = p_CViewRender_GetWorldMatrixForView.RCast(); +inline VMatrix*(*CViewRender_GetWorldMatrixForView)(CViewRender*, int8_t); inline Vector3D* g_vecRenderOrigin = nullptr; inline QAngle* g_vecRenderAngles = nullptr; diff --git a/r5dev/game/server/ai_network.h b/r5dev/game/server/ai_network.h index 62692f85..51d25919 100644 --- a/r5dev/game/server/ai_network.h +++ b/r5dev/game/server/ai_network.h @@ -46,7 +46,7 @@ public: inline CAI_Network** g_pAINetwork = nullptr; inline CMemory p_CAI_Network__DebugConnectMsg; -inline auto v_CAI_Network__DebugConnectMsg = p_CAI_Network__DebugConnectMsg.RCast(); +inline void(*v_CAI_Network__DebugConnectMsg)(int node1, int node2, const char* pszformat, ...); /////////////////////////////////////////////////////////////////////////////// class VAI_Network : public IDetour diff --git a/r5dev/game/server/ai_networkmanager.h b/r5dev/game/server/ai_networkmanager.h index afe754df..214464c9 100644 --- a/r5dev/game/server/ai_networkmanager.h +++ b/r5dev/game/server/ai_networkmanager.h @@ -15,17 +15,17 @@ const int AINETWORK_OFFSET = 2840; /* ==== CAI_NETWORKMANAGER ============================================================================================================================================== */ inline CMemory p_CAI_NetworkManager__ShouldRebuild = nullptr; -inline auto CAI_NetworkManager__ShouldRebuild = p_CAI_NetworkManager__ShouldRebuild.RCast(); +inline void*(*CAI_NetworkManager__ShouldRebuild)(void* thisptr, CAI_Network* pNetwork, void* a3, int a4); #if defined (GAMEDLL_S0) || defined (GAMEDLL_S1) inline CMemory p_CAI_NetworkManager__LoadNetworkGraph = nullptr; -inline auto CAI_NetworkManager__LoadNetworkGraph = p_CAI_NetworkManager__LoadNetworkGraph.RCast(); +inline void*(*CAI_NetworkManager__LoadNetworkGraph)(void* thisptr, void* pBuffer, const char* pszFileName, int a4); #elif defined (GAMEDLL_S2) || defined (GAMEDLL_S3) inline CMemory p_CAI_NetworkManager__LoadNetworkGraph = nullptr; -inline auto CAI_NetworkManager__LoadNetworkGraph = p_CAI_NetworkManager__LoadNetworkGraph.RCast(); +inline void*(*CAI_NetworkManager__LoadNetworkGraph)(void* thisptr, void* pBuffer, const char* pszFileName); #endif /* ==== CAI_NETWORKBUILDER ============================================================================================================================================== */ inline CMemory p_CAI_NetworkBuilder__Build; -inline auto CAI_NetworkBuilder__Build = p_CAI_NetworkBuilder__Build.RCast(); +inline void*(*CAI_NetworkBuilder__Build)(void* thisptr, CAI_Network* pNetwork, void* a3, int a4); inline int * g_nAiNodeClusters = nullptr; inline AINodeClusters *** g_pppAiNodeClusters = nullptr; diff --git a/r5dev/game/server/baseanimating.h b/r5dev/game/server/baseanimating.h index 276ed506..044426a3 100644 --- a/r5dev/game/server/baseanimating.h +++ b/r5dev/game/server/baseanimating.h @@ -136,7 +136,7 @@ protected: }; inline CMemory p_CBaseAnimating__LockStudioHdr; -inline auto v_CBaseAnimating__LockStudioHdr = p_CBaseAnimating__LockStudioHdr.RCast(); +inline CBaseAnimating*(*v_CBaseAnimating__LockStudioHdr)(CBaseAnimating* thisp); void BaseAnimating_Attach(); void BaseAnimating_Detach(); diff --git a/r5dev/game/server/baseentity.h b/r5dev/game/server/baseentity.h index 61423ea1..25cae346 100644 --- a/r5dev/game/server/baseentity.h +++ b/r5dev/game/server/baseentity.h @@ -254,7 +254,7 @@ protected: }; inline CMemory p_CBaseEntity__GetBaseEntity; -inline auto v_CBaseEntity__GetBaseEntity = p_CBaseEntity__GetBaseEntity.RCast(); +inline CBaseEntity*(*v_CBaseEntity__GetBaseEntity)(CBaseEntity* thisp); /////////////////////////////////////////////////////////////////////////////// class VBaseEntity : public IDetour diff --git a/r5dev/game/server/detour_impl.h b/r5dev/game/server/detour_impl.h index 3a7d2d72..0c888350 100644 --- a/r5dev/game/server/detour_impl.h +++ b/r5dev/game/server/detour_impl.h @@ -7,19 +7,19 @@ // RUNTIME: DETOUR //------------------------------------------------------------------------- inline CMemory p_Detour_LevelInit; -inline auto v_Detour_LevelInit = p_Detour_LevelInit.RCast(); +inline void(*v_Detour_LevelInit)(void); inline CMemory p_Detour_FreeNavMesh; -inline auto v_Detour_FreeNavMesh = p_Detour_FreeNavMesh.RCast(); +inline void(*v_Detour_FreeNavMesh)(dtNavMesh* mesh); inline CMemory p_dtNavMesh__Init; -inline auto v_dtNavMesh__Init = p_dtNavMesh__Init.RCast(); +inline dtStatus(*v_dtNavMesh__Init)(dtNavMesh* thisptr, unsigned char* data, int flags); inline CMemory p_dtNavMesh__addTile; -inline auto v_dtNavMesh__addTile = p_dtNavMesh__addTile.RCast(); +inline dtStatus(*v_dtNavMesh__addTile)(dtNavMesh* thisptr, unsigned char* data, dtMeshHeader* header, int dataSize, int flags, dtTileRef lastRef); inline CMemory p_dtNavMesh__isPolyReachable; -inline auto v_dtNavMesh__isPolyReachable = p_dtNavMesh__isPolyReachable.RCast(); +inline bool(*v_dtNavMesh__isPolyReachable)(dtNavMesh* thisptr, dtPolyRef poly_1, dtPolyRef poly_2, int hull_type); constexpr const char* NAVMESH_PATH = "maps/navmesh/"; diff --git a/r5dev/game/server/gameinterface.h b/r5dev/game/server/gameinterface.h index 19a92259..b1b2755a 100644 --- a/r5dev/game/server/gameinterface.h +++ b/r5dev/game/server/gameinterface.h @@ -55,7 +55,7 @@ inline auto v_CServerGameClients__ProcessUserCmds = p_CServerGameClients__Proces int numCmds, int totalCmds, int droppedPackets, bool ignore, bool paused)>(); inline CMemory p_RunFrameServer; -inline auto v_RunFrameServer = p_RunFrameServer.RCast(); +inline void(*v_RunFrameServer)(double flFrameTime, bool bRunOverlays, bool bUniformUpdate); extern CServerGameDLL* g_pServerGameDLL; extern CServerGameClients* g_pServerGameClients; diff --git a/r5dev/game/server/physics_main.h b/r5dev/game/server/physics_main.h index 261c348f..091d38e6 100644 --- a/r5dev/game/server/physics_main.h +++ b/r5dev/game/server/physics_main.h @@ -8,7 +8,7 @@ #define PHYSICS_MAIN_H inline CMemory p_Physics_RunThinkFunctions; -inline auto v_Physics_RunThinkFunctions = p_Physics_RunThinkFunctions.RCast(); +inline void(*v_Physics_RunThinkFunctions)(bool bSimulating); /////////////////////////////////////////////////////////////////////////////// class VPhysics_Main : public IDetour diff --git a/r5dev/game/server/player.h b/r5dev/game/server/player.h index 7ec5f72a..3ca2a2c2 100644 --- a/r5dev/game/server/player.h +++ b/r5dev/game/server/player.h @@ -792,10 +792,10 @@ private: static_assert(sizeof(CPlayer) == 0x7EF0); // !TODO: backwards compatibility. inline CMemory p_CPlayer__EyeAngles; -inline auto v_CPlayer__EyeAngles = p_CPlayer__EyeAngles.RCast(); +inline QAngle*(*v_CPlayer__EyeAngles)(CPlayer* pPlayer, QAngle* pAngles); inline CMemory p_CPlayer__PlayerRunCommand; -inline auto v_CPlayer__PlayerRunCommand = p_CPlayer__PlayerRunCommand.RCast(); +inline void(*v_CPlayer__PlayerRunCommand)(CPlayer* pPlayer, CUserCmd* pUserCmd, IMoveHelper* pMover); /////////////////////////////////////////////////////////////////////////////// class VPlayer : public IDetour diff --git a/r5dev/game/shared/animation.h b/r5dev/game/shared/animation.h index 2cf01563..0b9c0e13 100644 --- a/r5dev/game/shared/animation.h +++ b/r5dev/game/shared/animation.h @@ -83,7 +83,7 @@ struct Player_AnimViewEntityData inline CMemory p_CStudioHdr__LookupSequence; -inline auto v_CStudioHdr__LookupSequence = p_CStudioHdr__LookupSequence.RCast(); +inline int(*v_CStudioHdr__LookupSequence)(CStudioHdr* pStudio, const char* pszName); /////////////////////////////////////////////////////////////////////////////// class VAnimation : public IDetour diff --git a/r5dev/game/shared/usercmd.h b/r5dev/game/shared/usercmd.h index 2665eecc..c8a43623 100644 --- a/r5dev/game/shared/usercmd.h +++ b/r5dev/game/shared/usercmd.h @@ -19,16 +19,16 @@ class CUserCmd; inline CMemory p_CUserCmd__CUserCmd; -inline auto v_CUserCmd__CUserCmd = p_CUserCmd__CUserCmd.RCast(); +inline CUserCmd*(*v_CUserCmd__CUserCmd)(CUserCmd* pUserCmd); inline CMemory p_CUserCmd__Reset; -inline auto v_CUserCmd__Reset = p_CUserCmd__Reset.RCast(); +inline void(*v_CUserCmd__Reset)(CUserCmd* pUserCmd); inline CMemory p_CUserCmd__Copy; -inline auto v_CUserCmd__Copy = p_CUserCmd__Copy.RCast(); +inline CUserCmd*(*v_CUserCmd__Copy)(CUserCmd* pDest, CUserCmd* pSource); inline CMemory p_ReadUserCmd; -inline auto v_ReadUserCmd = p_ReadUserCmd.RCast(); +inline int(*v_ReadUserCmd)(bf_read* buf, CUserCmd* move, CUserCmd* from); //------------------------------------------------------------------------------------- #pragma pack(push, 1) diff --git a/r5dev/game/shared/vscript_shared.h b/r5dev/game/shared/vscript_shared.h index 6e54b747..1f90db3d 100644 --- a/r5dev/game/shared/vscript_shared.h +++ b/r5dev/game/shared/vscript_shared.h @@ -3,10 +3,10 @@ #include "vscript/languages/squirrel_re/include/squirrel.h" inline CMemory p_Script_Remote_BeginRegisteringFunctions; -inline auto Script_Remote_BeginRegisteringFunctions = p_Script_Remote_BeginRegisteringFunctions.RCast(); +inline void*(*Script_Remote_BeginRegisteringFunctions)(void); inline CMemory p_RestoreRemoteChecksumsFromSaveGame; -inline auto RestoreRemoteChecksumsFromSaveGame = p_RestoreRemoteChecksumsFromSaveGame.RCast(); +inline void*(*RestoreRemoteChecksumsFromSaveGame)(void* a1, void* a2); #ifndef CLIENT_DLL inline uint32_t* g_nServerRemoteChecksum = nullptr; diff --git a/r5dev/launcher/launcher.h b/r5dev/launcher/launcher.h index 7e4f5d81..bb927e42 100644 --- a/r5dev/launcher/launcher.h +++ b/r5dev/launcher/launcher.h @@ -2,14 +2,14 @@ #define LAUNCHER_H inline CMemory p_LauncherMain; -inline auto v_LauncherMain = p_LauncherMain.RCast(); +inline int(*v_LauncherMain)(HINSTANCE hInstance); inline CMemory p_TopLevelExceptionFilter; -inline auto v_TopLevelExceptionFilter = p_TopLevelExceptionFilter.RCast(); +inline LONG(*v_TopLevelExceptionFilter)(EXCEPTION_POINTERS* pExceptionPointer); #if !defined (GAMEDLL_S0) && !defined (GAMEDLL_S1) inline CMemory p_RemoveSpuriousGameParameters; -inline auto v_RemoveSpuriousGameParameters = p_RemoveSpuriousGameParameters.RCast(); +inline void*(*v_RemoveSpuriousGameParameters)(void); #endif // !GAMEDLL_S0 || !GAMEDLL_S1 void AppendSDKParametersPreInit(); diff --git a/r5dev/launcher/prx.h b/r5dev/launcher/prx.h index efc545f0..3786691e 100644 --- a/r5dev/launcher/prx.h +++ b/r5dev/launcher/prx.h @@ -2,7 +2,7 @@ /* ==== PRX ============================================================================================================================================================= */ inline CMemory p_exit_or_terminate_process; -inline auto v_exit_or_terminate_process = p_exit_or_terminate_process.RCast(); +inline void(*v_exit_or_terminate_process)(UINT uExitCode); /////////////////////////////////////////////////////////////////////////////// class VPRX : public IDetour diff --git a/r5dev/materialsystem/cmaterialglue.h b/r5dev/materialsystem/cmaterialglue.h index 800663cb..02fc4104 100644 --- a/r5dev/materialsystem/cmaterialglue.h +++ b/r5dev/materialsystem/cmaterialglue.h @@ -69,7 +69,7 @@ inline void* g_pMaterialGlueVFTable = nullptr; /* ==== CMATERIALGLUE ================================================================================================================================================== */ #ifndef DEDICATED inline CMemory p_GetMaterialAtCrossHair; -inline auto GetMaterialAtCrossHair = p_GetMaterialAtCrossHair.RCast(); +inline CMaterialGlue*(*GetMaterialAtCrossHair)(void); #endif // !DEDICATED /////////////////////////////////////////////////////////////////////////////// diff --git a/r5dev/materialsystem/cmaterialsystem.h b/r5dev/materialsystem/cmaterialsystem.h index fbb2691a..349446e7 100644 --- a/r5dev/materialsystem/cmaterialsystem.h +++ b/r5dev/materialsystem/cmaterialsystem.h @@ -15,26 +15,26 @@ public: /* ==== MATERIALSYSTEM ================================================================================================================================================== */ inline CMemory p_CMaterialSystem__Init; -inline auto CMaterialSystem__Init = p_CMaterialSystem__Init.RCast(); +inline void*(*CMaterialSystem__Init)(CMaterialSystem* thisptr); inline void* g_pMaterialSystem = nullptr; inline void* g_pMaterialVFTable = nullptr; #ifndef DEDICATED inline CMemory p_CMaterialSystem__FindMaterialEx; -inline auto CMaterialSystem__FindMaterialEx = p_CMaterialSystem__FindMaterialEx.RCast(); +inline CMaterialGlue*(*CMaterialSystem__FindMaterialEx)(CMaterialSystem* pMatSys, const char* pMaterialName, uint8_t nMaterialType, int nUnk, bool bComplain); inline CMemory p_CMaterialSystem_GetScreenSize; -inline auto CMaterialSystem_GetScreenSize = p_CMaterialSystem_GetScreenSize.RCast(); +inline void(*CMaterialSystem_GetScreenSize)(CMaterialSystem* pMatSys, float* outX, float* outY); #if defined (GAMEDLL_S0) || defined (GAMEDLL_S1) inline CMemory p_DispatchDrawCall; -inline auto v_DispatchDrawCall = p_DispatchDrawCall.RCast(); +inline void*(*v_DispatchDrawCall)(int64_t a1, uint64_t a2, int a3, int a4, char a5, int a6, uint8_t a7, int64_t a8, uint32_t a9, uint32_t a10, __m128* a11, int a12); #elif defined (GAMEDLL_S2) || defined (GAMEDLL_S3) inline CMemory p_DispatchDrawCall; -inline auto v_DispatchDrawCall = p_DispatchDrawCall.RCast(); +inline void*(*v_DispatchDrawCall)(int64_t a1, uint64_t a2, int a3, int a4, int64_t a5, int a6, uint8_t a7, int64_t a8, uint32_t a9, uint32_t a10, int a11, __m128* a12, int a13, int64_t a14); #endif inline CMemory p_GetStreamOverlay; -inline auto v_GetStreamOverlay = p_GetStreamOverlay.RCast(); +inline void(*v_GetStreamOverlay)(const char* mode, char* buf, size_t bufSize); inline CMemory p_DrawStreamOverlay; inline auto v_DrawStreamOverlay = p_DrawStreamOverlay.RCast(); diff --git a/r5dev/public/appframework/IAppSystemGroup.h b/r5dev/public/appframework/IAppSystemGroup.h index a5b31815..52b7d48a 100644 --- a/r5dev/public/appframework/IAppSystemGroup.h +++ b/r5dev/public/appframework/IAppSystemGroup.h @@ -94,7 +94,7 @@ protected: static_assert(sizeof(CAppSystemGroup) == 0xA8); inline CMemory p_CAppSystemGroup_Destroy; -inline auto CAppSystemGroup_Destroy = p_CAppSystemGroup_Destroy.RCast(); +inline void(*CAppSystemGroup_Destroy)(CAppSystemGroup* pAppSystemGroup); /////////////////////////////////////////////////////////////////////////////// class VAppSystemGroup : public IDetour diff --git a/r5dev/public/tier0/jobthread.h b/r5dev/public/tier0/jobthread.h index 02e18454..faa1b204 100644 --- a/r5dev/public/tier0/jobthread.h +++ b/r5dev/public/tier0/jobthread.h @@ -8,16 +8,16 @@ struct JobFifoLock_s typedef uint32_t JobID_t; inline CMemory p_JT_ParallelCall; -inline auto JT_ParallelCall = p_JT_ParallelCall.RCast(); +inline void(*JT_ParallelCall)(void); inline CMemory p_JT_HelpWithAnything; -inline auto JT_HelpWithAnything = p_JT_HelpWithAnything.RCast(); +inline void*(*JT_HelpWithAnything)(bool bShouldLoadPak); inline CMemory p_JT_AcquireFifoLock; -inline auto JT_AcquireFifoLock = p_JT_AcquireFifoLock.RCast(); +inline bool(*JT_AcquireFifoLock)(struct JobFifoLock_s* pFifo); inline CMemory p_JT_ReleaseFifoLock; -inline auto JT_ReleaseFifoLock = p_JT_ReleaseFifoLock.RCast(); +inline void(*JT_ReleaseFifoLock)(struct JobFifoLock_s* pFifo); void JT_Attach(); void JT_Detach(); diff --git a/r5dev/public/tier0/platform_internal.h b/r5dev/public/tier0/platform_internal.h index 74f1dbf8..88c62a87 100644 --- a/r5dev/public/tier0/platform_internal.h +++ b/r5dev/public/tier0/platform_internal.h @@ -2,10 +2,10 @@ #define PLATFORM_INTERNAL_H inline CMemory p_Plat_FloatTime; -inline auto v_Plat_FloatTime = p_Plat_FloatTime.RCast(); +inline double(*v_Plat_FloatTime)(void); inline CMemory p_Plat_MSTime; -inline auto v_Plat_MSTime = p_Plat_MSTime.RCast(); +inline uint64_t(*v_Plat_MSTime)(void); inline double* g_flErrorTimeStamp = nullptr; /////////////////////////////////////////////////////////////////////////////// diff --git a/r5dev/public/tier0/threadtools.h b/r5dev/public/tier0/threadtools.h index b6f5c036..9bb258bf 100644 --- a/r5dev/public/tier0/threadtools.h +++ b/r5dev/public/tier0/threadtools.h @@ -261,7 +261,7 @@ typedef CInterlockedIntT CInterlockedUInt; #ifndef BUILDING_MATHLIB //============================================================================= inline CMemory p_DeclareCurrentThreadIsMainThread; -inline auto v_DeclareCurrentThreadIsMainThread = p_DeclareCurrentThreadIsMainThread.RCast(); +inline ThreadId_t(*v_DeclareCurrentThreadIsMainThread)(void); #endif // !BUILDING_MATHLIB diff --git a/r5dev/public/tier1/cmd.h b/r5dev/public/tier1/cmd.h index 8a1c52c8..ddea7005 100644 --- a/r5dev/public/tier1/cmd.h +++ b/r5dev/public/tier1/cmd.h @@ -180,13 +180,13 @@ public: /* ==== CONCOMMAND ====================================================================================================================================================== */ inline CMemory p_ConCommand_AutoCompleteSuggest; -inline auto ConCommand_AutoCompleteSuggest = p_ConCommand_AutoCompleteSuggest.RCast& commands)>(); +inline bool(*ConCommand_AutoCompleteSuggest)(ConCommand* pCommand, const char* partial, CUtlVector< CUtlString >& commands); inline CMemory p_ConCommandBase_IsFlagSet; -inline auto ConCommandBase_IsFlagSet = p_ConCommandBase_IsFlagSet.RCast(); +inline bool(*ConCommandBase_IsFlagSet)(ConCommandBase* pCommand, int nFlag); inline CMemory p_NullSub; -inline auto NullSub = p_NullSub.RCast(); +inline void(*NullSub)(void); inline CMemory p_CallbackStub; inline FnCommandCompletionCallback CallbackStub = p_CallbackStub.RCast(); diff --git a/r5dev/public/tier1/cvar.h b/r5dev/public/tier1/cvar.h index d74ce3e5..83a312e1 100644 --- a/r5dev/public/tier1/cvar.h +++ b/r5dev/public/tier1/cvar.h @@ -302,16 +302,16 @@ void ConVar_PrintDescription(ConCommandBase* pVar); /* ==== CONVAR ========================================================================================================================================================== */ inline CMemory p_ConVar_Register; -inline auto v_ConVar_Register = p_ConVar_Register.RCast(); +inline void*(*v_ConVar_Register)(ConVar* thisptr, const char* szName, const char* szDefaultValue, int nFlags, const char* szHelpString, bool bMin, float fMin, bool bMax, float fMax, FnChangeCallback_t pCallback, const char* pszUsageString); inline CMemory p_ConVar_Unregister; -inline auto v_ConVar_Unregister = p_ConVar_Unregister.RCast(); +inline void(*v_ConVar_Unregister)(ConVar* thisptr); inline CMemory p_ConVar_IsFlagSet; -inline auto v_ConVar_IsFlagSet = p_ConVar_IsFlagSet.RCast(); +inline bool(*v_ConVar_IsFlagSet)(ConVar* pConVar, int nFlag); inline CMemory p_ConVar_PrintDescription; -inline auto v_ConVar_PrintDescription = p_ConVar_PrintDescription.RCast(); +inline void*(*v_ConVar_PrintDescription)(ConCommandBase* pVar); inline ConVar* g_pConVarVBTable; inline IConVar* g_pConVarVFTable; diff --git a/r5dev/rtech/rtech_game.h b/r5dev/rtech/rtech_game.h index 2613093e..f79d98b0 100644 --- a/r5dev/rtech/rtech_game.h +++ b/r5dev/rtech/rtech_game.h @@ -29,13 +29,13 @@ enum class ePakStatus : int /* ==== RTECH_GAME ====================================================================================================================================================== */ inline CMemory p_CPakFile_LoadAsync; -inline auto CPakFile_LoadAsync = p_CPakFile_LoadAsync.RCast(); +inline RPakHandle_t(*CPakFile_LoadAsync)(const char* szPakFileName, CAlignedMemAlloc* pMalloc, int nIdx, bool bUnk); inline CMemory p_CPakFile_LoadPak; inline auto CPakFile_LoadPak = p_CPakFile_LoadPak.RCast(); inline CMemory p_CPakFile_UnloadPak; -inline auto CPakFile_UnloadPak = p_CPakFile_UnloadPak.RCast(); +inline void(*CPakFile_UnloadPak)(RPakHandle_t handle); inline CMemory p_CPakFile_OpenFileOffset; // Offset to inlined 'CPakFile::LoadPak_OpenFile'. diff --git a/r5dev/rtech/rtech_utils.h b/r5dev/rtech/rtech_utils.h index d96fd35a..40f3853b 100644 --- a/r5dev/rtech/rtech_utils.h +++ b/r5dev/rtech/rtech_utils.h @@ -376,13 +376,13 @@ static_assert(sizeof(RPakPatchCompressedHeader_t) == 16); /* ==== RTECH =========================================================================================================================================================== */ // [ PIXIE ]: I'm very unsure about this, but it really seems like it inline CMemory p_RTech_FindFreeSlotInFiles; -inline auto RTech_FindFreeSlotInFiles = p_RTech_FindFreeSlotInFiles.RCast(); +inline int32_t(*RTech_FindFreeSlotInFiles)(int32_t*); inline CMemory p_RTech_OpenFile; -inline auto RTech_OpenFile = p_RTech_OpenFile.RCast(); +inline int32_t(*RTech_OpenFile)(const char*, void*, int64_t*); inline CMemory p_RTech_RegisterAsset; -inline auto RTech_RegisterAsset = p_RTech_RegisterAsset.RCast(); +inline void(*RTech_RegisterAsset)(int, int, const char*, void*, void*, void*, void*, int, int, uint32_t, int, int); #ifdef GAMEDLL_S3 inline CMemory p_Pak_ProcessGuidRelationsForAsset; @@ -390,7 +390,7 @@ inline auto RTech_Pak_ProcessGuidRelationsForAsset = p_Pak_ProcessGuidRelationsF #endif inline CMemory p_StreamDB_Init; -inline auto v_StreamDB_Init = p_StreamDB_Init.RCast(); +inline void(*v_StreamDB_Init)(const char* pszLevelName); inline RPakLoadedInfo_t* g_pLoadedPakInfo; inline int16_t* g_pRequestedPakCount; diff --git a/r5dev/rtech/rui/rui.h b/r5dev/rtech/rui/rui.h index 76fc2f04..021625c8 100644 --- a/r5dev/rtech/rui/rui.h +++ b/r5dev/rtech/rui/rui.h @@ -2,13 +2,13 @@ /* ==== RUI ====================================================================================================================================================== */ inline CMemory p_Rui_Draw; -inline auto v_Rui_Draw = p_Rui_Draw.RCast(); +inline bool(*v_Rui_Draw)(__int64* a1, __m128* a2, const __m128i* a3, __int64 a4, __m128* a5); inline CMemory p_Rui_LoadAsset; -inline auto v_Rui_LoadAsset = p_Rui_LoadAsset.RCast(); +inline void*(*v_Rui_LoadAsset)(const char* szRuiAssetName); inline CMemory p_Rui_GetFontFace; -inline auto v_Rui_GetFontFace = p_Rui_GetFontFace.RCast(); +inline int16_t(*v_Rui_GetFontFace)(void); /////////////////////////////////////////////////////////////////////////////// class V_Rui : public IDetour diff --git a/r5dev/rtech/stryder/stryder.h b/r5dev/rtech/stryder/stryder.h index ea749c97..9e683999 100644 --- a/r5dev/rtech/stryder/stryder.h +++ b/r5dev/rtech/stryder/stryder.h @@ -2,10 +2,10 @@ /* ==== STRYDER ================================================================================================================================================ */ inline CMemory p_Stryder_StitchRequest; -inline auto Stryder_StitchRequest = p_Stryder_StitchRequest.RCast(); +inline void*(*Stryder_StitchRequest)(void* a1); inline CMemory p_Stryder_SendOfflineRequest; -inline auto Stryder_SendOfflineRequest = p_Stryder_SendOfflineRequest.RCast(); +inline bool(*Stryder_SendOfflineRequest)(void); /////////////////////////////////////////////////////////////////////////////// class VStryder : public IDetour diff --git a/r5dev/tier0/commandline.h b/r5dev/tier0/commandline.h index ff905d52..6977906e 100644 --- a/r5dev/tier0/commandline.h +++ b/r5dev/tier0/commandline.h @@ -31,7 +31,7 @@ inline CCommandLine* CommandLine(void) } inline CMemory p_CCommandLine__CreateCmdLine; -inline auto v_CCommandLine__CreateCmdLine = p_CCommandLine__CreateCmdLine.RCast(); +inline void(*v_CCommandLine__CreateCmdLine)(CCommandLine* thisptr, const char* pszCommandLine); /////////////////////////////////////////////////////////////////////////////// class VCommandLine : public IDetour diff --git a/r5dev/vgui/vgui_baseui_interface.h b/r5dev/vgui/vgui_baseui_interface.h index f27e3b71..580ba997 100644 --- a/r5dev/vgui/vgui_baseui_interface.h +++ b/r5dev/vgui/vgui_baseui_interface.h @@ -77,13 +77,13 @@ public: /* ==== CENGINEVGUI ===================================================================================================================================================== */ inline CMemory p_CEngineVGui_Paint; -inline auto CEngineVGui_Paint = p_CEngineVGui_Paint.RCast(); +inline int(*CEngineVGui_Paint)(CEngineVGui* thisptr, PaintMode_t mode); inline CMemory p_CEngineVGui_RenderStart; -inline auto CEngineVGui_RenderStart = p_CEngineVGui_RenderStart.RCast(); +inline void*(*CEngineVGui_RenderStart)(CMatSystemSurface* pMatSystemSurface); inline CMemory p_CEngineVGui_RenderEnd; -inline auto CEngineVGui_RenderEnd = p_CEngineVGui_RenderEnd.RCast(); +inline void*(*CEngineVGui_RenderEnd)(void); inline CEngineVGui* g_pEngineVGui = nullptr; diff --git a/r5dev/vgui/vgui_fpspanel.h b/r5dev/vgui/vgui_fpspanel.h index 550c7ecc..ac17cb5b 100644 --- a/r5dev/vgui/vgui_fpspanel.h +++ b/r5dev/vgui/vgui_fpspanel.h @@ -2,7 +2,7 @@ /* ==== CFPSPANEL ======================================================================================================================================================= */ inline CMemory p_CFPSPanel_Paint; -inline auto CFPSPanel_Paint = p_CFPSPanel_Paint.RCast(); +inline ConVar*(*CFPSPanel_Paint)(void* thisptr); /////////////////////////////////////////////////////////////////////////////// class VFPSPanel : public IDetour diff --git a/r5dev/vguimatsurface/MatSystemSurface.h b/r5dev/vguimatsurface/MatSystemSurface.h index 7b92712b..847ad32a 100644 --- a/r5dev/vguimatsurface/MatSystemSurface.h +++ b/r5dev/vguimatsurface/MatSystemSurface.h @@ -2,7 +2,7 @@ /* ==== CMATSYSTEMSURFACE =============================================================================================================================================== */ inline CMemory p_CMatSystemSurface_DrawColoredText; -inline auto CMatSystemSurface_DrawColoredText = p_CMatSystemSurface_DrawColoredText.RCast(); +inline void*(*CMatSystemSurface_DrawColoredText)(void* thisptr, short font, int fontHeight, int offsetX, int offsetY, int red, int green, int blue, int alpha, const char* text, ...); class CMatSystemSurface { diff --git a/r5dev/vpc/IAppSystem.h b/r5dev/vpc/IAppSystem.h index 2d4d9604..9a131b9e 100644 --- a/r5dev/vpc/IAppSystem.h +++ b/r5dev/vpc/IAppSystem.h @@ -2,7 +2,7 @@ /* ==== IAPPSYSTEM ============================================================================================================================================== */ //inline CMemory p_IAppSystem_LoadLibrary; // C initializers/terminators -//inline auto IAppSystem_LoadLibrary = p_IAppSystem_LoadLibrary.RCast(); +//inline void*(*IAppSystem_LoadLibrary)(void); /////////////////////////////////////////////////////////////////////////////// class VAppSystem : public IDetour diff --git a/r5dev/vpc/keyvalues.h b/r5dev/vpc/keyvalues.h index 2f667dae..a6d737b4 100644 --- a/r5dev/vpc/keyvalues.h +++ b/r5dev/vpc/keyvalues.h @@ -21,25 +21,25 @@ class IBaseFileSystem; /* ==== KEYVALUES ======================================================================================================================================================= */ inline CMemory p_KeyValues_FindKey; -inline auto KeyValues_FindKey = p_KeyValues_FindKey.RCast(); +inline void*(*KeyValues_FindKey)(KeyValues* thisptr, const char* pkeyName, bool bCreate); inline CMemory p_KeyValues_LoadPlaylists; -inline auto KeyValues_LoadPlaylists = p_KeyValues_LoadPlaylists.RCast(); +inline bool(*KeyValues_LoadPlaylists)(const char* pszPlaylist); inline CMemory p_KeyValues_ParsePlaylists; -inline auto KeyValues_ParsePlaylists = p_KeyValues_ParsePlaylists.RCast(); +inline bool(*KeyValues_ParsePlaylists)(const char* pszPlaylist); inline CMemory p_KeyValues_GetCurrentPlaylist; inline auto KeyValues_GetCurrentPlaylist = p_KeyValues_GetCurrentPlaylist.RCast(); inline CMemory p_KeyValues_ReadKeyValuesFile; -inline auto KeyValues_ReadKeyValuesFile = p_KeyValues_ReadKeyValuesFile.RCast(); +inline KeyValues*(*KeyValues_ReadKeyValuesFile)(CFileSystem_Stdio* pFileSystem, const char* pFileName); inline CMemory p_KeyValues_RecursiveSaveToFile; -inline auto KeyValues_RecursiveSaveToFile = p_KeyValues_RecursiveSaveToFile.RCast(); +inline void(*KeyValues_RecursiveSaveToFile)(KeyValues* thisptr, IBaseFileSystem* pFileSystem, FileHandle_t pHandle, CUtlBuffer* pBuf, int nIndentLevel); inline CMemory p_KeyValues_LoadFromFile; -inline auto KeyValues_LoadFromFile = p_KeyValues_LoadFromFile.RCast(); +inline KeyValues*(*KeyValues_LoadFromFile)(KeyValues* thisptr, IBaseFileSystem* pFileSystem, const char* pszResourceName, const char* pszPathID, void* pfnEvaluateSymbolProc); enum KeyValuesTypes_t : char { diff --git a/r5dev/vphysics/QHull.h b/r5dev/vphysics/QHull.h index 1c1ab3dc..6b346845 100644 --- a/r5dev/vphysics/QHull.h +++ b/r5dev/vphysics/QHull.h @@ -1,10 +1,10 @@ #pragma once inline CMemory p_QHull_PrintFunc; -inline auto v_QHull_PrintFunc = p_QHull_PrintFunc.RCast(); +inline int(*v_QHull_PrintFunc)(const char* fmt, ...); //inline CMemory p_speex_warning_int; -//inline auto speex_warning_int = p_speex_warning_int.RCast(); +//inline int(*speex_warning_int)(FILE* stream, const char* format, ...); /////////////////////////////////////////////////////////////////////////////// int QHull_PrintFunc(const char* fmt, ...); diff --git a/r5dev/vscript/languages/squirrel_re/include/sqstdaux.h b/r5dev/vscript/languages/squirrel_re/include/sqstdaux.h index f5668df8..3b63f208 100644 --- a/r5dev/vscript/languages/squirrel_re/include/sqstdaux.h +++ b/r5dev/vscript/languages/squirrel_re/include/sqstdaux.h @@ -7,10 +7,10 @@ extern bool g_bSQAuxBadLogic; extern HSQUIRRELVM g_pErrorVM; inline CMemory p_sqstd_aux_printerror; -inline auto v_sqstd_aux_printerror = p_sqstd_aux_printerror.RCast(); +inline SQInteger(*v_sqstd_aux_printerror)(HSQUIRRELVM v); inline CMemory p_sqstd_aux_badlogic; -inline auto v_sqstd_aux_badlogic = p_sqstd_aux_badlogic.RCast(); +inline SQInteger(*v_sqstd_aux_badlogic)(HSQUIRRELVM v, __m128i* a2, __m128i* a3); /////////////////////////////////////////////////////////////////////////////// class VSquirrelAUX : public IDetour diff --git a/r5dev/vscript/languages/squirrel_re/include/squirrel.h b/r5dev/vscript/languages/squirrel_re/include/squirrel.h index 44f25230..e6ea5930 100644 --- a/r5dev/vscript/languages/squirrel_re/include/squirrel.h +++ b/r5dev/vscript/languages/squirrel_re/include/squirrel.h @@ -46,37 +46,37 @@ SQRESULT sq_call(HSQUIRRELVM v, SQInteger params, SQBool retval, SQBool raiseerr /* ==== SQUIRREL ======================================================================================================================================================== */ inline CMemory p_sq_pushroottable; -inline auto v_sq_pushroottable = p_sq_pushroottable.RCast(); +inline SQRESULT(*v_sq_pushroottable)(HSQUIRRELVM v); inline CMemory p_sq_pushbool; -inline auto v_sq_pushbool = p_sq_pushbool.RCast(); +inline void(*v_sq_pushbool)(HSQUIRRELVM v, SQBool b); inline CMemory p_sq_pushstring; -inline auto v_sq_pushstring = p_sq_pushstring.RCast(); +inline void(*v_sq_pushstring)(HSQUIRRELVM v, const SQChar* string, SQInteger len); inline CMemory p_sq_pushinteger; -inline auto v_sq_pushinteger = p_sq_pushinteger.RCast(); +inline void(*v_sq_pushinteger)(HSQUIRRELVM v, SQInteger val); inline CMemory p_sq_newarray; -inline auto v_sq_newarray = p_sq_newarray.RCast(); +inline void(*v_sq_newarray)(HSQUIRRELVM v, SQInteger size); inline CMemory p_sq_newtable; -inline auto v_sq_newtable = p_sq_newtable.RCast(); +inline void(*v_sq_newtable)(HSQUIRRELVM v); inline CMemory p_sq_newslot; -inline auto v_sq_newslot = p_sq_newslot.RCast(); +inline SQRESULT(*v_sq_newslot)(HSQUIRRELVM v, SQInteger idx); inline CMemory p_sq_arrayappend; -inline auto v_sq_arrayappend = p_sq_arrayappend.RCast(); +inline SQRESULT(*v_sq_arrayappend)(HSQUIRRELVM v, SQInteger idx); inline CMemory p_sq_pushstructure; -inline auto v_sq_pushstructure = p_sq_pushstructure.RCast(); +inline SQRESULT(*v_sq_pushstructure)(HSQUIRRELVM v, const SQChar* name, const SQChar* member, const SQChar* codeclass1, const SQChar* codeclass2); inline CMemory p_sq_compilebuffer; -inline auto v_sq_compilebuffer = p_sq_compilebuffer.RCast(); +inline SQRESULT(*v_sq_compilebuffer)(HSQUIRRELVM v, SQBufState* bufferstate, const SQChar* buffer, SQInteger level); inline CMemory p_sq_call; -inline auto v_sq_call = p_sq_call.RCast(); +inline SQRESULT(*v_sq_call)(HSQUIRRELVM v, SQInteger params, SQBool retval, SQBool raiseerror); /////////////////////////////////////////////////////////////////////////////// class VSquirrelAPI : public IDetour diff --git a/r5dev/vscript/languages/squirrel_re/include/sqvm.h b/r5dev/vscript/languages/squirrel_re/include/sqvm.h index 945ed8aa..dc835a12 100644 --- a/r5dev/vscript/languages/squirrel_re/include/sqvm.h +++ b/r5dev/vscript/languages/squirrel_re/include/sqvm.h @@ -66,28 +66,28 @@ struct SQVM /* ==== SQUIRREL ======================================================================================================================================================== */ inline CMemory p_SQVM_PrintFunc; -inline auto v_SQVM_PrintFunc = p_SQVM_PrintFunc.RCast(); +inline SQRESULT(*v_SQVM_PrintFunc)(HSQUIRRELVM v, SQChar* fmt, ...); inline CMemory p_SQVM_WarningFunc; -inline auto v_SQVM_WarningFunc = p_SQVM_WarningFunc.RCast(); +inline SQRESULT(*v_SQVM_WarningFunc)(HSQUIRRELVM v, SQInteger a2, SQInteger a3, SQInteger* nStringSize, SQChar** ppString); inline CMemory p_SQVM_GetErrorLine; -inline auto v_SQVM_GetErrorLine = p_SQVM_GetErrorLine.RCast(); +inline size_t(*v_SQVM_GetErrorLine)(const SQChar* pszFile, SQInteger nLine, SQChar* pszContextBuf, SQInteger nBufLen); inline CMemory p_SQVM_WarningCmd; -inline auto v_SQVM_WarningCmd = p_SQVM_WarningCmd.RCast(); +inline SQRESULT(*v_SQVM_WarningCmd)(HSQUIRRELVM v, SQInteger a2); inline CMemory p_SQVM_CompileError; -inline auto v_SQVM_CompileError = p_SQVM_CompileError.RCast(); +inline void(*v_SQVM_CompileError)(HSQUIRRELVM v, const SQChar* pszError, const SQChar* pszFile, SQUnsignedInteger nLine, SQInteger nColumn); inline CMemory p_SQVM_LogicError; -inline auto v_SQVM_LogicError = p_SQVM_LogicError.RCast(); +inline void(*v_SQVM_LogicError)(SQBool bPrompt); inline CMemory p_SQVM_ScriptError; -inline auto v_SQVM_ScriptError = p_SQVM_ScriptError.RCast(); +inline SQInteger(*v_SQVM_ScriptError)(const SQChar* pszFormat, ...); inline CMemory p_SQVM_RaiseError; -inline auto v_SQVM_RaiseError = p_SQVM_RaiseError.RCast(); +inline SQInteger(*v_SQVM_RaiseError)(HSQUIRRELVM v, const SQChar* pszFormat, ...); SQRESULT SQVM_PrintFunc(HSQUIRRELVM v, SQChar* fmt, ...); SQRESULT SQVM_WarningFunc(HSQUIRRELVM v, SQInteger a2, SQInteger a3, SQInteger* nStringSize, SQChar** ppString); diff --git a/r5dev/vscript/languages/squirrel_re/vsquirrel.h b/r5dev/vscript/languages/squirrel_re/vsquirrel.h index 141119d7..2e6a321d 100644 --- a/r5dev/vscript/languages/squirrel_re/vsquirrel.h +++ b/r5dev/vscript/languages/squirrel_re/vsquirrel.h @@ -47,13 +47,13 @@ inline CMemory p_CSquirrelVM_Init; inline auto v_CSquirrelVM_Init = p_CSquirrelVM_Init.RCast(); inline CMemory p_CSquirrelVM_DestroySignalEntryListHead; -inline auto v_CSquirrelVM_DestroySignalEntryListHead = p_CSquirrelVM_DestroySignalEntryListHead.RCast(); +inline SQBool(*v_CSquirrelVM_DestroySignalEntryListHead)(CSquirrelVM* s, HSQUIRRELVM v, SQFloat f); inline CMemory p_CSquirrelVM_RegisterFunction; -inline auto v_CSquirrelVM_RegisterFunction = p_CSquirrelVM_RegisterFunction.RCast(); +inline SQRESULT(*v_CSquirrelVM_RegisterFunction)(CSquirrelVM* s, ScriptFunctionBinding_t* binding, SQInteger a1); inline CMemory p_CSquirrelVM_RegisterConstant; -inline auto v_CSquirrelVM_RegisterConstant = p_CSquirrelVM_RegisterConstant.RCast(); +inline SQRESULT(*v_CSquirrelVM_RegisterConstant)(CSquirrelVM* s, const SQChar* name, SQInteger value); #ifndef DEDICATED inline CMemory p_CSquirrelVM_PrecompileClientScripts; diff --git a/r5dev/vscript/vscript.h b/r5dev/vscript/vscript.h index f32a702c..ae6428a5 100644 --- a/r5dev/vscript/vscript.h +++ b/r5dev/vscript/vscript.h @@ -14,10 +14,10 @@ class CSquirrelVM; inline CMemory p_Script_LoadScriptList; -inline auto v_Script_LoadScriptList = p_Script_LoadScriptList.RCast(); +inline RSON::Node_t*(*v_Script_LoadScriptList)(const SQChar* rsonfile); inline CMemory p_Script_LoadScriptFile; -inline auto v_Script_LoadScriptFile = p_Script_LoadScriptFile.RCast(); +inline SQBool(*v_Script_LoadScriptFile)(HSQUIRRELVM v, const SQChar* path, const SQChar* name, SQInteger flags); inline CMemory p_Script_ParseScriptList; inline auto v_Script_ParseScriptList = p_Script_ParseScriptList.RCast(); diff --git a/r5dev/windows/id3dx.cpp b/r5dev/windows/id3dx.cpp index d4fe27a0..4f5aa194 100644 --- a/r5dev/windows/id3dx.cpp +++ b/r5dev/windows/id3dx.cpp @@ -161,8 +161,8 @@ HRESULT __stdcall ResizeBuffers(IDXGISwapChain* pSwapChain, UINT nBufferCount, U // Disable stack warning, tells us to move more data to the heap instead. Not really possible with 'initialData' here. Since its parallel processed. // Also disable 6378, complains that there is no control path where it would use 'nullptr', if that happens 'Error' will be called though. #pragma warning( disable : 6262 6387) -inline CMemory p_CreateTextureResource; -inline auto v_CreateTextureResource = p_CreateTextureResource.RCast(); +CMemory p_CreateTextureResource; +void(*v_CreateTextureResource)(TextureHeader_t*, INT_PTR); constexpr uint32_t ALIGNMENT_SIZE = 15; // Creates 2D texture and shader resource from textureHeader and imageData. void CreateTextureResource(TextureHeader_t* textureHeader, INT_PTR imageData) {