Henri Verbeet : wined3d: Get rid of the WINED3DCUBEMAP_FACES typedef.

Alexandre Julliard julliard at winehq.org
Fri Jan 13 11:44:29 CST 2012


Module: wine
Branch: master
Commit: a44b062aed558c7aea64c51db19e88767032517a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a44b062aed558c7aea64c51db19e88767032517a

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Thu Jan 12 21:43:11 2012 +0100

wined3d: Get rid of the WINED3DCUBEMAP_FACES typedef.

---

 dlls/d3d10core/device.c |    2 +-
 dlls/d3d8/device.c      |    2 +-
 dlls/d3d9/device.c      |    2 +-
 dlls/ddraw/ddraw.c      |   19 ++++++++++---------
 dlls/dxgi/device.c      |    2 +-
 include/wine/wined3d.h  |   21 ++++++++++-----------
 6 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/dlls/d3d10core/device.c b/dlls/d3d10core/device.c
index 772726d..065c643 100644
--- a/dlls/d3d10core/device.c
+++ b/dlls/d3d10core/device.c
@@ -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;
diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c
index 043f582..dcdefff 100644
--- a/dlls/d3d8/device.c
+++ b/dlls/d3d8/device.c
@@ -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;
diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c
index 444d6b4..c46bd59 100644
--- a/dlls/d3d9/device.c
+++ b/dlls/d3d9/device.c
@@ -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;
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
index c54f878..e413ae6 100644
--- a/dlls/ddraw/ddraw.c
+++ b/dlls/ddraw/ddraw.c
@@ -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)
diff --git a/dlls/dxgi/device.c b/dlls/dxgi/device.c
index 39c1a21..ed5aba0 100644
--- a/dlls/dxgi/device.c
+++ b/dlls/dxgi/device.c
@@ -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);
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index 5759f4a..ea9493c 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -648,16 +648,15 @@ enum wined3d_basis_type
     WINED3D_BASIS_INTERPOLATE               = 2,
 };
 
-typedef enum _WINED3DCUBEMAP_FACES
-{
-    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;
+enum wined3d_cubemap_face
+{
+    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);




More information about the wine-cvs mailing list