ddraw/tests: Remove superfluous casts.

This commit is contained in:
Michael Stefaniuc 2009-01-04 01:46:59 +01:00 committed by Alexandre Julliard
parent 566a133a82
commit 91bb8dc043
2 changed files with 21 additions and 21 deletions

View File

@ -843,7 +843,7 @@ static HRESULT WINAPI enumDevicesCallback(GUID *Guid,LPSTR DeviceDescription,LPS
static HRESULT WINAPI enumDevicesCallbackTest7(LPSTR DeviceDescription, LPSTR DeviceName, LPD3DDEVICEDESC7 lpdd7, LPVOID Context)
{
D3D7ETest *d3d7et = (D3D7ETest*)Context;
D3D7ETest *d3d7et = Context;
if(IsEqualGUID(&lpdd7->deviceGUID, &IID_IDirect3DRGBDevice))
d3d7et->rgb++;
else if(IsEqualGUID(&lpdd7->deviceGUID, &IID_IDirect3DHALDevice))
@ -871,7 +871,7 @@ static void D3D7EnumTest(void)
}
memset(&d3d7et, 0, sizeof(d3d7et));
IDirect3D7_EnumDevices(lpD3D, enumDevicesCallbackTest7, (LPVOID) &d3d7et);
IDirect3D7_EnumDevices(lpD3D, enumDevicesCallbackTest7, &d3d7et);
/* A couple of games (Delta Force LW and TFD) rely on this behaviour */
@ -1130,7 +1130,7 @@ static void Direct3D1Test(void)
memset(&transformdata, 0, sizeof(transformdata));
transformdata.dwSize = sizeof(transformdata);
transformdata.lpIn = (void *) testverts;
transformdata.lpIn = testverts;
transformdata.dwInSize = sizeof(testverts[0]);
transformdata.lpOut = out;
transformdata.dwOutSize = sizeof(out[0]);
@ -1252,7 +1252,7 @@ static void Direct3D1Test(void)
"Regular output DWORD %d remained untouched\n", i);
}
transformdata.lpIn = (void *) cliptest;
transformdata.lpIn = cliptest;
transformdata.dwInSize = sizeof(cliptest[0]);
hr = IDirect3DViewport_TransformVertices(Viewport, sizeof(cliptest) / sizeof(cliptest[0]),
&transformdata, D3DTRANSFORM_CLIPPED,
@ -1356,7 +1356,7 @@ static void Direct3D1Test(void)
ok(hr == D3D_OK, "IDirect3DViewport_TransformVertices returned %08x\n", hr);
ok(i == (D3DCLIP_BOTTOM | D3DCLIP_LEFT), "Offscreen is %d\n", i);
transformdata.lpIn = (void *) offscreentest;
transformdata.lpIn = offscreentest;
transformdata.dwInSize = sizeof(offscreentest[0]);
SET_VP_DATA(vp_data);
vp_data.dwWidth = 257;

View File

@ -248,7 +248,7 @@ static void SrcColorKey32BlitTest(void)
rc = IDirectDrawSurface_Lock(lpDst, NULL, &ddsd2, DDLOCK_WAIT, NULL);
ok(rc==DD_OK,"Lock returned: %x\n",rc);
lpData = (LPDWORD)ddsd2.lpSurface;
lpData = ddsd2.lpSurface;
lpData[0] = 0xCCCCCCCC;
lpData[1] = 0xCCCCCCCC;
lpData[2] = 0xCCCCCCCC;
@ -274,7 +274,7 @@ static void SrcColorKey32BlitTest(void)
rc = IDirectDrawSurface_Lock(lpSrc, NULL, &ddsd2, DDLOCK_WAIT, NULL);
ok(rc==DD_OK,"Lock returned: %x\n",rc);
ok((ddsd2.dwFlags & DDSD_LPSURFACE) == 0, "Surface desc has LPSURFACE Flags set\n");
lpData = (LPDWORD)ddsd2.lpSurface;
lpData = ddsd2.lpSurface;
lpData[0] = 0x77010203;
lpData[1] = 0x00010203;
lpData[2] = 0x77FF00FF;
@ -287,7 +287,7 @@ static void SrcColorKey32BlitTest(void)
rc = IDirectDrawSurface_Lock(lpDst, NULL, &ddsd2, DDLOCK_WAIT, NULL);
ok(rc==DD_OK,"Lock returned: %x\n",rc);
ok((ddsd2.dwFlags & DDSD_LPSURFACE) == 0, "Surface desc has LPSURFACE Flags set\n");
lpData = (LPDWORD)ddsd2.lpSurface;
lpData = ddsd2.lpSurface;
/* Different behavior on some drivers / windows versions. Some versions ignore the X channel when
* color keying, but copy it to the destination surface. Others apply it for color keying, but
* do not copy it into the destination surface.
@ -388,7 +388,7 @@ static void SrcColorKey32BlitTest(void)
rc = IDirectDrawSurface_Lock(lpSrc, NULL, &ddsd2, DDLOCK_WAIT, NULL);
ok(rc==DD_OK,"Lock returned: %x\n",rc);
ok((ddsd2.dwFlags & DDSD_LPSURFACE) == 0, "Surface desc has LPSURFACE Flags set\n");
lpData = (LPDWORD)ddsd2.lpSurface;
lpData = ddsd2.lpSurface;
lpData[0] = 0x000000FF; /* Applies to src blt key in src surface */
lpData[1] = 0x00000000; /* Applies to dst blt key in src surface */
lpData[2] = 0x00FF0000; /* Dst color key in dst surface */
@ -401,7 +401,7 @@ static void SrcColorKey32BlitTest(void)
rc = IDirectDrawSurface_Lock(lpDst, NULL, &ddsd2, DDLOCK_WAIT, NULL);
ok(rc==DD_OK,"Lock returned: %x\n",rc);
ok((ddsd2.dwFlags & DDSD_LPSURFACE) == 0, "Surface desc has LPSURFACE Flags set\n");
lpData = (LPDWORD)ddsd2.lpSurface;
lpData = ddsd2.lpSurface;
lpData[0] = 0x55555555;
lpData[1] = 0x55555555;
lpData[2] = 0x55555555;
@ -418,7 +418,7 @@ static void SrcColorKey32BlitTest(void)
rc = IDirectDrawSurface_Lock(lpDst, NULL, &ddsd2, DDLOCK_WAIT, NULL);
ok(rc==DD_OK,"Lock returned: %x\n",rc);
ok((ddsd2.dwFlags & DDSD_LPSURFACE) == 0, "Surface desc has LPSURFACE Flags set\n");
lpData = (LPDWORD)ddsd2.lpSurface;
lpData = ddsd2.lpSurface;
/* Should have copied src data unmodified to dst */
ok(lpData[0] == 0x000000FF &&
lpData[1] == 0x00000000 &&
@ -443,7 +443,7 @@ static void SrcColorKey32BlitTest(void)
rc = IDirectDrawSurface_Lock(lpDst, NULL, &ddsd2, DDLOCK_WAIT, NULL);
ok(rc==DD_OK,"Lock returned: %x\n",rc);
ok((ddsd2.dwFlags & DDSD_LPSURFACE) == 0, "Surface desc has LPSURFACE Flags set\n");
lpData = (LPDWORD)ddsd2.lpSurface;
lpData = ddsd2.lpSurface;
ok(lpData[0] == 0x55555555 && /* Here the src key applied */
lpData[1] == 0x00000000 &&
@ -468,7 +468,7 @@ static void SrcColorKey32BlitTest(void)
rc = IDirectDrawSurface_Lock(lpDst, NULL, &ddsd2, DDLOCK_WAIT, NULL);
ok(rc==DD_OK,"Lock returned: %x\n",rc);
ok((ddsd2.dwFlags & DDSD_LPSURFACE) == 0, "Surface desc has LPSURFACE Flags set\n");
lpData = (LPDWORD)ddsd2.lpSurface;
lpData = ddsd2.lpSurface;
ok(lpData[0] == 0x000000FF &&
lpData[1] == 0x00000000 &&
@ -495,7 +495,7 @@ static void SrcColorKey32BlitTest(void)
rc = IDirectDrawSurface_Lock(lpDst, NULL, &ddsd2, DDLOCK_WAIT, NULL);
ok(rc==DD_OK,"Lock returned: %x\n",rc);
ok((ddsd2.dwFlags & DDSD_LPSURFACE) == 0, "Surface desc has LPSURFACE Flags set\n");
lpData = (LPDWORD)ddsd2.lpSurface;
lpData = ddsd2.lpSurface;
ok(lpData[0] == 0x55555555 &&
lpData[1] == 0x55555555 &&
@ -521,7 +521,7 @@ static void SrcColorKey32BlitTest(void)
rc = IDirectDrawSurface_Lock(lpDst, NULL, &ddsd2, DDLOCK_WAIT, NULL);
ok(rc==DD_OK,"Lock returned: %x\n",rc);
ok((ddsd2.dwFlags & DDSD_LPSURFACE) == 0, "Surface desc has LPSURFACE Flags set\n");
lpData = (LPDWORD)ddsd2.lpSurface;
lpData = ddsd2.lpSurface;
/* DirectDraw uses the dest blit key from the SOURCE surface ! */
ok(lpData[0] == 0x00ff0000 &&
@ -548,7 +548,7 @@ static void SrcColorKey32BlitTest(void)
rc = IDirectDrawSurface_Lock(lpDst, NULL, &ddsd2, DDLOCK_WAIT, NULL);
ok(rc==DD_OK,"Lock returned: %x\n",rc);
ok((ddsd2.dwFlags & DDSD_LPSURFACE) == 0, "Surface desc has LPSURFACE Flags set\n");
lpData = (LPDWORD)ddsd2.lpSurface;
lpData = ddsd2.lpSurface;
ok(lpData[0] == 0x00FF0000 &&
lpData[1] == 0x00FF0000 &&
@ -575,7 +575,7 @@ static void SrcColorKey32BlitTest(void)
rc = IDirectDrawSurface_Lock(lpDst, NULL, &ddsd2, DDLOCK_WAIT, NULL);
ok(rc==DD_OK,"Lock returned: %x\n",rc);
ok((ddsd2.dwFlags & DDSD_LPSURFACE) == 0, "Surface desc has LPSURFACE Flags set\n");
lpData = (LPDWORD)ddsd2.lpSurface;
lpData = ddsd2.lpSurface;
ok(lpData[0] == 0x00FF0000 &&
lpData[1] == 0x00FF0000 &&
@ -598,7 +598,7 @@ static void SrcColorKey32BlitTest(void)
rc = IDirectDrawSurface_Lock(lpSrc, NULL, &ddsd2, DDLOCK_WAIT, NULL);
ok(rc==DD_OK,"Lock returned: %x\n",rc);
ok((ddsd2.dwFlags & DDSD_LPSURFACE) == 0, "Surface desc has LPSURFACE Flags set\n");
lpData = (LPDWORD)ddsd2.lpSurface;
lpData = ddsd2.lpSurface;
lpData[5] = 0x000000FF; /* Applies to src blt key in src surface */
rc = IDirectDrawSurface_Unlock(lpSrc, NULL);
ok(rc==DD_OK,"Unlock returned: %x\n",rc);
@ -610,7 +610,7 @@ static void SrcColorKey32BlitTest(void)
rc = IDirectDrawSurface_Lock(lpDst, NULL, &ddsd2, DDLOCK_WAIT, NULL);
ok(rc==DD_OK,"Lock returned: %x\n",rc);
ok((ddsd2.dwFlags & DDSD_LPSURFACE) == 0, "Surface desc has LPSURFACE Flags set\n");
lpData = (LPDWORD)ddsd2.lpSurface;
lpData = ddsd2.lpSurface;
ok(lpData[0] == 0x00FF0000 && /* Masked by Destination key */
lpData[1] == 0x00FF0000 && /* Masked by Destination key */
@ -1016,7 +1016,7 @@ static void EnumTest(void)
ok(!ctx.expected[3], "expected NULL pointer\n");
ctx.count = 0;
rc = IDirectDraw_EnumSurfaces(lpDD, DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_ALL, &ddsd, (void *) &ctx, enumCB);
rc = IDirectDraw_EnumSurfaces(lpDD, DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_ALL, &ddsd, &ctx, enumCB);
ok(rc == DD_OK, "IDirectDraw_EnumSurfaces returned %08x\n", rc);
ok(ctx.count == 3, "%d surfaces enumerated, expected 3\n", ctx.count);
@ -1433,7 +1433,7 @@ static HRESULT WINAPI CubeTestLvl2Enum(IDirectDrawSurface7 *surface, DDSURFACEDE
static HRESULT WINAPI CubeTestLvl1Enum(IDirectDrawSurface7 *surface, DDSURFACEDESC2 *desc, void *context)
{
UINT mips = 0;
UINT *num = (UINT *) context;
UINT *num = context;
static const struct compare expected[] =
{
{