Commit b3a58a24 authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

wined3d: Remove unneeded casts.

parent ebcedd03
...@@ -669,7 +669,7 @@ static void drawStridedSlowVs(IWineD3DDevice *iface, WineDirect3DVertexStridedDa ...@@ -669,7 +669,7 @@ static void drawStridedSlowVs(IWineD3DDevice *iface, WineDirect3DVertexStridedDa
const DWORD *pIdxBufL = NULL; const DWORD *pIdxBufL = NULL;
LONG vx_index; LONG vx_index;
int i; int i;
IWineD3DStateBlockImpl *stateblock = (IWineD3DStateBlockImpl *) This->stateBlock; IWineD3DStateBlockImpl *stateblock = This->stateBlock;
BYTE *ptr; BYTE *ptr;
if (idxSize != 0) { if (idxSize != 0) {
......
...@@ -147,7 +147,7 @@ static HRESULT WINAPI IWineD3DIndexBufferImpl_Lock(IWineD3DIndexBuffer *iface, U ...@@ -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); TRACE("(%p) : offset %d, size %d, Flags=%x\n", This, OffsetToLock, SizeToLock, Flags);
InterlockedIncrement(&This->lockcount); 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) { if(Flags & (WINED3DLOCK_READONLY | WINED3DLOCK_NO_DIRTY_UPDATE) || This->vbo == 0) {
return WINED3D_OK; return WINED3D_OK;
......
...@@ -169,8 +169,8 @@ static HRESULT WINAPI IWineD3DPaletteImpl_GetParent(IWineD3DPalette *iface, IUn ...@@ -169,8 +169,8 @@ static HRESULT WINAPI IWineD3DPaletteImpl_GetParent(IWineD3DPalette *iface, IUn
IWineD3DPaletteImpl *This = (IWineD3DPaletteImpl *)iface; IWineD3DPaletteImpl *This = (IWineD3DPaletteImpl *)iface;
TRACE("(%p)->(%p)\n", This, Parent); TRACE("(%p)->(%p)\n", This, Parent);
*Parent = (IUnknown *) This->parent; *Parent = This->parent;
IUnknown_AddRef( (IUnknown *) This->parent); IUnknown_AddRef(This->parent);
return WINED3D_OK; return WINED3D_OK;
} }
......
...@@ -1105,7 +1105,7 @@ static void state_fogdensity(DWORD state, IWineD3DStateBlockImpl *stateblock, Wi ...@@ -1105,7 +1105,7 @@ static void state_fogdensity(DWORD state, IWineD3DStateBlockImpl *stateblock, Wi
/* TODO: Merge with primitive type + init_materials()!! */ /* TODO: Merge with primitive type + init_materials()!! */
static void state_colormat(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) { static void state_colormat(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)stateblock->wineD3DDevice; IWineD3DDeviceImpl *device = stateblock->wineD3DDevice;
GLenum Parm = 0; GLenum Parm = 0;
WineDirect3DStridedData *diffuse = &device->strided_streams.u.s.diffuse; WineDirect3DStridedData *diffuse = &device->strided_streams.u.s.diffuse;
BOOL isDiffuseSupplied; BOOL isDiffuseSupplied;
...@@ -2029,7 +2029,7 @@ static void transform_texture(DWORD state, IWineD3DStateBlockImpl *stateblock, W ...@@ -2029,7 +2029,7 @@ static void transform_texture(DWORD state, IWineD3DStateBlockImpl *stateblock, W
} }
generated = (stateblock->textureState[texUnit][WINED3DTSS_TEXCOORDINDEX] & 0xFFFF0000) != WINED3DTSS_TCI_PASSTHRU; 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], stateblock->textureState[texUnit][WINED3DTSS_TEXTURETRANSFORMFLAGS],
generated, generated,
context->last_was_rhw, context->last_was_rhw,
...@@ -2417,7 +2417,7 @@ static void sampler(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DCont ...@@ -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]); IWineD3DBaseTexture_ApplyStateChanges(stateblock->textures[sampler], stateblock->textureState[sampler], stateblock->samplerState[sampler]);
if (GL_SUPPORT(EXT_TEXTURE_LOD_BIAS)) { if (GL_SUPPORT(EXT_TEXTURE_LOD_BIAS)) {
...@@ -2586,12 +2586,12 @@ static void transform_world(DWORD state, IWineD3DStateBlockImpl *stateblock, Win ...@@ -2586,12 +2586,12 @@ static void transform_world(DWORD state, IWineD3DStateBlockImpl *stateblock, Win
} else { } else {
/* In the general case, the view matrix is the identity matrix */ /* In the general case, the view matrix is the identity matrix */
if (stateblock->wineD3DDevice->view_ident) { 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"); checkGLcall("glLoadMatrixf");
} else { } else {
glLoadMatrixf((float *) &stateblock->transforms[WINED3DTS_VIEW].u.m[0][0]); glLoadMatrixf(&stateblock->transforms[WINED3DTS_VIEW].u.m[0][0]);
checkGLcall("glLoadMatrixf"); 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"); checkGLcall("glMultMatrixf");
} }
} }
...@@ -2607,7 +2607,7 @@ static void clipplane(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DCo ...@@ -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 */ /* Clip Plane settings are affected by the model view in OpenGL, the View transform in direct3d */
glMatrixMode(GL_MODELVIEW); glMatrixMode(GL_MODELVIEW);
glPushMatrix(); 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", TRACE("Clipplane [%f,%f,%f,%f]\n",
stateblock->clipplane[index][0], stateblock->clipplane[index][0],
...@@ -2727,7 +2727,7 @@ static void transform_view(DWORD state, IWineD3DStateBlockImpl *stateblock, Wine ...@@ -2727,7 +2727,7 @@ static void transform_view(DWORD state, IWineD3DStateBlockImpl *stateblock, Wine
glMatrixMode(GL_MODELVIEW); glMatrixMode(GL_MODELVIEW);
checkGLcall("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(...)"); checkGLcall("glLoadMatrixf(...)");
/* Reset lights. TODO: Call light apply func */ /* Reset lights. TODO: Call light apply func */
...@@ -2871,7 +2871,7 @@ static void transform_projection(DWORD state, IWineD3DStateBlockImpl *stateblock ...@@ -2871,7 +2871,7 @@ static void transform_projection(DWORD state, IWineD3DStateBlockImpl *stateblock
} }
checkGLcall("glScalef"); checkGLcall("glScalef");
glMultMatrixf((float *) &stateblock->transforms[WINED3DTS_PROJECTION].u.m[0][0]); glMultMatrixf(&stateblock->transforms[WINED3DTS_PROJECTION].u.m[0][0]);
checkGLcall("glLoadMatrixf"); checkGLcall("glLoadMatrixf");
} }
} }
...@@ -3669,7 +3669,7 @@ static void light(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContex ...@@ -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*/ /* Light settings are affected by the model view in OpenGL, the View transform in direct3d*/
glMatrixMode(GL_MODELVIEW); glMatrixMode(GL_MODELVIEW);
glPushMatrix(); glPushMatrix();
glLoadMatrixf((float *)&stateblock->transforms[WINED3DTS_VIEW].u.m[0][0]); glLoadMatrixf(&stateblock->transforms[WINED3DTS_VIEW].u.m[0][0]);
/* Diffuse: */ /* Diffuse: */
colRGBA[0] = lightInfo->OriginalParms.Diffuse.r; colRGBA[0] = lightInfo->OriginalParms.Diffuse.r;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment