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
|
|
|
}
|
|
|
|
|
2017-06-23 15:15:00 +02:00
|
|
|
static inline struct d3drm_animation *impl_from_IDirect3DRMAnimation(IDirect3DRMAnimation *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, struct d3drm_animation, IDirect3DRMAnimation_iface);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline struct d3drm_animation *impl_from_IDirect3DRMAnimation2(IDirect3DRMAnimation2 *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, struct d3drm_animation, IDirect3DRMAnimation2_iface);
|
|
|
|
}
|
|
|
|
|
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)
|
|
|
|
{
|
2017-06-11 17:52:27 +02:00
|
|
|
d3drm_object_cleanup((IDirect3DRMObject *)&frame->IDirect3DRMFrame_iface, &frame->obj);
|
2015-04-26 13:19:01 +02:00
|
|
|
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);
|
2017-06-11 17:52:27 +02:00
|
|
|
IDirect3DRM_Release(frame->d3drm);
|
2015-04-26 13:19:01 +02:00
|
|
|
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
|
|
|
{
|
2017-06-11 17:52:27 +02:00
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame3(iface);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2017-06-11 17:52:27 +02:00
|
|
|
TRACE("iface %p, cb %p, ctx %p.\n", iface, cb, ctx);
|
|
|
|
|
|
|
|
return d3drm_object_add_destroy_callback(&frame->obj, cb, ctx);
|
2012-01-04 19:12:32 +01:00
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_AddDestroyCallback(IDirect3DRMFrame2 *iface,
|
|
|
|
D3DRMOBJECTCALLBACK cb, void *ctx)
|
|
|
|
{
|
2017-06-11 17:52:27 +02:00
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame2(iface);
|
2016-06-19 00:29:07 +02:00
|
|
|
|
2017-06-11 17:52:27 +02:00
|
|
|
TRACE("iface %p, cb %p, ctx %p.\n", iface, cb, ctx);
|
|
|
|
|
|
|
|
return IDirect3DRMFrame3_AddDestroyCallback(&frame->IDirect3DRMFrame3_iface, cb, ctx);
|
2016-06-19 00:29:07 +02:00
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_AddDestroyCallback(IDirect3DRMFrame *iface,
|
|
|
|
D3DRMOBJECTCALLBACK cb, void *ctx)
|
|
|
|
{
|
2017-06-11 17:52:27 +02:00
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame(iface);
|
2016-06-19 21:28:07 +02:00
|
|
|
|
2017-06-11 17:52:27 +02:00
|
|
|
TRACE("iface %p, cb %p, ctx %p.\n", iface, cb, ctx);
|
|
|
|
|
|
|
|
return IDirect3DRMFrame3_AddDestroyCallback(&frame->IDirect3DRMFrame3_iface, cb, ctx);
|
2016-06-19 21:28:07 +02:00
|
|
|
}
|
|
|
|
|
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
|
|
|
{
|
2017-06-11 17:52:27 +02:00
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame3(iface);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2017-06-11 17:52:27 +02:00
|
|
|
TRACE("iface %p, cb %p, ctx %p.\n", iface, cb, ctx);
|
|
|
|
|
|
|
|
return d3drm_object_delete_destroy_callback(&frame->obj, cb, ctx);
|
2012-01-04 19:12:32 +01:00
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_DeleteDestroyCallback(IDirect3DRMFrame2 *iface,
|
|
|
|
D3DRMOBJECTCALLBACK cb, void *ctx)
|
|
|
|
{
|
2017-06-11 17:52:27 +02:00
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame2(iface);
|
2016-06-19 00:29:07 +02:00
|
|
|
|
2017-06-11 17:52:27 +02:00
|
|
|
TRACE("iface %p, cb %p, ctx %p.\n", iface, cb, ctx);
|
|
|
|
|
|
|
|
return IDirect3DRMFrame3_DeleteDestroyCallback(&frame->IDirect3DRMFrame3_iface, cb, ctx);
|
2016-06-19 00:29:07 +02:00
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_DeleteDestroyCallback(IDirect3DRMFrame *iface,
|
|
|
|
D3DRMOBJECTCALLBACK cb, void *ctx)
|
|
|
|
{
|
2017-06-11 17:52:27 +02:00
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame(iface);
|
2016-06-19 21:28:07 +02:00
|
|
|
|
2017-06-11 17:52:27 +02:00
|
|
|
TRACE("iface %p, cb %p, ctx %p.\n", iface, cb, ctx);
|
|
|
|
|
|
|
|
return IDirect3DRMFrame3_DeleteDestroyCallback(&frame->IDirect3DRMFrame3_iface, cb, ctx);
|
2016-06-19 21:28:07 +02:00
|
|
|
}
|
|
|
|
|
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
|
|
|
{
|
2017-06-21 14:39:31 +02:00
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame3(iface);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2017-06-21 14:39:31 +02:00
|
|
|
TRACE("iface %p, data %#x.\n", iface, data);
|
|
|
|
|
|
|
|
frame->obj.appdata = data;
|
|
|
|
|
|
|
|
return D3DRM_OK;
|
2012-01-04 19:12:32 +01:00
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_SetAppData(IDirect3DRMFrame2 *iface, DWORD data)
|
|
|
|
{
|
2017-06-21 14:39:31 +02:00
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame2(iface);
|
2016-06-19 00:29:07 +02:00
|
|
|
|
2017-06-21 14:39:31 +02:00
|
|
|
TRACE("iface %p, data %#x.\n", iface, data);
|
|
|
|
|
|
|
|
return d3drm_frame3_SetAppData(&frame->IDirect3DRMFrame3_iface, data);
|
2016-06-19 00:29:07 +02:00
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_SetAppData(IDirect3DRMFrame *iface, DWORD data)
|
|
|
|
{
|
2017-06-21 14:39:31 +02:00
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame(iface);
|
2016-06-19 21:28:07 +02:00
|
|
|
|
2017-06-21 14:39:31 +02:00
|
|
|
TRACE("iface %p, data %#x.\n", iface, data);
|
|
|
|
|
|
|
|
return d3drm_frame3_SetAppData(&frame->IDirect3DRMFrame3_iface, data);
|
2016-06-19 21:28:07 +02:00
|
|
|
}
|
|
|
|
|
2013-10-10 23:49:48 +02:00
|
|
|
static DWORD WINAPI d3drm_frame3_GetAppData(IDirect3DRMFrame3 *iface)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2017-06-21 14:39:31 +02:00
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame3(iface);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2017-06-21 14:39:31 +02:00
|
|
|
TRACE("iface %p.\n", iface);
|
|
|
|
|
|
|
|
return frame->obj.appdata;
|
2012-01-04 19:12:32 +01:00
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static DWORD WINAPI d3drm_frame2_GetAppData(IDirect3DRMFrame2 *iface)
|
|
|
|
{
|
2017-06-21 14:39:31 +02:00
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame2(iface);
|
2016-06-19 00:29:07 +02:00
|
|
|
|
2017-06-21 14:39:31 +02:00
|
|
|
TRACE("iface %p.\n", iface);
|
|
|
|
|
|
|
|
return d3drm_frame3_GetAppData(&frame->IDirect3DRMFrame3_iface);
|
2016-06-19 00:29:07 +02:00
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static DWORD WINAPI d3drm_frame1_GetAppData(IDirect3DRMFrame *iface)
|
|
|
|
{
|
2017-06-21 14:39:31 +02:00
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p.\n", iface);
|
2016-06-19 21:28:07 +02:00
|
|
|
|
2017-06-21 14:39:31 +02:00
|
|
|
return d3drm_frame3_GetAppData(&frame->IDirect3DRMFrame3_iface);
|
2016-06-19 21:28:07 +02:00
|
|
|
}
|
|
|
|
|
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
|
|
|
{
|
2017-06-21 14:39:30 +02:00
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame3(iface);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2017-06-21 14:39:30 +02:00
|
|
|
TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
|
|
|
|
|
|
|
|
return d3drm_object_set_name(&frame->obj, name);
|
2012-01-04 19:12:32 +01:00
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_SetName(IDirect3DRMFrame2 *iface, const char *name)
|
|
|
|
{
|
2017-06-21 14:39:30 +02:00
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame2(iface);
|
2016-06-19 00:29:07 +02:00
|
|
|
|
2017-06-21 14:39:30 +02:00
|
|
|
TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
|
|
|
|
|
|
|
|
return d3drm_frame3_SetName(&frame->IDirect3DRMFrame3_iface, name);
|
2016-06-19 00:29:07 +02:00
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_SetName(IDirect3DRMFrame *iface, const char *name)
|
|
|
|
{
|
2017-06-21 14:39:30 +02:00
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame(iface);
|
2016-06-19 21:28:07 +02:00
|
|
|
|
2017-06-21 14:39:30 +02:00
|
|
|
TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
|
|
|
|
|
|
|
|
return d3drm_frame3_SetName(&frame->IDirect3DRMFrame3_iface, name);
|
2016-06-19 21:28:07 +02:00
|
|
|
}
|
|
|
|
|
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
|
|
|
{
|
2017-06-21 14:39:30 +02:00
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame3(iface);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2017-06-21 14:39:30 +02:00
|
|
|
TRACE("iface %p, size %p, name %p.\n", iface, size, name);
|
|
|
|
|
|
|
|
return d3drm_object_get_name(&frame->obj, size, name);
|
2012-01-04 19:12:32 +01:00
|
|
|
}
|
|
|
|
|
2016-06-19 00:29:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame2_GetName(IDirect3DRMFrame2 *iface, DWORD *size, char *name)
|
|
|
|
{
|
2017-06-21 14:39:30 +02:00
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame2(iface);
|
2016-06-19 00:29:07 +02:00
|
|
|
|
2017-06-21 14:39:30 +02:00
|
|
|
TRACE("iface %p, size %p, name %p.\n", iface, size, name);
|
|
|
|
|
|
|
|
return d3drm_frame3_GetName(&frame->IDirect3DRMFrame3_iface, size, name);
|
2016-06-19 00:29:07 +02:00
|
|
|
}
|
|
|
|
|
2016-06-19 21:28:07 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame1_GetName(IDirect3DRMFrame *iface, DWORD *size, char *name)
|
|
|
|
{
|
2017-06-21 14:39:30 +02:00
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame(iface);
|
2016-06-19 21:28:07 +02:00
|
|
|
|
2017-06-21 14:39:30 +02:00
|
|
|
TRACE("iface %p, size %p, name %p.\n", iface, size, name);
|
|
|
|
|
|
|
|
return d3drm_frame3_GetName(&frame->IDirect3DRMFrame3_iface, size, name);
|
2016-06-19 21:28:07 +02:00
|
|
|
}
|
|
|
|
|
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
|
|
|
{
|
2017-06-06 13:10:34 +02:00
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame3(iface);
|
2012-06-14 20:29:21 +02:00
|
|
|
|
2017-06-06 13:10:34 +02:00
|
|
|
TRACE("iface %p, size %p, name %p.\n", iface, size, name);
|
2012-06-14 20:29:21 +02:00
|
|
|
|
2017-06-06 13:10:34 +02:00
|
|
|
return d3drm_object_get_class_name(&frame->obj, size, name);
|
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
|
|
|
{
|
2017-07-10 12:40:46 +02:00
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame3(iface);
|
2013-10-10 23:49:48 +02:00
|
|
|
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
|
|
|
|
2017-07-10 12:40:46 +02:00
|
|
|
if (!d3drm_array_reserve((void **)&frame->children, &frame->children_size,
|
|
|
|
frame->nb_children + 1, sizeof(*frame->children)))
|
|
|
|
return E_OUTOFMEMORY;
|
2012-04-13 13:55:15 +02:00
|
|
|
|
2017-07-10 12:40:46 +02:00
|
|
|
frame->children[frame->nb_children++] = child;
|
2012-04-13 13:55:15 +02:00
|
|
|
IDirect3DRMFrame3_AddRef(child);
|
2017-07-10 12:40:46 +02:00
|
|
|
child_obj->parent = frame;
|
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
|
|
|
{
|
2017-07-10 12:40:47 +02:00
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame3(iface);
|
2012-05-01 22:15:49 +02:00
|
|
|
ULONG i;
|
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 */
|
2017-07-10 12:40:47 +02:00
|
|
|
for (i = 0; i < frame->nb_lights; i++)
|
|
|
|
if (frame->lights[i] == light)
|
2012-05-01 22:15:49 +02:00
|
|
|
return D3DRM_OK;
|
|
|
|
|
2017-07-10 12:40:47 +02:00
|
|
|
if (!d3drm_array_reserve((void **)&frame->lights, &frame->lights_size,
|
|
|
|
frame->nb_lights + 1, sizeof(*frame->lights)))
|
|
|
|
return E_OUTOFMEMORY;
|
2012-05-01 22:15:49 +02:00
|
|
|
|
2017-07-10 12:40:47 +02:00
|
|
|
frame->lights[frame->nb_lights++] = light;
|
2012-05-01 22:15:49 +02:00
|
|
|
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
|
|
|
{
|
2017-07-10 12:40:48 +02:00
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame3(iface);
|
2012-04-30 17:10:27 +02:00
|
|
|
ULONG i;
|
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 */
|
2017-07-10 12:40:48 +02:00
|
|
|
for (i = 0; i < frame->nb_visuals; i++)
|
|
|
|
if (frame->visuals[i] == (IDirect3DRMVisual *)visual)
|
2012-04-30 17:10:27 +02:00
|
|
|
return D3DRM_OK;
|
|
|
|
|
2017-07-10 12:40:48 +02:00
|
|
|
if (!d3drm_array_reserve((void **)&frame->visuals, &frame->visuals_size,
|
|
|
|
frame->nb_visuals + 1, sizeof(*frame->visuals)))
|
|
|
|
return E_OUTOFMEMORY;
|
2012-04-30 17:10:27 +02:00
|
|
|
|
2017-07-10 12:40:48 +02:00
|
|
|
frame->visuals[frame->nb_visuals++] = (IDirect3DRMVisual *)visual;
|
2013-08-20 10:20:13 +02:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2017-07-04 09:43:11 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_SetTraversalOptions(IDirect3DRMFrame3 *iface, DWORD options)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2017-07-04 09:43:11 +02:00
|
|
|
static const DWORD supported_options = D3DRMFRAME_RENDERENABLE | D3DRMFRAME_PICKENABLE;
|
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame3(iface);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2017-07-04 09:43:11 +02:00
|
|
|
TRACE("iface %p, options %#x.\n", iface, options);
|
|
|
|
|
|
|
|
if (options & ~supported_options)
|
|
|
|
return D3DRMERR_BADVALUE;
|
|
|
|
|
|
|
|
frame->traversal_options = options;
|
|
|
|
|
|
|
|
return D3DRM_OK;
|
2012-01-04 19:12:32 +01:00
|
|
|
}
|
|
|
|
|
2017-07-04 09:43:11 +02:00
|
|
|
static HRESULT WINAPI d3drm_frame3_GetTraversalOptions(IDirect3DRMFrame3 *iface, DWORD *options)
|
2012-01-04 19:12:32 +01:00
|
|
|
{
|
2017-07-04 09:43:11 +02:00
|
|
|
struct d3drm_frame *frame = impl_from_IDirect3DRMFrame3(iface);
|
2012-01-04 19:12:32 +01:00
|
|
|
|
2017-07-04 09:43:11 +02:00
|
|
|
TRACE("iface %p, options %p.\n", iface, options);
|
|
|
|
|
|
|
|
if (!options)
|
|
|
|
return D3DRMERR_BADVALUE;
|
|
|
|
|
|
|
|
*options = frame->traversal_options;
|
|
|
|
|
|
|
|
return D3DRM_OK;
|
2012-01-04 19:12:32 +01:00
|
|
|
}
|
|
|
|
|
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
|
|
|
{
|
2017-06-06 13:10:34 +02:00
|
|
|
static const char classname[] = "Frame";
|
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);
|
2017-07-04 09:43:11 +02:00
|
|
|
object->traversal_options = D3DRMFRAME_RENDERENABLE | D3DRMFRAME_PICKENABLE;
|
2012-01-19 21:59:34 +01:00
|
|
|
|
2017-06-06 13:10:34 +02:00
|
|
|
d3drm_object_init(&object->obj, classname);
|
|
|
|
|
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
|
|
|
|
2017-06-11 17:52:27 +02:00
|
|
|
IDirect3DRM_AddRef(object->d3drm);
|
|
|
|
|
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
|
|
|
}
|
2017-06-23 15:15:00 +02:00
|
|
|
|
|
|
|
static HRESULT WINAPI d3drm_animation2_QueryInterface(IDirect3DRMAnimation2 *iface, REFIID riid, void **out)
|
|
|
|
{
|
|
|
|
struct d3drm_animation *animation = impl_from_IDirect3DRMAnimation2(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
|
|
|
|
|
|
|
|
if (IsEqualGUID(riid, &IID_IDirect3DRMAnimation)
|
|
|
|
|| IsEqualGUID(riid, &IID_IDirect3DRMObject)
|
|
|
|
|| IsEqualGUID(riid, &IID_IUnknown))
|
|
|
|
{
|
|
|
|
*out = &animation->IDirect3DRMAnimation_iface;
|
|
|
|
}
|
|
|
|
else if (IsEqualGUID(riid, &IID_IDirect3DRMAnimation2))
|
|
|
|
{
|
|
|
|
*out = &animation->IDirect3DRMAnimation2_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;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI d3drm_animation1_QueryInterface(IDirect3DRMAnimation *iface, REFIID riid, void **out)
|
|
|
|
{
|
|
|
|
struct d3drm_animation *animation = impl_from_IDirect3DRMAnimation(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
|
|
|
|
|
|
|
|
return IDirect3DRMAnimation2_QueryInterface(&animation->IDirect3DRMAnimation2_iface, riid, out);
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI d3drm_animation2_AddRef(IDirect3DRMAnimation2 *iface)
|
|
|
|
{
|
|
|
|
struct d3drm_animation *animation = impl_from_IDirect3DRMAnimation2(iface);
|
|
|
|
ULONG refcount = InterlockedIncrement(&animation->ref);
|
|
|
|
|
|
|
|
TRACE("%p increasing refcount to %u.\n", iface, refcount);
|
|
|
|
|
|
|
|
return refcount;
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI d3drm_animation1_AddRef(IDirect3DRMAnimation *iface)
|
|
|
|
{
|
|
|
|
struct d3drm_animation *animation = impl_from_IDirect3DRMAnimation(iface);
|
|
|
|
return IDirect3DRMAnimation2_AddRef(&animation->IDirect3DRMAnimation2_iface);
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI d3drm_animation2_Release(IDirect3DRMAnimation2 *iface)
|
|
|
|
{
|
|
|
|
struct d3drm_animation *animation = impl_from_IDirect3DRMAnimation2(iface);
|
|
|
|
ULONG refcount = InterlockedDecrement(&animation->ref);
|
|
|
|
|
|
|
|
TRACE("%p decreasing refcount to %u.\n", iface, refcount);
|
|
|
|
|
|
|
|
if (!refcount)
|
|
|
|
{
|
|
|
|
d3drm_object_cleanup((IDirect3DRMObject *)&animation->IDirect3DRMAnimation_iface, &animation->obj);
|
|
|
|
IDirect3DRM_Release(animation->d3drm);
|
2017-07-07 02:18:40 +02:00
|
|
|
HeapFree(GetProcessHeap(), 0, animation->rotate.keys);
|
|
|
|
HeapFree(GetProcessHeap(), 0, animation->scale.keys);
|
|
|
|
HeapFree(GetProcessHeap(), 0, animation->position.keys);
|
2017-06-23 15:15:00 +02:00
|
|
|
HeapFree(GetProcessHeap(), 0, animation);
|
|
|
|
}
|
|
|
|
|
|
|
|
return refcount;
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI d3drm_animation1_Release(IDirect3DRMAnimation *iface)
|
|
|
|
{
|
|
|
|
struct d3drm_animation *animation = impl_from_IDirect3DRMAnimation(iface);
|
|
|
|
|
|
|
|
return IDirect3DRMAnimation2_Release(&animation->IDirect3DRMAnimation2_iface);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI d3drm_animation2_Clone(IDirect3DRMAnimation2 *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;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI d3drm_animation1_Clone(IDirect3DRMAnimation *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;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI d3drm_animation2_AddDestroyCallback(IDirect3DRMAnimation2 *iface,
|
|
|
|
D3DRMOBJECTCALLBACK cb, void *ctx)
|
|
|
|
{
|
|
|
|
struct d3drm_animation *animation = impl_from_IDirect3DRMAnimation2(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p, cb %p, ctx %p.\n", iface, cb, ctx);
|
|
|
|
|
|
|
|
return d3drm_object_add_destroy_callback(&animation->obj, cb, ctx);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI d3drm_animation1_AddDestroyCallback(IDirect3DRMAnimation *iface,
|
|
|
|
D3DRMOBJECTCALLBACK cb, void *ctx)
|
|
|
|
{
|
|
|
|
struct d3drm_animation *animation = impl_from_IDirect3DRMAnimation(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p, cb %p, ctx %p.\n", iface, cb, ctx);
|
|
|
|
|
|
|
|
return IDirect3DRMAnimation2_AddDestroyCallback(&animation->IDirect3DRMAnimation2_iface, cb, ctx);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI d3drm_animation2_DeleteDestroyCallback(IDirect3DRMAnimation2 *iface,
|
|
|
|
D3DRMOBJECTCALLBACK cb, void *ctx)
|
|
|
|
{
|
|
|
|
struct d3drm_animation *animation = impl_from_IDirect3DRMAnimation2(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p, cb %p, ctx %p.\n", iface, cb, ctx);
|
|
|
|
|
|
|
|
return d3drm_object_delete_destroy_callback(&animation->obj, cb, ctx);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI d3drm_animation1_DeleteDestroyCallback(IDirect3DRMAnimation *iface,
|
|
|
|
D3DRMOBJECTCALLBACK cb, void *ctx)
|
|
|
|
{
|
|
|
|
struct d3drm_animation *animation = impl_from_IDirect3DRMAnimation(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p, cb %p, ctx %p.\n", iface, cb, ctx);
|
|
|
|
|
|
|
|
return IDirect3DRMAnimation2_DeleteDestroyCallback(&animation->IDirect3DRMAnimation2_iface, cb, ctx);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI d3drm_animation2_SetAppData(IDirect3DRMAnimation2 *iface, DWORD data)
|
|
|
|
{
|
|
|
|
struct d3drm_animation *animation = impl_from_IDirect3DRMAnimation2(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p, data %#x.\n", iface, data);
|
|
|
|
|
|
|
|
animation->obj.appdata = data;
|
|
|
|
|
|
|
|
return D3DRM_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI d3drm_animation1_SetAppData(IDirect3DRMAnimation *iface, DWORD data)
|
|
|
|
{
|
|
|
|
struct d3drm_animation *animation = impl_from_IDirect3DRMAnimation(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p, data %#x.\n", iface, data);
|
|
|
|
|
|
|
|
return d3drm_animation2_SetAppData(&animation->IDirect3DRMAnimation2_iface, data);
|
|
|
|
}
|
|
|
|
|
|
|
|
static DWORD WINAPI d3drm_animation2_GetAppData(IDirect3DRMAnimation2 *iface)
|
|
|
|
{
|
|
|
|
struct d3drm_animation *animation = impl_from_IDirect3DRMAnimation2(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p.\n", iface);
|
|
|
|
|
|
|
|
return animation->obj.appdata;
|
|
|
|
}
|
|
|
|
|
|
|
|
static DWORD WINAPI d3drm_animation1_GetAppData(IDirect3DRMAnimation *iface)
|
|
|
|
{
|
|
|
|
struct d3drm_animation *animation = impl_from_IDirect3DRMAnimation(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p.\n", iface);
|
|
|
|
|
|
|
|
return d3drm_animation2_GetAppData(&animation->IDirect3DRMAnimation2_iface);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI d3drm_animation2_SetName(IDirect3DRMAnimation2 *iface, const char *name)
|
|
|
|
{
|
|
|
|
struct d3drm_animation *animation = impl_from_IDirect3DRMAnimation2(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
|
|
|
|
|
|
|
|
return d3drm_object_set_name(&animation->obj, name);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI d3drm_animation1_SetName(IDirect3DRMAnimation *iface, const char *name)
|
|
|
|
{
|
|
|
|
struct d3drm_animation *animation = impl_from_IDirect3DRMAnimation(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
|
|
|
|
|
|
|
|
return d3drm_animation2_SetName(&animation->IDirect3DRMAnimation2_iface, name);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI d3drm_animation2_GetName(IDirect3DRMAnimation2 *iface, DWORD *size, char *name)
|
|
|
|
{
|
|
|
|
struct d3drm_animation *animation = impl_from_IDirect3DRMAnimation2(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p, size %p, name %p.\n", iface, size, name);
|
|
|
|
|
|
|
|
return d3drm_object_get_name(&animation->obj, size, name);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI d3drm_animation1_GetName(IDirect3DRMAnimation *iface, DWORD *size, char *name)
|
|
|
|
{
|
|
|
|
struct d3drm_animation *animation = impl_from_IDirect3DRMAnimation(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p, size %p, name %p.\n", iface, size, name);
|
|
|
|
|
|
|
|
return d3drm_animation2_GetName(&animation->IDirect3DRMAnimation2_iface, size, name);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI d3drm_animation2_GetClassName(IDirect3DRMAnimation2 *iface, DWORD *size, char *name)
|
|
|
|
{
|
|
|
|
struct d3drm_animation *animation = impl_from_IDirect3DRMAnimation2(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p, size %p, name %p.\n", iface, size, name);
|
|
|
|
|
|
|
|
return d3drm_object_get_class_name(&animation->obj, size, name);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI d3drm_animation1_GetClassName(IDirect3DRMAnimation *iface, DWORD *size, char *name)
|
|
|
|
{
|
|
|
|
struct d3drm_animation *animation = impl_from_IDirect3DRMAnimation(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p, size %p, name %p.\n", iface, size, name);
|
|
|
|
|
|
|
|
return d3drm_animation2_GetClassName(&animation->IDirect3DRMAnimation2_iface, size, name);
|
|
|
|
}
|
|
|
|
|
2017-06-27 16:36:33 +02:00
|
|
|
static HRESULT WINAPI d3drm_animation2_SetOptions(IDirect3DRMAnimation2 *iface, D3DRMANIMATIONOPTIONS options)
|
|
|
|
{
|
|
|
|
struct d3drm_animation *animation = impl_from_IDirect3DRMAnimation2(iface);
|
|
|
|
static const DWORD supported_options = D3DRMANIMATION_OPEN | D3DRMANIMATION_CLOSED | D3DRMANIMATION_LINEARPOSITION
|
|
|
|
| D3DRMANIMATION_SPLINEPOSITION | D3DRMANIMATION_SCALEANDROTATION | D3DRMANIMATION_POSITION;
|
|
|
|
|
|
|
|
TRACE("iface %p, options %#x.\n", iface, options);
|
|
|
|
|
|
|
|
if (!(options & supported_options))
|
|
|
|
return D3DRMERR_BADVALUE;
|
|
|
|
|
|
|
|
if ((options & (D3DRMANIMATION_OPEN | D3DRMANIMATION_CLOSED)) == (D3DRMANIMATION_OPEN | D3DRMANIMATION_CLOSED) ||
|
|
|
|
(options & (D3DRMANIMATION_LINEARPOSITION | D3DRMANIMATION_SPLINEPOSITION)) ==
|
|
|
|
(D3DRMANIMATION_LINEARPOSITION | D3DRMANIMATION_SPLINEPOSITION) ||
|
|
|
|
(options & (D3DRMANIMATION_SCALEANDROTATION | D3DRMANIMATION_POSITION)) ==
|
|
|
|
(D3DRMANIMATION_SCALEANDROTATION | D3DRMANIMATION_POSITION))
|
|
|
|
{
|
|
|
|
return D3DRMERR_BADVALUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
animation->options = options;
|
|
|
|
|
|
|
|
return D3DRM_OK;
|
|
|
|
}
|
|
|
|
|
2017-06-23 15:15:00 +02:00
|
|
|
static HRESULT WINAPI d3drm_animation1_SetOptions(IDirect3DRMAnimation *iface, D3DRMANIMATIONOPTIONS options)
|
|
|
|
{
|
2017-06-27 16:36:33 +02:00
|
|
|
struct d3drm_animation *animation = impl_from_IDirect3DRMAnimation(iface);
|
2017-06-23 15:15:00 +02:00
|
|
|
|
2017-06-27 16:36:33 +02:00
|
|
|
TRACE("iface %p, %#x.\n", iface, options);
|
|
|
|
|
|
|
|
return d3drm_animation2_SetOptions(&animation->IDirect3DRMAnimation2_iface, options);
|
2017-06-23 15:15:00 +02:00
|
|
|
}
|
|
|
|
|
2017-07-07 02:18:40 +02:00
|
|
|
static SIZE_T d3drm_animation_lookup_key(const struct d3drm_animation_key *keys,
|
|
|
|
SIZE_T count, D3DVALUE time)
|
|
|
|
{
|
|
|
|
SIZE_T start = 0, cur = 0, end = count;
|
|
|
|
|
|
|
|
while (start < end)
|
|
|
|
{
|
|
|
|
cur = start + (end - start) / 2;
|
|
|
|
|
|
|
|
if (time == keys[cur].time)
|
|
|
|
return cur;
|
|
|
|
|
|
|
|
if (time < keys[cur].time)
|
|
|
|
end = cur;
|
|
|
|
else
|
|
|
|
start = cur + 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
return cur;
|
|
|
|
}
|
|
|
|
|
|
|
|
static SIZE_T d3drm_animation_get_index_min(const struct d3drm_animation_key *keys, SIZE_T count, D3DVALUE time)
|
|
|
|
{
|
|
|
|
SIZE_T i;
|
|
|
|
|
|
|
|
i = d3drm_animation_lookup_key(keys, count, time);
|
|
|
|
while (i > 0 && keys[i - 1].time == time)
|
|
|
|
--i;
|
|
|
|
|
|
|
|
return i;
|
|
|
|
}
|
|
|
|
|
|
|
|
static SIZE_T d3drm_animation_get_index_max(const struct d3drm_animation_key *keys, SIZE_T count, D3DVALUE time)
|
|
|
|
{
|
|
|
|
SIZE_T i;
|
|
|
|
|
|
|
|
i = d3drm_animation_lookup_key(keys, count, time);
|
|
|
|
while (i < count - 1 && keys[i + 1].time == time)
|
|
|
|
++i;
|
|
|
|
|
|
|
|
return i;
|
|
|
|
}
|
|
|
|
|
|
|
|
static SIZE_T d3drm_animation_get_insert_position(const struct d3drm_animation_keys *keys, D3DVALUE time)
|
|
|
|
{
|
|
|
|
if (!keys->count || time < keys->keys[0].time)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
if (time >= keys->keys[keys->count - 1].time)
|
|
|
|
return keys->count;
|
|
|
|
|
|
|
|
return d3drm_animation_get_index_max(keys->keys, keys->count, time);
|
|
|
|
}
|
|
|
|
|
|
|
|
static const struct d3drm_animation_key *d3drm_animation_get_range(const struct d3drm_animation_keys *keys,
|
|
|
|
D3DVALUE time_min, D3DVALUE time_max, SIZE_T *count)
|
|
|
|
{
|
2017-07-07 02:18:41 +02:00
|
|
|
SIZE_T min;
|
2017-07-07 02:18:40 +02:00
|
|
|
|
|
|
|
if (!keys->count || time_max < keys->keys[0].time
|
|
|
|
|| time_min > keys->keys[keys->count - 1].time)
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
min = d3drm_animation_get_index_min(keys->keys, keys->count, time_min);
|
2017-07-07 02:18:41 +02:00
|
|
|
if (count)
|
|
|
|
*count = d3drm_animation_get_index_max(&keys->keys[min], keys->count - min, time_max) - min + 1;
|
2017-07-07 02:18:40 +02:00
|
|
|
|
|
|
|
return &keys->keys[min];
|
|
|
|
}
|
|
|
|
|
2017-06-30 09:41:23 +02:00
|
|
|
static HRESULT WINAPI d3drm_animation2_AddKey(IDirect3DRMAnimation2 *iface, D3DRMANIMATIONKEY *key)
|
2017-06-23 15:15:00 +02:00
|
|
|
{
|
2017-07-07 02:18:40 +02:00
|
|
|
struct d3drm_animation *animation = impl_from_IDirect3DRMAnimation2(iface);
|
|
|
|
struct d3drm_animation_keys *keys;
|
|
|
|
SIZE_T index;
|
2017-06-23 15:15:00 +02:00
|
|
|
|
2017-07-07 02:18:40 +02:00
|
|
|
TRACE("iface %p, key %p.\n", iface, key);
|
|
|
|
|
|
|
|
if (!key || key->dwSize != sizeof(*key))
|
|
|
|
return E_INVALIDARG;
|
|
|
|
|
|
|
|
switch (key->dwKeyType)
|
|
|
|
{
|
|
|
|
case D3DRMANIMATION_POSITIONKEY:
|
|
|
|
keys = &animation->position;
|
|
|
|
break;
|
|
|
|
case D3DRMANIMATION_SCALEKEY:
|
|
|
|
keys = &animation->scale;
|
|
|
|
break;
|
|
|
|
case D3DRMANIMATION_ROTATEKEY:
|
|
|
|
keys = &animation->rotate;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
return E_INVALIDARG;
|
|
|
|
}
|
|
|
|
|
|
|
|
index = d3drm_animation_get_insert_position(keys, key->dvTime);
|
|
|
|
|
|
|
|
if (!d3drm_array_reserve((void **)&keys->keys, &keys->size, keys->count + 1, sizeof(*keys->keys)))
|
|
|
|
return E_OUTOFMEMORY;
|
|
|
|
|
|
|
|
if (index < keys->count)
|
|
|
|
memmove(&keys->keys[index + 1], &keys->keys[index], sizeof(*keys->keys) * (keys->count - index));
|
|
|
|
keys->keys[index].time = key->dvTime;
|
|
|
|
switch (key->dwKeyType)
|
|
|
|
{
|
|
|
|
case D3DRMANIMATION_POSITIONKEY:
|
|
|
|
keys->keys[index].u.position = key->u.dvPositionKey;
|
|
|
|
break;
|
|
|
|
case D3DRMANIMATION_SCALEKEY:
|
|
|
|
keys->keys[index].u.scale = key->u.dvScaleKey;
|
|
|
|
break;
|
|
|
|
case D3DRMANIMATION_ROTATEKEY:
|
|
|
|
keys->keys[index].u.rotate = key->u.dqRotateKey;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
++keys->count;
|
|
|
|
|
|
|
|
return D3DRM_OK;
|
2017-06-23 15:15:00 +02:00
|
|
|
}
|
|
|
|
|
2017-06-30 09:41:23 +02:00
|
|
|
static HRESULT WINAPI d3drm_animation2_AddRotateKey(IDirect3DRMAnimation2 *iface, D3DVALUE time, D3DRMQUATERNION *q)
|
|
|
|
{
|
|
|
|
D3DRMANIMATIONKEY key;
|
|
|
|
|
|
|
|
TRACE("iface %p, time %.8e, q %p.\n", iface, time, q);
|
|
|
|
|
|
|
|
key.dwSize = sizeof(key);
|
|
|
|
key.dwKeyType = D3DRMANIMATION_ROTATEKEY;
|
|
|
|
key.dvTime = time;
|
|
|
|
key.dwID = 0;
|
|
|
|
key.u.dqRotateKey = *q;
|
|
|
|
|
|
|
|
return d3drm_animation2_AddKey(iface, &key);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI d3drm_animation1_AddRotateKey(IDirect3DRMAnimation *iface, D3DVALUE time, D3DRMQUATERNION *q)
|
|
|
|
{
|
|
|
|
struct d3drm_animation *animation = impl_from_IDirect3DRMAnimation(iface);
|
|
|
|
|
|
|
|
TRACE("iface %p, time %.8e, q %p.\n", iface, time, q);
|
|
|
|
|
|
|
|
return d3drm_animation2_AddRotateKey(&animation->IDirect3DRMAnimation2_iface, time, q);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI d3drm_animation2_AddPositionKey(IDirect3DRMAnimation2 *iface, D3DVALUE time,
|
|
|
|
D3DVALUE x, D3DVALUE y, D3DVALUE z)
|
|
|
|
{
|
|
|
|
D3DRMANIMATIONKEY key;
|
|
|
|
|
|
|
|
TRACE("iface %p, time %.8e, x %.8e, y %.8e, z %.8e.\n", iface, time, x, y, z);
|
|
|
|
|
|
|
|
key.dwSize = sizeof(key);
|
|
|
|
key.dwKeyType = D3DRMANIMATION_POSITIONKEY;
|
|
|
|
key.dvTime = time;
|
|
|
|
key.dwID = 0;
|
|
|
|
key.u.dvPositionKey.u1.x = x;
|
|
|
|
key.u.dvPositionKey.u2.y = y;
|
|
|
|
key.u.dvPositionKey.u3.z = z;
|
|
|
|
|
|
|
|
return d3drm_animation2_AddKey(iface, &key);
|
|
|
|
}
|
|
|
|
|
2017-06-23 15:15:00 +02:00
|
|
|
static HRESULT WINAPI d3drm_animation1_AddPositionKey(IDirect3DRMAnimation *iface, D3DVALUE time,
|
|
|
|
D3DVALUE x, D3DVALUE y, D3DVALUE z)
|
|
|
|
{
|
2017-06-30 09:41:23 +02:00
|
|
|
struct d3drm_animation *animation = impl_from_IDirect3DRMAnimation(iface);
|
2017-06-23 15:15:00 +02:00
|
|
|
|
2017-06-30 09:41:23 +02:00
|
|
|
TRACE("iface %p, time %.8e, x %.8e, y %.8e, z %.8e.\n", iface, time, x, y, z);
|
|
|
|
|
|
|
|
return d3drm_animation2_AddPositionKey(&animation->IDirect3DRMAnimation2_iface, time, x, y, z);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI d3drm_animation2_AddScaleKey(IDirect3DRMAnimation2 *iface, D3DVALUE time,
|
|
|
|
D3DVALUE x, D3DVALUE y, D3DVALUE z)
|
|
|
|
{
|
|
|
|
D3DRMANIMATIONKEY key;
|
|
|
|
|
|
|
|
TRACE("iface %p, time %.8e, x %.8e, y %.8e, z %.8e.\n", iface, time, x, y, z);
|
|
|
|
|
|
|
|
key.dwSize = sizeof(key);
|
|
|
|
key.dwKeyType = D3DRMANIMATION_SCALEKEY;
|
|
|
|
key.dvTime = time;
|
|
|
|
key.dwID = 0;
|
|
|
|
key.u.dvScaleKey.u1.x = x;
|
|
|
|
key.u.dvScaleKey.u2.y = y;
|
|
|
|
key.u.dvScaleKey.u3.z = z;
|
|
|
|
|
|
|
|
return d3drm_animation2_AddKey(iface, &key);
|
2017-06-23 15:15:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI d3drm_animation1_AddScaleKey(IDirect3DRMAnimation *iface, D3DVALUE time,
|
|
|
|
D3DVALUE x, D3DVALUE y, D3DVALUE z)
|
|
|
|
{
|
2017-06-30 09:41:23 +02:00
|
|
|
struct d3drm_animation *animation = impl_from_IDirect3DRMAnimation(iface);
|
2017-06-23 15:15:00 +02:00
|
|
|
|
2017-06-30 09:41:23 +02:00
|
|
|
TRACE("iface %p, time %.8e, x %.8e, y %.8e, z %.8e.\n", iface, time, x, y, z);
|
|
|
|
|
|
|
|
return d3drm_animation2_AddScaleKey(&animation->IDirect3DRMAnimation2_iface, time, x, y, z);
|
2017-06-23 15:15:00 +02:00
|
|
|
}
|
|
|
|
|
2017-07-07 02:18:41 +02:00
|
|
|
static void d3drm_animation_delete_key(struct d3drm_animation_keys *keys, const struct d3drm_animation_key *key)
|
|
|
|
{
|
|
|
|
SIZE_T index = key - keys->keys;
|
|
|
|
|
|
|
|
if (index < keys->count - 1)
|
|
|
|
memmove(&keys->keys[index], &keys->keys[index + 1], sizeof(*keys->keys) * (keys->count - index - 1));
|
|
|
|
--keys->count;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI d3drm_animation2_DeleteKey(IDirect3DRMAnimation2 *iface, D3DVALUE time)
|
|
|
|
{
|
|
|
|
struct d3drm_animation *animation = impl_from_IDirect3DRMAnimation2(iface);
|
|
|
|
const struct d3drm_animation_key *key;
|
|
|
|
|
|
|
|
TRACE("iface %p, time %.8e.\n", iface, time);
|
|
|
|
|
|
|
|
if ((key = d3drm_animation_get_range(&animation->rotate, time, time, NULL)))
|
|
|
|
d3drm_animation_delete_key(&animation->rotate, key);
|
|
|
|
|
|
|
|
if ((key = d3drm_animation_get_range(&animation->position, time, time, NULL)))
|
|
|
|
d3drm_animation_delete_key(&animation->position, key);
|
|
|
|
|
|
|
|
if ((key = d3drm_animation_get_range(&animation->scale, time, time, NULL)))
|
|
|
|
d3drm_animation_delete_key(&animation->scale, key);
|
|
|
|
|
|
|
|
return D3DRM_OK;
|
|
|
|
}
|
|
|
|
|
2017-06-23 15:15:00 +02:00
|
|
|
static HRESULT WINAPI d3drm_animation1_DeleteKey(IDirect3DRMAnimation *iface, D3DVALUE time)
|
|
|
|
{
|
2017-07-07 02:18:41 +02:00
|
|
|
struct d3drm_animation *animation = impl_from_IDirect3DRMAnimation(iface);
|
2017-06-23 15:15:00 +02:00
|
|
|
|
2017-07-07 02:18:41 +02:00
|
|
|
TRACE("iface %p, time %.8e.\n", iface, time);
|
|
|
|
|
|
|
|
return d3drm_animation2_DeleteKey(&animation->IDirect3DRMAnimation2_iface, time);
|
2017-06-23 15:15:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI d3drm_animation1_SetFrame(IDirect3DRMAnimation *iface, IDirect3DRMFrame *frame)
|
|
|
|
{
|
2017-06-27 10:17:11 +02:00
|
|
|
struct d3drm_animation *animation = impl_from_IDirect3DRMAnimation(iface);
|
|
|
|
HRESULT hr = D3DRM_OK;
|
2017-06-23 15:15:00 +02:00
|
|
|
|
2017-06-27 10:17:11 +02:00
|
|
|
TRACE("iface %p, frame %p.\n", iface, frame);
|
|
|
|
|
|
|
|
if (frame)
|
|
|
|
{
|
|
|
|
hr = IDirect3DRMFrame_QueryInterface(frame, &IID_IDirect3DRMFrame3, (void **)&animation->frame);
|
|
|
|
if (SUCCEEDED(hr))
|
|
|
|
IDirect3DRMFrame3_Release(animation->frame);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
animation->frame = NULL;
|
|
|
|
|
|
|
|
return hr;
|
2017-06-23 15:15:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI d3drm_animation1_SetTime(IDirect3DRMAnimation *iface, D3DVALUE time)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, time %.8e.\n", iface, time);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2017-06-27 16:36:33 +02:00
|
|
|
static D3DRMANIMATIONOPTIONS WINAPI d3drm_animation2_GetOptions(IDirect3DRMAnimation2 *iface)
|
2017-06-23 15:15:00 +02:00
|
|
|
{
|
2017-06-27 16:36:33 +02:00
|
|
|
struct d3drm_animation *animation = impl_from_IDirect3DRMAnimation2(iface);
|
2017-06-23 15:15:00 +02:00
|
|
|
|
2017-06-27 16:36:33 +02:00
|
|
|
TRACE("iface %p.\n", iface);
|
|
|
|
|
|
|
|
return animation->options;
|
2017-06-23 15:15:00 +02:00
|
|
|
}
|
|
|
|
|
2017-06-27 16:36:33 +02:00
|
|
|
static D3DRMANIMATIONOPTIONS WINAPI d3drm_animation1_GetOptions(IDirect3DRMAnimation *iface)
|
2017-06-23 15:15:00 +02:00
|
|
|
{
|
2017-06-27 16:36:33 +02:00
|
|
|
struct d3drm_animation *animation = impl_from_IDirect3DRMAnimation(iface);
|
2017-06-23 15:15:00 +02:00
|
|
|
|
2017-06-27 16:36:33 +02:00
|
|
|
TRACE("iface %p.\n", iface);
|
|
|
|
|
|
|
|
return d3drm_animation2_GetOptions(&animation->IDirect3DRMAnimation2_iface);
|
2017-06-23 15:15:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI d3drm_animation2_SetFrame(IDirect3DRMAnimation2 *iface, IDirect3DRMFrame3 *frame)
|
|
|
|
{
|
2017-06-27 10:17:11 +02:00
|
|
|
struct d3drm_animation *animation = impl_from_IDirect3DRMAnimation2(iface);
|
2017-06-23 15:15:00 +02:00
|
|
|
|
2017-06-27 10:17:11 +02:00
|
|
|
TRACE("iface %p, frame %p.\n", iface, frame);
|
|
|
|
|
|
|
|
animation->frame = frame;
|
|
|
|
|
|
|
|
return D3DRM_OK;
|
2017-06-23 15:15:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI d3drm_animation2_SetTime(IDirect3DRMAnimation2 *iface, D3DVALUE time)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, time %.8e.\n", iface, time);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI d3drm_animation2_GetFrame(IDirect3DRMAnimation2 *iface, IDirect3DRMFrame3 **frame)
|
|
|
|
{
|
2017-06-27 10:17:11 +02:00
|
|
|
struct d3drm_animation *animation = impl_from_IDirect3DRMAnimation2(iface);
|
2017-06-23 15:15:00 +02:00
|
|
|
|
2017-06-27 10:17:11 +02:00
|
|
|
TRACE("iface %p, frame %p.\n", iface, frame);
|
|
|
|
|
|
|
|
if (!frame)
|
|
|
|
return D3DRMERR_BADVALUE;
|
|
|
|
|
|
|
|
*frame = animation->frame;
|
|
|
|
if (*frame)
|
|
|
|
IDirect3DRMFrame3_AddRef(*frame);
|
|
|
|
|
|
|
|
return D3DRM_OK;
|
2017-06-23 15:15:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI d3drm_animation2_DeleteKeyByID(IDirect3DRMAnimation2 *iface, DWORD id)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, id %#x.\n", iface, id);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI d3drm_animation2_ModifyKey(IDirect3DRMAnimation2 *iface, D3DRMANIMATIONKEY *key)
|
|
|
|
{
|
|
|
|
FIXME("iface %p, key %p.\n", iface, key);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI d3drm_animation2_GetKeys(IDirect3DRMAnimation2 *iface, D3DVALUE time_min, D3DVALUE time_max,
|
|
|
|
DWORD *key_count, D3DRMANIMATIONKEY *keys)
|
|
|
|
{
|
2017-07-07 02:18:40 +02:00
|
|
|
struct d3drm_animation *animation = impl_from_IDirect3DRMAnimation2(iface);
|
|
|
|
const struct d3drm_animation_key *key;
|
|
|
|
SIZE_T count, i;
|
2017-06-23 15:15:00 +02:00
|
|
|
|
2017-07-07 02:18:40 +02:00
|
|
|
TRACE("iface %p, time min %.8e, time max %.8e, key_count %p, keys %p.\n",
|
|
|
|
iface, time_min, time_max, key_count, keys);
|
|
|
|
|
|
|
|
if (!key_count)
|
|
|
|
return D3DRMERR_BADVALUE;
|
|
|
|
|
|
|
|
*key_count = 0;
|
|
|
|
|
|
|
|
if ((key = d3drm_animation_get_range(&animation->rotate, time_min, time_max, &count)))
|
|
|
|
{
|
|
|
|
if (keys)
|
|
|
|
{
|
|
|
|
for (i = 0; i < count; ++i)
|
|
|
|
{
|
|
|
|
keys[i].dwSize = sizeof(*keys);
|
|
|
|
keys[i].dwKeyType = D3DRMANIMATION_ROTATEKEY;
|
|
|
|
keys[i].dvTime = key[i].time;
|
|
|
|
keys[i].dwID = 0; /* FIXME */
|
|
|
|
keys[i].u.dqRotateKey = key[i].u.rotate;
|
|
|
|
}
|
|
|
|
keys += count;
|
|
|
|
}
|
|
|
|
*key_count += count;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ((key = d3drm_animation_get_range(&animation->position, time_min, time_max, &count)))
|
|
|
|
{
|
|
|
|
if (keys)
|
|
|
|
{
|
|
|
|
for (i = 0; i < count; ++i)
|
|
|
|
{
|
|
|
|
keys[i].dwSize = sizeof(*keys);
|
|
|
|
keys[i].dwKeyType = D3DRMANIMATION_POSITIONKEY;
|
|
|
|
keys[i].dvTime = key[i].time;
|
|
|
|
keys[i].dwID = 0; /* FIXME */
|
|
|
|
keys[i].u.dvPositionKey = key[i].u.position;
|
|
|
|
}
|
|
|
|
keys += count;
|
|
|
|
}
|
|
|
|
*key_count += count;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ((key = d3drm_animation_get_range(&animation->scale, time_min, time_max, &count)))
|
|
|
|
{
|
|
|
|
if (keys)
|
|
|
|
{
|
|
|
|
for (i = 0; keys && i < count; ++i)
|
|
|
|
{
|
|
|
|
keys[i].dwSize = sizeof(*keys);
|
|
|
|
keys[i].dwKeyType = D3DRMANIMATION_SCALEKEY;
|
|
|
|
keys[i].dvTime = key[i].time;
|
|
|
|
keys[i].dwID = 0; /* FIXME */
|
|
|
|
keys[i].u.dvScaleKey = key[i].u.scale;
|
|
|
|
}
|
|
|
|
keys += count;
|
|
|
|
}
|
|
|
|
*key_count += count;
|
|
|
|
}
|
|
|
|
|
|
|
|
return *key_count ? D3DRM_OK : D3DRMERR_NOSUCHKEY;
|
2017-06-23 15:15:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static const struct IDirect3DRMAnimationVtbl d3drm_animation1_vtbl =
|
|
|
|
{
|
|
|
|
d3drm_animation1_QueryInterface,
|
|
|
|
d3drm_animation1_AddRef,
|
|
|
|
d3drm_animation1_Release,
|
|
|
|
d3drm_animation1_Clone,
|
|
|
|
d3drm_animation1_AddDestroyCallback,
|
|
|
|
d3drm_animation1_DeleteDestroyCallback,
|
|
|
|
d3drm_animation1_SetAppData,
|
|
|
|
d3drm_animation1_GetAppData,
|
|
|
|
d3drm_animation1_SetName,
|
|
|
|
d3drm_animation1_GetName,
|
|
|
|
d3drm_animation1_GetClassName,
|
|
|
|
d3drm_animation1_SetOptions,
|
|
|
|
d3drm_animation1_AddRotateKey,
|
|
|
|
d3drm_animation1_AddPositionKey,
|
|
|
|
d3drm_animation1_AddScaleKey,
|
|
|
|
d3drm_animation1_DeleteKey,
|
|
|
|
d3drm_animation1_SetFrame,
|
|
|
|
d3drm_animation1_SetTime,
|
|
|
|
d3drm_animation1_GetOptions,
|
|
|
|
};
|
|
|
|
|
|
|
|
static const struct IDirect3DRMAnimation2Vtbl d3drm_animation2_vtbl =
|
|
|
|
{
|
|
|
|
d3drm_animation2_QueryInterface,
|
|
|
|
d3drm_animation2_AddRef,
|
|
|
|
d3drm_animation2_Release,
|
|
|
|
d3drm_animation2_Clone,
|
|
|
|
d3drm_animation2_AddDestroyCallback,
|
|
|
|
d3drm_animation2_DeleteDestroyCallback,
|
|
|
|
d3drm_animation2_SetAppData,
|
|
|
|
d3drm_animation2_GetAppData,
|
|
|
|
d3drm_animation2_SetName,
|
|
|
|
d3drm_animation2_GetName,
|
|
|
|
d3drm_animation2_GetClassName,
|
|
|
|
d3drm_animation2_SetOptions,
|
|
|
|
d3drm_animation2_AddRotateKey,
|
|
|
|
d3drm_animation2_AddPositionKey,
|
|
|
|
d3drm_animation2_AddScaleKey,
|
|
|
|
d3drm_animation2_DeleteKey,
|
|
|
|
d3drm_animation2_SetFrame,
|
|
|
|
d3drm_animation2_SetTime,
|
|
|
|
d3drm_animation2_GetOptions,
|
|
|
|
d3drm_animation2_GetFrame,
|
|
|
|
d3drm_animation2_DeleteKeyByID,
|
|
|
|
d3drm_animation2_AddKey,
|
|
|
|
d3drm_animation2_ModifyKey,
|
|
|
|
d3drm_animation2_GetKeys,
|
|
|
|
};
|
|
|
|
|
|
|
|
HRESULT d3drm_animation_create(struct d3drm_animation **animation, IDirect3DRM *d3drm)
|
|
|
|
{
|
|
|
|
static const char classname[] = "Animation";
|
|
|
|
struct d3drm_animation *object;
|
|
|
|
HRESULT hr = D3DRM_OK;
|
|
|
|
|
|
|
|
TRACE("animation %p, d3drm %p.\n", animation, d3drm);
|
|
|
|
|
|
|
|
if (!(object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object))))
|
|
|
|
return E_OUTOFMEMORY;
|
|
|
|
|
|
|
|
object->IDirect3DRMAnimation_iface.lpVtbl = &d3drm_animation1_vtbl;
|
|
|
|
object->IDirect3DRMAnimation2_iface.lpVtbl = &d3drm_animation2_vtbl;
|
|
|
|
object->d3drm = d3drm;
|
|
|
|
object->ref = 1;
|
2017-06-27 16:36:33 +02:00
|
|
|
object->options = D3DRMANIMATION_CLOSED | D3DRMANIMATION_LINEARPOSITION;
|
2017-06-23 15:15:00 +02:00
|
|
|
|
|
|
|
d3drm_object_init(&object->obj, classname);
|
|
|
|
|
|
|
|
IDirect3DRM_AddRef(object->d3drm);
|
|
|
|
|
|
|
|
*animation = object;
|
|
|
|
|
|
|
|
return hr;
|
|
|
|
}
|