Module: wine Branch: master Commit: 86eb211159552bf56c352851127b200e816f9a80 URL: http://source.winehq.org/git/wine.git/?a=commit;h=86eb211159552bf56c35285112...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Fri Jun 7 10:17:54 2013 +0200
ddraw: Rename PixelFormat_DD2WineD3D() to wined3dformat_from_ddrawformat().
For consistency with the other D3D dlls.
---
dlls/ddraw/ddraw_private.h | 2 +- dlls/ddraw/surface.c | 10 +++++----- dlls/ddraw/utils.c | 16 ++-------------- 3 files changed, 8 insertions(+), 20 deletions(-)
diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h index 674b222..d4fe145 100644 --- a/dlls/ddraw/ddraw_private.h +++ b/dlls/ddraw/ddraw_private.h @@ -552,7 +552,7 @@ struct d3d_vertex_buffer *unsafe_impl_from_IDirect3DVertexBuffer7(IDirect3DVerte (((((d3dvtVertexType) >> (16 + (2 * (tex_num)))) + 1) & 0x03) + 1)
void PixelFormat_WineD3DtoDD(DDPIXELFORMAT *DDPixelFormat, enum wined3d_format_id WineD3DFormat) DECLSPEC_HIDDEN; -enum wined3d_format_id PixelFormat_DD2WineD3D(const DDPIXELFORMAT *DDPixelFormat) DECLSPEC_HIDDEN; +enum wined3d_format_id wined3dformat_from_ddrawformat(const DDPIXELFORMAT *format) DECLSPEC_HIDDEN; void DDRAW_dump_surface_desc(const DDSURFACEDESC2 *lpddsd) DECLSPEC_HIDDEN; void dump_D3DMATRIX(const D3DMATRIX *mat) DECLSPEC_HIDDEN; void DDRAW_dump_DDCAPS(const DDCAPS *lpcaps) DECLSPEC_HIDDEN; diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index 9d50e67..4ca02bd 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -4328,7 +4328,7 @@ static HRESULT WINAPI ddraw_surface7_SetSurfaceDesc(IDirectDrawSurface7 *iface, if (DDSD->dwFlags & DDSD_PIXELFORMAT) { enum wined3d_format_id current_format_id; - format_id = PixelFormat_DD2WineD3D(&DDSD->u4.ddpfPixelFormat); + format_id = wined3dformat_from_ddrawformat(&DDSD->u4.ddpfPixelFormat);
if (format_id == WINED3DFMT_UNKNOWN) { @@ -4336,7 +4336,7 @@ static HRESULT WINAPI ddraw_surface7_SetSurfaceDesc(IDirectDrawSurface7 *iface, wined3d_mutex_unlock(); return DDERR_INVALIDPARAMS; } - current_format_id = PixelFormat_DD2WineD3D(&This->surface_desc.u4.ddpfPixelFormat); + current_format_id = wined3dformat_from_ddrawformat(&This->surface_desc.u4.ddpfPixelFormat); if (format_id != current_format_id) { TRACE("Surface format changed from %#x to %#x.\n", current_format_id, format_id); @@ -4345,7 +4345,7 @@ static HRESULT WINAPI ddraw_surface7_SetSurfaceDesc(IDirectDrawSurface7 *iface, } else { - format_id = PixelFormat_DD2WineD3D(&This->surface_desc.u4.ddpfPixelFormat); + format_id = wined3dformat_from_ddrawformat(&This->surface_desc.u4.ddpfPixelFormat); }
if (update_wined3d) @@ -5613,7 +5613,7 @@ HRESULT ddraw_surface_create_texture(struct ddraw_surface *surface, DWORD surfac else pool = WINED3D_POOL_DEFAULT;
- wined3d_desc.format = PixelFormat_DD2WineD3D(&surface->surface_desc.u4.ddpfPixelFormat); + wined3d_desc.format = wined3dformat_from_ddrawformat(&surface->surface_desc.u4.ddpfPixelFormat); wined3d_desc.multisample_type = WINED3D_MULTISAMPLE_NONE; wined3d_desc.multisample_quality = 0; wined3d_desc.usage = 0; @@ -5753,7 +5753,7 @@ HRESULT ddraw_surface_init(struct ddraw_surface *surface, struct ddraw *ddraw, desc->ddsCaps.dwCaps |= DDSCAPS_LOCALVIDMEM; }
- format = PixelFormat_DD2WineD3D(&desc->u4.ddpfPixelFormat); + format = wined3dformat_from_ddrawformat(&desc->u4.ddpfPixelFormat); if (format == WINED3DFMT_UNKNOWN) { WARN("Unsupported / unknown pixelformat.\n"); diff --git a/dlls/ddraw/utils.c b/dlls/ddraw/utils.c index a1fb43b..c605c74 100644 --- a/dlls/ddraw/utils.c +++ b/dlls/ddraw/utils.c @@ -349,20 +349,8 @@ void PixelFormat_WineD3DtoDD(DDPIXELFORMAT *DDPixelFormat, enum wined3d_format_i DDRAW_dump_pixelformat(DDPixelFormat); } } -/***************************************************************************** - * PixelFormat_DD2WineD3D - * - * Reads a DDPIXELFORMAT structure and returns the equivalent wined3d - * format ID. - * - * Params: - * DDPixelFormat: The source format - * - * Returns: - * The wined3d format ID equivalent to the DDraw format - * WINED3DFMT_UNKNOWN if a matching format wasn't found - *****************************************************************************/ -enum wined3d_format_id PixelFormat_DD2WineD3D(const DDPIXELFORMAT *DDPixelFormat) + +enum wined3d_format_id wined3dformat_from_ddrawformat(const DDPIXELFORMAT *DDPixelFormat) { TRACE("Convert a DirectDraw Pixelformat to a WineD3D Pixelformat\n"); if(TRACE_ON(ddraw))