wined3d: Get rid of the WINED3DCUBEMAP_FACES typedef.

oldstable
Henri Verbeet 2012-01-12 21:43:11 +01:00 committed by Alexandre Julliard
parent e1f6a81a2d
commit a44b062aed
6 changed files with 23 additions and 23 deletions

View File

@ -1364,7 +1364,7 @@ static void CDECL device_parent_mode_changed(struct wined3d_device_parent *devic
static HRESULT CDECL device_parent_create_surface(struct wined3d_device_parent *device_parent,
void *container_parent, UINT width, UINT height, enum wined3d_format_id format, DWORD usage,
WINED3DPOOL pool, UINT level, WINED3DCUBEMAP_FACES face, struct wined3d_surface **surface)
WINED3DPOOL pool, UINT level, enum wined3d_cubemap_face face, struct wined3d_surface **surface)
{
struct d3d10_device *device = device_from_wined3d_device_parent(device_parent);
struct d3d10_texture2d *texture;

View File

@ -2812,7 +2812,7 @@ static void CDECL device_parent_mode_changed(struct wined3d_device_parent *devic
static HRESULT CDECL device_parent_create_surface(struct wined3d_device_parent *device_parent,
void *container_parent, UINT width, UINT height, enum wined3d_format_id format, DWORD usage,
WINED3DPOOL pool, UINT level, WINED3DCUBEMAP_FACES face, struct wined3d_surface **surface)
WINED3DPOOL pool, UINT level, enum wined3d_cubemap_face face, struct wined3d_surface **surface)
{
IDirect3DDevice8Impl *device = device_from_device_parent(device_parent);
IDirect3DSurface8Impl *d3d_surface;

View File

@ -3102,7 +3102,7 @@ static void CDECL device_parent_mode_changed(struct wined3d_device_parent *devic
static HRESULT CDECL device_parent_create_surface(struct wined3d_device_parent *device_parent,
void *container_parent, UINT width, UINT height, enum wined3d_format_id format, DWORD usage,
WINED3DPOOL pool, UINT level, WINED3DCUBEMAP_FACES face, struct wined3d_surface **surface)
WINED3DPOOL pool, UINT level, enum wined3d_cubemap_face face, struct wined3d_surface **surface)
{
struct IDirect3DDevice9Impl *device = device_from_device_parent(device_parent);
IDirect3DSurface9Impl *d3d_surface;

View File

@ -5333,7 +5333,7 @@ static void CDECL device_parent_mode_changed(struct wined3d_device_parent *devic
static HRESULT CDECL device_parent_create_surface(struct wined3d_device_parent *device_parent,
void *container_parent, UINT width, UINT height, enum wined3d_format_id format, DWORD usage,
WINED3DPOOL pool, UINT level, WINED3DCUBEMAP_FACES face, struct wined3d_surface **surface)
WINED3DPOOL pool, UINT level, enum wined3d_cubemap_face face, struct wined3d_surface **surface)
{
struct IDirectDrawImpl *ddraw = ddraw_from_device_parent(device_parent);
IDirectDrawSurfaceImpl *surf = NULL;
@ -5345,31 +5345,32 @@ static HRESULT CDECL device_parent_create_surface(struct wined3d_device_parent *
device_parent, container_parent, width, height, format, usage, pool, level, face, surface);
searchcaps.dwCaps2 &= ~DDSCAPS2_CUBEMAP_ALLFACES;
switch(face)
switch (face)
{
case WINED3DCUBEMAP_FACE_POSITIVE_X:
case WINED3D_CUBEMAP_FACE_POSITIVE_X:
TRACE("Asked for positive x\n");
if (searchcaps.dwCaps2 & DDSCAPS2_CUBEMAP)
{
searchcaps.dwCaps2 |= DDSCAPS2_CUBEMAP_POSITIVEX;
}
surf = ddraw->tex_root; break;
case WINED3DCUBEMAP_FACE_NEGATIVE_X:
case WINED3D_CUBEMAP_FACE_NEGATIVE_X:
TRACE("Asked for negative x\n");
searchcaps.dwCaps2 |= DDSCAPS2_CUBEMAP_NEGATIVEX; break;
case WINED3DCUBEMAP_FACE_POSITIVE_Y:
case WINED3D_CUBEMAP_FACE_POSITIVE_Y:
TRACE("Asked for positive y\n");
searchcaps.dwCaps2 |= DDSCAPS2_CUBEMAP_POSITIVEY; break;
case WINED3DCUBEMAP_FACE_NEGATIVE_Y:
case WINED3D_CUBEMAP_FACE_NEGATIVE_Y:
TRACE("Asked for negative y\n");
searchcaps.dwCaps2 |= DDSCAPS2_CUBEMAP_NEGATIVEY; break;
case WINED3DCUBEMAP_FACE_POSITIVE_Z:
case WINED3D_CUBEMAP_FACE_POSITIVE_Z:
TRACE("Asked for positive z\n");
searchcaps.dwCaps2 |= DDSCAPS2_CUBEMAP_POSITIVEZ; break;
case WINED3DCUBEMAP_FACE_NEGATIVE_Z:
case WINED3D_CUBEMAP_FACE_NEGATIVE_Z:
TRACE("Asked for negative z\n");
searchcaps.dwCaps2 |= DDSCAPS2_CUBEMAP_NEGATIVEZ; break;
default: {ERR("Unexpected cube face\n");} /* Stupid compiler */
default:
ERR("Unexpected cube face.\n");
}
if (!surf)

View File

@ -191,7 +191,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_CreateSurface(IWineDXGIDevice *ifac
hr = device_parent->ops->create_surface(device_parent, NULL, desc->Width, desc->Height,
wined3dformat_from_dxgi_format(desc->Format), usage, WINED3DPOOL_DEFAULT, 0,
WINED3DCUBEMAP_FACE_POSITIVE_X, &wined3d_surface);
WINED3D_CUBEMAP_FACE_POSITIVE_X, &wined3d_surface);
if (FAILED(hr))
{
ERR("CreateSurface failed, returning %#x\n", hr);

View File

@ -648,16 +648,15 @@ enum wined3d_basis_type
WINED3D_BASIS_INTERPOLATE = 2,
};
typedef enum _WINED3DCUBEMAP_FACES
enum wined3d_cubemap_face
{
WINED3DCUBEMAP_FACE_POSITIVE_X = 0,
WINED3DCUBEMAP_FACE_NEGATIVE_X = 1,
WINED3DCUBEMAP_FACE_POSITIVE_Y = 2,
WINED3DCUBEMAP_FACE_NEGATIVE_Y = 3,
WINED3DCUBEMAP_FACE_POSITIVE_Z = 4,
WINED3DCUBEMAP_FACE_NEGATIVE_Z = 5,
WINED3DCUBEMAP_FACE_FORCE_DWORD = 0xffffffff
} WINED3DCUBEMAP_FACES;
WINED3D_CUBEMAP_FACE_POSITIVE_X = 0,
WINED3D_CUBEMAP_FACE_NEGATIVE_X = 1,
WINED3D_CUBEMAP_FACE_POSITIVE_Y = 2,
WINED3D_CUBEMAP_FACE_NEGATIVE_Y = 3,
WINED3D_CUBEMAP_FACE_POSITIVE_Z = 4,
WINED3D_CUBEMAP_FACE_NEGATIVE_Z = 5,
};
typedef enum _WINED3DTEXTUREFILTERTYPE
{
@ -1986,7 +1985,7 @@ struct wined3d_device_parent_ops
void (__cdecl *mode_changed)(struct wined3d_device_parent *device_parent);
HRESULT (__cdecl *create_surface)(struct wined3d_device_parent *device_parent, void *container_parent,
UINT width, UINT height, enum wined3d_format_id format_id, DWORD usage, WINED3DPOOL pool,
UINT level, WINED3DCUBEMAP_FACES face, struct wined3d_surface **surface);
UINT level, enum wined3d_cubemap_face face, struct wined3d_surface **surface);
HRESULT (__cdecl *create_rendertarget)(struct wined3d_device_parent *device_parent, void *container_parent,
UINT width, UINT height, enum wined3d_format_id format_id, enum wined3d_multisample_type multisample_type,
DWORD multisample_quality, BOOL lockable, struct wined3d_surface **surface);