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

Alexandre Julliard julliard at winehq.org
Tue Jan 3 12:52:53 CST 2012


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

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Mon Jan  2 21:45:30 2012 +0100

wined3d: Get rid of the WINED3DFILLMODE typedef.

---

 dlls/wined3d/state.c      |   10 +++++-----
 dlls/wined3d/stateblock.c |    2 +-
 include/wine/wined3d.h    |   11 +++++------
 3 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index 034fd34..a392f1f 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -49,24 +49,24 @@ static void state_nop(struct wined3d_context *context, const struct wined3d_stat
 
 static void state_fillmode(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
 {
-    WINED3DFILLMODE mode = state->render_states[WINED3D_RS_FILLMODE];
+    enum wined3d_fill_mode mode = state->render_states[WINED3D_RS_FILLMODE];
 
     switch (mode)
     {
-        case WINED3DFILL_POINT:
+        case WINED3D_FILL_POINT:
             glPolygonMode(GL_FRONT_AND_BACK, GL_POINT);
             checkGLcall("glPolygonMode(GL_FRONT_AND_BACK, GL_POINT)");
             break;
-        case WINED3DFILL_WIREFRAME:
+        case WINED3D_FILL_WIREFRAME:
             glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
             checkGLcall("glPolygonMode(GL_FRONT_AND_BACK, GL_LINE)");
             break;
-        case WINED3DFILL_SOLID:
+        case WINED3D_FILL_SOLID:
             glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
             checkGLcall("glPolygonMode(GL_FRONT_AND_BACK, GL_FILL)");
             break;
         default:
-            FIXME("Unrecognized WINED3D_RS_FILLMODE %d.\n", mode);
+            FIXME("Unrecognized fill mode %#x.\n", mode);
     }
 }
 
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
index 4399446..feabe3d 100644
--- a/dlls/wined3d/stateblock.c
+++ b/dlls/wined3d/stateblock.c
@@ -1123,7 +1123,7 @@ void stateblock_init_default_state(struct wined3d_stateblock *stateblock)
        state->render_states[WINED3D_RS_ZENABLE] = WINED3D_ZB_TRUE;
     else
        state->render_states[WINED3D_RS_ZENABLE] = WINED3D_ZB_FALSE;
-    state->render_states[WINED3D_RS_FILLMODE] = WINED3DFILL_SOLID;
+    state->render_states[WINED3D_RS_FILLMODE] = WINED3D_FILL_SOLID;
     state->render_states[WINED3D_RS_SHADEMODE] = WINED3D_SHADE_GOURAUD;
     lp.lp.repeat_factor = 0;
     lp.lp.line_pattern = 0;
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index 9ff53784..312b63c 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -455,13 +455,12 @@ enum wined3d_shade_mode
     WINED3D_SHADE_PHONG                     = 3,
 };
 
-typedef enum _WINED3DFILLMODE
+enum wined3d_fill_mode
 {
-    WINED3DFILL_POINT                       = 1,
-    WINED3DFILL_WIREFRAME                   = 2,
-    WINED3DFILL_SOLID                       = 3,
-    WINED3DFILL_FORCE_DWORD                 = 0x7fffffff
-} WINED3DFILLMODE;
+    WINED3D_FILL_POINT                      = 1,
+    WINED3D_FILL_WIREFRAME                  = 2,
+    WINED3D_FILL_SOLID                      = 3,
+};
 
 typedef enum _WINED3DCULL
 {




More information about the wine-cvs mailing list