ddraw/tests: Fix compilation with Visual C++ 2005.
This commit is contained in:
parent
e748d62e77
commit
77440b098f
|
@ -142,6 +142,8 @@ static void LightTest(void)
|
|||
D3DLIGHT7 light;
|
||||
D3DLIGHT7 defaultlight;
|
||||
BOOL bEnabled = FALSE;
|
||||
float one = 1.0f;
|
||||
float zero= 0.0f;
|
||||
|
||||
/* Set a few lights with funky indices. */
|
||||
memset(&light, 0, sizeof(light));
|
||||
|
@ -256,7 +258,7 @@ static void LightTest(void)
|
|||
U3(light.dcvDiffuse).b = 1.f;
|
||||
U3(light.dvDirection).z = 1.f;
|
||||
|
||||
light.dvAttenuation0 = -1.0 / 0.0; /* -INFINITY */
|
||||
light.dvAttenuation0 = -one / zero; /* -INFINITY */
|
||||
rc = IDirect3DDevice7_SetLight(lpD3DDevice, 103, &light);
|
||||
ok(rc==DDERR_INVALIDPARAMS, "SetLight returned: %x\n", rc);
|
||||
|
||||
|
@ -272,11 +274,11 @@ static void LightTest(void)
|
|||
rc = IDirect3DDevice7_SetLight(lpD3DDevice, 103, &light);
|
||||
ok(rc==D3D_OK, "SetLight returned: %x\n", rc);
|
||||
|
||||
light.dvAttenuation0 = 1.0 / 0.0; /* +INFINITY */
|
||||
light.dvAttenuation0 = one / zero; /* +INFINITY */
|
||||
rc = IDirect3DDevice7_SetLight(lpD3DDevice, 103, &light);
|
||||
ok(rc==D3D_OK, "SetLight returned: %x\n", rc);
|
||||
|
||||
light.dvAttenuation0 = 0.0 / 0.0; /* NaN */
|
||||
light.dvAttenuation0 = zero / zero; /* NaN */
|
||||
rc = IDirect3DDevice7_SetLight(lpD3DDevice, 103, &light);
|
||||
ok(rc==D3D_OK, "SetLight returned: %x\n", rc);
|
||||
|
||||
|
|
Loading…
Reference in New Issue