102 Patches: Detours to the Rescue
C reference for DttR maintainers and modders.
Loading...
Searching...
No Matches
com_direct3ddevice7.c File Reference
#include "graphics_com_private.h"
#include "graphics_private.h"
#include <dttr_config.h>
#include <dttr_log.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Macros

#define MAX_VERTICES   4096
#define DTTR_MAT4_ELEMS   16
#define DTTR_MAT4_BYTES   (sizeof(float) * DTTR_MAT4_ELEMS)

Functions

static void d3d_device7_mat4_multiply_f (float *restrict out, const float *restrict a, const float *restrict b)
 Multiplies two row-major 4x4 float matrices into out.
static bool d3d_device7_get_transform_state (DWORD type, float **out_matrix_f)
 Selects the backend transform matrix for a D3D transform state token.
static const char * d3d_device7_transform_label (DWORD type)
static void d3d_device7_set_transform_state (DWORD type, const float *m)
static uint32_t d3d_device7_expand_strip (const DTTR_Vertex *restrict in, uint32_t count, DTTR_Vertex *restrict out)
 Expands a triangle strip into a triangle list.
static uint32_t d3d_device7_expand_fan (const DTTR_Vertex *restrict in, uint32_t count, DTTR_Vertex *restrict out)
 Expands a triangle fan into a triangle list.
static DTTR_PrimitiveType d3d_device7_map_primitive_type (DWORD prim_type)
 Maps a D3D primitive code to the internal primitive enum.
static void d3d_device7_record_clear (uint32_t flags, uint32_t color, float depth, uint32_t stencil)
 Appends a clear record to the current frame batch.
static DTTR_PrimitiveType d3d_device7_uploaded_primitive_type (DTTR_PrimitiveType type)
static uint32_t d3d_device7_expanded_primitive_count (DTTR_PrimitiveType type, uint32_t count)
static void d3d_device7_copy_or_expand_primitive (DTTR_PrimitiveType *type, const DTTR_Vertex *verts, uint32_t count, DTTR_Vertex *out)
static void d3d_device7_record_draw (DTTR_PrimitiveType type, const DTTR_Vertex *verts, uint32_t count, bool transformed, bool textured)
 Appends a draw record to the current frame batch.
static void d3d_device7_clear_bound_texture (DTTR_BackendState *state)
static void d3d_device7_texture_bind (DTTR_Texture tex)
 Binds an internal texture handle for subsequent draw records.
static void d3d_device7_set_blend_func (DTTR_BlendFactor src, DTTR_BlendFactor dst)
 Sets source and destination blend factors.
static void d3d_device7_set_texture_address_u (DTTR_TextureAddress addr)
 Sets texture addressing mode for U coordinates.
static void d3d_device7_set_texture_address_v (DTTR_TextureAddress addr)
 Sets texture addressing mode for V coordinates.
static void d3d_device7_set_viewport (int x, int y, int w, int h, float min_z, float max_z)
 Updates the viewport state used by transformed rendering paths.
 DTTR_COM_STUB_MEMSET (d3ddevice7_getcaps, DTTR_SIZEOF_D3DDEVICEDESC7, void, DTTR_Graphics_COM_Direct3DDevice7 *self) static HRESULT d3ddevice7_enumtextureformats(DTTR_Graphics_COM_Direct3DDevice7 *self
 if (hr !=1)
 DTTR_COM_STUB_SET (d3ddevice7_getdirect3d, void *, NULL, DTTR_Graphics_COM_Direct3DDevice7 *self) DTTR_COM_NOOP_HRESULT(d3ddevice7_setrendertarget
DTTR_Graphics_COM_Direct3DDevice7 void DWORD flags DTTR_COM_STUB_SET (d3ddevice7_getrendertarget, void *, NULL, DTTR_Graphics_COM_Direct3DDevice7 *self) static HRESULT d3ddevice7_clear(DTTR_Graphics_COM_Direct3DDevice7 *self
 if (flags &D3DCLEAR_TARGET) f| = DTTR_CLEAR_DEPTH
 d3d_device7_record_clear (f, color, z, stencil)
static HRESULT d3ddevice7_settransform (DTTR_Graphics_COM_Direct3DDevice7 *self, DWORD type, void *matrix)
static HRESULT d3ddevice7_gettransform (DTTR_Graphics_COM_Direct3DDevice7 *self, DWORD type, void *matrix)
static HRESULT d3ddevice7_setviewport (DTTR_Graphics_COM_Direct3DDevice7 *self, void *vp)
static HRESULT d3ddevice7_multiplytransform (DTTR_Graphics_COM_Direct3DDevice7 *self, DWORD type, void *matrix)
static HRESULT d3ddevice7_getviewport (DTTR_Graphics_COM_Direct3DDevice7 *self, void *vp)
 DTTR_COM_NOOP_HRESULT (d3ddevice7_setmaterial, DTTR_Graphics_COM_Direct3DDevice7 *self, void *mat) DTTR_COM_STUB_MEMSET(d3ddevice7_getmaterial
DTTR_Graphics_COM_Direct3DDevice7 *self DTTR_COM_NOOP_HRESULT (d3ddevice7_setlight, DTTR_Graphics_COM_Direct3DDevice7 *self, DWORD idx, void *light) DTTR_COM_STUB_MEMSET(d3ddevice7_getlight
DTTR_Graphics_COM_Direct3DDevice7 *self DTTR_Graphics_COM_Direct3DDevice7 DWORD static idx HRESULT d3ddevice7_setrenderstate (DTTR_Graphics_COM_Direct3DDevice7 *self, DWORD state, DWORD value)
 DTTR_COM_STUB_SET (d3ddevice7_getrenderstate, DWORD, 0, DTTR_Graphics_COM_Direct3DDevice7 *self, DWORD state) DTTR_COM_STUB_SET(d3ddevice7_endstateblock
DTTR_Graphics_COM_Direct3DDevice7 *self DTTR_COM_NOOP_HRESULT (d3ddevice7_preload, DTTR_Graphics_COM_Direct3DDevice7 *self, void *tex) static HRESULT d3ddevice7_drawprimitive(DTTR_Graphics_COM_Direct3DDevice7 *self
 switch (pos_type)
 if ((pos_type >=DTTR_D3DFVF_XYZB1 &&pos_type<=DTTR_D3DFVF_XYZB5) &&((fvf &DTTR_D3DFVF_LASTBETA_UBYTE4) !=0||(fvf &DTTR_D3DFVF_LASTBETA_D3DCOLOR) !=0) &&pos_bytes >=sizeof(float))
 for (int t=0;t< tex_count;t++)
 if (stride< min_stride)
 if (has_rhw)
 d3d_device7_record_draw (type, d3d_device7_verts, count, has_rhw, has_tex)
 DTTR_COM_NOOP_HRESULT (d3ddevice7_drawindexedprimitive, DTTR_Graphics_COM_Direct3DDevice7 *self, DWORD prim, DWORD fvf, void *v, DWORD vn, WORD *indices, DWORD in, DWORD flags) DTTR_COM_NOOP_HRESULT(d3ddevice7_setclipstatus
DTTR_Graphics_COM_Direct3DDevice7 void *status DTTR_COM_STUB_MEMSET (d3ddevice7_getclipstatus, DTTR_SIZEOF_D3DCLIPSTATUS, void, DTTR_Graphics_COM_Direct3DDevice7 *self) DTTR_COM_NOOP_HRESULT(d3ddevice7_drawprimitivestrided
DTTR_Graphics_COM_Direct3DDevice7 void *status DTTR_Graphics_COM_Direct3DDevice7 DWORD DWORD void DWORD DWORD f DTTR_COM_NOOP_HRESULT (d3ddevice7_drawindexedprimitivestrided, DTTR_Graphics_COM_Direct3DDevice7 *self, DWORD prim, DWORD fvf, void *d, DWORD vn, WORD *i, DWORD in, DWORD f) DTTR_COM_NOOP_HRESULT(d3ddevice7_drawprimitivevb
DTTR_Graphics_COM_Direct3DDevice7 void *status DTTR_Graphics_COM_Direct3DDevice7 DWORD DWORD void DWORD DWORD f DTTR_Graphics_COM_Direct3DDevice7 DWORD void DWORD DWORD DWORD f DTTR_COM_NOOP_HRESULT (d3ddevice7_drawindexedprimitivevb, DTTR_Graphics_COM_Direct3DDevice7 *self, DWORD prim, void *vb, DWORD st, DWORD vn, WORD *i, DWORD in, DWORD f) DTTR_COM_STUB_SET(d3ddevice7_computespherevisibility
DTTR_Graphics_COM_Direct3DDevice7 void *status DTTR_Graphics_COM_Direct3DDevice7 DWORD DWORD void DWORD DWORD f DTTR_Graphics_COM_Direct3DDevice7 DWORD void DWORD DWORD DWORD f DTTR_Graphics_COM_Direct3DDevice7 void float DWORD DWORD f DTTR_COM_STUB_SET (d3ddevice7_gettexture, void *, NULL, DTTR_Graphics_COM_Direct3DDevice7 *self, DWORD stage) static HRESULT d3ddevice7_settexture(DTTR_Graphics_COM_Direct3DDevice7 *self
 d3d_device7_texture_bind (surf->dttr_texture)
static HRESULT d3ddevice7_gettexturestagestate (DTTR_Graphics_COM_Direct3DDevice7 *self, DWORD stage, DWORD type, DWORD *out)
static HRESULT d3ddevice7_settexturestagestate (DTTR_Graphics_COM_Direct3DDevice7 *self, DWORD stage, DWORD type, DWORD value)
 DTTR_COM_STUB_SET (d3ddevice7_validatedevice, DWORD, 1, DTTR_Graphics_COM_Direct3DDevice7 *self) DTTR_COM_NOOP_HRESULT(d3ddevice7_applystateblock
DTTR_Graphics_COM_Direct3DDevice7 DWORD block DTTR_COM_NOOP_HRESULT (d3ddevice7_capturestateblock, DTTR_Graphics_COM_Direct3DDevice7 *self, DWORD block) DTTR_COM_NOOP_HRESULT(d3ddevice7_deletestateblock
DTTR_Graphics_COM_Direct3DDevice7 DWORD block DTTR_Graphics_COM_Direct3DDevice7 DWORD block DTTR_COM_STUB_SET (d3ddevice7_createstateblock, DWORD, 1, DTTR_Graphics_COM_Direct3DDevice7 *self, DWORD t) DTTR_COM_NOOP_HRESULT(d3ddevice7_load
DTTR_Graphics_COM_Direct3DDevice7 DWORD block DTTR_Graphics_COM_Direct3DDevice7 DWORD block DTTR_Graphics_COM_Direct3DDevice7 void void void void DWORD f DTTR_COM_NOOP_HRESULT (d3ddevice7_lightenable, DTTR_Graphics_COM_Direct3DDevice7 *self, DWORD idx, BOOL enable) DTTR_COM_STUB_SET(d3ddevice7_getlightenable
DTTR_Graphics_COM_Direct3DDevice7 DWORD block DTTR_Graphics_COM_Direct3DDevice7 DWORD block DTTR_Graphics_COM_Direct3DDevice7 void void void void DWORD f DTTR_Graphics_COM_Direct3DDevice7 DWORD idx DTTR_COM_NOOP_HRESULT (d3ddevice7_setclipplane, DTTR_Graphics_COM_Direct3DDevice7 *self, DWORD idx, float *plane) DTTR_COM_STUB_MEMSET(d3ddevice7_getclipplane
DTTR_Graphics_COM_Direct3DDevice7 DWORD block DTTR_Graphics_COM_Direct3DDevice7 DWORD block DTTR_Graphics_COM_Direct3DDevice7 void void void void DWORD f DTTR_Graphics_COM_Direct3DDevice7 DWORD idx DTTR_Graphics_COM_Direct3DDevice7 DWORD static idx HRESULT d3ddevice7_getinfo (DTTR_Graphics_COM_Direct3DDevice7 *self, DWORD id, void *info, DWORD sz)
DTTR_Graphics_COM_Direct3DDevice7dttr_graphics_com_create_direct3ddevice7 ()

Variables

static DTTR_Vertex d3d_device7_verts [MAX_VERTICES]
voidcb
void voidctx
DDPIXELFORMAT fmt_argb4444
HRESULT hr = callback(&fmt_argb4444, ctx)
DDPIXELFORMAT fmt_rgb565
return S_OK
DTTR_Graphics_COM_Direct3DDevice7self
DTTR_Graphics_COM_Direct3DDevice7 voidsurface
DTTR_Graphics_COM_Direct3DDevice7 void DWORD flags DWORD count
DTTR_Graphics_COM_Direct3DDevice7 void DWORD flags DWORD voidrects
DTTR_Graphics_COM_Direct3DDevice7 void DWORD flags DWORD void DWORD flags
DTTR_Graphics_COM_Direct3DDevice7 void DWORD flags DWORD void DWORD DWORD color
DTTR_Graphics_COM_Direct3DDevice7 void DWORD flags DWORD void DWORD DWORD float z
DTTR_Graphics_COM_Direct3DDevice7 void DWORD flags DWORD void DWORD DWORD float DWORD stencil
 DTTR_SIZEOF_D3DMATERIAL7
 void
DTTR_Graphics_COM_Direct3DDevice7 *self DTTR_SIZEOF_D3DLIGHT7
 DWORD
DTTR_Graphics_COM_Direct3DDevice7 *self DWORD prim_type
DTTR_Graphics_COM_Direct3DDevice7 *self DWORD DWORD fvf
DTTR_Graphics_COM_Direct3DDevice7 *self DWORD DWORD voidvertices
const bool has_rhw = (pos_type == DTTR_D3DFVF_XYZRHW)
const bool has_xyzw = (pos_type == DTTR_D3DFVF_XYZW)
const bool has_normal = (!has_rhw && !has_xyzw) && ((fvf & DTTR_D3DFVF_NORMAL) != 0)
const bool has_psize = (!has_rhw && !has_xyzw) && ((fvf & DTTR_D3DFVF_PSIZE) != 0)
const bool has_diffuse = (fvf & DTTR_D3DFVF_DIFFUSE) != 0
const bool has_specular = (fvf & DTTR_D3DFVF_SPECULAR) != 0
const int tex_count = (int)((fvf >> DTTR_D3DFVF_TEXCOUNT_SHIFT) & 0xF)
const bool has_tex = tex_count > 0
const uint8_t * src = (const uint8_t *)vertices
const DTTR_BackendStatestate = &dttr_backend
const float logical_w = (float)state->logical_width
const float logical_h = (float)state->logical_height
const float vp_x = (float)state->viewport_x
const float vp_y = (float)state->viewport_y
const float vp_w = (float)((state->viewport_w > 0) ? state->viewport_w : 1)
const float vp_h = (float)((state->viewport_h > 0) ? state->viewport_h : 1)
const float vp_min_z = state->viewport_min_z
const float vp_max_z = state->viewport_max_z
const float vp_z_span = vp_max_z - vp_min_z
size_t pos_bytes = 3 * sizeof(float)
const size_t normal_bytes = has_normal ? (3 * sizeof(float)) : 0
const size_t psize_bytes = has_psize ? sizeof(float) : 0
const size_t diffuse_off = pos_bytes + normal_bytes + psize_bytes
const size_t diffuse_bytes = has_diffuse ? sizeof(DWORD) : 0
const size_t specular_off = diffuse_off + diffuse_bytes
const size_t specular_bytes = has_specular ? sizeof(DWORD) : 0
const size_t tex_off = specular_off + specular_bytes
size_t stride = tex_off
const size_t min_stride = has_rhw ? (4 * sizeof(float)) : (3 * sizeof(float))
const DTTR_PrimitiveType type = d3d_device7_map_primitive_type(prim_type)
DTTR_Graphics_COM_Direct3DDevice7 void *status DTTR_Graphics_COM_Direct3DDevice7 DWORD prim
DTTR_Graphics_COM_Direct3DDevice7 void *status DTTR_Graphics_COM_Direct3DDevice7 DWORD DWORD voidd
DTTR_Graphics_COM_Direct3DDevice7 void *status DTTR_Graphics_COM_Direct3DDevice7 DWORD DWORD void DWORD n
DTTR_Graphics_COM_Direct3DDevice7 void *status DTTR_Graphics_COM_Direct3DDevice7 DWORD DWORD void DWORD DWORD f DTTR_Graphics_COM_Direct3DDevice7 DWORD voidvb
DTTR_Graphics_COM_Direct3DDevice7 void *status DTTR_Graphics_COM_Direct3DDevice7 DWORD DWORD void DWORD DWORD f DTTR_Graphics_COM_Direct3DDevice7 DWORD void DWORD st
DTTR_Graphics_COM_Direct3DDevice7 void *status DTTR_Graphics_COM_Direct3DDevice7 DWORD DWORD void DWORD DWORD f DTTR_Graphics_COM_Direct3DDevice7 DWORD void DWORD DWORD DWORD f DTTR_Graphics_COM_Direct3DDevice7 voidc
DTTR_Graphics_COM_Direct3DDevice7 void *status DTTR_Graphics_COM_Direct3DDevice7 DWORD DWORD void DWORD DWORD f DTTR_Graphics_COM_Direct3DDevice7 DWORD void DWORD DWORD DWORD f DTTR_Graphics_COM_Direct3DDevice7 void floatr
DTTR_Graphics_COM_Direct3DDevice7 void *status DTTR_Graphics_COM_Direct3DDevice7 DWORD DWORD void DWORD DWORD f DTTR_Graphics_COM_Direct3DDevice7 DWORD void DWORD DWORD DWORD f DTTR_Graphics_COM_Direct3DDevice7 void float DWORD DWORD f DWORD stage
DTTR_Graphics_COM_Direct3DDevice7 void *status DTTR_Graphics_COM_Direct3DDevice7 DWORD DWORD void DWORD DWORD f DTTR_Graphics_COM_Direct3DDevice7 DWORD void DWORD DWORD DWORD f DTTR_Graphics_COM_Direct3DDevice7 void float DWORD DWORD f DWORD voidtexture
DTTR_Graphics_COM_Direct3DDevice7 DWORD block DTTR_Graphics_COM_Direct3DDevice7 DWORD block DTTR_Graphics_COM_Direct3DDevice7 voiddst
DTTR_Graphics_COM_Direct3DDevice7 DWORD block DTTR_Graphics_COM_Direct3DDevice7 DWORD block DTTR_Graphics_COM_Direct3DDevice7 void voiddstPt
DTTR_Graphics_COM_Direct3DDevice7 DWORD block DTTR_Graphics_COM_Direct3DDevice7 DWORD block DTTR_Graphics_COM_Direct3DDevice7 void void void voidsrcR
DTTR_Graphics_COM_Direct3DDevice7 DWORD block DTTR_Graphics_COM_Direct3DDevice7 DWORD block DTTR_Graphics_COM_Direct3DDevice7 void void void void DWORD f BOOL
DTTR_Graphics_COM_Direct3DDevice7 DWORD block DTTR_Graphics_COM_Direct3DDevice7 DWORD block DTTR_Graphics_COM_Direct3DDevice7 void void void void DWORD f FALSE
DTTR_Graphics_COM_Direct3DDevice7 DWORD block DTTR_Graphics_COM_Direct3DDevice7 DWORD block DTTR_Graphics_COM_Direct3DDevice7 void void void void DWORD f DTTR_Graphics_COM_Direct3DDevice7 DWORD idx float
static DTTR_Graphics_COM_Direct3DDevice7_VT vtbl

Macro Definition Documentation

◆ DTTR_MAT4_BYTES

#define DTTR_MAT4_BYTES   (sizeof(float) * DTTR_MAT4_ELEMS)

◆ DTTR_MAT4_ELEMS

◆ MAX_VERTICES

#define MAX_VERTICES   4096

Definition at line 12 of file com_direct3ddevice7.c.

Function Documentation

◆ d3d_device7_clear_bound_texture()

void d3d_device7_clear_bound_texture ( DTTR_BackendState * state)
static

Definition at line 374 of file com_direct3ddevice7.c.

References DTTR_INVALID_TEXTURE, NULL, and state.

Referenced by d3d_device7_texture_bind().

◆ d3d_device7_copy_or_expand_primitive()

void d3d_device7_copy_or_expand_primitive ( DTTR_PrimitiveType * type,
const DTTR_Vertex * verts,
uint32_t count,
DTTR_Vertex * out )
static

◆ d3d_device7_expand_fan()

uint32_t d3d_device7_expand_fan ( const DTTR_Vertex *restrict in,
uint32_t count,
DTTR_Vertex *restrict out )
static

Expands a triangle fan into a triangle list.

Definition at line 122 of file com_direct3ddevice7.c.

References count, and n.

Referenced by d3d_device7_copy_or_expand_primitive().

◆ d3d_device7_expand_strip()

uint32_t d3d_device7_expand_strip ( const DTTR_Vertex *restrict in,
uint32_t count,
DTTR_Vertex *restrict out )
static

Expands a triangle strip into a triangle list.

Definition at line 96 of file com_direct3ddevice7.c.

References count, and n.

Referenced by d3d_device7_copy_or_expand_primitive().

◆ d3d_device7_expanded_primitive_count()

uint32_t d3d_device7_expanded_primitive_count ( DTTR_PrimitiveType type,
uint32_t count )
static

Definition at line 205 of file com_direct3ddevice7.c.

References count, DTTR_PRIM_TRIANGLEFAN, DTTR_PRIM_TRIANGLESTRIP, and type.

Referenced by d3d_device7_record_draw().

◆ d3d_device7_get_transform_state()

bool d3d_device7_get_transform_state ( DWORD type,
float ** out_matrix_f )
static

Selects the backend transform matrix for a D3D transform state token.

Definition at line 37 of file com_direct3ddevice7.c.

References dttr_backend, DWORD, NULL, state, and type.

Referenced by d3d_device7_set_transform_state(), d3ddevice7_gettransform(), and d3ddevice7_multiplytransform().

◆ d3d_device7_map_primitive_type()

◆ d3d_device7_mat4_multiply_f()

void d3d_device7_mat4_multiply_f ( float *restrict out,
const float *restrict a,
const float *restrict b )
static

Multiplies two row-major 4x4 float matrices into out.

Definition at line 18 of file com_direct3ddevice7.c.

References DTTR_MAT4_ELEMS.

Referenced by d3d_device7_record_draw(), and d3ddevice7_multiplytransform().

◆ d3d_device7_record_clear() [1/2]

d3d_device7_record_clear ( f ,
color ,
z ,
stencil  )

References color, f, S_OK, stencil, and z.

◆ d3d_device7_record_clear() [2/2]

void d3d_device7_record_clear ( uint32_t flags,
uint32_t color,
float depth,
uint32_t stencil )
static

◆ d3d_device7_record_draw() [1/2]

◆ d3d_device7_record_draw() [2/2]

d3d_device7_record_draw ( type ,
d3d_device7_verts ,
count ,
has_rhw ,
has_tex  )

◆ d3d_device7_set_blend_func()

void d3d_device7_set_blend_func ( DTTR_BlendFactor src,
DTTR_BlendFactor dst )
static

Sets source and destination blend factors.

Definition at line 419 of file com_direct3ddevice7.c.

References dst, dttr_backend, and src.

Referenced by d3ddevice7_setrenderstate().

◆ d3d_device7_set_texture_address_u()

void d3d_device7_set_texture_address_u ( DTTR_TextureAddress addr)
static

Sets texture addressing mode for U coordinates.

Definition at line 425 of file com_direct3ddevice7.c.

References dttr_backend.

Referenced by d3ddevice7_settexturestagestate().

◆ d3d_device7_set_texture_address_v()

void d3d_device7_set_texture_address_v ( DTTR_TextureAddress addr)
static

Sets texture addressing mode for V coordinates.

Definition at line 430 of file com_direct3ddevice7.c.

References dttr_backend.

Referenced by d3ddevice7_settexturestagestate().

◆ d3d_device7_set_transform_state()

void d3d_device7_set_transform_state ( DWORD type,
const float * m )
static

◆ d3d_device7_set_viewport()

void d3d_device7_set_viewport ( int x,
int y,
int w,
int h,
float min_z,
float max_z )
static

Updates the viewport state used by transformed rendering paths.

Definition at line 435 of file com_direct3ddevice7.c.

References dttr_backend, h, state, w, x, and y.

Referenced by d3ddevice7_setviewport().

◆ d3d_device7_texture_bind() [1/2]

void d3d_device7_texture_bind ( DTTR_Texture tex)
static

Binds an internal texture handle for subsequent draw records.

Definition at line 380 of file com_direct3ddevice7.c.

References d3d_device7_clear_bound_texture(), dttr_backend, dttr_graphics_ensure_staged_texture(), dttr_graphics_is_gpu_thread(), DTTR_INVALID_TEXTURE, st, and state.

◆ d3d_device7_texture_bind() [2/2]

d3d_device7_texture_bind ( surf-> dttr_texture)

References S_OK.

◆ d3d_device7_transform_label()

const char * d3d_device7_transform_label ( DWORD type)
static

Definition at line 55 of file com_direct3ddevice7.c.

References DWORD, and type.

Referenced by d3d_device7_set_transform_state().

◆ d3d_device7_uploaded_primitive_type()

DTTR_PrimitiveType d3d_device7_uploaded_primitive_type ( DTTR_PrimitiveType type)
static

◆ d3ddevice7_getinfo()

◆ d3ddevice7_gettexturestagestate()

HRESULT d3ddevice7_gettexturestagestate ( DTTR_Graphics_COM_Direct3DDevice7 * self,
DWORD stage,
DWORD type,
DWORD * out )
static

Definition at line 997 of file com_direct3ddevice7.c.

References dttr_backend, DWORD, S_OK, self, stage, and type.

◆ d3ddevice7_gettransform()

HRESULT d3ddevice7_gettransform ( DTTR_Graphics_COM_Direct3DDevice7 * self,
DWORD type,
void * matrix )
static

◆ d3ddevice7_getviewport()

HRESULT d3ddevice7_getviewport ( DTTR_Graphics_COM_Direct3DDevice7 * self,
void * vp )
static

Definition at line 618 of file com_direct3ddevice7.c.

References dttr_backend, DWORD, S_OK, self, and state.

◆ d3ddevice7_multiplytransform()

HRESULT d3ddevice7_multiplytransform ( DTTR_Graphics_COM_Direct3DDevice7 * self,
DWORD type,
void * matrix )
static

◆ d3ddevice7_setrenderstate()

◆ d3ddevice7_settexturestagestate()

HRESULT d3ddevice7_settexturestagestate ( DTTR_Graphics_COM_Direct3DDevice7 * self,
DWORD stage,
DWORD type,
DWORD value )
static

◆ d3ddevice7_settransform()

HRESULT d3ddevice7_settransform ( DTTR_Graphics_COM_Direct3DDevice7 * self,
DWORD type,
void * matrix )
static

Definition at line 552 of file com_direct3ddevice7.c.

References d3d_device7_set_transform_state(), DWORD, S_OK, self, and type.

◆ d3ddevice7_setviewport()

HRESULT d3ddevice7_setviewport ( DTTR_Graphics_COM_Direct3DDevice7 * self,
void * vp )
static

Definition at line 579 of file com_direct3ddevice7.c.

References d3d_device7_set_viewport(), S_OK, and self.

◆ DTTR_COM_NOOP_HRESULT() [1/9]

DTTR_Graphics_COM_Direct3DDevice7 DWORD block DTTR_COM_NOOP_HRESULT ( d3ddevice7_capturestateblock ,
DTTR_Graphics_COM_Direct3DDevice7 * self,
DWORD block )

References DTTR_COM_NOOP_HRESULT, DWORD, and self.

◆ DTTR_COM_NOOP_HRESULT() [2/9]

DTTR_COM_NOOP_HRESULT ( d3ddevice7_drawindexedprimitive ,
DTTR_Graphics_COM_Direct3DDevice7 * self,
DWORD prim,
DWORD fvf,
void * v,
DWORD vn,
WORD * indices,
DWORD in,
DWORD flags )

References DWORD, flags, fvf, prim, and self.

◆ DTTR_COM_NOOP_HRESULT() [3/9]

DTTR_Graphics_COM_Direct3DDevice7 void *status DTTR_Graphics_COM_Direct3DDevice7 DWORD DWORD void DWORD DWORD f DTTR_COM_NOOP_HRESULT ( d3ddevice7_drawindexedprimitivestrided ,
DTTR_Graphics_COM_Direct3DDevice7 * self,
DWORD prim,
DWORD fvf,
void * d,
DWORD vn,
WORD * i,
DWORD in,
DWORD f )

References d, DTTR_COM_NOOP_HRESULT, DWORD, f, fvf, prim, and self.

◆ DTTR_COM_NOOP_HRESULT() [4/9]

◆ DTTR_COM_NOOP_HRESULT() [5/9]

◆ DTTR_COM_NOOP_HRESULT() [6/9]

DTTR_Graphics_COM_Direct3DDevice7 *self DTTR_COM_NOOP_HRESULT ( d3ddevice7_preload ,
DTTR_Graphics_COM_Direct3DDevice7 * self,
void * tex )

References DTTR_COM_NOOP_HRESULT, and self.

◆ DTTR_COM_NOOP_HRESULT() [7/9]

◆ DTTR_COM_NOOP_HRESULT() [8/9]

DTTR_Graphics_COM_Direct3DDevice7 *self DTTR_COM_NOOP_HRESULT ( d3ddevice7_setlight ,
DTTR_Graphics_COM_Direct3DDevice7 * self,
DWORD idx,
void * light )

◆ DTTR_COM_NOOP_HRESULT() [9/9]

DTTR_COM_NOOP_HRESULT ( d3ddevice7_setmaterial ,
DTTR_Graphics_COM_Direct3DDevice7 * self,
void * mat )

References self.

◆ DTTR_COM_STUB_MEMSET() [1/2]

DTTR_COM_STUB_MEMSET ( d3ddevice7_getcaps ,
DTTR_SIZEOF_D3DDEVICEDESC7 ,
void ,
DTTR_Graphics_COM_Direct3DDevice7 * self )

◆ DTTR_COM_STUB_MEMSET() [2/2]

◆ DTTR_COM_STUB_SET() [1/6]

DTTR_Graphics_COM_Direct3DDevice7 DWORD block DTTR_Graphics_COM_Direct3DDevice7 DWORD block DTTR_COM_STUB_SET ( d3ddevice7_createstateblock ,
DWORD ,
1 ,
DTTR_Graphics_COM_Direct3DDevice7 * self,
DWORD t )

◆ DTTR_COM_STUB_SET() [2/6]

DTTR_COM_STUB_SET ( d3ddevice7_getdirect3d ,
void * ,
NULL ,
DTTR_Graphics_COM_Direct3DDevice7 * self )

◆ DTTR_COM_STUB_SET() [3/6]

DTTR_COM_STUB_SET ( d3ddevice7_getrenderstate ,
DWORD ,
0 ,
DTTR_Graphics_COM_Direct3DDevice7 * self,
DWORD state )

References DWORD, self, and state.

◆ DTTR_COM_STUB_SET() [4/6]

DTTR_Graphics_COM_Direct3DDevice7 void DWORD flags DTTR_COM_STUB_SET ( d3ddevice7_getrendertarget ,
void * ,
NULL ,
DTTR_Graphics_COM_Direct3DDevice7 * self )

References DTTR_COM_STUB_SET, NULL, and self.

◆ DTTR_COM_STUB_SET() [5/6]

◆ DTTR_COM_STUB_SET() [6/6]

DTTR_COM_STUB_SET ( d3ddevice7_validatedevice ,
DWORD ,
1 ,
DTTR_Graphics_COM_Direct3DDevice7 * self )

References DWORD, and self.

◆ dttr_graphics_com_create_direct3ddevice7()

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().

◆ for()

for ( )

Definition at line 803 of file com_direct3ddevice7.c.

References DWORD, fvf, stride, and tex_count.

◆ if() [1/5]

◆ if() [2/5]

if ( flags & D3DCLEAR_TARGET) = DTTR_CLEAR_DEPTH

◆ if() [3/5]

if ( has_rhw )

Definition at line 868 of file com_direct3ddevice7.c.

References count, d3d_device7_verts, DWORD, and has_rhw.

◆ if() [4/5]

if ( hr ! = 1)

Definition at line 486 of file com_direct3ddevice7.c.

References hr, and S_OK.

◆ if() [5/5]

if ( )

Definition at line 820 of file com_direct3ddevice7.c.

References min_stride, and stride.

◆ switch()

Variable Documentation

◆ BOOL

◆ c

◆ cb

◆ color

◆ count

◆ ctx

void void* ctx
Initial value:
{
if (!cb) {
return S_OK;
}
const LPD3DENUMPIXELFORMATSCALLBACK callback = (LPD3DENUMPIXELFORMATSCALLBACK)cb
void * cb
return S_OK

Definition at line 464 of file com_direct3ddevice7.c.

Referenced by add_scaled_vertical_spacing(), append_registers(), append_table_header_text(), begin_config_content_region(), begin_config_table(), begin_full_window(), begin_gamepad_button_table(), begin_labeled_control(), begin_mod_table(), begin_padded_panel(), begin_settings_table(), begin_settings_table_with_cell_padding(), begin_settings_table_with_width(), begin_tab_settings_table(), button_row_width(), button_size(), button_spacing(), cleanup_runtime(), config_footer_height(), confirm_discard_changes(), context_scale(), d3d7_enum_devices(), d3d7_enumzbufferformats(), default_free_entry(), default_load_entry(), dialog_parent_window(), draw_audio_tab(), draw_browse_buttons(), draw_clickable_text(), draw_copyable_stack_trace(), draw_disc_button(), draw_dump_text(), draw_footer_text(), draw_gamepad_axes(), draw_gamepad_axis_choice(), draw_gamepad_button_row(), draw_gamepad_buttons(), draw_gamepad_deadzone_input(), draw_gamepad_tab(), draw_general_tab(), draw_graphics_tab(), draw_mod_section_header(), draw_mod_toggle_row(), draw_modding_tab(), draw_path_picker_button(), draw_path_picker_buttons(), draw_report_text(), draw_source_button(), draw_source_buttons(), draw_tabs(), draw_toolbar(), draw_ui(), draw_wrapped_text(), draw_wrapped_text_span(), dttr_audio_init(), DTTR_COM_NOOP_HRESULT(), DTTR_COM_NOOP_HRESULT(), dttr_config_main(), DTTR_Core_AOBFind(), DTTR_Core_HookAOB(), DTTR_Core_HookFunction(), DTTR_Core_HookPointer(), DTTR_Core_PatchAOBRel32Jump(), DTTR_Core_PatchBytes(), DTTR_Core_PatchGroupCreate(), DTTR_Core_PatchRel32Jump(), DTTR_Core_SignatureFind(), DTTR_CrashDump_FormatStackTrace(), dttr_game_hooks_init(), dttr_graphics_hooks_cleanup(), dttr_graphics_hooks_init(), DTTR_Hook_WinMainCallback(), DTTR_ImGui_ErrorShow(), DTTR_ImGuiDialog_Begin(), DTTR_ImGuiDialog_BeginRoot(), DTTR_ImGuiDialog_Button(), DTTR_ImGuiDialog_DrawHeader(), DTTR_ImGuiDialog_DrawPaddedText(), DTTR_ImGuiDialog_End(), DTTR_ImGuiDialog_FitWindowToContent(), DTTR_ImGuiDialog_NewFrame(), DTTR_ImGuiDialog_OffsetCursorY(), DTTR_ImGuiDialog_ProcessEvent(), DTTR_ImGuiDialog_ProcessEvents(), DTTR_ImGuiDialog_RefreshScale(), DTTR_ImGuiDialog_Render(), DTTR_ImGuiDialog_ScaledFloat(), dttr_inputs_hooks_cleanup(), dttr_inputs_hooks_init(), DTTR_LoaderUI_ChooseGameSource(), dttr_mods_after_game_frame(), dttr_mods_after_present(), dttr_mods_before_game_frame(), dttr_mods_before_present(), DTTR_Mods_ContextIsCompatible(), dttr_mods_frame_begin(), dttr_mods_frame_end(), dttr_mods_graphics_device_created(), dttr_mods_graphics_device_destroying(), dttr_mods_graphics_device_lost(), dttr_mods_graphics_device_restored(), dttr_mods_imgui_begin(), dttr_mods_imgui_end(), dttr_mods_input_mode_changed(), dttr_mods_render(), dttr_mods_render_game(), dttr_mods_window_created(), dttr_mods_window_destroying(), dttr_mods_window_resized(), dttr_movies_hooks_init(), dttr_mss_sdl_install_hooks(), DTTR_PCDOGS_DataResolve(), DTTR_PCDOGS_DataSymbolID(), DTTR_PCDOGS_FunctionResolve(), DTTR_PCDOGS_Hook_DataPointer(), dttr_pcdogs_hook_is_active(), DTTR_PCDOGS_PatchGroup_HookDataPointer(), DTTR_PCDOGS_PatchGroup_Install(), DTTR_PCDOGS_ResolveAll(), DTTR_PCDOGS_SymbolDataResolve(), DTTR_PCDOGS_SymbolFunctionIsCallable(), DTTR_PCDOGS_SymbolFunctionResolve(), DTTR_PCDOGS_SymbolsResolveAll(), DTTR_PCDOGS_Unhook_All(), dttr_pcdogs_unhook_checked(), dttr_sidecar_install_pcdogs_patch_group(), DTTR_Util_GetActiveActor(), DTTR_Util_PkgWalk(), handle_shortcuts(), init_dialog_imgui(), initialize_pcdogs_runtime(), install_mss_import_descriptor(), install_mss_import_hook(), install_one_target(), install_pointer_hook(), install_required_sidecar_hooks(), kvec_t(), labeled_checkbox(), labeled_choice_combo(), labeled_input_float(), labeled_input_int(), labeled_input_text(), labeled_log_path_picker(), labeled_path_picker(), labeled_path_picker_with_dialog(), mod_enable_column_width(), open_codec(), open_file_dialog(), open_log_file_dialog(), open_pcdogs_dir_dialog(), open_pcdogs_iso_dialog(), patch_group_hook_symbol_function(), path_text_input_width(), process_events(), request_reset_defaults(), resize_dialog_window_for_scale(), resolve_symbol(), resolve_toc(), restore_previous_imgui_context(), runtime_context_valid(), same_button_row(), same_path_button_row(), scaled_int(), set_text_padding_x(), setup_scaled_table_column(), start_pcdogs_runtime(), table_cell_padding(), table_input_width(), target_address(), test_patch_group_target_failure_rolls_back_only_new_entries(), test_signature_helpers_resolve_aob_patterns(), text_padding_x(), themed_row_button(), and use_dialog_imgui_context().

◆ d

◆ d3d_device7_verts

DTTR_Vertex d3d_device7_verts[MAX_VERTICES]
static

Definition at line 15 of file com_direct3ddevice7.c.

Referenced by d3d_device7_record_draw(), and if().

◆ diffuse_bytes

const size_t diffuse_bytes = has_diffuse ? sizeof(DWORD) : 0

Definition at line 797 of file com_direct3ddevice7.c.

◆ diffuse_off

const size_t diffuse_off = pos_bytes + normal_bytes + psize_bytes

Definition at line 796 of file com_direct3ddevice7.c.

◆ dst

◆ dstPt

◆ DTTR_SIZEOF_D3DLIGHT7

DTTR_Graphics_COM_Direct3DDevice7 *self DTTR_SIZEOF_D3DLIGHT7

Definition at line 659 of file com_direct3ddevice7.c.

◆ DTTR_SIZEOF_D3DMATERIAL7

DTTR_SIZEOF_D3DMATERIAL7

Definition at line 645 of file com_direct3ddevice7.c.

◆ DWORD

Definition at line 708 of file com_direct3ddevice7.c.

Referenced by append_disassembly_from_bytes(), append_disassembly_line(), append_disassembly_window(), append_failed_instruction_decode(), attempt_hot_reload_mods(), build_crash_message(), compute_exe_hash(), d3d7_createvertexbuffer(), d3d_device7_get_transform_state(), d3d_device7_map_primitive_type(), d3d_device7_set_transform_state(), d3d_device7_transform_label(), d3ddevice7_getinfo(), d3ddevice7_gettexturestagestate(), d3ddevice7_gettransform(), d3ddevice7_getviewport(), d3ddevice7_multiplytransform(), d3ddevice7_setrenderstate(), d3ddevice7_settexturestagestate(), d3ddevice7_settransform(), d3dtexture2_gethandle(), ddraw7_createclipper(), ddraw7_createpalette(), ddraw7_createsurface(), ddrawsurface7_blt(), ddrawsurface7_getsurfacedesc(), ddrawsurface7_setcolorkey(), detach_watchdog(), DllMain(), 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_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(), DTTR_COM_STUB_SET(), DTTR_COM_STUB_SET(), DTTR_Compat_CreateProcess(), DTTR_CrashDump_FormatStackTrace(), DTTR_CrashDump_Write(), dttr_hook_directdraw_enumerate_ex_a_callback(), dttr_hook_resolve_pcdogs_path_callback(), dttr_launcher_main(), DTTR_Loader_InjectSidecar(), DTTR_Loader_WatchdogWait(), dttr_mods_loaded_elapsed_ms(), DTTR_Path_CurrentDir(), DTTR_Path_ModuleDir(), dttr_pcdogs_crash_symbol_provider(), dttr_sidecar_write_exception_report(), DTTR_Util_MemReadable(), ensure_pcdogs_dbghelp_module(), for(), format_instruction_at(), get_exe_dir(), get_full_path(), get_os_cache_base_dir(), if(), if(), is_readable_page_protect(), kvec_t(), log_win32_failure(), make_shadow_path(), memory_protection_is_readable(), pcdogs_module_image_size(), prepend_modules_to_path(), resolve_config_path(), resolve_mods_dir(), resolve_nt_path_and_cwd(), scan_disc_candidates(), scan_mod_file(), scan_mods(), should_reload_now(), show_startup_error(), store_pointer(), terminate_child(), unhandled_exception_filter(), write_bytes(), write_child_dump(), and write_remote_payload().

◆ FALSE

◆ flags

◆ float

◆ fmt_argb4444

DDPIXELFORMAT fmt_argb4444
Initial value:
= {
.dwSize = sizeof(DDPIXELFORMAT),
.dwFlags = DDPF_RGB | DDPF_ALPHAPIXELS,
.dwRGBBitCount = 16,
.dwRBitMask = 0x0F00,
.dwGBitMask = 0x00F0,
.dwBBitMask = 0x000F,
.dwRGBAlphaBitMask = 0xF000,
}

Definition at line 474 of file com_direct3ddevice7.c.

◆ fmt_rgb565

callback & fmt_rgb565
Initial value:
= {
.dwSize = sizeof(DDPIXELFORMAT),
.dwFlags = DDPF_RGB,
.dwRGBBitCount = 16,
.dwRBitMask = 0xF800,
.dwGBitMask = 0x07E0,
.dwBBitMask = 0x001F,
.dwRGBAlphaBitMask = 0,
}

Definition at line 491 of file com_direct3ddevice7.c.

◆ fvf

◆ has_diffuse

const bool has_diffuse = (fvf & DTTR_D3DFVF_DIFFUSE) != 0

Definition at line 743 of file com_direct3ddevice7.c.

◆ has_normal

const bool has_normal = (!has_rhw && !has_xyzw) && ((fvf & DTTR_D3DFVF_NORMAL) != 0)

Definition at line 741 of file com_direct3ddevice7.c.

◆ has_psize

const bool has_psize = (!has_rhw && !has_xyzw) && ((fvf & DTTR_D3DFVF_PSIZE) != 0)

Definition at line 742 of file com_direct3ddevice7.c.

◆ has_rhw

const bool has_rhw = (pos_type == DTTR_D3DFVF_XYZRHW)

Definition at line 739 of file com_direct3ddevice7.c.

Referenced by d3d_device7_record_draw(), and if().

◆ has_specular

const bool has_specular = (fvf & DTTR_D3DFVF_SPECULAR) != 0

Definition at line 744 of file com_direct3ddevice7.c.

◆ has_tex

const bool has_tex = tex_count > 0

Definition at line 746 of file com_direct3ddevice7.c.

Referenced by d3d_device7_record_draw().

◆ has_xyzw

const bool has_xyzw = (pos_type == DTTR_D3DFVF_XYZW)

Definition at line 740 of file com_direct3ddevice7.c.

◆ hr

HRESULT hr = callback(&fmt_argb4444, ctx)

Definition at line 484 of file com_direct3ddevice7.c.

Referenced by if().

◆ logical_h

const float logical_h = (float)state->logical_height

Definition at line 751 of file com_direct3ddevice7.c.

◆ logical_w

const float logical_w = (float)state->logical_width

Definition at line 750 of file com_direct3ddevice7.c.

◆ min_stride

const size_t min_stride = has_rhw ? (4 * sizeof(float)) : (3 * sizeof(float))

Definition at line 819 of file com_direct3ddevice7.c.

Referenced by if().

◆ n

◆ normal_bytes

const size_t normal_bytes = has_normal ? (3 * sizeof(float)) : 0

Definition at line 794 of file com_direct3ddevice7.c.

◆ pos_bytes

size_t pos_bytes = 3 * sizeof(float)

Definition at line 760 of file com_direct3ddevice7.c.

Referenced by if(), and switch().

◆ prim

◆ prim_type

◆ psize_bytes

const size_t psize_bytes = has_psize ? sizeof(float) : 0

Definition at line 795 of file com_direct3ddevice7.c.

◆ r

◆ rects

◆ S_OK

◆ self

Definition at line 519 of file com_direct3ddevice7.c.

Referenced by d3d7_createdevice(), d3d7_createvertexbuffer(), d3d7_enum_devices(), d3d7_enumzbufferformats(), d3ddevice7_getinfo(), d3ddevice7_gettexturestagestate(), d3ddevice7_gettransform(), d3ddevice7_getviewport(), d3ddevice7_multiplytransform(), d3ddevice7_setrenderstate(), d3ddevice7_settexturestagestate(), d3ddevice7_settransform(), d3ddevice7_setviewport(), d3dtexture2_gethandle(), ddraw7_createclipper(), ddraw7_createpalette(), ddraw7_createsurface(), ddraw7_queryinterface(), ddrawsurface7_addref(), ddrawsurface7_blt(), ddrawsurface7_getattachedsurface(), ddrawsurface7_getoverlayposition(), ddrawsurface7_getsurfacedesc(), ddrawsurface7_queryinterface(), ddrawsurface7_release(), ddrawsurface7_setcolorkey(), ddrawsurface7_unlock(), 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_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_MEMSET(), 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(), 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(), if(), surface_ensure_convert_buffer(), surface_fill_desc(), surface_fill_pixelformat(), surface_fill_pixelformat(), surface_hash_source_pixels(), surface_texture_cache_key(), and surface_upload_texture().

◆ specular_bytes

const size_t specular_bytes = has_specular ? sizeof(DWORD) : 0

Definition at line 799 of file com_direct3ddevice7.c.

◆ specular_off

const size_t specular_off = diffuse_off + diffuse_bytes

Definition at line 798 of file com_direct3ddevice7.c.

◆ src

◆ srcR

◆ st

◆ stage

◆ state

Definition at line 749 of file com_direct3ddevice7.c.

Referenced by acquire_upload_pool_slot(), apply_dialog_selection(), apply_direction_state(), begin_clear_pass(), begin_config_content_region(), begin_draw_pass_if_needed(), begin_frame(), begin_frame(), bind_frame_vertex_buffer(), cancel_binding(), capture_source(), cleanup(), cleanup(), clear_mods_dir(), collect_and_upload_pending(), config_footer_height(), config_has_unsaved_changes(), confirm_discard_changes(), create_device(), create_dummy_texture(), create_frame_buffers(), create_graphics_pipelines(), create_render_textures(), create_samplers(), create_shader(), create_upload_buffer(), d3d_device7_clear_bound_texture(), d3d_device7_get_transform_state(), d3d_device7_record_clear(), d3d_device7_record_draw(), d3d_device7_set_viewport(), d3d_device7_texture_bind(), d3ddevice7_getviewport(), d3ddevice7_setrenderstate(), defer_texture_destroy(), defer_texture_destroy(), destroy_device(), destroy_window(), draw_audio_tab(), draw_batch_record(), draw_footer_text(), draw_gamepad_axes(), draw_gamepad_axis_choice(), draw_gamepad_button_row(), draw_gamepad_buttons(), draw_gamepad_deadzone_input(), draw_gamepad_tab(), draw_general_tab(), draw_graphics_tab(), draw_mod_toggle_row(), draw_modding_tab(), draw_path_picker_button(), draw_path_picker_buttons(), draw_shortcut_debug_window(), draw_tabs(), draw_toolbar(), draw_ui(), DTTR_COM_STUB_SET(), dttr_config_main(), dttr_graphics_begin_frame(), dttr_graphics_cleanup(), dttr_graphics_end_frame(), dttr_graphics_ensure_staged_texture(), dttr_graphics_init(), dttr_graphics_is_gpu_thread(), dttr_graphics_mod_present_rect_after(), dttr_graphics_mod_present_rect_before(), dttr_graphics_opengl_init(), dttr_graphics_present_video_frame_bgra(), dttr_graphics_sdl3gpu_create_pipelines(), dttr_graphics_sdl3gpu_create_resources(), dttr_graphics_sdl3gpu_init(), dttr_graphics_sdl3gpu_resize_render_textures(), dttr_graphics_set_logical_resolution(), DTTR_ImGui_ApplyDesktopScale(), DTTR_ImGui_ApplyWindowDesktopScale(), DTTR_ImGui_GetCurrentDesktopScale(), dttr_inputs_hook_dinput_poll_callback(), end_frame(), end_frame(), end_render_pass_if_active(), ensure_video_texture(), format_status_text(), gamepad_axis_label_state(), gamepad_button_label_state(), gamepad_button_rows_have_unsaved_changes(), gamepad_deadzone_label_state(), gamepad_default_source_for_action(), generate_pending_mipmaps(), get_driver_name(), get_driver_name(), handle_shortcuts(), init_common_state(), init_poll_state(), init_state_from_args(), khash_t(), labeled_log_path_picker(), labeled_path_picker(), labeled_path_picker_with_dialog(), load_config(), log_file_path_dialog_callback(), msaa_enabled(), open_file_dialog(), open_log_file_dialog(), open_pcdogs_dir_dialog(), open_pcdogs_iso_dialog(), pcdogs_path_dialog_callback(), present_video_frame_bgra(), present_video_frame_bgra(), process_events(), refresh_button_rows(), refresh_render_resolution(), release_deferred_gl_destroys(), release_deferred_texture_destroys(), release_shader_pair(), release_upload_pool_slot(), release_window_device(), replay_batch_records(), replay_batch_records_gl(), request_reset_defaults(), reset_defaults(), resize(), resize_fbo(), safe_relative_rejects_absolute_and_traversal_paths(), save_config(), scan_mod_dlls(), select_msaa_sample_count(), select_render_resolution(), set_default_viewport(), set_mods_dir_from_config_path(), set_status(), surface_queue_pending_upload_locked(), surface_texture_create_or_retain(), surface_texture_refcount(), surface_texture_release(), surface_texture_retain(), surface_texture_update_unique(), sync_config_from_rows(), sync_rows_from_config(), test_blueprint_functions_resolve_and_match_abi(), test_cleanup_all_restores_hooks_and_allows_reuse(), test_expected_mss32_imports_are_hooked(), test_expected_pcdogs_byte_patch_targets_resolve(), test_expected_pcdogs_jmp_hook_targets_resolve(), test_expected_pcdogs_signatures_resolve(), test_function_hooks_chain_and_detach(), test_overlapping_byte_patches_are_rejected(), test_owner_detach_only_detaches_matching_owner(), test_patch_bytes_detach_restores_original(), test_patch_group_target_failure_rolls_back_only_new_entries(), test_pcdogs_generated_function_patch_specs_name_current_hooks(), test_pcdogs_generated_title_resource_patch_specs_use_current_names(), test_pcdogs_unstable_patch_specs_match_stable_shape(), test_pointer_hook_detach_restores_original(), test_signature_helpers_resolve_aob_patterns(), try_create_device_for_driver(), update_window_title(), upload_dummy_white_pixel(), upload_pending_textures(), upload_pending_textures_gl(), and upload_texture_data().

◆ stencil

Initial value:
{
uint32_t f = 0
DTTR_Graphics_COM_DirectDraw7 DWORD f

Definition at line 538 of file com_direct3ddevice7.c.

Referenced by d3d_device7_record_clear(), and d3d_device7_record_clear().

◆ stride

◆ surface

◆ tex_count

const int tex_count = (int)((fvf >> DTTR_D3DFVF_TEXCOUNT_SHIFT) & 0xF)

Definition at line 745 of file com_direct3ddevice7.c.

Referenced by for().

◆ tex_off

const size_t tex_off = specular_off + specular_bytes

Definition at line 800 of file com_direct3ddevice7.c.

◆ texture

Initial value:
{
if (!texture) {
return S_OK;
}
static void d3d_device7_texture_bind(DTTR_Texture tex)
Binds an internal texture handle for subsequent draw records.
DTTR_Graphics_COM_Direct3DDevice7 void *status DTTR_Graphics_COM_Direct3DDevice7 DWORD DWORD void DWORD DWORD f DTTR_Graphics_COM_Direct3DDevice7 DWORD void DWORD DWORD DWORD f DTTR_Graphics_COM_Direct3DDevice7 void float DWORD DWORD f DWORD void * texture
#define DTTR_INVALID_TEXTURE

Definition at line 980 of file com_direct3ddevice7.c.

◆ type

◆ vb

◆ vertices

◆ void

◆ vp_h

const float vp_h = (float)((state->viewport_h > 0) ? state->viewport_h : 1)

Definition at line 755 of file com_direct3ddevice7.c.

◆ vp_max_z

const float vp_max_z = state->viewport_max_z

Definition at line 757 of file com_direct3ddevice7.c.

◆ vp_min_z

const float vp_min_z = state->viewport_min_z

Definition at line 756 of file com_direct3ddevice7.c.

◆ vp_w

const float vp_w = (float)((state->viewport_w > 0) ? state->viewport_w : 1)

Definition at line 754 of file com_direct3ddevice7.c.

◆ vp_x

const float vp_x = (float)state->viewport_x

Definition at line 752 of file com_direct3ddevice7.c.

◆ vp_y

const float vp_y = (float)state->viewport_y

Definition at line 753 of file com_direct3ddevice7.c.

◆ vp_z_span

const float vp_z_span = vp_max_z - vp_min_z

Definition at line 758 of file com_direct3ddevice7.c.

◆ vtbl

Definition at line 1170 of file com_direct3ddevice7.c.

◆ z