2011-12-30 16:42:59 +01:00
|
|
|
/*
|
|
|
|
* Implementation of IDirect3DRMFrame Interface
|
|
|
|
*
|
2012-01-04 19:12:32 +01:00
|
|
|
* Copyright 2011, 2012 André Hentschel
|
2012-05-15 08:08:31 +02:00
|
|
|
* Copyright 2012 Christian Costa
|
2011-12-30 16:42:59 +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
|
|
|
|
*/
|
|
|
|
|
2012-04-13 13:55:15 +02:00
|
|
|
#include <assert.h>
|
2011-12-30 16:42:59 +01:00
|
|
|
#include "wine/debug.h"
|
|
|
|
|
|
|
|
#define COBJMACROS
|
|
|
|
|
|
|
|
#include "winbase.h"
|
|
|
|
#include "wingdi.h"
|
|
|
|
|
|
|
|
#include "d3drm_private.h"
|
|
|
|
|
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(d3drm);
|
|
|
|
|
2012-05-08 22:31:16 +02:00
|
|
|
static D3DRMMATRIX4D identity = {
|
|
|
|
{ 1.0f, 0.0f, 0.0f, 0.0f },
|
|
|
|
{ 0.0f, 1.0f, 0.0f, 0.0f },
|
|
|
|
{ 0.0f, 0.0f, 1.0f, 0.0f },
|
|
|
|
{ 0.0f, 0.0f, 0.0f, 1.0f }
|
|
|
|
};
|
|
|
|
|
2012-05-03 09:40:17 +02:00
|
|
|
typedef struct IDirect3DRMFrameImpl IDirect3DRMFrameImpl;
|
|
|
|
|
|
|
|
struct IDirect3DRMFrameImpl {
|
2011-12-30 16:42:59 +01:00
|
|
|
IDirect3DRMFrame2 IDirect3DRMFrame2_iface;
|
2012-01-04 19:12:32 +01:00
|
|
|
IDirect3DRMFrame3 IDirect3DRMFrame3_iface;
|
2011-12-30 16:42:59 +01:00
|
|
|
LONG ref;
|
2012-05-03 09:40:17 +02:00
|
|
|
IDirect3DRMFrameImpl* parent;
|
2012-04-13 13:55:15 +02:00
|
|
|
ULONG nb_children;
|
|
|
|
ULONG children_capacity;
|
|
|
|
IDirect3DRMFrame3** children;
|
2012-04-30 17:10:27 +02:00
|
|
|
ULONG nb_visuals;
|
|
|
|
ULONG visuals_capacity;
|
|
|
|
IDirect3DRMVisual** visuals;
|
2012-05-01 22:15:49 +02:00
|
|
|
ULONG nb_lights;
|
|
|
|
ULONG lights_capacity;
|
|
|
|
IDirect3DRMLight** lights;
|
2012-05-08 22:31:16 +02:00
|
|
|
D3DRMMATRIX4D transform;
|
2012-08-05 17:44:46 +02:00
|
|
|
D3DCOLOR scenebackground;
|
2012-05-03 09:40:17 +02:00
|
|
|
};
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-05-03 09:40:26 +02:00
|
|
|
typedef struct {
|
|
|
|
IDirect3DRMFrameArray IDirect3DRMFrameArray_iface;
|
|
|
|
LONG ref;
|
|
|
|
ULONG size;
|
2013-04-19 08:34:15 +02:00
|
|
|
IDirect3DRMFrame **frames;
|
2012-05-03 09:40:26 +02:00
|
|
|
} IDirect3DRMFrameArrayImpl;
|
|
|
|
|
2012-05-15 08:08:31 +02:00
|
|
|
typedef struct {
|
|
|
|
IDirect3DRMVisualArray IDirect3DRMVisualArray_iface;
|
|
|
|
LONG ref;
|
|
|
|
ULONG size;
|
2013-04-22 15:18:45 +02:00
|
|
|
IDirect3DRMVisual **visuals;
|
2012-05-15 08:08:31 +02:00
|
|
|
} IDirect3DRMVisualArrayImpl;
|
|
|
|
|
2012-05-27 17:44:19 +02:00
|
|
|
typedef struct {
|
|
|
|
IDirect3DRMLightArray IDirect3DRMLightArray_iface;
|
|
|
|
LONG ref;
|
|
|
|
ULONG size;
|
2013-04-25 09:59:46 +02:00
|
|
|
IDirect3DRMLight **lights;
|
2012-05-27 17:44:19 +02:00
|
|
|
} IDirect3DRMLightArrayImpl;
|
|
|
|
|
2011-12-30 16:42:59 +01:00
|
|
|
static inline IDirect3DRMFrameImpl *impl_from_IDirect3DRMFrame2(IDirect3DRMFrame2 *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, IDirect3DRMFrameImpl, IDirect3DRMFrame2_iface);
|
|
|
|
}
|
|
|
|
|
2012-01-04 19:12:32 +01:00
|
|
|
static inline IDirect3DRMFrameImpl *impl_from_IDirect3DRMFrame3(IDirect3DRMFrame3 *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, IDirect3DRMFrameImpl, IDirect3DRMFrame3_iface);
|
|
|
|
}
|
|
|
|
|
2012-05-03 09:40:17 +02:00
|
|
|
static inline IDirect3DRMFrameImpl *unsafe_impl_from_IDirect3DRMFrame3(IDirect3DRMFrame3 *iface);
|
2012-04-13 13:55:15 +02:00
|
|
|
|
2012-05-27 17:44:19 +02:00
|
|
|
static inline IDirect3DRMLightArrayImpl *impl_from_IDirect3DRMLightArray(IDirect3DRMLightArray *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, IDirect3DRMLightArrayImpl, IDirect3DRMLightArray_iface);
|
|
|
|
}
|
|
|
|
|
2011-12-30 16:42:59 +01:00
|
|
|
/*** IUnknown methods ***/
|
2012-06-12 10:23:23 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrameArrayImpl_QueryInterface(IDirect3DRMFrameArray* iface,
|
|
|
|
REFIID riid, void** object)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2012-06-12 10:23:23 +02:00
|
|
|
IDirect3DRMFrameArrayImpl *This = (IDirect3DRMFrameArrayImpl*)iface;
|
2011-12-30 16:42:59 +01:00
|
|
|
|
|
|
|
TRACE("(%p/%p)->(%s, %p)\n", iface, This, debugstr_guid(riid), object);
|
|
|
|
|
|
|
|
*object = NULL;
|
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
if (IsEqualGUID(riid, &IID_IUnknown) ||
|
|
|
|
IsEqualGUID(riid, &IID_IDirect3DRMFrameArray))
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2012-06-12 10:23:23 +02:00
|
|
|
*object = &This->IDirect3DRMFrameArray_iface;
|
2012-01-04 19:12:32 +01:00
|
|
|
}
|
2011-12-30 16:42:59 +01:00
|
|
|
else
|
|
|
|
{
|
|
|
|
FIXME("interface %s not implemented\n", debugstr_guid(riid));
|
|
|
|
return E_NOINTERFACE;
|
|
|
|
}
|
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
IDirect3DRMFrameArray_AddRef(iface);
|
2011-12-30 16:42:59 +01:00
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
static ULONG WINAPI IDirect3DRMFrameArrayImpl_AddRef(IDirect3DRMFrameArray* iface)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2012-06-12 10:23:23 +02:00
|
|
|
IDirect3DRMFrameArrayImpl *This = (IDirect3DRMFrameArrayImpl*)iface;
|
2012-03-16 08:16:10 +01:00
|
|
|
ULONG ref = InterlockedIncrement(&This->ref);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
TRACE("(%p)->(): new ref = %u\n", This, ref);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-03-16 08:16:10 +01:00
|
|
|
return ref;
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
static ULONG WINAPI IDirect3DRMFrameArrayImpl_Release(IDirect3DRMFrameArray* iface)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2012-06-12 10:23:23 +02:00
|
|
|
IDirect3DRMFrameArrayImpl *This = (IDirect3DRMFrameArrayImpl*)iface;
|
2011-12-30 16:42:59 +01:00
|
|
|
ULONG ref = InterlockedDecrement(&This->ref);
|
2012-04-13 13:55:15 +02:00
|
|
|
ULONG i;
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
TRACE("(%p)->(): new ref = %u\n", This, ref);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
|
|
|
if (!ref)
|
2012-04-13 13:55:15 +02:00
|
|
|
{
|
2012-06-12 10:23:23 +02:00
|
|
|
for (i = 0; i < This->size; i++)
|
|
|
|
IDirect3DRMFrame_Release(This->frames[i]);
|
|
|
|
HeapFree(GetProcessHeap(), 0, This->frames);
|
2011-12-30 16:42:59 +01:00
|
|
|
HeapFree(GetProcessHeap(), 0, This);
|
2012-04-13 13:55:15 +02:00
|
|
|
}
|
2011-12-30 16:42:59 +01:00
|
|
|
|
|
|
|
return ref;
|
|
|
|
}
|
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
/*** IDirect3DRMArray methods ***/
|
|
|
|
static DWORD WINAPI IDirect3DRMFrameArrayImpl_GetSize(IDirect3DRMFrameArray* iface)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2012-06-12 10:23:23 +02:00
|
|
|
IDirect3DRMFrameArrayImpl *This = (IDirect3DRMFrameArrayImpl*)iface;
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
TRACE("(%p)->() = %d\n", This, This->size);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
return This->size;
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
/*** IDirect3DRMFrameArray methods ***/
|
2013-04-19 08:34:15 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrameArrayImpl_GetElement(IDirect3DRMFrameArray *iface,
|
|
|
|
DWORD index, IDirect3DRMFrame **frame)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2012-06-12 10:23:23 +02:00
|
|
|
IDirect3DRMFrameArrayImpl *This = (IDirect3DRMFrameArrayImpl*)iface;
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
TRACE("(%p)->(%u, %p)\n", This, index, frame);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
if (!frame)
|
|
|
|
return D3DRMERR_BADVALUE;
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
*frame = NULL;
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
if (index >= This->size)
|
|
|
|
return D3DRMERR_BADVALUE;
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
IDirect3DRMFrame_AddRef(This->frames[index]);
|
|
|
|
*frame = This->frames[index];
|
|
|
|
|
|
|
|
return D3DRM_OK;
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
static const struct IDirect3DRMFrameArrayVtbl Direct3DRMFrameArray_Vtbl =
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2012-06-12 10:23:23 +02:00
|
|
|
/*** IUnknown methods ***/
|
|
|
|
IDirect3DRMFrameArrayImpl_QueryInterface,
|
|
|
|
IDirect3DRMFrameArrayImpl_AddRef,
|
|
|
|
IDirect3DRMFrameArrayImpl_Release,
|
|
|
|
/*** IDirect3DRMArray methods ***/
|
|
|
|
IDirect3DRMFrameArrayImpl_GetSize,
|
|
|
|
/*** IDirect3DRMFrameArray methods ***/
|
|
|
|
IDirect3DRMFrameArrayImpl_GetElement
|
|
|
|
};
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:37 +02:00
|
|
|
static HRESULT Direct3DRMFrameArray_create(IDirect3DRMFrameArray** obj)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2012-06-12 10:23:23 +02:00
|
|
|
IDirect3DRMFrameArrayImpl* object;
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
TRACE("(%p)\n", obj);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
*obj = NULL;
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMFrameArrayImpl));
|
|
|
|
if (!object)
|
|
|
|
return E_OUTOFMEMORY;
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
object->IDirect3DRMFrameArray_iface.lpVtbl = &Direct3DRMFrameArray_Vtbl;
|
|
|
|
object->ref = 1;
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
*obj = &object->IDirect3DRMFrameArray_iface;
|
|
|
|
|
|
|
|
return S_OK;
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
/*** IUnknown methods ***/
|
|
|
|
static HRESULT WINAPI IDirect3DRMVisualArrayImpl_QueryInterface(IDirect3DRMVisualArray* iface,
|
|
|
|
REFIID riid, void** ret_iface)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2012-06-12 10:23:23 +02:00
|
|
|
TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), ret_iface);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
if (IsEqualGUID(riid, &IID_IUnknown) ||
|
|
|
|
IsEqualGUID(riid, &IID_IDirect3DRMFrameArray))
|
|
|
|
{
|
|
|
|
*ret_iface = iface;
|
|
|
|
IDirect3DRMVisualArray_AddRef(iface);
|
|
|
|
return S_OK;
|
|
|
|
}
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
*ret_iface = NULL;
|
|
|
|
|
|
|
|
WARN("Interface %s not implemented\n", debugstr_guid(riid));
|
|
|
|
|
|
|
|
return E_NOINTERFACE;
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
static ULONG WINAPI IDirect3DRMVisualArrayImpl_AddRef(IDirect3DRMVisualArray* iface)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2012-06-12 10:23:23 +02:00
|
|
|
IDirect3DRMVisualArrayImpl *This = (IDirect3DRMVisualArrayImpl*)iface;
|
|
|
|
ULONG ref = InterlockedIncrement(&This->ref);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
TRACE("(%p)->(): new ref = %u\n", iface, ref);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
return ref;
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
static ULONG WINAPI IDirect3DRMVisualArrayImpl_Release(IDirect3DRMVisualArray* iface)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2012-06-12 10:23:23 +02:00
|
|
|
IDirect3DRMVisualArrayImpl *This = (IDirect3DRMVisualArrayImpl*)iface;
|
|
|
|
ULONG ref = InterlockedDecrement(&This->ref);
|
|
|
|
ULONG i;
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
TRACE("(%p)->(): new ref = %u\n", iface, ref);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
if (!ref)
|
|
|
|
{
|
|
|
|
for (i = 0; i < This->size; i++)
|
|
|
|
IDirect3DRMVisual_Release(This->visuals[i]);
|
|
|
|
HeapFree(GetProcessHeap(), 0, This->visuals);
|
|
|
|
HeapFree(GetProcessHeap(), 0, This);
|
|
|
|
}
|
2012-04-13 13:55:15 +02:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
return ref;
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
/*** IDirect3DRMArray methods ***/
|
|
|
|
static DWORD WINAPI IDirect3DRMVisualArrayImpl_GetSize(IDirect3DRMVisualArray* iface)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2012-06-12 10:23:23 +02:00
|
|
|
IDirect3DRMVisualArrayImpl *This = (IDirect3DRMVisualArrayImpl*)iface;
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
TRACE("(%p)->() = %d\n", iface, This->size);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
return This->size;
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
/*** IDirect3DRMVisualArray methods ***/
|
2013-04-22 15:18:45 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMVisualArrayImpl_GetElement(IDirect3DRMVisualArray *iface,
|
|
|
|
DWORD index, IDirect3DRMVisual **visual)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2012-06-12 10:23:23 +02:00
|
|
|
IDirect3DRMVisualArrayImpl *This = (IDirect3DRMVisualArrayImpl*)iface;
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
TRACE("(%p)->(%u, %p)\n", iface, index, visual);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
if (!visual)
|
|
|
|
return D3DRMERR_BADVALUE;
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
*visual = NULL;
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
if (index >= This->size)
|
|
|
|
return D3DRMERR_BADVALUE;
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
IDirect3DRMVisual_AddRef(This->visuals[index]);
|
|
|
|
*visual = This->visuals[index];
|
|
|
|
|
|
|
|
return D3DRM_OK;
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
static const struct IDirect3DRMVisualArrayVtbl Direct3DRMVisualArray_Vtbl =
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2012-06-12 10:23:23 +02:00
|
|
|
/*** IUnknown methods ***/
|
|
|
|
IDirect3DRMVisualArrayImpl_QueryInterface,
|
|
|
|
IDirect3DRMVisualArrayImpl_AddRef,
|
|
|
|
IDirect3DRMVisualArrayImpl_Release,
|
|
|
|
/*** IDirect3DRMArray methods ***/
|
|
|
|
IDirect3DRMVisualArrayImpl_GetSize,
|
|
|
|
/*** IDirect3DRMVisualArray methods ***/
|
|
|
|
IDirect3DRMVisualArrayImpl_GetElement
|
|
|
|
};
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:37 +02:00
|
|
|
static HRESULT Direct3DRMVisualArray_create(IDirect3DRMVisualArray** ret_iface)
|
2012-06-12 10:23:23 +02:00
|
|
|
{
|
|
|
|
IDirect3DRMVisualArrayImpl* object;
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
TRACE("(%p)\n", ret_iface);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
*ret_iface = NULL;
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMVisualArrayImpl));
|
|
|
|
if (!object)
|
|
|
|
return E_OUTOFMEMORY;
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
object->IDirect3DRMVisualArray_iface.lpVtbl = &Direct3DRMVisualArray_Vtbl;
|
|
|
|
object->ref = 1;
|
|
|
|
|
|
|
|
*ret_iface = &object->IDirect3DRMVisualArray_iface;
|
|
|
|
|
|
|
|
return S_OK;
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
/*** IUnknown methods ***/
|
|
|
|
static HRESULT WINAPI IDirect3DRMLightArrayImpl_QueryInterface(IDirect3DRMLightArray* iface,
|
|
|
|
REFIID riid, void** object)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2012-06-12 10:23:23 +02:00
|
|
|
IDirect3DRMLightArrayImpl *This = impl_from_IDirect3DRMLightArray(iface);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
TRACE("(%p/%p)->(%s, %p)\n", iface, This, debugstr_guid(riid), object);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
*object = NULL;
|
|
|
|
|
|
|
|
if (IsEqualGUID(riid, &IID_IUnknown) ||
|
|
|
|
IsEqualGUID(riid, &IID_IDirect3DRMLightArray))
|
|
|
|
{
|
|
|
|
*object = &This->IDirect3DRMLightArray_iface;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
FIXME("interface %s not implemented\n", debugstr_guid(riid));
|
|
|
|
return E_NOINTERFACE;
|
|
|
|
}
|
|
|
|
|
|
|
|
IDirect3DRMLightArray_AddRef(iface);
|
|
|
|
return S_OK;
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
static ULONG WINAPI IDirect3DRMLightArrayImpl_AddRef(IDirect3DRMLightArray* iface)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2012-06-12 10:23:23 +02:00
|
|
|
IDirect3DRMLightArrayImpl *This = impl_from_IDirect3DRMLightArray(iface);
|
|
|
|
ULONG ref = InterlockedIncrement(&This->ref);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
TRACE("(%p)->(): new ref = %u\n", This, ref);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
return ref;
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
static ULONG WINAPI IDirect3DRMLightArrayImpl_Release(IDirect3DRMLightArray* iface)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2012-06-12 10:23:23 +02:00
|
|
|
IDirect3DRMLightArrayImpl *This = impl_from_IDirect3DRMLightArray(iface);
|
|
|
|
ULONG ref = InterlockedDecrement(&This->ref);
|
|
|
|
ULONG i;
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
TRACE("(%p)->(): new ref = %u\n", This, ref);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
if (!ref)
|
|
|
|
{
|
|
|
|
for (i = 0; i < This->size; i++)
|
|
|
|
IDirect3DRMLight_Release(This->lights[i]);
|
|
|
|
HeapFree(GetProcessHeap(), 0, This->lights);
|
|
|
|
HeapFree(GetProcessHeap(), 0, This);
|
|
|
|
}
|
|
|
|
|
|
|
|
return ref;
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
/*** IDirect3DRMArray methods ***/
|
|
|
|
static DWORD WINAPI IDirect3DRMLightArrayImpl_GetSize(IDirect3DRMLightArray* iface)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2012-06-12 10:23:23 +02:00
|
|
|
IDirect3DRMLightArrayImpl *This = impl_from_IDirect3DRMLightArray(iface);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
TRACE("(%p)->() = %d\n", This, This->size);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
return This->size;
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
/*** IDirect3DRMLightArray methods ***/
|
2013-04-25 09:59:46 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMLightArrayImpl_GetElement(IDirect3DRMLightArray *iface,
|
|
|
|
DWORD index, IDirect3DRMLight **light)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2012-06-12 10:23:23 +02:00
|
|
|
IDirect3DRMLightArrayImpl *This = impl_from_IDirect3DRMLightArray(iface);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
TRACE("(%p)->(%u, %p)\n", This, index, light);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
if (!light)
|
|
|
|
return D3DRMERR_BADVALUE;
|
|
|
|
|
|
|
|
*light = NULL;
|
|
|
|
|
|
|
|
if (index >= This->size)
|
|
|
|
return D3DRMERR_BADVALUE;
|
|
|
|
|
|
|
|
IDirect3DRMLight_AddRef(This->lights[index]);
|
|
|
|
*light = This->lights[index];
|
|
|
|
|
|
|
|
return D3DRM_OK;
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
static const struct IDirect3DRMLightArrayVtbl Direct3DRMLightArray_Vtbl =
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2012-06-12 10:23:23 +02:00
|
|
|
/*** IUnknown methods ***/
|
|
|
|
IDirect3DRMLightArrayImpl_QueryInterface,
|
|
|
|
IDirect3DRMLightArrayImpl_AddRef,
|
|
|
|
IDirect3DRMLightArrayImpl_Release,
|
|
|
|
/*** IDirect3DRMArray methods ***/
|
|
|
|
IDirect3DRMLightArrayImpl_GetSize,
|
|
|
|
/*** IDirect3DRMLightArray methods ***/
|
|
|
|
IDirect3DRMLightArrayImpl_GetElement
|
|
|
|
};
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:37 +02:00
|
|
|
static HRESULT Direct3DRMLightArray_create(IDirect3DRMLightArray** obj)
|
2012-06-12 10:23:23 +02:00
|
|
|
{
|
|
|
|
IDirect3DRMLightArrayImpl* object;
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
TRACE("(%p)\n", obj);
|
|
|
|
|
|
|
|
*obj = NULL;
|
|
|
|
|
|
|
|
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMLightArrayImpl));
|
|
|
|
if (!object)
|
|
|
|
return E_OUTOFMEMORY;
|
|
|
|
|
|
|
|
object->IDirect3DRMLightArray_iface.lpVtbl = &Direct3DRMLightArray_Vtbl;
|
|
|
|
object->ref = 1;
|
|
|
|
|
|
|
|
*obj = &object->IDirect3DRMLightArray_iface;
|
|
|
|
|
|
|
|
return S_OK;
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
/*** IUnknown methods ***/
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_QueryInterface(IDirect3DRMFrame2* iface,
|
|
|
|
REFIID riid, void** object)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
TRACE("(%p/%p)->(%s, %p)\n", iface, This, debugstr_guid(riid), object);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
*object = NULL;
|
2012-05-03 09:40:17 +02:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
if(IsEqualGUID(riid, &IID_IUnknown) ||
|
|
|
|
IsEqualGUID(riid, &IID_IDirect3DRMFrame) ||
|
|
|
|
IsEqualGUID(riid, &IID_IDirect3DRMFrame2))
|
2012-05-03 09:40:17 +02:00
|
|
|
{
|
2012-06-12 10:23:23 +02:00
|
|
|
*object = &This->IDirect3DRMFrame2_iface;
|
|
|
|
}
|
|
|
|
else if(IsEqualGUID(riid, &IID_IDirect3DRMFrame3))
|
|
|
|
{
|
|
|
|
*object = &This->IDirect3DRMFrame3_iface;
|
2012-05-03 09:40:17 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2012-06-12 10:23:23 +02:00
|
|
|
FIXME("interface %s not implemented\n", debugstr_guid(riid));
|
|
|
|
return E_NOINTERFACE;
|
2012-05-03 09:40:17 +02:00
|
|
|
}
|
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
IDirect3DRMFrame2_AddRef(iface);
|
|
|
|
return S_OK;
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
static ULONG WINAPI IDirect3DRMFrame2Impl_AddRef(IDirect3DRMFrame2* iface)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
2012-06-12 10:23:23 +02:00
|
|
|
ULONG ref = InterlockedIncrement(&This->ref);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
TRACE("(%p)->(): new ref = %d\n", This, ref);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
return ref;
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
static ULONG WINAPI IDirect3DRMFrame2Impl_Release(IDirect3DRMFrame2* iface)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
2012-06-12 10:23:23 +02:00
|
|
|
ULONG ref = InterlockedDecrement(&This->ref);
|
|
|
|
ULONG i;
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
TRACE("(%p)->(): new ref = %d\n", This, ref);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
if (!ref)
|
|
|
|
{
|
|
|
|
for (i = 0; i < This->nb_children; i++)
|
|
|
|
IDirect3DRMFrame3_Release(This->children[i]);
|
|
|
|
HeapFree(GetProcessHeap(), 0, This->children);
|
|
|
|
for (i = 0; i < This->nb_visuals; i++)
|
|
|
|
IDirect3DRMVisual_Release(This->visuals[i]);
|
|
|
|
HeapFree(GetProcessHeap(), 0, This->visuals);
|
|
|
|
for (i = 0; i < This->nb_lights; i++)
|
|
|
|
IDirect3DRMLight_Release(This->lights[i]);
|
|
|
|
HeapFree(GetProcessHeap(), 0, This->lights);
|
|
|
|
HeapFree(GetProcessHeap(), 0, This);
|
|
|
|
}
|
|
|
|
|
|
|
|
return ref;
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
/*** IDirect3DRMObject methods ***/
|
2013-08-20 10:20:13 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_Clone(IDirect3DRMFrame2 *iface,
|
|
|
|
IUnknown *outer, REFIID iid, void **out)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2013-08-20 10:20:13 +02:00
|
|
|
FIXME("iface %p, outer %p, iid %s, out %p stub!\n", iface, outer, debugstr_guid(iid), out);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-09-09 10:26:21 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_AddDestroyCallback(IDirect3DRMFrame2 *iface,
|
|
|
|
D3DRMOBJECTCALLBACK cb, void *ctx)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2013-09-09 10:26:21 +02:00
|
|
|
FIXME("iface %p, cb %p, ctx %p stub!\n", iface, cb, ctx);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
return E_NOTIMPL;
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
2013-09-09 10:26:21 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteDestroyCallback(IDirect3DRMFrame2 *iface,
|
|
|
|
D3DRMOBJECTCALLBACK cb, void *ctx)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2013-09-09 10:26:21 +02:00
|
|
|
FIXME("iface %p, cb %p, ctx %p stub!\n", iface, cb, ctx);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_SetAppData(IDirect3DRMFrame2* iface,
|
|
|
|
DWORD data)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
FIXME("(%p/%p)->(%u): stub\n", iface, This, data);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
2012-05-08 22:31:16 +02:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
static DWORD WINAPI IDirect3DRMFrame2Impl_GetAppData(IDirect3DRMFrame2* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(): stub\n", iface, This);
|
|
|
|
|
|
|
|
return 0;
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
2013-09-06 09:57:43 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_SetName(IDirect3DRMFrame2 *iface, const char *name)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2013-09-06 09:57:43 +02:00
|
|
|
FIXME("iface %p, name %s stub!\n", iface, debugstr_a(name));
|
2011-12-30 16:42:59 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-09-09 10:26:20 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_GetName(IDirect3DRMFrame2 *iface, DWORD *size, char *name)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2013-09-09 10:26:20 +02:00
|
|
|
FIXME("iface %p, size %p, name %p stub!\n", iface, size, name);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-09-09 10:26:20 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_GetClassName(IDirect3DRMFrame2 *iface, DWORD *size, char *name)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2013-09-09 10:26:20 +02:00
|
|
|
IDirect3DRMFrameImpl *frame = impl_from_IDirect3DRMFrame2(iface);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2013-09-09 10:26:20 +02:00
|
|
|
TRACE("iface %p, size %p, name %p.\n", iface, size, name);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2013-09-09 10:26:20 +02:00
|
|
|
return IDirect3DRMFrame3_GetClassName(&frame->IDirect3DRMFrame3_iface, size, name);
|
2012-06-12 10:23:23 +02:00
|
|
|
}
|
2012-05-15 08:08:31 +02:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
/*** IDirect3DRMFrame methods ***/
|
2013-04-19 08:34:15 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_AddChild(IDirect3DRMFrame2 *iface, IDirect3DRMFrame *child)
|
2012-06-12 10:23:23 +02:00
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
2012-06-27 01:32:58 +02:00
|
|
|
IDirect3DRMFrame3 *frame;
|
|
|
|
HRESULT hr;
|
2012-05-15 08:08:31 +02:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
TRACE("(%p/%p)->(%p)\n", iface, This, child);
|
|
|
|
|
2012-06-27 01:32:58 +02:00
|
|
|
if (!child)
|
|
|
|
return D3DRMERR_BADOBJECT;
|
|
|
|
hr = IDirect3DRMFrame_QueryInterface(child, &IID_IDirect3DRMFrame3, (void**)&frame);
|
|
|
|
if (hr != S_OK)
|
2012-06-12 10:23:23 +02:00
|
|
|
return D3DRMERR_BADOBJECT;
|
2012-06-27 01:32:58 +02:00
|
|
|
IDirect3DRMFrame_Release(child);
|
2012-06-12 10:23:23 +02:00
|
|
|
|
2012-06-27 01:32:58 +02:00
|
|
|
return IDirect3DRMFrame3_AddChild(&This->IDirect3DRMFrame3_iface, frame);
|
2012-06-12 10:23:23 +02:00
|
|
|
}
|
|
|
|
|
2013-04-25 09:59:46 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_AddLight(IDirect3DRMFrame2 *iface, IDirect3DRMLight *light)
|
2012-06-12 10:23:23 +02:00
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
TRACE("(%p/%p)->(%p)\n", iface, This, light);
|
|
|
|
|
|
|
|
return IDirect3DRMFrame3_AddLight(&This->IDirect3DRMFrame3_iface, light);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_AddMoveCallback(IDirect3DRMFrame2* iface,
|
|
|
|
D3DRMFRAMEMOVECALLBACK cb, VOID *arg)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, cb, arg);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_AddTransform(IDirect3DRMFrame2* iface,
|
|
|
|
D3DRMCOMBINETYPE type,
|
|
|
|
D3DRMMATRIX4D matrix)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
TRACE("(%p/%p)->(%u,%p)\n", iface, This, type, matrix);
|
|
|
|
|
|
|
|
return IDirect3DRMFrame3_AddTransform(&This->IDirect3DRMFrame3_iface, type, matrix);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_AddTranslation(IDirect3DRMFrame2* iface,
|
|
|
|
D3DRMCOMBINETYPE type,
|
|
|
|
D3DVALUE x, D3DVALUE y, D3DVALUE z)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%u,%f,%f,%f): stub\n", iface, This, type, x, y, z);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_AddScale(IDirect3DRMFrame2* iface,
|
|
|
|
D3DRMCOMBINETYPE type,
|
|
|
|
D3DVALUE sx, D3DVALUE sy, D3DVALUE sz)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%u,%f,%f,%f): stub\n", iface, This, type, sx, sy, sz);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_AddRotation(IDirect3DRMFrame2* iface,
|
|
|
|
D3DRMCOMBINETYPE type,
|
|
|
|
D3DVALUE x, D3DVALUE y, D3DVALUE z,
|
|
|
|
D3DVALUE theta)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%u,%f,%f,%f,%f): stub\n", iface, This, type, x, y, z, theta);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-04-22 15:18:45 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_AddVisual(IDirect3DRMFrame2 *iface, IDirect3DRMVisual *visual)
|
2012-06-12 10:23:23 +02:00
|
|
|
{
|
2013-04-22 15:18:45 +02:00
|
|
|
IDirect3DRMFrameImpl *frame = impl_from_IDirect3DRMFrame2(iface);
|
2012-06-12 10:23:23 +02:00
|
|
|
|
2013-04-22 15:18:45 +02:00
|
|
|
TRACE("iface %p, visual %p.\n", iface, visual);
|
2012-06-12 10:23:23 +02:00
|
|
|
|
2013-04-22 15:18:45 +02:00
|
|
|
return IDirect3DRMFrame3_AddVisual(&frame->IDirect3DRMFrame3_iface, (IUnknown *)visual);
|
2012-06-12 10:23:23 +02:00
|
|
|
}
|
|
|
|
|
2013-06-05 11:06:14 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_GetChildren(IDirect3DRMFrame2 *iface, IDirect3DRMFrameArray **children)
|
2012-06-12 10:23:23 +02:00
|
|
|
{
|
2013-06-05 11:06:14 +02:00
|
|
|
IDirect3DRMFrameImpl *frame = impl_from_IDirect3DRMFrame2(iface);
|
2012-06-12 10:23:23 +02:00
|
|
|
|
2013-06-05 11:06:14 +02:00
|
|
|
TRACE("iface %p, children %p.\n", iface, children);
|
2012-06-12 10:23:23 +02:00
|
|
|
|
2013-06-05 11:06:14 +02:00
|
|
|
return IDirect3DRMFrame3_GetChildren(&frame->IDirect3DRMFrame3_iface, children);
|
2012-06-12 10:23:23 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static D3DCOLOR WINAPI IDirect3DRMFrame2Impl_GetColor(IDirect3DRMFrame2* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(): stub\n", iface, This);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2013-08-13 08:51:48 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_GetLights(IDirect3DRMFrame2 *iface, IDirect3DRMLightArray **lights)
|
2012-06-12 10:23:23 +02:00
|
|
|
{
|
2013-08-13 08:51:48 +02:00
|
|
|
IDirect3DRMFrameImpl *frame = impl_from_IDirect3DRMFrame2(iface);
|
2012-06-12 10:23:23 +02:00
|
|
|
|
2013-08-13 08:51:48 +02:00
|
|
|
TRACE("iface %p, lights %p.\n", iface, lights);
|
2012-06-12 10:23:23 +02:00
|
|
|
|
2013-08-13 08:51:48 +02:00
|
|
|
return IDirect3DRMFrame3_GetLights(&frame->IDirect3DRMFrame3_iface, lights);
|
2012-06-12 10:23:23 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static D3DRMMATERIALMODE WINAPI IDirect3DRMFrame2Impl_GetMaterialMode(IDirect3DRMFrame2* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(): stub\n", iface, This);
|
|
|
|
|
|
|
|
return D3DRMMATERIAL_FROMPARENT;
|
|
|
|
}
|
|
|
|
|
2013-04-19 08:34:15 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_GetParent(IDirect3DRMFrame2 *iface, IDirect3DRMFrame **frame)
|
2012-06-12 10:23:23 +02:00
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
TRACE("(%p/%p)->(%p)\n", iface, This, frame);
|
|
|
|
|
|
|
|
if (!frame)
|
|
|
|
return D3DRMERR_BADVALUE;
|
|
|
|
|
|
|
|
if (This->parent)
|
|
|
|
{
|
2013-04-19 08:34:15 +02:00
|
|
|
*frame = (IDirect3DRMFrame *)&This->parent->IDirect3DRMFrame2_iface;
|
2012-06-12 10:23:23 +02:00
|
|
|
IDirect3DRMFrame_AddRef(*frame);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
*frame = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
return D3DRM_OK;
|
|
|
|
}
|
|
|
|
|
2013-01-23 08:50:10 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_GetPosition(IDirect3DRMFrame2 *iface,
|
|
|
|
IDirect3DRMFrame *reference, D3DVECTOR *return_position)
|
2012-06-12 10:23:23 +02:00
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, reference, return_position);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-01-23 08:50:09 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_GetRotation(IDirect3DRMFrame2 *iface,
|
|
|
|
IDirect3DRMFrame *reference, D3DVECTOR *axis, D3DVALUE *return_theta)
|
2012-06-12 10:23:23 +02:00
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, reference, axis, return_theta);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-04-19 08:34:15 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_GetScene(IDirect3DRMFrame2 *iface, IDirect3DRMFrame **scene)
|
2012-06-12 10:23:23 +02:00
|
|
|
{
|
2013-04-19 08:34:15 +02:00
|
|
|
FIXME("iface %p, frame %p stub!\n", iface, scene);
|
2012-06-12 10:23:23 +02:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static D3DRMSORTMODE WINAPI IDirect3DRMFrame2Impl_GetSortMode(IDirect3DRMFrame2* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(): stub\n", iface, This);
|
|
|
|
|
|
|
|
return D3DRMSORT_FROMPARENT;
|
|
|
|
}
|
|
|
|
|
2013-05-27 09:22:51 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_GetTexture(IDirect3DRMFrame2 *iface, IDirect3DRMTexture **texture)
|
2012-06-12 10:23:23 +02:00
|
|
|
{
|
2013-05-27 09:22:51 +02:00
|
|
|
FIXME("iface %p, texture %p stub!\n", iface, texture);
|
2012-06-12 10:23:23 +02:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_GetTransform(IDirect3DRMFrame2* iface,
|
|
|
|
D3DRMMATRIX4D return_matrix)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
TRACE("(%p/%p)->(%p)\n", iface, This, return_matrix);
|
|
|
|
|
2012-10-19 00:06:12 +02:00
|
|
|
memcpy(return_matrix, This->transform, sizeof(D3DRMMATRIX4D));
|
2012-06-12 10:23:23 +02:00
|
|
|
|
|
|
|
return D3DRM_OK;
|
|
|
|
}
|
|
|
|
|
2013-01-23 08:50:10 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_GetVelocity(IDirect3DRMFrame2 *iface,
|
|
|
|
IDirect3DRMFrame *reference, D3DVECTOR *return_velocity, BOOL with_rotation)
|
2012-06-12 10:23:23 +02:00
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p,%p,%d): stub\n", iface, This, reference, return_velocity, with_rotation);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-01-23 08:50:10 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_GetOrientation(IDirect3DRMFrame2 *iface,
|
|
|
|
IDirect3DRMFrame *reference, D3DVECTOR *dir, D3DVECTOR *up)
|
2012-06-12 10:23:23 +02:00
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, reference, dir, up);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-06-06 10:51:50 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_GetVisuals(IDirect3DRMFrame2 *iface, IDirect3DRMVisualArray **visuals)
|
2012-06-12 10:23:23 +02:00
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
IDirect3DRMVisualArrayImpl* obj;
|
|
|
|
HRESULT hr;
|
|
|
|
|
|
|
|
TRACE("(%p/%p)->(%p)\n", iface, This, visuals);
|
|
|
|
|
|
|
|
if (!visuals)
|
|
|
|
return D3DRMERR_BADVALUE;
|
|
|
|
|
|
|
|
hr = Direct3DRMVisualArray_create(visuals);
|
|
|
|
|
|
|
|
if (hr != D3DRM_OK)
|
|
|
|
return hr;
|
2012-05-15 08:08:31 +02:00
|
|
|
|
|
|
|
obj = (IDirect3DRMVisualArrayImpl*)*visuals;
|
|
|
|
|
|
|
|
obj->size = This->nb_visuals;
|
|
|
|
if (This->nb_visuals)
|
|
|
|
{
|
|
|
|
ULONG i;
|
2013-04-22 15:18:45 +02:00
|
|
|
if (!(obj->visuals = HeapAlloc(GetProcessHeap(), 0, This->nb_visuals * sizeof(*obj->visuals))))
|
2012-05-15 08:08:31 +02:00
|
|
|
return E_OUTOFMEMORY;
|
|
|
|
for (i = 0; i < This->nb_visuals; i++)
|
|
|
|
{
|
|
|
|
obj->visuals[i] = This->visuals[i];
|
|
|
|
IDirect3DRMVisual_AddRef(This->visuals[i]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return D3DRM_OK;
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_GetTextureTopology(IDirect3DRMFrame2* iface,
|
|
|
|
BOOL *wrap_u, BOOL *wrap_v)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, wrap_u, wrap_v);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_InverseTransform(IDirect3DRMFrame2* iface,
|
|
|
|
D3DVECTOR *d, D3DVECTOR *s)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, d, s);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-09-09 10:26:21 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_Load(IDirect3DRMFrame2 *iface, void *filename,
|
|
|
|
void *name, D3DRMLOADOPTIONS flags, D3DRMLOADTEXTURECALLBACK cb, void *ctx)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2013-09-09 10:26:21 +02:00
|
|
|
FIXME("iface %p, filename %p, name %p, flags %#x, cb %p, ctx %p stub!\n",
|
|
|
|
iface, filename, name, flags, cb, ctx);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-04-19 08:34:15 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_LookAt(IDirect3DRMFrame2 *iface, IDirect3DRMFrame *target,
|
|
|
|
IDirect3DRMFrame *reference, D3DRMFRAMECONSTRAINT constraint)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2013-04-19 08:34:15 +02:00
|
|
|
FIXME("iface %p, target %p, reference %p, constraint %#x stub!\n", iface, target, reference, constraint);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_Move(IDirect3DRMFrame2* iface, D3DVALUE delta)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%f): stub\n", iface, This, delta);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-04-19 08:34:15 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteChild(IDirect3DRMFrame2 *iface, IDirect3DRMFrame *frame)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
2012-06-27 01:32:58 +02:00
|
|
|
IDirect3DRMFrame3 *child;
|
|
|
|
HRESULT hr;
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-04-13 13:55:23 +02:00
|
|
|
TRACE("(%p/%p)->(%p)\n", iface, This, frame);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-27 01:32:58 +02:00
|
|
|
if (!frame)
|
2012-04-13 13:55:23 +02:00
|
|
|
return D3DRMERR_BADOBJECT;
|
2012-06-27 01:32:58 +02:00
|
|
|
hr = IDirect3DRMFrame_QueryInterface(frame, &IID_IDirect3DRMFrame3, (void**)&child);
|
|
|
|
if (hr != S_OK)
|
|
|
|
return D3DRMERR_BADOBJECT;
|
|
|
|
IDirect3DRMFrame_Release(frame);
|
2012-04-13 13:55:23 +02:00
|
|
|
|
2012-06-27 01:32:58 +02:00
|
|
|
return IDirect3DRMFrame3_DeleteChild(&This->IDirect3DRMFrame3_iface, child);
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
2013-04-25 09:59:46 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteLight(IDirect3DRMFrame2 *iface, IDirect3DRMLight *light)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
2012-05-01 22:16:10 +02:00
|
|
|
TRACE("(%p/%p)->(%p)\n", iface, This, light);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-05-01 22:16:10 +02:00
|
|
|
return IDirect3DRMFrame3_DeleteLight(&This->IDirect3DRMFrame3_iface, light);
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteMoveCallback(IDirect3DRMFrame2* iface,
|
|
|
|
D3DRMFRAMEMOVECALLBACK cb, VOID *arg)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, cb, arg);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-04-22 15:18:45 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteVisual(IDirect3DRMFrame2 *iface, IDirect3DRMVisual *visual)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2013-04-22 15:18:45 +02:00
|
|
|
IDirect3DRMFrameImpl *frame = impl_from_IDirect3DRMFrame2(iface);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2013-04-22 15:18:45 +02:00
|
|
|
TRACE("iface %p, visual %p.\n", iface, visual);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2013-04-22 15:18:45 +02:00
|
|
|
return IDirect3DRMFrame3_DeleteVisual(&frame->IDirect3DRMFrame3_iface, (IUnknown *)visual);
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static D3DCOLOR WINAPI IDirect3DRMFrame2Impl_GetSceneBackground(IDirect3DRMFrame2* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
2012-08-05 17:44:46 +02:00
|
|
|
TRACE("(%p/%p)->()\n", iface, This);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-08-05 17:44:46 +02:00
|
|
|
return IDirect3DRMFrame3_GetSceneBackground(&This->IDirect3DRMFrame3_iface);
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
2012-11-19 22:04:10 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_GetSceneBackgroundDepth(IDirect3DRMFrame2 *iface,
|
|
|
|
IDirectDrawSurface **surface)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static D3DCOLOR WINAPI IDirect3DRMFrame2Impl_GetSceneFogColor(IDirect3DRMFrame2* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(): stub\n", iface, This);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static BOOL WINAPI IDirect3DRMFrame2Impl_GetSceneFogEnable(IDirect3DRMFrame2* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(): stub\n", iface, This);
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static D3DRMFOGMODE WINAPI IDirect3DRMFrame2Impl_GetSceneFogMode(IDirect3DRMFrame2* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(): stub\n", iface, This);
|
|
|
|
|
|
|
|
return D3DRMFOG_LINEAR;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_GetSceneFogParams(IDirect3DRMFrame2* iface,
|
|
|
|
D3DVALUE *return_start,
|
|
|
|
D3DVALUE *return_end,
|
|
|
|
D3DVALUE *return_density)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, return_start, return_end, return_density);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackground(IDirect3DRMFrame2* iface,
|
|
|
|
D3DCOLOR color)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
2012-08-05 17:44:46 +02:00
|
|
|
TRACE("(%p/%p)->(%u)\n", iface, This, color);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-08-05 17:44:46 +02:00
|
|
|
return IDirect3DRMFrame3_SetSceneBackground(&This->IDirect3DRMFrame3_iface, color);
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackgroundRGB(IDirect3DRMFrame2* iface,
|
|
|
|
D3DVALUE red, D3DVALUE green,
|
|
|
|
D3DVALUE blue)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
2012-08-05 17:44:46 +02:00
|
|
|
TRACE("(%p/%p)->(%f,%f,%f)\n", iface, This, red, green, blue);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-08-05 17:44:46 +02:00
|
|
|
return IDirect3DRMFrame3_SetSceneBackgroundRGB(&This->IDirect3DRMFrame3_iface, red, green, blue);
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
2012-11-19 22:04:10 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackgroundDepth(IDirect3DRMFrame2 *iface,
|
|
|
|
IDirectDrawSurface *surface)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-05-27 09:22:51 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackgroundImage(IDirect3DRMFrame2 *iface,
|
|
|
|
IDirect3DRMTexture *texture)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2013-05-27 09:22:51 +02:00
|
|
|
FIXME("iface %p, texture %p stub!\n", iface, texture);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneFogEnable(IDirect3DRMFrame2* iface, BOOL enable)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%d): stub\n", iface, This, enable);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneFogColor(IDirect3DRMFrame2* iface,
|
|
|
|
D3DCOLOR color)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneFogMode(IDirect3DRMFrame2* iface,
|
|
|
|
D3DRMFOGMODE mode)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneFogParams(IDirect3DRMFrame2* iface,
|
|
|
|
D3DVALUE start, D3DVALUE end,
|
|
|
|
D3DVALUE density)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, start, end, density);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_SetColor(IDirect3DRMFrame2* iface, D3DCOLOR color)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_SetColorRGB(IDirect3DRMFrame2* iface, D3DVALUE red,
|
|
|
|
D3DVALUE green, D3DVALUE blue)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, red, green, blue);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static D3DRMZBUFFERMODE WINAPI IDirect3DRMFrame2Impl_GetZbufferMode(IDirect3DRMFrame2* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(): stub\n", iface, This);
|
|
|
|
|
|
|
|
return D3DRMZBUFFER_FROMPARENT;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_SetMaterialMode(IDirect3DRMFrame2* iface,
|
|
|
|
D3DRMMATERIALMODE mode)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-04-19 08:34:15 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_SetOrientation(IDirect3DRMFrame2 *iface, IDirect3DRMFrame *reference,
|
|
|
|
D3DVALUE dx, D3DVALUE dy, D3DVALUE dz, D3DVALUE ux, D3DVALUE uy, D3DVALUE uz)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2013-04-19 08:34:15 +02:00
|
|
|
FIXME("iface %p, reference %p, dx %.8e, dy %.8e, dz %.8e, ux %.8e, uy %.8e, uz %.8e stub!\n",
|
|
|
|
iface, reference, dx, dy, dz, ux, uy, uz);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-04-19 08:34:15 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_SetPosition(IDirect3DRMFrame2 *iface, IDirect3DRMFrame *reference,
|
|
|
|
D3DVALUE x, D3DVALUE y, D3DVALUE z)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2013-04-19 08:34:15 +02:00
|
|
|
FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e stub!\n", iface, reference, x, y, z);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-04-19 08:34:15 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_SetRotation(IDirect3DRMFrame2 *iface,
|
|
|
|
IDirect3DRMFrame *reference, D3DVALUE x, D3DVALUE y, D3DVALUE z, D3DVALUE theta)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2013-04-19 08:34:15 +02:00
|
|
|
FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e, theta %.8e stub!\n",
|
|
|
|
iface, reference, x, y, z, theta);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSortMode(IDirect3DRMFrame2* iface,
|
|
|
|
D3DRMSORTMODE mode)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-05-27 09:22:51 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_SetTexture(IDirect3DRMFrame2 *iface, IDirect3DRMTexture *texture)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2013-05-27 09:22:51 +02:00
|
|
|
FIXME("iface %p, texture %p stub!\n", iface, texture);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_SetTextureTopology(IDirect3DRMFrame2* iface,
|
|
|
|
BOOL wrap_u, BOOL wrap_v)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%d,%d): stub\n", iface, This, wrap_u, wrap_v);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-04-19 08:34:15 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_SetVelocity(IDirect3DRMFrame2 *iface,
|
|
|
|
IDirect3DRMFrame *reference, D3DVALUE x, D3DVALUE y, D3DVALUE z, BOOL with_rotation)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2013-04-19 08:34:15 +02:00
|
|
|
FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e, with_rotation %#x stub!\n",
|
|
|
|
iface, reference, x, y, z, with_rotation);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_SetZbufferMode(IDirect3DRMFrame2* iface,
|
|
|
|
D3DRMZBUFFERMODE mode)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_Transform(IDirect3DRMFrame2* iface, D3DVECTOR *d,
|
|
|
|
D3DVECTOR *s)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, d, s);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*** IDirect3DRMFrame2 methods ***/
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_AddMoveCallback2(IDirect3DRMFrame2* iface,
|
|
|
|
D3DRMFRAMEMOVECALLBACK cb, VOID *arg,
|
|
|
|
DWORD flags)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p,%p,%u): stub\n", iface, This, cb, arg, flags);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-01-25 10:57:16 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_GetBox(IDirect3DRMFrame2 *iface, D3DRMBOX *box)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static BOOL WINAPI IDirect3DRMFrame2Impl_GetBoxEnable(IDirect3DRMFrame2* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(): stub\n", iface, This);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-01-23 08:50:10 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_GetAxes(IDirect3DRMFrame2 *iface,
|
|
|
|
D3DVECTOR *dir, D3DVECTOR *up)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, dir, up);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-05-28 08:55:21 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_GetMaterial(IDirect3DRMFrame2 *iface, IDirect3DRMMaterial **material)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2013-05-28 08:55:21 +02:00
|
|
|
FIXME("iface %p, material %p stub!\n", iface, material);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static BOOL WINAPI IDirect3DRMFrame2Impl_GetInheritAxes(IDirect3DRMFrame2* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(): stub\n", iface, This);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-01-25 10:57:16 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame2Impl_GetHierarchyBox(IDirect3DRMFrame2 *iface, D3DRMBOX *box)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const struct IDirect3DRMFrame2Vtbl Direct3DRMFrame2_Vtbl =
|
|
|
|
{
|
|
|
|
/*** IUnknown methods ***/
|
|
|
|
IDirect3DRMFrame2Impl_QueryInterface,
|
|
|
|
IDirect3DRMFrame2Impl_AddRef,
|
|
|
|
IDirect3DRMFrame2Impl_Release,
|
|
|
|
/*** IDirect3DRMObject methods ***/
|
|
|
|
IDirect3DRMFrame2Impl_Clone,
|
|
|
|
IDirect3DRMFrame2Impl_AddDestroyCallback,
|
|
|
|
IDirect3DRMFrame2Impl_DeleteDestroyCallback,
|
|
|
|
IDirect3DRMFrame2Impl_SetAppData,
|
|
|
|
IDirect3DRMFrame2Impl_GetAppData,
|
|
|
|
IDirect3DRMFrame2Impl_SetName,
|
|
|
|
IDirect3DRMFrame2Impl_GetName,
|
|
|
|
IDirect3DRMFrame2Impl_GetClassName,
|
|
|
|
/*** IDirect3DRMFrame methods ***/
|
|
|
|
IDirect3DRMFrame2Impl_AddChild,
|
|
|
|
IDirect3DRMFrame2Impl_AddLight,
|
|
|
|
IDirect3DRMFrame2Impl_AddMoveCallback,
|
|
|
|
IDirect3DRMFrame2Impl_AddTransform,
|
|
|
|
IDirect3DRMFrame2Impl_AddTranslation,
|
|
|
|
IDirect3DRMFrame2Impl_AddScale,
|
|
|
|
IDirect3DRMFrame2Impl_AddRotation,
|
|
|
|
IDirect3DRMFrame2Impl_AddVisual,
|
|
|
|
IDirect3DRMFrame2Impl_GetChildren,
|
|
|
|
IDirect3DRMFrame2Impl_GetColor,
|
|
|
|
IDirect3DRMFrame2Impl_GetLights,
|
|
|
|
IDirect3DRMFrame2Impl_GetMaterialMode,
|
|
|
|
IDirect3DRMFrame2Impl_GetParent,
|
|
|
|
IDirect3DRMFrame2Impl_GetPosition,
|
|
|
|
IDirect3DRMFrame2Impl_GetRotation,
|
|
|
|
IDirect3DRMFrame2Impl_GetScene,
|
|
|
|
IDirect3DRMFrame2Impl_GetSortMode,
|
|
|
|
IDirect3DRMFrame2Impl_GetTexture,
|
|
|
|
IDirect3DRMFrame2Impl_GetTransform,
|
|
|
|
IDirect3DRMFrame2Impl_GetVelocity,
|
|
|
|
IDirect3DRMFrame2Impl_GetOrientation,
|
|
|
|
IDirect3DRMFrame2Impl_GetVisuals,
|
|
|
|
IDirect3DRMFrame2Impl_GetTextureTopology,
|
|
|
|
IDirect3DRMFrame2Impl_InverseTransform,
|
|
|
|
IDirect3DRMFrame2Impl_Load,
|
|
|
|
IDirect3DRMFrame2Impl_LookAt,
|
|
|
|
IDirect3DRMFrame2Impl_Move,
|
|
|
|
IDirect3DRMFrame2Impl_DeleteChild,
|
|
|
|
IDirect3DRMFrame2Impl_DeleteLight,
|
|
|
|
IDirect3DRMFrame2Impl_DeleteMoveCallback,
|
|
|
|
IDirect3DRMFrame2Impl_DeleteVisual,
|
|
|
|
IDirect3DRMFrame2Impl_GetSceneBackground,
|
|
|
|
IDirect3DRMFrame2Impl_GetSceneBackgroundDepth,
|
|
|
|
IDirect3DRMFrame2Impl_GetSceneFogColor,
|
|
|
|
IDirect3DRMFrame2Impl_GetSceneFogEnable,
|
|
|
|
IDirect3DRMFrame2Impl_GetSceneFogMode,
|
|
|
|
IDirect3DRMFrame2Impl_GetSceneFogParams,
|
|
|
|
IDirect3DRMFrame2Impl_SetSceneBackground,
|
|
|
|
IDirect3DRMFrame2Impl_SetSceneBackgroundRGB,
|
|
|
|
IDirect3DRMFrame2Impl_SetSceneBackgroundDepth,
|
|
|
|
IDirect3DRMFrame2Impl_SetSceneBackgroundImage,
|
|
|
|
IDirect3DRMFrame2Impl_SetSceneFogEnable,
|
|
|
|
IDirect3DRMFrame2Impl_SetSceneFogColor,
|
|
|
|
IDirect3DRMFrame2Impl_SetSceneFogMode,
|
|
|
|
IDirect3DRMFrame2Impl_SetSceneFogParams,
|
|
|
|
IDirect3DRMFrame2Impl_SetColor,
|
|
|
|
IDirect3DRMFrame2Impl_SetColorRGB,
|
|
|
|
IDirect3DRMFrame2Impl_GetZbufferMode,
|
|
|
|
IDirect3DRMFrame2Impl_SetMaterialMode,
|
|
|
|
IDirect3DRMFrame2Impl_SetOrientation,
|
|
|
|
IDirect3DRMFrame2Impl_SetPosition,
|
|
|
|
IDirect3DRMFrame2Impl_SetRotation,
|
|
|
|
IDirect3DRMFrame2Impl_SetSortMode,
|
|
|
|
IDirect3DRMFrame2Impl_SetTexture,
|
|
|
|
IDirect3DRMFrame2Impl_SetTextureTopology,
|
|
|
|
IDirect3DRMFrame2Impl_SetVelocity,
|
|
|
|
IDirect3DRMFrame2Impl_SetZbufferMode,
|
|
|
|
IDirect3DRMFrame2Impl_Transform,
|
|
|
|
/*** IDirect3DRMFrame2 methods ***/
|
|
|
|
IDirect3DRMFrame2Impl_AddMoveCallback2,
|
|
|
|
IDirect3DRMFrame2Impl_GetBox,
|
|
|
|
IDirect3DRMFrame2Impl_GetBoxEnable,
|
|
|
|
IDirect3DRMFrame2Impl_GetAxes,
|
|
|
|
IDirect3DRMFrame2Impl_GetMaterial,
|
|
|
|
IDirect3DRMFrame2Impl_GetInheritAxes,
|
|
|
|
IDirect3DRMFrame2Impl_GetHierarchyBox
|
|
|
|
};
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
/*** IUnknown methods ***/
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_QueryInterface(IDirect3DRMFrame3* iface,
|
|
|
|
REFIID riid, void** object)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
return IDirect3DRMFrame_QueryInterface(&This->IDirect3DRMFrame2_iface, riid, object);
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI IDirect3DRMFrame3Impl_AddRef(IDirect3DRMFrame3* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
2012-01-22 18:35:53 +01:00
|
|
|
return IDirect3DRMFrame2_AddRef(&This->IDirect3DRMFrame2_iface);
|
2012-01-04 19:12:32 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI IDirect3DRMFrame3Impl_Release(IDirect3DRMFrame3* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
2012-01-22 18:35:53 +01:00
|
|
|
return IDirect3DRMFrame2_Release(&This->IDirect3DRMFrame2_iface);
|
2012-01-04 19:12:32 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/*** IDirect3DRMObject methods ***/
|
2013-08-20 10:20:13 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_Clone(IDirect3DRMFrame3 *iface,
|
|
|
|
IUnknown *outer, REFIID iid, void **out)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-08-20 10:20:13 +02:00
|
|
|
FIXME("iface %p, outer %p, iid %s, out %p stub!\n", iface, outer, debugstr_guid(iid), out);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-09-09 10:26:21 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_AddDestroyCallback(IDirect3DRMFrame3 *iface,
|
|
|
|
D3DRMOBJECTCALLBACK cb, void *ctx)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-09-09 10:26:21 +02:00
|
|
|
FIXME("iface %p, cb %p, ctx %p stub!\n", iface, cb, ctx);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-09-09 10:26:21 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteDestroyCallback(IDirect3DRMFrame3 *iface,
|
|
|
|
D3DRMOBJECTCALLBACK cb, void *ctx)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-09-09 10:26:21 +02:00
|
|
|
FIXME("iface %p, cb %p, ctx %p stub!\n", iface, cb, ctx);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_SetAppData(IDirect3DRMFrame3* iface,
|
|
|
|
DWORD data)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%u): stub\n", iface, This, data);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static DWORD WINAPI IDirect3DRMFrame3Impl_GetAppData(IDirect3DRMFrame3* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(): stub\n", iface, This);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2013-09-06 09:57:43 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_SetName(IDirect3DRMFrame3 *iface, const char *name)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-09-06 09:57:43 +02:00
|
|
|
FIXME("iface %p, name %s stub!\n", iface, debugstr_a(name));
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-09-09 10:26:20 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_GetName(IDirect3DRMFrame3 *iface, DWORD *size, char *name)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-09-09 10:26:20 +02:00
|
|
|
FIXME("iface %p, size %p, name %p stub!\n", iface, size, name);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-09-09 10:26:20 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_GetClassName(IDirect3DRMFrame3 *iface, DWORD *size, char *name)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-09-09 10:26:20 +02:00
|
|
|
TRACE("iface %p, size %p, name %p.\n", iface, size, name);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2012-06-14 20:29:21 +02:00
|
|
|
if (!size || *size < strlen("Frame") || !name)
|
|
|
|
return E_INVALIDARG;
|
|
|
|
|
|
|
|
strcpy(name, "Frame");
|
|
|
|
*size = sizeof("Frame");
|
|
|
|
|
|
|
|
return D3DRM_OK;
|
2012-01-04 19:12:32 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/*** IDirect3DRMFrame methods ***/
|
2013-04-22 15:18:44 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_AddChild(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 *child)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
2012-05-03 09:40:17 +02:00
|
|
|
IDirect3DRMFrameImpl *child_obj = unsafe_impl_from_IDirect3DRMFrame3(child);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2012-04-13 13:55:15 +02:00
|
|
|
TRACE("(%p/%p)->(%p)\n", iface, This, child);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2012-05-03 09:40:17 +02:00
|
|
|
if (!child_obj)
|
2012-04-13 13:55:15 +02:00
|
|
|
return D3DRMERR_BADOBJECT;
|
|
|
|
|
2012-05-03 09:40:17 +02:00
|
|
|
if (child_obj->parent)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrame3* parent = &child_obj->parent->IDirect3DRMFrame3_iface;
|
|
|
|
|
|
|
|
if (parent == iface)
|
|
|
|
{
|
|
|
|
/* Passed frame is already a child so return success */
|
2012-04-13 13:55:15 +02:00
|
|
|
return D3DRM_OK;
|
2012-05-03 09:40:17 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* Remove parent and continue */
|
|
|
|
IDirect3DRMFrame3_DeleteChild(parent, child);
|
|
|
|
}
|
|
|
|
}
|
2012-04-13 13:55:15 +02:00
|
|
|
|
|
|
|
if ((This->nb_children + 1) > This->children_capacity)
|
|
|
|
{
|
|
|
|
ULONG new_capacity;
|
2012-05-03 09:40:17 +02:00
|
|
|
IDirect3DRMFrame3** children;
|
2012-04-13 13:55:15 +02:00
|
|
|
|
|
|
|
if (!This->children_capacity)
|
|
|
|
{
|
|
|
|
new_capacity = 16;
|
|
|
|
children = HeapAlloc(GetProcessHeap(), 0, new_capacity * sizeof(IDirect3DRMFrame3*));
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
new_capacity = This->children_capacity * 2;
|
|
|
|
children = HeapReAlloc(GetProcessHeap(), 0, This->children, new_capacity * sizeof(IDirect3DRMFrame3*));
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!children)
|
|
|
|
return E_OUTOFMEMORY;
|
|
|
|
|
|
|
|
This->children_capacity = new_capacity;
|
|
|
|
This->children = children;
|
|
|
|
}
|
|
|
|
|
|
|
|
This->children[This->nb_children++] = child;
|
|
|
|
IDirect3DRMFrame3_AddRef(child);
|
2012-05-03 09:40:17 +02:00
|
|
|
child_obj->parent = This;
|
2012-04-13 13:55:15 +02:00
|
|
|
|
|
|
|
return D3DRM_OK;
|
2012-01-04 19:12:32 +01:00
|
|
|
}
|
|
|
|
|
2013-04-25 09:59:46 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_AddLight(IDirect3DRMFrame3 *iface, IDirect3DRMLight *light)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
2012-05-01 22:15:49 +02:00
|
|
|
ULONG i;
|
|
|
|
IDirect3DRMLight** lights;
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2012-05-01 22:15:49 +02:00
|
|
|
TRACE("(%p/%p)->(%p)\n", iface, This, light);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2012-05-01 22:15:49 +02:00
|
|
|
if (!light)
|
|
|
|
return D3DRMERR_BADOBJECT;
|
|
|
|
|
|
|
|
/* Check if already existing and return gracefully without increasing ref count */
|
|
|
|
for (i = 0; i < This->nb_lights; i++)
|
|
|
|
if (This->lights[i] == light)
|
|
|
|
return D3DRM_OK;
|
|
|
|
|
|
|
|
if ((This->nb_lights + 1) > This->lights_capacity)
|
|
|
|
{
|
|
|
|
ULONG new_capacity;
|
|
|
|
|
|
|
|
if (!This->lights_capacity)
|
|
|
|
{
|
|
|
|
new_capacity = 16;
|
|
|
|
lights = HeapAlloc(GetProcessHeap(), 0, new_capacity * sizeof(IDirect3DRMLight*));
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
new_capacity = This->lights_capacity * 2;
|
|
|
|
lights = HeapReAlloc(GetProcessHeap(), 0, This->lights, new_capacity * sizeof(IDirect3DRMLight*));
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!lights)
|
|
|
|
return E_OUTOFMEMORY;
|
|
|
|
|
|
|
|
This->lights_capacity = new_capacity;
|
|
|
|
This->lights = lights;
|
|
|
|
}
|
|
|
|
|
|
|
|
This->lights[This->nb_lights++] = light;
|
|
|
|
IDirect3DRMLight_AddRef(light);
|
|
|
|
|
|
|
|
return D3DRM_OK;
|
2012-01-04 19:12:32 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_AddMoveCallback(IDirect3DRMFrame3* iface,
|
|
|
|
D3DRMFRAME3MOVECALLBACK cb, VOID *arg,
|
|
|
|
DWORD flags)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p,%p,%u): stub\n", iface, This, cb, arg, flags);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_AddTransform(IDirect3DRMFrame3* iface,
|
|
|
|
D3DRMCOMBINETYPE type,
|
|
|
|
D3DRMMATRIX4D matrix)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
2012-05-17 10:09:40 +02:00
|
|
|
TRACE("(%p/%p)->(%u,%p)\n", iface, This, type, matrix);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2012-05-17 10:09:40 +02:00
|
|
|
switch (type)
|
|
|
|
{
|
|
|
|
case D3DRMCOMBINE_REPLACE:
|
2012-10-19 00:06:12 +02:00
|
|
|
memcpy(This->transform, matrix, sizeof(D3DRMMATRIX4D));
|
2012-05-17 10:09:40 +02:00
|
|
|
break;
|
|
|
|
|
|
|
|
case D3DRMCOMBINE_BEFORE:
|
|
|
|
FIXME("D3DRMCOMBINE_BEFORE not supported yed\n");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case D3DRMCOMBINE_AFTER:
|
|
|
|
FIXME("D3DRMCOMBINE_AFTER not supported yed\n");
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
WARN("Unknown Combine Type %u\n", type);
|
|
|
|
return D3DRMERR_BADVALUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
return S_OK;
|
2012-01-04 19:12:32 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_AddTranslation(IDirect3DRMFrame3* iface,
|
|
|
|
D3DRMCOMBINETYPE type,
|
|
|
|
D3DVALUE x, D3DVALUE y, D3DVALUE z)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%u,%f,%f,%f): stub\n", iface, This, type, x, y, z);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_AddScale(IDirect3DRMFrame3* iface,
|
|
|
|
D3DRMCOMBINETYPE type,
|
|
|
|
D3DVALUE sx, D3DVALUE sy, D3DVALUE sz)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%u,%f,%f,%f): stub\n", iface, This, type, sx, sy, sz);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_AddRotation(IDirect3DRMFrame3* iface,
|
|
|
|
D3DRMCOMBINETYPE type,
|
|
|
|
D3DVALUE x, D3DVALUE y, D3DVALUE z,
|
|
|
|
D3DVALUE theta)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%u,%f,%f,%f,%f): stub\n", iface, This, type, x, y, z, theta);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-08-20 10:20:13 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_AddVisual(IDirect3DRMFrame3 *iface, IUnknown *visual)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
2012-04-30 17:10:27 +02:00
|
|
|
ULONG i;
|
|
|
|
IDirect3DRMVisual** visuals;
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2013-08-20 10:20:13 +02:00
|
|
|
TRACE("iface %p, visual %p.\n", iface, visual);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2013-08-20 10:20:13 +02:00
|
|
|
if (!visual)
|
2012-04-30 17:10:27 +02:00
|
|
|
return D3DRMERR_BADOBJECT;
|
|
|
|
|
|
|
|
/* Check if already existing and return gracefully without increasing ref count */
|
|
|
|
for (i = 0; i < This->nb_visuals; i++)
|
2013-08-20 10:20:13 +02:00
|
|
|
if (This->visuals[i] == (IDirect3DRMVisual *)visual)
|
2012-04-30 17:10:27 +02:00
|
|
|
return D3DRM_OK;
|
|
|
|
|
|
|
|
if ((This->nb_visuals + 1) > This->visuals_capacity)
|
|
|
|
{
|
|
|
|
ULONG new_capacity;
|
|
|
|
|
|
|
|
if (!This->visuals_capacity)
|
|
|
|
{
|
|
|
|
new_capacity = 16;
|
|
|
|
visuals = HeapAlloc(GetProcessHeap(), 0, new_capacity * sizeof(IDirect3DRMVisual*));
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
new_capacity = This->visuals_capacity * 2;
|
|
|
|
visuals = HeapReAlloc(GetProcessHeap(), 0, This->visuals, new_capacity * sizeof(IDirect3DRMVisual*));
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!visuals)
|
|
|
|
return E_OUTOFMEMORY;
|
|
|
|
|
|
|
|
This->visuals_capacity = new_capacity;
|
|
|
|
This->visuals = visuals;
|
|
|
|
}
|
|
|
|
|
2013-08-20 10:20:13 +02:00
|
|
|
This->visuals[This->nb_visuals++] = (IDirect3DRMVisual *)visual;
|
|
|
|
IDirect3DRMVisual_AddRef(visual);
|
2012-04-30 17:10:27 +02:00
|
|
|
|
|
|
|
return D3DRM_OK;
|
2012-01-04 19:12:32 +01:00
|
|
|
}
|
|
|
|
|
2013-06-05 11:06:14 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_GetChildren(IDirect3DRMFrame3 *iface, IDirect3DRMFrameArray **children)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
2012-05-03 09:40:26 +02:00
|
|
|
IDirect3DRMFrameArrayImpl* obj;
|
|
|
|
HRESULT hr;
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2012-05-03 09:40:26 +02:00
|
|
|
TRACE("(%p/%p)->(%p)\n", iface, This, children);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2012-05-03 09:40:26 +02:00
|
|
|
if (!children)
|
|
|
|
return D3DRMERR_BADVALUE;
|
|
|
|
|
|
|
|
hr = Direct3DRMFrameArray_create(children);
|
|
|
|
|
|
|
|
if (hr != D3DRM_OK)
|
|
|
|
return hr;
|
|
|
|
|
|
|
|
obj = (IDirect3DRMFrameArrayImpl*)*children;
|
|
|
|
|
|
|
|
obj->size = This->nb_children;
|
|
|
|
if (This->nb_children)
|
|
|
|
{
|
|
|
|
ULONG i;
|
2013-04-19 08:34:15 +02:00
|
|
|
if (!(obj->frames = HeapAlloc(GetProcessHeap(), 0, This->nb_children * sizeof(*obj->frames))))
|
2012-05-03 09:40:26 +02:00
|
|
|
return E_OUTOFMEMORY;
|
|
|
|
for (i = 0; i < This->nb_children; i++)
|
|
|
|
IDirect3DRMFrame3_QueryInterface(This->children[i], &IID_IDirect3DRMFrame, (void**)&obj->frames[i]);
|
|
|
|
}
|
|
|
|
|
|
|
|
return D3DRM_OK;
|
2012-01-04 19:12:32 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static D3DCOLOR WINAPI IDirect3DRMFrame3Impl_GetColor(IDirect3DRMFrame3* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(): stub\n", iface, This);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2013-08-13 08:51:48 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_GetLights(IDirect3DRMFrame3 *iface, IDirect3DRMLightArray **lights)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
2012-05-27 17:44:19 +02:00
|
|
|
IDirect3DRMLightArrayImpl* obj;
|
|
|
|
HRESULT hr;
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2012-05-27 17:44:19 +02:00
|
|
|
TRACE("(%p/%p)->(%p)\n", iface, This, lights);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2012-05-27 17:44:19 +02:00
|
|
|
if (!lights)
|
|
|
|
return D3DRMERR_BADVALUE;
|
|
|
|
|
|
|
|
hr = Direct3DRMLightArray_create(lights);
|
|
|
|
|
|
|
|
if (hr != D3DRM_OK)
|
|
|
|
return hr;
|
|
|
|
|
|
|
|
obj = (IDirect3DRMLightArrayImpl*)*lights;
|
|
|
|
|
|
|
|
obj->size = This->nb_lights;
|
|
|
|
if (This->nb_lights)
|
|
|
|
{
|
|
|
|
ULONG i;
|
2013-04-25 09:59:46 +02:00
|
|
|
if (!(obj->lights = HeapAlloc(GetProcessHeap(), 0, This->nb_lights * sizeof(*obj->lights))))
|
2012-05-27 17:44:19 +02:00
|
|
|
return E_OUTOFMEMORY;
|
|
|
|
for (i = 0; i < This->nb_lights; i++)
|
|
|
|
IDirect3DRMLight_QueryInterface(This->lights[i], &IID_IDirect3DRMLight, (void**)&obj->lights[i]);
|
|
|
|
}
|
|
|
|
|
|
|
|
return D3DRM_OK;
|
2012-01-04 19:12:32 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static D3DRMMATERIALMODE WINAPI IDirect3DRMFrame3Impl_GetMaterialMode(IDirect3DRMFrame3* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(): stub\n", iface, This);
|
|
|
|
|
|
|
|
return D3DRMMATERIAL_FROMPARENT;
|
|
|
|
}
|
|
|
|
|
2013-04-22 15:18:44 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_GetParent(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 **frame)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
2012-05-03 09:40:17 +02:00
|
|
|
TRACE("(%p/%p)->(%p)\n", iface, This, frame);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2012-05-03 09:40:17 +02:00
|
|
|
if (!frame)
|
|
|
|
return D3DRMERR_BADVALUE;
|
|
|
|
|
|
|
|
if (This->parent)
|
|
|
|
{
|
|
|
|
*frame = &This->parent->IDirect3DRMFrame3_iface;
|
|
|
|
IDirect3DRMFrame_AddRef(*frame);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
*frame = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
return D3DRM_OK;
|
2012-01-04 19:12:32 +01:00
|
|
|
}
|
|
|
|
|
2013-01-23 08:50:10 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_GetPosition(IDirect3DRMFrame3 *iface,
|
|
|
|
IDirect3DRMFrame3 *reference, D3DVECTOR *return_position)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, reference, return_position);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-01-23 08:50:09 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_GetRotation(IDirect3DRMFrame3 *iface,
|
|
|
|
IDirect3DRMFrame3 *reference, D3DVECTOR *axis, D3DVALUE *return_theta)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, reference, axis, return_theta);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-04-22 15:18:44 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_GetScene(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 **scene)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-04-22 15:18:44 +02:00
|
|
|
FIXME("iface %p, scene %p stub!\n", iface, scene);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static D3DRMSORTMODE WINAPI IDirect3DRMFrame3Impl_GetSortMode(IDirect3DRMFrame3* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(): stub\n", iface, This);
|
|
|
|
|
|
|
|
return D3DRMSORT_FROMPARENT;
|
|
|
|
}
|
|
|
|
|
2013-05-28 08:55:20 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_GetTexture(IDirect3DRMFrame3 *iface, IDirect3DRMTexture3 **texture)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-05-28 08:55:20 +02:00
|
|
|
FIXME("iface %p, texture %p stub!\n", iface, texture);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-04-22 15:18:44 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_GetTransform(IDirect3DRMFrame3 *iface,
|
|
|
|
IDirect3DRMFrame3 *reference, D3DRMMATRIX4D return_matrix)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
2012-05-08 22:31:16 +02:00
|
|
|
TRACE("(%p/%p)->(%p,%p)\n", iface, This, reference, return_matrix);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2012-05-08 22:31:16 +02:00
|
|
|
if (reference)
|
|
|
|
FIXME("Specifying a frame as the root of the scene different from the current root frame is not supported yet\n");
|
|
|
|
|
2012-10-19 00:06:12 +02:00
|
|
|
memcpy(return_matrix, This->transform, sizeof(D3DRMMATRIX4D));
|
2012-05-08 22:31:16 +02:00
|
|
|
|
|
|
|
return D3DRM_OK;
|
2012-01-04 19:12:32 +01:00
|
|
|
}
|
|
|
|
|
2013-01-23 08:50:10 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_GetVelocity(IDirect3DRMFrame3 *iface,
|
|
|
|
IDirect3DRMFrame3 *reference, D3DVECTOR *return_velocity, BOOL with_rotation)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p,%p,%d): stub\n", iface, This, reference, return_velocity, with_rotation);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-01-23 08:50:10 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_GetOrientation(IDirect3DRMFrame3 *iface,
|
|
|
|
IDirect3DRMFrame3 *reference, D3DVECTOR *dir, D3DVECTOR *up)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, reference, dir, up);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-08-20 10:20:13 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_GetVisuals(IDirect3DRMFrame3 *iface,
|
|
|
|
DWORD *count, IUnknown **visuals)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-08-20 10:20:13 +02:00
|
|
|
FIXME("iface %p, count %p, visuals %p stub!\n", iface, count, visuals);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_InverseTransform(IDirect3DRMFrame3* iface,
|
|
|
|
D3DVECTOR *d, D3DVECTOR *s)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, d, s);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-09-09 10:26:21 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_Load(IDirect3DRMFrame3 *iface, void *filename,
|
|
|
|
void *name, D3DRMLOADOPTIONS flags, D3DRMLOADTEXTURE3CALLBACK cb, void *ctx)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-09-09 10:26:21 +02:00
|
|
|
FIXME("iface %p, filename %p, name %p, flags %#x, cb %p, ctx %p stub!\n",
|
|
|
|
iface, filename, name, flags, cb, ctx);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-04-22 15:18:44 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_LookAt(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 *target,
|
|
|
|
IDirect3DRMFrame3 *reference, D3DRMFRAMECONSTRAINT constraint)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-04-22 15:18:44 +02:00
|
|
|
FIXME("iface %p, target %p, reference %p, constraint %#x stub!\n", iface, target, reference, constraint);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_Move(IDirect3DRMFrame3* iface, D3DVALUE delta)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%f): stub\n", iface, This, delta);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-04-22 15:18:44 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteChild(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 *frame)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
2012-05-03 09:40:17 +02:00
|
|
|
IDirect3DRMFrameImpl *frame_obj = unsafe_impl_from_IDirect3DRMFrame3(frame);
|
2012-04-13 13:55:23 +02:00
|
|
|
ULONG i;
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2012-04-13 13:55:23 +02:00
|
|
|
TRACE("(%p/%p)->(%p)\n", iface, This, frame);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2012-05-03 09:40:17 +02:00
|
|
|
if (!frame_obj)
|
2012-04-13 13:55:23 +02:00
|
|
|
return D3DRMERR_BADOBJECT;
|
|
|
|
|
|
|
|
/* Check if child exists */
|
|
|
|
for (i = 0; i < This->nb_children; i++)
|
|
|
|
if (This->children[i] == frame)
|
|
|
|
break;
|
|
|
|
|
|
|
|
if (i == This->nb_children)
|
|
|
|
return D3DRMERR_BADVALUE;
|
|
|
|
|
|
|
|
memmove(This->children + i, This->children + i + 1, sizeof(IDirect3DRMFrame3*) * (This->nb_children - 1 - i));
|
|
|
|
IDirect3DRMFrame3_Release(frame);
|
2012-05-03 09:40:17 +02:00
|
|
|
frame_obj->parent = NULL;
|
2012-04-13 13:55:23 +02:00
|
|
|
This->nb_children--;
|
|
|
|
|
|
|
|
return D3DRM_OK;
|
2012-01-04 19:12:32 +01:00
|
|
|
}
|
|
|
|
|
2013-04-25 09:59:46 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteLight(IDirect3DRMFrame3 *iface, IDirect3DRMLight *light)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
2012-05-01 22:16:10 +02:00
|
|
|
ULONG i;
|
|
|
|
|
|
|
|
TRACE("(%p/%p)->(%p)\n", iface, This, light);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2012-05-01 22:16:10 +02:00
|
|
|
if (!light)
|
|
|
|
return D3DRMERR_BADOBJECT;
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2012-05-01 22:16:10 +02:00
|
|
|
/* Check if visual exists */
|
|
|
|
for (i = 0; i < This->nb_lights; i++)
|
|
|
|
if (This->lights[i] == light)
|
|
|
|
break;
|
|
|
|
|
|
|
|
if (i == This->nb_lights)
|
|
|
|
return D3DRMERR_BADVALUE;
|
|
|
|
|
|
|
|
memmove(This->lights + i, This->lights + i + 1, sizeof(IDirect3DRMLight*) * (This->nb_lights - 1 - i));
|
|
|
|
IDirect3DRMLight_Release(light);
|
|
|
|
This->nb_lights--;
|
|
|
|
|
|
|
|
return D3DRM_OK;
|
2012-01-04 19:12:32 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteMoveCallback(IDirect3DRMFrame3* iface,
|
|
|
|
D3DRMFRAME3MOVECALLBACK cb,
|
|
|
|
VOID *arg)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, cb, arg);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-08-20 10:20:13 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteVisual(IDirect3DRMFrame3 *iface, IUnknown *visual)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
2012-04-30 17:10:48 +02:00
|
|
|
ULONG i;
|
|
|
|
|
2013-08-20 10:20:13 +02:00
|
|
|
TRACE("iface %p, visual %p.\n", iface, visual);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2013-08-20 10:20:13 +02:00
|
|
|
if (!visual)
|
2012-04-30 17:10:48 +02:00
|
|
|
return D3DRMERR_BADOBJECT;
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2012-04-30 17:10:48 +02:00
|
|
|
/* Check if visual exists */
|
|
|
|
for (i = 0; i < This->nb_visuals; i++)
|
2013-08-20 10:20:13 +02:00
|
|
|
if (This->visuals[i] == (IDirect3DRMVisual *)visual)
|
2012-04-30 17:10:48 +02:00
|
|
|
break;
|
|
|
|
|
|
|
|
if (i == This->nb_visuals)
|
|
|
|
return D3DRMERR_BADVALUE;
|
|
|
|
|
|
|
|
memmove(This->visuals + i, This->visuals + i + 1, sizeof(IDirect3DRMVisual*) * (This->nb_visuals - 1 - i));
|
2013-08-20 10:20:13 +02:00
|
|
|
IDirect3DRMVisual_Release(visual);
|
2012-04-30 17:10:48 +02:00
|
|
|
This->nb_visuals--;
|
|
|
|
|
|
|
|
return D3DRM_OK;
|
2012-01-04 19:12:32 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static D3DCOLOR WINAPI IDirect3DRMFrame3Impl_GetSceneBackground(IDirect3DRMFrame3* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
2012-08-05 17:44:46 +02:00
|
|
|
TRACE("(%p/%p)->()\n", iface, This);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2012-08-05 17:44:46 +02:00
|
|
|
return This->scenebackground;
|
2012-01-04 19:12:32 +01:00
|
|
|
}
|
|
|
|
|
2012-11-19 22:04:10 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_GetSceneBackgroundDepth(IDirect3DRMFrame3 *iface,
|
|
|
|
IDirectDrawSurface **surface)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static D3DCOLOR WINAPI IDirect3DRMFrame3Impl_GetSceneFogColor(IDirect3DRMFrame3* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(): stub\n", iface, This);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static BOOL WINAPI IDirect3DRMFrame3Impl_GetSceneFogEnable(IDirect3DRMFrame3* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(): stub\n", iface, This);
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static D3DRMFOGMODE WINAPI IDirect3DRMFrame3Impl_GetSceneFogMode(IDirect3DRMFrame3* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(): stub\n", iface, This);
|
|
|
|
|
|
|
|
return D3DRMFOG_LINEAR;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_GetSceneFogParams(IDirect3DRMFrame3* iface,
|
|
|
|
D3DVALUE *return_start,
|
|
|
|
D3DVALUE *return_end,
|
|
|
|
D3DVALUE *return_density)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, return_start, return_end, return_density);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackground(IDirect3DRMFrame3* iface,
|
|
|
|
D3DCOLOR color)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
2012-08-05 17:44:46 +02:00
|
|
|
TRACE("(%p/%p)->(%u)\n", iface, This, color);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2012-08-05 17:44:46 +02:00
|
|
|
This->scenebackground = color;
|
|
|
|
|
|
|
|
return D3DRM_OK;
|
2012-01-04 19:12:32 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackgroundRGB(IDirect3DRMFrame3* iface,
|
|
|
|
D3DVALUE red, D3DVALUE green,
|
|
|
|
D3DVALUE blue)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
2012-08-05 17:44:46 +02:00
|
|
|
TRACE("(%p/%p)->(%f,%f,%f)\n", iface, This, red, green, blue);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2013-04-15 08:14:52 +02:00
|
|
|
This->scenebackground = RGBA_MAKE((BYTE)(red * 255.0f),
|
|
|
|
(BYTE)(green * 255.0f), (BYTE)(blue * 255.0f), 0xff);
|
2012-08-05 17:44:46 +02:00
|
|
|
|
|
|
|
return D3DRM_OK;
|
2012-01-04 19:12:32 +01:00
|
|
|
}
|
|
|
|
|
2012-11-19 22:04:10 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackgroundDepth(IDirect3DRMFrame3 *iface,
|
|
|
|
IDirectDrawSurface *surface)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-05-28 08:55:20 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackgroundImage(IDirect3DRMFrame3 *iface,
|
|
|
|
IDirect3DRMTexture3 *texture)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-05-28 08:55:20 +02:00
|
|
|
FIXME("iface %p, texture %p stub!\n", iface, texture);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogEnable(IDirect3DRMFrame3* iface, BOOL enable)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%d): stub\n", iface, This, enable);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogColor(IDirect3DRMFrame3* iface,
|
|
|
|
D3DCOLOR color)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogMode(IDirect3DRMFrame3* iface,
|
|
|
|
D3DRMFOGMODE mode)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogParams(IDirect3DRMFrame3* iface,
|
|
|
|
D3DVALUE start, D3DVALUE end,
|
|
|
|
D3DVALUE density)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, start, end, density);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_SetColor(IDirect3DRMFrame3* iface, D3DCOLOR color)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_SetColorRGB(IDirect3DRMFrame3* iface, D3DVALUE red,
|
|
|
|
D3DVALUE green, D3DVALUE blue)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, red, green, blue);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static D3DRMZBUFFERMODE WINAPI IDirect3DRMFrame3Impl_GetZbufferMode(IDirect3DRMFrame3* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(): stub\n", iface, This);
|
|
|
|
|
|
|
|
return D3DRMZBUFFER_FROMPARENT;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_SetMaterialMode(IDirect3DRMFrame3* iface,
|
|
|
|
D3DRMMATERIALMODE mode)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-04-22 15:18:44 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_SetOrientation(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 *reference,
|
|
|
|
D3DVALUE dx, D3DVALUE dy, D3DVALUE dz, D3DVALUE ux, D3DVALUE uy, D3DVALUE uz)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-04-22 15:18:44 +02:00
|
|
|
FIXME("iface %p, reference %p, dx %.8e, dy %.8e, dz %.8e, ux %.8e, uy %.8e, uz %.8e stub!\n",
|
|
|
|
iface, reference, dx, dy, dz, ux, uy, uz);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-04-22 15:18:44 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_SetPosition(IDirect3DRMFrame3 *iface,
|
|
|
|
IDirect3DRMFrame3 *reference, D3DVALUE x, D3DVALUE y, D3DVALUE z)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-04-22 15:18:44 +02:00
|
|
|
FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e stub!\n", iface, reference, x, y, z);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-04-22 15:18:44 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_SetRotation(IDirect3DRMFrame3 *iface,
|
|
|
|
IDirect3DRMFrame3 *reference, D3DVALUE x, D3DVALUE y, D3DVALUE z, D3DVALUE theta)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-04-22 15:18:44 +02:00
|
|
|
FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e, theta %.8e stub!\n",
|
|
|
|
iface, reference, x, y, z, theta);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSortMode(IDirect3DRMFrame3* iface,
|
|
|
|
D3DRMSORTMODE mode)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-05-28 08:55:20 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_SetTexture(IDirect3DRMFrame3 *iface, IDirect3DRMTexture3 *texture)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-05-28 08:55:20 +02:00
|
|
|
FIXME("iface %p, texture %p stub!\n", iface, texture);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-04-22 15:18:44 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_SetVelocity(IDirect3DRMFrame3 *iface,
|
|
|
|
IDirect3DRMFrame3 *reference, D3DVALUE x, D3DVALUE y, D3DVALUE z, BOOL with_rotation)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-04-22 15:18:44 +02:00
|
|
|
FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e, with_rotation %#x.\n",
|
|
|
|
iface, reference, x, y, z, with_rotation);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_SetZbufferMode(IDirect3DRMFrame3* iface,
|
|
|
|
D3DRMZBUFFERMODE mode)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_Transform(IDirect3DRMFrame3* iface, D3DVECTOR *d,
|
|
|
|
D3DVECTOR *s)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, d, s);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-01-25 10:57:16 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_GetBox(IDirect3DRMFrame3 *iface, D3DRMBOX *box)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static BOOL WINAPI IDirect3DRMFrame3Impl_GetBoxEnable(IDirect3DRMFrame3* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(): stub\n", iface, This);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-01-23 08:50:10 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_GetAxes(IDirect3DRMFrame3 *iface, D3DVECTOR *dir, D3DVECTOR *up)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, dir, up);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-05-29 09:45:39 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_GetMaterial(IDirect3DRMFrame3 *iface, IDirect3DRMMaterial2 **material)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-05-29 09:45:39 +02:00
|
|
|
FIXME("iface %p, material %p stub!\n", iface, material);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static BOOL WINAPI IDirect3DRMFrame3Impl_GetInheritAxes(IDirect3DRMFrame3* iface)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(): stub\n", iface, This);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-01-25 10:57:16 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_GetHierarchyBox(IDirect3DRMFrame3* iface, D3DRMBOX *box)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-01-25 10:57:16 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_SetBox(IDirect3DRMFrame3 *iface, D3DRMBOX *box)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_SetBoxEnable(IDirect3DRMFrame3* iface, BOOL enable)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%u): stub\n", iface, This, enable);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_SetAxes(IDirect3DRMFrame3* iface,
|
|
|
|
D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
|
|
|
|
D3DVALUE ux, D3DVALUE uy, D3DVALUE uz)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%f,%f,%f,%f,%f,%f): stub\n", iface, This, dx, dy, dz, ux, uy, uz);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_SetInheritAxes(IDirect3DRMFrame3* iface,
|
|
|
|
BOOL inherit_from_parent)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%u): stub\n", iface, This, inherit_from_parent);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-05-29 09:45:39 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_SetMaterial(IDirect3DRMFrame3 *iface, IDirect3DRMMaterial2 *material)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-05-29 09:45:39 +02:00
|
|
|
FIXME("iface %p, material %p stub!\n", iface, material);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-04-22 15:18:44 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_SetQuaternion(IDirect3DRMFrame3 *iface,
|
|
|
|
IDirect3DRMFrame3 *reference, D3DRMQUATERNION *q)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-04-22 15:18:44 +02:00
|
|
|
FIXME("iface %p, reference %p, q %p stub!\n", iface, reference, q);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-01-24 11:37:38 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_RayPick(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 *reference,
|
|
|
|
D3DRMRAY *ray, DWORD flags, IDirect3DRMPicked2Array **return_visuals)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p,%p,%u,%p): stub\n", iface, This, reference, ray, flags, return_visuals);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-09-06 09:57:43 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_Save(IDirect3DRMFrame3 *iface,
|
|
|
|
const char *filename, D3DRMXOFFORMAT format, D3DRMSAVEOPTIONS flags)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-09-06 09:57:43 +02:00
|
|
|
FIXME("iface %p, filename %s, format %#x, flags %#x stub!\n",
|
|
|
|
iface, debugstr_a(filename), format, flags);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-01-23 08:50:10 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_TransformVectors(IDirect3DRMFrame3 *iface,
|
|
|
|
IDirect3DRMFrame3 *reference, DWORD num, D3DVECTOR *dst, D3DVECTOR *src)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p,%u,%p,%p): stub\n", iface, This, reference, num, dst, src);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-01-23 08:50:10 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_InverseTransformVectors(IDirect3DRMFrame3 *iface,
|
|
|
|
IDirect3DRMFrame3 *reference, DWORD num, D3DVECTOR *dst, D3DVECTOR *src)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p,%u,%p,%p): stub\n", iface, This, reference, num, dst, src);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_SetTraversalOptions(IDirect3DRMFrame3* iface,
|
|
|
|
DWORD flags)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%u): stub\n", iface, This, flags);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-09-10 09:32:35 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_GetTraversalOptions(IDirect3DRMFrame3 *iface, DWORD *flags)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-09-10 09:32:35 +02:00
|
|
|
FIXME("iface %p, flags %p stub!\n", iface, flags);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogMethod(IDirect3DRMFrame3* iface,
|
|
|
|
DWORD flags)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%u): stub\n", iface, This, flags);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-09-10 09:32:35 +02:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_GetSceneFogMethod(IDirect3DRMFrame3 *iface, DWORD *fog_mode)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-09-10 09:32:35 +02:00
|
|
|
FIXME("iface %p, fogmode %p stub!\n", iface, fog_mode);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-01-28 11:15:37 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_SetMaterialOverride(IDirect3DRMFrame3 *iface,
|
|
|
|
D3DRMMATERIALOVERRIDE *override)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p): stub\n", iface, This, override);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-01-28 11:15:37 +01:00
|
|
|
static HRESULT WINAPI IDirect3DRMFrame3Impl_GetMaterialOverride(IDirect3DRMFrame3 *iface,
|
|
|
|
D3DRMMATERIALOVERRIDE *override)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
FIXME("(%p/%p)->(%p): stub\n", iface, This, override);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const struct IDirect3DRMFrame3Vtbl Direct3DRMFrame3_Vtbl =
|
|
|
|
{
|
|
|
|
/*** IUnknown methods ***/
|
|
|
|
IDirect3DRMFrame3Impl_QueryInterface,
|
|
|
|
IDirect3DRMFrame3Impl_AddRef,
|
|
|
|
IDirect3DRMFrame3Impl_Release,
|
|
|
|
/*** IDirect3DRMObject methods ***/
|
|
|
|
IDirect3DRMFrame3Impl_Clone,
|
|
|
|
IDirect3DRMFrame3Impl_AddDestroyCallback,
|
|
|
|
IDirect3DRMFrame3Impl_DeleteDestroyCallback,
|
|
|
|
IDirect3DRMFrame3Impl_SetAppData,
|
|
|
|
IDirect3DRMFrame3Impl_GetAppData,
|
|
|
|
IDirect3DRMFrame3Impl_SetName,
|
|
|
|
IDirect3DRMFrame3Impl_GetName,
|
|
|
|
IDirect3DRMFrame3Impl_GetClassName,
|
|
|
|
/*** IDirect3DRMFrame3 methods ***/
|
|
|
|
IDirect3DRMFrame3Impl_AddChild,
|
|
|
|
IDirect3DRMFrame3Impl_AddLight,
|
|
|
|
IDirect3DRMFrame3Impl_AddMoveCallback,
|
|
|
|
IDirect3DRMFrame3Impl_AddTransform,
|
|
|
|
IDirect3DRMFrame3Impl_AddTranslation,
|
|
|
|
IDirect3DRMFrame3Impl_AddScale,
|
|
|
|
IDirect3DRMFrame3Impl_AddRotation,
|
|
|
|
IDirect3DRMFrame3Impl_AddVisual,
|
|
|
|
IDirect3DRMFrame3Impl_GetChildren,
|
|
|
|
IDirect3DRMFrame3Impl_GetColor,
|
|
|
|
IDirect3DRMFrame3Impl_GetLights,
|
|
|
|
IDirect3DRMFrame3Impl_GetMaterialMode,
|
|
|
|
IDirect3DRMFrame3Impl_GetParent,
|
|
|
|
IDirect3DRMFrame3Impl_GetPosition,
|
|
|
|
IDirect3DRMFrame3Impl_GetRotation,
|
|
|
|
IDirect3DRMFrame3Impl_GetScene,
|
|
|
|
IDirect3DRMFrame3Impl_GetSortMode,
|
|
|
|
IDirect3DRMFrame3Impl_GetTexture,
|
|
|
|
IDirect3DRMFrame3Impl_GetTransform,
|
|
|
|
IDirect3DRMFrame3Impl_GetVelocity,
|
|
|
|
IDirect3DRMFrame3Impl_GetOrientation,
|
|
|
|
IDirect3DRMFrame3Impl_GetVisuals,
|
|
|
|
IDirect3DRMFrame3Impl_InverseTransform,
|
|
|
|
IDirect3DRMFrame3Impl_Load,
|
|
|
|
IDirect3DRMFrame3Impl_LookAt,
|
|
|
|
IDirect3DRMFrame3Impl_Move,
|
|
|
|
IDirect3DRMFrame3Impl_DeleteChild,
|
|
|
|
IDirect3DRMFrame3Impl_DeleteLight,
|
|
|
|
IDirect3DRMFrame3Impl_DeleteMoveCallback,
|
|
|
|
IDirect3DRMFrame3Impl_DeleteVisual,
|
|
|
|
IDirect3DRMFrame3Impl_GetSceneBackground,
|
|
|
|
IDirect3DRMFrame3Impl_GetSceneBackgroundDepth,
|
|
|
|
IDirect3DRMFrame3Impl_GetSceneFogColor,
|
|
|
|
IDirect3DRMFrame3Impl_GetSceneFogEnable,
|
|
|
|
IDirect3DRMFrame3Impl_GetSceneFogMode,
|
|
|
|
IDirect3DRMFrame3Impl_GetSceneFogParams,
|
|
|
|
IDirect3DRMFrame3Impl_SetSceneBackground,
|
|
|
|
IDirect3DRMFrame3Impl_SetSceneBackgroundRGB,
|
|
|
|
IDirect3DRMFrame3Impl_SetSceneBackgroundDepth,
|
|
|
|
IDirect3DRMFrame3Impl_SetSceneBackgroundImage,
|
|
|
|
IDirect3DRMFrame3Impl_SetSceneFogEnable,
|
|
|
|
IDirect3DRMFrame3Impl_SetSceneFogColor,
|
|
|
|
IDirect3DRMFrame3Impl_SetSceneFogMode,
|
|
|
|
IDirect3DRMFrame3Impl_SetSceneFogParams,
|
|
|
|
IDirect3DRMFrame3Impl_SetColor,
|
|
|
|
IDirect3DRMFrame3Impl_SetColorRGB,
|
|
|
|
IDirect3DRMFrame3Impl_GetZbufferMode,
|
|
|
|
IDirect3DRMFrame3Impl_SetMaterialMode,
|
|
|
|
IDirect3DRMFrame3Impl_SetOrientation,
|
|
|
|
IDirect3DRMFrame3Impl_SetPosition,
|
|
|
|
IDirect3DRMFrame3Impl_SetRotation,
|
|
|
|
IDirect3DRMFrame3Impl_SetSortMode,
|
|
|
|
IDirect3DRMFrame3Impl_SetTexture,
|
|
|
|
IDirect3DRMFrame3Impl_SetVelocity,
|
|
|
|
IDirect3DRMFrame3Impl_SetZbufferMode,
|
|
|
|
IDirect3DRMFrame3Impl_Transform,
|
|
|
|
IDirect3DRMFrame3Impl_GetBox,
|
|
|
|
IDirect3DRMFrame3Impl_GetBoxEnable,
|
|
|
|
IDirect3DRMFrame3Impl_GetAxes,
|
|
|
|
IDirect3DRMFrame3Impl_GetMaterial,
|
|
|
|
IDirect3DRMFrame3Impl_GetInheritAxes,
|
|
|
|
IDirect3DRMFrame3Impl_GetHierarchyBox,
|
|
|
|
IDirect3DRMFrame3Impl_SetBox,
|
|
|
|
IDirect3DRMFrame3Impl_SetBoxEnable,
|
|
|
|
IDirect3DRMFrame3Impl_SetAxes,
|
|
|
|
IDirect3DRMFrame3Impl_SetInheritAxes,
|
|
|
|
IDirect3DRMFrame3Impl_SetMaterial,
|
|
|
|
IDirect3DRMFrame3Impl_SetQuaternion,
|
|
|
|
IDirect3DRMFrame3Impl_RayPick,
|
|
|
|
IDirect3DRMFrame3Impl_Save,
|
|
|
|
IDirect3DRMFrame3Impl_TransformVectors,
|
|
|
|
IDirect3DRMFrame3Impl_InverseTransformVectors,
|
|
|
|
IDirect3DRMFrame3Impl_SetTraversalOptions,
|
|
|
|
IDirect3DRMFrame3Impl_GetTraversalOptions,
|
|
|
|
IDirect3DRMFrame3Impl_SetSceneFogMethod,
|
|
|
|
IDirect3DRMFrame3Impl_GetSceneFogMethod,
|
|
|
|
IDirect3DRMFrame3Impl_SetMaterialOverride,
|
|
|
|
IDirect3DRMFrame3Impl_GetMaterialOverride
|
|
|
|
};
|
2012-01-19 21:59:34 +01:00
|
|
|
|
2012-05-03 09:40:17 +02:00
|
|
|
static inline IDirect3DRMFrameImpl *unsafe_impl_from_IDirect3DRMFrame3(IDirect3DRMFrame3 *iface)
|
|
|
|
{
|
|
|
|
if (!iface)
|
|
|
|
return NULL;
|
|
|
|
assert(iface->lpVtbl == &Direct3DRMFrame3_Vtbl);
|
|
|
|
|
|
|
|
return impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
}
|
|
|
|
|
2012-05-17 10:10:07 +02:00
|
|
|
HRESULT Direct3DRMFrame_create(REFIID riid, IUnknown* parent, IUnknown** ret_iface)
|
2012-01-19 21:59:34 +01:00
|
|
|
{
|
|
|
|
IDirect3DRMFrameImpl* object;
|
2012-06-30 01:13:56 +02:00
|
|
|
HRESULT hr;
|
2012-01-19 21:59:34 +01:00
|
|
|
|
2012-05-17 10:10:07 +02:00
|
|
|
TRACE("(%s, %p, %p)\n", wine_dbgstr_guid(riid), parent, ret_iface);
|
2012-01-19 21:59:34 +01:00
|
|
|
|
|
|
|
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMFrameImpl));
|
|
|
|
if (!object)
|
|
|
|
return E_OUTOFMEMORY;
|
|
|
|
|
|
|
|
object->IDirect3DRMFrame2_iface.lpVtbl = &Direct3DRMFrame2_Vtbl;
|
|
|
|
object->IDirect3DRMFrame3_iface.lpVtbl = &Direct3DRMFrame3_Vtbl;
|
|
|
|
object->ref = 1;
|
2013-04-15 08:14:52 +02:00
|
|
|
object->scenebackground = RGBA_MAKE(0, 0, 0, 0xff);
|
2012-01-19 21:59:34 +01:00
|
|
|
|
2012-10-19 00:06:12 +02:00
|
|
|
memcpy(object->transform, identity, sizeof(D3DRMMATRIX4D));
|
2012-05-08 22:31:16 +02:00
|
|
|
|
2012-06-30 01:13:56 +02:00
|
|
|
if (parent)
|
2012-05-17 10:10:07 +02:00
|
|
|
{
|
2012-06-30 01:13:56 +02:00
|
|
|
IDirect3DRMFrame3 *p;
|
|
|
|
|
|
|
|
hr = IDirect3DRMFrame_QueryInterface(parent, &IID_IDirect3DRMFrame3, (void**)&p);
|
|
|
|
if (hr != S_OK)
|
2012-11-08 10:37:31 +01:00
|
|
|
{
|
|
|
|
HeapFree(GetProcessHeap(), 0, object);
|
2012-06-30 01:13:56 +02:00
|
|
|
return hr;
|
2012-11-08 10:37:31 +01:00
|
|
|
}
|
2012-06-30 01:13:56 +02:00
|
|
|
IDirect3DRMFrame_Release(parent);
|
|
|
|
IDirect3DRMFrame3_AddChild(p, &object->IDirect3DRMFrame3_iface);
|
2012-05-17 10:10:07 +02:00
|
|
|
}
|
2012-01-19 21:59:34 +01:00
|
|
|
|
2012-06-30 01:13:56 +02:00
|
|
|
hr = IDirect3DRMFrame3_QueryInterface(&object->IDirect3DRMFrame3_iface, riid, (void**)ret_iface);
|
|
|
|
IDirect3DRMFrame3_Release(&object->IDirect3DRMFrame3_iface);
|
2012-01-19 21:59:34 +01:00
|
|
|
return S_OK;
|
|
|
|
}
|