Module: wine Branch: master Commit: b3a58a2486a38fa7acb27e777ecfa142e066caae URL: http://source.winehq.org/git/wine.git/?a=commit;h=b3a58a2486a38fa7acb27e777e...
Author: Andrew Talbot andrew.talbot@talbotville.com Date: Wed Jan 23 21:39:59 2008 +0000
wined3d: Remove unneeded casts.
---
dlls/wined3d/drawprim.c | 2 +- dlls/wined3d/indexbuffer.c | 2 +- dlls/wined3d/palette.c | 4 ++-- dlls/wined3d/state.c | 20 ++++++++++---------- 4 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c index 234c23a..5d4d536 100644 --- a/dlls/wined3d/drawprim.c +++ b/dlls/wined3d/drawprim.c @@ -669,7 +669,7 @@ static void drawStridedSlowVs(IWineD3DDevice *iface, WineDirect3DVertexStridedDa const DWORD *pIdxBufL = NULL; LONG vx_index; int i; - IWineD3DStateBlockImpl *stateblock = (IWineD3DStateBlockImpl *) This->stateBlock; + IWineD3DStateBlockImpl *stateblock = This->stateBlock; BYTE *ptr;
if (idxSize != 0) { diff --git a/dlls/wined3d/indexbuffer.c b/dlls/wined3d/indexbuffer.c index 372b834..4486a9e 100644 --- a/dlls/wined3d/indexbuffer.c +++ b/dlls/wined3d/indexbuffer.c @@ -147,7 +147,7 @@ static HRESULT WINAPI IWineD3DIndexBufferImpl_Lock(IWineD3DIndexBuffer *iface, U TRACE("(%p) : offset %d, size %d, Flags=%x\n", This, OffsetToLock, SizeToLock, Flags);
InterlockedIncrement(&This->lockcount); - *ppbData = (BYTE *)This->resource.allocatedMemory + OffsetToLock; + *ppbData = This->resource.allocatedMemory + OffsetToLock;
if(Flags & (WINED3DLOCK_READONLY | WINED3DLOCK_NO_DIRTY_UPDATE) || This->vbo == 0) { return WINED3D_OK; diff --git a/dlls/wined3d/palette.c b/dlls/wined3d/palette.c index d97799c..6548c97 100644 --- a/dlls/wined3d/palette.c +++ b/dlls/wined3d/palette.c @@ -169,8 +169,8 @@ static HRESULT WINAPI IWineD3DPaletteImpl_GetParent(IWineD3DPalette *iface, IUn IWineD3DPaletteImpl *This = (IWineD3DPaletteImpl *)iface; TRACE("(%p)->(%p)\n", This, Parent);
- *Parent = (IUnknown *) This->parent; - IUnknown_AddRef( (IUnknown *) This->parent); + *Parent = This->parent; + IUnknown_AddRef(This->parent); return WINED3D_OK; }
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 49a8222..bcb1559 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -1105,7 +1105,7 @@ static void state_fogdensity(DWORD state, IWineD3DStateBlockImpl *stateblock, Wi
/* TODO: Merge with primitive type + init_materials()!! */ static void state_colormat(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) { - IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)stateblock->wineD3DDevice; + IWineD3DDeviceImpl *device = stateblock->wineD3DDevice; GLenum Parm = 0; WineDirect3DStridedData *diffuse = &device->strided_streams.u.s.diffuse; BOOL isDiffuseSupplied; @@ -2029,7 +2029,7 @@ static void transform_texture(DWORD state, IWineD3DStateBlockImpl *stateblock, W } generated = (stateblock->textureState[texUnit][WINED3DTSS_TEXCOORDINDEX] & 0xFFFF0000) != WINED3DTSS_TCI_PASSTHRU;
- set_texture_matrix((float *)&stateblock->transforms[WINED3DTS_TEXTURE0 + texUnit].u.m[0][0], + set_texture_matrix(&stateblock->transforms[WINED3DTS_TEXTURE0 + texUnit].u.m[0][0], stateblock->textureState[texUnit][WINED3DTSS_TEXTURETRANSFORMFLAGS], generated, context->last_was_rhw, @@ -2417,7 +2417,7 @@ static void sampler(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DCont } }
- IWineD3DBaseTexture_PreLoad((IWineD3DBaseTexture *) stateblock->textures[sampler]); + IWineD3DBaseTexture_PreLoad(stateblock->textures[sampler]); IWineD3DBaseTexture_ApplyStateChanges(stateblock->textures[sampler], stateblock->textureState[sampler], stateblock->samplerState[sampler]);
if (GL_SUPPORT(EXT_TEXTURE_LOD_BIAS)) { @@ -2586,12 +2586,12 @@ static void transform_world(DWORD state, IWineD3DStateBlockImpl *stateblock, Win } else { /* In the general case, the view matrix is the identity matrix */ if (stateblock->wineD3DDevice->view_ident) { - glLoadMatrixf((float *) &stateblock->transforms[WINED3DTS_WORLDMATRIX(0)].u.m[0][0]); + glLoadMatrixf(&stateblock->transforms[WINED3DTS_WORLDMATRIX(0)].u.m[0][0]); checkGLcall("glLoadMatrixf"); } else { - glLoadMatrixf((float *) &stateblock->transforms[WINED3DTS_VIEW].u.m[0][0]); + glLoadMatrixf(&stateblock->transforms[WINED3DTS_VIEW].u.m[0][0]); checkGLcall("glLoadMatrixf"); - glMultMatrixf((float *) &stateblock->transforms[WINED3DTS_WORLDMATRIX(0)].u.m[0][0]); + glMultMatrixf(&stateblock->transforms[WINED3DTS_WORLDMATRIX(0)].u.m[0][0]); checkGLcall("glMultMatrixf"); } } @@ -2607,7 +2607,7 @@ static void clipplane(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DCo /* Clip Plane settings are affected by the model view in OpenGL, the View transform in direct3d */ glMatrixMode(GL_MODELVIEW); glPushMatrix(); - glLoadMatrixf((float *) &stateblock->transforms[WINED3DTS_VIEW].u.m[0][0]); + glLoadMatrixf(&stateblock->transforms[WINED3DTS_VIEW].u.m[0][0]);
TRACE("Clipplane [%f,%f,%f,%f]\n", stateblock->clipplane[index][0], @@ -2727,7 +2727,7 @@ static void transform_view(DWORD state, IWineD3DStateBlockImpl *stateblock, Wine
glMatrixMode(GL_MODELVIEW); checkGLcall("glMatrixMode(GL_MODELVIEW)"); - glLoadMatrixf((float *)(float *) &stateblock->transforms[WINED3DTS_VIEW].u.m[0][0]); + glLoadMatrixf(&stateblock->transforms[WINED3DTS_VIEW].u.m[0][0]); checkGLcall("glLoadMatrixf(...)");
/* Reset lights. TODO: Call light apply func */ @@ -2871,7 +2871,7 @@ static void transform_projection(DWORD state, IWineD3DStateBlockImpl *stateblock } checkGLcall("glScalef");
- glMultMatrixf((float *) &stateblock->transforms[WINED3DTS_PROJECTION].u.m[0][0]); + glMultMatrixf(&stateblock->transforms[WINED3DTS_PROJECTION].u.m[0][0]); checkGLcall("glLoadMatrixf"); } } @@ -3669,7 +3669,7 @@ static void light(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContex /* Light settings are affected by the model view in OpenGL, the View transform in direct3d*/ glMatrixMode(GL_MODELVIEW); glPushMatrix(); - glLoadMatrixf((float *)&stateblock->transforms[WINED3DTS_VIEW].u.m[0][0]); + glLoadMatrixf(&stateblock->transforms[WINED3DTS_VIEW].u.m[0][0]);
/* Diffuse: */ colRGBA[0] = lightInfo->OriginalParms.Diffuse.r;