2010-01-07 22:43:25 +01:00
|
|
|
/*
|
|
|
|
* Implementation of IDirect3DRM Interface
|
|
|
|
*
|
2012-05-15 08:08:40 +02:00
|
|
|
* Copyright 2010, 2012 Christian Costa
|
2011-12-29 02:26:40 +01:00
|
|
|
* Copyright 2011 André Hentschel
|
2010-01-07 22:43:25 +01:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "wine/debug.h"
|
|
|
|
|
|
|
|
#define COBJMACROS
|
|
|
|
|
|
|
|
#include "winbase.h"
|
|
|
|
#include "wingdi.h"
|
2012-03-26 22:35:21 +02:00
|
|
|
#include "dxfile.h"
|
|
|
|
#include "rmxfguid.h"
|
2010-01-07 22:43:25 +01:00
|
|
|
|
|
|
|
#include "d3drm_private.h"
|
|
|
|
|
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(d3drm);
|
|
|
|
|
2012-03-26 22:35:21 +02:00
|
|
|
static const char* get_IID_string(const GUID* guid)
|
|
|
|
{
|
|
|
|
if (IsEqualGUID(guid, &IID_IDirect3DRMFrame))
|
|
|
|
return "IID_IDirect3DRMFrame";
|
|
|
|
else if (IsEqualGUID(guid, &IID_IDirect3DRMFrame2))
|
|
|
|
return "IID_IDirect3DRMFrame2";
|
|
|
|
else if (IsEqualGUID(guid, &IID_IDirect3DRMFrame3))
|
|
|
|
return "IID_IDirect3DRMFrame3";
|
|
|
|
else if (IsEqualGUID(guid, &IID_IDirect3DRMMeshBuilder))
|
|
|
|
return "IID_IDirect3DRMMeshBuilder";
|
|
|
|
else if (IsEqualGUID(guid, &IID_IDirect3DRMMeshBuilder2))
|
|
|
|
return "IID_IDirect3DRMMeshBuilder2";
|
|
|
|
else if (IsEqualGUID(guid, &IID_IDirect3DRMMeshBuilder3))
|
|
|
|
return "IID_IDirect3DRMMeshBuilder3";
|
|
|
|
|
|
|
|
return "?";
|
|
|
|
}
|
|
|
|
|
2010-01-07 22:43:25 +01:00
|
|
|
typedef struct {
|
2010-11-29 00:55:07 +01:00
|
|
|
IDirect3DRM IDirect3DRM_iface;
|
2011-12-27 23:16:10 +01:00
|
|
|
IDirect3DRM2 IDirect3DRM2_iface;
|
2011-12-29 02:26:40 +01:00
|
|
|
IDirect3DRM3 IDirect3DRM3_iface;
|
2010-01-07 22:43:25 +01:00
|
|
|
LONG ref;
|
|
|
|
} IDirect3DRMImpl;
|
|
|
|
|
2010-11-29 00:55:07 +01:00
|
|
|
static inline IDirect3DRMImpl *impl_from_IDirect3DRM(IDirect3DRM *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, IDirect3DRMImpl, IDirect3DRM_iface);
|
|
|
|
}
|
|
|
|
|
2011-12-27 23:16:10 +01:00
|
|
|
static inline IDirect3DRMImpl *impl_from_IDirect3DRM2(IDirect3DRM2 *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, IDirect3DRMImpl, IDirect3DRM2_iface);
|
|
|
|
}
|
|
|
|
|
2011-12-29 02:26:40 +01:00
|
|
|
static inline IDirect3DRMImpl *impl_from_IDirect3DRM3(IDirect3DRM3 *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, IDirect3DRMImpl, IDirect3DRM3_iface);
|
|
|
|
}
|
|
|
|
|
2010-01-07 22:43:25 +01:00
|
|
|
/*** IUnknown methods ***/
|
|
|
|
static HRESULT WINAPI IDirect3DRMImpl_QueryInterface(IDirect3DRM* iface, REFIID riid, void** ppvObject)
|
|
|
|
{
|
2010-11-29 00:55:07 +01:00
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM(iface);
|
2010-01-07 22:43:25 +01:00
|
|
|
|
|
|
|
TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ppvObject);
|
|
|
|
|
2011-12-27 23:16:10 +01:00
|
|
|
*ppvObject = NULL;
|
|
|
|
|
|
|
|
if(IsEqualGUID(riid, &IID_IUnknown) ||
|
|
|
|
IsEqualGUID(riid, &IID_IDirect3DRM))
|
2010-01-07 22:43:25 +01:00
|
|
|
{
|
2011-12-27 23:16:10 +01:00
|
|
|
*ppvObject = &This->IDirect3DRM_iface;
|
|
|
|
}
|
|
|
|
else if(IsEqualGUID(riid, &IID_IDirect3DRM2))
|
|
|
|
{
|
|
|
|
*ppvObject = &This->IDirect3DRM2_iface;
|
|
|
|
}
|
2011-12-29 02:26:40 +01:00
|
|
|
else if(IsEqualGUID(riid, &IID_IDirect3DRM3))
|
|
|
|
{
|
|
|
|
*ppvObject = &This->IDirect3DRM3_iface;
|
|
|
|
}
|
2011-12-27 23:16:10 +01:00
|
|
|
else
|
|
|
|
{
|
|
|
|
FIXME("interface %s not implemented\n", debugstr_guid(riid));
|
|
|
|
return E_NOINTERFACE;
|
2010-01-07 22:43:25 +01:00
|
|
|
}
|
|
|
|
|
2011-12-27 23:16:10 +01:00
|
|
|
IDirect3DRM_AddRef(iface);
|
|
|
|
return S_OK;
|
2010-01-07 22:43:25 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI IDirect3DRMImpl_AddRef(IDirect3DRM* iface)
|
|
|
|
{
|
2010-11-29 00:55:07 +01:00
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM(iface);
|
2012-03-16 08:16:10 +01:00
|
|
|
ULONG ref = InterlockedIncrement(&This->ref);
|
2010-01-07 22:43:25 +01:00
|
|
|
|
2012-03-16 08:16:10 +01:00
|
|
|
TRACE("(%p/%p)->(): new ref = %d\n", iface, This, ref);
|
2010-01-07 22:43:25 +01:00
|
|
|
|
2012-03-16 08:16:10 +01:00
|
|
|
return ref;
|
2010-01-07 22:43:25 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI IDirect3DRMImpl_Release(IDirect3DRM* iface)
|
|
|
|
{
|
2010-11-29 00:55:07 +01:00
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM(iface);
|
2010-01-07 22:43:25 +01:00
|
|
|
ULONG ref = InterlockedDecrement(&This->ref);
|
|
|
|
|
2012-03-16 08:16:10 +01:00
|
|
|
TRACE("(%p/%p)->(): new ref = %d\n", iface, This, ref);
|
2010-01-07 22:43:25 +01:00
|
|
|
|
|
|
|
if (!ref)
|
|
|
|
HeapFree(GetProcessHeap(), 0, This);
|
|
|
|
|
|
|
|
return ref;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*** IDirect3DRM methods ***/
|
|
|
|
static HRESULT WINAPI IDirect3DRMImpl_CreateObject(IDirect3DRM* iface, REFCLSID rclsid, LPUNKNOWN pUnkOuter, REFIID riid, LPVOID *ppvObj)
|
|
|
|
{
|
2010-11-29 00:55:07 +01:00
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM(iface);
|
2010-01-07 22:43:25 +01:00
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%s,%p,%s,%p): stub\n", iface, This, debugstr_guid(rclsid), pUnkOuter, debugstr_guid(riid), ppvObj);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-04-19 08:34:15 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMImpl_CreateFrame(IDirect3DRM *iface,
|
|
|
|
IDirect3DRMFrame *parent_frame, IDirect3DRMFrame **frame)
|
2010-01-07 22:43:25 +01:00
|
|
|
{
|
2013-04-19 08:34:15 +02:00
|
|
|
TRACE("iface %p, parent_frame %p, frame %p.\n", iface, parent_frame, frame);
|
2010-01-07 22:43:25 +01:00
|
|
|
|
2013-04-19 08:34:15 +02:00
|
|
|
return Direct3DRMFrame_create(&IID_IDirect3DRMFrame, (IUnknown *)parent_frame, (IUnknown **)frame);
|
2010-01-07 22:43:25 +01:00
|
|
|
}
|
|
|
|
|
2013-04-22 15:18:46 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMImpl_CreateMesh(IDirect3DRM *iface, IDirect3DRMMesh **mesh)
|
2010-01-07 22:43:25 +01:00
|
|
|
{
|
2013-04-22 15:18:46 +02:00
|
|
|
IDirect3DRMImpl *d3drm = impl_from_IDirect3DRM(iface);
|
2010-01-07 22:43:25 +01:00
|
|
|
|
2013-04-22 15:18:46 +02:00
|
|
|
TRACE("iface %p, mesh %p.\n", iface, mesh);
|
2010-01-07 22:43:25 +01:00
|
|
|
|
2013-04-22 15:18:46 +02:00
|
|
|
return IDirect3DRM3_CreateMesh(&d3drm->IDirect3DRM3_iface, mesh);
|
2010-01-07 22:43:25 +01:00
|
|
|
}
|
|
|
|
|
2013-04-23 13:21:32 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMImpl_CreateMeshBuilder(IDirect3DRM *iface, IDirect3DRMMeshBuilder **mesh_builder)
|
2010-01-07 22:43:25 +01:00
|
|
|
{
|
2013-04-23 13:21:32 +02:00
|
|
|
TRACE("iface %p, mesh_builder %p.\n", iface, mesh_builder);
|
2010-01-07 22:43:25 +01:00
|
|
|
|
2013-04-23 13:21:32 +02:00
|
|
|
return Direct3DRMMeshBuilder_create(&IID_IDirect3DRMMeshBuilder, (IUnknown **)mesh_builder);
|
2010-01-07 22:43:25 +01:00
|
|
|
}
|
|
|
|
|
2013-04-25 09:59:44 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMImpl_CreateFace(IDirect3DRM* iface, IDirect3DRMFace **face)
|
2010-01-07 22:43:25 +01:00
|
|
|
{
|
2013-05-09 14:43:12 +02:00
|
|
|
TRACE("iface %p, face %p.\n", iface, face);
|
2010-01-07 22:43:25 +01:00
|
|
|
|
2013-05-09 14:43:39 +02:00
|
|
|
return Direct3DRMFace_create(&IID_IDirect3DRMFace, (IUnknown **)face);
|
2010-01-07 22:43:25 +01:00
|
|
|
}
|
|
|
|
|
2013-05-30 10:05:35 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMImpl_CreateAnimation(IDirect3DRM *iface, IDirect3DRMAnimation **animation)
|
2010-01-07 22:43:25 +01:00
|
|
|
{
|
2013-05-30 10:05:35 +02:00
|
|
|
FIXME("iface %p, animation %p stub!\n", iface, animation);
|
2010-01-07 22:43:25 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-05-30 22:34:18 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMImpl_CreateAnimationSet(IDirect3DRM *iface, IDirect3DRMAnimationSet **set)
|
2010-01-07 22:43:25 +01:00
|
|
|
{
|
2013-05-30 22:34:18 +02:00
|
|
|
FIXME("iface %p, set %p stub!\n", iface, set);
|
2010-01-07 22:43:25 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-01-28 11:15:36 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRMImpl_CreateTexture(IDirect3DRM *iface,
|
|
|
|
D3DRMIMAGE *image, IDirect3DRMTexture **texture)
|
2010-01-07 22:43:25 +01:00
|
|
|
{
|
2010-11-29 00:55:07 +01:00
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM(iface);
|
2010-01-07 22:43:25 +01:00
|
|
|
|
2013-01-28 11:15:36 +01:00
|
|
|
FIXME("(%p/%p)->(%p,%p): partial stub\n", iface, This, image, texture);
|
2010-01-07 22:43:25 +01:00
|
|
|
|
2013-01-28 11:15:36 +01:00
|
|
|
return Direct3DRMTexture_create(&IID_IDirect3DRMTexture, (IUnknown **)texture);
|
2010-01-07 22:43:25 +01:00
|
|
|
}
|
|
|
|
|
2013-04-25 09:59:46 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMImpl_CreateLight(IDirect3DRM *iface,
|
|
|
|
D3DRMLIGHTTYPE type, D3DCOLOR color, IDirect3DRMLight **light)
|
2010-01-07 22:43:25 +01:00
|
|
|
{
|
2013-04-25 09:59:46 +02:00
|
|
|
IDirect3DRMImpl *d3drm = impl_from_IDirect3DRM(iface);
|
2010-01-07 22:43:25 +01:00
|
|
|
|
2013-04-25 09:59:46 +02:00
|
|
|
TRACE("iface %p, type %#x, color 0x%08x, light %p.\n", iface, type, color, light);
|
2010-01-07 22:43:25 +01:00
|
|
|
|
2013-04-25 09:59:46 +02:00
|
|
|
return IDirect3DRM3_CreateLight(&d3drm->IDirect3DRM3_iface, type, color, light);
|
2010-01-07 22:43:25 +01:00
|
|
|
}
|
|
|
|
|
2013-04-25 09:59:46 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMImpl_CreateLightRGB(IDirect3DRM *iface, D3DRMLIGHTTYPE type,
|
|
|
|
D3DVALUE red, D3DVALUE green, D3DVALUE blue, IDirect3DRMLight **light)
|
2010-01-07 22:43:25 +01:00
|
|
|
{
|
2013-04-25 09:59:46 +02:00
|
|
|
IDirect3DRMImpl *d3drm = impl_from_IDirect3DRM(iface);
|
2010-01-07 22:43:25 +01:00
|
|
|
|
2013-04-25 09:59:46 +02:00
|
|
|
TRACE("iface %p, type %#x, red %.8e, green %.8e, blue %.8e, light %p.\n",
|
|
|
|
iface, type, red, green, blue, light);
|
2010-01-07 22:43:25 +01:00
|
|
|
|
2013-04-25 09:59:46 +02:00
|
|
|
return IDirect3DRM3_CreateLightRGB(&d3drm->IDirect3DRM3_iface, type, red, green, blue, light);
|
2010-01-07 22:43:25 +01:00
|
|
|
}
|
|
|
|
|
2013-05-28 08:55:21 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMImpl_CreateMaterial(IDirect3DRM *iface,
|
|
|
|
D3DVALUE power, IDirect3DRMMaterial **material)
|
2010-01-07 22:43:25 +01:00
|
|
|
{
|
2013-05-28 08:55:21 +02:00
|
|
|
IDirect3DRMImpl *d3drm = impl_from_IDirect3DRM(iface);
|
2010-01-07 22:43:25 +01:00
|
|
|
|
2013-05-28 08:55:21 +02:00
|
|
|
TRACE("iface %p, power %.8e, material %p.\n", iface, power, material);
|
2010-01-07 22:43:25 +01:00
|
|
|
|
2013-05-28 08:55:21 +02:00
|
|
|
return IDirect3DRM3_CreateMaterial(&d3drm->IDirect3DRM3_iface, power, (IDirect3DRMMaterial2 **)material);
|
2010-01-07 22:43:25 +01:00
|
|
|
}
|
|
|
|
|
2013-04-17 08:48:01 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMImpl_CreateDevice(IDirect3DRM *iface,
|
|
|
|
DWORD width, DWORD height, IDirect3DRMDevice **device)
|
2010-01-07 22:43:25 +01:00
|
|
|
{
|
2013-04-17 08:48:01 +02:00
|
|
|
FIXME("iface %p, width %u, height %u, device %p partial stub!\n", iface, width, height, device);
|
2010-01-07 22:43:25 +01:00
|
|
|
|
2013-04-17 08:48:01 +02:00
|
|
|
return Direct3DRMDevice_create(&IID_IDirect3DRMDevice, (IUnknown **)device);
|
2010-01-07 22:43:25 +01:00
|
|
|
}
|
|
|
|
|
2012-11-19 22:04:10 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRMImpl_CreateDeviceFromSurface(IDirect3DRM *iface, GUID *pGUID,
|
|
|
|
IDirectDraw *pDD, IDirectDrawSurface *pDDSBack, IDirect3DRMDevice **ppDevice)
|
2010-01-07 22:43:25 +01:00
|
|
|
{
|
2010-11-29 00:55:07 +01:00
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM(iface);
|
2010-01-07 22:43:25 +01:00
|
|
|
|
2012-01-13 00:18:59 +01:00
|
|
|
FIXME("(%p/%p)->(%s,%p,%p,%p): partial stub\n", iface, This, debugstr_guid(pGUID), pDD,
|
|
|
|
pDDSBack, ppDevice);
|
2010-01-07 22:43:25 +01:00
|
|
|
|
2012-01-15 17:01:09 +01:00
|
|
|
return Direct3DRMDevice_create(&IID_IDirect3DRMDevice, (IUnknown**)ppDevice);
|
2010-01-07 22:43:25 +01:00
|
|
|
}
|
|
|
|
|
2012-11-20 22:40:20 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRMImpl_CreateDeviceFromD3D(IDirect3DRM *iface,
|
|
|
|
IDirect3D *pD3D, IDirect3DDevice *pD3DDev, IDirect3DRMDevice **ppDevice)
|
2010-01-07 22:43:25 +01:00
|
|
|
{
|
2010-11-29 00:55:07 +01:00
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM(iface);
|
2010-01-07 22:43:25 +01:00
|
|
|
|
2012-01-13 00:18:59 +01:00
|
|
|
FIXME("(%p/%p)->(%p,%p,%p): partial stub\n", iface, This, pD3D, pD3DDev, ppDevice);
|
2010-01-07 22:43:25 +01:00
|
|
|
|
2012-01-15 17:01:09 +01:00
|
|
|
return Direct3DRMDevice_create(&IID_IDirect3DRMDevice, (IUnknown**)ppDevice);
|
2010-01-07 22:43:25 +01:00
|
|
|
}
|
|
|
|
|
2012-11-19 22:04:11 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRMImpl_CreateDeviceFromClipper(IDirect3DRM *iface,
|
|
|
|
IDirectDrawClipper *pDDClipper, GUID *pGUID, int width, int height,
|
|
|
|
IDirect3DRMDevice **ppDevice)
|
2010-01-07 22:43:25 +01:00
|
|
|
{
|
2010-11-29 00:55:07 +01:00
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM(iface);
|
2010-01-07 22:43:25 +01:00
|
|
|
|
2012-01-13 00:18:59 +01:00
|
|
|
FIXME("(%p/%p)->(%p,%s,%d,%d,%p): partial stub\n", iface, This, pDDClipper,
|
|
|
|
debugstr_guid(pGUID), width, height, ppDevice);
|
2010-01-07 22:43:25 +01:00
|
|
|
|
2012-01-15 17:01:09 +01:00
|
|
|
return Direct3DRMDevice_create(&IID_IDirect3DRMDevice, (IUnknown**)ppDevice);
|
2010-01-07 22:43:25 +01:00
|
|
|
}
|
|
|
|
|
2012-11-19 22:04:10 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRMImpl_CreateTextureFromSurface(IDirect3DRM *iface,
|
|
|
|
IDirectDrawSurface *pDDS, IDirect3DRMTexture **ppTexture)
|
2010-01-07 22:43:25 +01:00
|
|
|
{
|
2010-11-29 00:55:07 +01:00
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM(iface);
|
2010-01-07 22:43:25 +01:00
|
|
|
|
2011-12-25 19:27:35 +01:00
|
|
|
FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, pDDS, ppTexture);
|
2010-01-07 22:43:25 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-04-22 15:18:45 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMImpl_CreateShadow(IDirect3DRM *iface, IDirect3DRMVisual *visual,
|
|
|
|
IDirect3DRMLight *light, D3DVALUE px, D3DVALUE py, D3DVALUE pz, D3DVALUE nx, D3DVALUE ny, D3DVALUE nz,
|
|
|
|
IDirect3DRMVisual **shadow)
|
2010-01-07 22:43:25 +01:00
|
|
|
{
|
2013-04-22 15:18:45 +02:00
|
|
|
FIXME("iface %p, visual %p, light %p, px %.8e, py %.8e, pz %.8e, nx %.8e, ny %.8e, nz %.8e, shadow %p stub!\n",
|
|
|
|
iface, visual, light, px, py, pz, nx, ny, nz, shadow);
|
2010-01-07 22:43:25 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-04-17 08:48:01 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMImpl_CreateViewport(IDirect3DRM *iface, IDirect3DRMDevice *device,
|
|
|
|
IDirect3DRMFrame *camera, DWORD x, DWORD y, DWORD width, DWORD height, IDirect3DRMViewport **viewport)
|
2010-01-07 22:43:25 +01:00
|
|
|
{
|
2013-04-17 08:48:01 +02:00
|
|
|
FIXME("iface %p, device %p, camera %p, x %u, y %u, width %u, height %u, viewport %p partial stub!\n",
|
|
|
|
iface, device, camera, x, y, width, height, viewport);
|
2010-01-07 22:43:25 +01:00
|
|
|
|
2013-04-17 08:48:01 +02:00
|
|
|
return Direct3DRMViewport_create(&IID_IDirect3DRMViewport, (IUnknown **)viewport);
|
2010-01-07 22:43:25 +01:00
|
|
|
}
|
|
|
|
|
2013-04-19 08:34:15 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMImpl_CreateWrap(IDirect3DRM *iface, D3DRMWRAPTYPE type, IDirect3DRMFrame *frame,
|
|
|
|
D3DVALUE ox, D3DVALUE oy, D3DVALUE oz, D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
|
|
|
|
D3DVALUE ux, D3DVALUE uy, D3DVALUE uz, D3DVALUE ou, D3DVALUE ov, D3DVALUE su, D3DVALUE sv,
|
|
|
|
IDirect3DRMWrap **wrap)
|
2010-01-07 22:43:25 +01:00
|
|
|
{
|
2013-04-19 08:34:15 +02:00
|
|
|
FIXME("iface %p, type %#x, frame %p, ox %.8e, oy %.8e, oz %.8e, dx %.8e, dy %.8e, dz %.8e, "
|
|
|
|
"ux %.8e, uy %.8e, uz %.8e, ou %.8e, ov %.8e, su %.8e, sv %.8e, wrap %p stub!\n",
|
|
|
|
iface, type, frame, ox, oy, oz, dx, dy, dz, ux, uy, uz, ou, ov, su, sv, wrap);
|
2010-01-07 22:43:25 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-06-03 09:19:36 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMImpl_CreateUserVisual(IDirect3DRM *iface,
|
|
|
|
D3DRMUSERVISUALCALLBACK cb, void *ctx, IDirect3DRMUserVisual **visual)
|
2010-01-07 22:43:25 +01:00
|
|
|
{
|
2013-06-03 09:19:36 +02:00
|
|
|
FIXME("iface %p, cb %p, ctx %p visual %p stub!\n", iface, cb, ctx, visual);
|
2010-01-07 22:43:25 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-05-27 09:22:51 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMImpl_LoadTexture(IDirect3DRM *iface,
|
|
|
|
const char *filename, IDirect3DRMTexture **texture)
|
2010-01-07 22:43:25 +01:00
|
|
|
{
|
2013-05-27 09:22:51 +02:00
|
|
|
FIXME("iface %p, filename %s, texture %p stub!\n", iface, debugstr_a(filename), texture);
|
2010-01-07 22:43:25 +01:00
|
|
|
|
2013-05-27 09:22:51 +02:00
|
|
|
return Direct3DRMTexture_create(&IID_IDirect3DRMTexture, (IUnknown **)texture);
|
2010-01-07 22:43:25 +01:00
|
|
|
}
|
|
|
|
|
2013-05-27 09:22:51 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMImpl_LoadTextureFromResource(IDirect3DRM *iface,
|
|
|
|
HRSRC resource, IDirect3DRMTexture **texture)
|
2010-01-07 22:43:25 +01:00
|
|
|
{
|
2013-05-27 09:22:51 +02:00
|
|
|
FIXME("iface %p, resource %p, texture %p stub!\n", iface, resource, texture);
|
2010-01-07 22:43:25 +01:00
|
|
|
|
2013-05-27 09:22:51 +02:00
|
|
|
return Direct3DRMTexture_create(&IID_IDirect3DRMTexture, (IUnknown **)texture);
|
2010-01-07 22:43:25 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMImpl_SetSearchPath(IDirect3DRM* iface, LPCSTR path)
|
|
|
|
{
|
2010-11-29 00:55:07 +01:00
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM(iface);
|
2010-01-07 22:43:25 +01:00
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%s): stub\n", iface, This, path);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMImpl_AddSearchPath(IDirect3DRM* iface, LPCSTR path)
|
|
|
|
{
|
2010-11-29 00:55:07 +01:00
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM(iface);
|
2010-01-07 22:43:25 +01:00
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%s): stub\n", iface, This, path);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMImpl_GetSearchPath(IDirect3DRM* iface, DWORD *size_return, LPSTR path_return)
|
|
|
|
{
|
2010-11-29 00:55:07 +01:00
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM(iface);
|
2010-01-07 22:43:25 +01:00
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p,%s): stub\n", iface, This, size_return, path_return);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMImpl_SetDefaultTextureColors(IDirect3DRM* iface, DWORD nb_colors)
|
|
|
|
{
|
2010-11-29 00:55:07 +01:00
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM(iface);
|
2010-01-07 22:43:25 +01:00
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%d): stub\n", iface, This, nb_colors);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMImpl_SetDefaultTextureShades(IDirect3DRM* iface, DWORD nb_shades)
|
|
|
|
{
|
2010-11-29 00:55:07 +01:00
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM(iface);
|
2010-01-07 22:43:25 +01:00
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%d): stub\n", iface, This, nb_shades);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-06-04 09:57:09 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMImpl_GetDevices(IDirect3DRM *iface, IDirect3DRMDeviceArray **array)
|
2010-01-07 22:43:25 +01:00
|
|
|
{
|
2013-06-04 09:57:09 +02:00
|
|
|
FIXME("iface %p, array %p stub!\n", iface, array);
|
2010-01-07 22:43:25 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-04-17 08:48:00 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMImpl_GetNamedObject(IDirect3DRM *iface,
|
|
|
|
const char *name, IDirect3DRMObject **object)
|
2010-01-07 22:43:25 +01:00
|
|
|
{
|
2013-04-17 08:48:00 +02:00
|
|
|
FIXME("iface %p, name %s, object %p stub!\n", iface, debugstr_a(name), object);
|
2010-01-07 22:43:25 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMImpl_EnumerateObjects(IDirect3DRM* iface, D3DRMOBJECTCALLBACK cb, LPVOID pArg)
|
|
|
|
{
|
2010-11-29 00:55:07 +01:00
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM(iface);
|
2010-01-07 22:43:25 +01:00
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, cb, pArg);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-04-19 08:34:15 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMImpl_Load(IDirect3DRM *iface, void *source, void *object_id, IID **iids,
|
|
|
|
DWORD iid_count, D3DRMLOADOPTIONS flags, D3DRMLOADCALLBACK load_cb, void *load_ctx,
|
|
|
|
D3DRMLOADTEXTURECALLBACK load_tex_cb, void *load_tex_ctx, IDirect3DRMFrame *parent_frame)
|
2010-01-07 22:43:25 +01:00
|
|
|
{
|
2013-04-19 08:34:15 +02:00
|
|
|
IDirect3DRMImpl *d3drm = impl_from_IDirect3DRM(iface);
|
|
|
|
IDirect3DRMFrame3 *parent_frame3 = NULL;
|
2012-03-26 22:35:21 +02:00
|
|
|
HRESULT hr = D3DRM_OK;
|
2010-01-07 22:43:25 +01:00
|
|
|
|
2013-04-19 08:34:15 +02:00
|
|
|
TRACE("iface %p, source %p, object_id %p, iids %p, iid_count %u, flags %#x, "
|
|
|
|
"load_cb %p, load_ctx %p, load_tex_cb %p, load_tex_ctx %p, parent_frame %p.\n",
|
|
|
|
iface, source, object_id, iids, iid_count, flags,
|
|
|
|
load_cb, load_ctx, load_tex_cb, load_tex_ctx, parent_frame);
|
2010-01-07 22:43:25 +01:00
|
|
|
|
2013-04-19 08:34:15 +02:00
|
|
|
if (parent_frame)
|
|
|
|
hr = IDirect3DRMFrame_QueryInterface(parent_frame, &IID_IDirect3DRMFrame3, (void **)&parent_frame3);
|
2012-03-26 22:35:21 +02:00
|
|
|
if (SUCCEEDED(hr))
|
2013-04-19 08:34:15 +02:00
|
|
|
hr = IDirect3DRM3_Load(&d3drm->IDirect3DRM3_iface, source, object_id, iids, iid_count,
|
|
|
|
flags, load_cb, load_ctx, load_tex_cb, load_tex_ctx, parent_frame3);
|
|
|
|
if (parent_frame3)
|
|
|
|
IDirect3DRMFrame3_Release(parent_frame3);
|
2012-03-26 22:35:21 +02:00
|
|
|
|
|
|
|
return hr;
|
2010-01-07 22:43:25 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMImpl_Tick(IDirect3DRM* iface, D3DVALUE tick)
|
|
|
|
{
|
2010-11-29 00:55:07 +01:00
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM(iface);
|
2010-01-07 22:43:25 +01:00
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%f): stub\n", iface, This, tick);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const struct IDirect3DRMVtbl Direct3DRM_Vtbl =
|
|
|
|
{
|
|
|
|
IDirect3DRMImpl_QueryInterface,
|
|
|
|
IDirect3DRMImpl_AddRef,
|
|
|
|
IDirect3DRMImpl_Release,
|
|
|
|
IDirect3DRMImpl_CreateObject,
|
|
|
|
IDirect3DRMImpl_CreateFrame,
|
|
|
|
IDirect3DRMImpl_CreateMesh,
|
|
|
|
IDirect3DRMImpl_CreateMeshBuilder,
|
|
|
|
IDirect3DRMImpl_CreateFace,
|
|
|
|
IDirect3DRMImpl_CreateAnimation,
|
|
|
|
IDirect3DRMImpl_CreateAnimationSet,
|
|
|
|
IDirect3DRMImpl_CreateTexture,
|
|
|
|
IDirect3DRMImpl_CreateLight,
|
|
|
|
IDirect3DRMImpl_CreateLightRGB,
|
2012-05-22 22:05:16 +02:00
|
|
|
IDirect3DRMImpl_CreateMaterial,
|
2010-01-07 22:43:25 +01:00
|
|
|
IDirect3DRMImpl_CreateDevice,
|
|
|
|
IDirect3DRMImpl_CreateDeviceFromSurface,
|
|
|
|
IDirect3DRMImpl_CreateDeviceFromD3D,
|
|
|
|
IDirect3DRMImpl_CreateDeviceFromClipper,
|
|
|
|
IDirect3DRMImpl_CreateTextureFromSurface,
|
2011-12-25 19:27:35 +01:00
|
|
|
IDirect3DRMImpl_CreateShadow,
|
2010-01-07 22:43:25 +01:00
|
|
|
IDirect3DRMImpl_CreateViewport,
|
|
|
|
IDirect3DRMImpl_CreateWrap,
|
|
|
|
IDirect3DRMImpl_CreateUserVisual,
|
|
|
|
IDirect3DRMImpl_LoadTexture,
|
|
|
|
IDirect3DRMImpl_LoadTextureFromResource,
|
|
|
|
IDirect3DRMImpl_SetSearchPath,
|
|
|
|
IDirect3DRMImpl_AddSearchPath,
|
|
|
|
IDirect3DRMImpl_GetSearchPath,
|
|
|
|
IDirect3DRMImpl_SetDefaultTextureColors,
|
|
|
|
IDirect3DRMImpl_SetDefaultTextureShades,
|
|
|
|
IDirect3DRMImpl_GetDevices,
|
|
|
|
IDirect3DRMImpl_GetNamedObject,
|
|
|
|
IDirect3DRMImpl_EnumerateObjects,
|
|
|
|
IDirect3DRMImpl_Load,
|
|
|
|
IDirect3DRMImpl_Tick
|
|
|
|
};
|
2011-12-27 23:16:10 +01:00
|
|
|
|
|
|
|
|
|
|
|
/*** IUnknown methods ***/
|
|
|
|
static HRESULT WINAPI IDirect3DRM2Impl_QueryInterface(IDirect3DRM2* iface, REFIID riid,
|
|
|
|
void** ppvObject)
|
|
|
|
{
|
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM2(iface);
|
|
|
|
return IDirect3DRM_QueryInterface(&This->IDirect3DRM_iface, riid, ppvObject);
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI IDirect3DRM2Impl_AddRef(IDirect3DRM2* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM2(iface);
|
2012-01-19 22:06:08 +01:00
|
|
|
return IDirect3DRM_AddRef(&This->IDirect3DRM_iface);
|
2011-12-27 23:16:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI IDirect3DRM2Impl_Release(IDirect3DRM2* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM2(iface);
|
2012-01-19 22:06:08 +01:00
|
|
|
return IDirect3DRM_Release(&This->IDirect3DRM_iface);
|
2011-12-27 23:16:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/*** IDirect3DRM2 methods ***/
|
|
|
|
static HRESULT WINAPI IDirect3DRM2Impl_CreateObject(IDirect3DRM2* iface, REFCLSID rclsid,
|
|
|
|
LPUNKNOWN pUnkOuter, REFIID riid,
|
|
|
|
LPVOID *ppvObj)
|
|
|
|
{
|
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%s,%p,%s,%p): stub\n", iface, This, debugstr_guid(rclsid), pUnkOuter,
|
|
|
|
debugstr_guid(riid), ppvObj);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-04-19 08:34:15 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRM2Impl_CreateFrame(IDirect3DRM2 *iface,
|
|
|
|
IDirect3DRMFrame *parent_frame, IDirect3DRMFrame2 **frame)
|
2011-12-27 23:16:10 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM2(iface);
|
|
|
|
|
2012-05-17 10:10:07 +02:00
|
|
|
TRACE("(%p/%p)->(%p,%p)\n", iface, This, parent_frame, frame);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-05-17 10:10:07 +02:00
|
|
|
return Direct3DRMFrame_create(&IID_IDirect3DRMFrame2, (IUnknown*)parent_frame, (IUnknown**)frame);
|
2011-12-27 23:16:10 +01:00
|
|
|
}
|
|
|
|
|
2013-04-22 15:18:46 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRM2Impl_CreateMesh(IDirect3DRM2 *iface, IDirect3DRMMesh **mesh)
|
2011-12-27 23:16:10 +01:00
|
|
|
{
|
2013-04-22 15:18:46 +02:00
|
|
|
IDirect3DRMImpl *d3drm = impl_from_IDirect3DRM2(iface);
|
2011-12-27 23:16:10 +01:00
|
|
|
|
2013-04-22 15:18:46 +02:00
|
|
|
TRACE("iface %p, mesh %p.\n", iface, mesh);
|
2011-12-27 23:16:10 +01:00
|
|
|
|
2013-04-22 15:18:46 +02:00
|
|
|
return IDirect3DRM3_CreateMesh(&d3drm->IDirect3DRM3_iface, mesh);
|
2011-12-27 23:16:10 +01:00
|
|
|
}
|
|
|
|
|
2013-04-23 13:21:33 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRM2Impl_CreateMeshBuilder(IDirect3DRM2 *iface, IDirect3DRMMeshBuilder2 **mesh_builder)
|
2011-12-27 23:16:10 +01:00
|
|
|
{
|
2013-04-23 13:21:33 +02:00
|
|
|
TRACE("iface %p, mesh_builder %p.\n", iface, mesh_builder);
|
2011-12-27 23:16:10 +01:00
|
|
|
|
2013-04-23 13:21:33 +02:00
|
|
|
return Direct3DRMMeshBuilder_create(&IID_IDirect3DRMMeshBuilder2, (IUnknown **)mesh_builder);
|
2011-12-27 23:16:10 +01:00
|
|
|
}
|
|
|
|
|
2013-04-25 09:59:44 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRM2Impl_CreateFace(IDirect3DRM2 *iface, IDirect3DRMFace **face)
|
2011-12-27 23:16:10 +01:00
|
|
|
{
|
2013-05-09 14:43:12 +02:00
|
|
|
TRACE("iface %p, face %p.\n", iface, face);
|
2011-12-27 23:16:10 +01:00
|
|
|
|
2013-05-09 14:43:39 +02:00
|
|
|
return Direct3DRMFace_create(&IID_IDirect3DRMFace, (IUnknown **)face);
|
2011-12-27 23:16:10 +01:00
|
|
|
}
|
|
|
|
|
2013-05-30 10:05:35 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRM2Impl_CreateAnimation(IDirect3DRM2 *iface, IDirect3DRMAnimation **animation)
|
2011-12-27 23:16:10 +01:00
|
|
|
{
|
2013-05-30 10:05:35 +02:00
|
|
|
FIXME("iface %p, animation %p stub!\n", iface, animation);
|
2011-12-27 23:16:10 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-05-30 22:34:18 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRM2Impl_CreateAnimationSet(IDirect3DRM2 *iface, IDirect3DRMAnimationSet **set)
|
2011-12-27 23:16:10 +01:00
|
|
|
{
|
2013-05-30 22:34:18 +02:00
|
|
|
FIXME("iface %p, set %p stub!\n", iface, set);
|
2011-12-27 23:16:10 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-01-28 11:15:36 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRM2Impl_CreateTexture(IDirect3DRM2 *iface,
|
|
|
|
D3DRMIMAGE *image, IDirect3DRMTexture2 **texture)
|
2011-12-27 23:16:10 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM2(iface);
|
|
|
|
|
2013-01-28 11:15:36 +01:00
|
|
|
FIXME("(%p/%p)->(%p,%p): partial stub\n", iface, This, image, texture);
|
2011-12-27 23:16:10 +01:00
|
|
|
|
2013-01-28 11:15:36 +01:00
|
|
|
return Direct3DRMTexture_create(&IID_IDirect3DRMTexture2, (IUnknown **)texture);
|
2011-12-27 23:16:10 +01:00
|
|
|
}
|
|
|
|
|
2013-04-25 09:59:46 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRM2Impl_CreateLight(IDirect3DRM2 *iface,
|
|
|
|
D3DRMLIGHTTYPE type, D3DCOLOR color, IDirect3DRMLight **light)
|
2011-12-27 23:16:10 +01:00
|
|
|
{
|
2013-04-25 09:59:46 +02:00
|
|
|
IDirect3DRMImpl *d3drm = impl_from_IDirect3DRM2(iface);
|
2011-12-27 23:16:10 +01:00
|
|
|
|
2013-04-25 09:59:46 +02:00
|
|
|
TRACE("iface %p, type %#x, color 0x%08x, light %p.\n", iface, type, color, light);
|
2011-12-27 23:16:10 +01:00
|
|
|
|
2013-04-25 09:59:46 +02:00
|
|
|
return IDirect3DRM3_CreateLight(&d3drm->IDirect3DRM3_iface, type, color, light);
|
2011-12-27 23:16:10 +01:00
|
|
|
}
|
|
|
|
|
2013-04-25 09:59:46 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRM2Impl_CreateLightRGB(IDirect3DRM2 *iface, D3DRMLIGHTTYPE type,
|
|
|
|
D3DVALUE red, D3DVALUE green, D3DVALUE blue, IDirect3DRMLight **light)
|
2011-12-27 23:16:10 +01:00
|
|
|
{
|
2013-04-25 09:59:46 +02:00
|
|
|
IDirect3DRMImpl *d3drm = impl_from_IDirect3DRM2(iface);
|
2011-12-27 23:16:10 +01:00
|
|
|
|
2013-04-25 09:59:46 +02:00
|
|
|
TRACE("iface %p, type %#x, red %.8e, green %.8e, blue %.8e, light %p.\n",
|
|
|
|
iface, type, red, green, blue, light);
|
2011-12-27 23:16:10 +01:00
|
|
|
|
2013-04-25 09:59:46 +02:00
|
|
|
return IDirect3DRM3_CreateLightRGB(&d3drm->IDirect3DRM3_iface, type, red, green, blue, light);
|
2011-12-27 23:16:10 +01:00
|
|
|
}
|
|
|
|
|
2013-05-28 08:55:21 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRM2Impl_CreateMaterial(IDirect3DRM2 *iface,
|
|
|
|
D3DVALUE power, IDirect3DRMMaterial **material)
|
2011-12-27 23:16:10 +01:00
|
|
|
{
|
2013-05-28 08:55:21 +02:00
|
|
|
IDirect3DRMImpl *d3drm = impl_from_IDirect3DRM2(iface);
|
2011-12-27 23:16:10 +01:00
|
|
|
|
2013-05-28 08:55:21 +02:00
|
|
|
TRACE("iface %p, power %.8e, material %p.\n", iface, power, material);
|
2011-12-27 23:16:10 +01:00
|
|
|
|
2013-05-28 08:55:21 +02:00
|
|
|
return IDirect3DRM3_CreateMaterial(&d3drm->IDirect3DRM3_iface, power, (IDirect3DRMMaterial2 **)material);
|
2011-12-27 23:16:10 +01:00
|
|
|
}
|
|
|
|
|
2013-04-18 09:35:14 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRM2Impl_CreateDevice(IDirect3DRM2 *iface,
|
|
|
|
DWORD width, DWORD height, IDirect3DRMDevice2 **device)
|
2011-12-27 23:16:10 +01:00
|
|
|
{
|
2013-04-18 09:35:14 +02:00
|
|
|
FIXME("iface %p, width %u, height %u, device %p.\n", iface, width, height, device);
|
2011-12-27 23:16:10 +01:00
|
|
|
|
2013-04-18 09:35:14 +02:00
|
|
|
return Direct3DRMDevice_create(&IID_IDirect3DRMDevice2, (IUnknown **)device);
|
2011-12-27 23:16:10 +01:00
|
|
|
}
|
|
|
|
|
2012-11-19 22:04:10 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRM2Impl_CreateDeviceFromSurface(IDirect3DRM2 *iface, GUID *pGUID,
|
|
|
|
IDirectDraw *pDD, IDirectDrawSurface *pDDSBack, IDirect3DRMDevice2 **ppDevice)
|
2011-12-27 23:16:10 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM2(iface);
|
|
|
|
|
2012-01-13 00:18:59 +01:00
|
|
|
FIXME("(%p/%p)->(%s,%p,%p,%p): partial stub\n", iface, This, debugstr_guid(pGUID),
|
|
|
|
pDD, pDDSBack, ppDevice);
|
2011-12-27 23:16:10 +01:00
|
|
|
|
2012-01-15 17:01:09 +01:00
|
|
|
return Direct3DRMDevice_create(&IID_IDirect3DRMDevice2, (IUnknown**)ppDevice);
|
2011-12-27 23:16:10 +01:00
|
|
|
}
|
|
|
|
|
2012-11-20 22:40:19 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRM2Impl_CreateDeviceFromD3D(IDirect3DRM2 *iface,
|
|
|
|
IDirect3D2 *pD3D, IDirect3DDevice2 *pD3DDev, IDirect3DRMDevice2 **ppDevice)
|
2011-12-27 23:16:10 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM2(iface);
|
|
|
|
|
2012-01-13 00:18:59 +01:00
|
|
|
FIXME("(%p/%p)->(%p,%p,%p): partial stub\n", iface, This, pD3D, pD3DDev, ppDevice);
|
2011-12-27 23:16:10 +01:00
|
|
|
|
2012-01-15 17:01:09 +01:00
|
|
|
return Direct3DRMDevice_create(&IID_IDirect3DRMDevice2, (IUnknown**)ppDevice);
|
2011-12-27 23:16:10 +01:00
|
|
|
}
|
|
|
|
|
2012-11-19 22:04:11 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRM2Impl_CreateDeviceFromClipper(IDirect3DRM2 *iface,
|
|
|
|
IDirectDrawClipper *pDDClipper, GUID *pGUID, int width, int height,
|
|
|
|
IDirect3DRMDevice2 **ppDevice)
|
2011-12-27 23:16:10 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM2(iface);
|
|
|
|
|
2012-01-13 00:18:59 +01:00
|
|
|
FIXME("(%p/%p)->(%p,%s,%d,%d,%p): partial stub\n", iface, This, pDDClipper,
|
|
|
|
debugstr_guid(pGUID), width, height, ppDevice);
|
2011-12-27 23:16:10 +01:00
|
|
|
|
2012-01-15 17:01:09 +01:00
|
|
|
return Direct3DRMDevice_create(&IID_IDirect3DRMDevice2, (IUnknown**)ppDevice);
|
2011-12-27 23:16:10 +01:00
|
|
|
}
|
|
|
|
|
2012-11-19 22:04:10 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRM2Impl_CreateTextureFromSurface(IDirect3DRM2 *iface,
|
|
|
|
IDirectDrawSurface *pDDS, IDirect3DRMTexture2 **ppTexture)
|
2011-12-27 23:16:10 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, pDDS, ppTexture);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-04-22 15:18:45 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRM2Impl_CreateShadow(IDirect3DRM2 *iface, IDirect3DRMVisual *visual,
|
|
|
|
IDirect3DRMLight *light, D3DVALUE px, D3DVALUE py, D3DVALUE pz, D3DVALUE nx, D3DVALUE ny, D3DVALUE nz,
|
|
|
|
IDirect3DRMVisual **shadow)
|
2011-12-27 23:16:10 +01:00
|
|
|
{
|
2013-04-22 15:18:45 +02:00
|
|
|
FIXME("iface %p, visual %p, light %p, px %.8e, py %.8e, pz %.8e, nx %.8e, ny %.8e, nz %.8e, shadow %p stub!\n",
|
|
|
|
iface, visual, light, px, py, pz, nx, ny, nz, shadow);
|
2011-12-27 23:16:10 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-04-17 08:48:01 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRM2Impl_CreateViewport(IDirect3DRM2 *iface, IDirect3DRMDevice *device,
|
|
|
|
IDirect3DRMFrame *camera, DWORD x, DWORD y, DWORD width, DWORD height, IDirect3DRMViewport **viewport)
|
2011-12-27 23:16:10 +01:00
|
|
|
{
|
2013-04-17 08:48:01 +02:00
|
|
|
FIXME("iface %p, device %p, camera %p, x %u, y %u, width %u, height %u, viewport %p partial stub!\n",
|
|
|
|
iface, device, camera, x, y, width, height, viewport);
|
2011-12-27 23:16:10 +01:00
|
|
|
|
2013-04-17 08:48:01 +02:00
|
|
|
return Direct3DRMViewport_create(&IID_IDirect3DRMViewport, (IUnknown **)viewport);
|
2011-12-27 23:16:10 +01:00
|
|
|
}
|
|
|
|
|
2013-04-19 08:34:15 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRM2Impl_CreateWrap(IDirect3DRM2 *iface, D3DRMWRAPTYPE type, IDirect3DRMFrame *frame,
|
|
|
|
D3DVALUE ox, D3DVALUE oy, D3DVALUE oz, D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
|
|
|
|
D3DVALUE ux, D3DVALUE uy, D3DVALUE uz, D3DVALUE ou, D3DVALUE ov, D3DVALUE su, D3DVALUE sv,
|
|
|
|
IDirect3DRMWrap **wrap)
|
2011-12-27 23:16:10 +01:00
|
|
|
{
|
2013-04-19 08:34:15 +02:00
|
|
|
FIXME("iface %p, type %#x, frame %p, ox %.8e, oy %.8e, oz %.8e, dx %.8e, dy %.8e, dz %.8e, "
|
|
|
|
"ux %.8e, uy %.8e, uz %.8e, ou %.8e, ov %.8e, su %.8e, sv %.8e, wrap %p stub!\n",
|
|
|
|
iface, type, frame, ox, oy, oz, dx, dy, dz, ux, uy, uz, ou, ov, su, sv, wrap);
|
2011-12-27 23:16:10 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-06-03 09:19:36 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRM2Impl_CreateUserVisual(IDirect3DRM2 *iface,
|
|
|
|
D3DRMUSERVISUALCALLBACK cb, void *ctx, IDirect3DRMUserVisual **visual)
|
2011-12-27 23:16:10 +01:00
|
|
|
{
|
2013-06-03 09:19:36 +02:00
|
|
|
FIXME("iface %p, cb %p, ctx %p, visual %p stub!\n", iface, cb, ctx, visual);
|
2011-12-27 23:16:10 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-05-27 09:22:52 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRM2Impl_LoadTexture(IDirect3DRM2 *iface,
|
|
|
|
const char *filename, IDirect3DRMTexture2 **texture)
|
2011-12-27 23:16:10 +01:00
|
|
|
{
|
2013-05-27 09:22:52 +02:00
|
|
|
FIXME("iface %p, filename %s, texture %p stub!\n", iface, debugstr_a(filename), texture);
|
2011-12-27 23:16:10 +01:00
|
|
|
|
2013-05-27 09:22:52 +02:00
|
|
|
return Direct3DRMTexture_create(&IID_IDirect3DRMTexture2, (IUnknown **)texture);
|
2011-12-27 23:16:10 +01:00
|
|
|
}
|
|
|
|
|
2013-05-27 09:22:52 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRM2Impl_LoadTextureFromResource(IDirect3DRM2 *iface, HMODULE module,
|
|
|
|
const char *resource_name, const char *resource_type, IDirect3DRMTexture2 **texture)
|
2011-12-27 23:16:10 +01:00
|
|
|
{
|
2013-05-27 09:22:52 +02:00
|
|
|
FIXME("iface %p, resource_name %s, resource_type %s, texture %p stub!\n",
|
|
|
|
iface, debugstr_a(resource_name), debugstr_a(resource_type), texture);
|
2011-12-27 23:16:10 +01:00
|
|
|
|
2013-05-27 09:22:52 +02:00
|
|
|
return Direct3DRMTexture_create(&IID_IDirect3DRMTexture2, (IUnknown **)texture);
|
2011-12-27 23:16:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRM2Impl_SetSearchPath(IDirect3DRM2* iface, LPCSTR path)
|
|
|
|
{
|
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%s): stub\n", iface, This, path);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRM2Impl_AddSearchPath(IDirect3DRM2* iface, LPCSTR path)
|
|
|
|
{
|
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%s): stub\n", iface, This, path);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRM2Impl_GetSearchPath(IDirect3DRM2* iface, DWORD *size_return,
|
|
|
|
LPSTR path_return)
|
|
|
|
{
|
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p,%s): stub\n", iface, This, size_return, path_return);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRM2Impl_SetDefaultTextureColors(IDirect3DRM2* iface, DWORD nb_colors)
|
|
|
|
{
|
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%d): stub\n", iface, This, nb_colors);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRM2Impl_SetDefaultTextureShades(IDirect3DRM2* iface, DWORD nb_shades)
|
|
|
|
{
|
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%d): stub\n", iface, This, nb_shades);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-06-04 09:57:09 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRM2Impl_GetDevices(IDirect3DRM2 *iface, IDirect3DRMDeviceArray **array)
|
2011-12-27 23:16:10 +01:00
|
|
|
{
|
2013-06-04 09:57:09 +02:00
|
|
|
FIXME("iface %p, array %p stub!\n", iface, array);
|
2011-12-27 23:16:10 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-04-17 08:48:00 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRM2Impl_GetNamedObject(IDirect3DRM2 *iface,
|
|
|
|
const char *name, IDirect3DRMObject **object)
|
2011-12-27 23:16:10 +01:00
|
|
|
{
|
2013-04-17 08:48:00 +02:00
|
|
|
FIXME("iface %p, name %s, object %p stub!\n", iface, debugstr_a(name), object);
|
2011-12-27 23:16:10 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRM2Impl_EnumerateObjects(IDirect3DRM2* iface, D3DRMOBJECTCALLBACK cb,
|
|
|
|
LPVOID pArg)
|
|
|
|
{
|
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, cb, pArg);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-04-19 08:34:15 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRM2Impl_Load(IDirect3DRM2 *iface, void *source, void *object_id, IID **iids,
|
|
|
|
DWORD iid_count, D3DRMLOADOPTIONS flags, D3DRMLOADCALLBACK load_cb, void *load_ctx,
|
|
|
|
D3DRMLOADTEXTURECALLBACK load_tex_cb, void *load_tex_ctx, IDirect3DRMFrame *parent_frame)
|
2011-12-27 23:16:10 +01:00
|
|
|
{
|
2013-04-19 08:34:15 +02:00
|
|
|
IDirect3DRMImpl *d3drm = impl_from_IDirect3DRM2(iface);
|
|
|
|
IDirect3DRMFrame3 *parent_frame3 = NULL;
|
2012-03-26 22:35:21 +02:00
|
|
|
HRESULT hr = D3DRM_OK;
|
2011-12-27 23:16:10 +01:00
|
|
|
|
2013-04-19 08:34:15 +02:00
|
|
|
TRACE("iface %p, source %p, object_id %p, iids %p, iid_count %u, flags %#x, "
|
|
|
|
"load_cb %p, load_ctx %p, load_tex_cb %p, load_tex_ctx %p, parent_frame %p.\n",
|
|
|
|
iface, source, object_id, iids, iid_count, flags,
|
|
|
|
load_cb, load_ctx, load_tex_cb, load_tex_ctx, parent_frame);
|
2011-12-27 23:16:10 +01:00
|
|
|
|
2013-04-19 08:34:15 +02:00
|
|
|
if (parent_frame)
|
|
|
|
hr = IDirect3DRMFrame_QueryInterface(parent_frame, &IID_IDirect3DRMFrame3, (void **)&parent_frame3);
|
2012-03-26 22:35:21 +02:00
|
|
|
if (SUCCEEDED(hr))
|
2013-04-19 08:34:15 +02:00
|
|
|
hr = IDirect3DRM3_Load(&d3drm->IDirect3DRM3_iface, source, object_id, iids, iid_count,
|
|
|
|
flags, load_cb, load_ctx, load_tex_cb, load_tex_ctx, parent_frame3);
|
|
|
|
if (parent_frame3)
|
|
|
|
IDirect3DRMFrame3_Release(parent_frame3);
|
2012-03-26 22:35:21 +02:00
|
|
|
|
|
|
|
return hr;
|
2011-12-27 23:16:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRM2Impl_Tick(IDirect3DRM2* iface, D3DVALUE tick)
|
|
|
|
{
|
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%f): stub\n", iface, This, tick);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRM2Impl_CreateProgressiveMesh(IDirect3DRM2* iface,
|
|
|
|
LPDIRECT3DRMPROGRESSIVEMESH * ppMesh)
|
|
|
|
{
|
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p): stub\n", iface, This, ppMesh);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const struct IDirect3DRM2Vtbl Direct3DRM2_Vtbl =
|
|
|
|
{
|
|
|
|
IDirect3DRM2Impl_QueryInterface,
|
|
|
|
IDirect3DRM2Impl_AddRef,
|
|
|
|
IDirect3DRM2Impl_Release,
|
|
|
|
IDirect3DRM2Impl_CreateObject,
|
|
|
|
IDirect3DRM2Impl_CreateFrame,
|
|
|
|
IDirect3DRM2Impl_CreateMesh,
|
|
|
|
IDirect3DRM2Impl_CreateMeshBuilder,
|
|
|
|
IDirect3DRM2Impl_CreateFace,
|
|
|
|
IDirect3DRM2Impl_CreateAnimation,
|
|
|
|
IDirect3DRM2Impl_CreateAnimationSet,
|
|
|
|
IDirect3DRM2Impl_CreateTexture,
|
|
|
|
IDirect3DRM2Impl_CreateLight,
|
|
|
|
IDirect3DRM2Impl_CreateLightRGB,
|
2012-05-22 22:05:16 +02:00
|
|
|
IDirect3DRM2Impl_CreateMaterial,
|
2011-12-27 23:16:10 +01:00
|
|
|
IDirect3DRM2Impl_CreateDevice,
|
|
|
|
IDirect3DRM2Impl_CreateDeviceFromSurface,
|
|
|
|
IDirect3DRM2Impl_CreateDeviceFromD3D,
|
|
|
|
IDirect3DRM2Impl_CreateDeviceFromClipper,
|
|
|
|
IDirect3DRM2Impl_CreateTextureFromSurface,
|
|
|
|
IDirect3DRM2Impl_CreateShadow,
|
|
|
|
IDirect3DRM2Impl_CreateViewport,
|
|
|
|
IDirect3DRM2Impl_CreateWrap,
|
|
|
|
IDirect3DRM2Impl_CreateUserVisual,
|
|
|
|
IDirect3DRM2Impl_LoadTexture,
|
|
|
|
IDirect3DRM2Impl_LoadTextureFromResource,
|
|
|
|
IDirect3DRM2Impl_SetSearchPath,
|
|
|
|
IDirect3DRM2Impl_AddSearchPath,
|
|
|
|
IDirect3DRM2Impl_GetSearchPath,
|
|
|
|
IDirect3DRM2Impl_SetDefaultTextureColors,
|
|
|
|
IDirect3DRM2Impl_SetDefaultTextureShades,
|
|
|
|
IDirect3DRM2Impl_GetDevices,
|
|
|
|
IDirect3DRM2Impl_GetNamedObject,
|
|
|
|
IDirect3DRM2Impl_EnumerateObjects,
|
|
|
|
IDirect3DRM2Impl_Load,
|
|
|
|
IDirect3DRM2Impl_Tick,
|
|
|
|
IDirect3DRM2Impl_CreateProgressiveMesh
|
|
|
|
};
|
2011-12-29 02:26:40 +01:00
|
|
|
|
|
|
|
|
|
|
|
/*** IUnknown methods ***/
|
|
|
|
static HRESULT WINAPI IDirect3DRM3Impl_QueryInterface(IDirect3DRM3* iface, REFIID riid,
|
|
|
|
void** ppvObject)
|
|
|
|
{
|
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM3(iface);
|
|
|
|
return IDirect3DRM_QueryInterface(&This->IDirect3DRM_iface, riid, ppvObject);
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI IDirect3DRM3Impl_AddRef(IDirect3DRM3* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM3(iface);
|
2012-01-19 22:06:08 +01:00
|
|
|
return IDirect3DRM_AddRef(&This->IDirect3DRM_iface);
|
2011-12-29 02:26:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI IDirect3DRM3Impl_Release(IDirect3DRM3* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM3(iface);
|
2012-01-19 22:06:08 +01:00
|
|
|
return IDirect3DRM_Release(&This->IDirect3DRM_iface);
|
2011-12-29 02:26:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/*** IDirect3DRM3 methods ***/
|
|
|
|
static HRESULT WINAPI IDirect3DRM3Impl_CreateObject(IDirect3DRM3* iface, REFCLSID rclsid,
|
|
|
|
LPUNKNOWN unkwn, REFIID riid, LPVOID* object)
|
|
|
|
{
|
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%s,%p,%s,%p): stub\n", iface, This, debugstr_guid(rclsid), unkwn,
|
|
|
|
debugstr_guid(riid), object);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-04-22 15:18:44 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRM3Impl_CreateFrame(IDirect3DRM3 *iface,
|
|
|
|
IDirect3DRMFrame3 *parent, IDirect3DRMFrame3 **frame)
|
2011-12-29 02:26:40 +01:00
|
|
|
{
|
2013-04-22 15:18:44 +02:00
|
|
|
TRACE("iface %p, parent %p, frame %p.\n", iface, parent, frame);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2013-04-22 15:18:44 +02:00
|
|
|
return Direct3DRMFrame_create(&IID_IDirect3DRMFrame3, (IUnknown *)parent, (IUnknown **)frame);
|
2011-12-29 02:26:40 +01:00
|
|
|
}
|
|
|
|
|
2013-04-22 15:18:46 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRM3Impl_CreateMesh(IDirect3DRM3 *iface, IDirect3DRMMesh **mesh)
|
2011-12-29 02:26:40 +01:00
|
|
|
{
|
2013-04-22 15:18:46 +02:00
|
|
|
TRACE("iface %p, mesh %p.\n", iface, mesh);
|
2011-12-29 02:26:40 +01:00
|
|
|
|
2013-04-22 15:18:46 +02:00
|
|
|
return Direct3DRMMesh_create(mesh);
|
2011-12-29 02:26:40 +01:00
|
|
|
}
|
|
|
|
|
2013-04-23 13:21:34 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRM3Impl_CreateMeshBuilder(IDirect3DRM3 *iface, IDirect3DRMMeshBuilder3 **mesh_builder)
|
2011-12-29 02:26:40 +01:00
|
|
|
{
|
2013-04-23 13:21:34 +02:00
|
|
|
TRACE("iface %p, mesh_builder %p.\n", iface, mesh_builder);
|
2011-12-29 02:26:40 +01:00
|
|
|
|
2013-04-23 13:21:34 +02:00
|
|
|
return Direct3DRMMeshBuilder_create(&IID_IDirect3DRMMeshBuilder3, (IUnknown **)mesh_builder);
|
2011-12-29 02:26:40 +01:00
|
|
|
}
|
|
|
|
|
2013-04-25 09:59:45 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRM3Impl_CreateFace(IDirect3DRM3 *iface, IDirect3DRMFace2 **face)
|
2011-12-29 02:26:40 +01:00
|
|
|
{
|
2013-05-09 14:43:39 +02:00
|
|
|
TRACE("iface %p, face %p.\n", iface, face);
|
2011-12-29 02:26:40 +01:00
|
|
|
|
2013-05-09 14:43:39 +02:00
|
|
|
return Direct3DRMFace_create(&IID_IDirect3DRMFace2, (IUnknown **)face);
|
2011-12-29 02:26:40 +01:00
|
|
|
}
|
|
|
|
|
2013-05-30 10:05:36 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRM3Impl_CreateAnimation(IDirect3DRM3 *iface, IDirect3DRMAnimation2 **animation)
|
2011-12-29 02:26:40 +01:00
|
|
|
{
|
2013-05-30 10:05:36 +02:00
|
|
|
FIXME("iface %p, animation %p stub!\n", iface, animation);
|
2011-12-29 02:26:40 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-05-30 22:34:19 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRM3Impl_CreateAnimationSet(IDirect3DRM3 *iface, IDirect3DRMAnimationSet2 **set)
|
2011-12-29 02:26:40 +01:00
|
|
|
{
|
2013-05-30 22:34:19 +02:00
|
|
|
FIXME("iface %p, set %p stub!\n", iface, set);
|
2011-12-29 02:26:40 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-01-28 11:15:36 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRM3Impl_CreateTexture(IDirect3DRM3 *iface,
|
|
|
|
D3DRMIMAGE *image, IDirect3DRMTexture3 **texture)
|
2011-12-29 02:26:40 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM3(iface);
|
|
|
|
|
2013-01-28 11:15:36 +01:00
|
|
|
FIXME("(%p/%p)->(%p,%p): partial stub\n", iface, This, image, texture);
|
2011-12-29 02:26:40 +01:00
|
|
|
|
2013-01-28 11:15:36 +01:00
|
|
|
return Direct3DRMTexture_create(&IID_IDirect3DRMTexture3, (IUnknown **)texture);
|
2011-12-29 02:26:40 +01:00
|
|
|
}
|
|
|
|
|
2013-04-25 09:59:46 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRM3Impl_CreateLight(IDirect3DRM3 *iface,
|
|
|
|
D3DRMLIGHTTYPE type, D3DCOLOR color, IDirect3DRMLight **light)
|
2011-12-29 02:26:40 +01:00
|
|
|
{
|
2013-04-25 09:59:46 +02:00
|
|
|
HRESULT hr;
|
2011-12-29 02:26:40 +01:00
|
|
|
|
2013-04-25 09:59:46 +02:00
|
|
|
FIXME("iface %p, type %#x, color 0x%08x, light %p partial stub!\n", iface, type, color, light);
|
2012-05-01 22:15:39 +02:00
|
|
|
|
2013-04-25 09:59:46 +02:00
|
|
|
if (SUCCEEDED(hr = Direct3DRMLight_create((IUnknown **)light)))
|
2012-05-01 22:15:39 +02:00
|
|
|
{
|
2013-04-25 09:59:46 +02:00
|
|
|
IDirect3DRMLight_SetType(*light, type);
|
|
|
|
IDirect3DRMLight_SetColor(*light, color);
|
2012-05-01 22:15:39 +02:00
|
|
|
}
|
|
|
|
|
2013-04-25 09:59:46 +02:00
|
|
|
return hr;
|
2011-12-29 02:26:40 +01:00
|
|
|
}
|
|
|
|
|
2013-04-25 09:59:46 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRM3Impl_CreateLightRGB(IDirect3DRM3 *iface, D3DRMLIGHTTYPE type,
|
|
|
|
D3DVALUE red, D3DVALUE green, D3DVALUE blue, IDirect3DRMLight **light)
|
2011-12-29 02:26:40 +01:00
|
|
|
{
|
2013-04-25 09:59:46 +02:00
|
|
|
HRESULT hr;
|
2011-12-29 02:26:40 +01:00
|
|
|
|
2013-04-25 09:59:46 +02:00
|
|
|
FIXME("iface %p, type %#x, red %.8e, green %.8e, blue %.8e, light %p partial stub!\n",
|
|
|
|
iface, type, red, green, blue, light);
|
2012-05-01 22:15:39 +02:00
|
|
|
|
2013-04-25 09:59:46 +02:00
|
|
|
if (SUCCEEDED(hr = Direct3DRMLight_create((IUnknown **)light)))
|
2012-05-01 22:15:39 +02:00
|
|
|
{
|
2013-04-25 09:59:46 +02:00
|
|
|
IDirect3DRMLight_SetType(*light, type);
|
|
|
|
IDirect3DRMLight_SetColorRGB(*light, red, green, blue);
|
2012-05-01 22:15:39 +02:00
|
|
|
}
|
|
|
|
|
2013-04-25 09:59:46 +02:00
|
|
|
return hr;
|
2011-12-29 02:26:40 +01:00
|
|
|
}
|
|
|
|
|
2013-05-29 09:45:39 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRM3Impl_CreateMaterial(IDirect3DRM3 *iface,
|
|
|
|
D3DVALUE power, IDirect3DRMMaterial2 **material)
|
2011-12-29 02:26:40 +01:00
|
|
|
{
|
2013-05-29 09:45:39 +02:00
|
|
|
HRESULT hr;
|
2011-12-29 02:26:40 +01:00
|
|
|
|
2013-05-29 09:45:39 +02:00
|
|
|
TRACE("iface %p, power %.8e, material %p.\n", iface, power, material);
|
2012-05-22 22:05:32 +02:00
|
|
|
|
2013-05-29 09:45:39 +02:00
|
|
|
if (SUCCEEDED(hr = Direct3DRMMaterial_create(material)))
|
2012-05-22 22:05:32 +02:00
|
|
|
IDirect3DRMMaterial2_SetPower(*material, power);
|
|
|
|
|
2013-05-29 09:45:39 +02:00
|
|
|
return hr;
|
2011-12-29 02:26:40 +01:00
|
|
|
}
|
|
|
|
|
2013-04-18 09:35:15 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRM3Impl_CreateDevice(IDirect3DRM3 *iface,
|
|
|
|
DWORD width, DWORD height, IDirect3DRMDevice3 **device)
|
2011-12-29 02:26:40 +01:00
|
|
|
{
|
2013-04-18 09:35:15 +02:00
|
|
|
FIXME("iface %p, width %u, height %u, device %p partial stub!\n", iface, width, height, device);
|
2011-12-29 02:26:40 +01:00
|
|
|
|
2013-04-18 09:35:15 +02:00
|
|
|
return Direct3DRMDevice_create(&IID_IDirect3DRMDevice3, (IUnknown **)device);
|
2011-12-29 02:26:40 +01:00
|
|
|
}
|
|
|
|
|
2012-11-19 22:04:10 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRM3Impl_CreateDeviceFromSurface(IDirect3DRM3 *iface, GUID *pGUID,
|
|
|
|
IDirectDraw *dd, IDirectDrawSurface *back, IDirect3DRMDevice3 **device)
|
2011-12-29 02:26:40 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM3(iface);
|
|
|
|
|
2012-01-15 17:01:09 +01:00
|
|
|
FIXME("(%p/%p)->(%s,%p,%p,%p): partial stub\n", iface, This, debugstr_guid(pGUID), dd, back, device);
|
2011-12-29 02:26:40 +01:00
|
|
|
|
2012-01-15 17:01:09 +01:00
|
|
|
return Direct3DRMDevice_create(&IID_IDirect3DRMDevice3, (IUnknown**)device);
|
2011-12-29 02:26:40 +01:00
|
|
|
}
|
|
|
|
|
2012-11-20 22:40:19 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRM3Impl_CreateDeviceFromD3D(IDirect3DRM3 *iface,
|
|
|
|
IDirect3D2 *d3d, IDirect3DDevice2 *d3ddev, IDirect3DRMDevice3 **device)
|
2011-12-29 02:26:40 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM3(iface);
|
|
|
|
|
2012-01-15 17:01:09 +01:00
|
|
|
FIXME("(%p/%p)->(%p,%p,%p): partial stub\n", iface, This, d3d, d3ddev, device);
|
2011-12-29 02:26:40 +01:00
|
|
|
|
2012-01-15 17:01:09 +01:00
|
|
|
return Direct3DRMDevice_create(&IID_IDirect3DRMDevice3, (IUnknown**)device);
|
2011-12-29 02:26:40 +01:00
|
|
|
}
|
|
|
|
|
2012-11-19 22:04:11 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRM3Impl_CreateDeviceFromClipper(IDirect3DRM3 *iface,
|
|
|
|
IDirectDrawClipper *clipper, GUID *guid, int width, int height,
|
|
|
|
IDirect3DRMDevice3 **device)
|
2011-12-29 02:26:40 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM3(iface);
|
|
|
|
|
2012-11-19 22:04:11 +01:00
|
|
|
FIXME("(%p/%p)->(%p,%s,%d,%d,%p): partial stub\n", iface, This, clipper, debugstr_guid(guid),
|
2011-12-29 02:26:40 +01:00
|
|
|
width, height, device);
|
|
|
|
|
2012-01-15 17:01:09 +01:00
|
|
|
return Direct3DRMDevice_create(&IID_IDirect3DRMDevice3, (IUnknown**)device);
|
2011-12-29 02:26:40 +01:00
|
|
|
}
|
|
|
|
|
2013-04-25 09:59:46 +02:00
|
|
|
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)
|
2011-12-29 02:26:40 +01:00
|
|
|
{
|
2013-04-25 09:59:46 +02:00
|
|
|
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);
|
2011-12-29 02:26:40 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2012-11-19 22:04:10 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRM3Impl_CreateTextureFromSurface(IDirect3DRM3 *iface,
|
|
|
|
IDirectDrawSurface *surface, IDirect3DRMTexture3 **texture)
|
2011-12-29 02:26:40 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, surface, texture);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-04-18 09:35:15 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRM3Impl_CreateViewport(IDirect3DRM3 *iface, IDirect3DRMDevice3 *device,
|
|
|
|
IDirect3DRMFrame3 *camera, DWORD x, DWORD y, DWORD width, DWORD height, IDirect3DRMViewport2 **viewport)
|
2011-12-29 02:26:40 +01:00
|
|
|
{
|
2013-04-18 09:35:15 +02:00
|
|
|
FIXME("iface %p, device %p, camera %p, x %u, y %u, width %u, height %u, viewport %p partial stub!\n",
|
|
|
|
iface, device, camera, x, y, width, height, viewport);
|
2011-12-29 02:26:40 +01:00
|
|
|
|
2013-04-18 09:35:15 +02:00
|
|
|
return Direct3DRMViewport_create(&IID_IDirect3DRMViewport2, (IUnknown **)viewport);
|
2011-12-29 02:26:40 +01:00
|
|
|
}
|
|
|
|
|
2013-04-22 15:18:44 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRM3Impl_CreateWrap(IDirect3DRM3 *iface, D3DRMWRAPTYPE type, IDirect3DRMFrame3 *frame,
|
|
|
|
D3DVALUE ox, D3DVALUE oy, D3DVALUE oz, D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
|
|
|
|
D3DVALUE ux, D3DVALUE uy, D3DVALUE uz, D3DVALUE ou, D3DVALUE ov, D3DVALUE su, D3DVALUE sv,
|
|
|
|
IDirect3DRMWrap **wrap)
|
2011-12-29 02:26:40 +01:00
|
|
|
{
|
2013-04-22 15:18:44 +02:00
|
|
|
FIXME("iface %p, type %#x, frame %p, ox %.8e, oy %.8e, oz %.8e, dx %.8e, dy %.8e, dz %.8e, "
|
|
|
|
"ux %.8e, uy %.8e, uz %.8e, ou %.8e, ov %.8e, su %.8e, sv %.8e, wrap %p stub!\n",
|
|
|
|
iface, type, frame, ox, oy, oz, dx, dy, dz, ux, uy, uz, ou, ov, su, sv, wrap);
|
2011-12-29 02:26:40 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-06-03 09:19:36 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRM3Impl_CreateUserVisual(IDirect3DRM3 *iface,
|
|
|
|
D3DRMUSERVISUALCALLBACK cb, void *ctx, IDirect3DRMUserVisual **visual)
|
2011-12-29 02:26:40 +01:00
|
|
|
{
|
2013-06-03 09:19:36 +02:00
|
|
|
FIXME("iface %p, cb %p, ctx %p, visual %p stub!\n", iface, cb, ctx, visual);
|
2011-12-29 02:26:40 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-05-28 08:55:20 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRM3Impl_LoadTexture(IDirect3DRM3 *iface,
|
|
|
|
const char *filename, IDirect3DRMTexture3 **texture)
|
2011-12-29 02:26:40 +01:00
|
|
|
{
|
2013-05-28 08:55:20 +02:00
|
|
|
FIXME("iface %p, filename %s, texture %p stub!\n", iface, debugstr_a(filename), texture);
|
2011-12-29 02:26:40 +01:00
|
|
|
|
2013-05-28 08:55:20 +02:00
|
|
|
return Direct3DRMTexture_create(&IID_IDirect3DRMTexture3, (IUnknown **)texture);
|
2011-12-29 02:26:40 +01:00
|
|
|
}
|
|
|
|
|
2013-05-28 08:55:20 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRM3Impl_LoadTextureFromResource(IDirect3DRM3 *iface, HMODULE module,
|
|
|
|
const char *resource_name, const char *resource_type, IDirect3DRMTexture3 **texture)
|
2011-12-29 02:26:40 +01:00
|
|
|
{
|
2013-05-28 08:55:20 +02:00
|
|
|
FIXME("iface %p, module %p, resource_name %s, resource_type %s, texture %p stub!\n",
|
|
|
|
iface, module, debugstr_a(resource_name), debugstr_a(resource_type), texture);
|
2011-12-29 02:26:40 +01:00
|
|
|
|
2013-05-28 08:55:20 +02:00
|
|
|
return Direct3DRMTexture_create(&IID_IDirect3DRMTexture3, (IUnknown **)texture);
|
2011-12-29 02:26:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRM3Impl_SetSearchPath(IDirect3DRM3* iface, LPCSTR path)
|
|
|
|
{
|
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%s): stub\n", iface, This, path);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRM3Impl_AddSearchPath(IDirect3DRM3* iface, LPCSTR path)
|
|
|
|
{
|
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%s): stub\n", iface, This, path);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRM3Impl_GetSearchPath(IDirect3DRM3* iface, DWORD* size_return,
|
|
|
|
LPSTR path_return)
|
|
|
|
{
|
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p,%s): stub\n", iface, This, size_return, path_return);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRM3Impl_SetDefaultTextureColors(IDirect3DRM3* iface, DWORD nb_colors)
|
|
|
|
{
|
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%d): stub\n", iface, This, nb_colors);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRM3Impl_SetDefaultTextureShades(IDirect3DRM3* iface, DWORD nb_shades)
|
|
|
|
{
|
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%d): stub\n", iface, This, nb_shades);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-06-04 09:57:09 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRM3Impl_GetDevices(IDirect3DRM3 *iface, IDirect3DRMDeviceArray **array)
|
2011-12-29 02:26:40 +01:00
|
|
|
{
|
2013-06-04 09:57:09 +02:00
|
|
|
FIXME("iface %p, array %p stub!\n", iface, array);
|
2011-12-29 02:26:40 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-04-17 08:48:00 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRM3Impl_GetNamedObject(IDirect3DRM3 *iface,
|
|
|
|
const char *name, IDirect3DRMObject **object)
|
2011-12-29 02:26:40 +01:00
|
|
|
{
|
2013-04-17 08:48:00 +02:00
|
|
|
FIXME("iface %p, name %s, object %p stub!\n", iface, debugstr_a(name), object);
|
2011-12-29 02:26:40 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRM3Impl_EnumerateObjects(IDirect3DRM3* iface, D3DRMOBJECTCALLBACK cb,
|
|
|
|
LPVOID arg)
|
|
|
|
{
|
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, cb, arg);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2012-12-14 08:37:38 +01:00
|
|
|
static HRESULT load_data(IDirect3DRM3 *iface, IDirectXFileData *data_object, IID **GUIDs, DWORD nb_GUIDs, D3DRMLOADCALLBACK LoadProc,
|
|
|
|
void *ArgLP, D3DRMLOADTEXTURECALLBACK LoadTextureProc, void *ArgLTP, IDirect3DRMFrame3 *parent_frame)
|
2012-05-15 08:08:22 +02:00
|
|
|
{
|
|
|
|
HRESULT ret = D3DRMERR_BADOBJECT;
|
|
|
|
HRESULT hr;
|
|
|
|
const GUID* guid;
|
|
|
|
DWORD i;
|
|
|
|
BOOL requested = FALSE;
|
|
|
|
|
|
|
|
hr = IDirectXFileData_GetType(data_object, &guid);
|
|
|
|
if (hr != DXFILE_OK)
|
|
|
|
goto end;
|
|
|
|
|
|
|
|
TRACE("Found object type whose GUID = %s\n", debugstr_guid(guid));
|
|
|
|
|
2012-12-12 09:36:37 +01:00
|
|
|
/* Load object only if it is top level and requested or if it is part of another object */
|
|
|
|
|
2012-05-15 08:08:22 +02:00
|
|
|
if (IsEqualGUID(guid, &TID_D3DRMMesh))
|
|
|
|
{
|
|
|
|
TRACE("Found TID_D3DRMMesh\n");
|
|
|
|
|
|
|
|
for (i = 0; i < nb_GUIDs; i++)
|
|
|
|
if (IsEqualGUID(GUIDs[i], &IID_IDirect3DRMMeshBuilder) ||
|
|
|
|
IsEqualGUID(GUIDs[i], &IID_IDirect3DRMMeshBuilder2) ||
|
|
|
|
IsEqualGUID(GUIDs[i], &IID_IDirect3DRMMeshBuilder3))
|
|
|
|
{
|
|
|
|
requested = TRUE;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2012-12-12 09:36:37 +01:00
|
|
|
if (requested || parent_frame)
|
2012-05-15 08:08:22 +02:00
|
|
|
{
|
2012-12-12 09:36:37 +01:00
|
|
|
IDirect3DRMMeshBuilder3 *meshbuilder;
|
2012-05-15 08:08:22 +02:00
|
|
|
|
2012-12-12 09:36:37 +01:00
|
|
|
TRACE("Load mesh data\n");
|
2012-05-15 08:08:22 +02:00
|
|
|
|
|
|
|
hr = IDirect3DRM3_CreateMeshBuilder(iface, &meshbuilder);
|
|
|
|
if (SUCCEEDED(hr))
|
|
|
|
{
|
2012-12-14 08:37:38 +01:00
|
|
|
hr = load_mesh_data(meshbuilder, data_object, LoadTextureProc, ArgLTP);
|
2012-05-15 08:08:22 +02:00
|
|
|
if (SUCCEEDED(hr))
|
|
|
|
{
|
2012-12-12 09:36:37 +01:00
|
|
|
/* Only top level objects are notified */
|
|
|
|
if (!parent_frame)
|
2012-05-15 08:08:40 +02:00
|
|
|
{
|
2012-12-12 09:36:37 +01:00
|
|
|
IDirect3DRMObject *object;
|
|
|
|
|
|
|
|
hr = IDirect3DRMMeshBuilder3_QueryInterface(meshbuilder, GUIDs[i], (void**)&object);
|
|
|
|
if (SUCCEEDED(hr))
|
|
|
|
{
|
2012-05-15 08:08:40 +02:00
|
|
|
LoadProc(object, GUIDs[i], ArgLP);
|
2012-12-12 09:36:37 +01:00
|
|
|
IDirect3DRMObject_Release(object);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
IDirect3DRMFrame3_AddVisual(parent_frame, (IUnknown*)meshbuilder);
|
2012-05-15 08:08:40 +02:00
|
|
|
}
|
2012-05-15 08:08:22 +02:00
|
|
|
}
|
|
|
|
IDirect3DRMMeshBuilder3_Release(meshbuilder);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (FAILED(hr))
|
|
|
|
ERR("Cannot process mesh\n");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (IsEqualGUID(guid, &TID_D3DRMFrame))
|
|
|
|
{
|
|
|
|
TRACE("Found TID_D3DRMFrame\n");
|
|
|
|
|
|
|
|
for (i = 0; i < nb_GUIDs; i++)
|
|
|
|
if (IsEqualGUID(GUIDs[i], &IID_IDirect3DRMFrame) ||
|
|
|
|
IsEqualGUID(GUIDs[i], &IID_IDirect3DRMFrame2) ||
|
|
|
|
IsEqualGUID(GUIDs[i], &IID_IDirect3DRMFrame3))
|
|
|
|
{
|
|
|
|
requested = TRUE;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2012-12-12 09:36:37 +01:00
|
|
|
if (requested || parent_frame)
|
2012-05-15 08:08:22 +02:00
|
|
|
{
|
2012-12-12 09:36:37 +01:00
|
|
|
IDirect3DRMFrame3 *frame;
|
2012-05-15 08:08:22 +02:00
|
|
|
|
2012-12-12 09:36:37 +01:00
|
|
|
TRACE("Load frame data\n");
|
2012-05-15 08:08:22 +02:00
|
|
|
|
2012-05-15 08:08:40 +02:00
|
|
|
hr = IDirect3DRM3_CreateFrame(iface, parent_frame, &frame);
|
2012-05-15 08:08:22 +02:00
|
|
|
if (SUCCEEDED(hr))
|
|
|
|
{
|
2012-12-12 09:36:37 +01:00
|
|
|
IDirectXFileObject *child;
|
2012-05-15 08:08:22 +02:00
|
|
|
|
2012-12-12 09:36:37 +01:00
|
|
|
while (SUCCEEDED(hr = IDirectXFileData_GetNextObject(data_object, &child)))
|
2012-05-15 08:08:22 +02:00
|
|
|
{
|
2012-12-12 09:36:37 +01:00
|
|
|
IDirectXFileData *data;
|
|
|
|
IDirectXFileDataReference *reference;
|
|
|
|
IDirectXFileBinary *binary;
|
2012-05-15 08:08:40 +02:00
|
|
|
|
2012-12-12 09:36:37 +01:00
|
|
|
hr = IDirectXFileObject_QueryInterface(child, &IID_IDirectXFileBinary, (void **)&binary);
|
|
|
|
if (SUCCEEDED(hr))
|
2012-05-15 08:08:40 +02:00
|
|
|
{
|
2012-12-12 09:36:37 +01:00
|
|
|
FIXME("Binary Object not supported yet\n");
|
|
|
|
IDirectXFileBinary_Release(binary);
|
|
|
|
continue;
|
2012-05-15 08:08:40 +02:00
|
|
|
}
|
|
|
|
|
2012-12-12 09:36:37 +01:00
|
|
|
hr = IDirectXFileObject_QueryInterface(child, &IID_IDirectXFileData, (void **)&data);
|
|
|
|
if (SUCCEEDED(hr))
|
2012-05-15 08:08:40 +02:00
|
|
|
{
|
2012-12-12 09:36:37 +01:00
|
|
|
TRACE("Found Data Object\n");
|
|
|
|
hr = load_data(iface, data, GUIDs, nb_GUIDs, LoadProc, ArgLP, LoadTextureProc, ArgLTP, frame);
|
|
|
|
IDirectXFileData_Release(data);
|
|
|
|
continue;
|
2012-05-15 08:08:40 +02:00
|
|
|
}
|
2012-12-12 09:36:37 +01:00
|
|
|
hr = IDirectXFileObject_QueryInterface(child, &IID_IDirectXFileDataReference, (void **)&reference);
|
|
|
|
if (SUCCEEDED(hr))
|
|
|
|
{
|
|
|
|
TRACE("Found Data Object Reference\n");
|
|
|
|
IDirectXFileDataReference_Resolve(reference, &data);
|
|
|
|
hr = load_data(iface, data, GUIDs, nb_GUIDs, LoadProc, ArgLP, LoadTextureProc, ArgLTP, frame);
|
|
|
|
IDirectXFileData_Release(data);
|
|
|
|
IDirectXFileDataReference_Release(reference);
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
2012-05-15 08:08:40 +02:00
|
|
|
|
2012-12-12 09:36:37 +01:00
|
|
|
if (hr != DXFILEERR_NOMOREOBJECTS)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrame3_Release(frame);
|
|
|
|
goto end;
|
|
|
|
}
|
|
|
|
hr = S_OK;
|
|
|
|
|
|
|
|
/* Only top level objects are notified */
|
|
|
|
if (!parent_frame)
|
|
|
|
{
|
|
|
|
IDirect3DRMObject *object;
|
|
|
|
|
|
|
|
hr = IDirect3DRMFrame3_QueryInterface(frame, GUIDs[i], (void**)&object);
|
|
|
|
if (SUCCEEDED(hr))
|
|
|
|
{
|
2012-05-15 08:08:40 +02:00
|
|
|
LoadProc(object, GUIDs[i], ArgLP);
|
2012-12-12 09:36:37 +01:00
|
|
|
IDirect3DRMObject_Release(object);
|
|
|
|
}
|
2012-05-15 08:08:22 +02:00
|
|
|
}
|
|
|
|
IDirect3DRMFrame3_Release(frame);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (FAILED(hr))
|
|
|
|
ERR("Cannot process frame\n");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (IsEqualGUID(guid, &TID_D3DRMMaterial))
|
|
|
|
{
|
2012-12-12 09:36:37 +01:00
|
|
|
TRACE("Found TID_D3DRMMaterial\n");
|
|
|
|
|
|
|
|
/* Cannot be requested so nothing to do */
|
2012-05-15 08:08:22 +02:00
|
|
|
}
|
2012-05-17 10:09:31 +02:00
|
|
|
else if (IsEqualGUID(guid, &TID_D3DRMFrameTransformMatrix))
|
|
|
|
{
|
|
|
|
TRACE("Found TID_D3DRMFrameTransformMatrix\n");
|
|
|
|
|
2012-12-12 09:36:37 +01:00
|
|
|
/* Cannot be requested */
|
2012-05-17 10:09:31 +02:00
|
|
|
if (parent_frame)
|
|
|
|
{
|
|
|
|
D3DRMMATRIX4D matrix;
|
|
|
|
DWORD size;
|
|
|
|
|
|
|
|
TRACE("Load Frame Transform Matrix data\n");
|
|
|
|
|
|
|
|
size = sizeof(matrix);
|
|
|
|
hr = IDirectXFileData_GetData(data_object, NULL, &size, (void**)matrix);
|
|
|
|
if ((hr != DXFILE_OK) || (size != sizeof(matrix)))
|
|
|
|
goto end;
|
|
|
|
|
|
|
|
hr = IDirect3DRMFrame3_AddTransform(parent_frame, D3DRMCOMBINE_REPLACE, matrix);
|
|
|
|
if (FAILED(hr))
|
|
|
|
goto end;
|
|
|
|
}
|
|
|
|
}
|
2012-05-15 08:08:22 +02:00
|
|
|
else
|
|
|
|
{
|
|
|
|
FIXME("Found unknown TID %s\n", debugstr_guid(guid));
|
|
|
|
}
|
|
|
|
|
|
|
|
ret = D3DRM_OK;
|
|
|
|
|
|
|
|
end:
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2013-04-22 15:18:44 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRM3Impl_Load(IDirect3DRM3 *iface, void *source, void *object_id, IID **iids,
|
|
|
|
DWORD iid_count, D3DRMLOADOPTIONS flags, D3DRMLOADCALLBACK load_cb, void *load_ctx,
|
|
|
|
D3DRMLOADTEXTURECALLBACK load_tex_cb, void *load_tex_ctx, IDirect3DRMFrame3 *parent_frame)
|
2011-12-29 02:26:40 +01:00
|
|
|
{
|
2012-03-26 22:35:21 +02:00
|
|
|
DXFILELOADOPTIONS load_options;
|
|
|
|
LPDIRECTXFILE pDXFile = NULL;
|
|
|
|
LPDIRECTXFILEENUMOBJECT pEnumObject = NULL;
|
|
|
|
LPDIRECTXFILEDATA pData = NULL;
|
|
|
|
HRESULT hr;
|
|
|
|
const GUID* pGuid;
|
|
|
|
DWORD size;
|
|
|
|
Header* pHeader;
|
|
|
|
HRESULT ret = D3DRMERR_BADOBJECT;
|
|
|
|
DWORD i;
|
|
|
|
|
2013-04-22 15:18:44 +02:00
|
|
|
TRACE("iface %p, source %p, object_id %p, iids %p, iid_count %u, flags %#x, "
|
|
|
|
"load_cb %p, load_ctx %p, load_tex_cb %p, load_tex_ctx %p, parent_frame %p.\n",
|
|
|
|
iface, source, object_id, iids, iid_count, flags,
|
|
|
|
load_cb, load_ctx, load_tex_cb, load_tex_ctx, parent_frame);
|
2011-12-29 02:26:40 +01:00
|
|
|
|
2012-03-26 22:35:21 +02:00
|
|
|
TRACE("Looking for GUIDs:\n");
|
2013-04-22 15:18:44 +02:00
|
|
|
for (i = 0; i < iid_count; ++i)
|
|
|
|
TRACE("- %s (%s)\n", debugstr_guid(iids[i]), get_IID_string(iids[i]));
|
2012-03-26 22:35:21 +02:00
|
|
|
|
2013-04-22 15:18:44 +02:00
|
|
|
if (flags == D3DRMLOAD_FROMMEMORY)
|
2012-03-26 22:35:21 +02:00
|
|
|
{
|
|
|
|
load_options = DXFILELOAD_FROMMEMORY;
|
|
|
|
}
|
2013-04-22 15:18:44 +02:00
|
|
|
else if (flags == D3DRMLOAD_FROMFILE)
|
2012-03-26 22:35:21 +02:00
|
|
|
{
|
|
|
|
load_options = DXFILELOAD_FROMFILE;
|
2013-04-22 15:18:44 +02:00
|
|
|
TRACE("Loading from file %s\n", debugstr_a(source));
|
2012-03-26 22:35:21 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2013-04-22 15:18:44 +02:00
|
|
|
FIXME("Load options %#x not supported yet.\n", flags);
|
2012-03-26 22:35:21 +02:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
hr = DirectXFileCreate(&pDXFile);
|
|
|
|
if (hr != DXFILE_OK)
|
|
|
|
goto end;
|
|
|
|
|
|
|
|
hr = IDirectXFile_RegisterTemplates(pDXFile, templates, strlen(templates));
|
|
|
|
if (hr != DXFILE_OK)
|
|
|
|
goto end;
|
|
|
|
|
2013-04-22 15:18:44 +02:00
|
|
|
hr = IDirectXFile_CreateEnumObject(pDXFile, source, load_options, &pEnumObject);
|
2012-03-26 22:35:21 +02:00
|
|
|
if (hr != DXFILE_OK)
|
|
|
|
goto end;
|
|
|
|
|
|
|
|
hr = IDirectXFileEnumObject_GetNextDataObject(pEnumObject, &pData);
|
|
|
|
if (hr != DXFILE_OK)
|
|
|
|
goto end;
|
|
|
|
|
|
|
|
hr = IDirectXFileData_GetType(pData, &pGuid);
|
|
|
|
if (hr != DXFILE_OK)
|
|
|
|
goto end;
|
|
|
|
|
|
|
|
TRACE("Found object type whose GUID = %s\n", debugstr_guid(pGuid));
|
|
|
|
|
|
|
|
if (!IsEqualGUID(pGuid, &TID_DXFILEHeader))
|
|
|
|
{
|
|
|
|
ret = D3DRMERR_BADFILE;
|
|
|
|
goto end;
|
|
|
|
}
|
|
|
|
|
|
|
|
hr = IDirectXFileData_GetData(pData, NULL, &size, (void**)&pHeader);
|
|
|
|
if ((hr != DXFILE_OK) || (size != sizeof(Header)))
|
|
|
|
goto end;
|
|
|
|
|
|
|
|
TRACE("Version is %d %d %d\n", pHeader->major, pHeader->minor, pHeader->flags);
|
|
|
|
|
|
|
|
/* Version must be 1.0.x */
|
|
|
|
if ((pHeader->major != 1) || (pHeader->minor != 0))
|
|
|
|
{
|
|
|
|
ret = D3DRMERR_BADFILE;
|
|
|
|
goto end;
|
|
|
|
}
|
|
|
|
|
|
|
|
IDirectXFileData_Release(pData);
|
|
|
|
pData = NULL;
|
|
|
|
|
|
|
|
while (1)
|
|
|
|
{
|
|
|
|
hr = IDirectXFileEnumObject_GetNextDataObject(pEnumObject, &pData);
|
|
|
|
if (hr == DXFILEERR_NOMOREOBJECTS)
|
|
|
|
{
|
|
|
|
TRACE("No more object\n");
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
else if (hr != DXFILE_OK)
|
|
|
|
{
|
2012-12-17 10:11:51 +01:00
|
|
|
ret = D3DRMERR_BADFILE;
|
2012-03-26 22:35:21 +02:00
|
|
|
goto end;
|
|
|
|
}
|
|
|
|
|
2013-04-22 15:18:44 +02:00
|
|
|
ret = load_data(iface, pData, iids, iid_count, load_cb, load_ctx, load_tex_cb, load_tex_ctx, parent_frame);
|
2012-05-15 08:08:22 +02:00
|
|
|
if (ret != D3DRM_OK)
|
2012-03-26 22:35:21 +02:00
|
|
|
goto end;
|
|
|
|
|
|
|
|
IDirectXFileData_Release(pData);
|
|
|
|
pData = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
ret = D3DRM_OK;
|
|
|
|
|
|
|
|
end:
|
|
|
|
if (pData)
|
|
|
|
IDirectXFileData_Release(pData);
|
|
|
|
if (pEnumObject)
|
|
|
|
IDirectXFileEnumObject_Release(pEnumObject);
|
|
|
|
if (pDXFile)
|
|
|
|
IDirectXFile_Release(pDXFile);
|
|
|
|
|
|
|
|
return ret;
|
2011-12-29 02:26:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRM3Impl_Tick(IDirect3DRM3* iface, D3DVALUE tick)
|
|
|
|
{
|
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%f): stub\n", iface, This, tick);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRM3Impl_CreateProgressiveMesh(IDirect3DRM3* iface,
|
|
|
|
LPDIRECT3DRMPROGRESSIVEMESH Mesh)
|
|
|
|
{
|
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p): stub\n", iface, This, Mesh);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRM3Impl_RegisterClient(IDirect3DRM3* iface, REFGUID rguid,
|
|
|
|
LPDWORD id)
|
|
|
|
{
|
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%s, %p): stub\n", iface, This, debugstr_guid(rguid), id);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRM3Impl_UnregisterClient(IDirect3DRM3* iface, REFGUID rguid)
|
|
|
|
{
|
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%s): stub\n", iface, This, debugstr_guid(rguid));
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-04-22 15:18:45 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRM3Impl_CreateClippedVisual(IDirect3DRM3 *iface,
|
|
|
|
IDirect3DRMVisual *visual, IDirect3DRMClippedVisual **clipped_visual)
|
2011-12-29 02:26:40 +01:00
|
|
|
{
|
2013-04-22 15:18:45 +02:00
|
|
|
FIXME("iface %p, visual %p, clipped_visual %p stub!\n", iface, visual, clipped_visual);
|
2011-12-29 02:26:40 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRM3Impl_SetOptions(IDirect3DRM3* iface, DWORD opt)
|
|
|
|
{
|
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%d): stub\n", iface, This, opt);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRM3Impl_GetOptions(IDirect3DRM3* iface, LPDWORD opt)
|
|
|
|
{
|
|
|
|
IDirect3DRMImpl *This = impl_from_IDirect3DRM3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p): stub\n", iface, This, opt);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const struct IDirect3DRM3Vtbl Direct3DRM3_Vtbl =
|
|
|
|
{
|
|
|
|
IDirect3DRM3Impl_QueryInterface,
|
|
|
|
IDirect3DRM3Impl_AddRef,
|
|
|
|
IDirect3DRM3Impl_Release,
|
|
|
|
IDirect3DRM3Impl_CreateObject,
|
|
|
|
IDirect3DRM3Impl_CreateFrame,
|
|
|
|
IDirect3DRM3Impl_CreateMesh,
|
|
|
|
IDirect3DRM3Impl_CreateMeshBuilder,
|
|
|
|
IDirect3DRM3Impl_CreateFace,
|
|
|
|
IDirect3DRM3Impl_CreateAnimation,
|
|
|
|
IDirect3DRM3Impl_CreateAnimationSet,
|
|
|
|
IDirect3DRM3Impl_CreateTexture,
|
|
|
|
IDirect3DRM3Impl_CreateLight,
|
|
|
|
IDirect3DRM3Impl_CreateLightRGB,
|
2012-05-22 22:05:16 +02:00
|
|
|
IDirect3DRM3Impl_CreateMaterial,
|
2011-12-29 02:26:40 +01:00
|
|
|
IDirect3DRM3Impl_CreateDevice,
|
|
|
|
IDirect3DRM3Impl_CreateDeviceFromSurface,
|
|
|
|
IDirect3DRM3Impl_CreateDeviceFromD3D,
|
|
|
|
IDirect3DRM3Impl_CreateDeviceFromClipper,
|
|
|
|
IDirect3DRM3Impl_CreateTextureFromSurface,
|
|
|
|
IDirect3DRM3Impl_CreateShadow,
|
|
|
|
IDirect3DRM3Impl_CreateViewport,
|
|
|
|
IDirect3DRM3Impl_CreateWrap,
|
|
|
|
IDirect3DRM3Impl_CreateUserVisual,
|
|
|
|
IDirect3DRM3Impl_LoadTexture,
|
|
|
|
IDirect3DRM3Impl_LoadTextureFromResource,
|
|
|
|
IDirect3DRM3Impl_SetSearchPath,
|
|
|
|
IDirect3DRM3Impl_AddSearchPath,
|
|
|
|
IDirect3DRM3Impl_GetSearchPath,
|
|
|
|
IDirect3DRM3Impl_SetDefaultTextureColors,
|
|
|
|
IDirect3DRM3Impl_SetDefaultTextureShades,
|
|
|
|
IDirect3DRM3Impl_GetDevices,
|
|
|
|
IDirect3DRM3Impl_GetNamedObject,
|
|
|
|
IDirect3DRM3Impl_EnumerateObjects,
|
|
|
|
IDirect3DRM3Impl_Load,
|
|
|
|
IDirect3DRM3Impl_Tick,
|
|
|
|
IDirect3DRM3Impl_CreateProgressiveMesh,
|
|
|
|
IDirect3DRM3Impl_RegisterClient,
|
|
|
|
IDirect3DRM3Impl_UnregisterClient,
|
|
|
|
IDirect3DRM3Impl_CreateClippedVisual,
|
|
|
|
IDirect3DRM3Impl_SetOptions,
|
|
|
|
IDirect3DRM3Impl_GetOptions
|
|
|
|
};
|
2012-01-19 22:05:06 +01:00
|
|
|
|
2013-04-15 08:14:53 +02:00
|
|
|
HRESULT WINAPI Direct3DRMCreate(IDirect3DRM **d3drm)
|
2012-01-19 22:05:06 +01:00
|
|
|
{
|
2013-04-15 08:14:53 +02:00
|
|
|
IDirect3DRMImpl *object;
|
2012-01-19 22:05:06 +01:00
|
|
|
|
2013-04-15 08:14:53 +02:00
|
|
|
TRACE("d3drm %p.\n", d3drm);
|
2012-01-19 22:05:06 +01:00
|
|
|
|
2013-04-15 08:14:53 +02:00
|
|
|
if (!(object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object))))
|
2012-01-19 22:05:06 +01:00
|
|
|
return E_OUTOFMEMORY;
|
|
|
|
|
|
|
|
object->IDirect3DRM_iface.lpVtbl = &Direct3DRM_Vtbl;
|
|
|
|
object->IDirect3DRM2_iface.lpVtbl = &Direct3DRM2_Vtbl;
|
|
|
|
object->IDirect3DRM3_iface.lpVtbl = &Direct3DRM3_Vtbl;
|
|
|
|
object->ref = 1;
|
|
|
|
|
2013-04-15 08:14:53 +02:00
|
|
|
*d3drm = &object->IDirect3DRM_iface;
|
2012-01-19 22:05:06 +01:00
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|