ddraw: Remove superfluous pointer casts.

This commit is contained in:
Michael Stefaniuc 2009-01-13 23:31:09 +01:00 committed by Alexandre Julliard
parent a04ed94580
commit 5ee7a104c9
6 changed files with 13 additions and 13 deletions

View File

@ -3047,7 +3047,7 @@ findRenderTarget(IDirectDrawSurface7 *surface,
void *ctx)
{
IDirectDrawSurfaceImpl *surf = ICOM_OBJECT(IDirectDrawSurfaceImpl, IDirectDrawSurface7, surface);
IDirectDrawSurfaceImpl **target = (IDirectDrawSurfaceImpl **) ctx;
IDirectDrawSurfaceImpl **target = ctx;
if(!surf->isRenderTarget) {
*target = surf;

View File

@ -381,7 +381,7 @@ IDirect3DDeviceImpl_7_Release(IDirect3DDevice7 *iface)
{
case DDrawHandle_Texture:
{
IDirectDrawSurfaceImpl *surf = (IDirectDrawSurfaceImpl *) This->Handles[i].ptr;
IDirectDrawSurfaceImpl *surf = This->Handles[i].ptr;
FIXME("Texture Handle %d not unset properly\n", i + 1);
surf->Handle = 0;
}
@ -389,7 +389,7 @@ IDirect3DDeviceImpl_7_Release(IDirect3DDevice7 *iface)
case DDrawHandle_Material:
{
IDirect3DMaterialImpl *mat = (IDirect3DMaterialImpl *) This->Handles[i].ptr;
IDirect3DMaterialImpl *mat = This->Handles[i].ptr;
FIXME("Material handle %d not unset properly\n", i + 1);
mat->Handle = 0;
}
@ -2868,7 +2868,7 @@ IDirect3DDeviceImpl_3_SetRenderState(IDirect3DDevice3 *iface,
}
else
{
IDirectDrawSurfaceImpl *surf = (IDirectDrawSurfaceImpl *) This->Handles[Value - 1].ptr;
IDirectDrawSurfaceImpl *surf = This->Handles[Value - 1].ptr;
hr = IDirect3DDevice3_SetTexture(iface, 0, ICOM_INTERFACE(surf, IDirect3DTexture2));
break;
}
@ -3041,7 +3041,7 @@ IDirect3DDeviceImpl_3_SetLightState(IDirect3DDevice3 *iface,
}
else
{
mat = (IDirect3DMaterialImpl *) This->Handles[Value - 1].ptr;
mat = This->Handles[Value - 1].ptr;
}
if (mat != NULL)

View File

@ -131,7 +131,7 @@ IDirect3DExecuteBufferImpl_Execute(IDirect3DExecuteBufferImpl *This,
case D3DOP_TRIANGLE: {
int i;
D3DTLVERTEX *tl_vx = (D3DTLVERTEX *) This->vertex_data;
D3DTLVERTEX *tl_vx = This->vertex_data;
TRACE("TRIANGLE (%d)\n", count);
if (count*3>This->nb_indices) {
@ -262,7 +262,7 @@ IDirect3DExecuteBufferImpl_Execute(IDirect3DExecuteBufferImpl *This,
WARN("Handle %d is not a material handle\n", matHandle);
} else {
IDirect3DMaterialImpl *mat =
(IDirect3DMaterialImpl *)lpDevice->Handles[matHandle - 1].ptr;
lpDevice->Handles[matHandle - 1].ptr;
mat->activate(mat);
}

View File

@ -751,7 +751,7 @@ DestroyCallback(IDirectDrawSurface7 *surf,
void *context)
{
IDirectDrawSurfaceImpl *Impl = ICOM_OBJECT(IDirectDrawSurfaceImpl, IDirectDrawSurface7, surf);
IDirectDrawImpl *ddraw = (IDirectDrawImpl *) context;
IDirectDrawImpl *ddraw = context;
ULONG ref;
ref = IDirectDrawSurface7_Release(surf); /* For the EnumSurfaces */
@ -927,7 +927,7 @@ DllMain(HINSTANCE hInstDLL,
hr = IDirectDraw7_EnumSurfaces(ICOM_INTERFACE(ddraw, IDirectDraw7),
DDENUMSURFACES_ALL,
&desc,
(void *) ddraw,
ddraw,
DestroyCallback);
if(hr != D3D_OK)
ERR("(%p) EnumSurfaces failed, prepare for trouble\n", ddraw);

View File

@ -2521,7 +2521,7 @@ IDirectDrawSurfaceImpl_SetColorKey(IDirectDrawSurface7 *iface,
Flags,
ctx.CKey);
IDirectDrawSurface7_EnumAttachedSurfaces(iface,
(void *) &ctx,
&ctx,
SetColorKeyEnum);
LeaveCriticalSection(&ddraw_cs);
switch(ctx.ret)

View File

@ -399,8 +399,8 @@ IDirect3DViewportImpl_TransformVertices(IDirect3DViewport3 *iface,
multiply_matrix(&mat,&view_mat,&world_mat);
multiply_matrix(&mat,&proj_mat,&mat);
in = (float *) lpData->lpIn;
out = (float *) lpData->lpOut;
in = lpData->lpIn;
out = lpData->lpOut;
outH = lpData->lpHOut;
for(i = 0; i < dwVertexCount; i++)
{
@ -537,7 +537,7 @@ IDirect3DViewportImpl_SetBackground(IDirect3DViewport3 *iface,
if(hMat)
{
This->background = (IDirect3DMaterialImpl *) This->ddraw->d3ddevice->Handles[hMat - 1].ptr;
This->background = This->ddraw->d3ddevice->Handles[hMat - 1].ptr;
TRACE(" setting background color : %f %f %f %f\n",
This->background->mat.u.diffuse.u1.r,
This->background->mat.u.diffuse.u2.g,