2022-10-23 01:20:49 +02:00
|
|
|
#pragma once
|
2022-08-09 17:18:07 +02:00
|
|
|
#include "public/ivrenderview.h"
|
2022-04-29 20:12:54 +02:00
|
|
|
|
2023-12-25 19:36:59 +01:00
|
|
|
inline void*(*V_DrawDepthOfField)(const float scalar);
|
2023-07-02 23:01:29 +02:00
|
|
|
inline void*(*V_DrawWorldMeshes)(void* baseEntity, void* renderContext, DrawWorldLists_t worldLists);
|
|
|
|
inline void*(*V_DrawWorldMeshesDepthOnly)(void* renderContext, DrawWorldLists_t worldLists);
|
|
|
|
inline void*(*V_DrawWorldMeshesDepthAtTheEnd)(void* ptr1, void* ptr2, void* ptr3, DrawWorldLists_t worldLists);
|
2022-04-29 20:12:54 +02:00
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
2022-05-13 14:53:25 +02:00
|
|
|
class VGL_RSurf : public IDetour
|
2022-04-29 20:12:54 +02:00
|
|
|
{
|
|
|
|
virtual void GetAdr(void) const
|
|
|
|
{
|
2024-01-02 15:21:36 +01:00
|
|
|
LogFunAdr("R_DrawDepthOfField", V_DrawDepthOfField);
|
|
|
|
LogFunAdr("R_DrawWorldMeshes", V_DrawWorldMeshes);
|
|
|
|
LogFunAdr("R_DrawWorldMeshesDepthOnly", V_DrawWorldMeshesDepthOnly);
|
|
|
|
LogFunAdr("R_DrawWorldMeshesDepthAtTheEnd", V_DrawWorldMeshesDepthAtTheEnd);
|
2022-04-29 20:12:54 +02:00
|
|
|
}
|
|
|
|
virtual void GetFun(void) const
|
|
|
|
{
|
2024-01-02 15:21:36 +01:00
|
|
|
g_GameDll.FindPatternSIMD("48 83 EC 48 0F 28 E8").GetPtr(V_DrawDepthOfField);
|
|
|
|
g_GameDll.FindPatternSIMD("48 8B C4 48 89 48 08 53 57 41 55").GetPtr(V_DrawWorldMeshes);
|
|
|
|
g_GameDll.FindPatternSIMD("40 56 57 B8 ?? ?? ?? ??").GetPtr(V_DrawWorldMeshesDepthOnly);
|
|
|
|
g_GameDll.FindPatternSIMD("48 89 5C 24 ?? 48 89 74 24 ?? 57 48 83 EC 20 48 8B 0D ?? ?? ?? ?? 41 8B F9").GetPtr(V_DrawWorldMeshesDepthAtTheEnd);
|
2022-04-29 20:12:54 +02:00
|
|
|
}
|
|
|
|
virtual void GetVar(void) const { }
|
|
|
|
virtual void GetCon(void) const { }
|
2023-11-26 13:21:20 +01:00
|
|
|
virtual void Detour(const bool bAttach) const;
|
2022-04-29 20:12:54 +02:00
|
|
|
};
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|