wined3d: Get rid of the WINED3DLIGHTTYPE typedef.

This commit is contained in:
Henri Verbeet 2011-12-11 21:43:31 +01:00 committed by Alexandre Julliard
parent d806c37b4a
commit b55b683b08
3 changed files with 20 additions and 21 deletions

View File

@ -36,7 +36,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d);
/* Define the default light parameters as specified by MSDN. */
const struct wined3d_light WINED3D_default_light =
{
WINED3DLIGHT_DIRECTIONAL, /* Type */
WINED3D_LIGHT_DIRECTIONAL, /* Type */
{ 1.0f, 1.0f, 1.0f, 0.0f }, /* Diffuse r,g,b,a */
{ 0.0f, 0.0f, 0.0f, 0.0f }, /* Specular r,g,b,a */
{ 0.0f, 0.0f, 0.0f, 0.0f }, /* Ambient r,g,b,a, */
@ -1898,10 +1898,10 @@ HRESULT CDECL wined3d_device_set_light(struct wined3d_device *device,
switch (light->type)
{
case WINED3DLIGHT_POINT:
case WINED3DLIGHT_SPOT:
case WINED3DLIGHT_PARALLELPOINT:
case WINED3DLIGHT_GLSPOT:
case WINED3D_LIGHT_POINT:
case WINED3D_LIGHT_SPOT:
case WINED3D_LIGHT_PARALLELPOINT:
case WINED3D_LIGHT_GLSPOT:
/* Incorrect attenuation values can cause the gl driver to crash.
* Happens with Need for speed most wanted. */
if (light->attenuation0 < 0.0f || light->attenuation1 < 0.0f || light->attenuation2 < 0.0f)
@ -1911,7 +1911,7 @@ HRESULT CDECL wined3d_device_set_light(struct wined3d_device *device,
}
break;
case WINED3DLIGHT_DIRECTIONAL:
case WINED3D_LIGHT_DIRECTIONAL:
/* Ignores attenuation */
break;
@ -1958,7 +1958,7 @@ HRESULT CDECL wined3d_device_set_light(struct wined3d_device *device,
switch (light->type)
{
case WINED3DLIGHT_POINT:
case WINED3D_LIGHT_POINT:
/* Position */
object->lightPosn[0] = light->position.x;
object->lightPosn[1] = light->position.y;
@ -1968,7 +1968,7 @@ HRESULT CDECL wined3d_device_set_light(struct wined3d_device *device,
/* FIXME: Range */
break;
case WINED3DLIGHT_DIRECTIONAL:
case WINED3D_LIGHT_DIRECTIONAL:
/* Direction */
object->lightPosn[0] = -light->direction.x;
object->lightPosn[1] = -light->direction.y;
@ -1978,7 +1978,7 @@ HRESULT CDECL wined3d_device_set_light(struct wined3d_device *device,
object->cutoff = 180.0f;
break;
case WINED3DLIGHT_SPOT:
case WINED3D_LIGHT_SPOT:
/* Position */
object->lightPosn[0] = light->position.x;
object->lightPosn[1] = light->position.y;

View File

@ -4688,7 +4688,7 @@ static void light(struct wined3d_context *context, const struct wined3d_state *s
switch (lightInfo->OriginalParms.type)
{
case WINED3DLIGHT_POINT:
case WINED3D_LIGHT_POINT:
/* Position */
glLightfv(GL_LIGHT0 + Index, GL_POSITION, &lightInfo->lightPosn[0]);
checkGLcall("glLightfv");
@ -4706,7 +4706,7 @@ static void light(struct wined3d_context *context, const struct wined3d_state *s
/* FIXME: Range */
break;
case WINED3DLIGHT_SPOT:
case WINED3D_LIGHT_SPOT:
/* Position */
glLightfv(GL_LIGHT0 + Index, GL_POSITION, &lightInfo->lightPosn[0]);
checkGLcall("glLightfv");
@ -4729,7 +4729,7 @@ static void light(struct wined3d_context *context, const struct wined3d_state *s
/* FIXME: Range */
break;
case WINED3DLIGHT_DIRECTIONAL:
case WINED3D_LIGHT_DIRECTIONAL:
/* Direction */
glLightfv(GL_LIGHT0 + Index, GL_POSITION, &lightInfo->lightPosn[0]); /* Note gl uses w position of 0 for direction! */
checkGLcall("glLightfv");

View File

@ -65,15 +65,14 @@
#define WINEDDERR_NOCLIPLIST MAKE_WINED3DHRESULT(205)
#define WINEDDERR_OVERLAYNOTVISIBLE MAKE_WINED3DHRESULT(577)
typedef enum _WINED3DLIGHTTYPE
enum wined3d_light_type
{
WINED3DLIGHT_POINT = 1,
WINED3DLIGHT_SPOT = 2,
WINED3DLIGHT_DIRECTIONAL = 3,
WINED3DLIGHT_PARALLELPOINT = 4, /* D3D7 */
WINED3DLIGHT_GLSPOT = 5, /* D3D7 */
WINED3DLIGHT_FORCE_DWORD = 0x7fffffff
} WINED3DLIGHTTYPE;
WINED3D_LIGHT_POINT = 1,
WINED3D_LIGHT_SPOT = 2,
WINED3D_LIGHT_DIRECTIONAL = 3,
WINED3D_LIGHT_PARALLELPOINT = 4, /* D3D7 */
WINED3D_LIGHT_GLSPOT = 5, /* D3D7 */
};
typedef enum _WINED3DPRIMITIVETYPE
{
@ -1553,7 +1552,7 @@ struct wined3d_matrix
struct wined3d_light
{
WINED3DLIGHTTYPE type;
enum wined3d_light_type type;
struct wined3d_color diffuse;
struct wined3d_color specular;
struct wined3d_color ambient;