From c3fa405ab73c354a76823e8b42b81db4232fcc84 Mon Sep 17 00:00:00 2001 From: Christian Costa Date: Sun, 29 Sep 2002 18:00:43 +0000 Subject: [PATCH] Implement IDirect3DViewport2_DeleteLight. --- dlls/ddraw/d3dviewport.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/dlls/ddraw/d3dviewport.c b/dlls/ddraw/d3dviewport.c index b4115f304e5..28eae313216 100644 --- a/dlls/ddraw/d3dviewport.c +++ b/dlls/ddraw/d3dviewport.c @@ -311,9 +311,19 @@ HRESULT WINAPI IDirect3DViewport2Impl_DeleteLight(LPDIRECT3DVIEWPORT2 iface, LPDIRECT3DLIGHT lpLight) { ICOM_THIS(IDirect3DViewport2Impl,iface); - FIXME("(%p)->(%p): stub\n", This, lpLight); + IDirect3DLightImpl** currentlplpLight; + TRACE("(%p)->(%p): stub\n", This, lpLight); - return DD_OK; + currentlplpLight = &(This->lights); + while(*currentlplpLight) { + if (*currentlplpLight == (IDirect3DLightImpl*)lpLight) { + *currentlplpLight = (*currentlplpLight)->next; + return DD_OK; + } + currentlplpLight = &((*currentlplpLight)->next); + } + + return DDERR_INVALIDOBJECT; } HRESULT WINAPI IDirect3DViewport2Impl_NextLight(LPDIRECT3DVIEWPORT2 iface,