ReactOS  0.4.14-dev-342-gdc047f9
surface.c File Reference
#include "config.h"
#include "wine/port.h"
#include "ddraw_private.h"
Include dependency graph for surface.c:

Go to the source code of this file.

Classes

struct  callback_info2
 
struct  callback_info
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (ddraw)
 
static struct ddraw_surfaceunsafe_impl_from_IDirectDrawSurface2 (IDirectDrawSurface2 *iface)
 
static struct ddraw_surfaceunsafe_impl_from_IDirectDrawSurface3 (IDirectDrawSurface3 *iface)
 
static struct ddraw_surfaceimpl_from_IDirectDrawGammaControl (IDirectDrawGammaControl *iface)
 
HRESULT ddraw_surface_update_frontbuffer (struct ddraw_surface *surface, const RECT *rect, BOOL read)
 
static HRESULT WINAPI ddraw_surface7_QueryInterface (IDirectDrawSurface7 *iface, REFIID riid, void **obj)
 
static HRESULT WINAPI ddraw_surface4_QueryInterface (IDirectDrawSurface4 *iface, REFIID riid, void **object)
 
static HRESULT WINAPI ddraw_surface3_QueryInterface (IDirectDrawSurface3 *iface, REFIID riid, void **object)
 
static HRESULT WINAPI ddraw_surface2_QueryInterface (IDirectDrawSurface2 *iface, REFIID riid, void **object)
 
static HRESULT WINAPI ddraw_surface1_QueryInterface (IDirectDrawSurface *iface, REFIID riid, void **object)
 
static HRESULT WINAPI ddraw_gamma_control_QueryInterface (IDirectDrawGammaControl *iface, REFIID riid, void **object)
 
static HRESULT WINAPI d3d_texture2_QueryInterface (IDirect3DTexture2 *iface, REFIID riid, void **object)
 
static HRESULT WINAPI d3d_texture1_QueryInterface (IDirect3DTexture *iface, REFIID riid, void **object)
 
static void ddraw_surface_add_iface (struct ddraw_surface *surface)
 
static ULONG WINAPI ddraw_surface7_AddRef (IDirectDrawSurface7 *iface)
 
static ULONG WINAPI ddraw_surface4_AddRef (IDirectDrawSurface4 *iface)
 
static ULONG WINAPI ddraw_surface3_AddRef (IDirectDrawSurface3 *iface)
 
static ULONG WINAPI ddraw_surface2_AddRef (IDirectDrawSurface2 *iface)
 
static ULONG WINAPI ddraw_surface1_AddRef (IDirectDrawSurface *iface)
 
static ULONG WINAPI ddraw_gamma_control_AddRef (IDirectDrawGammaControl *iface)
 
static ULONG WINAPI d3d_texture2_AddRef (IDirect3DTexture2 *iface)
 
static ULONG WINAPI d3d_texture1_AddRef (IDirect3DTexture *iface)
 
static HRESULT ddraw_surface_set_palette (struct ddraw_surface *surface, IDirectDrawPalette *palette)
 
static void ddraw_surface_cleanup (struct ddraw_surface *surface)
 
static ULONG ddraw_surface_release_iface (struct ddraw_surface *This)
 
static ULONG WINAPI ddraw_surface7_Release (IDirectDrawSurface7 *iface)
 
static ULONG WINAPI ddraw_surface4_Release (IDirectDrawSurface4 *iface)
 
static ULONG WINAPI ddraw_surface3_Release (IDirectDrawSurface3 *iface)
 
static ULONG WINAPI ddraw_surface2_Release (IDirectDrawSurface2 *iface)
 
static ULONG WINAPI ddraw_surface1_Release (IDirectDrawSurface *iface)
 
static ULONG WINAPI ddraw_gamma_control_Release (IDirectDrawGammaControl *iface)
 
static ULONG WINAPI d3d_texture2_Release (IDirect3DTexture2 *iface)
 
static ULONG WINAPI d3d_texture1_Release (IDirect3DTexture *iface)
 
static HRESULT WINAPI ddraw_surface7_GetAttachedSurface (IDirectDrawSurface7 *iface, DDSCAPS2 *Caps, IDirectDrawSurface7 **Surface)
 
static HRESULT WINAPI ddraw_surface4_GetAttachedSurface (IDirectDrawSurface4 *iface, DDSCAPS2 *caps, IDirectDrawSurface4 **attachment)
 
static HRESULT WINAPI ddraw_surface3_GetAttachedSurface (IDirectDrawSurface3 *iface, DDSCAPS *caps, IDirectDrawSurface3 **attachment)
 
static HRESULT WINAPI ddraw_surface2_GetAttachedSurface (IDirectDrawSurface2 *iface, DDSCAPS *caps, IDirectDrawSurface2 **attachment)
 
static HRESULT WINAPI ddraw_surface1_GetAttachedSurface (IDirectDrawSurface *iface, DDSCAPS *caps, IDirectDrawSurface **attachment)
 
static HRESULT surface_lock (struct ddraw_surface *surface, RECT *rect, DDSURFACEDESC2 *surface_desc, unsigned int surface_desc_size, DWORD flags, HANDLE h)
 
static BOOL surface_validate_lock_desc (struct ddraw_surface *surface, const DDSURFACEDESC *desc, unsigned int *size)
 
static HRESULT WINAPI ddraw_surface7_Lock (IDirectDrawSurface7 *iface, RECT *rect, DDSURFACEDESC2 *surface_desc, DWORD flags, HANDLE h)
 
static HRESULT WINAPI ddraw_surface4_Lock (IDirectDrawSurface4 *iface, RECT *rect, DDSURFACEDESC2 *surface_desc, DWORD flags, HANDLE h)
 
static HRESULT WINAPI ddraw_surface3_Lock (IDirectDrawSurface3 *iface, RECT *rect, DDSURFACEDESC *surface_desc, DWORD flags, HANDLE h)
 
static HRESULT WINAPI ddraw_surface2_Lock (IDirectDrawSurface2 *iface, RECT *rect, DDSURFACEDESC *surface_desc, DWORD flags, HANDLE h)
 
static HRESULT WINAPI ddraw_surface1_Lock (IDirectDrawSurface *iface, RECT *rect, DDSURFACEDESC *surface_desc, DWORD flags, HANDLE h)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Unlock (IDirectDrawSurface7 *iface, RECT *pRect)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface4_Unlock (IDirectDrawSurface4 *iface, RECT *pRect)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface3_Unlock (IDirectDrawSurface3 *iface, void *data)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface2_Unlock (IDirectDrawSurface2 *iface, void *data)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface1_Unlock (IDirectDrawSurface *iface, void *data)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Flip (IDirectDrawSurface7 *iface, IDirectDrawSurface7 *src, DWORD flags)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface4_Flip (IDirectDrawSurface4 *iface, IDirectDrawSurface4 *src, DWORD flags)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface3_Flip (IDirectDrawSurface3 *iface, IDirectDrawSurface3 *src, DWORD flags)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface2_Flip (IDirectDrawSurface2 *iface, IDirectDrawSurface2 *src, DWORD flags)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface1_Flip (IDirectDrawSurface *iface, IDirectDrawSurface *src, DWORD flags)
 
static HRESULT ddraw_surface_blt (struct ddraw_surface *dst_surface, const RECT *dst_rect, struct ddraw_surface *src_surface, const RECT *src_rect, DWORD flags, DWORD fill_colour, const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter)
 
static HRESULT ddraw_surface_blt_clipped (struct ddraw_surface *dst_surface, const RECT *dst_rect_in, struct ddraw_surface *src_surface, const RECT *src_rect_in, DWORD flags, DWORD fill_colour, const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Blt (IDirectDrawSurface7 *iface, RECT *dst_rect, IDirectDrawSurface7 *src_surface, RECT *src_rect, DWORD flags, DDBLTFX *fx)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface4_Blt (IDirectDrawSurface4 *iface, RECT *dst_rect, IDirectDrawSurface4 *src_surface, RECT *src_rect, DWORD flags, DDBLTFX *fx)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface3_Blt (IDirectDrawSurface3 *iface, RECT *dst_rect, IDirectDrawSurface3 *src_surface, RECT *src_rect, DWORD flags, DDBLTFX *fx)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface2_Blt (IDirectDrawSurface2 *iface, RECT *dst_rect, IDirectDrawSurface2 *src_surface, RECT *src_rect, DWORD flags, DDBLTFX *fx)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface1_Blt (IDirectDrawSurface *iface, RECT *dst_rect, IDirectDrawSurface *src_surface, RECT *src_rect, DWORD flags, DDBLTFX *fx)
 
static HRESULT ddraw_surface_attach_surface (struct ddraw_surface *This, struct ddraw_surface *Surf)
 
static HRESULT WINAPI ddraw_surface7_AddAttachedSurface (IDirectDrawSurface7 *iface, IDirectDrawSurface7 *attachment)
 
static HRESULT WINAPI ddraw_surface4_AddAttachedSurface (IDirectDrawSurface4 *iface, IDirectDrawSurface4 *attachment)
 
static HRESULT WINAPI ddraw_surface3_AddAttachedSurface (IDirectDrawSurface3 *iface, IDirectDrawSurface3 *attachment)
 
static HRESULT WINAPI ddraw_surface2_AddAttachedSurface (IDirectDrawSurface2 *iface, IDirectDrawSurface2 *attachment)
 
static HRESULT WINAPI ddraw_surface1_AddAttachedSurface (IDirectDrawSurface *iface, IDirectDrawSurface *attachment)
 
static HRESULT ddraw_surface_delete_attached_surface (struct ddraw_surface *surface, struct ddraw_surface *attachment, IUnknown *detach_iface)
 
static HRESULT WINAPI ddraw_surface7_DeleteAttachedSurface (IDirectDrawSurface7 *iface, DWORD flags, IDirectDrawSurface7 *attachment)
 
static HRESULT WINAPI ddraw_surface4_DeleteAttachedSurface (IDirectDrawSurface4 *iface, DWORD flags, IDirectDrawSurface4 *attachment)
 
static HRESULT WINAPI ddraw_surface3_DeleteAttachedSurface (IDirectDrawSurface3 *iface, DWORD flags, IDirectDrawSurface3 *attachment)
 
static HRESULT WINAPI ddraw_surface2_DeleteAttachedSurface (IDirectDrawSurface2 *iface, DWORD flags, IDirectDrawSurface2 *attachment)
 
static HRESULT WINAPI ddraw_surface1_DeleteAttachedSurface (IDirectDrawSurface *iface, DWORD flags, IDirectDrawSurface *attachment)
 
static HRESULT WINAPI ddraw_surface7_AddOverlayDirtyRect (IDirectDrawSurface7 *iface, RECT *Rect)
 
static HRESULT WINAPI ddraw_surface4_AddOverlayDirtyRect (IDirectDrawSurface4 *iface, RECT *rect)
 
static HRESULT WINAPI ddraw_surface3_AddOverlayDirtyRect (IDirectDrawSurface3 *iface, RECT *rect)
 
static HRESULT WINAPI ddraw_surface2_AddOverlayDirtyRect (IDirectDrawSurface2 *iface, RECT *rect)
 
static HRESULT WINAPI ddraw_surface1_AddOverlayDirtyRect (IDirectDrawSurface *iface, RECT *rect)
 
static HRESULT WINAPI ddraw_surface7_GetDC (IDirectDrawSurface7 *iface, HDC *dc)
 
static HRESULT WINAPI ddraw_surface4_GetDC (IDirectDrawSurface4 *iface, HDC *dc)
 
static HRESULT WINAPI ddraw_surface3_GetDC (IDirectDrawSurface3 *iface, HDC *dc)
 
static HRESULT WINAPI ddraw_surface2_GetDC (IDirectDrawSurface2 *iface, HDC *dc)
 
static HRESULT WINAPI ddraw_surface1_GetDC (IDirectDrawSurface *iface, HDC *dc)
 
static HRESULT WINAPI ddraw_surface7_ReleaseDC (IDirectDrawSurface7 *iface, HDC hdc)
 
static HRESULT WINAPI ddraw_surface4_ReleaseDC (IDirectDrawSurface4 *iface, HDC dc)
 
static HRESULT WINAPI ddraw_surface3_ReleaseDC (IDirectDrawSurface3 *iface, HDC dc)
 
static HRESULT WINAPI ddraw_surface2_ReleaseDC (IDirectDrawSurface2 *iface, HDC dc)
 
static HRESULT WINAPI ddraw_surface1_ReleaseDC (IDirectDrawSurface *iface, HDC dc)
 
static HRESULT WINAPI ddraw_surface7_GetCaps (IDirectDrawSurface7 *iface, DDSCAPS2 *Caps)
 
static HRESULT WINAPI ddraw_surface4_GetCaps (IDirectDrawSurface4 *iface, DDSCAPS2 *caps)
 
static HRESULT WINAPI ddraw_surface3_GetCaps (IDirectDrawSurface3 *iface, DDSCAPS *caps)
 
static HRESULT WINAPI ddraw_surface2_GetCaps (IDirectDrawSurface2 *iface, DDSCAPS *caps)
 
static HRESULT WINAPI ddraw_surface1_GetCaps (IDirectDrawSurface *iface, DDSCAPS *caps)
 
static HRESULT WINAPI ddraw_surface7_SetPriority (IDirectDrawSurface7 *iface, DWORD priority)
 
static HRESULT WINAPI ddraw_surface7_GetPriority (IDirectDrawSurface7 *iface, DWORD *priority)
 
static HRESULT WINAPI ddraw_surface7_SetPrivateData (IDirectDrawSurface7 *iface, REFGUID tag, void *data, DWORD size, DWORD flags)
 
static HRESULT WINAPI ddraw_surface4_SetPrivateData (IDirectDrawSurface4 *iface, REFGUID tag, void *data, DWORD size, DWORD flags)
 
static HRESULT WINAPI ddraw_surface7_GetPrivateData (IDirectDrawSurface7 *iface, REFGUID tag, void *data, DWORD *size)
 
static HRESULT WINAPI ddraw_surface4_GetPrivateData (IDirectDrawSurface4 *iface, REFGUID tag, void *data, DWORD *size)
 
static HRESULT WINAPI ddraw_surface7_FreePrivateData (IDirectDrawSurface7 *iface, REFGUID tag)
 
static HRESULT WINAPI ddraw_surface4_FreePrivateData (IDirectDrawSurface4 *iface, REFGUID tag)
 
static HRESULT WINAPI ddraw_surface7_PageLock (IDirectDrawSurface7 *iface, DWORD Flags)
 
static HRESULT WINAPI ddraw_surface4_PageLock (IDirectDrawSurface4 *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface3_PageLock (IDirectDrawSurface3 *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface2_PageLock (IDirectDrawSurface2 *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface7_PageUnlock (IDirectDrawSurface7 *iface, DWORD Flags)
 
static HRESULT WINAPI ddraw_surface4_PageUnlock (IDirectDrawSurface4 *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface3_PageUnlock (IDirectDrawSurface3 *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface2_PageUnlock (IDirectDrawSurface2 *iface, DWORD flags)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_BltBatch (IDirectDrawSurface7 *iface, DDBLTBATCH *Batch, DWORD Count, DWORD Flags)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface4_BltBatch (IDirectDrawSurface4 *iface, DDBLTBATCH *batch, DWORD count, DWORD flags)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface3_BltBatch (IDirectDrawSurface3 *iface, DDBLTBATCH *batch, DWORD count, DWORD flags)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface2_BltBatch (IDirectDrawSurface2 *iface, DDBLTBATCH *batch, DWORD count, DWORD flags)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface1_BltBatch (IDirectDrawSurface *iface, DDBLTBATCH *batch, DWORD count, DWORD flags)
 
static HRESULT WINAPI ddraw_surface7_EnumAttachedSurfaces (IDirectDrawSurface7 *iface, void *context, LPDDENUMSURFACESCALLBACK7 cb)
 
static HRESULT CALLBACK EnumCallback2 (IDirectDrawSurface7 *surface, DDSURFACEDESC2 *surface_desc, void *context)
 
static HRESULT CALLBACK EnumCallback (IDirectDrawSurface7 *surface, DDSURFACEDESC2 *surface_desc, void *context)
 
static HRESULT WINAPI ddraw_surface4_EnumAttachedSurfaces (IDirectDrawSurface4 *iface, void *context, LPDDENUMSURFACESCALLBACK2 callback)
 
static HRESULT WINAPI ddraw_surface3_EnumAttachedSurfaces (IDirectDrawSurface3 *iface, void *context, LPDDENUMSURFACESCALLBACK callback)
 
static HRESULT WINAPI ddraw_surface2_EnumAttachedSurfaces (IDirectDrawSurface2 *iface, void *context, LPDDENUMSURFACESCALLBACK callback)
 
static HRESULT WINAPI ddraw_surface1_EnumAttachedSurfaces (IDirectDrawSurface *iface, void *context, LPDDENUMSURFACESCALLBACK callback)
 
static HRESULT WINAPI ddraw_surface7_EnumOverlayZOrders (IDirectDrawSurface7 *iface, DWORD Flags, void *context, LPDDENUMSURFACESCALLBACK7 cb)
 
static HRESULT WINAPI ddraw_surface4_EnumOverlayZOrders (IDirectDrawSurface4 *iface, DWORD flags, void *context, LPDDENUMSURFACESCALLBACK2 callback)
 
static HRESULT WINAPI ddraw_surface3_EnumOverlayZOrders (IDirectDrawSurface3 *iface, DWORD flags, void *context, LPDDENUMSURFACESCALLBACK callback)
 
static HRESULT WINAPI ddraw_surface2_EnumOverlayZOrders (IDirectDrawSurface2 *iface, DWORD flags, void *context, LPDDENUMSURFACESCALLBACK callback)
 
static HRESULT WINAPI ddraw_surface1_EnumOverlayZOrders (IDirectDrawSurface *iface, DWORD flags, void *context, LPDDENUMSURFACESCALLBACK callback)
 
static HRESULT WINAPI ddraw_surface7_GetBltStatus (IDirectDrawSurface7 *iface, DWORD Flags)
 
static HRESULT WINAPI ddraw_surface4_GetBltStatus (IDirectDrawSurface4 *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface3_GetBltStatus (IDirectDrawSurface3 *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface2_GetBltStatus (IDirectDrawSurface2 *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface1_GetBltStatus (IDirectDrawSurface *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface7_GetColorKey (IDirectDrawSurface7 *iface, DWORD Flags, DDCOLORKEY *CKey)
 
static HRESULT WINAPI ddraw_surface4_GetColorKey (IDirectDrawSurface4 *iface, DWORD flags, DDCOLORKEY *color_key)
 
static HRESULT WINAPI ddraw_surface3_GetColorKey (IDirectDrawSurface3 *iface, DWORD flags, DDCOLORKEY *color_key)
 
static HRESULT WINAPI ddraw_surface2_GetColorKey (IDirectDrawSurface2 *iface, DWORD flags, DDCOLORKEY *color_key)
 
static HRESULT WINAPI ddraw_surface1_GetColorKey (IDirectDrawSurface *iface, DWORD flags, DDCOLORKEY *color_key)
 
static HRESULT WINAPI ddraw_surface7_GetFlipStatus (IDirectDrawSurface7 *iface, DWORD Flags)
 
static HRESULT WINAPI ddraw_surface4_GetFlipStatus (IDirectDrawSurface4 *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface3_GetFlipStatus (IDirectDrawSurface3 *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface2_GetFlipStatus (IDirectDrawSurface2 *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface1_GetFlipStatus (IDirectDrawSurface *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface7_GetOverlayPosition (IDirectDrawSurface7 *iface, LONG *x, LONG *y)
 
static HRESULT WINAPI ddraw_surface4_GetOverlayPosition (IDirectDrawSurface4 *iface, LONG *x, LONG *y)
 
static HRESULT WINAPI ddraw_surface3_GetOverlayPosition (IDirectDrawSurface3 *iface, LONG *x, LONG *y)
 
static HRESULT WINAPI ddraw_surface2_GetOverlayPosition (IDirectDrawSurface2 *iface, LONG *x, LONG *y)
 
static HRESULT WINAPI ddraw_surface1_GetOverlayPosition (IDirectDrawSurface *iface, LONG *x, LONG *y)
 
static HRESULT WINAPI ddraw_surface7_GetPixelFormat (IDirectDrawSurface7 *iface, DDPIXELFORMAT *PixelFormat)
 
static HRESULT WINAPI ddraw_surface4_GetPixelFormat (IDirectDrawSurface4 *iface, DDPIXELFORMAT *pixel_format)
 
static HRESULT WINAPI ddraw_surface3_GetPixelFormat (IDirectDrawSurface3 *iface, DDPIXELFORMAT *pixel_format)
 
static HRESULT WINAPI ddraw_surface2_GetPixelFormat (IDirectDrawSurface2 *iface, DDPIXELFORMAT *pixel_format)
 
static HRESULT WINAPI ddraw_surface1_GetPixelFormat (IDirectDrawSurface *iface, DDPIXELFORMAT *pixel_format)
 
static HRESULT WINAPI ddraw_surface7_GetSurfaceDesc (IDirectDrawSurface7 *iface, DDSURFACEDESC2 *DDSD)
 
static HRESULT WINAPI ddraw_surface4_GetSurfaceDesc (IDirectDrawSurface4 *iface, DDSURFACEDESC2 *DDSD)
 
static HRESULT WINAPI ddraw_surface3_GetSurfaceDesc (IDirectDrawSurface3 *iface, DDSURFACEDESC *surface_desc)
 
static HRESULT WINAPI ddraw_surface2_GetSurfaceDesc (IDirectDrawSurface2 *iface, DDSURFACEDESC *DDSD)
 
static HRESULT WINAPI ddraw_surface1_GetSurfaceDesc (IDirectDrawSurface *iface, DDSURFACEDESC *DDSD)
 
static HRESULT WINAPI ddraw_surface7_Initialize (IDirectDrawSurface7 *iface, IDirectDraw *ddraw, DDSURFACEDESC2 *surface_desc)
 
static HRESULT WINAPI ddraw_surface4_Initialize (IDirectDrawSurface4 *iface, IDirectDraw *ddraw, DDSURFACEDESC2 *surface_desc)
 
static HRESULT WINAPI ddraw_surface3_Initialize (IDirectDrawSurface3 *iface, IDirectDraw *ddraw, DDSURFACEDESC *surface_desc)
 
static HRESULT WINAPI ddraw_surface2_Initialize (IDirectDrawSurface2 *iface, IDirectDraw *ddraw, DDSURFACEDESC *surface_desc)
 
static HRESULT WINAPI ddraw_surface1_Initialize (IDirectDrawSurface *iface, IDirectDraw *ddraw, DDSURFACEDESC *surface_desc)
 
static HRESULT WINAPI d3d_texture1_Initialize (IDirect3DTexture *iface, IDirect3DDevice *device, IDirectDrawSurface *surface)
 
static HRESULT WINAPI ddraw_surface7_IsLost (IDirectDrawSurface7 *iface)
 
static HRESULT WINAPI ddraw_surface4_IsLost (IDirectDrawSurface4 *iface)
 
static HRESULT WINAPI ddraw_surface3_IsLost (IDirectDrawSurface3 *iface)
 
static HRESULT WINAPI ddraw_surface2_IsLost (IDirectDrawSurface2 *iface)
 
static HRESULT WINAPI ddraw_surface1_IsLost (IDirectDrawSurface *iface)
 
static HRESULT WINAPI ddraw_surface7_Restore (IDirectDrawSurface7 *iface)
 
static HRESULT WINAPI ddraw_surface4_Restore (IDirectDrawSurface4 *iface)
 
static HRESULT WINAPI ddraw_surface3_Restore (IDirectDrawSurface3 *iface)
 
static HRESULT WINAPI ddraw_surface2_Restore (IDirectDrawSurface2 *iface)
 
static HRESULT WINAPI ddraw_surface1_Restore (IDirectDrawSurface *iface)
 
static HRESULT WINAPI ddraw_surface7_SetOverlayPosition (IDirectDrawSurface7 *iface, LONG x, LONG y)
 
static HRESULT WINAPI ddraw_surface4_SetOverlayPosition (IDirectDrawSurface4 *iface, LONG x, LONG y)
 
static HRESULT WINAPI ddraw_surface3_SetOverlayPosition (IDirectDrawSurface3 *iface, LONG x, LONG y)
 
static HRESULT WINAPI ddraw_surface2_SetOverlayPosition (IDirectDrawSurface2 *iface, LONG x, LONG y)
 
static HRESULT WINAPI ddraw_surface1_SetOverlayPosition (IDirectDrawSurface *iface, LONG x, LONG y)
 
static HRESULT WINAPI ddraw_surface7_UpdateOverlay (IDirectDrawSurface7 *iface, RECT *src_rect, IDirectDrawSurface7 *dst_surface, RECT *dst_rect, DWORD flags, DDOVERLAYFX *fx)
 
static HRESULT WINAPI ddraw_surface4_UpdateOverlay (IDirectDrawSurface4 *iface, RECT *src_rect, IDirectDrawSurface4 *dst_surface, RECT *dst_rect, DWORD flags, DDOVERLAYFX *fx)
 
static HRESULT WINAPI ddraw_surface3_UpdateOverlay (IDirectDrawSurface3 *iface, RECT *src_rect, IDirectDrawSurface3 *dst_surface, RECT *dst_rect, DWORD flags, DDOVERLAYFX *fx)
 
static HRESULT WINAPI ddraw_surface2_UpdateOverlay (IDirectDrawSurface2 *iface, RECT *src_rect, IDirectDrawSurface2 *dst_surface, RECT *dst_rect, DWORD flags, DDOVERLAYFX *fx)
 
static HRESULT WINAPI ddraw_surface1_UpdateOverlay (IDirectDrawSurface *iface, RECT *src_rect, IDirectDrawSurface *dst_surface, RECT *dst_rect, DWORD flags, DDOVERLAYFX *fx)
 
static HRESULT WINAPI ddraw_surface7_UpdateOverlayDisplay (IDirectDrawSurface7 *iface, DWORD Flags)
 
static HRESULT WINAPI ddraw_surface4_UpdateOverlayDisplay (IDirectDrawSurface4 *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface3_UpdateOverlayDisplay (IDirectDrawSurface3 *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface2_UpdateOverlayDisplay (IDirectDrawSurface2 *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface1_UpdateOverlayDisplay (IDirectDrawSurface *iface, DWORD flags)
 
static HRESULT WINAPI ddraw_surface7_UpdateOverlayZOrder (IDirectDrawSurface7 *iface, DWORD flags, IDirectDrawSurface7 *reference)
 
static HRESULT WINAPI ddraw_surface4_UpdateOverlayZOrder (IDirectDrawSurface4 *iface, DWORD flags, IDirectDrawSurface4 *reference)
 
static HRESULT WINAPI ddraw_surface3_UpdateOverlayZOrder (IDirectDrawSurface3 *iface, DWORD flags, IDirectDrawSurface3 *reference)
 
static HRESULT WINAPI ddraw_surface2_UpdateOverlayZOrder (IDirectDrawSurface2 *iface, DWORD flags, IDirectDrawSurface2 *reference)
 
static HRESULT WINAPI ddraw_surface1_UpdateOverlayZOrder (IDirectDrawSurface *iface, DWORD flags, IDirectDrawSurface *reference)
 
static HRESULT WINAPI ddraw_surface7_GetDDInterface (IDirectDrawSurface7 *iface, void **DD)
 
static HRESULT WINAPI ddraw_surface4_GetDDInterface (IDirectDrawSurface4 *iface, void **ddraw)
 
static HRESULT WINAPI ddraw_surface3_GetDDInterface (IDirectDrawSurface3 *iface, void **ddraw)
 
static HRESULT WINAPI ddraw_surface2_GetDDInterface (IDirectDrawSurface2 *iface, void **ddraw)
 
static HRESULT WINAPI ddraw_surface7_ChangeUniquenessValue (IDirectDrawSurface7 *iface)
 
static HRESULT WINAPI ddraw_surface4_ChangeUniquenessValue (IDirectDrawSurface4 *iface)
 
static HRESULT WINAPI ddraw_surface7_GetUniquenessValue (IDirectDrawSurface7 *iface, DWORD *pValue)
 
static HRESULT WINAPI ddraw_surface4_GetUniquenessValue (IDirectDrawSurface4 *iface, DWORD *pValue)
 
static HRESULT WINAPI ddraw_surface7_SetLOD (IDirectDrawSurface7 *iface, DWORD MaxLOD)
 
static HRESULT WINAPI ddraw_surface7_GetLOD (IDirectDrawSurface7 *iface, DWORD *MaxLOD)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_BltFast (IDirectDrawSurface7 *iface, DWORD dst_x, DWORD dst_y, IDirectDrawSurface7 *src_surface, RECT *src_rect, DWORD trans)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface4_BltFast (IDirectDrawSurface4 *iface, DWORD dst_x, DWORD dst_y, IDirectDrawSurface4 *src_surface, RECT *src_rect, DWORD flags)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface3_BltFast (IDirectDrawSurface3 *iface, DWORD dst_x, DWORD dst_y, IDirectDrawSurface3 *src_surface, RECT *src_rect, DWORD flags)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface2_BltFast (IDirectDrawSurface2 *iface, DWORD dst_x, DWORD dst_y, IDirectDrawSurface2 *src_surface, RECT *src_rect, DWORD flags)
 
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface1_BltFast (IDirectDrawSurface *iface, DWORD dst_x, DWORD dst_y, IDirectDrawSurface *src_surface, RECT *src_rect, DWORD flags)
 
static HRESULT WINAPI ddraw_surface7_GetClipper (IDirectDrawSurface7 *iface, IDirectDrawClipper **Clipper)
 
static HRESULT WINAPI ddraw_surface4_GetClipper (IDirectDrawSurface4 *iface, IDirectDrawClipper **clipper)
 
static HRESULT WINAPI ddraw_surface3_GetClipper (IDirectDrawSurface3 *iface, IDirectDrawClipper **clipper)
 
static HRESULT WINAPI ddraw_surface2_GetClipper (IDirectDrawSurface2 *iface, IDirectDrawClipper **clipper)
 
static HRESULT WINAPI ddraw_surface1_GetClipper (IDirectDrawSurface *iface, IDirectDrawClipper **clipper)
 
static HRESULT WINAPI ddraw_surface7_SetClipper (IDirectDrawSurface7 *iface, IDirectDrawClipper *iclipper)
 
static HRESULT WINAPI ddraw_surface4_SetClipper (IDirectDrawSurface4 *iface, IDirectDrawClipper *clipper)
 
static HRESULT WINAPI ddraw_surface3_SetClipper (IDirectDrawSurface3 *iface, IDirectDrawClipper *clipper)
 
static HRESULT WINAPI ddraw_surface2_SetClipper (IDirectDrawSurface2 *iface, IDirectDrawClipper *clipper)
 
static HRESULT WINAPI ddraw_surface1_SetClipper (IDirectDrawSurface *iface, IDirectDrawClipper *clipper)
 
static HRESULT WINAPI ddraw_surface7_SetSurfaceDesc (IDirectDrawSurface7 *iface, DDSURFACEDESC2 *DDSD, DWORD Flags)
 
static HRESULT WINAPI ddraw_surface4_SetSurfaceDesc (IDirectDrawSurface4 *iface, DDSURFACEDESC2 *surface_desc, DWORD flags)
 
static HRESULT WINAPI ddraw_surface3_SetSurfaceDesc (IDirectDrawSurface3 *iface, DDSURFACEDESC *surface_desc, DWORD flags)
 
static HRESULT WINAPI ddraw_surface7_GetPalette (IDirectDrawSurface7 *iface, IDirectDrawPalette **palette)
 
static HRESULT WINAPI ddraw_surface4_GetPalette (IDirectDrawSurface4 *iface, IDirectDrawPalette **palette)
 
static HRESULT WINAPI ddraw_surface3_GetPalette (IDirectDrawSurface3 *iface, IDirectDrawPalette **palette)
 
static HRESULT WINAPI ddraw_surface2_GetPalette (IDirectDrawSurface2 *iface, IDirectDrawPalette **palette)
 
static HRESULT WINAPI ddraw_surface1_GetPalette (IDirectDrawSurface *iface, IDirectDrawPalette **palette)
 
static HRESULT ddraw_surface_set_color_key (struct ddraw_surface *surface, DWORD flags, DDCOLORKEY *color_key)
 
static HRESULT WINAPI ddraw_surface7_SetColorKey (IDirectDrawSurface7 *iface, DWORD flags, DDCOLORKEY *color_key)
 
static HRESULT WINAPI ddraw_surface4_SetColorKey (IDirectDrawSurface4 *iface, DWORD flags, DDCOLORKEY *color_key)
 
static HRESULT WINAPI ddraw_surface3_SetColorKey (IDirectDrawSurface3 *iface, DWORD flags, DDCOLORKEY *color_key)
 
static HRESULT WINAPI ddraw_surface2_SetColorKey (IDirectDrawSurface2 *iface, DWORD flags, DDCOLORKEY *color_key)
 
static HRESULT WINAPI ddraw_surface1_SetColorKey (IDirectDrawSurface *iface, DWORD flags, DDCOLORKEY *color_key)
 
static HRESULT WINAPI ddraw_surface7_SetPalette (IDirectDrawSurface7 *iface, IDirectDrawPalette *palette)
 
static HRESULT WINAPI ddraw_surface4_SetPalette (IDirectDrawSurface4 *iface, IDirectDrawPalette *palette)
 
static HRESULT WINAPI ddraw_surface3_SetPalette (IDirectDrawSurface3 *iface, IDirectDrawPalette *palette)
 
static HRESULT WINAPI ddraw_surface2_SetPalette (IDirectDrawSurface2 *iface, IDirectDrawPalette *palette)
 
static HRESULT WINAPI ddraw_surface1_SetPalette (IDirectDrawSurface *iface, IDirectDrawPalette *palette)
 
static HRESULT WINAPI ddraw_gamma_control_GetGammaRamp (IDirectDrawGammaControl *iface, DWORD flags, DDGAMMARAMP *gamma_ramp)
 
static HRESULT WINAPI ddraw_gamma_control_SetGammaRamp (IDirectDrawGammaControl *iface, DWORD flags, DDGAMMARAMP *gamma_ramp)
 
static HRESULT WINAPI d3d_texture2_PaletteChanged (IDirect3DTexture2 *iface, DWORD start, DWORD count)
 
static HRESULT WINAPI d3d_texture1_PaletteChanged (IDirect3DTexture *iface, DWORD start, DWORD count)
 
static HRESULT WINAPI d3d_texture1_Unload (IDirect3DTexture *iface)
 
static HRESULT WINAPI d3d_texture2_GetHandle (IDirect3DTexture2 *iface, IDirect3DDevice2 *device, D3DTEXTUREHANDLE *handle)
 
static HRESULT WINAPI d3d_texture1_GetHandle (IDirect3DTexture *iface, IDirect3DDevice *device, D3DTEXTUREHANDLE *handle)
 
static struct ddraw_surfaceget_sub_mimaplevel (struct ddraw_surface *surface)
 
static BOOL compare_format (DDPIXELFORMAT *format1, DDPIXELFORMAT *format2)
 
static HRESULT WINAPI d3d_texture2_Load (IDirect3DTexture2 *iface, IDirect3DTexture2 *src_texture)
 
static HRESULT WINAPI d3d_texture1_Load (IDirect3DTexture *iface, IDirect3DTexture *src_texture)
 
struct ddraw_surfaceunsafe_impl_from_IDirectDrawSurface7 (IDirectDrawSurface7 *iface)
 
struct ddraw_surfaceunsafe_impl_from_IDirectDrawSurface4 (IDirectDrawSurface4 *iface)
 
struct ddraw_surfaceunsafe_impl_from_IDirectDrawSurface (IDirectDrawSurface *iface)
 
struct ddraw_surfaceunsafe_impl_from_IDirect3DTexture2 (IDirect3DTexture2 *iface)
 
struct ddraw_surfaceunsafe_impl_from_IDirect3DTexture (IDirect3DTexture *iface)
 
static void STDMETHODCALLTYPE ddraw_surface_wined3d_object_destroyed (void *parent)
 
static void STDMETHODCALLTYPE ddraw_texture_wined3d_object_destroyed (void *parent)
 
static HRESULT CDECL ddraw_reset_enum_callback (struct wined3d_resource *resource)
 
HRESULT ddraw_surface_create (struct ddraw *ddraw, const DDSURFACEDESC2 *surface_desc, struct ddraw_surface **surface, IUnknown *outer_unknown, unsigned int version)
 
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)
 
static void STDMETHODCALLTYPE view_wined3d_object_destroyed (void *parent)
 
struct wined3d_rendertarget_viewddraw_surface_get_rendertarget_view (struct ddraw_surface *surface)
 

Variables

static const struct IDirectDrawSurface7Vtbl ddraw_surface7_vtbl
 
static const struct IDirectDrawSurface4Vtbl ddraw_surface4_vtbl
 
static const struct IDirectDrawSurface3Vtbl ddraw_surface3_vtbl
 
static const struct IDirectDrawSurface2Vtbl ddraw_surface2_vtbl
 
static struct IDirectDrawSurfaceVtbl ddraw_surface1_vtbl
 
static const struct IDirectDrawGammaControlVtbl ddraw_gamma_control_vtbl
 
static const struct IDirect3DTexture2Vtbl d3d_texture2_vtbl
 
static const struct IDirect3DTextureVtbl d3d_texture1_vtbl
 
static const struct wined3d_parent_ops ddraw_surface_wined3d_parent_ops
 
static const struct wined3d_parent_ops ddraw_texture_wined3d_parent_ops
 
static const struct wined3d_parent_ops ddraw_view_wined3d_parent_ops
 

Function Documentation

◆ compare_format()

static BOOL compare_format ( DDPIXELFORMAT format1,
DDPIXELFORMAT format2 
)
static

Definition at line 5192 of file surface.c.

5193 {
5194  if ((format1->dwFlags & (DDPF_RGB|DDPF_YUV|DDPF_FOURCC)) !=
5195  (format2->dwFlags & (DDPF_RGB|DDPF_YUV|DDPF_FOURCC)))
5196  return FALSE;
5197 
5198  if (format1->dwFlags & (DDPF_RGB|DDPF_YUV))
5199  {
5200  if (!(format1->dwFlags & DDPF_ALPHA))
5201  {
5202  /* The RGB and YUV bits are stored in the same fields */
5203  if (format1->u1.dwRGBBitCount != format2->u1.dwRGBBitCount)
5204  return FALSE;
5205 
5206  if (format1->u2.dwRBitMask != format2->u2.dwRBitMask)
5207  return FALSE;
5208 
5209  if (format1->u3.dwGBitMask != format2->u3.dwGBitMask)
5210  return FALSE;
5211 
5212  if (format1->u4.dwBBitMask != format2->u4.dwBBitMask)
5213  return FALSE;
5214  }
5215 
5216  if (format1->dwFlags & (DDPF_ALPHAPIXELS | DDPF_ALPHA))
5217  {
5218  if (format1->u5.dwRGBAlphaBitMask != format2->u5.dwRGBAlphaBitMask)
5219  return FALSE;
5220  }
5221  }
5222 
5223  if (format1->dwFlags & DDPF_FOURCC)
5224  {
5225  if (format1->dwFourCC != format2->dwFourCC)
5226  return FALSE;
5227  }
5228 
5229  return TRUE;
5230 }
#define TRUE
Definition: types.h:120
DWORD dwFlags
Definition: ddraw.h:1071
#define DDPF_ALPHA
Definition: ddraw.h:502
DWORD dwGBitMask
Definition: ddraw.h:1094
#define DDPF_FOURCC
Definition: ddraw.h:503
DWORD dwRGBBitCount
Definition: ddraw.h:1075
#define DDPF_RGB
Definition: ddraw.h:507
DWORD dwRBitMask
Definition: ddraw.h:1085
#define DDPF_ALPHAPIXELS
Definition: ddraw.h:501
DWORD dwFourCC
Definition: ddraw.h:1072
DWORD dwBBitMask
Definition: ddraw.h:1106
#define DDPF_YUV
Definition: ddraw.h:510
DWORD dwRGBAlphaBitMask
Definition: ddraw.h:1113

Referenced by d3d_texture2_Load().

◆ d3d_texture1_AddRef()

static ULONG WINAPI d3d_texture1_AddRef ( IDirect3DTexture *  iface)
static

Definition at line 440 of file surface.c.

441 {
442  struct ddraw_surface *surface = impl_from_IDirect3DTexture(iface);
443 
444  TRACE("iface %p.\n", iface);
445 
446  return IUnknown_AddRef(surface->texture_outer);
447 }
IUnknown * texture_outer
#define TRACE(s)
Definition: solgame.cpp:4
static struct ddraw_surface * impl_from_IDirect3DTexture(IDirect3DTexture *iface)

◆ d3d_texture1_GetHandle()

static HRESULT WINAPI d3d_texture1_GetHandle ( IDirect3DTexture *  iface,
IDirect3DDevice *  device,
D3DTEXTUREHANDLE handle 
)
static

Definition at line 5157 of file surface.c.

5159 {
5160  struct ddraw_surface *surface = impl_from_IDirect3DTexture(iface);
5161  struct d3d_device *device_impl = unsafe_impl_from_IDirect3DDevice(device);
5162 
5163  TRACE("iface %p, device %p, handle %p.\n", iface, device, handle);
5164 
5166  device_impl ? &device_impl->IDirect3DDevice2_iface : NULL, handle);
5167 }
IDirect3DTexture2 IDirect3DTexture2_iface
struct d3d_device * unsafe_impl_from_IDirect3DDevice(IDirect3DDevice *iface) DECLSPEC_HIDDEN
Definition: device.c:6871
static HRESULT WINAPI d3d_texture2_GetHandle(IDirect3DTexture2 *iface, IDirect3DDevice2 *device, D3DTEXTUREHANDLE *handle)
Definition: surface.c:5126
Definition: devices.h:37
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
static struct ddraw_surface * impl_from_IDirect3DTexture(IDirect3DTexture *iface)
IDirect3DDevice2 IDirect3DDevice2_iface

◆ d3d_texture1_Initialize()

static HRESULT WINAPI d3d_texture1_Initialize ( IDirect3DTexture *  iface,
IDirect3DDevice *  device,
IDirectDrawSurface *  surface 
)
static

Definition at line 3594 of file surface.c.

3596 {
3597  TRACE("iface %p, device %p, surface %p.\n", iface, device, surface);
3598 
3599  return DDERR_UNSUPPORTED; /* Unchecked */
3600 }
#define DDERR_UNSUPPORTED
Definition: ddraw.h:127
Definition: devices.h:37
#define TRACE(s)
Definition: solgame.cpp:4

◆ d3d_texture1_Load()

static HRESULT WINAPI d3d_texture1_Load ( IDirect3DTexture *  iface,
IDirect3DTexture *  src_texture 
)
static

Definition at line 5344 of file surface.c.

5345 {
5346  struct ddraw_surface *dst_surface = impl_from_IDirect3DTexture(iface);
5347  struct ddraw_surface *src_surface = unsafe_impl_from_IDirect3DTexture(src_texture);
5348 
5349  TRACE("iface %p, src_texture %p.\n", iface, src_texture);
5350 
5351  return d3d_texture2_Load(&dst_surface->IDirect3DTexture2_iface,
5352  src_surface ? &src_surface->IDirect3DTexture2_iface : NULL);
5353 }
IDirect3DTexture2 IDirect3DTexture2_iface
static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTexture2 *src_texture)
Definition: surface.c:5249
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
struct ddraw_surface * unsafe_impl_from_IDirect3DTexture(IDirect3DTexture *iface)
Definition: surface.c:5728
static struct ddraw_surface * impl_from_IDirect3DTexture(IDirect3DTexture *iface)

◆ d3d_texture1_PaletteChanged()

static HRESULT WINAPI d3d_texture1_PaletteChanged ( IDirect3DTexture *  iface,
DWORD  start,
DWORD  count 
)
static

Definition at line 5087 of file surface.c.

5088 {
5089  struct ddraw_surface *surface = impl_from_IDirect3DTexture(iface);
5090 
5091  TRACE("iface %p, start %u, count %u.\n", iface, start, count);
5092 
5094 }
IDirect3DTexture2 IDirect3DTexture2_iface
GLuint GLuint GLsizei count
Definition: gl.h:1545
static HRESULT WINAPI d3d_texture2_PaletteChanged(IDirect3DTexture2 *iface, DWORD start, DWORD count)
Definition: surface.c:5080
#define TRACE(s)
Definition: solgame.cpp:4
GLuint start
Definition: gl.h:1545
static struct ddraw_surface * impl_from_IDirect3DTexture(IDirect3DTexture *iface)

◆ d3d_texture1_QueryInterface()

static HRESULT WINAPI d3d_texture1_QueryInterface ( IDirect3DTexture *  iface,
REFIID  riid,
void **  object 
)
static

Definition at line 306 of file surface.c.

307 {
308  struct ddraw_surface *surface = impl_from_IDirect3DTexture(iface);
309 
310  TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
311 
313 }
REFIID riid
Definition: precomp.h:44
static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface, REFIID riid, void **obj)
Definition: surface.c:133
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface7 IDirectDrawSurface7_iface
static struct ddraw_surface * impl_from_IDirect3DTexture(IDirect3DTexture *iface)

◆ d3d_texture1_Release()

static ULONG WINAPI d3d_texture1_Release ( IDirect3DTexture *  iface)
static

Definition at line 700 of file surface.c.

701 {
702  struct ddraw_surface *surface = impl_from_IDirect3DTexture(iface);
703 
704  TRACE("iface %p.\n", iface);
705 
706  return IUnknown_Release(surface->texture_outer);
707 }
IUnknown * texture_outer
#define TRACE(s)
Definition: solgame.cpp:4
static struct ddraw_surface * impl_from_IDirect3DTexture(IDirect3DTexture *iface)

◆ d3d_texture1_Unload()

static HRESULT WINAPI d3d_texture1_Unload ( IDirect3DTexture *  iface)
static

Definition at line 5106 of file surface.c.

5107 {
5108  WARN("iface %p. Not implemented.\n", iface);
5109 
5110  return DDERR_UNSUPPORTED;
5111 }
#define DDERR_UNSUPPORTED
Definition: ddraw.h:127
#define WARN(fmt,...)
Definition: debug.h:111

◆ d3d_texture2_AddRef()

static ULONG WINAPI d3d_texture2_AddRef ( IDirect3DTexture2 *  iface)
static

Definition at line 431 of file surface.c.

432 {
433  struct ddraw_surface *surface = impl_from_IDirect3DTexture2(iface);
434 
435  TRACE("iface %p.\n", iface);
436 
437  return IUnknown_AddRef(surface->texture_outer);
438 }
IUnknown * texture_outer
static struct ddraw_surface * impl_from_IDirect3DTexture2(IDirect3DTexture2 *iface)
#define TRACE(s)
Definition: solgame.cpp:4

◆ d3d_texture2_GetHandle()

static HRESULT WINAPI d3d_texture2_GetHandle ( IDirect3DTexture2 *  iface,
IDirect3DDevice2 *  device,
D3DTEXTUREHANDLE handle 
)
static

Definition at line 5126 of file surface.c.

5128 {
5129  struct ddraw_surface *surface = impl_from_IDirect3DTexture2(iface);
5130  struct d3d_device *device_impl = unsafe_impl_from_IDirect3DDevice2(device);
5131 
5132  TRACE("iface %p, device %p, handle %p.\n", iface, device, handle);
5133 
5135 
5136  if (!surface->Handle)
5137  {
5138  DWORD h = ddraw_allocate_handle(&device_impl->handle_table, surface, DDRAW_HANDLE_SURFACE);
5139  if (h == DDRAW_INVALID_HANDLE)
5140  {
5141  ERR("Failed to allocate a texture handle.\n");
5143  return DDERR_OUTOFMEMORY;
5144  }
5145 
5146  surface->Handle = h + 1;
5147  }
5148 
5149  TRACE("Returning handle %08x.\n", surface->Handle);
5150  *handle = surface->Handle;
5151 
5153 
5154  return D3D_OK;
5155 }
void WINAPI wined3d_mutex_lock(void)
Definition: wined3d_main.c:368
#define DDERR_OUTOFMEMORY
Definition: ddraw.h:111
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
Definition: devices.h:37
struct d3d_device * unsafe_impl_from_IDirect3DDevice2(IDirect3DDevice2 *iface) DECLSPEC_HIDDEN
Definition: device.c:6864
static struct ddraw_surface * impl_from_IDirect3DTexture2(IDirect3DTexture2 *iface)
#define TRACE(s)
Definition: solgame.cpp:4
DWORD ddraw_allocate_handle(struct ddraw_handle_table *t, void *object, enum ddraw_handle_type type) DECLSPEC_HIDDEN
Definition: main.c:113
#define DDRAW_INVALID_HANDLE
unsigned long DWORD
Definition: ntddk_ex.h:95
struct ddraw_handle_table handle_table
#define ERR(fmt,...)
Definition: debug.h:109
#define D3D_OK
Definition: d3d.h:106
void WINAPI wined3d_mutex_unlock(void)
Definition: wined3d_main.c:373

Referenced by d3d_texture1_GetHandle().

◆ d3d_texture2_Load()

static HRESULT WINAPI d3d_texture2_Load ( IDirect3DTexture2 *  iface,
IDirect3DTexture2 *  src_texture 
)
static

Definition at line 5249 of file surface.c.

5250 {
5251  struct ddraw_surface *dst_surface = impl_from_IDirect3DTexture2(iface);
5252  struct ddraw_surface *src_surface = unsafe_impl_from_IDirect3DTexture2(src_texture);
5253  RECT src_rect, dst_rect;
5254  HRESULT hr;
5255 
5256  TRACE("iface %p, src_texture %p.\n", iface, src_texture);
5257 
5258  if (src_surface == dst_surface)
5259  {
5260  TRACE("copying surface %p to surface %p, why?\n", src_surface, dst_surface);
5261  return D3D_OK;
5262  }
5263 
5265 
5266  for (;;)
5267  {
5268  DDSURFACEDESC *src_desc = (DDSURFACEDESC *)&src_surface->surface_desc;
5269 
5270  TRACE("Copying surface %p to surface %p.\n", src_surface, dst_surface);
5271 
5272  if (compare_format(&src_surface->surface_desc.u4.ddpfPixelFormat,
5273  &dst_surface->surface_desc.u4.ddpfPixelFormat))
5274  {
5275  struct ddraw_palette *dst_pal, *src_pal;
5276 
5277  /* Get the palettes */
5278  dst_pal = dst_surface->palette;
5279  src_pal = src_surface->palette;
5280 
5281  if (src_pal)
5282  {
5283  PALETTEENTRY palent[256];
5284 
5285  if (!dst_pal)
5286  {
5288  return DDERR_NOPALETTEATTACHED;
5289  }
5290  IDirectDrawPalette_GetEntries(&src_pal->IDirectDrawPalette_iface, 0, 0, 256, palent);
5291  IDirectDrawPalette_SetEntries(&dst_pal->IDirectDrawPalette_iface, 0, 0, 256, palent);
5292  }
5293 
5294  if (src_desc->dwFlags & DDSD_CKSRCBLT)
5295  {
5296  IDirectDrawSurface7_SetColorKey(&dst_surface->IDirectDrawSurface7_iface,
5297  DDCKEY_SRCBLT, &src_desc->ddckCKSrcBlt);
5298  }
5299  }
5300  else
5301  {
5302  if (src_desc->dwFlags & DDSD_CKSRCBLT)
5303  return E_FAIL;
5304  }
5305 
5306  /* Suppress the ALLOCONLOAD flag */
5308 
5309  SetRect(&src_rect, 0, 0, src_surface->surface_desc.dwWidth, src_surface->surface_desc.dwHeight);
5310  SetRect(&dst_rect, 0, 0, dst_surface->surface_desc.dwWidth, dst_surface->surface_desc.dwHeight);
5311 
5312  hr = wined3d_texture_blt(dst_surface->wined3d_texture, dst_surface->sub_resource_idx, &dst_rect,
5313  src_surface->wined3d_texture, src_surface->sub_resource_idx, &src_rect,
5315  if (FAILED(hr))
5316  {
5317  ERR("Failed to blit surface, hr %#x.\n", hr);
5319  return hr;
5320  }
5321 
5322  if (src_surface->surface_desc.ddsCaps.dwCaps & DDSCAPS_MIPMAP)
5323  src_surface = get_sub_mimaplevel(src_surface);
5324  else
5325  src_surface = NULL;
5326 
5327  if (dst_surface->surface_desc.ddsCaps.dwCaps & DDSCAPS_MIPMAP)
5328  dst_surface = get_sub_mimaplevel(dst_surface);
5329  else
5330  dst_surface = NULL;
5331 
5332  if (src_surface && !dst_surface)
5333  return DDERR_NOTFOUND;
5334 
5335  if (!src_surface || !dst_surface)
5336  break;
5337  }
5338 
5340 
5341  return hr;
5342 }
#define DDCKEY_SRCBLT
Definition: ddraw.h:478
static BOOL compare_format(DDPIXELFORMAT *format1, DDPIXELFORMAT *format2)
Definition: surface.c:5192
HRESULT hr
Definition: shlfolder.c:183
void WINAPI wined3d_mutex_lock(void)
Definition: wined3d_main.c:368
#define DDSD_CKSRCBLT
Definition: ddraw.h:220
struct wined3d_texture * wined3d_texture
#define E_FAIL
Definition: ddrawi.h:102
DWORD dwWidth
Definition: ddraw.h:1155
static struct ddraw_surface * get_sub_mimaplevel(struct ddraw_surface *surface)
Definition: surface.c:5177
DDSCAPS2 ddsCaps
Definition: ddraw.h:1188
DDPIXELFORMAT ddpfPixelFormat
Definition: ddraw.h:1185
DWORD dwCaps
Definition: ddraw.h:732
smooth NULL
Definition: ftsmooth.c:416
#define DDSCAPS_ALLOCONLOAD
Definition: ddraw.h:274
struct ddraw_surface * unsafe_impl_from_IDirect3DTexture2(IDirect3DTexture2 *iface)
Definition: surface.c:5721
static struct ddraw_surface * impl_from_IDirect3DTexture2(IDirect3DTexture2 *iface)
#define TRACE(s)
Definition: solgame.cpp:4
#define DDERR_NOTFOUND
Definition: ddraw.h:97
DDSURFACEDESC2 surface_desc
#define DDSCAPS_MIPMAP
Definition: ddraw.h:272
LONG HRESULT
Definition: typedefs.h:77
HRESULT CDECL wined3d_texture_blt(struct wined3d_texture *dst_texture, unsigned int dst_sub_resource_idx, const RECT *dst_rect, struct wined3d_texture *src_texture, unsigned int src_sub_resource_idx, const RECT *src_rect, DWORD flags, const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter)
Definition: texture.c:3262
unsigned int sub_resource_idx
IDirectDrawPalette IDirectDrawPalette_iface
DWORD dwHeight
Definition: ddraw.h:1154
#define ERR(fmt,...)
Definition: debug.h:109
#define DDERR_NOPALETTEATTACHED
Definition: ddraw.h:146
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
IDirectDrawSurface7 IDirectDrawSurface7_iface
#define D3D_OK
Definition: d3d.h:106
void WINAPI wined3d_mutex_unlock(void)
Definition: wined3d_main.c:373
struct ddraw_palette * palette

Referenced by d3d_texture1_Load().

◆ d3d_texture2_PaletteChanged()

static HRESULT WINAPI d3d_texture2_PaletteChanged ( IDirect3DTexture2 *  iface,
DWORD  start,
DWORD  count 
)
static

Definition at line 5080 of file surface.c.

5081 {
5082  FIXME("iface %p, start %u, count %u stub!\n", iface, start, count);
5083 
5084  return D3D_OK;
5085 }
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define FIXME(fmt,...)
Definition: debug.h:110
#define D3D_OK
Definition: d3d.h:106
GLuint start
Definition: gl.h:1545

Referenced by d3d_texture1_PaletteChanged().

◆ d3d_texture2_QueryInterface()

static HRESULT WINAPI d3d_texture2_QueryInterface ( IDirect3DTexture2 *  iface,
REFIID  riid,
void **  object 
)
static

Definition at line 297 of file surface.c.

298 {
299  struct ddraw_surface *surface = impl_from_IDirect3DTexture2(iface);
300 
301  TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
302 
304 }
REFIID riid
Definition: precomp.h:44
static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface, REFIID riid, void **obj)
Definition: surface.c:133
#define debugstr_guid
Definition: kernel32.h:35
static struct ddraw_surface * impl_from_IDirect3DTexture2(IDirect3DTexture2 *iface)
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ d3d_texture2_Release()

static ULONG WINAPI d3d_texture2_Release ( IDirect3DTexture2 *  iface)
static

Definition at line 691 of file surface.c.

692 {
693  struct ddraw_surface *surface = impl_from_IDirect3DTexture2(iface);
694 
695  TRACE("iface %p.\n", iface);
696 
697  return IUnknown_Release(surface->texture_outer);
698 }
IUnknown * texture_outer
static struct ddraw_surface * impl_from_IDirect3DTexture2(IDirect3DTexture2 *iface)
#define TRACE(s)
Definition: solgame.cpp:4

◆ ddraw_gamma_control_AddRef()

static ULONG WINAPI ddraw_gamma_control_AddRef ( IDirectDrawGammaControl *  iface)
static

Definition at line 416 of file surface.c.

417 {
419  ULONG refcount = InterlockedIncrement(&This->gamma_count);
420 
421  TRACE("iface %p increasing refcount to %u.\n", iface, refcount);
422 
423  if (refcount == 1)
424  {
426  }
427 
428  return refcount;
429 }
static void ddraw_surface_add_iface(struct ddraw_surface *surface)
Definition: surface.c:315
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53
static struct ddraw_surface * impl_from_IDirectDrawGammaControl(IDirectDrawGammaControl *iface)
Definition: surface.c:34
unsigned int ULONG
Definition: retypes.h:1

◆ ddraw_gamma_control_GetGammaRamp()

static HRESULT WINAPI ddraw_gamma_control_GetGammaRamp ( IDirectDrawGammaControl *  iface,
DWORD  flags,
DDGAMMARAMP gamma_ramp 
)
static

Definition at line 4996 of file surface.c.

4998 {
4999  struct ddraw_surface *surface = impl_from_IDirectDrawGammaControl(iface);
5000 
5001  TRACE("iface %p, flags %#x, gamma_ramp %p.\n", iface, flags, gamma_ramp);
5002 
5003  if (!gamma_ramp)
5004  {
5005  WARN("Invalid gamma_ramp passed.\n");
5006  return DDERR_INVALIDPARAMS;
5007  }
5008 
5011  {
5012  /* Note: DDGAMMARAMP is compatible with struct wined3d_gamma_ramp. */
5013  wined3d_device_get_gamma_ramp(surface->ddraw->wined3d_device, 0, (struct wined3d_gamma_ramp *)gamma_ramp);
5014  }
5015  else
5016  {
5017  ERR("Not implemented for non-primary surfaces.\n");
5018  }
5020 
5021  return DD_OK;
5022 }
void CDECL wined3d_device_get_gamma_ramp(const struct wined3d_device *device, UINT swapchain_idx, struct wined3d_gamma_ramp *ramp)
Definition: device.c:5069
#define WARN(fmt,...)
Definition: debug.h:111
void WINAPI wined3d_mutex_lock(void)
Definition: wined3d_main.c:368
#define DD_OK
Definition: ddraw.h:186
DDSCAPS2 ddsCaps
Definition: ddraw.h:1188
DWORD dwCaps
Definition: ddraw.h:732
#define TRACE(s)
Definition: solgame.cpp:4
DDSURFACEDESC2 surface_desc
GLbitfield flags
Definition: glext.h:7161
#define ERR(fmt,...)
Definition: debug.h:109
static struct ddraw_surface * impl_from_IDirectDrawGammaControl(IDirectDrawGammaControl *iface)
Definition: surface.c:34
#define DDSCAPS_PRIMARYSURFACE
Definition: ddraw.h:258
struct ddraw * ddraw
void WINAPI wined3d_mutex_unlock(void)
Definition: wined3d_main.c:373
#define DDERR_INVALIDPARAMS
Definition: ddraw.h:79

◆ ddraw_gamma_control_QueryInterface()

static HRESULT WINAPI ddraw_gamma_control_QueryInterface ( IDirectDrawGammaControl *  iface,
REFIID  riid,
void **  object 
)
static

Definition at line 287 of file surface.c.

289 {
290  struct ddraw_surface *surface = impl_from_IDirectDrawGammaControl(iface);
291 
292  TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
293 
295 }
REFIID riid
Definition: precomp.h:44
static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface, REFIID riid, void **obj)
Definition: surface.c:133
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface7 IDirectDrawSurface7_iface
static struct ddraw_surface * impl_from_IDirectDrawGammaControl(IDirectDrawGammaControl *iface)
Definition: surface.c:34

◆ ddraw_gamma_control_Release()

static ULONG WINAPI ddraw_gamma_control_Release ( IDirectDrawGammaControl *  iface)
static

Definition at line 676 of file surface.c.

677 {
679  ULONG refcount = InterlockedDecrement(&This->gamma_count);
680 
681  TRACE("iface %p decreasing refcount to %u.\n", iface, refcount);
682 
683  if (refcount == 0)
684  {
686  }
687 
688  return refcount;
689 }
#define TRACE(s)
Definition: solgame.cpp:4
static ULONG ddraw_surface_release_iface(struct ddraw_surface *This)
Definition: surface.c:533
#define InterlockedDecrement
Definition: armddk.h:52
static struct ddraw_surface * impl_from_IDirectDrawGammaControl(IDirectDrawGammaControl *iface)
Definition: surface.c:34
unsigned int ULONG
Definition: retypes.h:1

◆ ddraw_gamma_control_SetGammaRamp()

static HRESULT WINAPI ddraw_gamma_control_SetGammaRamp ( IDirectDrawGammaControl *  iface,
DWORD  flags,
DDGAMMARAMP gamma_ramp 
)
static

Definition at line 5038 of file surface.c.

5040 {
5041  struct ddraw_surface *surface = impl_from_IDirectDrawGammaControl(iface);
5042 
5043  TRACE("iface %p, flags %#x, gamma_ramp %p.\n", iface, flags, gamma_ramp);
5044 
5045  if (!gamma_ramp)
5046  {
5047  WARN("Invalid gamma_ramp passed.\n");
5048  return DDERR_INVALIDPARAMS;
5049  }
5050 
5053  {
5054  /* Note: DDGAMMARAMP is compatible with struct wined3d_gamma_ramp. */
5055  wined3d_device_set_gamma_ramp(surface->ddraw->wined3d_device,
5056  0, flags, (struct wined3d_gamma_ramp *)gamma_ramp);
5057  }
5058  else
5059  {
5060  ERR("Not implemented for non-primary surfaces.\n");
5061  }
5063 
5064  return DD_OK;
5065 }
void CDECL wined3d_device_set_gamma_ramp(const struct wined3d_device *device, UINT swapchain_idx, DWORD flags, const struct wined3d_gamma_ramp *ramp)
Definition: device.c:5057
#define WARN(fmt,...)
Definition: debug.h:111
void WINAPI wined3d_mutex_lock(void)
Definition: wined3d_main.c:368
#define DD_OK
Definition: ddraw.h:186
DDSCAPS2 ddsCaps
Definition: ddraw.h:1188
DWORD dwCaps
Definition: ddraw.h:732
#define TRACE(s)
Definition: solgame.cpp:4
DDSURFACEDESC2 surface_desc
GLbitfield flags
Definition: glext.h:7161
#define ERR(fmt,...)
Definition: debug.h:109
static struct ddraw_surface * impl_from_IDirectDrawGammaControl(IDirectDrawGammaControl *iface)
Definition: surface.c:34
#define DDSCAPS_PRIMARYSURFACE
Definition: ddraw.h:258
struct ddraw * ddraw
void WINAPI wined3d_mutex_unlock(void)
Definition: wined3d_main.c:373
#define DDERR_INVALIDPARAMS
Definition: ddraw.h:79

◆ ddraw_reset_enum_callback()

static HRESULT CDECL ddraw_reset_enum_callback ( struct wined3d_resource resource)
static

Definition at line 5786 of file surface.c.

5787 {
5788  return DD_OK;
5789 }
#define DD_OK
Definition: ddraw.h:186

Referenced by ddraw_surface_create().

◆ ddraw_surface1_AddAttachedSurface()

static HRESULT WINAPI ddraw_surface1_AddAttachedSurface ( IDirectDrawSurface *  iface,
IDirectDrawSurface *  attachment 
)
static

Definition at line 1989 of file surface.c.

1990 {
1991  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
1993  HRESULT hr;
1994 
1995  TRACE("iface %p, attachment %p.\n", iface, attachment);
1996 
1998  attachment_impl ? &attachment_impl->IDirectDrawSurface4_iface : NULL)))
1999  return hr;
2000 
2001  attachment_impl->attached_iface = (IUnknown *)attachment;
2002  IUnknown_AddRef(attachment_impl->attached_iface);
2004  return hr;
2005 }
static ULONG WINAPI ddraw_surface4_Release(IDirectDrawSurface4 *iface)
Definition: surface.c:616
GLenum attachment
Definition: glext.h:6295
HRESULT hr
Definition: shlfolder.c:183
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
smooth NULL
Definition: ftsmooth.c:416
IDirectDrawSurface4 IDirectDrawSurface4_iface
IUnknown * attached_iface
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
Definition: surface.c:5705
static HRESULT WINAPI ddraw_surface4_AddAttachedSurface(IDirectDrawSurface4 *iface, IDirectDrawSurface4 *attachment)
Definition: surface.c:1914

◆ ddraw_surface1_AddOverlayDirtyRect()

static HRESULT WINAPI ddraw_surface1_AddOverlayDirtyRect ( IDirectDrawSurface *  iface,
RECT rect 
)
static

Definition at line 2186 of file surface.c.

2187 {
2188  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
2189 
2190  TRACE("iface %p, rect %s.\n", iface, wine_dbgstr_rect(rect));
2191 
2193 }
& rect
Definition: startmenu.cpp:1413
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
#define TRACE(s)
Definition: solgame.cpp:4
const char * wine_dbgstr_rect(const RECT *rect)
static HRESULT WINAPI ddraw_surface7_AddOverlayDirtyRect(IDirectDrawSurface7 *iface, RECT *Rect)
Definition: surface.c:2152
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface1_AddRef()

static ULONG WINAPI ddraw_surface1_AddRef ( IDirectDrawSurface *  iface)
static

Definition at line 401 of file surface.c.

402 {
404  ULONG refcount = InterlockedIncrement(&This->ref1);
405 
406  TRACE("iface %p increasing refcount to %u.\n", iface, refcount);
407 
408  if (refcount == 1)
409  {
411  }
412 
413  return refcount;
414 }
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
static void ddraw_surface_add_iface(struct ddraw_surface *surface)
Definition: surface.c:315
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53
unsigned int ULONG
Definition: retypes.h:1

Referenced by ddraw_surface1_GetAttachedSurface(), and EnumCallback().

◆ ddraw_surface1_Blt()

static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface1_Blt ( IDirectDrawSurface *  iface,
RECT dst_rect,
IDirectDrawSurface *  src_surface,
RECT src_rect,
DWORD  flags,
DDBLTFX fx 
)
static

Definition at line 1794 of file surface.c.

1796 {
1798  struct ddraw_surface *src_impl = unsafe_impl_from_IDirectDrawSurface(src_surface);
1799 
1800  TRACE("iface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, fx %p.\n",
1801  iface, wine_dbgstr_rect(dst_rect), src_surface, wine_dbgstr_rect(src_rect), flags, fx);
1802 
1803  return ddraw_surface7_Blt(&dst->IDirectDrawSurface7_iface, dst_rect,
1804  src_impl ? &src_impl->IDirectDrawSurface7_iface : NULL, src_rect, flags, fx);
1805 }
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
const char * wine_dbgstr_rect(const RECT *rect)
struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
Definition: surface.c:5705
GLbitfield flags
Definition: glext.h:7161
GLfixed fx
Definition: tritemp.h:482
IDirectDrawSurface7 IDirectDrawSurface7_iface
GLenum GLenum dst
Definition: glext.h:6340
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Blt(IDirectDrawSurface7 *iface, RECT *dst_rect, IDirectDrawSurface7 *src_surface, RECT *src_rect, DWORD flags, DDBLTFX *fx)
Definition: surface.c:1574

◆ ddraw_surface1_BltBatch()

static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface1_BltBatch ( IDirectDrawSurface *  iface,
DDBLTBATCH batch,
DWORD  count,
DWORD  flags 
)
static

Definition at line 2807 of file surface.c.

2808 {
2809  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
2810 
2811  TRACE("iface %p, batch %p, count %u, flags %#x.\n", iface, batch, count, flags);
2812 
2813  return ddraw_surface7_BltBatch(&surface->IDirectDrawSurface7_iface, batch, count, flags);
2814 }
GLuint GLuint GLsizei count
Definition: gl.h:1545
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_BltBatch(IDirectDrawSurface7 *iface, DDBLTBATCH *Batch, DWORD Count, DWORD Flags)
Definition: surface.c:2772
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface1_BltFast()

static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface1_BltFast ( IDirectDrawSurface *  iface,
DWORD  dst_x,
DWORD  dst_y,
IDirectDrawSurface *  src_surface,
RECT src_rect,
DWORD  flags 
)
static

Definition at line 4348 of file surface.c.

4350 {
4351  struct ddraw_surface *dst_impl = impl_from_IDirectDrawSurface(iface);
4352  struct ddraw_surface *src_impl = unsafe_impl_from_IDirectDrawSurface(src_surface);
4353 
4354  TRACE("iface %p, dst_x %u, dst_y %u, src_surface %p, src_rect %s, flags %#x.\n",
4355  iface, dst_x, dst_y, src_surface, wine_dbgstr_rect(src_rect), flags);
4356 
4357  return ddraw_surface7_BltFast(&dst_impl->IDirectDrawSurface7_iface, dst_x, dst_y,
4358  src_impl ? &src_impl->IDirectDrawSurface7_iface : NULL, src_rect, flags);
4359 }
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_BltFast(IDirectDrawSurface7 *iface, DWORD dst_x, DWORD dst_y, IDirectDrawSurface7 *src_surface, RECT *src_rect, DWORD trans)
Definition: surface.c:4244
const char * wine_dbgstr_rect(const RECT *rect)
struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
Definition: surface.c:5705
GLbitfield flags
Definition: glext.h:7161
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface1_DeleteAttachedSurface()

static HRESULT WINAPI ddraw_surface1_DeleteAttachedSurface ( IDirectDrawSurface *  iface,
DWORD  flags,
IDirectDrawSurface *  attachment 
)
static

Definition at line 2129 of file surface.c.

2131 {
2132  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
2134 
2135  TRACE("iface %p, flags %#x, attachment %p.\n", iface, flags, attachment);
2136 
2137  return ddraw_surface_delete_attached_surface(surface, attachment_impl, (IUnknown *)attachment);
2138 }
GLenum attachment
Definition: glext.h:6295
static HRESULT ddraw_surface_delete_attached_surface(struct ddraw_surface *surface, struct ddraw_surface *attachment, IUnknown *detach_iface)
Definition: surface.c:2022
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
#define TRACE(s)
Definition: solgame.cpp:4
struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
Definition: surface.c:5705
GLbitfield flags
Definition: glext.h:7161

◆ ddraw_surface1_EnumAttachedSurfaces()

static HRESULT WINAPI ddraw_surface1_EnumAttachedSurfaces ( IDirectDrawSurface *  iface,
void context,
LPDDENUMSURFACESCALLBACK  callback 
)
static

Definition at line 2961 of file surface.c.

2963 {
2964  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
2965  struct callback_info info;
2966 
2967  TRACE("iface %p, context %p, callback %p.\n", iface, context, callback);
2968 
2969  info.callback = callback;
2970  info.context = context;
2971 
2973  &info, EnumCallback);
2974 }
Definition: http.c:6587
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
void * context
Definition: main.c:47
MmuTrapHandler callback[0x30]
Definition: mmuobject.c:44
#define TRACE(s)
Definition: solgame.cpp:4
static HRESULT WINAPI ddraw_surface7_EnumAttachedSurfaces(IDirectDrawSurface7 *iface, void *context, LPDDENUMSURFACESCALLBACK7 cb)
Definition: surface.c:2830
IDirectDrawSurface7 IDirectDrawSurface7_iface
static HRESULT CALLBACK EnumCallback(IDirectDrawSurface7 *surface, DDSURFACEDESC2 *surface_desc, void *context)
Definition: surface.c:2903

◆ ddraw_surface1_EnumOverlayZOrders()

static HRESULT WINAPI ddraw_surface1_EnumOverlayZOrders ( IDirectDrawSurface *  iface,
DWORD  flags,
void context,
LPDDENUMSURFACESCALLBACK  callback 
)
static

Definition at line 3043 of file surface.c.

3045 {
3046  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
3047  struct callback_info info;
3048 
3049  TRACE("iface %p, flags %#x, context %p, callback %p.\n", iface, flags, context, callback);
3050 
3051  info.callback = callback;
3052  info.context = context;
3053 
3055  flags, &info, EnumCallback);
3056 }
Definition: http.c:6587
static HRESULT WINAPI ddraw_surface7_EnumOverlayZOrders(IDirectDrawSurface7 *iface, DWORD Flags, void *context, LPDDENUMSURFACESCALLBACK7 cb)
Definition: surface.c:2990
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
void * context
Definition: main.c:47
MmuTrapHandler callback[0x30]
Definition: mmuobject.c:44
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
IDirectDrawSurface7 IDirectDrawSurface7_iface
static HRESULT CALLBACK EnumCallback(IDirectDrawSurface7 *surface, DDSURFACEDESC2 *surface_desc, void *context)
Definition: surface.c:2903

◆ ddraw_surface1_Flip()

static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface1_Flip ( IDirectDrawSurface *  iface,
IDirectDrawSurface *  src,
DWORD  flags 
)
static

Definition at line 1395 of file surface.c.

1397 {
1398  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
1400 
1401  TRACE("iface %p, src %p, flags %#x.\n", iface, src, flags);
1402 
1404  src_impl ? &src_impl->IDirectDrawSurface7_iface : NULL, flags);
1405 }
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Flip(IDirectDrawSurface7 *iface, IDirectDrawSurface7 *src, DWORD flags)
Definition: surface.c:1227
struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
Definition: surface.c:5705
GLbitfield flags
Definition: glext.h:7161
GLenum src
Definition: glext.h:6340
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface1_GetAttachedSurface()

static HRESULT WINAPI ddraw_surface1_GetAttachedSurface ( IDirectDrawSurface *  iface,
DDSCAPS caps,
IDirectDrawSurface **  attachment 
)
static

Definition at line 909 of file surface.c.

911 {
912  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
913  struct ddraw_surface *attachment_impl;
914  IDirectDrawSurface7 *attachment7;
915  DDSCAPS2 caps2;
916  HRESULT hr;
917 
918  TRACE("iface %p, caps %p, attachment %p.\n", iface, caps, attachment);
919 
920  caps2.dwCaps = caps->dwCaps;
921  caps2.dwCaps2 = 0;
922  caps2.dwCaps3 = 0;
923  caps2.u1.dwCaps4 = 0;
924 
926  &caps2, &attachment7);
927  if (FAILED(hr))
928  {
929  *attachment = NULL;
930  return hr;
931  }
932  attachment_impl = impl_from_IDirectDrawSurface7(attachment7);
933  *attachment = &attachment_impl->IDirectDrawSurface_iface;
935  ddraw_surface7_Release(attachment7);
936 
937  return hr;
938 }
GLenum attachment
Definition: glext.h:6295
HRESULT hr
Definition: shlfolder.c:183
DWORD dwCaps2
Definition: ddraw.h:733
DWORD dwCaps
Definition: ddraw.h:727
DWORD dwCaps4
Definition: ddraw.h:737
static struct ddraw_surface * impl_from_IDirectDrawSurface7(IDirectDrawSurface7 *iface)
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
DWORD dwCaps
Definition: ddraw.h:732
smooth NULL
Definition: ftsmooth.c:416
IDirectDrawSurface IDirectDrawSurface_iface
DWORD IDirectDrawSurface7
Definition: vmrender.idl:20
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static HRESULT WINAPI ddraw_surface7_GetAttachedSurface(IDirectDrawSurface7 *iface, DDSCAPS2 *Caps, IDirectDrawSurface7 **Surface)
Definition: surface.c:736
DWORD dwCaps3
Definition: ddraw.h:734
IDirectDrawSurface7 IDirectDrawSurface7_iface
static ULONG WINAPI ddraw_surface7_Release(IDirectDrawSurface7 *iface)
Definition: surface.c:601
static ULONG WINAPI ddraw_surface1_AddRef(IDirectDrawSurface *iface)
Definition: surface.c:401

◆ ddraw_surface1_GetBltStatus()

static HRESULT WINAPI ddraw_surface1_GetBltStatus ( IDirectDrawSurface *  iface,
DWORD  flags 
)
static

Definition at line 3109 of file surface.c.

3110 {
3111  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
3112 
3113  TRACE("iface %p, flags %#x.\n", iface, flags);
3114 
3116 }
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
static HRESULT WINAPI ddraw_surface7_GetBltStatus(IDirectDrawSurface7 *iface, DWORD Flags)
Definition: surface.c:3067
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface1_GetCaps()

static HRESULT WINAPI ddraw_surface1_GetCaps ( IDirectDrawSurface *  iface,
DDSCAPS caps 
)
static

Definition at line 2436 of file surface.c.

2437 {
2438  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
2439  DDSCAPS2 caps2;
2440  HRESULT hr;
2441 
2442  TRACE("iface %p, caps %p.\n", iface, caps);
2443 
2445  if (FAILED(hr)) return hr;
2446 
2447  caps->dwCaps = caps2.dwCaps;
2448  return hr;
2449 }
HRESULT hr
Definition: shlfolder.c:183
DWORD dwCaps
Definition: ddraw.h:727
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
DWORD dwCaps
Definition: ddraw.h:732
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
IDirectDrawSurface7 IDirectDrawSurface7_iface
static HRESULT WINAPI ddraw_surface7_GetCaps(IDirectDrawSurface7 *iface, DDSCAPS2 *Caps)
Definition: surface.c:2383

◆ ddraw_surface1_GetClipper()

static HRESULT WINAPI ddraw_surface1_GetClipper ( IDirectDrawSurface *  iface,
IDirectDrawClipper **  clipper 
)
static

Definition at line 4426 of file surface.c.

4427 {
4428  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
4429 
4430  TRACE("iface %p, clipper %p.\n", iface, clipper);
4431 
4433 }
static HRESULT WINAPI ddraw_surface7_GetClipper(IDirectDrawSurface7 *iface, IDirectDrawClipper **Clipper)
Definition: surface.c:4376
struct ddraw_clipper * clipper
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface1_GetColorKey()

static HRESULT WINAPI ddraw_surface1_GetColorKey ( IDirectDrawSurface *  iface,
DWORD  flags,
DDCOLORKEY color_key 
)
static

Definition at line 3218 of file surface.c.

3219 {
3220  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
3221 
3222  TRACE("iface %p, flags %#x, color_key %p.\n", iface, flags, color_key);
3223 
3225 }
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
IDirectDrawSurface7 IDirectDrawSurface7_iface
static HRESULT WINAPI ddraw_surface7_GetColorKey(IDirectDrawSurface7 *iface, DWORD Flags, DDCOLORKEY *CKey)
Definition: surface.c:3132

◆ ddraw_surface1_GetDC()

static HRESULT WINAPI ddraw_surface1_GetDC ( IDirectDrawSurface *  iface,
HDC dc 
)
static

Definition at line 2287 of file surface.c.

2288 {
2289  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
2290 
2291  TRACE("iface %p, dc %p.\n", iface, dc);
2292 
2294 }
HDC dc
Definition: cylfrac.c:34
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
#define TRACE(s)
Definition: solgame.cpp:4
static HRESULT WINAPI ddraw_surface7_GetDC(IDirectDrawSurface7 *iface, HDC *dc)
Definition: surface.c:2208
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface1_GetFlipStatus()

static HRESULT WINAPI ddraw_surface1_GetFlipStatus ( IDirectDrawSurface *  iface,
DWORD  flags 
)
static

Definition at line 3280 of file surface.c.

3281 {
3282  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
3283 
3284  TRACE("iface %p, flags %#x.\n", iface, flags);
3285 
3287 }
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
static HRESULT WINAPI ddraw_surface7_GetFlipStatus(IDirectDrawSurface7 *iface, DWORD Flags)
Definition: surface.c:3236
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface1_GetOverlayPosition()

static HRESULT WINAPI ddraw_surface1_GetOverlayPosition ( IDirectDrawSurface *  iface,
LONG x,
LONG y 
)
static

Definition at line 3343 of file surface.c.

3344 {
3345  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
3346 
3347  TRACE("iface %p, x %p, y %p.\n", iface, x, y);
3348 
3350 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface7 IDirectDrawSurface7_iface
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
static HRESULT WINAPI ddraw_surface7_GetOverlayPosition(IDirectDrawSurface7 *iface, LONG *x, LONG *y)
Definition: surface.c:3301

◆ ddraw_surface1_GetPalette()

static HRESULT WINAPI ddraw_surface1_GetPalette ( IDirectDrawSurface *  iface,
IDirectDrawPalette **  palette 
)
static

Definition at line 4766 of file surface.c.

4767 {
4768  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
4769 
4770  TRACE("iface %p, palette %p.\n", iface, palette);
4771 
4773 }
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
static HRESULT WINAPI ddraw_surface7_GetPalette(IDirectDrawSurface7 *iface, IDirectDrawPalette **palette)
Definition: surface.c:4707
#define TRACE(s)
Definition: solgame.cpp:4
static HPALETTE palette
Definition: clipboard.c:1345
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface1_GetPixelFormat()

static HRESULT WINAPI ddraw_surface1_GetPixelFormat ( IDirectDrawSurface *  iface,
DDPIXELFORMAT pixel_format 
)
static

Definition at line 3410 of file surface.c.

3411 {
3412  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
3413 
3414  TRACE("iface %p, pixel_format %p.\n", iface, pixel_format);
3415 
3417 }
static HRESULT WINAPI ddraw_surface7_GetPixelFormat(IDirectDrawSurface7 *iface, DDPIXELFORMAT *PixelFormat)
Definition: surface.c:3366
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface1_GetSurfaceDesc()

static HRESULT WINAPI ddraw_surface1_GetSurfaceDesc ( IDirectDrawSurface *  iface,
DDSURFACEDESC DDSD 
)
static

Definition at line 3502 of file surface.c.

3503 {
3504  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
3505 
3506  TRACE("iface %p, surface_desc %p.\n", iface, DDSD);
3507 
3509 }
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
static HRESULT WINAPI ddraw_surface3_GetSurfaceDesc(IDirectDrawSurface3 *iface, DDSURFACEDESC *surface_desc)
Definition: surface.c:3466
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface3 IDirectDrawSurface3_iface

◆ ddraw_surface1_Initialize()

static HRESULT WINAPI ddraw_surface1_Initialize ( IDirectDrawSurface *  iface,
IDirectDraw *  ddraw,
DDSURFACEDESC surface_desc 
)
static

Definition at line 3569 of file surface.c.

3571 {
3572  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
3573  DDSURFACEDESC2 surface_desc2;
3574 
3575  TRACE("iface %p, ddraw %p, surface_desc %p.\n", iface, ddraw, surface_desc);
3576 
3577  if (surface_desc) DDSD_to_DDSD2(surface_desc, &surface_desc2);
3579  ddraw, surface_desc ? &surface_desc2 : NULL);
3580 }
void DDSD_to_DDSD2(const DDSURFACEDESC *in, DDSURFACEDESC2 *out) DECLSPEC_HIDDEN
Definition: utils.c:1218
static HRESULT WINAPI ddraw_surface7_Initialize(IDirectDrawSurface7 *iface, IDirectDraw *ddraw, DDSURFACEDESC2 *surface_desc)
Definition: surface.c:3524
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
DDSURFACEDESC2 surface_desc
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface1_IsLost()

static HRESULT WINAPI ddraw_surface1_IsLost ( IDirectDrawSurface *  iface)
static

Definition at line 3651 of file surface.c.

3652 {
3653  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
3654 
3655  TRACE("iface %p.\n", iface);
3656 
3658 }
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
static HRESULT WINAPI ddraw_surface7_IsLost(IDirectDrawSurface7 *iface)
Definition: surface.c:3612
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface1_Lock()

static HRESULT WINAPI ddraw_surface1_Lock ( IDirectDrawSurface *  iface,
RECT rect,
DDSURFACEDESC surface_desc,
DWORD  flags,
HANDLE  h 
)
static

Definition at line 1138 of file surface.c.

1140 {
1141  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
1142  unsigned int surface_desc_size;
1143  DDSURFACEDESC2 surface_desc2;
1144  HRESULT hr;
1145 
1146  TRACE("iface %p, rect %s, surface_desc %p, flags %#x, h %p.\n",
1148 
1149  if (!surface_validate_lock_desc(surface, surface_desc, &surface_desc_size))
1150  return DDERR_INVALIDPARAMS;
1151 
1152  surface_desc2.dwSize = surface_desc->dwSize;
1153  surface_desc2.dwFlags = 0;
1154  hr = surface_lock(surface, rect, &surface_desc2, surface_desc_size, flags, h);
1155  DDSD2_to_DDSD(&surface_desc2, surface_desc);
1156  surface_desc->dwSize = surface_desc2.dwSize;
1157  return hr;
1158 }
DWORD dwFlags
Definition: ddraw.h:1153
HRESULT hr
Definition: shlfolder.c:183
& rect
Definition: startmenu.cpp:1413
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
#define TRACE(s)
Definition: solgame.cpp:4
DDSURFACEDESC2 surface_desc
static HRESULT surface_lock(struct ddraw_surface *surface, RECT *rect, DDSURFACEDESC2 *surface_desc, unsigned int surface_desc_size, DWORD flags, HANDLE h)
Definition: surface.c:956
LONG HRESULT
Definition: typedefs.h:77
const char * wine_dbgstr_rect(const RECT *rect)
GLbitfield flags
Definition: glext.h:7161
DWORD dwSize
Definition: ddraw.h:1152
void DDSD2_to_DDSD(const DDSURFACEDESC2 *in, DDSURFACEDESC *out) DECLSPEC_HIDDEN
Definition: utils.c:1262
static BOOL surface_validate_lock_desc(struct ddraw_surface *surface, const DDSURFACEDESC *desc, unsigned int *size)
Definition: surface.c:1037
#define DDERR_INVALIDPARAMS
Definition: ddraw.h:79

◆ ddraw_surface1_QueryInterface()

static HRESULT WINAPI ddraw_surface1_QueryInterface ( IDirectDrawSurface *  iface,
REFIID  riid,
void **  object 
)
static

Definition at line 278 of file surface.c.

279 {
280  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
281 
282  TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
283 
285 }
REFIID riid
Definition: precomp.h:44
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface, REFIID riid, void **obj)
Definition: surface.c:133
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface1_Release()

static ULONG WINAPI ddraw_surface1_Release ( IDirectDrawSurface *  iface)
static

Definition at line 661 of file surface.c.

662 {
664  ULONG refcount = InterlockedDecrement(&This->ref1);
665 
666  TRACE("iface %p decreasing refcount to %u.\n", iface, refcount);
667 
668  if (refcount == 0)
669  {
671  }
672 
673  return refcount;
674 }
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
#define TRACE(s)
Definition: solgame.cpp:4
static ULONG ddraw_surface_release_iface(struct ddraw_surface *This)
Definition: surface.c:533
#define InterlockedDecrement
Definition: armddk.h:52
unsigned int ULONG
Definition: retypes.h:1

◆ ddraw_surface1_ReleaseDC()

static HRESULT WINAPI ddraw_surface1_ReleaseDC ( IDirectDrawSurface *  iface,
HDC  dc 
)
static

Definition at line 2361 of file surface.c.

2362 {
2363  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
2364 
2365  TRACE("iface %p, dc %p.\n", iface, dc);
2366 
2368 }
HDC dc
Definition: cylfrac.c:34
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
static HRESULT WINAPI ddraw_surface7_ReleaseDC(IDirectDrawSurface7 *iface, HDC hdc)
Definition: surface.c:2308
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface1_Restore()

static HRESULT WINAPI ddraw_surface1_Restore ( IDirectDrawSurface *  iface)
static

Definition at line 3743 of file surface.c.

3744 {
3745  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
3746 
3747  TRACE("iface %p.\n", iface);
3748 
3750 }
static HRESULT WINAPI ddraw_surface7_Restore(IDirectDrawSurface7 *iface)
Definition: surface.c:3670
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface1_SetClipper()

static HRESULT WINAPI ddraw_surface1_SetClipper ( IDirectDrawSurface *  iface,
IDirectDrawClipper *  clipper 
)
static

Definition at line 4522 of file surface.c.

4523 {
4524  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
4525 
4526  TRACE("iface %p, clipper %p.\n", iface, clipper);
4527 
4529 }
static HRESULT WINAPI ddraw_surface7_SetClipper(IDirectDrawSurface7 *iface, IDirectDrawClipper *iclipper)
Definition: surface.c:4447
struct ddraw_clipper * clipper
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface1_SetColorKey()

static HRESULT WINAPI ddraw_surface1_SetColorKey ( IDirectDrawSurface *  iface,
DWORD  flags,
DDCOLORKEY color_key 
)
static

Definition at line 4896 of file surface.c.

4897 {
4898  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
4899 
4900  TRACE("iface %p, flags %#x, color_key %p.\n", iface, flags, color_key);
4901 
4902  return ddraw_surface_set_color_key(surface, flags, color_key);
4903 }
static HRESULT ddraw_surface_set_color_key(struct ddraw_surface *surface, DWORD flags, DDCOLORKEY *color_key)
Definition: surface.c:4775
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161

◆ ddraw_surface1_SetOverlayPosition()

static HRESULT WINAPI ddraw_surface1_SetOverlayPosition ( IDirectDrawSurface *  iface,
LONG  x,
LONG  y 
)
static

Definition at line 3806 of file surface.c.

3807 {
3808  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
3809 
3810  TRACE("iface %p, x %d, y %d.\n", iface, x, y);
3811 
3813 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface7 IDirectDrawSurface7_iface
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
static HRESULT WINAPI ddraw_surface7_SetOverlayPosition(IDirectDrawSurface7 *iface, LONG x, LONG y)
Definition: surface.c:3764

◆ ddraw_surface1_SetPalette()

static HRESULT WINAPI ddraw_surface1_SetPalette ( IDirectDrawSurface *  iface,
IDirectDrawPalette *  palette 
)
static

Definition at line 4967 of file surface.c.

4968 {
4969  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
4970 
4971  TRACE("iface %p, palette %p.\n", iface, palette);
4972 
4973  if (IDirectDrawSurface_IsLost(iface) == DDERR_SURFACELOST)
4974  {
4975  WARN("Surface lost, returning DDERR_SURFACELOST.\n");
4976  return DDERR_SURFACELOST;
4977  }
4978 
4979  return ddraw_surface_set_palette(surface, palette);
4980 }
#define DDERR_SURFACELOST
Definition: ddraw.h:122
#define WARN(fmt,...)
Definition: debug.h:111
static HRESULT ddraw_surface_set_palette(struct ddraw_surface *surface, IDirectDrawPalette *palette)
Definition: surface.c:449
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
#define TRACE(s)
Definition: solgame.cpp:4
static HPALETTE palette
Definition: clipboard.c:1345

◆ ddraw_surface1_Unlock()

static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface1_Unlock ( IDirectDrawSurface *  iface,
void data 
)
static

Definition at line 1217 of file surface.c.

1218 {
1219  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
1220 
1221  TRACE("iface %p, data %p.\n", iface, data);
1222 
1223  /* data might not be the LPRECT of later versions, so drop it. */
1225 }
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Unlock(IDirectDrawSurface7 *iface, RECT *pRect)
Definition: surface.c:1172
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface1_UpdateOverlay()

static HRESULT WINAPI ddraw_surface1_UpdateOverlay ( IDirectDrawSurface *  iface,
RECT src_rect,
IDirectDrawSurface *  dst_surface,
RECT dst_rect,
DWORD  flags,
DDOVERLAYFX fx 
)
static

Definition at line 3904 of file surface.c.

3906 {
3907  struct ddraw_surface *src_impl = impl_from_IDirectDrawSurface(iface);
3908  struct ddraw_surface *dst_impl = unsafe_impl_from_IDirectDrawSurface(dst_surface);
3909 
3910  TRACE("iface %p, src_rect %s, dst_surface %p, dst_rect %s, flags %#x, fx %p.\n",
3911  iface, wine_dbgstr_rect(src_rect), dst_surface, wine_dbgstr_rect(dst_rect), flags, fx);
3912 
3913  return ddraw_surface7_UpdateOverlay(&src_impl->IDirectDrawSurface7_iface, src_rect,
3914  dst_impl ? &dst_impl->IDirectDrawSurface7_iface : NULL, dst_rect, flags, fx);
3915 }
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
const char * wine_dbgstr_rect(const RECT *rect)
struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
Definition: surface.c:5705
GLbitfield flags
Definition: glext.h:7161
GLfixed fx
Definition: tritemp.h:482
IDirectDrawSurface7 IDirectDrawSurface7_iface
static HRESULT WINAPI ddraw_surface7_UpdateOverlay(IDirectDrawSurface7 *iface, RECT *src_rect, IDirectDrawSurface7 *dst_surface, RECT *dst_rect, DWORD flags, DDOVERLAYFX *fx)
Definition: surface.c:3830

◆ ddraw_surface1_UpdateOverlayDisplay()

static HRESULT WINAPI ddraw_surface1_UpdateOverlayDisplay ( IDirectDrawSurface *  iface,
DWORD  flags 
)
static

Definition at line 3962 of file surface.c.

3963 {
3964  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
3965 
3966  TRACE("iface %p, flags %#x.\n", iface, flags);
3967 
3969 }
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
static HRESULT WINAPI ddraw_surface7_UpdateOverlayDisplay(IDirectDrawSurface7 *iface, DWORD Flags)
Definition: surface.c:3928
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface1_UpdateOverlayZOrder()

static HRESULT WINAPI ddraw_surface1_UpdateOverlayZOrder ( IDirectDrawSurface *  iface,
DWORD  flags,
IDirectDrawSurface *  reference 
)
static

Definition at line 4039 of file surface.c.

4041 {
4042  struct ddraw_surface *surface = impl_from_IDirectDrawSurface(iface);
4044 
4045  TRACE("iface %p, flags %#x, reference %p.\n", iface, flags, reference);
4046 
4048  reference_impl ? &reference_impl->IDirectDrawSurface7_iface : NULL);
4049 }
static struct ddraw_surface * impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface(IDirectDrawSurface *iface)
Definition: surface.c:5705
GLbitfield flags
Definition: glext.h:7161
GLint reference
Definition: glext.h:11729
static HRESULT WINAPI ddraw_surface7_UpdateOverlayZOrder(IDirectDrawSurface7 *iface, DWORD flags, IDirectDrawSurface7 *reference)
Definition: surface.c:3984
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface2_AddAttachedSurface()

static HRESULT WINAPI ddraw_surface2_AddAttachedSurface ( IDirectDrawSurface2 *  iface,
IDirectDrawSurface2 *  attachment 
)
static

Definition at line 1971 of file surface.c.

1972 {
1973  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
1975  HRESULT hr;
1976 
1977  TRACE("iface %p, attachment %p.\n", iface, attachment);
1978 
1980  attachment_impl ? &attachment_impl->IDirectDrawSurface4_iface : NULL)))
1981  return hr;
1982 
1983  attachment_impl->attached_iface = (IUnknown *)attachment;
1984  IUnknown_AddRef(attachment_impl->attached_iface);
1986  return hr;
1987 }
static ULONG WINAPI ddraw_surface4_Release(IDirectDrawSurface4 *iface)
Definition: surface.c:616
GLenum attachment
Definition: glext.h:6295
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
HRESULT hr
Definition: shlfolder.c:183
smooth NULL
Definition: ftsmooth.c:416
IDirectDrawSurface4 IDirectDrawSurface4_iface
IUnknown * attached_iface
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
Definition: surface.c:5689
static HRESULT WINAPI ddraw_surface4_AddAttachedSurface(IDirectDrawSurface4 *iface, IDirectDrawSurface4 *attachment)
Definition: surface.c:1914

◆ ddraw_surface2_AddOverlayDirtyRect()

static HRESULT WINAPI ddraw_surface2_AddOverlayDirtyRect ( IDirectDrawSurface2 *  iface,
RECT rect 
)
static

Definition at line 2177 of file surface.c.

2178 {
2179  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
2180 
2181  TRACE("iface %p, rect %s.\n", iface, wine_dbgstr_rect(rect));
2182 
2184 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
& rect
Definition: startmenu.cpp:1413
#define TRACE(s)
Definition: solgame.cpp:4
const char * wine_dbgstr_rect(const RECT *rect)
static HRESULT WINAPI ddraw_surface7_AddOverlayDirtyRect(IDirectDrawSurface7 *iface, RECT *Rect)
Definition: surface.c:2152
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface2_AddRef()

static ULONG WINAPI ddraw_surface2_AddRef ( IDirectDrawSurface2 *  iface)
static

Definition at line 386 of file surface.c.

387 {
389  ULONG refcount = InterlockedIncrement(&This->ref2);
390 
391  TRACE("iface %p increasing refcount to %u.\n", iface, refcount);
392 
393  if (refcount == 1)
394  {
396  }
397 
398  return refcount;
399 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
static void ddraw_surface_add_iface(struct ddraw_surface *surface)
Definition: surface.c:315
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53
unsigned int ULONG
Definition: retypes.h:1

Referenced by ddraw_surface2_GetAttachedSurface().

◆ ddraw_surface2_Blt()

static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface2_Blt ( IDirectDrawSurface2 *  iface,
RECT dst_rect,
IDirectDrawSurface2 *  src_surface,
RECT src_rect,
DWORD  flags,
DDBLTFX fx 
)
static

Definition at line 1781 of file surface.c.

1783 {
1785  struct ddraw_surface *src_impl = unsafe_impl_from_IDirectDrawSurface2(src_surface);
1786 
1787  TRACE("iface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, fx %p.\n",
1788  iface, wine_dbgstr_rect(dst_rect), src_surface, wine_dbgstr_rect(src_rect), flags, fx);
1789 
1790  return ddraw_surface7_Blt(&dst->IDirectDrawSurface7_iface, dst_rect,
1791  src_impl ? &src_impl->IDirectDrawSurface7_iface : NULL, src_rect, flags, fx);
1792 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
const char * wine_dbgstr_rect(const RECT *rect)
GLbitfield flags
Definition: glext.h:7161
static struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
Definition: surface.c:5689
GLfixed fx
Definition: tritemp.h:482
IDirectDrawSurface7 IDirectDrawSurface7_iface
GLenum GLenum dst
Definition: glext.h:6340
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Blt(IDirectDrawSurface7 *iface, RECT *dst_rect, IDirectDrawSurface7 *src_surface, RECT *src_rect, DWORD flags, DDBLTFX *fx)
Definition: surface.c:1574

◆ ddraw_surface2_BltBatch()

static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface2_BltBatch ( IDirectDrawSurface2 *  iface,
DDBLTBATCH batch,
DWORD  count,
DWORD  flags 
)
static

Definition at line 2798 of file surface.c.

2799 {
2800  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
2801 
2802  TRACE("iface %p, batch %p, count %u, flags %#x.\n", iface, batch, count, flags);
2803 
2804  return ddraw_surface7_BltBatch(&surface->IDirectDrawSurface7_iface, batch, count, flags);
2805 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
GLuint GLuint GLsizei count
Definition: gl.h:1545
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_BltBatch(IDirectDrawSurface7 *iface, DDBLTBATCH *Batch, DWORD Count, DWORD Flags)
Definition: surface.c:2772
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface2_BltFast()

static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface2_BltFast ( IDirectDrawSurface2 *  iface,
DWORD  dst_x,
DWORD  dst_y,
IDirectDrawSurface2 *  src_surface,
RECT src_rect,
DWORD  flags 
)
static

Definition at line 4335 of file surface.c.

4337 {
4338  struct ddraw_surface *dst_impl = impl_from_IDirectDrawSurface2(iface);
4339  struct ddraw_surface *src_impl = unsafe_impl_from_IDirectDrawSurface2(src_surface);
4340 
4341  TRACE("iface %p, dst_x %u, dst_y %u, src_surface %p, src_rect %s, flags %#x.\n",
4342  iface, dst_x, dst_y, src_surface, wine_dbgstr_rect(src_rect), flags);
4343 
4344  return ddraw_surface7_BltFast(&dst_impl->IDirectDrawSurface7_iface, dst_x, dst_y,
4345  src_impl ? &src_impl->IDirectDrawSurface7_iface : NULL, src_rect, flags);
4346 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_BltFast(IDirectDrawSurface7 *iface, DWORD dst_x, DWORD dst_y, IDirectDrawSurface7 *src_surface, RECT *src_rect, DWORD trans)
Definition: surface.c:4244
const char * wine_dbgstr_rect(const RECT *rect)
GLbitfield flags
Definition: glext.h:7161
static struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
Definition: surface.c:5689
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface2_DeleteAttachedSurface()

static HRESULT WINAPI ddraw_surface2_DeleteAttachedSurface ( IDirectDrawSurface2 *  iface,
DWORD  flags,
IDirectDrawSurface2 *  attachment 
)
static

Definition at line 2118 of file surface.c.

2120 {
2121  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
2123 
2124  TRACE("iface %p, flags %#x, attachment %p.\n", iface, flags, attachment);
2125 
2126  return ddraw_surface_delete_attached_surface(surface, attachment_impl, (IUnknown *)attachment);
2127 }
GLenum attachment
Definition: glext.h:6295
static HRESULT ddraw_surface_delete_attached_surface(struct ddraw_surface *surface, struct ddraw_surface *attachment, IUnknown *detach_iface)
Definition: surface.c:2022
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
static struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
Definition: surface.c:5689

◆ ddraw_surface2_EnumAttachedSurfaces()

static HRESULT WINAPI ddraw_surface2_EnumAttachedSurfaces ( IDirectDrawSurface2 *  iface,
void context,
LPDDENUMSURFACESCALLBACK  callback 
)
static

Definition at line 2946 of file surface.c.

2948 {
2949  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
2950  struct callback_info info;
2951 
2952  TRACE("iface %p, context %p, callback %p.\n", iface, context, callback);
2953 
2954  info.callback = callback;
2955  info.context = context;
2956 
2958  &info, EnumCallback);
2959 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
Definition: http.c:6587
void * context
Definition: main.c:47
MmuTrapHandler callback[0x30]
Definition: mmuobject.c:44
#define TRACE(s)
Definition: solgame.cpp:4
static HRESULT WINAPI ddraw_surface7_EnumAttachedSurfaces(IDirectDrawSurface7 *iface, void *context, LPDDENUMSURFACESCALLBACK7 cb)
Definition: surface.c:2830
IDirectDrawSurface7 IDirectDrawSurface7_iface
static HRESULT CALLBACK EnumCallback(IDirectDrawSurface7 *surface, DDSURFACEDESC2 *surface_desc, void *context)
Definition: surface.c:2903

◆ ddraw_surface2_EnumOverlayZOrders()

static HRESULT WINAPI ddraw_surface2_EnumOverlayZOrders ( IDirectDrawSurface2 *  iface,
DWORD  flags,
void context,
LPDDENUMSURFACESCALLBACK  callback 
)
static

Definition at line 3028 of file surface.c.

3030 {
3031  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
3032  struct callback_info info;
3033 
3034  TRACE("iface %p, flags %#x, context %p, callback %p.\n", iface, flags, context, callback);
3035 
3036  info.callback = callback;
3037  info.context = context;
3038 
3040  flags, &info, EnumCallback);
3041 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
Definition: http.c:6587
static HRESULT WINAPI ddraw_surface7_EnumOverlayZOrders(IDirectDrawSurface7 *iface, DWORD Flags, void *context, LPDDENUMSURFACESCALLBACK7 cb)
Definition: surface.c:2990
void * context
Definition: main.c:47
MmuTrapHandler callback[0x30]
Definition: mmuobject.c:44
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
IDirectDrawSurface7 IDirectDrawSurface7_iface
static HRESULT CALLBACK EnumCallback(IDirectDrawSurface7 *surface, DDSURFACEDESC2 *surface_desc, void *context)
Definition: surface.c:2903

◆ ddraw_surface2_Flip()

static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface2_Flip ( IDirectDrawSurface2 *  iface,
IDirectDrawSurface2 *  src,
DWORD  flags 
)
static

Definition at line 1383 of file surface.c.

1385 {
1386  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
1388 
1389  TRACE("iface %p, src %p, flags %#x.\n", iface, src, flags);
1390 
1392  src_impl ? &src_impl->IDirectDrawSurface7_iface : NULL, flags);
1393 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Flip(IDirectDrawSurface7 *iface, IDirectDrawSurface7 *src, DWORD flags)
Definition: surface.c:1227
GLbitfield flags
Definition: glext.h:7161
static struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
Definition: surface.c:5689
GLenum src
Definition: glext.h:6340
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface2_GetAttachedSurface()

static HRESULT WINAPI ddraw_surface2_GetAttachedSurface ( IDirectDrawSurface2 *  iface,
DDSCAPS caps,
IDirectDrawSurface2 **  attachment 
)
static

Definition at line 878 of file surface.c.

880 {
881  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
882  struct ddraw_surface *attachment_impl;
883  IDirectDrawSurface7 *attachment7;
884  DDSCAPS2 caps2;
885  HRESULT hr;
886 
887  TRACE("iface %p, caps %p, attachment %p.\n", iface, caps, attachment);
888 
889  caps2.dwCaps = caps->dwCaps;
890  caps2.dwCaps2 = 0;
891  caps2.dwCaps3 = 0;
892  caps2.u1.dwCaps4 = 0;
893 
895  &caps2, &attachment7);
896  if (FAILED(hr))
897  {
898  *attachment = NULL;
899  return hr;
900  }
901  attachment_impl = impl_from_IDirectDrawSurface7(attachment7);
902  *attachment = &attachment_impl->IDirectDrawSurface2_iface;
904  ddraw_surface7_Release(attachment7);
905 
906  return hr;
907 }
GLenum attachment
Definition: glext.h:6295
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
HRESULT hr
Definition: shlfolder.c:183
DWORD dwCaps2
Definition: ddraw.h:733
DWORD dwCaps
Definition: ddraw.h:727
DWORD dwCaps4
Definition: ddraw.h:737
static struct ddraw_surface * impl_from_IDirectDrawSurface7(IDirectDrawSurface7 *iface)
DWORD dwCaps
Definition: ddraw.h:732
smooth NULL
Definition: ftsmooth.c:416
DWORD IDirectDrawSurface7
Definition: vmrender.idl:20
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static HRESULT WINAPI ddraw_surface7_GetAttachedSurface(IDirectDrawSurface7 *iface, DDSCAPS2 *Caps, IDirectDrawSurface7 **Surface)
Definition: surface.c:736
DWORD dwCaps3
Definition: ddraw.h:734
IDirectDrawSurface2 IDirectDrawSurface2_iface
IDirectDrawSurface7 IDirectDrawSurface7_iface
static ULONG WINAPI ddraw_surface2_AddRef(IDirectDrawSurface2 *iface)
Definition: surface.c:386
static ULONG WINAPI ddraw_surface7_Release(IDirectDrawSurface7 *iface)
Definition: surface.c:601

◆ ddraw_surface2_GetBltStatus()

static HRESULT WINAPI ddraw_surface2_GetBltStatus ( IDirectDrawSurface2 *  iface,
DWORD  flags 
)
static

Definition at line 3100 of file surface.c.

3101 {
3102  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
3103 
3104  TRACE("iface %p, flags %#x.\n", iface, flags);
3105 
3107 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
static HRESULT WINAPI ddraw_surface7_GetBltStatus(IDirectDrawSurface7 *iface, DWORD Flags)
Definition: surface.c:3067
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface2_GetCaps()

static HRESULT WINAPI ddraw_surface2_GetCaps ( IDirectDrawSurface2 *  iface,
DDSCAPS caps 
)
static

Definition at line 2421 of file surface.c.

2422 {
2423  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
2424  DDSCAPS2 caps2;
2425  HRESULT hr;
2426 
2427  TRACE("iface %p, caps %p.\n", iface, caps);
2428 
2430  if (FAILED(hr)) return hr;
2431 
2432  caps->dwCaps = caps2.dwCaps;
2433  return hr;
2434 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
HRESULT hr
Definition: shlfolder.c:183
DWORD dwCaps
Definition: ddraw.h:727
DWORD dwCaps
Definition: ddraw.h:732
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
IDirectDrawSurface7 IDirectDrawSurface7_iface
static HRESULT WINAPI ddraw_surface7_GetCaps(IDirectDrawSurface7 *iface, DDSCAPS2 *Caps)
Definition: surface.c:2383

◆ ddraw_surface2_GetClipper()

static HRESULT WINAPI ddraw_surface2_GetClipper ( IDirectDrawSurface2 *  iface,
IDirectDrawClipper **  clipper 
)
static

Definition at line 4417 of file surface.c.

4418 {
4419  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
4420 
4421  TRACE("iface %p, clipper %p.\n", iface, clipper);
4422 
4424 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
static HRESULT WINAPI ddraw_surface7_GetClipper(IDirectDrawSurface7 *iface, IDirectDrawClipper **Clipper)
Definition: surface.c:4376
struct ddraw_clipper * clipper
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface2_GetColorKey()

static HRESULT WINAPI ddraw_surface2_GetColorKey ( IDirectDrawSurface2 *  iface,
DWORD  flags,
DDCOLORKEY color_key 
)
static

Definition at line 3209 of file surface.c.

3210 {
3211  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
3212 
3213  TRACE("iface %p, flags %#x, color_key %p.\n", iface, flags, color_key);
3214 
3216 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
IDirectDrawSurface7 IDirectDrawSurface7_iface
static HRESULT WINAPI ddraw_surface7_GetColorKey(IDirectDrawSurface7 *iface, DWORD Flags, DDCOLORKEY *CKey)
Definition: surface.c:3132

◆ ddraw_surface2_GetDC()

static HRESULT WINAPI ddraw_surface2_GetDC ( IDirectDrawSurface2 *  iface,
HDC dc 
)
static

Definition at line 2278 of file surface.c.

2279 {
2280  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
2281 
2282  TRACE("iface %p, dc %p.\n", iface, dc);
2283 
2285 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
HDC dc
Definition: cylfrac.c:34
#define TRACE(s)
Definition: solgame.cpp:4
static HRESULT WINAPI ddraw_surface7_GetDC(IDirectDrawSurface7 *iface, HDC *dc)
Definition: surface.c:2208
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface2_GetDDInterface()

static HRESULT WINAPI ddraw_surface2_GetDDInterface ( IDirectDrawSurface2 *  iface,
void **  ddraw 
)
static

Definition at line 4116 of file surface.c.

4117 {
4118  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
4119 
4120  TRACE("iface %p, ddraw %p.\n", iface, ddraw);
4121 
4123 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface7 IDirectDrawSurface7_iface
static HRESULT WINAPI ddraw_surface7_GetDDInterface(IDirectDrawSurface7 *iface, void **DD)
Definition: surface.c:4065

◆ ddraw_surface2_GetFlipStatus()

static HRESULT WINAPI ddraw_surface2_GetFlipStatus ( IDirectDrawSurface2 *  iface,
DWORD  flags 
)
static

Definition at line 3271 of file surface.c.

3272 {
3273  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
3274 
3275  TRACE("iface %p, flags %#x.\n", iface, flags);
3276 
3278 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
static HRESULT WINAPI ddraw_surface7_GetFlipStatus(IDirectDrawSurface7 *iface, DWORD Flags)
Definition: surface.c:3236
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface2_GetOverlayPosition()

static HRESULT WINAPI ddraw_surface2_GetOverlayPosition ( IDirectDrawSurface2 *  iface,
LONG x,
LONG y 
)
static

Definition at line 3334 of file surface.c.

3335 {
3336  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
3337 
3338  TRACE("iface %p, x %p, y %p.\n", iface, x, y);
3339 
3341 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface7 IDirectDrawSurface7_iface
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
static HRESULT WINAPI ddraw_surface7_GetOverlayPosition(IDirectDrawSurface7 *iface, LONG *x, LONG *y)
Definition: surface.c:3301

◆ ddraw_surface2_GetPalette()

static HRESULT WINAPI ddraw_surface2_GetPalette ( IDirectDrawSurface2 *  iface,
IDirectDrawPalette **  palette 
)
static

Definition at line 4757 of file surface.c.

4758 {
4759  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
4760 
4761  TRACE("iface %p, palette %p.\n", iface, palette);
4762 
4764 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
static HRESULT WINAPI ddraw_surface7_GetPalette(IDirectDrawSurface7 *iface, IDirectDrawPalette **palette)
Definition: surface.c:4707
#define TRACE(s)
Definition: solgame.cpp:4
static HPALETTE palette
Definition: clipboard.c:1345
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface2_GetPixelFormat()

static HRESULT WINAPI ddraw_surface2_GetPixelFormat ( IDirectDrawSurface2 *  iface,
DDPIXELFORMAT pixel_format 
)
static

Definition at line 3401 of file surface.c.

3402 {
3403  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
3404 
3405  TRACE("iface %p, pixel_format %p.\n", iface, pixel_format);
3406 
3408 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
static HRESULT WINAPI ddraw_surface7_GetPixelFormat(IDirectDrawSurface7 *iface, DDPIXELFORMAT *PixelFormat)
Definition: surface.c:3366
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface2_GetSurfaceDesc()

static HRESULT WINAPI ddraw_surface2_GetSurfaceDesc ( IDirectDrawSurface2 *  iface,
DDSURFACEDESC DDSD 
)
static

Definition at line 3493 of file surface.c.

3494 {
3495  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
3496 
3497  TRACE("iface %p, surface_desc %p.\n", iface, DDSD);
3498 
3500 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
static HRESULT WINAPI ddraw_surface3_GetSurfaceDesc(IDirectDrawSurface3 *iface, DDSURFACEDESC *surface_desc)
Definition: surface.c:3466
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface3 IDirectDrawSurface3_iface

◆ ddraw_surface2_Initialize()

static HRESULT WINAPI ddraw_surface2_Initialize ( IDirectDrawSurface2 *  iface,
IDirectDraw *  ddraw,
DDSURFACEDESC surface_desc 
)
static

Definition at line 3556 of file surface.c.

3558 {
3559  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
3560  DDSURFACEDESC2 surface_desc2;
3561 
3562  TRACE("iface %p, ddraw %p, surface_desc %p.\n", iface, ddraw, surface_desc);
3563 
3564  if (surface_desc) DDSD_to_DDSD2(surface_desc, &surface_desc2);
3566  ddraw, surface_desc ? &surface_desc2 : NULL);
3567 }
void DDSD_to_DDSD2(const DDSURFACEDESC *in, DDSURFACEDESC2 *out) DECLSPEC_HIDDEN
Definition: utils.c:1218
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
static HRESULT WINAPI ddraw_surface7_Initialize(IDirectDrawSurface7 *iface, IDirectDraw *ddraw, DDSURFACEDESC2 *surface_desc)
Definition: surface.c:3524
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
DDSURFACEDESC2 surface_desc
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface2_IsLost()

static HRESULT WINAPI ddraw_surface2_IsLost ( IDirectDrawSurface2 *  iface)
static

Definition at line 3642 of file surface.c.

3643 {
3644  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
3645 
3646  TRACE("iface %p.\n", iface);
3647 
3649 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
static HRESULT WINAPI ddraw_surface7_IsLost(IDirectDrawSurface7 *iface)
Definition: surface.c:3612
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface2_Lock()

static HRESULT WINAPI ddraw_surface2_Lock ( IDirectDrawSurface2 *  iface,
RECT rect,
DDSURFACEDESC surface_desc,
DWORD  flags,
HANDLE  h 
)
static

Definition at line 1116 of file surface.c.

1118 {
1119  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
1120  unsigned int surface_desc_size;
1121  DDSURFACEDESC2 surface_desc2;
1122  HRESULT hr;
1123 
1124  TRACE("iface %p, rect %s, surface_desc %p, flags %#x, h %p.\n",
1126 
1127  if (!surface_validate_lock_desc(surface, surface_desc, &surface_desc_size))
1128  return DDERR_INVALIDPARAMS;
1129 
1130  surface_desc2.dwSize = surface_desc->dwSize;
1131  surface_desc2.dwFlags = 0;
1132  hr = surface_lock(surface, rect, &surface_desc2, surface_desc_size, flags, h);
1133  DDSD2_to_DDSD(&surface_desc2, surface_desc);
1134  surface_desc->dwSize = surface_desc2.dwSize;
1135  return hr;
1136 }
DWORD dwFlags
Definition: ddraw.h:1153
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
HRESULT hr
Definition: shlfolder.c:183
& rect
Definition: startmenu.cpp:1413
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
#define TRACE(s)
Definition: solgame.cpp:4
DDSURFACEDESC2 surface_desc
static HRESULT surface_lock(struct ddraw_surface *surface, RECT *rect, DDSURFACEDESC2 *surface_desc, unsigned int surface_desc_size, DWORD flags, HANDLE h)
Definition: surface.c:956
LONG HRESULT
Definition: typedefs.h:77
const char * wine_dbgstr_rect(const RECT *rect)
GLbitfield flags
Definition: glext.h:7161
DWORD dwSize
Definition: ddraw.h:1152
void DDSD2_to_DDSD(const DDSURFACEDESC2 *in, DDSURFACEDESC *out) DECLSPEC_HIDDEN
Definition: utils.c:1262
static BOOL surface_validate_lock_desc(struct ddraw_surface *surface, const DDSURFACEDESC *desc, unsigned int *size)
Definition: surface.c:1037
#define DDERR_INVALIDPARAMS
Definition: ddraw.h:79

◆ ddraw_surface2_PageLock()

static HRESULT WINAPI ddraw_surface2_PageLock ( IDirectDrawSurface2 *  iface,
DWORD  flags 
)
static

Definition at line 2705 of file surface.c.

2706 {
2707  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
2708 
2709  TRACE("iface %p, flags %#x.\n", iface, flags);
2710 
2712 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
IDirectDrawSurface7 IDirectDrawSurface7_iface
static HRESULT WINAPI ddraw_surface7_PageLock(IDirectDrawSurface7 *iface, DWORD Flags)
Definition: surface.c:2679

◆ ddraw_surface2_PageUnlock()

static HRESULT WINAPI ddraw_surface2_PageUnlock ( IDirectDrawSurface2 *  iface,
DWORD  flags 
)
static

Definition at line 2751 of file surface.c.

2752 {
2753  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
2754 
2755  TRACE("iface %p, flags %#x.\n", iface, flags);
2756 
2758 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
static HRESULT WINAPI ddraw_surface7_PageUnlock(IDirectDrawSurface7 *iface, DWORD Flags)
Definition: surface.c:2726
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface2_QueryInterface()

static HRESULT WINAPI ddraw_surface2_QueryInterface ( IDirectDrawSurface2 *  iface,
REFIID  riid,
void **  object 
)
static

Definition at line 269 of file surface.c.

270 {
271  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
272 
273  TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
274 
276 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
REFIID riid
Definition: precomp.h:44
static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface, REFIID riid, void **obj)
Definition: surface.c:133
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface2_Release()

static ULONG WINAPI ddraw_surface2_Release ( IDirectDrawSurface2 *  iface)
static

Definition at line 646 of file surface.c.

647 {
649  ULONG refcount = InterlockedDecrement(&This->ref2);
650 
651  TRACE("iface %p decreasing refcount to %u.\n", iface, refcount);
652 
653  if (refcount == 0)
654  {
656  }
657 
658  return refcount;
659 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
#define TRACE(s)
Definition: solgame.cpp:4
static ULONG ddraw_surface_release_iface(struct ddraw_surface *This)
Definition: surface.c:533
#define InterlockedDecrement
Definition: armddk.h:52
unsigned int ULONG
Definition: retypes.h:1

◆ ddraw_surface2_ReleaseDC()

static HRESULT WINAPI ddraw_surface2_ReleaseDC ( IDirectDrawSurface2 *  iface,
HDC  dc 
)
static

Definition at line 2352 of file surface.c.

2353 {
2354  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
2355 
2356  TRACE("iface %p, dc %p.\n", iface, dc);
2357 
2359 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
HDC dc
Definition: cylfrac.c:34
static HRESULT WINAPI ddraw_surface7_ReleaseDC(IDirectDrawSurface7 *iface, HDC hdc)
Definition: surface.c:2308
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface2_Restore()

static HRESULT WINAPI ddraw_surface2_Restore ( IDirectDrawSurface2 *  iface)
static

Definition at line 3734 of file surface.c.

3735 {
3736  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
3737 
3738  TRACE("iface %p.\n", iface);
3739 
3741 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
static HRESULT WINAPI ddraw_surface7_Restore(IDirectDrawSurface7 *iface)
Definition: surface.c:3670
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface2_SetClipper()

static HRESULT WINAPI ddraw_surface2_SetClipper ( IDirectDrawSurface2 *  iface,
IDirectDrawClipper *  clipper 
)
static

Definition at line 4513 of file surface.c.

4514 {
4515  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
4516 
4517  TRACE("iface %p, clipper %p.\n", iface, clipper);
4518 
4520 }
static HRESULT WINAPI ddraw_surface7_SetClipper(IDirectDrawSurface7 *iface, IDirectDrawClipper *iclipper)
Definition: surface.c:4447
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
struct ddraw_clipper * clipper
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface2_SetColorKey()

static HRESULT WINAPI ddraw_surface2_SetColorKey ( IDirectDrawSurface2 *  iface,
DWORD  flags,
DDCOLORKEY color_key 
)
static

Definition at line 4887 of file surface.c.

4888 {
4889  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
4890 
4891  TRACE("iface %p, flags %#x, color_key %p.\n", iface, flags, color_key);
4892 
4893  return ddraw_surface_set_color_key(surface, flags, color_key);
4894 }
static HRESULT ddraw_surface_set_color_key(struct ddraw_surface *surface, DWORD flags, DDCOLORKEY *color_key)
Definition: surface.c:4775
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161

◆ ddraw_surface2_SetOverlayPosition()

static HRESULT WINAPI ddraw_surface2_SetOverlayPosition ( IDirectDrawSurface2 *  iface,
LONG  x,
LONG  y 
)
static

Definition at line 3797 of file surface.c.

3798 {
3799  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
3800 
3801  TRACE("iface %p, x %d, y %d.\n", iface, x, y);
3802 
3804 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDrawSurface7 IDirectDrawSurface7_iface
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
static HRESULT WINAPI ddraw_surface7_SetOverlayPosition(IDirectDrawSurface7 *iface, LONG x, LONG y)
Definition: surface.c:3764

◆ ddraw_surface2_SetPalette()

static HRESULT WINAPI ddraw_surface2_SetPalette ( IDirectDrawSurface2 *  iface,
IDirectDrawPalette *  palette 
)
static

Definition at line 4952 of file surface.c.

4953 {
4954  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
4955 
4956  TRACE("iface %p, palette %p.\n", iface, palette);
4957 
4958  if (IDirectDrawSurface2_IsLost(iface) == DDERR_SURFACELOST)
4959  {
4960  WARN("Surface lost, returning DDERR_SURFACELOST.\n");
4961  return DDERR_SURFACELOST;
4962  }
4963 
4964  return ddraw_surface_set_palette(surface, palette);
4965 }
#define DDERR_SURFACELOST
Definition: ddraw.h:122
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
#define WARN(fmt,...)
Definition: debug.h:111
static HRESULT ddraw_surface_set_palette(struct ddraw_surface *surface, IDirectDrawPalette *palette)
Definition: surface.c:449
#define TRACE(s)
Definition: solgame.cpp:4
static HPALETTE palette
Definition: clipboard.c:1345

◆ ddraw_surface2_Unlock()

static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface2_Unlock ( IDirectDrawSurface2 *  iface,
void data 
)
static

Definition at line 1207 of file surface.c.

1208 {
1209  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
1210 
1211  TRACE("iface %p, data %p.\n", iface, data);
1212 
1213  /* data might not be the LPRECT of later versions, so drop it. */
1215 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Unlock(IDirectDrawSurface7 *iface, RECT *pRect)
Definition: surface.c:1172
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface2_UpdateOverlay()

static HRESULT WINAPI ddraw_surface2_UpdateOverlay ( IDirectDrawSurface2 *  iface,
RECT src_rect,
IDirectDrawSurface2 *  dst_surface,
RECT dst_rect,
DWORD  flags,
DDOVERLAYFX fx 
)
static

Definition at line 3891 of file surface.c.

3893 {
3894  struct ddraw_surface *src_impl = impl_from_IDirectDrawSurface2(iface);
3895  struct ddraw_surface *dst_impl = unsafe_impl_from_IDirectDrawSurface2(dst_surface);
3896 
3897  TRACE("iface %p, src_rect %s, dst_surface %p, dst_rect %s, flags %#x, fx %p.\n",
3898  iface, wine_dbgstr_rect(src_rect), dst_surface, wine_dbgstr_rect(dst_rect), flags, fx);
3899 
3900  return ddraw_surface7_UpdateOverlay(&src_impl->IDirectDrawSurface7_iface, src_rect,
3901  dst_impl ? &dst_impl->IDirectDrawSurface7_iface : NULL, dst_rect, flags, fx);
3902 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
const char * wine_dbgstr_rect(const RECT *rect)
GLbitfield flags
Definition: glext.h:7161
static struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
Definition: surface.c:5689
GLfixed fx
Definition: tritemp.h:482
IDirectDrawSurface7 IDirectDrawSurface7_iface
static HRESULT WINAPI ddraw_surface7_UpdateOverlay(IDirectDrawSurface7 *iface, RECT *src_rect, IDirectDrawSurface7 *dst_surface, RECT *dst_rect, DWORD flags, DDOVERLAYFX *fx)
Definition: surface.c:3830

◆ ddraw_surface2_UpdateOverlayDisplay()

static HRESULT WINAPI ddraw_surface2_UpdateOverlayDisplay ( IDirectDrawSurface2 *  iface,
DWORD  flags 
)
static

Definition at line 3953 of file surface.c.

3954 {
3955  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
3956 
3957  TRACE("iface %p, flags %#x.\n", iface, flags);
3958 
3960 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
static HRESULT WINAPI ddraw_surface7_UpdateOverlayDisplay(IDirectDrawSurface7 *iface, DWORD Flags)
Definition: surface.c:3928
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface2_UpdateOverlayZOrder()

static HRESULT WINAPI ddraw_surface2_UpdateOverlayZOrder ( IDirectDrawSurface2 *  iface,
DWORD  flags,
IDirectDrawSurface2 *  reference 
)
static

Definition at line 4027 of file surface.c.

4029 {
4030  struct ddraw_surface *surface = impl_from_IDirectDrawSurface2(iface);
4032 
4033  TRACE("iface %p, flags %#x, reference %p.\n", iface, flags, reference);
4034 
4036  reference_impl ? &reference_impl->IDirectDrawSurface7_iface : NULL);
4037 }
static struct ddraw_surface * impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
static struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface2(IDirectDrawSurface2 *iface)
Definition: surface.c:5689
GLint reference
Definition: glext.h:11729
static HRESULT WINAPI ddraw_surface7_UpdateOverlayZOrder(IDirectDrawSurface7 *iface, DWORD flags, IDirectDrawSurface7 *reference)
Definition: surface.c:3984
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface3_AddAttachedSurface()

static HRESULT WINAPI ddraw_surface3_AddAttachedSurface ( IDirectDrawSurface3 *  iface,
IDirectDrawSurface3 *  attachment 
)
static

Definition at line 1953 of file surface.c.

1954 {
1955  struct ddraw_surface *surface = impl_from_IDirectDrawSurface3(iface);
1957  HRESULT hr;
1958 
1959  TRACE("iface %p, attachment %p.\n", iface, attachment);
1960 
1962  attachment_impl ? &attachment_impl->IDirectDrawSurface4_iface : NULL)))
1963  return hr;
1964 
1965  attachment_impl->attached_iface = (IUnknown *)attachment;
1966  IUnknown_AddRef(attachment_impl->attached_iface);
1968  return hr;
1969 }
static ULONG WINAPI ddraw_surface4_Release(IDirectDrawSurface4 *iface)
Definition: surface.c:616
GLenum attachment
Definition: glext.h:6295
static struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface3(IDirectDrawSurface3 *iface)
Definition: surface.c:5673
HRESULT hr
Definition: shlfolder.c:183
static struct ddraw_surface * impl_from_IDirectDrawSurface3(IDirectDrawSurface3 *iface)
smooth NULL
Definition: ftsmooth.c:416
IDirectDrawSurface4 IDirectDrawSurface4_iface
IUnknown * attached_iface
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static HRESULT WINAPI ddraw_surface4_AddAttachedSurface(IDirectDrawSurface4 *iface, IDirectDrawSurface4 *attachment)
Definition: surface.c:1914

◆ ddraw_surface3_AddOverlayDirtyRect()

static HRESULT WINAPI ddraw_surface3_AddOverlayDirtyRect ( IDirectDrawSurface3 *  iface,
RECT rect 
)
static

Definition at line 2168 of file surface.c.

2169 {
2170  struct ddraw_surface *surface = impl_from_IDirectDrawSurface3(iface);
2171 
2172  TRACE("iface %p, rect %s.\n", iface, wine_dbgstr_rect(rect));
2173 
2175 }
static struct ddraw_surface * impl_from_IDirectDrawSurface3(IDirectDrawSurface3 *iface)
& rect
Definition: startmenu.cpp:1413
#define TRACE(s)
Definition: solgame.cpp:4
const char * wine_dbgstr_rect(const RECT *rect)
static HRESULT WINAPI ddraw_surface7_AddOverlayDirtyRect(IDirectDrawSurface7 *iface, RECT *Rect)
Definition: surface.c:2152
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface3_AddRef()

static ULONG WINAPI ddraw_surface3_AddRef ( IDirectDrawSurface3 *  iface)
static

Definition at line 371 of file surface.c.

372 {
374  ULONG refcount = InterlockedIncrement(&This->ref3);
375 
376  TRACE("iface %p increasing refcount to %u.\n", iface, refcount);
377 
378  if (refcount == 1)
379  {
381  }
382 
383  return refcount;
384 }
static struct ddraw_surface * impl_from_IDirectDrawSurface3(IDirectDrawSurface3 *iface)
static void ddraw_surface_add_iface(struct ddraw_surface *surface)
Definition: surface.c:315
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53
unsigned int ULONG
Definition: retypes.h:1

Referenced by ddraw_surface3_GetAttachedSurface().

◆ ddraw_surface3_Blt()

static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface3_Blt ( IDirectDrawSurface3 *  iface,
RECT dst_rect,
IDirectDrawSurface3 *  src_surface,
RECT src_rect,
DWORD  flags,
DDBLTFX fx 
)
static

Definition at line 1768 of file surface.c.

1770 {
1772  struct ddraw_surface *src_impl = unsafe_impl_from_IDirectDrawSurface3(src_surface);
1773 
1774  TRACE("iface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, fx %p.\n",
1775  iface, wine_dbgstr_rect(dst_rect), src_surface, wine_dbgstr_rect(src_rect), flags, fx);
1776 
1777  return ddraw_surface7_Blt(&dst->IDirectDrawSurface7_iface, dst_rect,
1778  src_impl ? &src_impl->IDirectDrawSurface7_iface : NULL, src_rect, flags, fx);
1779 }
static struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface3(IDirectDrawSurface3 *iface)
Definition: surface.c:5673
static struct ddraw_surface * impl_from_IDirectDrawSurface3(IDirectDrawSurface3 *iface)
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
const char * wine_dbgstr_rect(const RECT *rect)
GLbitfield flags
Definition: glext.h:7161
GLfixed fx
Definition: tritemp.h:482
IDirectDrawSurface7 IDirectDrawSurface7_iface
GLenum GLenum dst
Definition: glext.h:6340
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Blt(IDirectDrawSurface7 *iface, RECT *dst_rect, IDirectDrawSurface7 *src_surface, RECT *src_rect, DWORD flags, DDBLTFX *fx)
Definition: surface.c:1574

◆ ddraw_surface3_BltBatch()

static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface3_BltBatch ( IDirectDrawSurface3 *  iface,
DDBLTBATCH batch,
DWORD  count,
DWORD  flags 
)
static

Definition at line 2789 of file surface.c.

2790 {
2791  struct ddraw_surface *surface = impl_from_IDirectDrawSurface3(iface);
2792 
2793  TRACE("iface %p, batch %p, count %u, flags %#x.\n", iface, batch, count, flags);
2794 
2795  return ddraw_surface7_BltBatch(&surface->IDirectDrawSurface7_iface, batch, count, flags);
2796 }
GLuint GLuint GLsizei count
Definition: gl.h:1545
static struct ddraw_surface * impl_from_IDirectDrawSurface3(IDirectDrawSurface3 *iface)
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_BltBatch(IDirectDrawSurface7 *iface, DDBLTBATCH *Batch, DWORD Count, DWORD Flags)
Definition: surface.c:2772
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface3_BltFast()

static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface3_BltFast ( IDirectDrawSurface3 *  iface,
DWORD  dst_x,
DWORD  dst_y,
IDirectDrawSurface3 *  src_surface,
RECT src_rect,
DWORD  flags 
)
static

Definition at line 4322 of file surface.c.

4324 {
4325  struct ddraw_surface *dst_impl = impl_from_IDirectDrawSurface3(iface);
4326  struct ddraw_surface *src_impl = unsafe_impl_from_IDirectDrawSurface3(src_surface);
4327 
4328  TRACE("iface %p, dst_x %u, dst_y %u, src_surface %p, src_rect %s, flags %#x.\n",
4329  iface, dst_x, dst_y, src_surface, wine_dbgstr_rect(src_rect), flags);
4330 
4331  return ddraw_surface7_BltFast(&dst_impl->IDirectDrawSurface7_iface, dst_x, dst_y,
4332  src_impl ? &src_impl->IDirectDrawSurface7_iface : NULL, src_rect, flags);
4333 }
static struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface3(IDirectDrawSurface3 *iface)
Definition: surface.c:5673
static struct ddraw_surface * impl_from_IDirectDrawSurface3(IDirectDrawSurface3 *iface)
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_BltFast(IDirectDrawSurface7 *iface, DWORD dst_x, DWORD dst_y, IDirectDrawSurface7 *src_surface, RECT *src_rect, DWORD trans)
Definition: surface.c:4244
const char * wine_dbgstr_rect(const RECT *rect)
GLbitfield flags
Definition: glext.h:7161
IDirectDrawSurface7 IDirectDrawSurface7_iface

◆ ddraw_surface3_DeleteAttachedSurface()

static HRESULT WINAPI ddraw_surface3_DeleteAttachedSurface ( IDirectDrawSurface3 *  iface,
DWORD  flags,
IDirectDrawSurface3 *  attachment 
)
static

Definition at line 2107 of file surface.c.

2109 {
2110  struct ddraw_surface *surface = impl_from_IDirectDrawSurface3(iface);
2112 
2113  TRACE("iface %p, flags %#x, attachment %p.\n", iface, flags, attachment);
2114 
2115  return ddraw_surface_delete_attached_surface(surface, attachment_impl, (IUnknown *)attachment);
2116 }
GLenum attachment
Definition: glext.h:6295
static HRESULT ddraw_surface_delete_attached_surface(struct ddraw_surface *surface, struct ddraw_surface *attachment, IUnknown *detach_iface)
Definition: surface.c:2022
static struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface3(IDirectDrawSurface3 *iface)
Definition: surface.c:5673
static struct ddraw_surface * impl_from_IDirectDrawSurface3(IDirectDrawSurface3 *iface)
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161

◆ ddraw_surface3_EnumAttachedSurfaces()

static HRESULT WINAPI ddraw_surface3_EnumAttachedSurfaces ( IDirectDrawSurface3 *  iface,
void context,
LPDDENUMSURFACESCALLBACK  callback 
)
static

Definition at line 2931 of file surface.c.

2933 {
2934  struct ddraw_surface *surface = impl_from_IDirectDrawSurface3(iface);
2935  struct callback_info info;
2936 
2937  TRACE("iface %p, context %p, callback %p.\n", iface, context, callback);
2938 
2939  info.callback = callback;
2940  info.context = context;
2941 
2943  &info, EnumCallback);
2944 }
Definition: http.c:6587
static struct ddraw_surface * impl_from_IDirectDrawSurface3(IDirectDrawSurface3 *iface)
void * context
Definition: