From 8fa6a0b4fd2ecd6299286965a2df8df940f8edc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Hentschel?= Date: Sun, 27 May 2012 15:52:03 +0200 Subject: [PATCH] d3drm: Implement IDirect3DRMLight_[Get|Set]Type. --- dlls/d3drm/light.c | 11 +++++++---- dlls/d3drm/tests/d3drm.c | 6 +++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/dlls/d3drm/light.c b/dlls/d3drm/light.c index 82ec825ded4..620fb97b048 100644 --- a/dlls/d3drm/light.c +++ b/dlls/d3drm/light.c @@ -32,6 +32,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3drm); typedef struct { IDirect3DRMLight IDirect3DRMLight_iface; LONG ref; + D3DRMLIGHTTYPE type; } IDirect3DRMLightImpl; static inline IDirect3DRMLightImpl *impl_from_IDirect3DRMLight(IDirect3DRMLight *iface) @@ -174,9 +175,11 @@ static HRESULT WINAPI IDirect3DRMLightImpl_SetType(IDirect3DRMLight* iface, D3DR { IDirect3DRMLightImpl *This = impl_from_IDirect3DRMLight(iface); - FIXME("(%p/%p)->(%u): stub\n", iface, This, type); + TRACE("(%p/%p)->(%u)\n", iface, This, type); - return E_NOTIMPL; + This->type = type; + + return D3DRM_OK; } static HRESULT WINAPI IDirect3DRMLightImpl_SetColor(IDirect3DRMLight* iface, D3DCOLOR color) @@ -322,9 +325,9 @@ static D3DRMLIGHTTYPE WINAPI IDirect3DRMLightImpl_GetType(IDirect3DRMLight* ifac { IDirect3DRMLightImpl *This = impl_from_IDirect3DRMLight(iface); - FIXME("(%p/%p)->(): stub\n", iface, This); + TRACE("(%p/%p)->()\n", iface, This); - return D3DRMLIGHT_AMBIENT; + return This->type; } static HRESULT WINAPI IDirect3DRMLightImpl_SetEnableFrame(IDirect3DRMLight* iface, diff --git a/dlls/d3drm/tests/d3drm.c b/dlls/d3drm/tests/d3drm.c index 5bbd363f7a2..16db2c2d723 100644 --- a/dlls/d3drm/tests/d3drm.c +++ b/dlls/d3drm/tests/d3drm.c @@ -839,15 +839,15 @@ static void test_Light(void) ok(hr == D3DRM_OK, "Cannot get IDirect3DRMLight interface (hr = %x)\n", hr); type = IDirect3DRMLight_GetType(pLight); - todo_wine ok(type == D3DRMLIGHT_SPOT, "wrong type (%u)\n", type); + ok(type == D3DRMLIGHT_SPOT, "wrong type (%u)\n", type); color = IDirect3DRMLight_GetColor(pLight); todo_wine ok(color == 0xff7f7f7f, "wrong color (%x)\n", color); hr = IDirect3DRMLight_SetType(pLight, D3DRMLIGHT_POINT); - todo_wine ok(hr == D3DRM_OK, "Cannot set type (hr = %x)\n", hr); + ok(hr == D3DRM_OK, "Cannot set type (hr = %x)\n", hr); type = IDirect3DRMLight_GetType(pLight); - todo_wine ok(type == D3DRMLIGHT_POINT, "wrong type (%u)\n", type); + ok(type == D3DRMLIGHT_POINT, "wrong type (%u)\n", type); hr = IDirect3DRMLight_SetColor(pLight, 0xff180587); todo_wine ok(hr == D3DRM_OK, "Cannot set color (hr = %x)\n", hr);