d3drm: Avoid LPDIRECT3DRMLIGHTARRAY.

This commit is contained in:
Henri Verbeet 2013-08-13 08:51:48 +02:00 committed by Alexandre Julliard
parent cf3053f504
commit ee6734e848
3 changed files with 15 additions and 17 deletions

View File

@ -703,14 +703,13 @@ static D3DCOLOR WINAPI IDirect3DRMFrame2Impl_GetColor(IDirect3DRMFrame2* iface)
return 0;
}
static HRESULT WINAPI IDirect3DRMFrame2Impl_GetLights(IDirect3DRMFrame2* iface,
LPDIRECT3DRMLIGHTARRAY *lights)
static HRESULT WINAPI IDirect3DRMFrame2Impl_GetLights(IDirect3DRMFrame2 *iface, IDirect3DRMLightArray **lights)
{
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
IDirect3DRMFrameImpl *frame = impl_from_IDirect3DRMFrame2(iface);
TRACE("(%p/%p)->(%p)\n", iface, This, lights);
TRACE("iface %p, lights %p.\n", iface, lights);
return IDirect3DRMFrame3_GetLights(&This->IDirect3DRMFrame3_iface, lights);
return IDirect3DRMFrame3_GetLights(&frame->IDirect3DRMFrame3_iface, lights);
}
static D3DRMMATERIALMODE WINAPI IDirect3DRMFrame2Impl_GetMaterialMode(IDirect3DRMFrame2* iface)
@ -1721,8 +1720,7 @@ static D3DCOLOR WINAPI IDirect3DRMFrame3Impl_GetColor(IDirect3DRMFrame3* iface)
return 0;
}
static HRESULT WINAPI IDirect3DRMFrame3Impl_GetLights(IDirect3DRMFrame3* iface,
LPDIRECT3DRMLIGHTARRAY *lights)
static HRESULT WINAPI IDirect3DRMFrame3Impl_GetLights(IDirect3DRMFrame3 *iface, IDirect3DRMLightArray **lights)
{
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
IDirect3DRMLightArrayImpl* obj;

View File

@ -918,7 +918,7 @@ static void test_Frame(void)
IDirect3DRMVisualArray *visual_array;
IDirect3DRMLight *light1;
IDirect3DRMLight *light_tmp;
LPDIRECT3DRMLIGHTARRAY pLightArray;
IDirect3DRMLightArray *light_array;
D3DCOLOR color;
DWORD count;
CHAR cname[64] = {0};
@ -1193,18 +1193,18 @@ static void test_Frame(void)
CHECK_REFCOUNT(pFrameP1, 3);
CHECK_REFCOUNT(light1, 2);
pLightArray = NULL;
hr = IDirect3DRMFrame_GetLights(pFrameP1, &pLightArray);
light_array = NULL;
hr = IDirect3DRMFrame_GetLights(pFrameP1, &light_array);
ok(hr == D3DRM_OK, "Cannot get lights (hr = %x)\n", hr);
if (pLightArray)
if (light_array)
{
count = IDirect3DRMLightArray_GetSize(pLightArray);
count = IDirect3DRMLightArray_GetSize(light_array);
ok(count == 1, "count = %u\n", count);
hr = IDirect3DRMLightArray_GetElement(pLightArray, 0, &light_tmp);
hr = IDirect3DRMLightArray_GetElement(light_array, 0, &light_tmp);
ok(hr == D3DRM_OK, "Cannot get element (hr = %x)\n", hr);
ok(light_tmp == light1, "light_tmp = %p\n", light_tmp);
IDirect3DRMLight_Release(light_tmp);
IDirect3DRMLightArray_Release(pLightArray);
IDirect3DRMLightArray_Release(light_array);
}
/* Delete Light */

View File

@ -1106,7 +1106,7 @@ DECLARE_INTERFACE_(IDirect3DRMFrame,IDirect3DRMVisual)
STDMETHOD(AddVisual)(THIS_ IDirect3DRMVisual *visual) PURE;
STDMETHOD(GetChildren)(THIS_ struct IDirect3DRMFrameArray **children) PURE;
STDMETHOD_(D3DCOLOR, GetColor)(THIS) PURE;
STDMETHOD(GetLights)(THIS_ LPDIRECT3DRMLIGHTARRAY *lights) PURE;
STDMETHOD(GetLights)(THIS_ struct IDirect3DRMLightArray **lights) PURE;
STDMETHOD_(D3DRMMATERIALMODE, GetMaterialMode)(THIS) PURE;
STDMETHOD(GetParent)(THIS_ IDirect3DRMFrame **parent) PURE;
STDMETHOD(GetPosition)(THIS_ IDirect3DRMFrame *reference, D3DVECTOR *return_position) PURE;
@ -1339,7 +1339,7 @@ DECLARE_INTERFACE_(IDirect3DRMFrame2,IDirect3DRMFrame)
STDMETHOD(AddVisual)(THIS_ IDirect3DRMVisual *visual) PURE;
STDMETHOD(GetChildren)(THIS_ struct IDirect3DRMFrameArray **children) PURE;
STDMETHOD_(D3DCOLOR, GetColor)(THIS) PURE;
STDMETHOD(GetLights)(THIS_ LPDIRECT3DRMLIGHTARRAY *lights) PURE;
STDMETHOD(GetLights)(THIS_ struct IDirect3DRMLightArray **lights) PURE;
STDMETHOD_(D3DRMMATERIALMODE, GetMaterialMode)(THIS) PURE;
STDMETHOD(GetParent)(THIS_ IDirect3DRMFrame **parent) PURE;
STDMETHOD(GetPosition)(THIS_ IDirect3DRMFrame *reference, D3DVECTOR *return_position) PURE;
@ -1621,7 +1621,7 @@ DECLARE_INTERFACE_(IDirect3DRMFrame3,IDirect3DRMVisual)
STDMETHOD(AddVisual)(THIS_ LPUNKNOWN) PURE;
STDMETHOD(GetChildren)(THIS_ struct IDirect3DRMFrameArray **children) PURE;
STDMETHOD_(D3DCOLOR, GetColor)(THIS) PURE;
STDMETHOD(GetLights)(THIS_ LPDIRECT3DRMLIGHTARRAY *lights) PURE;
STDMETHOD(GetLights)(THIS_ struct IDirect3DRMLightArray **lights) PURE;
STDMETHOD_(D3DRMMATERIALMODE, GetMaterialMode)(THIS) PURE;
STDMETHOD(GetParent)(THIS_ IDirect3DRMFrame3 **parent) PURE;
STDMETHOD(GetPosition)(THIS_ IDirect3DRMFrame3 *reference, D3DVECTOR *return_position) PURE;