From c3cc92e472b59a9b7727d18151af42f2b368f9ee Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Wed, 4 Jan 2012 23:34:55 +0100 Subject: [PATCH] wined3d: Get rid of the WINED3DMATERIALCOLORSOURCE typedef. --- dlls/wined3d/state.c | 20 ++++++++++---------- dlls/wined3d/stateblock.c | 8 ++++---- include/wine/wined3d.h | 11 +++++------ 3 files changed, 19 insertions(+), 20 deletions(-) diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index a68fae9ef4..3c5220e493 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -1264,47 +1264,47 @@ static void state_colormat(struct wined3d_context *context, const struct wined3d state->render_states[WINED3D_RS_EMISSIVEMATERIALSOURCE], state->render_states[WINED3D_RS_SPECULARMATERIALSOURCE]); - if (state->render_states[WINED3D_RS_DIFFUSEMATERIALSOURCE] == WINED3DMCS_COLOR1) + if (state->render_states[WINED3D_RS_DIFFUSEMATERIALSOURCE] == WINED3D_MCS_COLOR1) { - if (state->render_states[WINED3D_RS_AMBIENTMATERIALSOURCE] == WINED3DMCS_COLOR1) + if (state->render_states[WINED3D_RS_AMBIENTMATERIALSOURCE] == WINED3D_MCS_COLOR1) Parm = GL_AMBIENT_AND_DIFFUSE; else Parm = GL_DIFFUSE; - if (state->render_states[WINED3D_RS_EMISSIVEMATERIALSOURCE] == WINED3DMCS_COLOR1) + if (state->render_states[WINED3D_RS_EMISSIVEMATERIALSOURCE] == WINED3D_MCS_COLOR1) { context->untracked_materials[context->num_untracked_materials] = GL_EMISSION; context->num_untracked_materials++; } - if (state->render_states[WINED3D_RS_SPECULARMATERIALSOURCE] == WINED3DMCS_COLOR1) + if (state->render_states[WINED3D_RS_SPECULARMATERIALSOURCE] == WINED3D_MCS_COLOR1) { context->untracked_materials[context->num_untracked_materials] = GL_SPECULAR; context->num_untracked_materials++; } } - else if (state->render_states[WINED3D_RS_AMBIENTMATERIALSOURCE] == WINED3DMCS_COLOR1) + else if (state->render_states[WINED3D_RS_AMBIENTMATERIALSOURCE] == WINED3D_MCS_COLOR1) { Parm = GL_AMBIENT; - if (state->render_states[WINED3D_RS_EMISSIVEMATERIALSOURCE] == WINED3DMCS_COLOR1) + if (state->render_states[WINED3D_RS_EMISSIVEMATERIALSOURCE] == WINED3D_MCS_COLOR1) { context->untracked_materials[context->num_untracked_materials] = GL_EMISSION; context->num_untracked_materials++; } - if (state->render_states[WINED3D_RS_SPECULARMATERIALSOURCE] == WINED3DMCS_COLOR1) + if (state->render_states[WINED3D_RS_SPECULARMATERIALSOURCE] == WINED3D_MCS_COLOR1) { context->untracked_materials[context->num_untracked_materials] = GL_SPECULAR; context->num_untracked_materials++; } } - else if (state->render_states[WINED3D_RS_EMISSIVEMATERIALSOURCE] == WINED3DMCS_COLOR1) + else if (state->render_states[WINED3D_RS_EMISSIVEMATERIALSOURCE] == WINED3D_MCS_COLOR1) { Parm = GL_EMISSION; - if (state->render_states[WINED3D_RS_SPECULARMATERIALSOURCE] == WINED3DMCS_COLOR1) + if (state->render_states[WINED3D_RS_SPECULARMATERIALSOURCE] == WINED3D_MCS_COLOR1) { context->untracked_materials[context->num_untracked_materials] = GL_SPECULAR; context->num_untracked_materials++; } } - else if (state->render_states[WINED3D_RS_SPECULARMATERIALSOURCE] == WINED3DMCS_COLOR1) + else if (state->render_states[WINED3D_RS_SPECULARMATERIALSOURCE] == WINED3D_MCS_COLOR1) { Parm = GL_SPECULAR; } diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c index 0f9d07ca3e..1dd6b9cbc7 100644 --- a/dlls/wined3d/stateblock.c +++ b/dlls/wined3d/stateblock.c @@ -1176,10 +1176,10 @@ void stateblock_init_default_state(struct wined3d_stateblock *stateblock) state->render_states[WINED3D_RS_COLORVERTEX] = TRUE; state->render_states[WINED3D_RS_LOCALVIEWER] = TRUE; state->render_states[WINED3D_RS_NORMALIZENORMALS] = FALSE; - state->render_states[WINED3D_RS_DIFFUSEMATERIALSOURCE] = WINED3DMCS_COLOR1; - state->render_states[WINED3D_RS_SPECULARMATERIALSOURCE] = WINED3DMCS_COLOR2; - state->render_states[WINED3D_RS_AMBIENTMATERIALSOURCE] = WINED3DMCS_MATERIAL; - state->render_states[WINED3D_RS_EMISSIVEMATERIALSOURCE] = WINED3DMCS_MATERIAL; + state->render_states[WINED3D_RS_DIFFUSEMATERIALSOURCE] = WINED3D_MCS_COLOR1; + state->render_states[WINED3D_RS_SPECULARMATERIALSOURCE] = WINED3D_MCS_COLOR2; + state->render_states[WINED3D_RS_AMBIENTMATERIALSOURCE] = WINED3D_MCS_MATERIAL; + state->render_states[WINED3D_RS_EMISSIVEMATERIALSOURCE] = WINED3D_MCS_MATERIAL; state->render_states[WINED3D_RS_VERTEXBLEND] = WINED3D_VBF_DISABLE; state->render_states[WINED3D_RS_CLIPPLANEENABLE] = 0; state->render_states[WINED3D_RS_SOFTWAREVERTEXPROCESSING] = FALSE; diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index cb09168a58..254a839464 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -481,13 +481,12 @@ enum wined3d_stencil_op WINED3D_STENCIL_OP_DECR = 8, }; -typedef enum _WINED3DMATERIALCOLORSOURCE +enum wined3d_material_color_source { - WINED3DMCS_MATERIAL = 0, - WINED3DMCS_COLOR1 = 1, - WINED3DMCS_COLOR2 = 2, - WINED3DMCS_FORCE_DWORD = 0x7fffffff -} WINED3DMATERIALCOLORSOURCE; + WINED3D_MCS_MATERIAL = 0, + WINED3D_MCS_COLOR1 = 1, + WINED3D_MCS_COLOR2 = 2, +}; typedef enum _WINED3DPATCHEDGESTYLE {