|
102 Patches: Detours to the Rescue
C reference for DttR maintainers and modders.
|
#include <d3d.h>#include <ddraw.h>#include <stdbool.h>#include <stddef.h>#include <stdint.h>#include <windows.h>Go to the source code of this file.
Data Structures | |
| struct | DTTR_Graphics_COM_Direct3DDevice7_VT |
| struct | DTTR_Graphics_COM_Direct3DDevice7 |
| struct | DTTR_Graphics_COM_DirectDraw7_VT |
| struct | DTTR_Graphics_COM_DirectDraw7 |
| struct | DTTR_Graphics_COM_Direct3D7_VT |
| struct | DTTR_Graphics_COM_Direct3D7 |
| struct | DTTR_Graphics_COM_Direct3DTexture2_VT |
| struct | DTTR_Graphics_COM_Direct3DTexture2 |
| struct | DTTR_Graphics_COM_DirectDrawSurface7_VT |
| struct | DTTR_Graphics_COM_DirectDrawSurface7 |
Typedefs | |
| typedef struct DTTR_Graphics_COM_Direct3D7 | DTTR_Graphics_COM_Direct3D7 |
| typedef struct DTTR_Graphics_COM_Direct3DDevice7 | DTTR_Graphics_COM_Direct3DDevice7 |
| typedef struct DTTR_Graphics_COM_DirectDraw7 | DTTR_Graphics_COM_DirectDraw7 |
| typedef struct DTTR_Graphics_COM_Direct3DDevice7_VT | DTTR_Graphics_COM_Direct3DDevice7_VT |
| typedef struct DTTR_Graphics_COM_DirectDraw7_VT | DTTR_Graphics_COM_DirectDraw7_VT |
| typedef struct DTTR_Graphics_COM_Direct3D7_VT | DTTR_Graphics_COM_Direct3D7_VT |
| typedef struct DTTR_Graphics_COM_DirectDrawSurface7 | DTTR_Graphics_COM_DirectDrawSurface7 |
| typedef struct DTTR_Graphics_COM_Direct3DTexture2 | DTTR_Graphics_COM_Direct3DTexture2 |
| typedef struct DTTR_Graphics_COM_Direct3DTexture2_VT | DTTR_Graphics_COM_Direct3DTexture2_VT |
| typedef struct DTTR_Graphics_COM_DirectDrawSurface7_VT | DTTR_Graphics_COM_DirectDrawSurface7_VT |
Functions | |
| DTTR_Graphics_COM_DirectDraw7 * | dttr_graphics_com_create_directdraw7 () |
| DTTR_Graphics_COM_Direct3D7 * | dttr_graphics_com_create_direct3d7 () |
| DTTR_Graphics_COM_Direct3DDevice7 * | dttr_graphics_com_create_direct3ddevice7 () |
| DTTR_Graphics_COM_DirectDrawSurface7 * | dttr_graphics_com_create_directdrawsurface7 (uint32_t width, uint32_t height, uint32_t bpp, uint32_t r_mask, uint32_t g_mask, uint32_t b_mask, uint32_t a_mask) |
| HRESULT | dttr_graphics_com_validate_directdrawsurface7 (uint32_t width, uint32_t height, uint32_t bpp, uint32_t *out_pitch, size_t *out_pixel_size) |
| DTTR_Graphics_COM_Direct3DTexture2 * | dttr_graphics_com_create_direct3d_texture2 (DTTR_Graphics_COM_DirectDrawSurface7 *surface) |
| #define DTTR_COM_ADDREF | ( | fn, | |
| type ) |
Definition at line 69 of file graphics_com_private.h.
| #define DTTR_COM_NOOP_HRESULT | ( | fn, | |
| ... ) |
Definition at line 64 of file graphics_com_private.h.
Referenced by DTTR_COM_NOOP_HRESULT(), DTTR_COM_NOOP_HRESULT(), DTTR_COM_NOOP_HRESULT(), DTTR_COM_NOOP_HRESULT(), DTTR_COM_NOOP_HRESULT(), DTTR_COM_NOOP_HRESULT(), DTTR_COM_NOOP_HRESULT(), DTTR_COM_NOOP_HRESULT(), DTTR_COM_NOOP_HRESULT(), DTTR_COM_NOOP_HRESULT(), DTTR_COM_NOOP_HRESULT(), DTTR_COM_NOOP_HRESULT(), DTTR_COM_NOOP_HRESULT(), DTTR_COM_NOOP_HRESULT(), DTTR_COM_NOOP_HRESULT(), DTTR_COM_NOOP_HRESULT(), DTTR_COM_NOOP_HRESULT(), DTTR_COM_STUB_MEMSET(), DTTR_COM_STUB_SET(), DTTR_COM_STUB_SET(), DTTR_COM_STUB_SET(), and DTTR_COM_STUB_SET().
| #define DTTR_COM_QI_SELF | ( | fn, | |
| type ) |
| #define DTTR_COM_RELEASE | ( | fn, | |
| type ) |
Definition at line 74 of file graphics_com_private.h.
| #define DTTR_COM_STUB_MEMSET | ( | fn, | |
| size, | |||
| buf_type, | |||
| ... ) |
Definition at line 93 of file graphics_com_private.h.
Referenced by DTTR_COM_NOOP_HRESULT(), DTTR_COM_NOOP_HRESULT(), DTTR_COM_STUB_MEMSET(), and DTTR_COM_STUB_MEMSET().
| #define DTTR_COM_STUB_SET | ( | fn, | |
| out_type, | |||
| val, | |||
| ... ) |
Definition at line 86 of file graphics_com_private.h.
Referenced by DTTR_COM_NOOP_HRESULT(), DTTR_COM_NOOP_HRESULT(), DTTR_COM_NOOP_HRESULT(), DTTR_COM_NOOP_HRESULT(), DTTR_COM_NOOP_HRESULT(), DTTR_COM_STUB_SET(), DTTR_COM_STUB_SET(), DTTR_COM_STUB_SET(), DTTR_COM_STUB_SET(), DTTR_COM_STUB_SET(), DTTR_COM_STUB_SET(), DTTR_COM_STUB_SET(), and DTTR_COM_STUB_SET().
| #define DTTR_D3DFVF_DIFFUSE 0x040 |
Definition at line 48 of file graphics_com_private.h.
| #define DTTR_D3DFVF_LASTBETA_D3DCOLOR 0x8000 |
Definition at line 53 of file graphics_com_private.h.
Referenced by if().
| #define DTTR_D3DFVF_LASTBETA_UBYTE4 0x1000 |
Definition at line 52 of file graphics_com_private.h.
Referenced by if().
| #define DTTR_D3DFVF_NORMAL 0x010 |
Definition at line 46 of file graphics_com_private.h.
| #define DTTR_D3DFVF_POSITION_MASK 0x400E |
Definition at line 35 of file graphics_com_private.h.
| #define DTTR_D3DFVF_PSIZE 0x020 |
Definition at line 47 of file graphics_com_private.h.
| #define DTTR_D3DFVF_SPECULAR 0x080 |
Definition at line 49 of file graphics_com_private.h.
| #define DTTR_D3DFVF_TEXCOUNT_MASK 0xF00 |
Definition at line 50 of file graphics_com_private.h.
| #define DTTR_D3DFVF_TEXCOUNT_SHIFT 8 |
Definition at line 51 of file graphics_com_private.h.
| #define DTTR_D3DFVF_XYZ 0x0002 |
Definition at line 37 of file graphics_com_private.h.
| #define DTTR_D3DFVF_XYZB1 0x0006 |
Definition at line 39 of file graphics_com_private.h.
| #define DTTR_D3DFVF_XYZB2 0x0008 |
Definition at line 40 of file graphics_com_private.h.
Referenced by switch().
| #define DTTR_D3DFVF_XYZB3 0x000A |
Definition at line 41 of file graphics_com_private.h.
Referenced by switch().
| #define DTTR_D3DFVF_XYZB4 0x000C |
Definition at line 42 of file graphics_com_private.h.
Referenced by switch().
| #define DTTR_D3DFVF_XYZB5 0x000E |
Definition at line 43 of file graphics_com_private.h.
| #define DTTR_D3DFVF_XYZRHW 0x0004 |
Definition at line 38 of file graphics_com_private.h.
Referenced by switch().
| #define DTTR_D3DFVF_XYZW 0x4002 |
Definition at line 44 of file graphics_com_private.h.
Referenced by switch().
| #define DTTR_D3DPT_LINELIST 2 |
Definition at line 58 of file graphics_com_private.h.
Referenced by d3d_device7_map_primitive_type().
| #define DTTR_D3DPT_LINESTRIP 3 |
Definition at line 59 of file graphics_com_private.h.
Referenced by d3d_device7_map_primitive_type().
| #define DTTR_D3DPT_POINTLIST 1 |
Definition at line 57 of file graphics_com_private.h.
Referenced by d3d_device7_map_primitive_type().
| #define DTTR_D3DPT_TRIANGLEFAN 6 |
Definition at line 62 of file graphics_com_private.h.
Referenced by d3d_device7_map_primitive_type().
| #define DTTR_D3DPT_TRIANGLELIST 4 |
Definition at line 60 of file graphics_com_private.h.
Referenced by d3d_device7_map_primitive_type().
| #define DTTR_D3DPT_TRIANGLESTRIP 5 |
Definition at line 61 of file graphics_com_private.h.
Referenced by d3d_device7_map_primitive_type().
| #define DTTR_DDBD_16 0x00000400 |
Definition at line 26 of file graphics_com_private.h.
Referenced by d3d7_enum_devices().
| #define DTTR_DDBD_32 0x00000200 |
Definition at line 27 of file graphics_com_private.h.
Referenced by d3d7_enum_devices().
| #define DTTR_DDERR_GENERIC 0x887601C2 |
Definition at line 30 of file graphics_com_private.h.
| #define DTTR_SIZEOF_D3DCLIPSTATUS 8 |
Definition at line 17 of file graphics_com_private.h.
Referenced by DTTR_COM_STUB_MEMSET().
| #define DTTR_SIZEOF_D3DDEVICEDESC7 224 |
Definition at line 14 of file graphics_com_private.h.
Referenced by DTTR_COM_STUB_MEMSET().
| #define DTTR_SIZEOF_D3DLIGHT7 104 |
Definition at line 16 of file graphics_com_private.h.
| #define DTTR_SIZEOF_D3DMATERIAL7 76 |
Definition at line 15 of file graphics_com_private.h.
| #define DTTR_SIZEOF_DDDEVICEIDENTIFIER2 1084 |
Definition at line 22 of file graphics_com_private.h.
| #define DTTR_SIZEOF_DDPIXELFORMAT 32 |
Definition at line 18 of file graphics_com_private.h.
| #define DTTR_SIZEOF_DDSCAPS2 16 |
Definition at line 19 of file graphics_com_private.h.
| #define DTTR_SIZEOF_DDSURFACEDESC 108 |
Definition at line 20 of file graphics_com_private.h.
Referenced by ddrawsurface7_getsurfacedesc(), and if().
| #define DTTR_SIZEOF_DDSURFACEDESC2 124 |
Definition at line 21 of file graphics_com_private.h.
Referenced by ddrawsurface7_getsurfacedesc(), and if().
| typedef struct DTTR_Graphics_COM_Direct3D7 DTTR_Graphics_COM_Direct3D7 |
Definition at line 100 of file graphics_com_private.h.
| typedef struct DTTR_Graphics_COM_Direct3D7_VT DTTR_Graphics_COM_Direct3D7_VT |
| typedef struct DTTR_Graphics_COM_Direct3DDevice7 DTTR_Graphics_COM_Direct3DDevice7 |
Definition at line 101 of file graphics_com_private.h.
| typedef struct DTTR_Graphics_COM_Direct3DDevice7_VT DTTR_Graphics_COM_Direct3DDevice7_VT |
| typedef struct DTTR_Graphics_COM_Direct3DTexture2 DTTR_Graphics_COM_Direct3DTexture2 |
Definition at line 537 of file graphics_com_private.h.
| typedef struct DTTR_Graphics_COM_Direct3DTexture2_VT DTTR_Graphics_COM_Direct3DTexture2_VT |
| typedef struct DTTR_Graphics_COM_DirectDraw7 DTTR_Graphics_COM_DirectDraw7 |
Definition at line 102 of file graphics_com_private.h.
| typedef struct DTTR_Graphics_COM_DirectDraw7_VT DTTR_Graphics_COM_DirectDraw7_VT |
| typedef struct DTTR_Graphics_COM_DirectDrawSurface7 DTTR_Graphics_COM_DirectDrawSurface7 |
Definition at line 536 of file graphics_com_private.h.
| typedef struct DTTR_Graphics_COM_DirectDrawSurface7_VT DTTR_Graphics_COM_DirectDrawSurface7_VT |
| DTTR_Graphics_COM_Direct3D7 * dttr_graphics_com_create_direct3d7 | ( | ) |
Definition at line 154 of file com_direct3d7.c.
References DTTR_Graphics_COM_Direct3D7::vtbl, and vtbl.
Referenced by ddraw7_get_direct3d().
| DTTR_Graphics_COM_Direct3DTexture2 * dttr_graphics_com_create_direct3d_texture2 | ( | DTTR_Graphics_COM_DirectDrawSurface7 * | surface | ) |
Definition at line 49 of file com_direct3dtexture2.c.
References DTTR_Graphics_COM_Direct3DTexture2::surface, surface, DTTR_Graphics_COM_Direct3DTexture2::vtbl, and vtbl.
Referenced by ddrawsurface7_queryinterface(), and dttr_graphics_com_create_directdrawsurface7().
| DTTR_Graphics_COM_Direct3DDevice7 * dttr_graphics_com_create_direct3ddevice7 | ( | ) |
Definition at line 1222 of file com_direct3ddevice7.c.
References DTTR_Graphics_COM_Direct3DDevice7::vtbl, and vtbl.
Referenced by d3d7_get_device().
| DTTR_Graphics_COM_DirectDraw7 * dttr_graphics_com_create_directdraw7 | ( | ) |
Definition at line 356 of file com_directdraw7.c.
References DTTR_LOG_DEBUG, DTTR_Graphics_COM_DirectDraw7_VT::QueryInterface, DTTR_Graphics_COM_DirectDraw7::vtbl, and vtbl.
Referenced by get_or_create_ddraw7().
| DTTR_Graphics_COM_DirectDrawSurface7 * dttr_graphics_com_create_directdrawsurface7 | ( | uint32_t | width, |
| uint32_t | height, | ||
| uint32_t | bpp, | ||
| uint32_t | r_mask, | ||
| uint32_t | g_mask, | ||
| uint32_t | b_mask, | ||
| uint32_t | a_mask ) |
Definition at line 1453 of file com_directdrawsurface7.c.
References DTTR_Graphics_COM_DirectDrawSurface7::a_mask, DTTR_Graphics_COM_DirectDrawSurface7::b_mask, bpp, DTTR_Graphics_COM_DirectDrawSurface7::bpp, dttr_graphics_com_create_direct3d_texture2(), dttr_graphics_com_validate_directdrawsurface7(), free, DTTR_Graphics_COM_DirectDrawSurface7::g_mask, DTTR_Graphics_COM_DirectDrawSurface7::height, NULL, DTTR_Graphics_COM_DirectDrawSurface7::pitch, DTTR_Graphics_COM_DirectDrawSurface7::pixels, DTTR_Graphics_COM_DirectDrawSurface7::r_mask, DTTR_Graphics_COM_DirectDrawSurface7::refcount, S_OK, DTTR_Graphics_COM_DirectDrawSurface7::texture, DTTR_Graphics_COM_DirectDrawSurface7::vtbl, vtbl, and DTTR_Graphics_COM_DirectDrawSurface7::width.
Referenced by ddraw7_createsurface(), and ddrawsurface7_getattachedsurface().
| HRESULT dttr_graphics_com_validate_directdrawsurface7 | ( | uint32_t | width, |
| uint32_t | height, | ||
| uint32_t | bpp, | ||
| uint32_t * | out_pitch, | ||
| size_t * | out_pixel_size ) |
Definition at line 65 of file com_directdrawsurface7.c.
References bpp, NULL, S_OK, and surface_bgra_upload_size().
Referenced by ddraw7_createsurface(), and dttr_graphics_com_create_directdrawsurface7().