summaryrefslogtreecommitdiff
path: root/dwm/dxhk.h
blob: cd37c494264951ce5fc6771070e4f9fcc5fd2b12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#pragma once
#include "grender.h"

struct HOOK_DATA {
  U64 multiplane_o;
  U64 present_o;
  U64 wndproc_o;
};

U64 __fastcall hk_multiplane_draw( 
  void* dxdev, 
  IDXGISwapChain* swpchain, 
  U32 a3, 
  U32 a4, 
  U32 a5, 
  U64 a6, 
  U64 a7, 
  U32 a8 
);

// 10 args is so microsoft
U64 __fastcall hk_present( 
  void* dxdev, 
  IDXGISwapChain* swpchain, 
  U32 a3, 
  U32 a4, 
  const RECT* rect, 
  U64 a6, 
  void* a7, 
  U32 a8, 
  void* rsrc, 
  U32 a10 
);

U64 __stdcall hk_wndproc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam );

extern HOOK_DATA* hk;
extern D3D11_RENDERDATA* dx11;

HOOK_DATA* dxhk_init();
void dxhk_destroy( HOOK_DATA* data );