From 7416953e81960bf661c567ef73832c233ef6b74d Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Wed, 23 Nov 2011 08:51:44 +0100 Subject: [PATCH] wined3d: Get rid of the WINED3DLINEPATTERN typedef. --- dlls/wined3d/state.c | 18 +++++++++++------- dlls/wined3d/stateblock.c | 9 +++++---- include/wine/wined3d.h | 8 ++++---- 3 files changed, 20 insertions(+), 15 deletions(-) diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index b9a0dca41aa..e5fbb61c5b8 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -1313,20 +1313,24 @@ static void state_colormat(struct wined3d_context *context, const struct wined3d static void state_linepattern(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { - union { - DWORD d; - WINED3DLINEPATTERN lp; + union + { + DWORD d; + struct wined3d_line_pattern lp; } tmppattern; tmppattern.d = state->render_states[WINED3DRS_LINEPATTERN]; - TRACE("Line pattern: repeat %d bits %x\n", tmppattern.lp.wRepeatFactor, tmppattern.lp.wLinePattern); + TRACE("Line pattern: repeat %d bits %x.\n", tmppattern.lp.repeat_factor, tmppattern.lp.line_pattern); - if (tmppattern.lp.wRepeatFactor) { - glLineStipple(tmppattern.lp.wRepeatFactor, tmppattern.lp.wLinePattern); + if (tmppattern.lp.repeat_factor) + { + glLineStipple(tmppattern.lp.repeat_factor, tmppattern.lp.line_pattern); checkGLcall("glLineStipple(repeat, linepattern)"); glEnable(GL_LINE_STIPPLE); checkGLcall("glEnable(GL_LINE_STIPPLE);"); - } else { + } + else + { glDisable(GL_LINE_STIPPLE); checkGLcall("glDisable(GL_LINE_STIPPLE);"); } diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c index 33b8ce28591..6084a250c5a 100644 --- a/dlls/wined3d/stateblock.c +++ b/dlls/wined3d/stateblock.c @@ -1074,8 +1074,9 @@ void stateblock_init_default_state(struct wined3d_stateblock *stateblock) struct wined3d_device *device = stateblock->device; const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; struct wined3d_state *state = &stateblock->state; - union { - WINED3DLINEPATTERN lp; + union + { + struct wined3d_line_pattern lp; DWORD d; } lp; union { @@ -1109,8 +1110,8 @@ void stateblock_init_default_state(struct wined3d_stateblock *stateblock) state->render_states[WINED3DRS_ZENABLE] = WINED3DZB_FALSE; state->render_states[WINED3DRS_FILLMODE] = WINED3DFILL_SOLID; state->render_states[WINED3DRS_SHADEMODE] = WINED3DSHADE_GOURAUD; - lp.lp.wRepeatFactor = 0; - lp.lp.wLinePattern = 0; + lp.lp.repeat_factor = 0; + lp.lp.line_pattern = 0; state->render_states[WINED3DRS_LINEPATTERN] = lp.d; state->render_states[WINED3DRS_ZWRITEENABLE] = TRUE; state->render_states[WINED3DRS_ALPHATESTENABLE] = FALSE; diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index f228e443237..3ffb8bd0741 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -1590,11 +1590,11 @@ struct wined3d_gamma_ramp WORD blue[256]; }; -typedef struct _WINED3DLINEPATTERN +struct wined3d_line_pattern { - WORD wRepeatFactor; - WORD wLinePattern; -} WINED3DLINEPATTERN; + WORD repeat_factor; + WORD line_pattern; +}; typedef struct _WINEDD3DRECTPATCH_INFO { -- 2.11.4.GIT