#pragma once // used: [d3d] api #include #include // used: chookobject #include "../utilities/detourhook.h" // used: viewmatrix_t #include "../sdk/datatypes/matrix.h" namespace VTABLE { namespace D3D { enum { PRESENT = 8U, RESIZEBUFFERS = 13U, RESIZEBUFFERS_CSTYLE = 39U, }; } namespace DXGI { enum { CREATESWAPCHAIN = 10U, }; } namespace CLIENT { enum { CREATEMOVE = 5U, MOUSEINPUTENABLED = 16U, FRAMESTAGENOTIFY = 36U, }; } namespace INPUTSYSTEM { enum { ISRELATIVEMOUSEMODE = 78U, }; } } class CRenderGameSystem; class IViewRender; class CCSGOInput; class CViewSetup; class CMeshData; namespace H { bool Setup(); void Destroy(); /* @section: handlers */ // d3d11 & wndproc HRESULT WINAPI Present(IDXGISwapChain* pSwapChain, UINT uSyncInterval, UINT uFlags); HRESULT CS_FASTCALL ResizeBuffers(IDXGISwapChain* pSwapChain, std::uint32_t nBufferCount, std::uint32_t nWidth, std::uint32_t nHeight, DXGI_FORMAT newFormat, std::uint32_t nFlags); HRESULT WINAPI CreateSwapChain(IDXGIFactory* pFactory, IUnknown* pDevice, DXGI_SWAP_CHAIN_DESC* pDesc, IDXGISwapChain** ppSwapChain); long CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); // game's functions ViewMatrix_t* CS_FASTCALL GetMatrixForView(CRenderGameSystem* pRenderGameSystem, IViewRender* pViewRender, ViewMatrix_t* pOutWorldToView, ViewMatrix_t* pOutViewToProjection, ViewMatrix_t* pOutWorldToProjection, ViewMatrix_t* pOutWorldToPixels); bool CS_FASTCALL CreateMove(CCSGOInput* pInput, int nSlot, bool bActive); bool CS_FASTCALL MouseInputEnabled(void* pThisptr); void CS_FASTCALL FrameStageNotify(void* rcx, int nFrameStage); __int64* CS_FASTCALL LevelInit(void* pClientModeShared, const char* szNewMap); __int64 CS_FASTCALL LevelShutdown(void* pClientModeShared); void CS_FASTCALL OverrideView(void* pClientModeCSNormal, CViewSetup* pSetup); void CS_FASTCALL DrawObject(void* pAnimatableSceneObjectDesc, void* pDx11, CMeshData* arrMeshDraw, int nDataCount, void* pSceneView, void* pSceneLayer, void* pUnk, void* pUnk2); void* IsRelativeMouseMode(void* pThisptr, bool bActive); /* @section: managers */ inline CBaseHookObject hkPresent = {}; inline CBaseHookObject hkResizeBuffers = {}; inline CBaseHookObject hkCreateSwapChain = {}; inline CBaseHookObject hkWndProc = {}; inline CBaseHookObject hkGetMatrixForView = {}; inline CBaseHookObject hkCreateMove = {}; inline CBaseHookObject hkMouseInputEnabled = {}; inline CBaseHookObject hkIsRelativeMouseMode = {}; inline CBaseHookObject hkFrameStageNotify = {}; inline CBaseHookObject hkLevelInit = {}; inline CBaseHookObject hkLevelShutdown = {}; inline CBaseHookObject hkOverrideView = {}; inline CBaseHookObject hkDrawObject = {}; }