From 00096c82fdb9967ffe89a668a0a7a6cc547d59d6 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Wed, 21 Dec 2011 21:34:59 +0100 Subject: [PATCH] wined3d: Get rid of the WINED3DZBUFFERTYPE typedef. --- dlls/ddraw/ddraw_private.h | 2 +- dlls/ddraw/device.c | 7 +++---- dlls/wined3d/state.c | 8 ++++---- dlls/wined3d/stateblock.c | 4 ++-- include/wine/wined3d.h | 27 +++++++++++++-------------- 5 files changed, 23 insertions(+), 25 deletions(-) diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h index d848c820f6b..5d277033bce 100644 --- a/dlls/ddraw/ddraw_private.h +++ b/dlls/ddraw/ddraw_private.h @@ -329,7 +329,7 @@ extern const GUID IID_D3DDEVICE_WineD3D DECLSPEC_HIDDEN; /* Helper functions */ HRESULT IDirect3DImpl_GetCaps(const struct wined3d *wined3d, D3DDEVICEDESC *Desc123, D3DDEVICEDESC7 *Desc7) DECLSPEC_HIDDEN; -WINED3DZBUFFERTYPE IDirect3DDeviceImpl_UpdateDepthStencil(IDirect3DDeviceImpl *This) DECLSPEC_HIDDEN; +enum wined3d_depth_buffer_type IDirect3DDeviceImpl_UpdateDepthStencil(IDirect3DDeviceImpl *device) DECLSPEC_HIDDEN; static inline IDirect3DDeviceImpl *impl_from_IDirect3DDevice(IDirect3DDevice *iface) { diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index d90bf82b53f..85726efee3e 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -6933,8 +6933,7 @@ IDirect3DDeviceImpl *unsafe_impl_from_IDirect3DDevice(IDirect3DDevice *iface) * The depth stencil state to set if creating the device * *****************************************************************************/ -WINED3DZBUFFERTYPE -IDirect3DDeviceImpl_UpdateDepthStencil(IDirect3DDeviceImpl *This) +enum wined3d_depth_buffer_type IDirect3DDeviceImpl_UpdateDepthStencil(IDirect3DDeviceImpl *This) { IDirectDrawSurface7 *depthStencil = NULL; IDirectDrawSurfaceImpl *dsi; @@ -6945,7 +6944,7 @@ IDirect3DDeviceImpl_UpdateDepthStencil(IDirect3DDeviceImpl *This) { TRACE("Setting wined3d depth stencil to NULL\n"); wined3d_device_set_depth_stencil(This->wined3d_device, NULL); - return WINED3DZB_FALSE; + return WINED3D_ZB_FALSE; } dsi = impl_from_IDirectDrawSurface7(depthStencil); @@ -6953,7 +6952,7 @@ IDirect3DDeviceImpl_UpdateDepthStencil(IDirect3DDeviceImpl *This) wined3d_device_set_depth_stencil(This->wined3d_device, dsi->wined3d_surface); IDirectDrawSurface7_Release(depthStencil); - return WINED3DZB_TRUE; + return WINED3D_ZB_TRUE; } HRESULT d3d_device_init(IDirect3DDeviceImpl *device, IDirectDrawImpl *ddraw, IDirectDrawSurfaceImpl *target) diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 4f3b74b98ae..950125b55de 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -104,21 +104,21 @@ static void state_zenable(struct wined3d_context *context, const struct wined3d_ switch (state->render_states[WINED3D_RS_ZENABLE]) { - case WINED3DZB_FALSE: + case WINED3D_ZB_FALSE: glDisable(GL_DEPTH_TEST); checkGLcall("glDisable GL_DEPTH_TEST"); break; - case WINED3DZB_TRUE: + case WINED3D_ZB_TRUE: glEnable(GL_DEPTH_TEST); checkGLcall("glEnable GL_DEPTH_TEST"); break; - case WINED3DZB_USEW: + case WINED3D_ZB_USEW: glEnable(GL_DEPTH_TEST); checkGLcall("glEnable GL_DEPTH_TEST"); FIXME("W buffer is not well handled\n"); break; default: - FIXME("Unrecognized D3DZBUFFERTYPE value %#x.\n", + FIXME("Unrecognized depth buffer type %#x.\n", state->render_states[WINED3D_RS_ZENABLE]); } } diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c index c9ee958684a..fa3a286e89c 100644 --- a/dlls/wined3d/stateblock.c +++ b/dlls/wined3d/stateblock.c @@ -1120,9 +1120,9 @@ void stateblock_init_default_state(struct wined3d_stateblock *stateblock) TRACE("Render states\n"); /* Render states: */ if (device->auto_depth_stencil) - state->render_states[WINED3D_RS_ZENABLE] = WINED3DZB_TRUE; + state->render_states[WINED3D_RS_ZENABLE] = WINED3D_ZB_TRUE; else - state->render_states[WINED3D_RS_ZENABLE] = WINED3DZB_FALSE; + state->render_states[WINED3D_RS_ZENABLE] = WINED3D_ZB_FALSE; state->render_states[WINED3D_RS_FILLMODE] = WINED3DFILL_SOLID; state->render_states[WINED3D_RS_SHADEMODE] = WINED3DSHADE_GOURAUD; lp.lp.repeat_factor = 0; diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 2005eaa2169..d27ef2adca2 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -423,23 +423,22 @@ enum wined3d_vertex_blend_flags enum wined3d_cmp_func { - WINED3D_CMP_NEVER = 1, - WINED3D_CMP_LESS = 2, - WINED3D_CMP_EQUAL = 3, - WINED3D_CMP_LESSEQUAL = 4, - WINED3D_CMP_GREATER = 5, - WINED3D_CMP_NOTEQUAL = 6, - WINED3D_CMP_GREATEREQUAL = 7, - WINED3D_CMP_ALWAYS = 8, + WINED3D_CMP_NEVER = 1, + WINED3D_CMP_LESS = 2, + WINED3D_CMP_EQUAL = 3, + WINED3D_CMP_LESSEQUAL = 4, + WINED3D_CMP_GREATER = 5, + WINED3D_CMP_NOTEQUAL = 6, + WINED3D_CMP_GREATEREQUAL = 7, + WINED3D_CMP_ALWAYS = 8, }; -typedef enum _WINED3DZBUFFERTYPE +enum wined3d_depth_buffer_type { - WINED3DZB_FALSE = 0, - WINED3DZB_TRUE = 1, - WINED3DZB_USEW = 2, - WINED3DZB_FORCE_DWORD = 0x7fffffff -} WINED3DZBUFFERTYPE; + WINED3D_ZB_FALSE = 0, + WINED3D_ZB_TRUE = 1, + WINED3D_ZB_USEW = 2, +}; typedef enum _WINED3DFOGMODE {