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

Alexandre Julliard julliard at winehq.org
Tue Dec 20 13:43:24 CST 2011


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

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Mon Dec 19 21:00:08 2011 +0100

wined3d: Get rid of the WINED3DDEGREETYPE typedef.

---

 dlls/wined3d/drawprim.c        |    2 +-
 dlls/wined3d/state.c           |    4 ++--
 dlls/wined3d/stateblock.c      |    4 ++--
 dlls/wined3d/utils.c           |   14 ++++++++------
 dlls/wined3d/wined3d_private.h |    2 +-
 include/wine/wined3d.h         |   17 ++++++++---------
 6 files changed, 22 insertions(+), 21 deletions(-)

diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
index 3b18c63..716119e 100644
--- a/dlls/wined3d/drawprim.c
+++ b/dlls/wined3d/drawprim.c
@@ -837,7 +837,7 @@ HRESULT tesselate_rectpatch(struct wined3d_device *This, struct WineD3DRectPatch
     }
     if (info->basis != WINED3DBASIS_BEZIER)
         FIXME("Basis is %s, how to handle this?\n", debug_d3dbasis(info->basis));
-    if (info->degree != WINED3DDEGREE_CUBIC)
+    if (info->degree != WINED3D_DEGREE_CUBIC)
         FIXME("Degree is %s, how to handle this?\n", debug_d3ddegree(info->degree));
 
     /* First, get the boundary cube of the input data */
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index 390519f..7820048 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -1798,14 +1798,14 @@ static void state_patchsegments(struct wined3d_context *context, const struct wi
 
 static void state_positiondegree(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
 {
-    if (state->render_states[WINED3DRS_POSITIONDEGREE] != WINED3DDEGREE_CUBIC)
+    if (state->render_states[WINED3DRS_POSITIONDEGREE] != WINED3D_DEGREE_CUBIC)
         FIXME("WINED3DRS_POSITIONDEGREE %#x not yet implemented.\n",
                 state->render_states[WINED3DRS_POSITIONDEGREE]);
 }
 
 static void state_normaldegree(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
 {
-    if (state->render_states[WINED3DRS_NORMALDEGREE] != WINED3DDEGREE_LINEAR)
+    if (state->render_states[WINED3DRS_NORMALDEGREE] != WINED3D_DEGREE_LINEAR)
         FIXME("WINED3DRS_NORMALDEGREE %#x not yet implemented.\n",
                 state->render_states[WINED3DRS_NORMALDEGREE]);
 }
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
index e4acd54..e29bbdc 100644
--- a/dlls/wined3d/stateblock.c
+++ b/dlls/wined3d/stateblock.c
@@ -1208,8 +1208,8 @@ void stateblock_init_default_state(struct wined3d_stateblock *stateblock)
     tmpfloat.f = 0.0f;
     state->render_states[WINED3DRS_TWEENFACTOR] = tmpfloat.d;
     state->render_states[WINED3DRS_BLENDOP] = WINED3D_BLEND_OP_ADD;
-    state->render_states[WINED3DRS_POSITIONDEGREE] = WINED3DDEGREE_CUBIC;
-    state->render_states[WINED3DRS_NORMALDEGREE] = WINED3DDEGREE_LINEAR;
+    state->render_states[WINED3DRS_POSITIONDEGREE] = WINED3D_DEGREE_CUBIC;
+    state->render_states[WINED3DRS_NORMALDEGREE] = WINED3D_DEGREE_LINEAR;
     /* states new in d3d9 */
     state->render_states[WINED3DRS_SCISSORTESTENABLE] = FALSE;
     state->render_states[WINED3DRS_SLOPESCALEDEPTHBIAS] = 0;
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index e16aa70..b4f4ff8 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -2402,12 +2402,14 @@ const char *debug_d3dbasis(WINED3DBASISTYPE basis) {
     }
 }
 
-const char *debug_d3ddegree(WINED3DDEGREETYPE degree) {
-    switch(degree) {
-        case WINED3DDEGREE_LINEAR:      return "WINED3DDEGREE_LINEAR";
-        case WINED3DDEGREE_QUADRATIC:   return "WINED3DDEGREE_QUADRATIC";
-        case WINED3DDEGREE_CUBIC:       return "WINED3DDEGREE_CUBIC";
-        case WINED3DDEGREE_QUINTIC:     return "WINED3DDEGREE_QUINTIC";
+const char *debug_d3ddegree(enum wined3d_degree_type degree)
+{
+    switch (degree)
+    {
+        case WINED3D_DEGREE_LINEAR:     return "WINED3D_DEGREE_LINEAR";
+        case WINED3D_DEGREE_QUADRATIC:  return "WINED3D_DEGREE_QUADRATIC";
+        case WINED3D_DEGREE_CUBIC:      return "WINED3D_DEGREE_CUBIC";
+        case WINED3D_DEGREE_QUINTIC:    return "WINED3D_DEGREE_QUINTIC";
         default:                        return "unrecognized";
     }
 }
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 1d83eeb..c8c7070 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2485,7 +2485,7 @@ 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_d3ddegree(WINED3DDEGREETYPE order) DECLSPEC_HIDDEN;
+const char *debug_d3ddegree(enum wined3d_degree_type order) DECLSPEC_HIDDEN;
 const char *debug_d3dtop(WINED3DTEXTUREOP d3dtop) DECLSPEC_HIDDEN;
 void dump_color_fixup_desc(struct color_fixup_desc fixup) DECLSPEC_HIDDEN;
 const char *debug_surflocation(DWORD flag) DECLSPEC_HIDDEN;
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index a3e9971..ecb63a0 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -97,14 +97,13 @@ enum wined3d_device_type
     WINED3D_DEVICE_TYPE_NULLREF             = 4,
 };
 
-typedef enum _WINED3DDEGREETYPE
+enum wined3d_degree_type
 {
-    WINED3DDEGREE_LINEAR                    = 1,
-    WINED3DDEGREE_QUADRATIC                 = 2,
-    WINED3DDEGREE_CUBIC                     = 3,
-    WINED3DDEGREE_QUINTIC                   = 5,
-    WINED3DDEGREE_FORCE_DWORD               = 0x7fffffff
-} WINED3DDEGREETYPE;
+    WINED3D_DEGREE_LINEAR                   = 1,
+    WINED3D_DEGREE_QUADRATIC                = 2,
+    WINED3D_DEGREE_CUBIC                    = 3,
+    WINED3D_DEGREE_QUINTIC                  = 5,
+};
 
 #define WINEMAKEFOURCC(ch0, ch1, ch2, ch3) \
         ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \
@@ -1603,7 +1602,7 @@ struct wined3d_rect_patch_info
     UINT height;
     UINT stride;
     WINED3DBASISTYPE basis;
-    WINED3DDEGREETYPE degree;
+    enum wined3d_degree_type degree;
 };
 
 struct wined3d_tri_patch_info
@@ -1611,7 +1610,7 @@ struct wined3d_tri_patch_info
     UINT start_vertex_offset;
     UINT vertex_count;
     WINED3DBASISTYPE basis;
-    WINED3DDEGREETYPE degree;
+    enum wined3d_degree_type degree;
 };
 
 struct wined3d_adapter_identifier




More information about the wine-cvs mailing list