Signed-off-by: Jeff Smith whydoubt@gmail.com --- dlls/d3drm/light.c | 2 +- dlls/d3drm/tests/d3drm.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/dlls/d3drm/light.c b/dlls/d3drm/light.c index 2f53f200aa..675dcaa0b5 100644 --- a/dlls/d3drm/light.c +++ b/dlls/d3drm/light.c @@ -165,7 +165,7 @@ static HRESULT WINAPI d3drm_light_SetColor(IDirect3DRMLight *iface, D3DCOLOR col
TRACE("iface %p, color 0x%08x.\n", iface, color);
- light->color = color; + light->color = 0xff000000 | color;
return D3DRM_OK; } diff --git a/dlls/d3drm/tests/d3drm.c b/dlls/d3drm/tests/d3drm.c index 25e9b4e0ac..5dda28cb8a 100644 --- a/dlls/d3drm/tests/d3drm.c +++ b/dlls/d3drm/tests/d3drm.c @@ -2589,6 +2589,11 @@ static void test_Light(void) color = IDirect3DRMLight_GetColor(light); ok(color == 0xff180587, "wrong color (%x)\n", color);
+ hr = IDirect3DRMLight_SetColor(light, 0x00c0c0c0); + ok(hr == D3DRM_OK, "Cannot set color (hr = %x)\n", hr); + color = IDirect3DRMLight_GetColor(light); + ok(color == 0xffc0c0c0, "wrong color (%x)\n", color); + hr = IDirect3DRMLight_SetColorRGB(light, 0.5, 0.5, 0.5); ok(hr == D3DRM_OK, "Cannot set color (hr = %x)\n", hr); color = IDirect3DRMLight_GetColor(light);
Signed-off-by: Jeff Smith whydoubt@gmail.com --- dlls/d3drm/tests/d3drm.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/dlls/d3drm/tests/d3drm.c b/dlls/d3drm/tests/d3drm.c index 5dda28cb8a..abe3dd6f1d 100644 --- a/dlls/d3drm/tests/d3drm.c +++ b/dlls/d3drm/tests/d3drm.c @@ -2601,6 +2601,17 @@ static void test_Light(void)
IDirect3DRMLight_Release(light);
+ hr = IDirect3DRM_CreateLight(d3drm, D3DRMLIGHT_SPOT, 0x00c0c0c0, &light); + ok(hr == D3DRM_OK, "Cannot get IDirect3DRMLight interface (hr = %x)\n", hr); + + type = IDirect3DRMLight_GetType(light); + ok(type == D3DRMLIGHT_SPOT, "wrong type (%u)\n", type); + + color = IDirect3DRMLight_GetColor(light); + ok(color == 0xffc0c0c0, "wrong color (%x)\n", color); + + IDirect3DRMLight_Release(light); + IDirect3DRM_Release(d3drm); }
Signed-off-by: Jeff Smith whydoubt@gmail.com --- These functions seem to do everything one would expect: allocate the light object, fix up references, set the type and set the color.
dlls/d3drm/d3drm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/d3drm/d3drm.c b/dlls/d3drm/d3drm.c index 0b3af02a5a..8edcd7bd69 100644 --- a/dlls/d3drm/d3drm.c +++ b/dlls/d3drm/d3drm.c @@ -1549,7 +1549,7 @@ static HRESULT WINAPI d3drm3_CreateLight(IDirect3DRM3 *iface, struct d3drm_light *object; HRESULT hr;
- FIXME("iface %p, type %#x, color 0x%08x, light %p partial stub!\n", iface, type, color, light); + TRACE("iface %p, type %#x, color 0x%08x, light %p.\n", iface, type, color, light);
if (SUCCEEDED(hr = d3drm_light_create(&object, &d3drm->IDirect3DRM_iface))) { @@ -1569,7 +1569,7 @@ static HRESULT WINAPI d3drm3_CreateLightRGB(IDirect3DRM3 *iface, D3DRMLIGHTTYPE struct d3drm_light *object; HRESULT hr;
- FIXME("iface %p, type %#x, red %.8e, green %.8e, blue %.8e, light %p partial stub!\n", + TRACE("iface %p, type %#x, red %.8e, green %.8e, blue %.8e, light %p.\n", iface, type, red, green, blue, light);
if (SUCCEEDED(hr = d3drm_light_create(&object, &d3drm->IDirect3DRM_iface)))