[PATCH 5/5] wined3d: Get rid of the WINED3DBASISTYPE typedef.

Henri Verbeet hverbeet at codeweavers.com
Wed Jan 11 14:27:33 CST 2012


---
 dlls/wined3d/drawprim.c        |    2 +-
 dlls/wined3d/utils.c           |   12 +++++++-----
 dlls/wined3d/wined3d_private.h |    2 +-
 include/wine/wined3d.h         |   15 +++++++--------
 4 files changed, 16 insertions(+), 15 deletions(-)

diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
index 61fbb85..707e364 100644
--- a/dlls/wined3d/drawprim.c
+++ b/dlls/wined3d/drawprim.c
@@ -834,7 +834,7 @@ HRESULT tesselate_rectpatch(struct wined3d_device *This, struct WineD3DRectPatch
          */
         ERR("Vertex stride is not a multiple of sizeof(GLfloat)\n");
     }
-    if (info->basis != WINED3DBASIS_BEZIER)
+    if (info->basis != WINED3D_BASIS_BEZIER)
         FIXME("Basis is %s, how to handle this?\n", debug_d3dbasis(info->basis));
     if (info->degree != WINED3D_DEGREE_CUBIC)
         FIXME("Degree is %s, how to handle this?\n", debug_d3ddegree(info->degree));
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index 10db6d8..917d297 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -2398,11 +2398,13 @@ const char *debug_glerror(GLenum error) {
     }
 }
 
-const char *debug_d3dbasis(WINED3DBASISTYPE basis) {
-    switch(basis) {
-        case WINED3DBASIS_BEZIER:       return "WINED3DBASIS_BEZIER";
-        case WINED3DBASIS_BSPLINE:      return "WINED3DBASIS_BSPLINE";
-        case WINED3DBASIS_INTERPOLATE:  return "WINED3DBASIS_INTERPOLATE";
+const char *debug_d3dbasis(enum wined3d_basis_type basis)
+{
+    switch (basis)
+    {
+        case WINED3D_BASIS_BEZIER:      return "WINED3D_BASIS_BEZIER";
+        case WINED3D_BASIS_BSPLINE:     return "WINED3D_BASIS_BSPLINE";
+        case WINED3D_BASIS_INTERPOLATE: return "WINED3D_BASIS_INTERPOLATE";
         default:                        return "unrecognized";
     }
 }
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 15e29ec..80162b2 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2508,7 +2508,7 @@ const char *debug_d3dtstype(enum wined3d_transform_state tstype) DECLSPEC_HIDDEN
 const char *debug_d3dpool(WINED3DPOOL pool) DECLSPEC_HIDDEN;
 const char *debug_fbostatus(GLenum status) DECLSPEC_HIDDEN;
 const char *debug_glerror(GLenum error) DECLSPEC_HIDDEN;
-const char *debug_d3dbasis(WINED3DBASISTYPE basis) DECLSPEC_HIDDEN;
+const char *debug_d3dbasis(enum wined3d_basis_type basis) DECLSPEC_HIDDEN;
 const char *debug_d3ddegree(enum wined3d_degree_type order) DECLSPEC_HIDDEN;
 const char *debug_d3dtop(enum wined3d_texture_op d3dtop) DECLSPEC_HIDDEN;
 void dump_color_fixup_desc(struct color_fixup_desc fixup) DECLSPEC_HIDDEN;
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index d5cf9aa..5366c18 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -641,13 +641,12 @@ enum wined3d_transform_state
 
 #define WINED3D_TS_WORLD_MATRIX(index)                          (enum wined3d_transform_state)(index + 256)
 
-typedef enum _WINED3DBASISTYPE
+enum wined3d_basis_type
 {
-    WINED3DBASIS_BEZIER                     = 0,
-    WINED3DBASIS_BSPLINE                    = 1,
-    WINED3DBASIS_INTERPOLATE                = 2,
-    WINED3DBASIS_FORCE_DWORD                = 0x7fffffff
-} WINED3DBASISTYPE;
+    WINED3D_BASIS_BEZIER                    = 0,
+    WINED3D_BASIS_BSPLINE                   = 1,
+    WINED3D_BASIS_INTERPOLATE               = 2,
+};
 
 typedef enum _WINED3DCUBEMAP_FACES
 {
@@ -1583,7 +1582,7 @@ struct wined3d_rect_patch_info
     UINT width;
     UINT height;
     UINT stride;
-    WINED3DBASISTYPE basis;
+    enum wined3d_basis_type basis;
     enum wined3d_degree_type degree;
 };
 
@@ -1591,7 +1590,7 @@ struct wined3d_tri_patch_info
 {
     UINT start_vertex_offset;
     UINT vertex_count;
-    WINED3DBASISTYPE basis;
+    enum wined3d_basis_type basis;
     enum wined3d_degree_type degree;
 };
 
-- 
1.7.3.4




More information about the wine-patches mailing list