19 #ifndef __WINE_DLLS_DDRAW_DDRAW_PRIVATE_H 20 #define __WINE_DLLS_DDRAW_DDRAW_PRIVATE_H 25 #define NONAMELESSSTRUCT 26 #define NONAMELESSUNION 36 #ifdef DDRAW_INIT_GUID 39 #include "wine/list.h" 54 #define DDRAW_INITIALIZED 0x00000001 55 #define DDRAW_D3D_INITIALIZED 0x00000002 56 #define DDRAW_RESTORE_MODE 0x00000004 57 #define DDRAW_NO3D 0x00000008 58 #define DDRAW_SCL_DDRAW1 0x00000010 59 #define DDRAW_SCL_RECURSIVE 0x00000020 60 #define DDRAW_GDI_FLIP 0x00000040 62 #define DDRAW_STRIDE_ALIGNMENT 8 64 #define DDRAW_WINED3D_FLAGS (WINED3D_LEGACY_DEPTH_BIAS | WINED3D_VIDMEM_ACCOUNTING \ 65 | WINED3D_RESTORE_MODE_ON_ACTIVATE | WINED3D_FOCUS_MESSAGES | WINED3D_PIXEL_CENTER_INTEGER \ 66 | WINED3D_LEGACY_UNBOUND_RESOURCE_COLOR | WINED3D_NO_PRIMITIVE_RESTART \ 67 | WINED3D_LEGACY_CUBEMAP_FILTERING | WINED3D_LIMIT_VIEWPORT) 128 #define DDRAW_WINDOW_CLASS_NAME "DirectDrawDeviceWnd" 183 #define MAX_COMPLEX_ATTACHED 6 265 #define DDRAW_INVALID_HANDLE ~0U 579 #define GET_TEXCOUNT_FROM_FVF(d3dvtVertexType) \ 580 (((d3dvtVertexType) & D3DFVF_TEXCOUNT_MASK) >> D3DFVF_TEXCOUNT_SHIFT) 582 #define GET_TEXCOORD_SIZE_FROM_FVF(d3dvtVertexType, tex_num) \ 583 (((((d3dvtVertexType) >> (16 + (2 * (tex_num)))) + 1) & 0x03) + 1) 623 #define FE(x) { x, #x } 634 #define ME(x,f,e) { x, #x, (void (*)(const void *))(f), offsetof(STRUCT, e) } 636 #define DD_STRUCT_COPY_BYSIZE_(to,from,to_size,from_size) \ 638 DWORD __size = (to)->dwSize; \ 639 DWORD __resetsize = min(to_size, sizeof(*to)); \ 640 DWORD __copysize = min(__resetsize, from_size); \ 641 assert(to != from); \ 642 memcpy(to, from, __copysize); \ 643 memset((char*)(to) + __copysize, 0, __resetsize - __copysize); \ 644 (to)->dwSize = __size; \ 647 #define DD_STRUCT_COPY_BYSIZE(to,from) DD_STRUCT_COPY_BYSIZE_(to,from,(to)->dwSize,(from)->dwSize) void d3d_viewport_init(struct d3d_viewport *viewport, struct ddraw *ddraw) DECLSPEC_HIDDEN
enum wined3d_format_id wined3dformat_from_ddrawformat(const DDPIXELFORMAT *format) DECLSPEC_HIDDEN
struct d3d_viewport * unsafe_impl_from_IDirect3DViewport(IDirect3DViewport *iface) DECLSPEC_HIDDEN
static struct d3d_device * impl_from_IDirect3DDevice(IDirect3DDevice *iface)
static void ddraw_set_swapchain_window(struct ddraw *ddraw, HWND window)
struct d3d_material * background
void DDSD_to_DDSD2(const DDSURFACEDESC *in, DDSURFACEDESC2 *out) DECLSPEC_HIDDEN
struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface(IDirectDrawSurface *iface) DECLSPEC_HIDDEN
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
struct wined3d_buffer * dst_vertex_buffer
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
void ddraw_handle_table_destroy(struct ddraw_handle_table *t) DECLSPEC_HIDDEN
static BOOL format_is_compressed(const DDPIXELFORMAT *format)
IUnknown * ifaceToRelease
struct d3d_viewport * unsafe_impl_from_IDirect3DViewport3(IDirect3DViewport3 *iface) DECLSPEC_HIDDEN
IDirect3DVertexBuffer7 IDirect3DVertexBuffer7_iface
struct d3d_viewport * unsafe_impl_from_IDirect3DViewport2(IDirect3DViewport2 *iface) DECLSPEC_HIDDEN
void DDRAW_dump_DDSCAPS2(const DDSCAPS2 *in) DECLSPEC_HIDDEN
struct d3d_vertex_buffer * unsafe_impl_from_IDirect3DVertexBuffer(IDirect3DVertexBuffer *iface) DECLSPEC_HIDDEN
static struct d3d_device * impl_from_IDirect3DDevice3(IDirect3DDevice3 *iface)
struct ddraw_clipper * unsafe_impl_from_IDirectDrawClipper(IDirectDrawClipper *iface) DECLSPEC_HIDDEN
void ddraw_d3dcaps1_from_7(D3DDEVICEDESC *caps1, D3DDEVICEDESC7 *caps7) DECLSPEC_HIDDEN
struct list ddraw_list_entry
struct wined3d_buffer * wined3d_buffer
IDirect3DTexture2 IDirect3DTexture2_iface
struct ddraw_handle_entry * free_entries
struct ddraw_surface * unsafe_impl_from_IDirect3DTexture2(IDirect3DTexture2 *iface) DECLSPEC_HIDDEN
struct d3d_device * unsafe_impl_from_IDirect3DDevice7(IDirect3DDevice7 *iface) DECLSPEC_HIDDEN
IDirect3D7 IDirect3D7_iface
BYTE * sysmem_vertex_buffer
HRESULT ddraw_init(struct ddraw *ddraw, DWORD flags, enum wined3d_device_type device_type) DECLSPEC_HIDDEN
void material_activate(struct d3d_material *material) DECLSPEC_HIDDEN
struct wined3d_buffer * src_vertex_buffer
void light_deactivate(struct d3d_light *light) DECLSPEC_HIDDEN
struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface7(IDirectDrawSurface7 *iface) DECLSPEC_HIDDEN
static struct ddraw_surface * impl_from_IDirectDrawSurface7(IDirectDrawSurface7 *iface)
IDirect3DMaterial2 IDirect3DMaterial2_iface
union d3d_viewport::@239 viewports
void viewport_activate(struct d3d_viewport *viewport, BOOL ignore_lights) DECLSPEC_HIDDEN
struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface4(IDirectDrawSurface4 *iface) DECLSPEC_HIDDEN
struct d3d_device * unsafe_impl_from_IDirect3DDevice(IDirect3DDevice *iface) DECLSPEC_HIDDEN
IDirectDraw2 IDirectDraw2_iface
static struct ddraw_surface * impl_from_IDirectDrawSurface4(IDirectDrawSurface4 *iface)
IDirectDrawGammaControl IDirectDrawGammaControl_iface
static struct ddraw_surface * impl_from_IDirectDrawSurface3(IDirectDrawSurface3 *iface)
unsigned int wined3dmapflags_from_ddrawmapflags(unsigned int flags) DECLSPEC_HIDDEN
struct wined3d_buffer * index_buffer
struct wined3d_texture * wined3d_texture
struct wined3d_device * wined3d_device
struct ddraw_palette * unsafe_impl_from_IDirectDrawPalette(IDirectDrawPalette *iface) DECLSPEC_HIDDEN
struct ddraw_clipper * clipper
const GUID IID_D3DDEVICE_WineD3D
wined3d_depth_buffer_type
struct wined3d_vertex_declaration * decl
struct ddraw_surface * complex_array[MAX_COMPLEX_ATTACHED]
BOOL wined3d_colour_from_ddraw_colour(const DDPIXELFORMAT *pf, const struct ddraw_palette *palette, DWORD colour, struct wined3d_color *wined3d_colour) DECLSPEC_HIDDEN
struct wined3d_texture * wined3d_frontbuffer
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
IDirect3D2 IDirect3D2_iface
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
struct wined3d_palette * wined3d_palette
DDSURFACEDESC2 surface_desc
HRESULT(* pfnCreateInstance)(IUnknown *pUnkOuter, LPVOID *ppObj)
struct ddraw_surface * next_attached
struct d3d_device * active_device
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum light
HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_desc, struct ddraw_surface **surface, IUnknown *outer_unknown, unsigned int version) DECLSPEC_HIDDEN
IDirect3DExecuteBuffer IDirect3DExecuteBuffer_iface
static const WCHAR desc[]
HRESULT d3d_execute_buffer_init(struct d3d_execute_buffer *execute_buffer, struct d3d_device *device, D3DEXECUTEBUFFERDESC *desc) DECLSPEC_HIDDEN
struct wined3d_vertex_declaration * wined3d_declaration
struct d3d_device * unsafe_impl_from_IDirect3DDevice2(IDirect3DDevice2 *iface) DECLSPEC_HIDDEN
struct ddraw_surface * root
DWORD get_flexible_vertex_size(DWORD d3dvtVertexType) DECLSPEC_HIDDEN
HRESULT ddraw_palette_init(struct ddraw_palette *palette, struct ddraw *ddraw, DWORD flags, PALETTEENTRY *entries) DECLSPEC_HIDDEN
enum ddraw_handle_type type
IDirectDrawSurface IDirectDrawSurface_iface
static const WCHAR version[]
HWND WINAPI GetDesktopWindow(void)
void * ddraw_get_object(struct ddraw_handle_table *t, DWORD handle, enum ddraw_handle_type type) DECLSPEC_HIDDEN
void d3d_light_init(struct d3d_light *light, struct ddraw *ddraw) DECLSPEC_HIDDEN
void DDRAW_Convert_DDSCAPS_1_To_2(const DDSCAPS *pIn, DDSCAPS2 *pOut) DECLSPEC_HIDDEN
enum wined3d_depth_buffer_type d3d_device_update_depth_stencil(struct d3d_device *device) DECLSPEC_HIDDEN
IDirectDrawSurface4 IDirectDrawSurface4_iface
IDirect3DDevice3 IDirect3DDevice3_iface
HRESULT d3d_device_create(struct ddraw *ddraw, const GUID *guid, struct ddraw_surface *target, IUnknown *rt_iface, UINT version, struct d3d_device **device, IUnknown *outer_unknown) DECLSPEC_HIDDEN
struct d3d_device * d3ddev
void DDRAW_Convert_DDDEVICEIDENTIFIER_2_To_1(const DDDEVICEIDENTIFIER2 *pIn, DDDEVICEIDENTIFIER *pOut) DECLSPEC_HIDDEN
BOOL ddraw_handle_table_init(struct ddraw_handle_table *t, UINT initial_size) DECLSPEC_HIDDEN
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
struct list surface_list_entry
DWORD IDirectDrawSurface7
HRESULT d3d_vertex_buffer_create(struct d3d_vertex_buffer **buffer, struct ddraw *ddraw, D3DVERTEXBUFFERDESC *desc) DECLSPEC_HIDDEN
static struct ddraw_surface * impl_from_IDirect3DTexture2(IDirect3DTexture2 *iface)
struct wined3d_vertex_declaration * ddraw_find_decl(struct ddraw *ddraw, DWORD fvf) DECLSPEC_HIDDEN
struct ddraw_surface * primary
IUnknown * attached_iface
IDirectDraw IDirectDraw_iface
DDSURFACEDESC2 surface_desc
#define MAX_COMPLEX_ATTACHED
struct d3d_light * unsafe_impl_from_IDirect3DLight(IDirect3DLight *iface) DECLSPEC_HIDDEN
#define DDPF_PALETTEINDEXED4
DWORD ddraw_allocate_handle(struct ddraw_handle_table *t, void *object, enum ddraw_handle_type type) DECLSPEC_HIDDEN
#define DDPF_PALETTEINDEXED2
struct d3d_device * d3ddevice
IDirect3DTexture IDirect3DTexture_iface
struct ddraw_handle_entry * entries
D3DMATRIX legacy_projection
HRESULT hr_ddraw_from_wined3d(HRESULT hr) DECLSPEC_HIDDEN
const struct wined3d_parent_ops * parent_ops
struct d3d_device * active_device
struct d3d_device * unsafe_impl_from_IDirect3DDevice3(IDirect3DDevice3 *iface) DECLSPEC_HIDDEN
struct wined3d_device * wined3d_device
struct wined3d_buffer * index_buffer
struct wined3d_device_parent device_parent
struct d3d_vertex_buffer * unsafe_impl_from_IDirect3DVertexBuffer7(IDirect3DVertexBuffer7 *iface) DECLSPEC_HIDDEN
D3DVIEWPORT7 active_viewport
unsigned int sub_resource_idx
#define DDPF_PALETTEINDEXED8
struct ddraw_surface * first_attached
struct d3d_viewport * current_viewport
IDirectDrawClipper IDirectDrawClipper_iface
void ddraw_surface_init(struct ddraw_surface *surface, struct ddraw *ddraw, struct wined3d_texture *wined3d_texture, unsigned int sub_resource_idx, const struct wined3d_parent_ops **parent_ops) DECLSPEC_HIDDEN
const struct wined3d_parent_ops ddraw_null_wined3d_parent_ops DECLSPEC_HIDDEN
void light_activate(struct d3d_light *light) DECLSPEC_HIDDEN
IDirect3DLight IDirect3DLight_iface
IDirectDraw4 IDirectDraw4_iface
IDirectDrawPalette IDirectDrawPalette_iface
IDirectDrawSurface2 IDirectDrawSurface2_iface
static IHTMLWindow2 * window
void DDRAW_dump_surface_desc(const DDSURFACEDESC2 *lpddsd) DECLSPEC_HIDDEN
IDirectDrawSurface3 IDirectDrawSurface3_iface
void ddraw_update_lost_surfaces(struct ddraw *ddraw) DECLSPEC_HIDDEN
struct wined3d_private_store private_store
static BOOL format_is_paletteindexed(const DDPIXELFORMAT *fmt)
IDirect3DViewport3 IDirect3DViewport3_iface
struct wined3d_vec4 user_clip_planes[D3DMAXUSERCLIPPLANES]
struct d3d_device * device1
#define D3DMAXUSERCLIPPLANES
IDirectDrawSurface7 IDirectDrawSurface7_iface
IDirect3DMaterial IDirect3DMaterial_iface
void DDSD2_to_DDSD(const DDSURFACEDESC2 *in, DDSURFACEDESC *out) DECLSPEC_HIDDEN
static struct d3d_device * impl_from_IDirect3DDevice2(IDirect3DDevice2 *iface)
IDirect3DMaterial3 IDirect3DMaterial3_iface
struct wined3d_rendertarget_view * wined3d_rtv
static struct d3d_device * impl_from_IDirect3DDevice7(IDirect3DDevice7 *iface)
IDirect3D IDirect3D_iface
static struct ddraw_surface * impl_from_IDirect3DTexture(IDirect3DTexture *iface)
unsigned int src_vertex_pos
struct list viewport_list
__kernel_ptrdiff_t ptrdiff_t
void DDRAW_dump_cooperativelevel(DWORD cooplevel) DECLSPEC_HIDDEN
#define DDPF_PALETTEINDEXED1
void multiply_matrix(D3DMATRIX *dst, const D3DMATRIX *src1, const D3DMATRIX *src2) DECLSPEC_HIDDEN
IDirect3DDevice7 IDirect3DDevice7_iface
HRESULT ddraw_get_d3dcaps(const struct ddraw *ddraw, D3DDEVICEDESC7 *caps) DECLSPEC_HIDDEN
void DDRAW_dump_DDCAPS(const DDCAPS *lpcaps) DECLSPEC_HIDDEN
unsigned int sub_resource_idx
HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *execute_buffer, struct d3d_device *device, struct d3d_viewport *viewport) DECLSPEC_HIDDEN
HRESULT ddraw_surface_update_frontbuffer(struct ddraw_surface *surface, const RECT *rect, BOOL read) DECLSPEC_HIDDEN
void * ddraw_free_handle(struct ddraw_handle_table *t, DWORD handle, enum ddraw_handle_type type) DECLSPEC_HIDDEN
struct ddraw_surface * unsafe_impl_from_IDirect3DTexture(IDirect3DTexture *iface) DECLSPEC_HIDDEN
IDirect3D3 IDirect3D3_iface
static struct ddraw_palette * impl_from_IDirectDrawPalette(IDirectDrawPalette *iface)
struct wined3d_device * wined3d_device
struct wined3d_buffer * vertex_buffer
void dump_D3DMATRIX(const D3DMATRIX *mat) DECLSPEC_HIDDEN
const struct wined3d_parent_ops ddraw_null_wined3d_parent_ops
IDirectDraw7 IDirectDraw7_iface
struct d3d_execute_buffer * unsafe_impl_from_IDirect3DExecuteBuffer(IDirect3DExecuteBuffer *iface) DECLSPEC_HIDDEN
struct wined3d_swapchain * wined3d_swapchain
D3DPRIMITIVETYPE primitive_type
GLuint GLuint GLsizei GLenum type
D3DMATRIX legacy_clipspace
IDirect3DDevice2 IDirect3DDevice2_iface
D3DEXECUTEBUFFERDESC desc
HRESULT ddraw_clipper_init(struct ddraw_clipper *clipper) DECLSPEC_HIDDEN
BOOL legacyTextureBlending
struct ddraw_palette * palette
struct wined3d_rendertarget_view * ddraw_surface_get_rendertarget_view(struct ddraw_surface *surface) DECLSPEC_HIDDEN
void ddrawformat_from_wined3dformat(DDPIXELFORMAT *ddraw_format, enum wined3d_format_id wined3d_format) DECLSPEC_HIDDEN
IUnknown * ifaceToRelease
struct d3d_material * d3d_material_create(struct ddraw *ddraw) DECLSPEC_HIDDEN
IDirect3DDevice IDirect3DDevice_iface
_CRTIMP int __cdecl read(_In_ int _FileHandle, _Out_writes_bytes_(_MaxCharCount) void *_DstBuf, _In_ unsigned int _MaxCharCount)
#define DDPF_PALETTEINDEXEDTO8
struct d3d_viewport * active_viewport