Commit b8e3cee7 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

d3drm: Avoid LPDIRECT3DRMLIGHT.

parent 1013b549
......@@ -196,25 +196,25 @@ static HRESULT WINAPI IDirect3DRMImpl_CreateTexture(IDirect3DRM *iface,
return Direct3DRMTexture_create(&IID_IDirect3DRMTexture, (IUnknown **)texture);
}
static HRESULT WINAPI IDirect3DRMImpl_CreateLight(IDirect3DRM* iface, D3DRMLIGHTTYPE type,
D3DCOLOR color, LPDIRECT3DRMLIGHT* Light)
static HRESULT WINAPI IDirect3DRMImpl_CreateLight(IDirect3DRM *iface,
D3DRMLIGHTTYPE type, D3DCOLOR color, IDirect3DRMLight **light)
{
IDirect3DRMImpl *This = impl_from_IDirect3DRM(iface);
IDirect3DRMImpl *d3drm = impl_from_IDirect3DRM(iface);
TRACE("(%p/%p)->(%d,%d,%p)\n", iface, This, type, color, Light);
TRACE("iface %p, type %#x, color 0x%08x, light %p.\n", iface, type, color, light);
return IDirect3DRM3_CreateLight(&This->IDirect3DRM3_iface, type, color, Light);
return IDirect3DRM3_CreateLight(&d3drm->IDirect3DRM3_iface, type, color, light);
}
static HRESULT WINAPI IDirect3DRMImpl_CreateLightRGB(IDirect3DRM* iface, D3DRMLIGHTTYPE type,
D3DVALUE red, D3DVALUE green, D3DVALUE blue,
LPDIRECT3DRMLIGHT* Light)
static HRESULT WINAPI IDirect3DRMImpl_CreateLightRGB(IDirect3DRM *iface, D3DRMLIGHTTYPE type,
D3DVALUE red, D3DVALUE green, D3DVALUE blue, IDirect3DRMLight **light)
{
IDirect3DRMImpl *This = impl_from_IDirect3DRM(iface);
IDirect3DRMImpl *d3drm = impl_from_IDirect3DRM(iface);
TRACE("(%p/%p)->(%d,%f,%f,%f,%p)\n", iface, This, type, red, green, blue, Light);
TRACE("iface %p, type %#x, red %.8e, green %.8e, blue %.8e, light %p.\n",
iface, type, red, green, blue, light);
return IDirect3DRM3_CreateLightRGB(&This->IDirect3DRM3_iface, type, red, green, blue, Light);
return IDirect3DRM3_CreateLightRGB(&d3drm->IDirect3DRM3_iface, type, red, green, blue, light);
}
static HRESULT WINAPI IDirect3DRMImpl_CreateMaterial(IDirect3DRM* iface, D3DVALUE power, LPDIRECT3DRMMATERIAL * material)
......@@ -575,25 +575,25 @@ static HRESULT WINAPI IDirect3DRM2Impl_CreateTexture(IDirect3DRM2 *iface,
return Direct3DRMTexture_create(&IID_IDirect3DRMTexture2, (IUnknown **)texture);
}
static HRESULT WINAPI IDirect3DRM2Impl_CreateLight(IDirect3DRM2* iface, D3DRMLIGHTTYPE type,
D3DCOLOR color, LPDIRECT3DRMLIGHT* Light)
static HRESULT WINAPI IDirect3DRM2Impl_CreateLight(IDirect3DRM2 *iface,
D3DRMLIGHTTYPE type, D3DCOLOR color, IDirect3DRMLight **light)
{
IDirect3DRMImpl *This = impl_from_IDirect3DRM2(iface);
IDirect3DRMImpl *d3drm = impl_from_IDirect3DRM2(iface);
TRACE("(%p/%p)->(%d,%d,%p)\n", iface, This, type, color, Light);
TRACE("iface %p, type %#x, color 0x%08x, light %p.\n", iface, type, color, light);
return IDirect3DRM3_CreateLight(&This->IDirect3DRM3_iface, type, color, Light);
return IDirect3DRM3_CreateLight(&d3drm->IDirect3DRM3_iface, type, color, light);
}
static HRESULT WINAPI IDirect3DRM2Impl_CreateLightRGB(IDirect3DRM2* iface, D3DRMLIGHTTYPE type,
D3DVALUE red, D3DVALUE green, D3DVALUE blue,
LPDIRECT3DRMLIGHT* Light)
static HRESULT WINAPI IDirect3DRM2Impl_CreateLightRGB(IDirect3DRM2 *iface, D3DRMLIGHTTYPE type,
D3DVALUE red, D3DVALUE green, D3DVALUE blue, IDirect3DRMLight **light)
{
IDirect3DRMImpl *This = impl_from_IDirect3DRM2(iface);
IDirect3DRMImpl *d3drm = impl_from_IDirect3DRM2(iface);
TRACE("(%p/%p)->(%d,%f,%f,%f,%p)\n", iface, This, type, red, green, blue, Light);
TRACE("iface %p, type %#x, red %.8e, green %.8e, blue %.8e, light %p.\n",
iface, type, red, green, blue, light);
return IDirect3DRM3_CreateLightRGB(&This->IDirect3DRM3_iface, type, red, green, blue, Light);
return IDirect3DRM3_CreateLightRGB(&d3drm->IDirect3DRM3_iface, type, red, green, blue, light);
}
static HRESULT WINAPI IDirect3DRM2Impl_CreateMaterial(IDirect3DRM2* iface, D3DVALUE power,
......@@ -969,43 +969,37 @@ static HRESULT WINAPI IDirect3DRM3Impl_CreateTexture(IDirect3DRM3 *iface,
return Direct3DRMTexture_create(&IID_IDirect3DRMTexture3, (IUnknown **)texture);
}
static HRESULT WINAPI IDirect3DRM3Impl_CreateLight(IDirect3DRM3* iface, D3DRMLIGHTTYPE type,
D3DCOLOR color, LPDIRECT3DRMLIGHT* Light)
static HRESULT WINAPI IDirect3DRM3Impl_CreateLight(IDirect3DRM3 *iface,
D3DRMLIGHTTYPE type, D3DCOLOR color, IDirect3DRMLight **light)
{
IDirect3DRMImpl *This = impl_from_IDirect3DRM3(iface);
HRESULT ret;
FIXME("(%p/%p)->(%d,%d,%p): partial stub\n", iface, This, type, color, Light);
HRESULT hr;
ret = Direct3DRMLight_create((IUnknown**)Light);
FIXME("iface %p, type %#x, color 0x%08x, light %p partial stub!\n", iface, type, color, light);
if (SUCCEEDED(ret))
if (SUCCEEDED(hr = Direct3DRMLight_create((IUnknown **)light)))
{
IDirect3DRMLight_SetType(*Light, type);
IDirect3DRMLight_SetColor(*Light, color);
IDirect3DRMLight_SetType(*light, type);
IDirect3DRMLight_SetColor(*light, color);
}
return ret;
return hr;
}
static HRESULT WINAPI IDirect3DRM3Impl_CreateLightRGB(IDirect3DRM3* iface, D3DRMLIGHTTYPE type,
D3DVALUE red, D3DVALUE green, D3DVALUE blue,
LPDIRECT3DRMLIGHT* Light)
static HRESULT WINAPI IDirect3DRM3Impl_CreateLightRGB(IDirect3DRM3 *iface, D3DRMLIGHTTYPE type,
D3DVALUE red, D3DVALUE green, D3DVALUE blue, IDirect3DRMLight **light)
{
IDirect3DRMImpl *This = impl_from_IDirect3DRM3(iface);
HRESULT ret;
FIXME("(%p/%p)->(%d,%f,%f,%f,%p): partial stub\n", iface, This, type, red, green, blue, Light);
HRESULT hr;
ret = Direct3DRMLight_create((IUnknown**)Light);
FIXME("iface %p, type %#x, red %.8e, green %.8e, blue %.8e, light %p partial stub!\n",
iface, type, red, green, blue, light);
if (SUCCEEDED(ret))
if (SUCCEEDED(hr = Direct3DRMLight_create((IUnknown **)light)))
{
IDirect3DRMLight_SetType(*Light, type);
IDirect3DRMLight_SetColorRGB(*Light, red, green, blue);
IDirect3DRMLight_SetType(*light, type);
IDirect3DRMLight_SetColorRGB(*light, red, green, blue);
}
return ret;
return hr;
}
static HRESULT WINAPI IDirect3DRM3Impl_CreateMaterial(IDirect3DRM3* iface, D3DVALUE power,
......@@ -1064,16 +1058,11 @@ static HRESULT WINAPI IDirect3DRM3Impl_CreateDeviceFromClipper(IDirect3DRM3 *ifa
return Direct3DRMDevice_create(&IID_IDirect3DRMDevice3, (IUnknown**)device);
}
static HRESULT WINAPI IDirect3DRM3Impl_CreateShadow(IDirect3DRM3* iface, LPUNKNOWN Visual1,
LPDIRECT3DRMLIGHT Light, D3DVALUE px,
D3DVALUE py, D3DVALUE pz, D3DVALUE nx,
D3DVALUE ny, D3DVALUE nz,
LPDIRECT3DRMSHADOW2* Visual2)
static HRESULT WINAPI IDirect3DRM3Impl_CreateShadow(IDirect3DRM3 *iface, IUnknown *object, IDirect3DRMLight *light,
D3DVALUE px, D3DVALUE py, D3DVALUE pz, D3DVALUE nx, D3DVALUE ny, D3DVALUE nz, IDirect3DRMShadow2 **shadow)
{
IDirect3DRMImpl *This = impl_from_IDirect3DRM3(iface);
FIXME("(%p/%p)->(%p,%p,%f,%f,%f,%f,%f,%f,%p): stub\n", iface, This, Visual1, Light, px, py, pz,
nx, ny, nz, Visual2);
FIXME("iface %p, object %p, light %p, px %.8e, py %.8e, pz %.8e, nx %.8e, ny %.8e, nz %.8e, shadow %p stub!\n",
iface, object, light, px, py, pz, nx, ny, nz, shadow);
return E_NOTIMPL;
}
......
......@@ -76,7 +76,7 @@ typedef struct {
IDirect3DRMLightArray IDirect3DRMLightArray_iface;
LONG ref;
ULONG size;
LPDIRECT3DRMLIGHT* lights;
IDirect3DRMLight **lights;
} IDirect3DRMLightArrayImpl;
static inline IDirect3DRMFrameImpl *impl_from_IDirect3DRMFrame2(IDirect3DRMFrame2 *iface)
......@@ -393,7 +393,8 @@ static DWORD WINAPI IDirect3DRMLightArrayImpl_GetSize(IDirect3DRMLightArray* ifa
}
/*** IDirect3DRMLightArray methods ***/
static HRESULT WINAPI IDirect3DRMLightArrayImpl_GetElement(IDirect3DRMLightArray* iface, DWORD index, LPDIRECT3DRMLIGHT* light)
static HRESULT WINAPI IDirect3DRMLightArrayImpl_GetElement(IDirect3DRMLightArray *iface,
DWORD index, IDirect3DRMLight **light)
{
IDirect3DRMLightArrayImpl *This = impl_from_IDirect3DRMLightArray(iface);
......@@ -611,8 +612,7 @@ static HRESULT WINAPI IDirect3DRMFrame2Impl_AddChild(IDirect3DRMFrame2 *iface, I
return IDirect3DRMFrame3_AddChild(&This->IDirect3DRMFrame3_iface, frame);
}
static HRESULT WINAPI IDirect3DRMFrame2Impl_AddLight(IDirect3DRMFrame2* iface,
LPDIRECT3DRMLIGHT light)
static HRESULT WINAPI IDirect3DRMFrame2Impl_AddLight(IDirect3DRMFrame2 *iface, IDirect3DRMLight *light)
{
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
......@@ -924,8 +924,7 @@ static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteChild(IDirect3DRMFrame2 *iface
return IDirect3DRMFrame3_DeleteChild(&This->IDirect3DRMFrame3_iface, child);
}
static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteLight(IDirect3DRMFrame2* iface,
LPDIRECT3DRMLIGHT light)
static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteLight(IDirect3DRMFrame2 *iface, IDirect3DRMLight *light)
{
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
......@@ -1532,8 +1531,7 @@ static HRESULT WINAPI IDirect3DRMFrame3Impl_AddChild(IDirect3DRMFrame3 *iface, I
return D3DRM_OK;
}
static HRESULT WINAPI IDirect3DRMFrame3Impl_AddLight(IDirect3DRMFrame3* iface,
LPDIRECT3DRMLIGHT light)
static HRESULT WINAPI IDirect3DRMFrame3Impl_AddLight(IDirect3DRMFrame3 *iface, IDirect3DRMLight *light)
{
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
ULONG i;
......@@ -1760,8 +1758,7 @@ static HRESULT WINAPI IDirect3DRMFrame3Impl_GetLights(IDirect3DRMFrame3* iface,
if (This->nb_lights)
{
ULONG i;
obj->lights = HeapAlloc(GetProcessHeap(), 0, This->nb_lights * sizeof(LPDIRECT3DRMLIGHT));
if (!obj->lights)
if (!(obj->lights = HeapAlloc(GetProcessHeap(), 0, This->nb_lights * sizeof(*obj->lights))))
return E_OUTOFMEMORY;
for (i = 0; i < This->nb_lights; i++)
IDirect3DRMLight_QueryInterface(This->lights[i], &IID_IDirect3DRMLight, (void**)&obj->lights[i]);
......@@ -1957,8 +1954,7 @@ static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteChild(IDirect3DRMFrame3 *iface
return D3DRM_OK;
}
static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteLight(IDirect3DRMFrame3* iface,
LPDIRECT3DRMLIGHT light)
static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteLight(IDirect3DRMFrame3 *iface, IDirect3DRMLight *light)
{
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
ULONG i;
......
......@@ -679,8 +679,8 @@ static void test_Frame(void)
IDirect3DRMVisual *visual1;
IDirect3DRMVisual *visual_tmp;
LPDIRECT3DRMVISUALARRAY pVisualArray;
LPDIRECT3DRMLIGHT pLight1;
LPDIRECT3DRMLIGHT pLightTmp;
IDirect3DRMLight *light1;
IDirect3DRMLight *light_tmp;
LPDIRECT3DRMLIGHTARRAY pLightArray;
D3DCOLOR color;
DWORD count;
......@@ -947,14 +947,14 @@ static void test_Frame(void)
CHECK_REFCOUNT(pFrameP1, 3);
/* Create Light */
hr = IDirect3DRM_CreateLightRGB(d3drm, D3DRMLIGHT_SPOT, 0.1, 0.2, 0.3, &pLight1);
hr = IDirect3DRM_CreateLightRGB(d3drm, D3DRMLIGHT_SPOT, 0.1, 0.2, 0.3, &light1);
ok(hr == D3DRM_OK, "Cannot get IDirect3DRMLight interface (hr = %x)\n", hr);
/* Add Light to first parent */
hr = IDirect3DRMFrame_AddLight(pFrameP1, pLight1);
hr = IDirect3DRMFrame_AddLight(pFrameP1, light1);
ok(hr == D3DRM_OK, "Cannot add light (hr = %x)\n", hr);
CHECK_REFCOUNT(pFrameP1, 3);
CHECK_REFCOUNT(pLight1, 2);
CHECK_REFCOUNT(light1, 2);
pLightArray = NULL;
hr = IDirect3DRMFrame_GetLights(pFrameP1, &pLightArray);
......@@ -963,18 +963,18 @@ static void test_Frame(void)
{
count = IDirect3DRMLightArray_GetSize(pLightArray);
ok(count == 1, "count = %u\n", count);
hr = IDirect3DRMLightArray_GetElement(pLightArray, 0, &pLightTmp);
hr = IDirect3DRMLightArray_GetElement(pLightArray, 0, &light_tmp);
ok(hr == D3DRM_OK, "Cannot get element (hr = %x)\n", hr);
ok(pLightTmp == pLight1, "pLightTmp = %p\n", pLightTmp);
IDirect3DRMLight_Release(pLightTmp);
ok(light_tmp == light1, "light_tmp = %p\n", light_tmp);
IDirect3DRMLight_Release(light_tmp);
IDirect3DRMLightArray_Release(pLightArray);
}
/* Delete Light */
hr = IDirect3DRMFrame_DeleteLight(pFrameP1, pLight1);
hr = IDirect3DRMFrame_DeleteLight(pFrameP1, light1);
ok(hr == D3DRM_OK, "Cannot delete light (hr = %x)\n", hr);
CHECK_REFCOUNT(pFrameP1, 3);
IDirect3DRMLight_Release(pLight1);
IDirect3DRMLight_Release(light1);
/* Test SceneBackground on first parent */
color = IDirect3DRMFrame_GetSceneBackground(pFrameP1);
......@@ -1063,7 +1063,7 @@ static void test_Light(void)
{
HRESULT hr;
IDirect3DRM *d3drm;
LPDIRECT3DRMLIGHT pLight;
IDirect3DRMLight *light;
D3DRMLIGHTTYPE type;
D3DCOLOR color;
DWORD size;
......@@ -1072,44 +1072,44 @@ static void test_Light(void)
hr = pDirect3DRMCreate(&d3drm);
ok(hr == D3DRM_OK, "Cannot get IDirect3DRM interface (hr = %x)\n", hr);
hr = IDirect3DRM_CreateLightRGB(d3drm, D3DRMLIGHT_SPOT, 0.5, 0.5, 0.5, &pLight);
hr = IDirect3DRM_CreateLightRGB(d3drm, D3DRMLIGHT_SPOT, 0.5, 0.5, 0.5, &light);
ok(hr == D3DRM_OK, "Cannot get IDirect3DRMLight interface (hr = %x)\n", hr);
hr = IDirect3DRMLight_GetClassName(pLight, NULL, cname);
hr = IDirect3DRMLight_GetClassName(light, NULL, cname);
ok(hr == E_INVALIDARG, "GetClassName failed with %x\n", hr);
hr = IDirect3DRMLight_GetClassName(pLight, NULL, NULL);
hr = IDirect3DRMLight_GetClassName(light, NULL, NULL);
ok(hr == E_INVALIDARG, "GetClassName failed with %x\n", hr);
size = 1;
hr = IDirect3DRMLight_GetClassName(pLight, &size, cname);
hr = IDirect3DRMLight_GetClassName(light, &size, cname);
ok(hr == E_INVALIDARG, "GetClassName failed with %x\n", hr);
size = sizeof(cname);
hr = IDirect3DRMLight_GetClassName(pLight, &size, cname);
hr = IDirect3DRMLight_GetClassName(light, &size, cname);
ok(hr == D3DRM_OK, "Cannot get classname (hr = %x)\n", hr);
ok(size == sizeof("Light"), "wrong size: %u\n", size);
ok(!strcmp(cname, "Light"), "Expected cname to be \"Light\", but got \"%s\"\n", cname);
type = IDirect3DRMLight_GetType(pLight);
type = IDirect3DRMLight_GetType(light);
ok(type == D3DRMLIGHT_SPOT, "wrong type (%u)\n", type);
color = IDirect3DRMLight_GetColor(pLight);
color = IDirect3DRMLight_GetColor(light);
ok(color == 0xff7f7f7f, "wrong color (%x)\n", color);
hr = IDirect3DRMLight_SetType(pLight, D3DRMLIGHT_POINT);
hr = IDirect3DRMLight_SetType(light, D3DRMLIGHT_POINT);
ok(hr == D3DRM_OK, "Cannot set type (hr = %x)\n", hr);
type = IDirect3DRMLight_GetType(pLight);
type = IDirect3DRMLight_GetType(light);
ok(type == D3DRMLIGHT_POINT, "wrong type (%u)\n", type);
hr = IDirect3DRMLight_SetColor(pLight, 0xff180587);
hr = IDirect3DRMLight_SetColor(light, 0xff180587);
ok(hr == D3DRM_OK, "Cannot set color (hr = %x)\n", hr);
color = IDirect3DRMLight_GetColor(pLight);
color = IDirect3DRMLight_GetColor(light);
ok(color == 0xff180587, "wrong color (%x)\n", color);
hr = IDirect3DRMLight_SetColorRGB(pLight, 0.5, 0.5, 0.5);
hr = IDirect3DRMLight_SetColorRGB(light, 0.5, 0.5, 0.5);
ok(hr == D3DRM_OK, "Cannot set color (hr = %x)\n", hr);
color = IDirect3DRMLight_GetColor(pLight);
color = IDirect3DRMLight_GetColor(light);
ok(color == 0xff7f7f7f, "wrong color (%x)\n", color);
IDirect3DRMLight_Release(pLight);
IDirect3DRMLight_Release(light);
IDirect3DRM_Release(d3drm);
}
......
......@@ -65,8 +65,9 @@ DECLARE_INTERFACE_(IDirect3DRM,IUnknown)
STDMETHOD(CreateAnimation)(THIS_ LPDIRECT3DRMANIMATION *) PURE;
STDMETHOD(CreateAnimationSet)(THIS_ LPDIRECT3DRMANIMATIONSET *) PURE;
STDMETHOD(CreateTexture)(THIS_ D3DRMIMAGE *image, IDirect3DRMTexture **texture) PURE;
STDMETHOD(CreateLight)(THIS_ D3DRMLIGHTTYPE, D3DCOLOR, LPDIRECT3DRMLIGHT *) PURE;
STDMETHOD(CreateLightRGB)(THIS_ D3DRMLIGHTTYPE, D3DVALUE, D3DVALUE, D3DVALUE, LPDIRECT3DRMLIGHT *) PURE;
STDMETHOD(CreateLight)(THIS_ D3DRMLIGHTTYPE type, D3DCOLOR color, IDirect3DRMLight **light) PURE;
STDMETHOD(CreateLightRGB)(THIS_ D3DRMLIGHTTYPE type, D3DVALUE r, D3DVALUE g, D3DVALUE b,
IDirect3DRMLight **light) PURE;
STDMETHOD(CreateMaterial)(THIS_ D3DVALUE, LPDIRECT3DRMMATERIAL *) PURE;
STDMETHOD(CreateDevice)(THIS_ DWORD width, DWORD height, IDirect3DRMDevice **device) PURE;
STDMETHOD(CreateDeviceFromSurface)(THIS_ GUID *guid, IDirectDraw *ddraw,
......@@ -203,8 +204,9 @@ DECLARE_INTERFACE_(IDirect3DRM2,IUnknown)
STDMETHOD(CreateAnimation)(THIS_ LPDIRECT3DRMANIMATION *) PURE;
STDMETHOD(CreateAnimationSet)(THIS_ LPDIRECT3DRMANIMATIONSET *) PURE;
STDMETHOD(CreateTexture)(THIS_ D3DRMIMAGE *image, IDirect3DRMTexture2 **texture) PURE;
STDMETHOD(CreateLight)(THIS_ D3DRMLIGHTTYPE, D3DCOLOR, LPDIRECT3DRMLIGHT *) PURE;
STDMETHOD(CreateLightRGB)(THIS_ D3DRMLIGHTTYPE, D3DVALUE, D3DVALUE, D3DVALUE, LPDIRECT3DRMLIGHT *) PURE;
STDMETHOD(CreateLight)(THIS_ D3DRMLIGHTTYPE type, D3DCOLOR color, IDirect3DRMLight **light) PURE;
STDMETHOD(CreateLightRGB)(THIS_ D3DRMLIGHTTYPE type, D3DVALUE r, D3DVALUE g, D3DVALUE b,
IDirect3DRMLight **light) PURE;
STDMETHOD(CreateMaterial)(THIS_ D3DVALUE, LPDIRECT3DRMMATERIAL *) PURE;
STDMETHOD(CreateDevice)(THIS_ DWORD width, DWORD height, IDirect3DRMDevice2 **device) PURE;
STDMETHOD(CreateDeviceFromSurface)(THIS_ GUID *guid, IDirectDraw *ddraw,
......@@ -344,8 +346,9 @@ DECLARE_INTERFACE_(IDirect3DRM3,IUnknown)
STDMETHOD(CreateAnimation)(THIS_ LPDIRECT3DRMANIMATION2 *) PURE;
STDMETHOD(CreateAnimationSet)(THIS_ LPDIRECT3DRMANIMATIONSET2 *) PURE;
STDMETHOD(CreateTexture)(THIS_ D3DRMIMAGE *image, IDirect3DRMTexture3 **texture) PURE;
STDMETHOD(CreateLight)(THIS_ D3DRMLIGHTTYPE, D3DCOLOR, LPDIRECT3DRMLIGHT *) PURE;
STDMETHOD(CreateLightRGB)(THIS_ D3DRMLIGHTTYPE, D3DVALUE, D3DVALUE, D3DVALUE, LPDIRECT3DRMLIGHT *) PURE;
STDMETHOD(CreateLight)(THIS_ D3DRMLIGHTTYPE type, D3DCOLOR color, IDirect3DRMLight **light) PURE;
STDMETHOD(CreateLightRGB)(THIS_ D3DRMLIGHTTYPE type, D3DVALUE r, D3DVALUE g, D3DVALUE b,
IDirect3DRMLight **light) PURE;
STDMETHOD(CreateMaterial)(THIS_ D3DVALUE, LPDIRECT3DRMMATERIAL2 *) PURE;
STDMETHOD(CreateDevice)(THIS_ DWORD width, DWORD height, IDirect3DRMDevice3 **device) PURE;
STDMETHOD(CreateDeviceFromSurface)(THIS_ GUID *guid, IDirectDraw *ddraw,
......@@ -356,8 +359,8 @@ DECLARE_INTERFACE_(IDirect3DRM3,IUnknown)
int width, int height, IDirect3DRMDevice3 **device) PURE;
STDMETHOD(CreateTextureFromSurface)(THIS_ IDirectDrawSurface *surface,
IDirect3DRMTexture3 **texture) PURE;
STDMETHOD(CreateShadow)(THIS_ LPUNKNOWN, LPDIRECT3DRMLIGHT, D3DVALUE px, D3DVALUE py, D3DVALUE pz,
D3DVALUE nx, D3DVALUE ny, D3DVALUE nz, LPDIRECT3DRMSHADOW2 *) PURE;
STDMETHOD(CreateShadow)(THIS_ IUnknown *object, IDirect3DRMLight *light, D3DVALUE px, D3DVALUE py, D3DVALUE pz,
D3DVALUE nx, D3DVALUE ny, D3DVALUE nz, IDirect3DRMShadow2 **shadow) PURE;
STDMETHOD(CreateViewport)(THIS_ IDirect3DRMDevice3 *device, IDirect3DRMFrame3 *camera,
DWORD x, DWORD y, DWORD width, DWORD height, IDirect3DRMViewport2 **viewport) PURE;
STDMETHOD(CreateWrap)(THIS_ D3DRMWRAPTYPE type, IDirect3DRMFrame3 *reference,
......
......@@ -1097,7 +1097,7 @@ DECLARE_INTERFACE_(IDirect3DRMFrame,IDirect3DRMVisual)
STDMETHOD(GetClassName)(THIS_ LPDWORD lpdwSize, LPSTR lpName) PURE;
/*** IDirect3DRMFrame methods ***/
STDMETHOD(AddChild)(THIS_ IDirect3DRMFrame *child) PURE;
STDMETHOD(AddLight)(THIS_ LPDIRECT3DRMLIGHT) PURE;
STDMETHOD(AddLight)(THIS_ struct IDirect3DRMLight *light) PURE;
STDMETHOD(AddMoveCallback)(THIS_ D3DRMFRAMEMOVECALLBACK, VOID *arg) PURE;
STDMETHOD(AddTransform)(THIS_ D3DRMCOMBINETYPE, D3DRMMATRIX4D) PURE;
STDMETHOD(AddTranslation)(THIS_ D3DRMCOMBINETYPE, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE;
......@@ -1126,7 +1126,7 @@ DECLARE_INTERFACE_(IDirect3DRMFrame,IDirect3DRMVisual)
D3DRMFRAMECONSTRAINT constraint) PURE;
STDMETHOD(Move)(THIS_ D3DVALUE delta) PURE;
STDMETHOD(DeleteChild)(THIS_ IDirect3DRMFrame *child) PURE;
STDMETHOD(DeleteLight)(THIS_ LPDIRECT3DRMLIGHT) PURE;
STDMETHOD(DeleteLight)(THIS_ struct IDirect3DRMLight *light) PURE;
STDMETHOD(DeleteMoveCallback)(THIS_ D3DRMFRAMEMOVECALLBACK, VOID *arg) PURE;
STDMETHOD(DeleteVisual)(THIS_ IDirect3DRMVisual *visual) PURE;
STDMETHOD_(D3DCOLOR, GetSceneBackground)(THIS) PURE;
......@@ -1330,7 +1330,7 @@ DECLARE_INTERFACE_(IDirect3DRMFrame2,IDirect3DRMFrame)
STDMETHOD(GetClassName)(THIS_ LPDWORD lpdwSize, LPSTR lpName) PURE;
/*** IDirect3DRMFrame methods ***/
STDMETHOD(AddChild)(THIS_ IDirect3DRMFrame *child) PURE;
STDMETHOD(AddLight)(THIS_ LPDIRECT3DRMLIGHT) PURE;
STDMETHOD(AddLight)(THIS_ struct IDirect3DRMLight *light) PURE;
STDMETHOD(AddMoveCallback)(THIS_ D3DRMFRAMEMOVECALLBACK, VOID *arg) PURE;
STDMETHOD(AddTransform)(THIS_ D3DRMCOMBINETYPE, D3DRMMATRIX4D) PURE;
STDMETHOD(AddTranslation)(THIS_ D3DRMCOMBINETYPE, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE;
......@@ -1359,7 +1359,7 @@ DECLARE_INTERFACE_(IDirect3DRMFrame2,IDirect3DRMFrame)
D3DRMFRAMECONSTRAINT constraint) PURE;
STDMETHOD(Move)(THIS_ D3DVALUE delta) PURE;
STDMETHOD(DeleteChild)(THIS_ IDirect3DRMFrame *child) PURE;
STDMETHOD(DeleteLight)(THIS_ LPDIRECT3DRMLIGHT) PURE;
STDMETHOD(DeleteLight)(THIS_ struct IDirect3DRMLight *light) PURE;
STDMETHOD(DeleteMoveCallback)(THIS_ D3DRMFRAMEMOVECALLBACK, VOID *arg) PURE;
STDMETHOD(DeleteVisual)(THIS_ IDirect3DRMVisual *visual) PURE;
STDMETHOD_(D3DCOLOR, GetSceneBackground)(THIS) PURE;
......@@ -1612,7 +1612,7 @@ DECLARE_INTERFACE_(IDirect3DRMFrame3,IDirect3DRMVisual)
STDMETHOD(GetClassName)(THIS_ LPDWORD lpdwSize, LPSTR lpName) PURE;
/*** IDirect3DRMFrame3 methods ***/
STDMETHOD(AddChild)(THIS_ IDirect3DRMFrame3 *child) PURE;
STDMETHOD(AddLight)(THIS_ LPDIRECT3DRMLIGHT) PURE;
STDMETHOD(AddLight)(THIS_ struct IDirect3DRMLight *light) PURE;
STDMETHOD(AddMoveCallback)(THIS_ D3DRMFRAME3MOVECALLBACK, VOID *arg, DWORD flags) PURE;
STDMETHOD(AddTransform)(THIS_ D3DRMCOMBINETYPE, D3DRMMATRIX4D) PURE;
STDMETHOD(AddTranslation)(THIS_ D3DRMCOMBINETYPE, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE;
......@@ -1640,7 +1640,7 @@ DECLARE_INTERFACE_(IDirect3DRMFrame3,IDirect3DRMVisual)
D3DRMFRAMECONSTRAINT constraint) PURE;
STDMETHOD(Move)(THIS_ D3DVALUE delta) PURE;
STDMETHOD(DeleteChild)(THIS_ IDirect3DRMFrame3 *child) PURE;
STDMETHOD(DeleteLight)(THIS_ LPDIRECT3DRMLIGHT) PURE;
STDMETHOD(DeleteLight)(THIS_ struct IDirect3DRMLight *light) PURE;
STDMETHOD(DeleteMoveCallback)(THIS_ D3DRMFRAME3MOVECALLBACK, VOID *arg) PURE;
STDMETHOD(DeleteVisual)(THIS_ LPUNKNOWN) PURE;
STDMETHOD_(D3DCOLOR, GetSceneBackground)(THIS) PURE;
......@@ -2193,13 +2193,13 @@ DECLARE_INTERFACE_(IDirect3DRMShadow2,IDirect3DRMVisual)
STDMETHOD(GetName)(THIS_ LPDWORD lpdwSize, LPSTR lpName) PURE;
STDMETHOD(GetClassName)(THIS_ LPDWORD lpdwSize, LPSTR lpName) PURE;
/*** IDirect3DRMShadow methods ***/
STDMETHOD(Init)(THIS_ LPUNKNOWN pUNK, LPDIRECT3DRMLIGHT light,
D3DVALUE px, D3DVALUE py, D3DVALUE pz, D3DVALUE nx, D3DVALUE ny, D3DVALUE nz) PURE;
STDMETHOD(Init)(THIS_ IUnknown *object, struct IDirect3DRMLight *light,
D3DVALUE px, D3DVALUE py, D3DVALUE pz, D3DVALUE nx, D3DVALUE ny, D3DVALUE nz) PURE;
/*** IDirect3DRMShadow2 methods ***/
STDMETHOD(GetVisual)(THIS_ IDirect3DRMVisual **visual) PURE;
STDMETHOD(SetVisual)(THIS_ LPUNKNOWN pUNK, DWORD) PURE;
STDMETHOD(GetLight)(THIS_ LPDIRECT3DRMLIGHT *) PURE;
STDMETHOD(SetLight)(THIS_ LPDIRECT3DRMLIGHT, DWORD) PURE;
STDMETHOD(GetLight)(THIS_ struct IDirect3DRMLight **light) PURE;
STDMETHOD(SetLight)(THIS_ struct IDirect3DRMLight *light, DWORD flags) PURE;
STDMETHOD(GetPlane)(THIS_ D3DVALUE *px, D3DVALUE *py, D3DVALUE *pz,
D3DVALUE *nx, D3DVALUE *ny, D3DVALUE *nz) PURE;
STDMETHOD(SetPlane)(THIS_ D3DVALUE px, D3DVALUE py, D3DVALUE pz,
......@@ -4444,7 +4444,7 @@ DECLARE_INTERFACE_(IDirect3DRMLightArray, IDirect3DRMArray)
/*** IDirect3DRMArray methods ***/
STDMETHOD_(DWORD, GetSize)(THIS) PURE;
/*** IDirect3DRMLightArray methods ***/
STDMETHOD(GetElement)(THIS_ DWORD index, LPDIRECT3DRMLIGHT *) PURE;
STDMETHOD(GetElement)(THIS_ DWORD index, IDirect3DRMLight **element) PURE;
};
#undef INTERFACE
......
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