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
|
|
|
|
*/
|
|
|
|
|
2016-11-10 16:17:42 +01:00
|
|
|
#include "config.h"
|
|
|
|
#include "wine/port.h"
|
2011-12-30 16:42:59 +01:00
|
|
|
|
|
|
|
#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 }
|
|
|
|
};
|
|
|
|
|
2013-10-10 23:49:47 +02:00
|
|
|
struct d3drm_frame_array
|
|
|
|
{
|
2012-05-03 09:40:26 +02:00
|
|
|
IDirect3DRMFrameArray IDirect3DRMFrameArray_iface;
|
|
|
|
LONG ref;
|
|
|
|
ULONG size;
|
2013-04-19 08:34:15 +02:00
|
|
|
IDirect3DRMFrame **frames;
|
2013-10-10 23:49:47 +02:00
|
|
|
};
|
2012-05-03 09:40:26 +02:00
|
|
|
|
2013-10-09 22:57:49 +02:00
|
|
|
struct d3drm_visual_array
|
|
|
|
{
|
2012-05-15 08:08:31 +02:00
|
|
|
IDirect3DRMVisualArray IDirect3DRMVisualArray_iface;
|
|
|
|
LONG ref;
|
|
|
|
ULONG size;
|
2013-04-22 15:18:45 +02:00
|
|
|
IDirect3DRMVisual **visuals;
|
2013-10-09 22:57:49 +02:00
|
|
|
};
|
2012-05-15 08:08:31 +02:00
|
|
|
|
2013-10-07 22:15:51 +02:00
|
|
|
struct d3drm_light_array
|
|
|
|
{
|
2012-05-27 17:44:19 +02:00
|
|
|
IDirect3DRMLightArray IDirect3DRMLightArray_iface;
|
|
|
|
LONG ref;
|
|
|
|
ULONG size;
|
2013-04-25 09:59:46 +02:00
|
|
|
IDirect3DRMLight **lights;
|
2013-10-07 22:15:51 +02:00
|
|
|
};
|
2012-05-27 17:44:19 +02:00
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static inline struct d3drm_frame *impl_from_IDirect3DRMFrame(IDirect3DRMFrame *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, struct d3drm_frame, IDirect3DRMFrame_iface);
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static inline struct d3drm_frame *impl_from_IDirect3DRMFrame2(IDirect3DRMFrame2 *iface)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
return CONTAINING_RECORD(iface, struct d3drm_frame, IDirect3DRMFrame2_iface);
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static inline struct d3drm_frame *impl_from_IDirect3DRMFrame3(IDirect3DRMFrame3 *iface)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
return CONTAINING_RECORD(iface, struct d3drm_frame, IDirect3DRMFrame3_iface);
|
2012-01-04 19:12:32 +01:00
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static inline struct d3drm_frame *unsafe_impl_from_IDirect3DRMFrame3(IDirect3DRMFrame3 *iface);
|
2012-04-13 13:55:15 +02:00
|
|
|
|
2013-10-10 23:49:47 +02:00
|
|
|
static inline struct d3drm_frame_array *impl_from_IDirect3DRMFrameArray(IDirect3DRMFrameArray *iface)
|
2013-10-09 22:57:48 +02:00
|
|
|
{
|
2013-10-10 23:49:47 +02:00
|
|
|
return CONTAINING_RECORD(iface, struct d3drm_frame_array, IDirect3DRMFrameArray_iface);
|
2013-10-09 22:57:48 +02:00
|
|
|
}
|
|
|
|
|
2013-10-09 22:57:49 +02:00
|
|
|
static inline struct d3drm_visual_array *impl_from_IDirect3DRMVisualArray(IDirect3DRMVisualArray *iface)
|
2013-10-09 10:39:40 +02:00
|
|
|
{
|
2013-10-09 22:57:49 +02:00
|
|
|
return CONTAINING_RECORD(iface, struct d3drm_visual_array, IDirect3DRMVisualArray_iface);
|
2013-10-09 10:39:40 +02:00
|
|
|
}
|
|
|
|
|
2013-10-07 22:15:51 +02:00
|
|
|
static inline struct d3drm_light_array *impl_from_IDirect3DRMLightArray(IDirect3DRMLightArray *iface)
|
2012-05-27 17:44:19 +02:00
|
|
|
{
|
2013-10-07 22:15:51 +02:00
|
|
|
return CONTAINING_RECORD(iface, struct d3drm_light_array, IDirect3DRMLightArray_iface);
|
2012-05-27 17:44:19 +02:00
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:47 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame_array_QueryInterface(IDirect3DRMFrameArray *iface, REFIID riid, void **out)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2013-10-09 22:57:48 +02:00
|
|
|
TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2013-10-09 22:57:48 +02:00
|
|
|
if (IsEqualGUID(riid, &IID_IDirect3DRMFrameArray)
|
|
|
|
|| IsEqualGUID(riid, &IID_IUnknown))
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2013-10-09 22:57:48 +02:00
|
|
|
IDirect3DRMFrameArray_AddRef(iface);
|
|
|
|
*out = iface;
|
|
|
|
return S_OK;
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
2013-10-09 22:57:48 +02:00
|
|
|
WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
|
|
|
|
|
|
|
|
*out = NULL;
|
|
|
|
return E_NOINTERFACE;
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:47 +02:00
|
|
|
static ULONG WINAPI d3drm_frame_array_AddRef(IDirect3DRMFrameArray *iface)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2013-10-10 23:49:47 +02:00
|
|
|
struct d3drm_frame_array *array = impl_from_IDirect3DRMFrameArray(iface);
|
|
|
|
ULONG refcount = InterlockedIncrement(&array->ref);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2013-10-10 23:49:47 +02:00
|
|
|
TRACE("%p increasing refcount to %u.\n", iface, refcount);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2013-10-10 23:49:47 +02:00
|
|
|
return refcount;
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:47 +02:00
|
|
|
static ULONG WINAPI d3drm_frame_array_Release(IDirect3DRMFrameArray *iface)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2013-10-10 23:49:47 +02:00
|
|
|
struct d3drm_frame_array *array = impl_from_IDirect3DRMFrameArray(iface);
|
|
|
|
ULONG refcount = InterlockedDecrement(&array->ref);
|
2012-04-13 13:55:15 +02:00
|
|
|
ULONG i;
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2013-10-10 23:49:47 +02:00
|
|
|
TRACE("%p decreasing refcount to %u.\n", iface, refcount);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2013-10-10 23:49:47 +02:00
|
|
|
if (!refcount)
|
2012-04-13 13:55:15 +02:00
|
|
|
{
|
2013-10-10 23:49:47 +02:00
|
|
|
for (i = 0; i < array->size; ++i)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrame_Release(array->frames[i]);
|
|
|
|
}
|
|
|
|
HeapFree(GetProcessHeap(), 0, array->frames);
|
|
|
|
HeapFree(GetProcessHeap(), 0, array);
|
2012-04-13 13:55:15 +02:00
|
|
|
}
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2013-10-10 23:49:47 +02:00
|
|
|
return refcount;
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:47 +02:00
|
|
|
static DWORD WINAPI d3drm_frame_array_GetSize(IDirect3DRMFrameArray *iface)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2013-10-10 23:49:47 +02:00
|
|
|
struct d3drm_frame_array *array = impl_from_IDirect3DRMFrameArray(iface);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2013-10-10 23:49:47 +02:00
|
|
|
TRACE("iface %p.\n", iface);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2013-10-10 23:49:47 +02:00
|
|
|
return array->size;
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:47 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame_array_GetElement(IDirect3DRMFrameArray *iface,
|
2013-04-19 08:34:15 +02:00
|
|
|
DWORD index, IDirect3DRMFrame **frame)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2013-10-10 23:49:47 +02:00
|
|
|
struct d3drm_frame_array *array = impl_from_IDirect3DRMFrameArray(iface);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2013-10-10 23:49:47 +02:00
|
|
|
TRACE("iface %p, index %u, frame %p.\n", iface, 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
|
|
|
|
2013-10-10 23:49:47 +02:00
|
|
|
if (index >= array->size)
|
|
|
|
{
|
|
|
|
*frame = NULL;
|
2012-06-12 10:23:23 +02:00
|
|
|
return D3DRMERR_BADVALUE;
|
2013-10-10 23:49:47 +02:00
|
|
|
}
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2013-10-10 23:49:47 +02:00
|
|
|
IDirect3DRMFrame_AddRef(array->frames[index]);
|
|
|
|
*frame = array->frames[index];
|
2012-06-12 10:23:23 +02:00
|
|
|
|
|
|
|
return D3DRM_OK;
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:47 +02:00
|
|
|
static const struct IDirect3DRMFrameArrayVtbl d3drm_frame_array_vtbl =
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2013-10-10 23:49:47 +02:00
|
|
|
d3drm_frame_array_QueryInterface,
|
|
|
|
d3drm_frame_array_AddRef,
|
|
|
|
d3drm_frame_array_Release,
|
|
|
|
d3drm_frame_array_GetSize,
|
|
|
|
d3drm_frame_array_GetElement,
|
2012-06-12 10:23:23 +02:00
|
|
|
};
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2013-10-28 11:46:39 +01:00
|
|
|
static struct d3drm_frame_array *d3drm_frame_array_create(unsigned int frame_count, IDirect3DRMFrame3 **frames)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2013-10-10 23:49:47 +02:00
|
|
|
struct d3drm_frame_array *array;
|
2013-10-28 11:46:39 +01:00
|
|
|
unsigned int i;
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2013-10-10 23:49:47 +02:00
|
|
|
if (!(array = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*array))))
|
|
|
|
return NULL;
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2013-10-10 23:49:47 +02:00
|
|
|
array->IDirect3DRMFrameArray_iface.lpVtbl = &d3drm_frame_array_vtbl;
|
|
|
|
array->ref = 1;
|
2013-10-28 11:46:39 +01:00
|
|
|
array->size = frame_count;
|
|
|
|
|
|
|
|
if (frame_count)
|
|
|
|
{
|
|
|
|
if (!(array->frames = HeapAlloc(GetProcessHeap(), 0, frame_count * sizeof(*array->frames))))
|
|
|
|
{
|
|
|
|
HeapFree(GetProcessHeap(), 0, array);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
for (i = 0; i < frame_count; ++i)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrame3_QueryInterface(frames[i], &IID_IDirect3DRMFrame, (void **)&array->frames[i]);
|
|
|
|
}
|
|
|
|
}
|
2012-06-12 10:23:23 +02:00
|
|
|
|
2013-10-10 23:49:47 +02:00
|
|
|
return array;
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
2013-10-09 22:57:49 +02:00
|
|
|
static HRESULT WINAPI d3drm_visual_array_QueryInterface(IDirect3DRMVisualArray *iface, REFIID riid, void **out)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2013-10-09 10:39:39 +02:00
|
|
|
TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2013-10-09 10:39:39 +02:00
|
|
|
if (IsEqualGUID(riid, &IID_IDirect3DRMVisualArray)
|
|
|
|
|| IsEqualGUID(riid, &IID_IUnknown))
|
2012-06-12 10:23:23 +02:00
|
|
|
{
|
|
|
|
IDirect3DRMVisualArray_AddRef(iface);
|
2013-10-09 10:39:39 +02:00
|
|
|
*out = iface;
|
2012-06-12 10:23:23 +02:00
|
|
|
return S_OK;
|
|
|
|
}
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2013-10-09 10:39:39 +02:00
|
|
|
WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
|
2012-06-12 10:23:23 +02:00
|
|
|
|
2013-10-09 10:39:39 +02:00
|
|
|
*out = NULL;
|
2012-06-12 10:23:23 +02:00
|
|
|
return E_NOINTERFACE;
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
2013-10-09 22:57:49 +02:00
|
|
|
static ULONG WINAPI d3drm_visual_array_AddRef(IDirect3DRMVisualArray *iface)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2013-10-09 22:57:49 +02:00
|
|
|
struct d3drm_visual_array *array = impl_from_IDirect3DRMVisualArray(iface);
|
|
|
|
ULONG refcount = InterlockedIncrement(&array->ref);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2013-10-09 22:57:49 +02:00
|
|
|
TRACE("%p increasing refcount to %u.\n", iface, refcount);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2013-10-09 22:57:49 +02:00
|
|
|
return refcount;
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
2013-10-09 22:57:49 +02:00
|
|
|
static ULONG WINAPI d3drm_visual_array_Release(IDirect3DRMVisualArray *iface)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2013-10-09 22:57:49 +02:00
|
|
|
struct d3drm_visual_array *array = impl_from_IDirect3DRMVisualArray(iface);
|
|
|
|
ULONG refcount = InterlockedDecrement(&array->ref);
|
2012-06-12 10:23:23 +02:00
|
|
|
ULONG i;
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2013-10-09 22:57:49 +02:00
|
|
|
TRACE("%p decreasing refcount to %u.\n", iface, refcount);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2013-10-09 22:57:49 +02:00
|
|
|
if (!refcount)
|
2012-06-12 10:23:23 +02:00
|
|
|
{
|
2013-10-09 22:57:49 +02:00
|
|
|
for (i = 0; i < array->size; ++i)
|
|
|
|
{
|
|
|
|
IDirect3DRMVisual_Release(array->visuals[i]);
|
|
|
|
}
|
|
|
|
HeapFree(GetProcessHeap(), 0, array->visuals);
|
|
|
|
HeapFree(GetProcessHeap(), 0, array);
|
2012-06-12 10:23:23 +02:00
|
|
|
}
|
2012-04-13 13:55:15 +02:00
|
|
|
|
2013-10-09 22:57:49 +02:00
|
|
|
return refcount;
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
2013-10-09 22:57:49 +02:00
|
|
|
static DWORD WINAPI d3drm_visual_array_GetSize(IDirect3DRMVisualArray *iface)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2013-10-09 22:57:49 +02:00
|
|
|
struct d3drm_visual_array *array = impl_from_IDirect3DRMVisualArray(iface);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2013-10-09 22:57:49 +02:00
|
|
|
TRACE("iface %p.\n", iface);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2013-10-09 22:57:49 +02:00
|
|
|
return array->size;
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
2013-10-09 22:57:49 +02:00
|
|
|
static HRESULT WINAPI d3drm_visual_array_GetElement(IDirect3DRMVisualArray *iface,
|
2013-04-22 15:18:45 +02:00
|
|
|
DWORD index, IDirect3DRMVisual **visual)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2013-10-09 22:57:49 +02:00
|
|
|
struct d3drm_visual_array *array = impl_from_IDirect3DRMVisualArray(iface);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2013-10-09 22:57:49 +02:00
|
|
|
TRACE("iface %p, index %u, visual %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
|
|
|
|
2013-10-09 22:57:49 +02:00
|
|
|
if (index >= array->size)
|
|
|
|
{
|
|
|
|
*visual = NULL;
|
2012-06-12 10:23:23 +02:00
|
|
|
return D3DRMERR_BADVALUE;
|
2013-10-09 22:57:49 +02:00
|
|
|
}
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2013-10-09 22:57:49 +02:00
|
|
|
IDirect3DRMVisual_AddRef(array->visuals[index]);
|
|
|
|
*visual = array->visuals[index];
|
2012-06-12 10:23:23 +02:00
|
|
|
|
|
|
|
return D3DRM_OK;
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
2013-10-09 22:57:49 +02:00
|
|
|
static const struct IDirect3DRMVisualArrayVtbl d3drm_visual_array_vtbl =
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2013-10-09 22:57:49 +02:00
|
|
|
d3drm_visual_array_QueryInterface,
|
|
|
|
d3drm_visual_array_AddRef,
|
|
|
|
d3drm_visual_array_Release,
|
|
|
|
d3drm_visual_array_GetSize,
|
|
|
|
d3drm_visual_array_GetElement,
|
2012-06-12 10:23:23 +02:00
|
|
|
};
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2013-10-28 11:46:40 +01:00
|
|
|
static struct d3drm_visual_array *d3drm_visual_array_create(unsigned int visual_count, IDirect3DRMVisual **visuals)
|
2012-06-12 10:23:23 +02:00
|
|
|
{
|
2013-10-09 22:57:49 +02:00
|
|
|
struct d3drm_visual_array *array;
|
2013-10-28 11:46:40 +01:00
|
|
|
unsigned int i;
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2013-10-09 22:57:49 +02:00
|
|
|
if (!(array = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*array))))
|
|
|
|
return NULL;
|
2012-06-12 10:23:23 +02:00
|
|
|
|
2013-10-09 22:57:49 +02:00
|
|
|
array->IDirect3DRMVisualArray_iface.lpVtbl = &d3drm_visual_array_vtbl;
|
|
|
|
array->ref = 1;
|
2013-10-28 11:46:40 +01:00
|
|
|
array->size = visual_count;
|
|
|
|
|
|
|
|
if (visual_count)
|
|
|
|
{
|
|
|
|
if (!(array->visuals = HeapAlloc(GetProcessHeap(), 0, visual_count * sizeof(*array->visuals))))
|
|
|
|
{
|
|
|
|
HeapFree(GetProcessHeap(), 0, array);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
for (i = 0; i < visual_count; ++i)
|
|
|
|
{
|
|
|
|
array->visuals[i] = visuals[i];
|
|
|
|
IDirect3DRMVisual_AddRef(array->visuals[i]);
|
|
|
|
}
|
|
|
|
}
|
2012-06-12 10:23:23 +02:00
|
|
|
|
2013-10-09 22:57:49 +02:00
|
|
|
return array;
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
2013-10-07 22:15:51 +02:00
|
|
|
static HRESULT WINAPI d3drm_light_array_QueryInterface(IDirect3DRMLightArray *iface, REFIID riid, void **out)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2013-10-07 22:15:51 +02:00
|
|
|
TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
|
2012-06-12 10:23:23 +02:00
|
|
|
|
2013-10-07 22:15:51 +02:00
|
|
|
if (IsEqualGUID(riid, &IID_IDirect3DRMLightArray)
|
|
|
|
|| IsEqualGUID(riid, &IID_IUnknown))
|
2012-06-12 10:23:23 +02:00
|
|
|
{
|
2013-10-07 22:15:51 +02:00
|
|
|
IDirect3DRMLightArray_AddRef(iface);
|
|
|
|
*out = iface;
|
|
|
|
return S_OK;
|
2012-06-12 10:23:23 +02:00
|
|
|
}
|
|
|
|
|
2013-10-07 22:15:51 +02:00
|
|
|
WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
|
|
|
|
|
|
|
|
*out = NULL;
|
|
|
|
return E_NOINTERFACE;
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
2013-10-07 22:15:51 +02:00
|
|
|
static ULONG WINAPI d3drm_light_array_AddRef(IDirect3DRMLightArray *iface)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2013-10-07 22:15:51 +02:00
|
|
|
struct d3drm_light_array *array = impl_from_IDirect3DRMLightArray(iface);
|
|
|
|
ULONG refcount = InterlockedIncrement(&array->ref);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2013-10-07 22:15:51 +02:00
|
|
|
TRACE("%p increasing refcount to %u.\n", iface, refcount);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2013-10-07 22:15:51 +02:00
|
|
|
return refcount;
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
2013-10-07 22:15:51 +02:00
|
|
|
static ULONG WINAPI d3drm_light_array_Release(IDirect3DRMLightArray *iface)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2013-10-07 22:15:51 +02:00
|
|
|
struct d3drm_light_array *array = impl_from_IDirect3DRMLightArray(iface);
|
|
|
|
ULONG refcount = InterlockedDecrement(&array->ref);
|
2012-06-12 10:23:23 +02:00
|
|
|
ULONG i;
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2013-10-07 22:15:51 +02:00
|
|
|
TRACE("%p decreasing refcount to %u.\n", iface, refcount);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2013-10-07 22:15:51 +02:00
|
|
|
if (!refcount)
|
2012-06-12 10:23:23 +02:00
|
|
|
{
|
2013-10-07 22:15:51 +02:00
|
|
|
for (i = 0; i < array->size; ++i)
|
|
|
|
{
|
|
|
|
IDirect3DRMLight_Release(array->lights[i]);
|
|
|
|
}
|
|
|
|
HeapFree(GetProcessHeap(), 0, array->lights);
|
|
|
|
HeapFree(GetProcessHeap(), 0, array);
|
2012-06-12 10:23:23 +02:00
|
|
|
}
|
|
|
|
|
2013-10-07 22:15:51 +02:00
|
|
|
return refcount;
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
2013-10-07 22:15:51 +02:00
|
|
|
static DWORD WINAPI d3drm_light_array_GetSize(IDirect3DRMLightArray *iface)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2013-10-07 22:15:51 +02:00
|
|
|
struct d3drm_light_array *array = impl_from_IDirect3DRMLightArray(iface);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2013-10-07 22:15:51 +02:00
|
|
|
TRACE("iface %p.\n", iface);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2013-10-07 22:15:51 +02:00
|
|
|
return array->size;
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
2013-10-07 22:15:51 +02:00
|
|
|
static HRESULT WINAPI d3drm_light_array_GetElement(IDirect3DRMLightArray *iface,
|
2013-04-25 09:59:46 +02:00
|
|
|
DWORD index, IDirect3DRMLight **light)
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2013-10-07 22:15:51 +02:00
|
|
|
struct d3drm_light_array *array = impl_from_IDirect3DRMLightArray(iface);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2013-10-07 22:15:51 +02:00
|
|
|
TRACE("iface %p, index %u, light %p.\n", iface, index, light);
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2012-06-12 10:23:23 +02:00
|
|
|
if (!light)
|
|
|
|
return D3DRMERR_BADVALUE;
|
|
|
|
|
2013-10-07 22:15:51 +02:00
|
|
|
if (index >= array->size)
|
|
|
|
{
|
|
|
|
*light = NULL;
|
2012-06-12 10:23:23 +02:00
|
|
|
return D3DRMERR_BADVALUE;
|
2013-10-07 22:15:51 +02:00
|
|
|
}
|
2012-06-12 10:23:23 +02:00
|
|
|
|
2013-10-07 22:15:51 +02:00
|
|
|
IDirect3DRMLight_AddRef(array->lights[index]);
|
|
|
|
*light = array->lights[index];
|
2012-06-12 10:23:23 +02:00
|
|
|
|
|
|
|
return D3DRM_OK;
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
2013-10-07 22:15:51 +02:00
|
|
|
static const struct IDirect3DRMLightArrayVtbl d3drm_light_array_vtbl =
|
2011-12-30 16:42:59 +01:00
|
|
|
{
|
2013-10-07 22:15:51 +02:00
|
|
|
d3drm_light_array_QueryInterface,
|
|
|
|
d3drm_light_array_AddRef,
|
|
|
|
d3drm_light_array_Release,
|
|
|
|
d3drm_light_array_GetSize,
|
|
|
|
d3drm_light_array_GetElement,
|
2012-06-12 10:23:23 +02:00
|
|
|
};
|
2011-12-30 16:42:59 +01:00
|
|
|
|
2013-10-28 11:46:41 +01:00
|
|
|
static struct d3drm_light_array *d3drm_light_array_create(unsigned int light_count, IDirect3DRMLight **lights)
|
2012-06-12 10:23:23 +02:00
|
|
|
{
|
2013-10-07 22:15:51 +02:00
|
|
|
struct d3drm_light_array *array;
|
2013-10-28 11:46:41 +01:00
|
|
|
unsigned int i;
|
2012-06-12 10:23:23 +02:00
|
|
|
|
2013-10-07 22:15:51 +02:00
|
|
|
if (!(array = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*array))))
|
|
|
|
return NULL;
|
2012-06-12 10:23:23 +02:00
|
|
|
|
2013-10-07 22:15:51 +02:00
|
|
|
array->IDirect3DRMLightArray_iface.lpVtbl = &d3drm_light_array_vtbl;
|
|
|
|
array->ref = 1;
|
2013-10-28 11:46:41 +01:00
|
|
|
array->size = light_count;
|
|
|
|
|
|
|
|
if (light_count)
|
|
|
|
{
|
|
|
|
if (!(array->lights = HeapAlloc(GetProcessHeap(), 0, light_count * sizeof(*array->lights))))
|
|
|
|
{
|
|
|
|
HeapFree(GetProcessHeap(), 0, array);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
for (i = 0; i < light_count; ++i)
|
|
|
|
{
|
|
|
|
array->lights[i] = lights[i];
|
|
|
|
IDirect3DRMLight_AddRef(array->lights[i]);
|
|
|
|
}
|
|
|
|
}
|
2012-06-12 10:23:23 +02:00
|
|
|
|
2013-10-07 22:15:51 +02:00
|
|
|
return array;
|
2011-12-30 16:42:59 +01:00
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_QueryInterface(IDirect3DRMFrame3 *iface, REFIID riid, void **out)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
if (IsEqualGUID(riid, &IID_IDirect3DRMFrame)
|
2015-04-26 13:18:59 +02:00
|
|
|
|| IsEqualGUID(riid, &IID_IDirect3DRMObject)
|
|
|
|
|| IsEqualGUID(riid, &IID_IDirect3DRMVisual)
|
|
|
|
|| IsEqualGUID(riid, &IID_IUnknown))
|
2016-06-19 21:28:07 +02:00
|
|
|
{
|
|
|
|
*out = &frame->IDirect3DRMFrame_iface;
|
|
|
|
}
|
|
|
|
else if (IsEqualGUID(riid, &IID_IDirect3DRMFrame2))
|
2015-04-26 13:18:59 +02:00
|
|
|
{
|
|
|
|
*out = &frame->IDirect3DRMFrame2_iface;
|
|
|
|
}
|
|
|
|
else if (IsEqualGUID(riid, &IID_IDirect3DRMFrame3))
|
|
|
|
{
|
|
|
|
*out = &frame->IDirect3DRMFrame3_iface;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
*out = NULL;
|
|
|
|
WARN("%s not implemented, returning CLASS_E_CLASSNOTAVAILABLE.\n", debugstr_guid(riid));
|
|
|
|
return CLASS_E_CLASSNOTAVAILABLE;
|
|
|
|
}
|
|
|
|
|
|
|
|
IUnknown_AddRef((IUnknown *)*out);
|
|
|
|
return S_OK;
|
2012-01-04 19:12:32 +01:00
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_QueryInterface(IDirect3DRMFrame2 *iface, REFIID riid, void **out)
|
|
|
|
{
|
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
|
|
|
|
|
|
|
|
return d3drm_frame3_QueryInterface(&frame->IDirect3DRMFrame3_iface, riid, out);
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_QueryInterface(IDirect3DRMFrame *iface, REFIID riid, void **out)
|
|
|
|
{
|
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
|
|
|
|
|
|
|
|
return d3drm_frame3_QueryInterface(&frame->IDirect3DRMFrame3_iface, riid, out);
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static ULONG WINAPI d3drm_frame3_AddRef(IDirect3DRMFrame3 *iface)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame3(iface);
|
2015-04-26 13:19:00 +02:00
|
|
|
ULONG refcount = InterlockedIncrement(&frame->ref);
|
2013-10-10 23:49:48 +02:00
|
|
|
|
2015-04-26 13:19:00 +02:00
|
|
|
TRACE("%p increasing refcount to %u.\n", iface, refcount);
|
2013-10-10 23:49:48 +02:00
|
|
|
|
2015-04-26 13:19:00 +02:00
|
|
|
return refcount;
|
2012-01-04 19:12:32 +01:00
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static ULONG WINAPI d3drm_frame2_AddRef(IDirect3DRMFrame2 *iface)
|
|
|
|
{
|
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p.\n", iface);
|
|
|
|
|
|
|
|
return d3drm_frame3_AddRef(&frame->IDirect3DRMFrame3_iface);
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static ULONG WINAPI d3drm_frame1_AddRef(IDirect3DRMFrame *iface)
|
|
|
|
{
|
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p.\n", iface);
|
|
|
|
|
|
|
|
return d3drm_frame3_AddRef(&frame->IDirect3DRMFrame3_iface);
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static ULONG WINAPI d3drm_frame3_Release(IDirect3DRMFrame3 *iface)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame3(iface);
|
2015-04-26 13:19:01 +02:00
|
|
|
ULONG refcount = InterlockedDecrement(&frame->ref);
|
|
|
|
ULONG i;
|
2013-10-10 23:49:48 +02:00
|
|
|
|
2015-04-26 13:19:01 +02:00
|
|
|
TRACE("%p decreasing refcount to %u.\n", iface, refcount);
|
2013-10-10 23:49:48 +02:00
|
|
|
|
2015-04-26 13:19:01 +02:00
|
|
|
if (!refcount)
|
|
|
|
{
|
|
|
|
for (i = 0; i < frame->nb_children; ++i)
|
|
|
|
{
|
|
|
|
IDirect3DRMFrame3_Release(frame->children[i]);
|
|
|
|
}
|
|
|
|
HeapFree(GetProcessHeap(), 0, frame->children);
|
|
|
|
for (i = 0; i < frame->nb_visuals; ++i)
|
|
|
|
{
|
|
|
|
IDirect3DRMVisual_Release(frame->visuals[i]);
|
|
|
|
}
|
|
|
|
HeapFree(GetProcessHeap(), 0, frame->visuals);
|
|
|
|
for (i = 0; i < frame->nb_lights; ++i)
|
|
|
|
{
|
|
|
|
IDirect3DRMLight_Release(frame->lights[i]);
|
|
|
|
}
|
|
|
|
HeapFree(GetProcessHeap(), 0, frame->lights);
|
|
|
|
HeapFree(GetProcessHeap(), 0, frame);
|
|
|
|
}
|
|
|
|
|
|
|
|
return refcount;
|
2012-01-04 19:12:32 +01:00
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static ULONG WINAPI d3drm_frame2_Release(IDirect3DRMFrame2 *iface)
|
|
|
|
{
|
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p.\n", iface);
|
|
|
|
|
|
|
|
return d3drm_frame3_Release(&frame->IDirect3DRMFrame3_iface);
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static ULONG WINAPI d3drm_frame1_Release(IDirect3DRMFrame *iface)
|
|
|
|
{
|
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p.\n", iface);
|
|
|
|
|
|
|
|
return d3drm_frame3_Release(&frame->IDirect3DRMFrame3_iface);
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_Clone(IDirect3DRMFrame3 *iface,
|
2013-08-20 10:20:13 +02:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_Clone(IDirect3DRMFrame2 *iface,
|
|
|
|
IUnknown *outer, REFIID iid, void **out)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, outer %p, iid %s, out %p stub!\n", iface, outer, debugstr_guid(iid), out);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_Clone(IDirect3DRMFrame *iface,
|
|
|
|
IUnknown *outer, REFIID iid, void **out)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, outer %p, iid %s, out %p stub!\n", iface, outer, debugstr_guid(iid), out);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_AddDestroyCallback(IDirect3DRMFrame3 *iface,
|
2013-09-09 10:26:21 +02:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_AddDestroyCallback(IDirect3DRMFrame2 *iface,
|
|
|
|
D3DRMOBJECTCALLBACK cb, void *ctx)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, cb %p, ctx %p stub!\n", iface, cb, ctx);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_AddDestroyCallback(IDirect3DRMFrame *iface,
|
|
|
|
D3DRMOBJECTCALLBACK cb, void *ctx)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, cb %p, ctx %p stub!\n", iface, cb, ctx);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_DeleteDestroyCallback(IDirect3DRMFrame3 *iface,
|
2013-09-09 10:26:21 +02:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_DeleteDestroyCallback(IDirect3DRMFrame2 *iface,
|
|
|
|
D3DRMOBJECTCALLBACK cb, void *ctx)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, cb %p, ctx %p stub!\n", iface, cb, ctx);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_DeleteDestroyCallback(IDirect3DRMFrame *iface,
|
|
|
|
D3DRMOBJECTCALLBACK cb, void *ctx)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, cb %p, ctx %p stub!\n", iface, cb, ctx);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_SetAppData(IDirect3DRMFrame3 *iface, DWORD data)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p, data %#x stub!\n", iface, data);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_SetAppData(IDirect3DRMFrame2 *iface, DWORD data)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, data %#x stub!\n", iface, data);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_SetAppData(IDirect3DRMFrame *iface, DWORD data)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, data %#x stub!\n", iface, data);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static DWORD WINAPI d3drm_frame3_GetAppData(IDirect3DRMFrame3 *iface)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p stub!\n", iface);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static DWORD WINAPI d3drm_frame2_GetAppData(IDirect3DRMFrame2 *iface)
|
|
|
|
{
|
|
|
|
FIXME("iface %p stub!\n", iface);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static DWORD WINAPI d3drm_frame1_GetAppData(IDirect3DRMFrame *iface)
|
|
|
|
{
|
|
|
|
FIXME("iface %p stub!\n", iface);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_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;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_SetName(IDirect3DRMFrame2 *iface, const char *name)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, name %s stub!\n", iface, debugstr_a(name));
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_SetName(IDirect3DRMFrame *iface, const char *name)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, name %s stub!\n", iface, debugstr_a(name));
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_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;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_GetName(IDirect3DRMFrame2 *iface, DWORD *size, char *name)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, size %p, name %p stub!\n", iface, size, name);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_GetName(IDirect3DRMFrame *iface, DWORD *size, char *name)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, size %p, name %p stub!\n", iface, size, name);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_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
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_GetClassName(IDirect3DRMFrame2 *iface, DWORD *size, char *name)
|
|
|
|
{
|
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p, size %p, name %p.\n", iface, size, name);
|
|
|
|
|
|
|
|
return d3drm_frame3_GetClassName(&frame->IDirect3DRMFrame3_iface, size, name);
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_GetClassName(IDirect3DRMFrame *iface, DWORD *size, char *name)
|
|
|
|
{
|
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p, size %p, name %p.\n", iface, size, name);
|
|
|
|
|
|
|
|
return d3drm_frame3_GetClassName(&frame->IDirect3DRMFrame3_iface, size, name);
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_AddChild(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 *child)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
struct d3drm_frame *This = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
struct d3drm_frame *child_obj = unsafe_impl_from_IDirect3DRMFrame3(child);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
TRACE("iface %p, child %p.\n", iface, 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
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_AddChild(IDirect3DRMFrame2 *iface, IDirect3DRMFrame *child)
|
|
|
|
{
|
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
IDirect3DRMFrame3 *child3;
|
|
|
|
HRESULT hr;
|
|
|
|
|
|
|
|
TRACE("iface %p, child %p.\n", iface, child);
|
|
|
|
|
|
|
|
if (!child)
|
|
|
|
return D3DRMERR_BADOBJECT;
|
|
|
|
hr = IDirect3DRMFrame_QueryInterface(child, &IID_IDirect3DRMFrame3, (void **)&child3);
|
|
|
|
if (hr != S_OK)
|
|
|
|
return D3DRMERR_BADOBJECT;
|
|
|
|
IDirect3DRMFrame_Release(child);
|
|
|
|
|
|
|
|
return d3drm_frame3_AddChild(&frame->IDirect3DRMFrame3_iface, child3);
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_AddChild(IDirect3DRMFrame *iface, IDirect3DRMFrame *child)
|
|
|
|
{
|
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame(iface);
|
|
|
|
struct d3drm_frame *child_frame = unsafe_impl_from_IDirect3DRMFrame(child);
|
|
|
|
|
|
|
|
TRACE("iface %p, child %p.\n", iface, child);
|
|
|
|
|
|
|
|
if (!child_frame)
|
|
|
|
return D3DRMERR_BADOBJECT;
|
|
|
|
|
|
|
|
return d3drm_frame3_AddChild(&frame->IDirect3DRMFrame3_iface, &child_frame->IDirect3DRMFrame3_iface);
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_AddLight(IDirect3DRMFrame3 *iface, IDirect3DRMLight *light)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
struct d3drm_frame *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
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
TRACE("iface %p, light %p.\n", iface, 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
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_AddLight(IDirect3DRMFrame2 *iface, IDirect3DRMLight *light)
|
|
|
|
{
|
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p, light %p.\n", iface, light);
|
|
|
|
|
|
|
|
return d3drm_frame3_AddLight(&frame->IDirect3DRMFrame3_iface, light);
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_AddLight(IDirect3DRMFrame *iface, IDirect3DRMLight *light)
|
|
|
|
{
|
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p, light %p.\n", iface, light);
|
|
|
|
|
|
|
|
return d3drm_frame3_AddLight(&frame->IDirect3DRMFrame3_iface, light);
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_AddMoveCallback(IDirect3DRMFrame3 *iface,
|
2013-09-23 10:26:47 +02:00
|
|
|
D3DRMFRAME3MOVECALLBACK cb, void *ctx, DWORD flags)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-09-23 10:26:47 +02:00
|
|
|
FIXME("iface %p, cb %p, ctx %p flags %#x stub!\n", iface, cb, ctx, flags);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_AddMoveCallback(IDirect3DRMFrame2 *iface,
|
|
|
|
D3DRMFRAMEMOVECALLBACK cb, void *ctx)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, cb %p, ctx %p stub!\n", iface, cb, ctx);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_AddMoveCallback(IDirect3DRMFrame *iface,
|
|
|
|
D3DRMFRAMEMOVECALLBACK cb, void *ctx)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, cb %p, ctx %p stub!\n", iface, cb, ctx);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_AddTransform(IDirect3DRMFrame3 *iface,
|
|
|
|
D3DRMCOMBINETYPE type, D3DRMMATRIX4D matrix)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame3(iface);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
TRACE("iface %p, type %#x, matrix %p.\n", iface, type, matrix);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2012-05-17 10:09:40 +02:00
|
|
|
switch (type)
|
|
|
|
{
|
|
|
|
case D3DRMCOMBINE_REPLACE:
|
2013-10-10 23:49:48 +02:00
|
|
|
memcpy(frame->transform, matrix, sizeof(D3DRMMATRIX4D));
|
2012-05-17 10:09:40 +02:00
|
|
|
break;
|
|
|
|
|
|
|
|
case D3DRMCOMBINE_BEFORE:
|
2014-01-22 12:25:54 +01:00
|
|
|
FIXME("D3DRMCOMBINE_BEFORE not supported yet\n");
|
2012-05-17 10:09:40 +02:00
|
|
|
break;
|
|
|
|
|
|
|
|
case D3DRMCOMBINE_AFTER:
|
2014-01-22 12:25:54 +01:00
|
|
|
FIXME("D3DRMCOMBINE_AFTER not supported yet\n");
|
2012-05-17 10:09:40 +02:00
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
WARN("Unknown Combine Type %u\n", type);
|
|
|
|
return D3DRMERR_BADVALUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
return S_OK;
|
2012-01-04 19:12:32 +01:00
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_AddTransform(IDirect3DRMFrame2 *iface,
|
|
|
|
D3DRMCOMBINETYPE type, D3DRMMATRIX4D matrix)
|
|
|
|
{
|
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p, type %#x, matrix %p.\n", iface, type, matrix);
|
|
|
|
|
|
|
|
return d3drm_frame3_AddTransform(&frame->IDirect3DRMFrame3_iface, type, matrix);
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_AddTransform(IDirect3DRMFrame *iface,
|
|
|
|
D3DRMCOMBINETYPE type, D3DRMMATRIX4D matrix)
|
|
|
|
{
|
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p, type %#x, matrix %p.\n", iface, type, matrix);
|
|
|
|
|
|
|
|
return d3drm_frame3_AddTransform(&frame->IDirect3DRMFrame3_iface, type, matrix);
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_AddTranslation(IDirect3DRMFrame3 *iface,
|
|
|
|
D3DRMCOMBINETYPE type, D3DVALUE x, D3DVALUE y, D3DVALUE z)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p, type %#x, x %.8e, y %.8e, z %.8e stub!\n", iface, type, x, y, z);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_AddTranslation(IDirect3DRMFrame2 *iface,
|
|
|
|
D3DRMCOMBINETYPE type, D3DVALUE x, D3DVALUE y, D3DVALUE z)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, type %#x, x %.8e, y %.8e, z %.8e stub!\n", iface, type, x, y, z);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_AddTranslation(IDirect3DRMFrame *iface,
|
|
|
|
D3DRMCOMBINETYPE type, D3DVALUE x, D3DVALUE y, D3DVALUE z)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, type %#x, x %.8e, y %.8e, z %.8e stub!\n", iface, type, x, y, z);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_AddScale(IDirect3DRMFrame3 *iface,
|
|
|
|
D3DRMCOMBINETYPE type, D3DVALUE sx, D3DVALUE sy, D3DVALUE sz)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p, type %#x, sx %.8e, sy %.8e, sz %.8e stub!\n", iface, type, sx, sy, sz);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_AddScale(IDirect3DRMFrame2 *iface,
|
|
|
|
D3DRMCOMBINETYPE type, D3DVALUE sx, D3DVALUE sy, D3DVALUE sz)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, type %#x, sx %.8e, sy %.8e, sz %.8e stub!\n", iface, type, sx, sy, sz);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_AddScale(IDirect3DRMFrame *iface,
|
|
|
|
D3DRMCOMBINETYPE type, D3DVALUE sx, D3DVALUE sy, D3DVALUE sz)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, type %#x, sx %.8e, sy %.8e, sz %.8e stub!\n", iface, type, sx, sy, sz);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_AddRotation(IDirect3DRMFrame3 *iface,
|
|
|
|
D3DRMCOMBINETYPE type, D3DVALUE x, D3DVALUE y, D3DVALUE z, D3DVALUE theta)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p, type %#x, x %.8e, y %.8e, z %.8e, theta %.8e stub!\n",
|
|
|
|
iface, type, x, y, z, theta);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_AddRotation(IDirect3DRMFrame2 *iface,
|
|
|
|
D3DRMCOMBINETYPE type, D3DVALUE x, D3DVALUE y, D3DVALUE z, D3DVALUE theta)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, type %#x, x %.8e, y %.8e, z %.8e, theta %.8e stub!\n", iface, type, x, y, z, theta);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_AddRotation(IDirect3DRMFrame *iface,
|
|
|
|
D3DRMCOMBINETYPE type, D3DVALUE x, D3DVALUE y, D3DVALUE z, D3DVALUE theta)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, type %#x, x %.8e, y %.8e, z %.8e, theta %.8e stub!\n", iface, type, x, y, z, theta);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_AddVisual(IDirect3DRMFrame3 *iface, IUnknown *visual)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
struct d3drm_frame *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
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_AddVisual(IDirect3DRMFrame2 *iface, IDirect3DRMVisual *visual)
|
|
|
|
{
|
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p, visual %p.\n", iface, visual);
|
|
|
|
|
|
|
|
return d3drm_frame3_AddVisual(&frame->IDirect3DRMFrame3_iface, (IUnknown *)visual);
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_AddVisual(IDirect3DRMFrame *iface, IDirect3DRMVisual *visual)
|
|
|
|
{
|
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p, visual %p.\n", iface, visual);
|
|
|
|
|
|
|
|
return d3drm_frame3_AddVisual(&frame->IDirect3DRMFrame3_iface, (IUnknown *)visual);
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_GetChildren(IDirect3DRMFrame3 *iface, IDirect3DRMFrameArray **children)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame3(iface);
|
2013-10-10 23:49:47 +02:00
|
|
|
struct d3drm_frame_array *array;
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2013-10-10 23:49:47 +02:00
|
|
|
TRACE("iface %p, children %p.\n", iface, children);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2012-05-03 09:40:26 +02:00
|
|
|
if (!children)
|
|
|
|
return D3DRMERR_BADVALUE;
|
|
|
|
|
2013-10-28 11:46:39 +01:00
|
|
|
if (!(array = d3drm_frame_array_create(frame->nb_children, frame->children)))
|
2013-10-10 23:49:47 +02:00
|
|
|
return E_OUTOFMEMORY;
|
2012-05-03 09:40:26 +02:00
|
|
|
|
2013-10-10 23:49:47 +02:00
|
|
|
*children = &array->IDirect3DRMFrameArray_iface;
|
|
|
|
|
2012-05-03 09:40:26 +02:00
|
|
|
return D3DRM_OK;
|
2012-01-04 19:12:32 +01:00
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_GetChildren(IDirect3DRMFrame2 *iface, IDirect3DRMFrameArray **children)
|
|
|
|
{
|
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p, children %p.\n", iface, children);
|
|
|
|
|
|
|
|
return d3drm_frame3_GetChildren(&frame->IDirect3DRMFrame3_iface, children);
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_GetChildren(IDirect3DRMFrame *iface, IDirect3DRMFrameArray **children)
|
|
|
|
{
|
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p, children %p.\n", iface, children);
|
|
|
|
|
|
|
|
return d3drm_frame3_GetChildren(&frame->IDirect3DRMFrame3_iface, children);
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static D3DCOLOR WINAPI d3drm_frame3_GetColor(IDirect3DRMFrame3 *iface)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p stub!\n", iface);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static D3DCOLOR WINAPI d3drm_frame2_GetColor(IDirect3DRMFrame2 *iface)
|
|
|
|
{
|
|
|
|
FIXME("iface %p stub!\n", iface);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static D3DCOLOR WINAPI d3drm_frame1_GetColor(IDirect3DRMFrame *iface)
|
|
|
|
{
|
|
|
|
FIXME("iface %p stub!\n", iface);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_GetLights(IDirect3DRMFrame3 *iface, IDirect3DRMLightArray **lights)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame3(iface);
|
2013-10-07 22:15:51 +02:00
|
|
|
struct d3drm_light_array *array;
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2013-10-07 22:15:51 +02:00
|
|
|
TRACE("iface %p, lights %p.\n", iface, lights);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2012-05-27 17:44:19 +02:00
|
|
|
if (!lights)
|
|
|
|
return D3DRMERR_BADVALUE;
|
|
|
|
|
2013-10-28 11:46:41 +01:00
|
|
|
if (!(array = d3drm_light_array_create(frame->nb_lights, frame->lights)))
|
2013-10-07 22:15:51 +02:00
|
|
|
return E_OUTOFMEMORY;
|
2012-05-27 17:44:19 +02:00
|
|
|
|
2013-10-07 22:15:51 +02:00
|
|
|
*lights = &array->IDirect3DRMLightArray_iface;
|
|
|
|
|
2012-05-27 17:44:19 +02:00
|
|
|
return D3DRM_OK;
|
2012-01-04 19:12:32 +01:00
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_GetLights(IDirect3DRMFrame2 *iface, IDirect3DRMLightArray **lights)
|
|
|
|
{
|
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p, lights %p.\n", iface, lights);
|
|
|
|
|
|
|
|
return d3drm_frame3_GetLights(&frame->IDirect3DRMFrame3_iface, lights);
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_GetLights(IDirect3DRMFrame *iface, IDirect3DRMLightArray **lights)
|
|
|
|
{
|
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p, lights %p.\n", iface, lights);
|
|
|
|
|
|
|
|
return d3drm_frame3_GetLights(&frame->IDirect3DRMFrame3_iface, lights);
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static D3DRMMATERIALMODE WINAPI d3drm_frame3_GetMaterialMode(IDirect3DRMFrame3 *iface)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p stub!\n", iface);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return D3DRMMATERIAL_FROMPARENT;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static D3DRMMATERIALMODE WINAPI d3drm_frame2_GetMaterialMode(IDirect3DRMFrame2 *iface)
|
|
|
|
{
|
|
|
|
FIXME("iface %p stub!\n", iface);
|
|
|
|
|
|
|
|
return D3DRMMATERIAL_FROMPARENT;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static D3DRMMATERIALMODE WINAPI d3drm_frame1_GetMaterialMode(IDirect3DRMFrame *iface)
|
|
|
|
{
|
|
|
|
FIXME("iface %p stub!\n", iface);
|
|
|
|
|
|
|
|
return D3DRMMATERIAL_FROMPARENT;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_GetParent(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 **parent)
|
|
|
|
{
|
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p, parent %p.\n", iface, parent);
|
|
|
|
|
|
|
|
if (!parent)
|
|
|
|
return D3DRMERR_BADVALUE;
|
|
|
|
|
|
|
|
if (frame->parent)
|
|
|
|
{
|
|
|
|
*parent = &frame->parent->IDirect3DRMFrame3_iface;
|
|
|
|
IDirect3DRMFrame_AddRef(*parent);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
*parent = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
return D3DRM_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI d3drm_frame2_GetParent(IDirect3DRMFrame2 *iface, IDirect3DRMFrame **parent)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2016-06-19 00:29:07 +02:00
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame2(iface);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
TRACE("iface %p, parent %p.\n", iface, parent);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
if (!parent)
|
2012-05-03 09:40:17 +02:00
|
|
|
return D3DRMERR_BADVALUE;
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
if (frame->parent)
|
2012-05-03 09:40:17 +02:00
|
|
|
{
|
2016-06-19 21:28:07 +02:00
|
|
|
*parent = &frame->parent->IDirect3DRMFrame_iface;
|
2013-10-10 23:49:48 +02:00
|
|
|
IDirect3DRMFrame_AddRef(*parent);
|
2012-05-03 09:40:17 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
*parent = NULL;
|
2012-05-03 09:40:17 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
return D3DRM_OK;
|
2012-01-04 19:12:32 +01:00
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_GetParent(IDirect3DRMFrame *iface, IDirect3DRMFrame **parent)
|
|
|
|
{
|
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p, parent %p.\n", iface, parent);
|
|
|
|
|
|
|
|
return d3drm_frame2_GetParent(&frame->IDirect3DRMFrame2_iface, parent);
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_GetPosition(IDirect3DRMFrame3 *iface,
|
|
|
|
IDirect3DRMFrame3 *reference, D3DVECTOR *position)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p, reference %p, position %p stub!\n", iface, reference, position);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_GetPosition(IDirect3DRMFrame2 *iface,
|
|
|
|
IDirect3DRMFrame *reference, D3DVECTOR *position)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, reference %p, position %p stub!\n", iface, reference, position);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_GetPosition(IDirect3DRMFrame *iface,
|
|
|
|
IDirect3DRMFrame *reference, D3DVECTOR *position)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, reference %p, position %p stub!\n", iface, reference, position);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_GetRotation(IDirect3DRMFrame3 *iface,
|
|
|
|
IDirect3DRMFrame3 *reference, D3DVECTOR *axis, D3DVALUE *theta)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p, reference %p, axis %p, theta %p stub!\n", iface, reference, axis, theta);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_GetRotation(IDirect3DRMFrame2 *iface,
|
|
|
|
IDirect3DRMFrame *reference, D3DVECTOR *axis, D3DVALUE *theta)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, reference %p, axis %p, theta %p stub!\n", iface, reference, axis, theta);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_GetRotation(IDirect3DRMFrame *iface,
|
|
|
|
IDirect3DRMFrame *reference, D3DVECTOR *axis, D3DVALUE *theta)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, reference %p, axis %p, theta %p stub!\n", iface, reference, axis, theta);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_GetScene(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 **scene)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2016-08-15 21:50:15 +02:00
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame3(iface);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2016-08-15 21:50:15 +02:00
|
|
|
TRACE("iface %p, scene %p.\n", iface, scene);
|
|
|
|
|
|
|
|
if (!scene)
|
|
|
|
return D3DRMERR_BADVALUE;
|
|
|
|
|
|
|
|
while (frame->parent)
|
|
|
|
frame = frame->parent;
|
|
|
|
|
|
|
|
*scene = &frame->IDirect3DRMFrame3_iface;
|
|
|
|
IDirect3DRMFrame3_AddRef(*scene);
|
|
|
|
|
|
|
|
return D3DRM_OK;
|
2012-01-04 19:12:32 +01:00
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_GetScene(IDirect3DRMFrame2 *iface, IDirect3DRMFrame **scene)
|
|
|
|
{
|
2016-08-15 21:50:15 +02:00
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
IDirect3DRMFrame3 *frame3;
|
|
|
|
HRESULT hr;
|
2016-06-19 00:29:07 +02:00
|
|
|
|
2016-08-15 21:50:15 +02:00
|
|
|
TRACE("iface %p, scene %p.\n", iface, scene);
|
|
|
|
|
|
|
|
if (!scene)
|
|
|
|
return D3DRMERR_BADVALUE;
|
|
|
|
|
|
|
|
hr = IDirect3DRMFrame3_GetScene(&frame->IDirect3DRMFrame3_iface, &frame3);
|
|
|
|
if (FAILED(hr) || !frame3)
|
|
|
|
{
|
|
|
|
*scene = NULL;
|
|
|
|
return hr;
|
|
|
|
}
|
|
|
|
|
|
|
|
hr = IDirect3DRMFrame3_QueryInterface(frame3, &IID_IDirect3DRMFrame, (void **)scene);
|
|
|
|
IDirect3DRMFrame3_Release(frame3);
|
|
|
|
|
|
|
|
return hr;
|
2016-06-19 00:29:07 +02:00
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_GetScene(IDirect3DRMFrame *iface, IDirect3DRMFrame **scene)
|
|
|
|
{
|
2016-08-15 21:50:15 +02:00
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame(iface);
|
2016-06-19 21:28:07 +02:00
|
|
|
|
2016-08-15 21:50:15 +02:00
|
|
|
TRACE("iface %p, scene %p.\n", iface, scene);
|
|
|
|
|
|
|
|
return d3drm_frame2_GetScene(&frame->IDirect3DRMFrame2_iface, scene);
|
2016-06-19 21:28:07 +02:00
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static D3DRMSORTMODE WINAPI d3drm_frame3_GetSortMode(IDirect3DRMFrame3 *iface)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p stub!\n", iface);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return D3DRMSORT_FROMPARENT;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static D3DRMSORTMODE WINAPI d3drm_frame2_GetSortMode(IDirect3DRMFrame2 *iface)
|
|
|
|
{
|
|
|
|
FIXME("iface %p stub!\n", iface);
|
|
|
|
|
|
|
|
return D3DRMSORT_FROMPARENT;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static D3DRMSORTMODE WINAPI d3drm_frame1_GetSortMode(IDirect3DRMFrame *iface)
|
|
|
|
{
|
|
|
|
FIXME("iface %p stub!\n", iface);
|
|
|
|
|
|
|
|
return D3DRMSORT_FROMPARENT;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_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;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_GetTexture(IDirect3DRMFrame2 *iface, IDirect3DRMTexture **texture)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, texture %p stub!\n", iface, texture);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_GetTexture(IDirect3DRMFrame *iface, IDirect3DRMTexture **texture)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, texture %p stub!\n", iface, texture);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_GetTransform(IDirect3DRMFrame3 *iface,
|
|
|
|
IDirect3DRMFrame3 *reference, D3DRMMATRIX4D matrix)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame3(iface);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
TRACE("iface %p, reference %p, matrix %p.\n", iface, reference, 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");
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
memcpy(matrix, frame->transform, sizeof(D3DRMMATRIX4D));
|
2012-05-08 22:31:16 +02:00
|
|
|
|
|
|
|
return D3DRM_OK;
|
2012-01-04 19:12:32 +01:00
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_GetTransform(IDirect3DRMFrame2 *iface, D3DRMMATRIX4D matrix)
|
|
|
|
{
|
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p, matrix %p.\n", iface, matrix);
|
|
|
|
|
|
|
|
memcpy(matrix, frame->transform, sizeof(D3DRMMATRIX4D));
|
|
|
|
|
|
|
|
return D3DRM_OK;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_GetTransform(IDirect3DRMFrame *iface, D3DRMMATRIX4D matrix)
|
|
|
|
{
|
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p, matrix %p.\n", iface, matrix);
|
|
|
|
|
|
|
|
return d3drm_frame2_GetTransform(&frame->IDirect3DRMFrame2_iface, matrix);
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_GetVelocity(IDirect3DRMFrame3 *iface,
|
|
|
|
IDirect3DRMFrame3 *reference, D3DVECTOR *velocity, BOOL with_rotation)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p, reference %p, velocity %p, with_rotation %#x stub!\n",
|
|
|
|
iface, reference, velocity, with_rotation);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_GetVelocity(IDirect3DRMFrame2 *iface,
|
|
|
|
IDirect3DRMFrame *reference, D3DVECTOR *velocity, BOOL with_rotation)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, reference %p, velocity %p, with_rotation %#x stub!\n",
|
|
|
|
iface, reference, velocity, with_rotation);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_GetVelocity(IDirect3DRMFrame *iface,
|
|
|
|
IDirect3DRMFrame *reference, D3DVECTOR *velocity, BOOL with_rotation)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, reference %p, velocity %p, with_rotation %#x stub!\n",
|
|
|
|
iface, reference, velocity, with_rotation);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_GetOrientation(IDirect3DRMFrame3 *iface,
|
2013-01-23 08:50:10 +01:00
|
|
|
IDirect3DRMFrame3 *reference, D3DVECTOR *dir, D3DVECTOR *up)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p, reference %p, dir %p, up %p stub!\n", iface, reference, dir, up);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_GetOrientation(IDirect3DRMFrame2 *iface,
|
|
|
|
IDirect3DRMFrame *reference, D3DVECTOR *dir, D3DVECTOR *up)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, reference %p, dir %p, up %p stub!\n", iface, reference, dir, up);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_GetOrientation(IDirect3DRMFrame *iface,
|
|
|
|
IDirect3DRMFrame *reference, D3DVECTOR *dir, D3DVECTOR *up)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, reference %p, dir %p, up %p stub!\n", iface, reference, dir, up);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_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;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_GetVisuals(IDirect3DRMFrame2 *iface, IDirect3DRMVisualArray **visuals)
|
|
|
|
{
|
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
struct d3drm_visual_array *array;
|
|
|
|
|
|
|
|
TRACE("iface %p, visuals %p.\n", iface, visuals);
|
|
|
|
|
|
|
|
if (!visuals)
|
|
|
|
return D3DRMERR_BADVALUE;
|
|
|
|
|
|
|
|
if (!(array = d3drm_visual_array_create(frame->nb_visuals, frame->visuals)))
|
|
|
|
return E_OUTOFMEMORY;
|
|
|
|
|
|
|
|
*visuals = &array->IDirect3DRMVisualArray_iface;
|
|
|
|
|
|
|
|
return D3DRM_OK;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_GetVisuals(IDirect3DRMFrame *iface, IDirect3DRMVisualArray **visuals)
|
|
|
|
{
|
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p, visuals %p.\n", iface, visuals);
|
|
|
|
|
|
|
|
return d3drm_frame2_GetVisuals(&frame->IDirect3DRMFrame2_iface, visuals);
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_GetTextureTopology(IDirect3DRMFrame2 *iface, BOOL *wrap_u, BOOL *wrap_v)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, wrap_u %p, wrap_v %p stub!\n", iface, wrap_u, wrap_v);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_GetTextureTopology(IDirect3DRMFrame *iface, BOOL *wrap_u, BOOL *wrap_v)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, wrap_u %p, wrap_v %p stub!\n", iface, wrap_u, wrap_v);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_InverseTransform(IDirect3DRMFrame3 *iface, D3DVECTOR *d, D3DVECTOR *s)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p, d %p, s %p stub!\n", iface, d, s);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_InverseTransform(IDirect3DRMFrame2 *iface, D3DVECTOR *d, D3DVECTOR *s)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, d %p, s %p stub!\n", iface, d, s);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_InverseTransform(IDirect3DRMFrame *iface, D3DVECTOR *d, D3DVECTOR *s)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, d %p, s %p stub!\n", iface, d, s);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_Load(IDirect3DRMFrame3 *iface, void *filename,
|
2013-09-09 10:26:21 +02:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_Load(IDirect3DRMFrame2 *iface, void *filename,
|
|
|
|
void *name, D3DRMLOADOPTIONS flags, D3DRMLOADTEXTURECALLBACK cb, void *ctx)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, filename %p, name %p, flags %#x, cb %p, ctx %p stub!\n",
|
|
|
|
iface, filename, name, flags, cb, ctx);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_Load(IDirect3DRMFrame *iface, void *filename,
|
|
|
|
void *name, D3DRMLOADOPTIONS flags, D3DRMLOADTEXTURECALLBACK cb, void *ctx)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, filename %p, name %p, flags %#x, cb %p, ctx %p stub!\n",
|
|
|
|
iface, filename, name, flags, cb, ctx);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_LookAt(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 *target,
|
2013-04-22 15:18:44 +02:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_LookAt(IDirect3DRMFrame2 *iface, IDirect3DRMFrame *target,
|
|
|
|
IDirect3DRMFrame *reference, D3DRMFRAMECONSTRAINT constraint)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, target %p, reference %p, constraint %#x stub!\n", iface, target, reference, constraint);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_LookAt(IDirect3DRMFrame *iface, IDirect3DRMFrame *target,
|
|
|
|
IDirect3DRMFrame *reference, D3DRMFRAMECONSTRAINT constraint)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, target %p, reference %p, constraint %#x stub!\n", iface, target, reference, constraint);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_Move(IDirect3DRMFrame3 *iface, D3DVALUE delta)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p, delta %.8e stub!\n", iface, delta);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_Move(IDirect3DRMFrame2 *iface, D3DVALUE delta)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, delta %.8e stub!\n", iface, delta);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_Move(IDirect3DRMFrame *iface, D3DVALUE delta)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, delta %.8e stub!\n", iface, delta);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_DeleteChild(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 *child)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
struct d3drm_frame *child_impl = unsafe_impl_from_IDirect3DRMFrame3(child);
|
2012-04-13 13:55:23 +02:00
|
|
|
ULONG i;
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
TRACE("iface %p, child %p.\n", iface, child);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
if (!child_impl)
|
2012-04-13 13:55:23 +02:00
|
|
|
return D3DRMERR_BADOBJECT;
|
|
|
|
|
|
|
|
/* Check if child exists */
|
2013-10-10 23:49:48 +02:00
|
|
|
for (i = 0; i < frame->nb_children; ++i)
|
|
|
|
{
|
|
|
|
if (frame->children[i] == child)
|
2012-04-13 13:55:23 +02:00
|
|
|
break;
|
2013-10-10 23:49:48 +02:00
|
|
|
}
|
2012-04-13 13:55:23 +02:00
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
if (i == frame->nb_children)
|
2012-04-13 13:55:23 +02:00
|
|
|
return D3DRMERR_BADVALUE;
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
memmove(frame->children + i, frame->children + i + 1, sizeof(*frame->children) * (frame->nb_children - 1 - i));
|
|
|
|
IDirect3DRMFrame3_Release(child);
|
|
|
|
child_impl->parent = NULL;
|
|
|
|
--frame->nb_children;
|
2012-04-13 13:55:23 +02:00
|
|
|
|
|
|
|
return D3DRM_OK;
|
2012-01-04 19:12:32 +01:00
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_DeleteChild(IDirect3DRMFrame2 *iface, IDirect3DRMFrame *child)
|
|
|
|
{
|
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
IDirect3DRMFrame3 *child3;
|
|
|
|
HRESULT hr;
|
|
|
|
|
|
|
|
TRACE("iface %p, child %p.\n", iface, child);
|
|
|
|
|
|
|
|
if (!child)
|
|
|
|
return D3DRMERR_BADOBJECT;
|
|
|
|
if (FAILED(hr = IDirect3DRMFrame_QueryInterface(child, &IID_IDirect3DRMFrame3, (void **)&child3)))
|
|
|
|
return D3DRMERR_BADOBJECT;
|
|
|
|
IDirect3DRMFrame_Release(child);
|
|
|
|
|
|
|
|
return d3drm_frame3_DeleteChild(&frame->IDirect3DRMFrame3_iface, child3);
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_DeleteChild(IDirect3DRMFrame *iface, IDirect3DRMFrame *child)
|
|
|
|
{
|
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame(iface);
|
|
|
|
struct d3drm_frame *child_frame = unsafe_impl_from_IDirect3DRMFrame(child);
|
|
|
|
|
|
|
|
TRACE("iface %p, child %p.\n", iface, child);
|
|
|
|
|
|
|
|
if (!child_frame)
|
|
|
|
return D3DRMERR_BADOBJECT;
|
|
|
|
|
|
|
|
return d3drm_frame3_DeleteChild(&frame->IDirect3DRMFrame3_iface, &child_frame->IDirect3DRMFrame3_iface);
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_DeleteLight(IDirect3DRMFrame3 *iface, IDirect3DRMLight *light)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame3(iface);
|
2012-05-01 22:16:10 +02:00
|
|
|
ULONG i;
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
TRACE("iface %p, light %p.\n", iface, 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 */
|
2013-10-10 23:49:48 +02:00
|
|
|
for (i = 0; i < frame->nb_lights; ++i)
|
|
|
|
{
|
|
|
|
if (frame->lights[i] == light)
|
2012-05-01 22:16:10 +02:00
|
|
|
break;
|
2013-10-10 23:49:48 +02:00
|
|
|
}
|
2012-05-01 22:16:10 +02:00
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
if (i == frame->nb_lights)
|
2012-05-01 22:16:10 +02:00
|
|
|
return D3DRMERR_BADVALUE;
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
memmove(frame->lights + i, frame->lights + i + 1, sizeof(*frame->lights) * (frame->nb_lights - 1 - i));
|
2012-05-01 22:16:10 +02:00
|
|
|
IDirect3DRMLight_Release(light);
|
2013-10-10 23:49:48 +02:00
|
|
|
--frame->nb_lights;
|
2012-05-01 22:16:10 +02:00
|
|
|
|
|
|
|
return D3DRM_OK;
|
2012-01-04 19:12:32 +01:00
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_DeleteLight(IDirect3DRMFrame2 *iface, IDirect3DRMLight *light)
|
|
|
|
{
|
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p, light %p.\n", iface, light);
|
|
|
|
|
|
|
|
return d3drm_frame3_DeleteLight(&frame->IDirect3DRMFrame3_iface, light);
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_DeleteLight(IDirect3DRMFrame *iface, IDirect3DRMLight *light)
|
|
|
|
{
|
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p, light %p.\n", iface, light);
|
|
|
|
|
|
|
|
return d3drm_frame3_DeleteLight(&frame->IDirect3DRMFrame3_iface, light);
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_DeleteMoveCallback(IDirect3DRMFrame3 *iface,
|
2013-09-23 10:26:47 +02:00
|
|
|
D3DRMFRAME3MOVECALLBACK cb, void *ctx)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-09-23 10:26:47 +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;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_DeleteMoveCallback(IDirect3DRMFrame2 *iface,
|
|
|
|
D3DRMFRAMEMOVECALLBACK cb, void *ctx)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, cb %p, ctx %p stub!\n", iface, cb, ctx);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_DeleteMoveCallback(IDirect3DRMFrame *iface,
|
|
|
|
D3DRMFRAMEMOVECALLBACK cb, void *ctx)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, cb %p, ctx %p stub!\n", iface, cb, ctx);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_DeleteVisual(IDirect3DRMFrame3 *iface, IUnknown *visual)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
struct d3drm_frame *frame = 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 */
|
2013-10-10 23:49:48 +02:00
|
|
|
for (i = 0; i < frame->nb_visuals; ++i)
|
|
|
|
{
|
|
|
|
if (frame->visuals[i] == (IDirect3DRMVisual *)visual)
|
2012-04-30 17:10:48 +02:00
|
|
|
break;
|
2013-10-10 23:49:48 +02:00
|
|
|
}
|
2012-04-30 17:10:48 +02:00
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
if (i == frame->nb_visuals)
|
2012-04-30 17:10:48 +02:00
|
|
|
return D3DRMERR_BADVALUE;
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
memmove(frame->visuals + i, frame->visuals + i + 1, sizeof(*frame->visuals) * (frame->nb_visuals - 1 - i));
|
2013-08-20 10:20:13 +02:00
|
|
|
IDirect3DRMVisual_Release(visual);
|
2013-10-10 23:49:48 +02:00
|
|
|
--frame->nb_visuals;
|
2012-04-30 17:10:48 +02:00
|
|
|
|
|
|
|
return D3DRM_OK;
|
2012-01-04 19:12:32 +01:00
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_DeleteVisual(IDirect3DRMFrame2 *iface, IDirect3DRMVisual *visual)
|
|
|
|
{
|
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p, visual %p.\n", iface, visual);
|
|
|
|
|
|
|
|
return d3drm_frame3_DeleteVisual(&frame->IDirect3DRMFrame3_iface, (IUnknown *)visual);
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_DeleteVisual(IDirect3DRMFrame *iface, IDirect3DRMVisual *visual)
|
|
|
|
{
|
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p, visual %p.\n", iface, visual);
|
|
|
|
|
|
|
|
return d3drm_frame3_DeleteVisual(&frame->IDirect3DRMFrame3_iface, (IUnknown *)visual);
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static D3DCOLOR WINAPI d3drm_frame3_GetSceneBackground(IDirect3DRMFrame3 *iface)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame3(iface);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
TRACE("iface %p.\n", iface);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
return frame->scenebackground;
|
2012-01-04 19:12:32 +01:00
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static D3DCOLOR WINAPI d3drm_frame2_GetSceneBackground(IDirect3DRMFrame2 *iface)
|
|
|
|
{
|
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p.\n", iface);
|
|
|
|
|
|
|
|
return d3drm_frame3_GetSceneBackground(&frame->IDirect3DRMFrame3_iface);
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static D3DCOLOR WINAPI d3drm_frame1_GetSceneBackground(IDirect3DRMFrame *iface)
|
|
|
|
{
|
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p.\n", iface);
|
|
|
|
|
|
|
|
return d3drm_frame3_GetSceneBackground(&frame->IDirect3DRMFrame3_iface);
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_GetSceneBackgroundDepth(IDirect3DRMFrame3 *iface,
|
2012-11-19 22:04:10 +01:00
|
|
|
IDirectDrawSurface **surface)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p, surface %p stub!\n", iface, surface);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_GetSceneBackgroundDepth(IDirect3DRMFrame2 *iface,
|
|
|
|
IDirectDrawSurface **surface)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, surface %p stub!\n", iface, surface);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_GetSceneBackgroundDepth(IDirect3DRMFrame *iface,
|
|
|
|
IDirectDrawSurface **surface)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, surface %p stub!\n", iface, surface);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static D3DCOLOR WINAPI d3drm_frame3_GetSceneFogColor(IDirect3DRMFrame3 *iface)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p stub!\n", iface);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static D3DCOLOR WINAPI d3drm_frame2_GetSceneFogColor(IDirect3DRMFrame2 *iface)
|
|
|
|
{
|
|
|
|
FIXME("iface %p stub!\n", iface);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static D3DCOLOR WINAPI d3drm_frame1_GetSceneFogColor(IDirect3DRMFrame *iface)
|
|
|
|
{
|
|
|
|
FIXME("iface %p stub!\n", iface);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static BOOL WINAPI d3drm_frame3_GetSceneFogEnable(IDirect3DRMFrame3 *iface)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p stub!\n", iface);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static BOOL WINAPI d3drm_frame2_GetSceneFogEnable(IDirect3DRMFrame2 *iface)
|
|
|
|
{
|
|
|
|
FIXME("iface %p stub!\n", iface);
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static BOOL WINAPI d3drm_frame1_GetSceneFogEnable(IDirect3DRMFrame *iface)
|
|
|
|
{
|
|
|
|
FIXME("iface %p stub!\n", iface);
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static D3DRMFOGMODE WINAPI d3drm_frame3_GetSceneFogMode(IDirect3DRMFrame3 *iface)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p stub!\n", iface);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return D3DRMFOG_LINEAR;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static D3DRMFOGMODE WINAPI d3drm_frame2_GetSceneFogMode(IDirect3DRMFrame2 *iface)
|
|
|
|
{
|
|
|
|
FIXME("iface %p stub!\n", iface);
|
|
|
|
|
|
|
|
return D3DRMFOG_LINEAR;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static D3DRMFOGMODE WINAPI d3drm_frame1_GetSceneFogMode(IDirect3DRMFrame *iface)
|
|
|
|
{
|
|
|
|
FIXME("iface %p stub!\n", iface);
|
|
|
|
|
|
|
|
return D3DRMFOG_LINEAR;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_GetSceneFogParams(IDirect3DRMFrame3 *iface,
|
|
|
|
D3DVALUE *start, D3DVALUE *end, D3DVALUE *density)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p, start %p, end %p, density %p stub!\n", iface, start, end, density);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_GetSceneFogParams(IDirect3DRMFrame2 *iface,
|
|
|
|
D3DVALUE *start, D3DVALUE *end, D3DVALUE *density)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, start %p, end %p, density %p stub!\n", iface, start, end, density);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_GetSceneFogParams(IDirect3DRMFrame *iface,
|
|
|
|
D3DVALUE *start, D3DVALUE *end, D3DVALUE *density)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, start %p, end %p, density %p stub!\n", iface, start, end, density);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_SetSceneBackground(IDirect3DRMFrame3 *iface, D3DCOLOR color)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame3(iface);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
TRACE("iface %p, color 0x%08x.\n", iface, color);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
frame->scenebackground = color;
|
2012-08-05 17:44:46 +02:00
|
|
|
|
|
|
|
return D3DRM_OK;
|
2012-01-04 19:12:32 +01:00
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_SetSceneBackground(IDirect3DRMFrame2 *iface, D3DCOLOR color)
|
|
|
|
{
|
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p, color 0x%08x.\n", iface, color);
|
|
|
|
|
|
|
|
return d3drm_frame3_SetSceneBackground(&frame->IDirect3DRMFrame3_iface, color);
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_SetSceneBackground(IDirect3DRMFrame *iface, D3DCOLOR color)
|
|
|
|
{
|
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p, color 0x%08x.\n", iface, color);
|
|
|
|
|
|
|
|
return d3drm_frame3_SetSceneBackground(&frame->IDirect3DRMFrame3_iface, color);
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_SetSceneBackgroundRGB(IDirect3DRMFrame3 *iface,
|
|
|
|
D3DVALUE red, D3DVALUE green, D3DVALUE blue)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame3(iface);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2016-10-25 07:11:45 +02:00
|
|
|
TRACE("iface %p, red %.8e, green %.8e, blue %.8e.\n", iface, red, green, blue);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2016-11-10 16:17:37 +01:00
|
|
|
d3drm_set_color(&frame->scenebackground, red, green, blue, 1.0f);
|
2012-08-05 17:44:46 +02:00
|
|
|
|
|
|
|
return D3DRM_OK;
|
2012-01-04 19:12:32 +01:00
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_SetSceneBackgroundRGB(IDirect3DRMFrame2 *iface,
|
|
|
|
D3DVALUE red, D3DVALUE green, D3DVALUE blue)
|
|
|
|
{
|
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame2(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p, red %.8e, green %.8e, blue %.8e.\n", iface, red, green, blue);
|
|
|
|
|
|
|
|
return d3drm_frame3_SetSceneBackgroundRGB(&frame->IDirect3DRMFrame3_iface, red, green, blue);
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_SetSceneBackgroundRGB(IDirect3DRMFrame *iface,
|
|
|
|
D3DVALUE red, D3DVALUE green, D3DVALUE blue)
|
|
|
|
{
|
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p, red %.8e, green %.8e, blue %.8e.\n", iface, red, green, blue);
|
|
|
|
|
|
|
|
return d3drm_frame3_SetSceneBackgroundRGB(&frame->IDirect3DRMFrame3_iface, red, green, blue);
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_SetSceneBackgroundDepth(IDirect3DRMFrame3 *iface,
|
2012-11-19 22:04:10 +01:00
|
|
|
IDirectDrawSurface *surface)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p, surface %p stub!\n", iface, surface);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_SetSceneBackgroundDepth(IDirect3DRMFrame2 *iface,
|
|
|
|
IDirectDrawSurface *surface)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, surface %p stub!\n", iface, surface);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_SetSceneBackgroundDepth(IDirect3DRMFrame *iface,
|
|
|
|
IDirectDrawSurface *surface)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, surface %p stub!\n", iface, surface);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_SetSceneBackgroundImage(IDirect3DRMFrame3 *iface,
|
|
|
|
IDirect3DRMTexture3 *texture)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, texture %p stub!\n", iface, texture);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI d3drm_frame2_SetSceneBackgroundImage(IDirect3DRMFrame2 *iface,
|
|
|
|
IDirect3DRMTexture *texture)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, texture %p stub!\n", iface, texture);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_SetSceneBackgroundImage(IDirect3DRMFrame *iface,
|
|
|
|
IDirect3DRMTexture *texture)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, texture %p stub!\n", iface, texture);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_SetSceneFogEnable(IDirect3DRMFrame3 *iface, BOOL enable)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, enable %#x stub!\n", iface, enable);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI d3drm_frame2_SetSceneFogEnable(IDirect3DRMFrame2 *iface, BOOL enable)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2016-06-19 00:29:07 +02:00
|
|
|
FIXME("iface %p, enable %#x stub!\n", iface, enable);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_SetSceneFogEnable(IDirect3DRMFrame *iface, BOOL enable)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, enable %#x stub!\n", iface, enable);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_SetSceneFogColor(IDirect3DRMFrame3 *iface, D3DCOLOR color)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2016-06-19 00:29:07 +02:00
|
|
|
FIXME("iface %p, color 0x%08x stub!\n", iface, color);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_SetSceneFogColor(IDirect3DRMFrame2 *iface, D3DCOLOR color)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p, color 0x%08x stub!\n", iface, color);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_SetSceneFogColor(IDirect3DRMFrame *iface, D3DCOLOR color)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, color 0x%08x stub!\n", iface, color);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_SetSceneFogMode(IDirect3DRMFrame3 *iface, D3DRMFOGMODE mode)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p, mode %#x stub!\n", iface, mode);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_SetSceneFogMode(IDirect3DRMFrame2 *iface, D3DRMFOGMODE mode)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, mode %#x stub!\n", iface, mode);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_SetSceneFogMode(IDirect3DRMFrame *iface, D3DRMFOGMODE mode)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, mode %#x stub!\n", iface, mode);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_SetSceneFogParams(IDirect3DRMFrame3 *iface,
|
|
|
|
D3DVALUE start, D3DVALUE end, D3DVALUE density)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p, start %.8e, end %.8e, density %.8e stub!\n", iface, start, end, density);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_SetSceneFogParams(IDirect3DRMFrame2 *iface,
|
|
|
|
D3DVALUE start, D3DVALUE end, D3DVALUE density)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, start %.8e, end %.8e, density %.8e stub!\n", iface, start, end, density);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_SetSceneFogParams(IDirect3DRMFrame *iface,
|
|
|
|
D3DVALUE start, D3DVALUE end, D3DVALUE density)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, start %.8e, end %.8e, density %.8e stub!\n", iface, start, end, density);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_SetColor(IDirect3DRMFrame3 *iface, D3DCOLOR color)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p, color 0x%08x stub!\n", iface, color);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_SetColor(IDirect3DRMFrame2 *iface, D3DCOLOR color)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, color 0x%08x stub!\n", iface, color);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_SetColor(IDirect3DRMFrame *iface, D3DCOLOR color)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, color 0x%08x stub!\n", iface, color);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_SetColorRGB(IDirect3DRMFrame3 *iface,
|
|
|
|
D3DVALUE red, D3DVALUE green, D3DVALUE blue)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p, red %.8e, green %.8e, blue %.8e stub!\n", iface, red, green, blue);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_SetColorRGB(IDirect3DRMFrame2 *iface,
|
|
|
|
D3DVALUE red, D3DVALUE green, D3DVALUE blue)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, red %.8e, green %.8e, blue %.8e stub!\n", iface, red, green, blue);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_SetColorRGB(IDirect3DRMFrame *iface,
|
|
|
|
D3DVALUE red, D3DVALUE green, D3DVALUE blue)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, red %.8e, green %.8e, blue %.8e stub!\n", iface, red, green, blue);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static D3DRMZBUFFERMODE WINAPI d3drm_frame3_GetZbufferMode(IDirect3DRMFrame3 *iface)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p stub!\n", iface);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return D3DRMZBUFFER_FROMPARENT;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static D3DRMZBUFFERMODE WINAPI d3drm_frame2_GetZbufferMode(IDirect3DRMFrame2 *iface)
|
|
|
|
{
|
|
|
|
FIXME("iface %p stub!\n", iface);
|
|
|
|
|
|
|
|
return D3DRMZBUFFER_FROMPARENT;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static D3DRMZBUFFERMODE WINAPI d3drm_frame1_GetZbufferMode(IDirect3DRMFrame *iface)
|
|
|
|
{
|
|
|
|
FIXME("iface %p stub!\n", iface);
|
|
|
|
|
|
|
|
return D3DRMZBUFFER_FROMPARENT;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_SetMaterialMode(IDirect3DRMFrame3 *iface, D3DRMMATERIALMODE mode)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p, mode %#x stub!\n", iface, mode);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_SetMaterialMode(IDirect3DRMFrame2 *iface, D3DRMMATERIALMODE mode)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, mode %#x stub!\n", iface, mode);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_SetMaterialMode(IDirect3DRMFrame *iface, D3DRMMATERIALMODE mode)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, mode %#x stub!\n", iface, mode);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_SetOrientation(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 *reference,
|
2013-04-22 15:18:44 +02:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_SetOrientation(IDirect3DRMFrame2 *iface, IDirect3DRMFrame *reference,
|
|
|
|
D3DVALUE dx, D3DVALUE dy, D3DVALUE dz, D3DVALUE ux, D3DVALUE uy, D3DVALUE uz)
|
|
|
|
{
|
|
|
|
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);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_SetOrientation(IDirect3DRMFrame *iface, IDirect3DRMFrame *reference,
|
|
|
|
D3DVALUE dx, D3DVALUE dy, D3DVALUE dz, D3DVALUE ux, D3DVALUE uy, D3DVALUE uz)
|
|
|
|
{
|
|
|
|
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);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_SetPosition(IDirect3DRMFrame3 *iface,
|
2013-04-22 15:18:44 +02:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_SetPosition(IDirect3DRMFrame2 *iface,
|
|
|
|
IDirect3DRMFrame *reference, D3DVALUE x, D3DVALUE y, D3DVALUE z)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e stub!\n", iface, reference, x, y, z);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_SetPosition(IDirect3DRMFrame *iface,
|
|
|
|
IDirect3DRMFrame *reference, D3DVALUE x, D3DVALUE y, D3DVALUE z)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e stub!\n", iface, reference, x, y, z);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_SetRotation(IDirect3DRMFrame3 *iface,
|
2013-04-22 15:18:44 +02:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_SetRotation(IDirect3DRMFrame2 *iface,
|
|
|
|
IDirect3DRMFrame *reference, D3DVALUE x, D3DVALUE y, D3DVALUE z, D3DVALUE theta)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e, theta %.8e stub!\n",
|
|
|
|
iface, reference, x, y, z, theta);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_SetRotation(IDirect3DRMFrame *iface,
|
|
|
|
IDirect3DRMFrame *reference, D3DVALUE x, D3DVALUE y, D3DVALUE z, D3DVALUE theta)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e, theta %.8e stub!\n",
|
|
|
|
iface, reference, x, y, z, theta);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_SetSortMode(IDirect3DRMFrame3 *iface, D3DRMSORTMODE mode)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p, mode %#x stub!\n", iface, mode);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_SetSortMode(IDirect3DRMFrame2 *iface, D3DRMSORTMODE mode)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, mode %#x stub!\n", iface, mode);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_SetSortMode(IDirect3DRMFrame *iface, D3DRMSORTMODE mode)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, mode %#x stub!\n", iface, mode);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_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;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_SetTexture(IDirect3DRMFrame2 *iface, IDirect3DRMTexture *texture)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, texture %p stub!\n", iface, texture);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_SetTexture(IDirect3DRMFrame *iface, IDirect3DRMTexture *texture)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, texture %p stub!\n", iface, texture);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_SetTextureTopology(IDirect3DRMFrame2 *iface, BOOL wrap_u, BOOL wrap_v)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, wrap_u %#x, wrap_v %#x stub!\n", iface, wrap_u, wrap_v);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_SetTextureTopology(IDirect3DRMFrame *iface, BOOL wrap_u, BOOL wrap_v)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, wrap_u %#x, wrap_v %#x stub!\n", iface, wrap_u, wrap_v);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_SetVelocity(IDirect3DRMFrame3 *iface,
|
2013-04-22 15:18:44 +02:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_SetVelocity(IDirect3DRMFrame2 *iface,
|
|
|
|
IDirect3DRMFrame *reference, D3DVALUE x, D3DVALUE y, D3DVALUE z, BOOL with_rotation)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e, with_rotation %#x stub!\n",
|
|
|
|
iface, reference, x, y, z, with_rotation);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_SetVelocity(IDirect3DRMFrame *iface,
|
|
|
|
IDirect3DRMFrame *reference, D3DVALUE x, D3DVALUE y, D3DVALUE z, BOOL with_rotation)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e, with_rotation %#x stub!\n",
|
|
|
|
iface, reference, x, y, z, with_rotation);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_SetZbufferMode(IDirect3DRMFrame3 *iface, D3DRMZBUFFERMODE mode)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p, mode %#x stub!\n", iface, mode);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_SetZbufferMode(IDirect3DRMFrame2 *iface, D3DRMZBUFFERMODE mode)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, mode %#x stub!\n", iface, mode);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_SetZbufferMode(IDirect3DRMFrame *iface, D3DRMZBUFFERMODE mode)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, mode %#x stub!\n", iface, mode);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_Transform(IDirect3DRMFrame3 *iface, D3DVECTOR *d, D3DVECTOR *s)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p, d %p, s %p stub!\n", iface, d, s);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_Transform(IDirect3DRMFrame2 *iface, D3DVECTOR *d, D3DVECTOR *s)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, d %p, s %p stub!\n", iface, d, s);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_Transform(IDirect3DRMFrame *iface, D3DVECTOR *d, D3DVECTOR *s)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, d %p, s %p stub!\n", iface, d, s);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_AddMoveCallback2(IDirect3DRMFrame2 *iface,
|
|
|
|
D3DRMFRAMEMOVECALLBACK cb, void *ctx, DWORD flags)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, cb %p, ctx %p, flags %#x stub!\n", iface, cb, ctx, flags);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_GetBox(IDirect3DRMFrame3 *iface, D3DRMBOX *box)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p, box %p stub!\n", iface, box);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_GetBox(IDirect3DRMFrame2 *iface, D3DRMBOX *box)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, box %p stub!\n", iface, box);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static BOOL WINAPI d3drm_frame3_GetBoxEnable(IDirect3DRMFrame3 *iface)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p stub!\n", iface);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2015-10-12 21:25:28 +02:00
|
|
|
return FALSE;
|
2012-01-04 19:12:32 +01:00
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static BOOL WINAPI d3drm_frame2_GetBoxEnable(IDirect3DRMFrame2 *iface)
|
|
|
|
{
|
|
|
|
FIXME("iface %p stub!\n", iface);
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_GetAxes(IDirect3DRMFrame3 *iface, D3DVECTOR *dir, D3DVECTOR *up)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p, dir %p, up %p stub!\n", iface, dir, up);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_GetAxes(IDirect3DRMFrame2 *iface, D3DVECTOR *dir, D3DVECTOR *up)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, dir %p, up %p stub!\n", iface, dir, up);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_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;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_GetMaterial(IDirect3DRMFrame2 *iface, IDirect3DRMMaterial **material)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, material %p stub!\n", iface, material);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static BOOL WINAPI d3drm_frame3_GetInheritAxes(IDirect3DRMFrame3 *iface)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p stub!\n", iface);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2015-10-12 21:25:28 +02:00
|
|
|
return FALSE;
|
2012-01-04 19:12:32 +01:00
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static BOOL WINAPI d3drm_frame2_GetInheritAxes(IDirect3DRMFrame2 *iface)
|
|
|
|
{
|
|
|
|
FIXME("iface %p stub!\n", iface);
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_GetHierarchyBox(IDirect3DRMFrame3 *iface, D3DRMBOX *box)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p, box %p stub!\n", iface, box);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_GetHierarchyBox(IDirect3DRMFrame2 *iface, D3DRMBOX *box)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, box %p stub!\n", iface, box);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_SetBox(IDirect3DRMFrame3 *iface, D3DRMBOX *box)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p, box %p stub!\n", iface, box);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_SetBoxEnable(IDirect3DRMFrame3 *iface, BOOL enable)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p, enable %#x stub!\n", iface, enable);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_SetAxes(IDirect3DRMFrame3 *iface,
|
|
|
|
D3DVALUE dx, D3DVALUE dy, D3DVALUE dz, D3DVALUE ux, D3DVALUE uy, D3DVALUE uz)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p, dx %.8e, dy %.8e, dz %.8e, ux %.8e, uy %.8e, uz %.8e stub!\n",
|
|
|
|
iface, dx, dy, dz, ux, uy, uz);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_SetInheritAxes(IDirect3DRMFrame3 *iface, BOOL inherit)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p, inherit %#x stub!\n", iface, inherit);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_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-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_SetQuaternion(IDirect3DRMFrame3 *iface,
|
2013-04-22 15:18:44 +02:00
|
|
|
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-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_RayPick(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 *reference,
|
|
|
|
D3DRMRAY *ray, DWORD flags, IDirect3DRMPicked2Array **visuals)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p, reference %p, ray %p, flags %#x, visuals %p stub!\n",
|
|
|
|
iface, reference, ray, flags, visuals);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_Save(IDirect3DRMFrame3 *iface,
|
2013-09-06 09:57:43 +02:00
|
|
|
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-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_TransformVectors(IDirect3DRMFrame3 *iface,
|
2013-01-23 08:50:10 +01:00
|
|
|
IDirect3DRMFrame3 *reference, DWORD num, D3DVECTOR *dst, D3DVECTOR *src)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p, reference %p, num %u, dst %p, src %p stub!\n", iface, reference, num, dst, src);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_InverseTransformVectors(IDirect3DRMFrame3 *iface,
|
2013-01-23 08:50:10 +01:00
|
|
|
IDirect3DRMFrame3 *reference, DWORD num, D3DVECTOR *dst, D3DVECTOR *src)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p, reference %p, num %u, dst %p, src %p stub!\n", iface, reference, num, dst, src);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_SetTraversalOptions(IDirect3DRMFrame3 *iface, DWORD flags)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p, flags %#x stub!\n", iface, flags);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_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;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_SetSceneFogMethod(IDirect3DRMFrame3 *iface, DWORD flags)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p, flags %#x stub!\n", iface, flags);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_GetSceneFogMethod(IDirect3DRMFrame3 *iface, DWORD *fog_mode)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p, fog_mode %p stub!\n", iface, fog_mode);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_SetMaterialOverride(IDirect3DRMFrame3 *iface,
|
2013-01-28 11:15:37 +01:00
|
|
|
D3DRMMATERIALOVERRIDE *override)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p, override %p stub!\n", iface, override);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_GetMaterialOverride(IDirect3DRMFrame3 *iface,
|
2013-01-28 11:15:37 +01:00
|
|
|
D3DRMMATERIALOVERRIDE *override)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
FIXME("iface %p, override %p stub!\n", iface, override);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const struct IDirect3DRMFrame3Vtbl d3drm_frame3_vtbl =
|
|
|
|
{
|
|
|
|
d3drm_frame3_QueryInterface,
|
|
|
|
d3drm_frame3_AddRef,
|
|
|
|
d3drm_frame3_Release,
|
|
|
|
d3drm_frame3_Clone,
|
|
|
|
d3drm_frame3_AddDestroyCallback,
|
|
|
|
d3drm_frame3_DeleteDestroyCallback,
|
|
|
|
d3drm_frame3_SetAppData,
|
|
|
|
d3drm_frame3_GetAppData,
|
|
|
|
d3drm_frame3_SetName,
|
|
|
|
d3drm_frame3_GetName,
|
|
|
|
d3drm_frame3_GetClassName,
|
|
|
|
d3drm_frame3_AddChild,
|
|
|
|
d3drm_frame3_AddLight,
|
|
|
|
d3drm_frame3_AddMoveCallback,
|
|
|
|
d3drm_frame3_AddTransform,
|
|
|
|
d3drm_frame3_AddTranslation,
|
|
|
|
d3drm_frame3_AddScale,
|
|
|
|
d3drm_frame3_AddRotation,
|
|
|
|
d3drm_frame3_AddVisual,
|
|
|
|
d3drm_frame3_GetChildren,
|
|
|
|
d3drm_frame3_GetColor,
|
|
|
|
d3drm_frame3_GetLights,
|
|
|
|
d3drm_frame3_GetMaterialMode,
|
|
|
|
d3drm_frame3_GetParent,
|
|
|
|
d3drm_frame3_GetPosition,
|
|
|
|
d3drm_frame3_GetRotation,
|
|
|
|
d3drm_frame3_GetScene,
|
|
|
|
d3drm_frame3_GetSortMode,
|
|
|
|
d3drm_frame3_GetTexture,
|
|
|
|
d3drm_frame3_GetTransform,
|
|
|
|
d3drm_frame3_GetVelocity,
|
|
|
|
d3drm_frame3_GetOrientation,
|
|
|
|
d3drm_frame3_GetVisuals,
|
|
|
|
d3drm_frame3_InverseTransform,
|
|
|
|
d3drm_frame3_Load,
|
|
|
|
d3drm_frame3_LookAt,
|
|
|
|
d3drm_frame3_Move,
|
|
|
|
d3drm_frame3_DeleteChild,
|
|
|
|
d3drm_frame3_DeleteLight,
|
|
|
|
d3drm_frame3_DeleteMoveCallback,
|
|
|
|
d3drm_frame3_DeleteVisual,
|
|
|
|
d3drm_frame3_GetSceneBackground,
|
|
|
|
d3drm_frame3_GetSceneBackgroundDepth,
|
|
|
|
d3drm_frame3_GetSceneFogColor,
|
|
|
|
d3drm_frame3_GetSceneFogEnable,
|
|
|
|
d3drm_frame3_GetSceneFogMode,
|
|
|
|
d3drm_frame3_GetSceneFogParams,
|
|
|
|
d3drm_frame3_SetSceneBackground,
|
|
|
|
d3drm_frame3_SetSceneBackgroundRGB,
|
|
|
|
d3drm_frame3_SetSceneBackgroundDepth,
|
|
|
|
d3drm_frame3_SetSceneBackgroundImage,
|
|
|
|
d3drm_frame3_SetSceneFogEnable,
|
|
|
|
d3drm_frame3_SetSceneFogColor,
|
|
|
|
d3drm_frame3_SetSceneFogMode,
|
|
|
|
d3drm_frame3_SetSceneFogParams,
|
|
|
|
d3drm_frame3_SetColor,
|
|
|
|
d3drm_frame3_SetColorRGB,
|
|
|
|
d3drm_frame3_GetZbufferMode,
|
|
|
|
d3drm_frame3_SetMaterialMode,
|
|
|
|
d3drm_frame3_SetOrientation,
|
|
|
|
d3drm_frame3_SetPosition,
|
|
|
|
d3drm_frame3_SetRotation,
|
|
|
|
d3drm_frame3_SetSortMode,
|
|
|
|
d3drm_frame3_SetTexture,
|
|
|
|
d3drm_frame3_SetVelocity,
|
|
|
|
d3drm_frame3_SetZbufferMode,
|
|
|
|
d3drm_frame3_Transform,
|
|
|
|
d3drm_frame3_GetBox,
|
|
|
|
d3drm_frame3_GetBoxEnable,
|
|
|
|
d3drm_frame3_GetAxes,
|
|
|
|
d3drm_frame3_GetMaterial,
|
|
|
|
d3drm_frame3_GetInheritAxes,
|
|
|
|
d3drm_frame3_GetHierarchyBox,
|
|
|
|
d3drm_frame3_SetBox,
|
|
|
|
d3drm_frame3_SetBoxEnable,
|
|
|
|
d3drm_frame3_SetAxes,
|
|
|
|
d3drm_frame3_SetInheritAxes,
|
|
|
|
d3drm_frame3_SetMaterial,
|
|
|
|
d3drm_frame3_SetQuaternion,
|
|
|
|
d3drm_frame3_RayPick,
|
|
|
|
d3drm_frame3_Save,
|
|
|
|
d3drm_frame3_TransformVectors,
|
|
|
|
d3drm_frame3_InverseTransformVectors,
|
|
|
|
d3drm_frame3_SetTraversalOptions,
|
|
|
|
d3drm_frame3_GetTraversalOptions,
|
|
|
|
d3drm_frame3_SetSceneFogMethod,
|
|
|
|
d3drm_frame3_GetSceneFogMethod,
|
|
|
|
d3drm_frame3_SetMaterialOverride,
|
|
|
|
d3drm_frame3_GetMaterialOverride,
|
2012-01-04 19:12:32 +01:00
|
|
|
};
|
2012-01-19 21:59:34 +01:00
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static const struct IDirect3DRMFrame2Vtbl d3drm_frame2_vtbl =
|
|
|
|
{
|
|
|
|
d3drm_frame2_QueryInterface,
|
|
|
|
d3drm_frame2_AddRef,
|
|
|
|
d3drm_frame2_Release,
|
|
|
|
d3drm_frame2_Clone,
|
|
|
|
d3drm_frame2_AddDestroyCallback,
|
|
|
|
d3drm_frame2_DeleteDestroyCallback,
|
|
|
|
d3drm_frame2_SetAppData,
|
|
|
|
d3drm_frame2_GetAppData,
|
|
|
|
d3drm_frame2_SetName,
|
|
|
|
d3drm_frame2_GetName,
|
|
|
|
d3drm_frame2_GetClassName,
|
|
|
|
d3drm_frame2_AddChild,
|
|
|
|
d3drm_frame2_AddLight,
|
|
|
|
d3drm_frame2_AddMoveCallback,
|
|
|
|
d3drm_frame2_AddTransform,
|
|
|
|
d3drm_frame2_AddTranslation,
|
|
|
|
d3drm_frame2_AddScale,
|
|
|
|
d3drm_frame2_AddRotation,
|
|
|
|
d3drm_frame2_AddVisual,
|
|
|
|
d3drm_frame2_GetChildren,
|
|
|
|
d3drm_frame2_GetColor,
|
|
|
|
d3drm_frame2_GetLights,
|
|
|
|
d3drm_frame2_GetMaterialMode,
|
|
|
|
d3drm_frame2_GetParent,
|
|
|
|
d3drm_frame2_GetPosition,
|
|
|
|
d3drm_frame2_GetRotation,
|
|
|
|
d3drm_frame2_GetScene,
|
|
|
|
d3drm_frame2_GetSortMode,
|
|
|
|
d3drm_frame2_GetTexture,
|
|
|
|
d3drm_frame2_GetTransform,
|
|
|
|
d3drm_frame2_GetVelocity,
|
|
|
|
d3drm_frame2_GetOrientation,
|
|
|
|
d3drm_frame2_GetVisuals,
|
|
|
|
d3drm_frame2_GetTextureTopology,
|
|
|
|
d3drm_frame2_InverseTransform,
|
|
|
|
d3drm_frame2_Load,
|
|
|
|
d3drm_frame2_LookAt,
|
|
|
|
d3drm_frame2_Move,
|
|
|
|
d3drm_frame2_DeleteChild,
|
|
|
|
d3drm_frame2_DeleteLight,
|
|
|
|
d3drm_frame2_DeleteMoveCallback,
|
|
|
|
d3drm_frame2_DeleteVisual,
|
|
|
|
d3drm_frame2_GetSceneBackground,
|
|
|
|
d3drm_frame2_GetSceneBackgroundDepth,
|
|
|
|
d3drm_frame2_GetSceneFogColor,
|
|
|
|
d3drm_frame2_GetSceneFogEnable,
|
|
|
|
d3drm_frame2_GetSceneFogMode,
|
|
|
|
d3drm_frame2_GetSceneFogParams,
|
|
|
|
d3drm_frame2_SetSceneBackground,
|
|
|
|
d3drm_frame2_SetSceneBackgroundRGB,
|
|
|
|
d3drm_frame2_SetSceneBackgroundDepth,
|
|
|
|
d3drm_frame2_SetSceneBackgroundImage,
|
|
|
|
d3drm_frame2_SetSceneFogEnable,
|
|
|
|
d3drm_frame2_SetSceneFogColor,
|
|
|
|
d3drm_frame2_SetSceneFogMode,
|
|
|
|
d3drm_frame2_SetSceneFogParams,
|
|
|
|
d3drm_frame2_SetColor,
|
|
|
|
d3drm_frame2_SetColorRGB,
|
|
|
|
d3drm_frame2_GetZbufferMode,
|
|
|
|
d3drm_frame2_SetMaterialMode,
|
|
|
|
d3drm_frame2_SetOrientation,
|
|
|
|
d3drm_frame2_SetPosition,
|
|
|
|
d3drm_frame2_SetRotation,
|
|
|
|
d3drm_frame2_SetSortMode,
|
|
|
|
d3drm_frame2_SetTexture,
|
|
|
|
d3drm_frame2_SetTextureTopology,
|
|
|
|
d3drm_frame2_SetVelocity,
|
|
|
|
d3drm_frame2_SetZbufferMode,
|
|
|
|
d3drm_frame2_Transform,
|
|
|
|
d3drm_frame2_AddMoveCallback2,
|
|
|
|
d3drm_frame2_GetBox,
|
|
|
|
d3drm_frame2_GetBoxEnable,
|
|
|
|
d3drm_frame2_GetAxes,
|
|
|
|
d3drm_frame2_GetMaterial,
|
|
|
|
d3drm_frame2_GetInheritAxes,
|
|
|
|
d3drm_frame2_GetHierarchyBox,
|
|
|
|
};
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static const struct IDirect3DRMFrameVtbl d3drm_frame1_vtbl =
|
|
|
|
{
|
|
|
|
d3drm_frame1_QueryInterface,
|
|
|
|
d3drm_frame1_AddRef,
|
|
|
|
d3drm_frame1_Release,
|
|
|
|
d3drm_frame1_Clone,
|
|
|
|
d3drm_frame1_AddDestroyCallback,
|
|
|
|
d3drm_frame1_DeleteDestroyCallback,
|
|
|
|
d3drm_frame1_SetAppData,
|
|
|
|
d3drm_frame1_GetAppData,
|
|
|
|
d3drm_frame1_SetName,
|
|
|
|
d3drm_frame1_GetName,
|
|
|
|
d3drm_frame1_GetClassName,
|
|
|
|
d3drm_frame1_AddChild,
|
|
|
|
d3drm_frame1_AddLight,
|
|
|
|
d3drm_frame1_AddMoveCallback,
|
|
|
|
d3drm_frame1_AddTransform,
|
|
|
|
d3drm_frame1_AddTranslation,
|
|
|
|
d3drm_frame1_AddScale,
|
|
|
|
d3drm_frame1_AddRotation,
|
|
|
|
d3drm_frame1_AddVisual,
|
|
|
|
d3drm_frame1_GetChildren,
|
|
|
|
d3drm_frame1_GetColor,
|
|
|
|
d3drm_frame1_GetLights,
|
|
|
|
d3drm_frame1_GetMaterialMode,
|
|
|
|
d3drm_frame1_GetParent,
|
|
|
|
d3drm_frame1_GetPosition,
|
|
|
|
d3drm_frame1_GetRotation,
|
|
|
|
d3drm_frame1_GetScene,
|
|
|
|
d3drm_frame1_GetSortMode,
|
|
|
|
d3drm_frame1_GetTexture,
|
|
|
|
d3drm_frame1_GetTransform,
|
|
|
|
d3drm_frame1_GetVelocity,
|
|
|
|
d3drm_frame1_GetOrientation,
|
|
|
|
d3drm_frame1_GetVisuals,
|
|
|
|
d3drm_frame1_GetTextureTopology,
|
|
|
|
d3drm_frame1_InverseTransform,
|
|
|
|
d3drm_frame1_Load,
|
|
|
|
d3drm_frame1_LookAt,
|
|
|
|
d3drm_frame1_Move,
|
|
|
|
d3drm_frame1_DeleteChild,
|
|
|
|
d3drm_frame1_DeleteLight,
|
|
|
|
d3drm_frame1_DeleteMoveCallback,
|
|
|
|
d3drm_frame1_DeleteVisual,
|
|
|
|
d3drm_frame1_GetSceneBackground,
|
|
|
|
d3drm_frame1_GetSceneBackgroundDepth,
|
|
|
|
d3drm_frame1_GetSceneFogColor,
|
|
|
|
d3drm_frame1_GetSceneFogEnable,
|
|
|
|
d3drm_frame1_GetSceneFogMode,
|
|
|
|
d3drm_frame1_GetSceneFogParams,
|
|
|
|
d3drm_frame1_SetSceneBackground,
|
|
|
|
d3drm_frame1_SetSceneBackgroundRGB,
|
|
|
|
d3drm_frame1_SetSceneBackgroundDepth,
|
|
|
|
d3drm_frame1_SetSceneBackgroundImage,
|
|
|
|
d3drm_frame1_SetSceneFogEnable,
|
|
|
|
d3drm_frame1_SetSceneFogColor,
|
|
|
|
d3drm_frame1_SetSceneFogMode,
|
|
|
|
d3drm_frame1_SetSceneFogParams,
|
|
|
|
d3drm_frame1_SetColor,
|
|
|
|
d3drm_frame1_SetColorRGB,
|
|
|
|
d3drm_frame1_GetZbufferMode,
|
|
|
|
d3drm_frame1_SetMaterialMode,
|
|
|
|
d3drm_frame1_SetOrientation,
|
|
|
|
d3drm_frame1_SetPosition,
|
|
|
|
d3drm_frame1_SetRotation,
|
|
|
|
d3drm_frame1_SetSortMode,
|
|
|
|
d3drm_frame1_SetTexture,
|
|
|
|
d3drm_frame1_SetTextureTopology,
|
|
|
|
d3drm_frame1_SetVelocity,
|
|
|
|
d3drm_frame1_SetZbufferMode,
|
|
|
|
d3drm_frame1_Transform,
|
|
|
|
};
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static inline struct d3drm_frame *unsafe_impl_from_IDirect3DRMFrame3(IDirect3DRMFrame3 *iface)
|
2012-05-03 09:40:17 +02:00
|
|
|
{
|
|
|
|
if (!iface)
|
|
|
|
return NULL;
|
2013-10-10 23:49:48 +02:00
|
|
|
assert(iface->lpVtbl == &d3drm_frame3_vtbl);
|
2012-05-03 09:40:17 +02:00
|
|
|
|
|
|
|
return impl_from_IDirect3DRMFrame3(iface);
|
|
|
|
}
|
|
|
|
|
2016-07-28 19:18:47 +02:00
|
|
|
struct d3drm_frame *unsafe_impl_from_IDirect3DRMFrame(IDirect3DRMFrame *iface)
|
2016-06-19 21:28:07 +02:00
|
|
|
{
|
|
|
|
if (!iface)
|
|
|
|
return NULL;
|
|
|
|
assert(iface->lpVtbl == &d3drm_frame1_vtbl);
|
|
|
|
|
|
|
|
return impl_from_IDirect3DRMFrame(iface);
|
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:08 +02:00
|
|
|
HRESULT d3drm_frame_create(struct d3drm_frame **frame, IUnknown *parent_frame, IDirect3DRM *d3drm)
|
2012-01-19 21:59:34 +01:00
|
|
|
{
|
2013-10-10 23:49:48 +02:00
|
|
|
struct d3drm_frame *object;
|
2016-06-19 21:28:08 +02:00
|
|
|
HRESULT hr = D3DRM_OK;
|
2012-01-19 21:59:34 +01:00
|
|
|
|
2016-06-19 21:28:08 +02:00
|
|
|
TRACE("frame %p, parent_frame %p, d3drm %p.\n", frame, parent_frame, d3drm);
|
2012-01-19 21:59:34 +01:00
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
if (!(object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object))))
|
2012-01-19 21:59:34 +01:00
|
|
|
return E_OUTOFMEMORY;
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
object->IDirect3DRMFrame_iface.lpVtbl = &d3drm_frame1_vtbl;
|
2013-10-10 23:49:48 +02:00
|
|
|
object->IDirect3DRMFrame2_iface.lpVtbl = &d3drm_frame2_vtbl;
|
|
|
|
object->IDirect3DRMFrame3_iface.lpVtbl = &d3drm_frame3_vtbl;
|
2016-06-19 21:28:08 +02:00
|
|
|
object->d3drm = d3drm;
|
2012-01-19 21:59:34 +01:00
|
|
|
object->ref = 1;
|
2016-11-10 16:17:37 +01:00
|
|
|
d3drm_set_color(&object->scenebackground, 0.0f, 0.0f, 0.0f, 1.0f);
|
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
|
|
|
|
2016-06-19 21:28:08 +02:00
|
|
|
if (parent_frame)
|
2012-05-17 10:10:07 +02:00
|
|
|
{
|
2012-06-30 01:13:56 +02:00
|
|
|
IDirect3DRMFrame3 *p;
|
|
|
|
|
2016-06-19 21:28:08 +02:00
|
|
|
if (FAILED(hr = IDirect3DRMFrame_QueryInterface(parent_frame, &IID_IDirect3DRMFrame3, (void **)&p)))
|
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
|
|
|
}
|
2016-06-19 21:28:08 +02:00
|
|
|
IDirect3DRMFrame_Release(parent_frame);
|
2012-06-30 01:13:56 +02:00
|
|
|
IDirect3DRMFrame3_AddChild(p, &object->IDirect3DRMFrame3_iface);
|
2012-05-17 10:10:07 +02:00
|
|
|
}
|
2012-01-19 21:59:34 +01:00
|
|
|
|
2016-06-19 21:28:08 +02:00
|
|
|
*frame = object;
|
|
|
|
|
2015-03-28 20:12:47 +01:00
|
|
|
return hr;
|
2012-01-19 21:59:34 +01:00
|
|
|
}
|