msxml3: CDATA nodes can't have children.
[wine.git] / dlls / d3drm / frame.c
blobb0bbaa63b330eb3013043b421c220ab1fa4f85f1
1 /*
2 * Implementation of IDirect3DRMFrame Interface
4 * Copyright 2011, 2012 André Hentschel
5 * Copyright 2012 Christian Costa
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 #include <assert.h>
23 #include "wine/debug.h"
25 #define COBJMACROS
27 #include "winbase.h"
28 #include "wingdi.h"
30 #include "d3drm_private.h"
32 WINE_DEFAULT_DEBUG_CHANNEL(d3drm);
34 static D3DRMMATRIX4D identity = {
35 { 1.0f, 0.0f, 0.0f, 0.0f },
36 { 0.0f, 1.0f, 0.0f, 0.0f },
37 { 0.0f, 0.0f, 1.0f, 0.0f },
38 { 0.0f, 0.0f, 0.0f, 1.0f }
41 typedef struct IDirect3DRMFrameImpl IDirect3DRMFrameImpl;
43 struct IDirect3DRMFrameImpl {
44 IDirect3DRMFrame2 IDirect3DRMFrame2_iface;
45 IDirect3DRMFrame3 IDirect3DRMFrame3_iface;
46 LONG ref;
47 IDirect3DRMFrameImpl* parent;
48 ULONG nb_children;
49 ULONG children_capacity;
50 IDirect3DRMFrame3** children;
51 ULONG nb_visuals;
52 ULONG visuals_capacity;
53 IDirect3DRMVisual** visuals;
54 ULONG nb_lights;
55 ULONG lights_capacity;
56 IDirect3DRMLight** lights;
57 D3DRMMATRIX4D transform;
58 D3DCOLOR scenebackground;
61 typedef struct {
62 IDirect3DRMFrameArray IDirect3DRMFrameArray_iface;
63 LONG ref;
64 ULONG size;
65 LPDIRECT3DRMFRAME* frames;
66 } IDirect3DRMFrameArrayImpl;
68 typedef struct {
69 IDirect3DRMVisualArray IDirect3DRMVisualArray_iface;
70 LONG ref;
71 ULONG size;
72 LPDIRECT3DRMVISUAL* visuals;
73 } IDirect3DRMVisualArrayImpl;
75 typedef struct {
76 IDirect3DRMLightArray IDirect3DRMLightArray_iface;
77 LONG ref;
78 ULONG size;
79 LPDIRECT3DRMLIGHT* lights;
80 } IDirect3DRMLightArrayImpl;
82 static inline IDirect3DRMFrameImpl *impl_from_IDirect3DRMFrame2(IDirect3DRMFrame2 *iface)
84 return CONTAINING_RECORD(iface, IDirect3DRMFrameImpl, IDirect3DRMFrame2_iface);
87 static inline IDirect3DRMFrameImpl *impl_from_IDirect3DRMFrame3(IDirect3DRMFrame3 *iface)
89 return CONTAINING_RECORD(iface, IDirect3DRMFrameImpl, IDirect3DRMFrame3_iface);
92 static inline IDirect3DRMFrameImpl *unsafe_impl_from_IDirect3DRMFrame3(IDirect3DRMFrame3 *iface);
94 static inline IDirect3DRMLightArrayImpl *impl_from_IDirect3DRMLightArray(IDirect3DRMLightArray *iface)
96 return CONTAINING_RECORD(iface, IDirect3DRMLightArrayImpl, IDirect3DRMLightArray_iface);
99 /*** IUnknown methods ***/
100 static HRESULT WINAPI IDirect3DRMFrameArrayImpl_QueryInterface(IDirect3DRMFrameArray* iface,
101 REFIID riid, void** object)
103 IDirect3DRMFrameArrayImpl *This = (IDirect3DRMFrameArrayImpl*)iface;
105 TRACE("(%p/%p)->(%s, %p)\n", iface, This, debugstr_guid(riid), object);
107 *object = NULL;
109 if (IsEqualGUID(riid, &IID_IUnknown) ||
110 IsEqualGUID(riid, &IID_IDirect3DRMFrameArray))
112 *object = &This->IDirect3DRMFrameArray_iface;
114 else
116 FIXME("interface %s not implemented\n", debugstr_guid(riid));
117 return E_NOINTERFACE;
120 IDirect3DRMFrameArray_AddRef(iface);
121 return S_OK;
124 static ULONG WINAPI IDirect3DRMFrameArrayImpl_AddRef(IDirect3DRMFrameArray* iface)
126 IDirect3DRMFrameArrayImpl *This = (IDirect3DRMFrameArrayImpl*)iface;
127 ULONG ref = InterlockedIncrement(&This->ref);
129 TRACE("(%p)->(): new ref = %u\n", This, ref);
131 return ref;
134 static ULONG WINAPI IDirect3DRMFrameArrayImpl_Release(IDirect3DRMFrameArray* iface)
136 IDirect3DRMFrameArrayImpl *This = (IDirect3DRMFrameArrayImpl*)iface;
137 ULONG ref = InterlockedDecrement(&This->ref);
138 ULONG i;
140 TRACE("(%p)->(): new ref = %u\n", This, ref);
142 if (!ref)
144 for (i = 0; i < This->size; i++)
145 IDirect3DRMFrame_Release(This->frames[i]);
146 HeapFree(GetProcessHeap(), 0, This->frames);
147 HeapFree(GetProcessHeap(), 0, This);
150 return ref;
153 /*** IDirect3DRMArray methods ***/
154 static DWORD WINAPI IDirect3DRMFrameArrayImpl_GetSize(IDirect3DRMFrameArray* iface)
156 IDirect3DRMFrameArrayImpl *This = (IDirect3DRMFrameArrayImpl*)iface;
158 TRACE("(%p)->() = %d\n", This, This->size);
160 return This->size;
163 /*** IDirect3DRMFrameArray methods ***/
164 static HRESULT WINAPI IDirect3DRMFrameArrayImpl_GetElement(IDirect3DRMFrameArray* iface, DWORD index, LPDIRECT3DRMFRAME* frame)
166 IDirect3DRMFrameArrayImpl *This = (IDirect3DRMFrameArrayImpl*)iface;
168 TRACE("(%p)->(%u, %p)\n", This, index, frame);
170 if (!frame)
171 return D3DRMERR_BADVALUE;
173 *frame = NULL;
175 if (index >= This->size)
176 return D3DRMERR_BADVALUE;
178 IDirect3DRMFrame_AddRef(This->frames[index]);
179 *frame = This->frames[index];
181 return D3DRM_OK;
184 static const struct IDirect3DRMFrameArrayVtbl Direct3DRMFrameArray_Vtbl =
186 /*** IUnknown methods ***/
187 IDirect3DRMFrameArrayImpl_QueryInterface,
188 IDirect3DRMFrameArrayImpl_AddRef,
189 IDirect3DRMFrameArrayImpl_Release,
190 /*** IDirect3DRMArray methods ***/
191 IDirect3DRMFrameArrayImpl_GetSize,
192 /*** IDirect3DRMFrameArray methods ***/
193 IDirect3DRMFrameArrayImpl_GetElement
196 static HRESULT Direct3DRMFrameArray_create(IDirect3DRMFrameArray** obj)
198 IDirect3DRMFrameArrayImpl* object;
200 TRACE("(%p)\n", obj);
202 *obj = NULL;
204 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMFrameArrayImpl));
205 if (!object)
206 return E_OUTOFMEMORY;
208 object->IDirect3DRMFrameArray_iface.lpVtbl = &Direct3DRMFrameArray_Vtbl;
209 object->ref = 1;
211 *obj = &object->IDirect3DRMFrameArray_iface;
213 return S_OK;
216 /*** IUnknown methods ***/
217 static HRESULT WINAPI IDirect3DRMVisualArrayImpl_QueryInterface(IDirect3DRMVisualArray* iface,
218 REFIID riid, void** ret_iface)
220 TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), ret_iface);
222 if (IsEqualGUID(riid, &IID_IUnknown) ||
223 IsEqualGUID(riid, &IID_IDirect3DRMFrameArray))
225 *ret_iface = iface;
226 IDirect3DRMVisualArray_AddRef(iface);
227 return S_OK;
230 *ret_iface = NULL;
232 WARN("Interface %s not implemented\n", debugstr_guid(riid));
234 return E_NOINTERFACE;
237 static ULONG WINAPI IDirect3DRMVisualArrayImpl_AddRef(IDirect3DRMVisualArray* iface)
239 IDirect3DRMVisualArrayImpl *This = (IDirect3DRMVisualArrayImpl*)iface;
240 ULONG ref = InterlockedIncrement(&This->ref);
242 TRACE("(%p)->(): new ref = %u\n", iface, ref);
244 return ref;
247 static ULONG WINAPI IDirect3DRMVisualArrayImpl_Release(IDirect3DRMVisualArray* iface)
249 IDirect3DRMVisualArrayImpl *This = (IDirect3DRMVisualArrayImpl*)iface;
250 ULONG ref = InterlockedDecrement(&This->ref);
251 ULONG i;
253 TRACE("(%p)->(): new ref = %u\n", iface, ref);
255 if (!ref)
257 for (i = 0; i < This->size; i++)
258 IDirect3DRMVisual_Release(This->visuals[i]);
259 HeapFree(GetProcessHeap(), 0, This->visuals);
260 HeapFree(GetProcessHeap(), 0, This);
263 return ref;
266 /*** IDirect3DRMArray methods ***/
267 static DWORD WINAPI IDirect3DRMVisualArrayImpl_GetSize(IDirect3DRMVisualArray* iface)
269 IDirect3DRMVisualArrayImpl *This = (IDirect3DRMVisualArrayImpl*)iface;
271 TRACE("(%p)->() = %d\n", iface, This->size);
273 return This->size;
276 /*** IDirect3DRMVisualArray methods ***/
277 static HRESULT WINAPI IDirect3DRMVisualArrayImpl_GetElement(IDirect3DRMVisualArray* iface, DWORD index, LPDIRECT3DRMVISUAL* visual)
279 IDirect3DRMVisualArrayImpl *This = (IDirect3DRMVisualArrayImpl*)iface;
281 TRACE("(%p)->(%u, %p)\n", iface, index, visual);
283 if (!visual)
284 return D3DRMERR_BADVALUE;
286 *visual = NULL;
288 if (index >= This->size)
289 return D3DRMERR_BADVALUE;
291 IDirect3DRMVisual_AddRef(This->visuals[index]);
292 *visual = This->visuals[index];
294 return D3DRM_OK;
297 static const struct IDirect3DRMVisualArrayVtbl Direct3DRMVisualArray_Vtbl =
299 /*** IUnknown methods ***/
300 IDirect3DRMVisualArrayImpl_QueryInterface,
301 IDirect3DRMVisualArrayImpl_AddRef,
302 IDirect3DRMVisualArrayImpl_Release,
303 /*** IDirect3DRMArray methods ***/
304 IDirect3DRMVisualArrayImpl_GetSize,
305 /*** IDirect3DRMVisualArray methods ***/
306 IDirect3DRMVisualArrayImpl_GetElement
309 static HRESULT Direct3DRMVisualArray_create(IDirect3DRMVisualArray** ret_iface)
311 IDirect3DRMVisualArrayImpl* object;
313 TRACE("(%p)\n", ret_iface);
315 *ret_iface = NULL;
317 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMVisualArrayImpl));
318 if (!object)
319 return E_OUTOFMEMORY;
321 object->IDirect3DRMVisualArray_iface.lpVtbl = &Direct3DRMVisualArray_Vtbl;
322 object->ref = 1;
324 *ret_iface = &object->IDirect3DRMVisualArray_iface;
326 return S_OK;
329 /*** IUnknown methods ***/
330 static HRESULT WINAPI IDirect3DRMLightArrayImpl_QueryInterface(IDirect3DRMLightArray* iface,
331 REFIID riid, void** object)
333 IDirect3DRMLightArrayImpl *This = impl_from_IDirect3DRMLightArray(iface);
335 TRACE("(%p/%p)->(%s, %p)\n", iface, This, debugstr_guid(riid), object);
337 *object = NULL;
339 if (IsEqualGUID(riid, &IID_IUnknown) ||
340 IsEqualGUID(riid, &IID_IDirect3DRMLightArray))
342 *object = &This->IDirect3DRMLightArray_iface;
344 else
346 FIXME("interface %s not implemented\n", debugstr_guid(riid));
347 return E_NOINTERFACE;
350 IDirect3DRMLightArray_AddRef(iface);
351 return S_OK;
354 static ULONG WINAPI IDirect3DRMLightArrayImpl_AddRef(IDirect3DRMLightArray* iface)
356 IDirect3DRMLightArrayImpl *This = impl_from_IDirect3DRMLightArray(iface);
357 ULONG ref = InterlockedIncrement(&This->ref);
359 TRACE("(%p)->(): new ref = %u\n", This, ref);
361 return ref;
364 static ULONG WINAPI IDirect3DRMLightArrayImpl_Release(IDirect3DRMLightArray* iface)
366 IDirect3DRMLightArrayImpl *This = impl_from_IDirect3DRMLightArray(iface);
367 ULONG ref = InterlockedDecrement(&This->ref);
368 ULONG i;
370 TRACE("(%p)->(): new ref = %u\n", This, ref);
372 if (!ref)
374 for (i = 0; i < This->size; i++)
375 IDirect3DRMLight_Release(This->lights[i]);
376 HeapFree(GetProcessHeap(), 0, This->lights);
377 HeapFree(GetProcessHeap(), 0, This);
380 return ref;
383 /*** IDirect3DRMArray methods ***/
384 static DWORD WINAPI IDirect3DRMLightArrayImpl_GetSize(IDirect3DRMLightArray* iface)
386 IDirect3DRMLightArrayImpl *This = impl_from_IDirect3DRMLightArray(iface);
388 TRACE("(%p)->() = %d\n", This, This->size);
390 return This->size;
393 /*** IDirect3DRMLightArray methods ***/
394 static HRESULT WINAPI IDirect3DRMLightArrayImpl_GetElement(IDirect3DRMLightArray* iface, DWORD index, LPDIRECT3DRMLIGHT* light)
396 IDirect3DRMLightArrayImpl *This = impl_from_IDirect3DRMLightArray(iface);
398 TRACE("(%p)->(%u, %p)\n", This, index, light);
400 if (!light)
401 return D3DRMERR_BADVALUE;
403 *light = NULL;
405 if (index >= This->size)
406 return D3DRMERR_BADVALUE;
408 IDirect3DRMLight_AddRef(This->lights[index]);
409 *light = This->lights[index];
411 return D3DRM_OK;
414 static const struct IDirect3DRMLightArrayVtbl Direct3DRMLightArray_Vtbl =
416 /*** IUnknown methods ***/
417 IDirect3DRMLightArrayImpl_QueryInterface,
418 IDirect3DRMLightArrayImpl_AddRef,
419 IDirect3DRMLightArrayImpl_Release,
420 /*** IDirect3DRMArray methods ***/
421 IDirect3DRMLightArrayImpl_GetSize,
422 /*** IDirect3DRMLightArray methods ***/
423 IDirect3DRMLightArrayImpl_GetElement
426 static HRESULT Direct3DRMLightArray_create(IDirect3DRMLightArray** obj)
428 IDirect3DRMLightArrayImpl* object;
430 TRACE("(%p)\n", obj);
432 *obj = NULL;
434 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMLightArrayImpl));
435 if (!object)
436 return E_OUTOFMEMORY;
438 object->IDirect3DRMLightArray_iface.lpVtbl = &Direct3DRMLightArray_Vtbl;
439 object->ref = 1;
441 *obj = &object->IDirect3DRMLightArray_iface;
443 return S_OK;
446 /*** IUnknown methods ***/
447 static HRESULT WINAPI IDirect3DRMFrame2Impl_QueryInterface(IDirect3DRMFrame2* iface,
448 REFIID riid, void** object)
450 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
452 TRACE("(%p/%p)->(%s, %p)\n", iface, This, debugstr_guid(riid), object);
454 *object = NULL;
456 if(IsEqualGUID(riid, &IID_IUnknown) ||
457 IsEqualGUID(riid, &IID_IDirect3DRMFrame) ||
458 IsEqualGUID(riid, &IID_IDirect3DRMFrame2))
460 *object = &This->IDirect3DRMFrame2_iface;
462 else if(IsEqualGUID(riid, &IID_IDirect3DRMFrame3))
464 *object = &This->IDirect3DRMFrame3_iface;
466 else
468 FIXME("interface %s not implemented\n", debugstr_guid(riid));
469 return E_NOINTERFACE;
472 IDirect3DRMFrame2_AddRef(iface);
473 return S_OK;
476 static ULONG WINAPI IDirect3DRMFrame2Impl_AddRef(IDirect3DRMFrame2* iface)
478 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
479 ULONG ref = InterlockedIncrement(&This->ref);
481 TRACE("(%p)->(): new ref = %d\n", This, ref);
483 return ref;
486 static ULONG WINAPI IDirect3DRMFrame2Impl_Release(IDirect3DRMFrame2* iface)
488 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
489 ULONG ref = InterlockedDecrement(&This->ref);
490 ULONG i;
492 TRACE("(%p)->(): new ref = %d\n", This, ref);
494 if (!ref)
496 for (i = 0; i < This->nb_children; i++)
497 IDirect3DRMFrame3_Release(This->children[i]);
498 HeapFree(GetProcessHeap(), 0, This->children);
499 for (i = 0; i < This->nb_visuals; i++)
500 IDirect3DRMVisual_Release(This->visuals[i]);
501 HeapFree(GetProcessHeap(), 0, This->visuals);
502 for (i = 0; i < This->nb_lights; i++)
503 IDirect3DRMLight_Release(This->lights[i]);
504 HeapFree(GetProcessHeap(), 0, This->lights);
505 HeapFree(GetProcessHeap(), 0, This);
508 return ref;
511 /*** IDirect3DRMObject methods ***/
512 static HRESULT WINAPI IDirect3DRMFrame2Impl_Clone(IDirect3DRMFrame2* iface,
513 LPUNKNOWN unkwn, REFIID riid,
514 LPVOID* object)
516 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
518 FIXME("(%p/%p)->(%p, %s, %p): stub\n", iface, This, unkwn, debugstr_guid(riid), object);
520 return E_NOTIMPL;
523 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddDestroyCallback(IDirect3DRMFrame2* iface,
524 D3DRMOBJECTCALLBACK cb,
525 LPVOID argument)
527 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
529 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
531 return E_NOTIMPL;
534 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteDestroyCallback(IDirect3DRMFrame2* iface,
535 D3DRMOBJECTCALLBACK cb,
536 LPVOID argument)
538 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
540 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
542 return E_NOTIMPL;
545 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetAppData(IDirect3DRMFrame2* iface,
546 DWORD data)
548 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
550 FIXME("(%p/%p)->(%u): stub\n", iface, This, data);
552 return E_NOTIMPL;
555 static DWORD WINAPI IDirect3DRMFrame2Impl_GetAppData(IDirect3DRMFrame2* iface)
557 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
559 FIXME("(%p/%p)->(): stub\n", iface, This);
561 return 0;
564 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetName(IDirect3DRMFrame2* iface, LPCSTR name)
566 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
568 FIXME("(%p/%p)->(%s): stub\n", iface, This, name);
570 return E_NOTIMPL;
573 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetName(IDirect3DRMFrame2* iface,
574 LPDWORD size, LPSTR name)
576 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
578 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, size, name);
580 return E_NOTIMPL;
583 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetClassName(IDirect3DRMFrame2* iface,
584 LPDWORD size, LPSTR name)
586 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
588 TRACE("(%p/%p)->(%p, %p)\n", iface, This, size, name);
590 return IDirect3DRMFrame3_GetClassName(&This->IDirect3DRMFrame3_iface, size, name);
593 /*** IDirect3DRMFrame methods ***/
594 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddChild(IDirect3DRMFrame2* iface,
595 LPDIRECT3DRMFRAME child)
597 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
598 IDirect3DRMFrame3 *frame;
599 HRESULT hr;
601 TRACE("(%p/%p)->(%p)\n", iface, This, child);
603 if (!child)
604 return D3DRMERR_BADOBJECT;
605 hr = IDirect3DRMFrame_QueryInterface(child, &IID_IDirect3DRMFrame3, (void**)&frame);
606 if (hr != S_OK)
607 return D3DRMERR_BADOBJECT;
608 IDirect3DRMFrame_Release(child);
610 return IDirect3DRMFrame3_AddChild(&This->IDirect3DRMFrame3_iface, frame);
613 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddLight(IDirect3DRMFrame2* iface,
614 LPDIRECT3DRMLIGHT light)
616 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
618 TRACE("(%p/%p)->(%p)\n", iface, This, light);
620 return IDirect3DRMFrame3_AddLight(&This->IDirect3DRMFrame3_iface, light);
623 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddMoveCallback(IDirect3DRMFrame2* iface,
624 D3DRMFRAMEMOVECALLBACK cb, VOID *arg)
626 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
628 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, cb, arg);
630 return E_NOTIMPL;
633 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddTransform(IDirect3DRMFrame2* iface,
634 D3DRMCOMBINETYPE type,
635 D3DRMMATRIX4D matrix)
637 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
639 TRACE("(%p/%p)->(%u,%p)\n", iface, This, type, matrix);
641 return IDirect3DRMFrame3_AddTransform(&This->IDirect3DRMFrame3_iface, type, matrix);
644 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddTranslation(IDirect3DRMFrame2* iface,
645 D3DRMCOMBINETYPE type,
646 D3DVALUE x, D3DVALUE y, D3DVALUE z)
648 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
650 FIXME("(%p/%p)->(%u,%f,%f,%f): stub\n", iface, This, type, x, y, z);
652 return E_NOTIMPL;
655 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddScale(IDirect3DRMFrame2* iface,
656 D3DRMCOMBINETYPE type,
657 D3DVALUE sx, D3DVALUE sy, D3DVALUE sz)
659 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
661 FIXME("(%p/%p)->(%u,%f,%f,%f): stub\n", iface, This, type, sx, sy, sz);
663 return E_NOTIMPL;
666 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddRotation(IDirect3DRMFrame2* iface,
667 D3DRMCOMBINETYPE type,
668 D3DVALUE x, D3DVALUE y, D3DVALUE z,
669 D3DVALUE theta)
671 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
673 FIXME("(%p/%p)->(%u,%f,%f,%f,%f): stub\n", iface, This, type, x, y, z, theta);
675 return E_NOTIMPL;
678 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddVisual(IDirect3DRMFrame2* iface,
679 LPDIRECT3DRMVISUAL vis)
681 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
683 TRACE("(%p/%p)->(%p)\n", iface, This, vis);
685 return IDirect3DRMFrame3_AddVisual(&This->IDirect3DRMFrame3_iface, (LPUNKNOWN)vis);
688 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetChildren(IDirect3DRMFrame2* iface,
689 LPDIRECT3DRMFRAMEARRAY *children)
691 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
693 TRACE("(%p/%p)->(%p)\n", iface, This, children);
695 return IDirect3DRMFrame3_GetChildren(&This->IDirect3DRMFrame3_iface, children);
698 static D3DCOLOR WINAPI IDirect3DRMFrame2Impl_GetColor(IDirect3DRMFrame2* iface)
700 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
702 FIXME("(%p/%p)->(): stub\n", iface, This);
704 return 0;
707 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetLights(IDirect3DRMFrame2* iface,
708 LPDIRECT3DRMLIGHTARRAY *lights)
710 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
712 TRACE("(%p/%p)->(%p)\n", iface, This, lights);
714 return IDirect3DRMFrame3_GetLights(&This->IDirect3DRMFrame3_iface, lights);
717 static D3DRMMATERIALMODE WINAPI IDirect3DRMFrame2Impl_GetMaterialMode(IDirect3DRMFrame2* iface)
719 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
721 FIXME("(%p/%p)->(): stub\n", iface, This);
723 return D3DRMMATERIAL_FROMPARENT;
726 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetParent(IDirect3DRMFrame2* iface,
727 LPDIRECT3DRMFRAME * frame)
729 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
731 TRACE("(%p/%p)->(%p)\n", iface, This, frame);
733 if (!frame)
734 return D3DRMERR_BADVALUE;
736 if (This->parent)
738 *frame = (LPDIRECT3DRMFRAME)&This->parent->IDirect3DRMFrame2_iface;
739 IDirect3DRMFrame_AddRef(*frame);
741 else
743 *frame = NULL;
746 return D3DRM_OK;
749 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetPosition(IDirect3DRMFrame2 *iface,
750 IDirect3DRMFrame *reference, D3DVECTOR *return_position)
752 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
754 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, reference, return_position);
756 return E_NOTIMPL;
759 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetRotation(IDirect3DRMFrame2 *iface,
760 IDirect3DRMFrame *reference, D3DVECTOR *axis, D3DVALUE *return_theta)
762 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
764 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, reference, axis, return_theta);
766 return E_NOTIMPL;
769 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetScene(IDirect3DRMFrame2* iface,
770 LPDIRECT3DRMFRAME * frame)
772 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
774 FIXME("(%p/%p)->(%p): stub\n", iface, This, frame);
776 return E_NOTIMPL;
779 static D3DRMSORTMODE WINAPI IDirect3DRMFrame2Impl_GetSortMode(IDirect3DRMFrame2* iface)
781 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
783 FIXME("(%p/%p)->(): stub\n", iface, This);
785 return D3DRMSORT_FROMPARENT;
788 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetTexture(IDirect3DRMFrame2* iface,
789 LPDIRECT3DRMTEXTURE * tex)
791 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
793 FIXME("(%p/%p)->(%p): stub\n", iface, This, tex);
795 return E_NOTIMPL;
798 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetTransform(IDirect3DRMFrame2* iface,
799 D3DRMMATRIX4D return_matrix)
801 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
803 TRACE("(%p/%p)->(%p)\n", iface, This, return_matrix);
805 memcpy(return_matrix, This->transform, sizeof(D3DRMMATRIX4D));
807 return D3DRM_OK;
810 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetVelocity(IDirect3DRMFrame2 *iface,
811 IDirect3DRMFrame *reference, D3DVECTOR *return_velocity, BOOL with_rotation)
813 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
815 FIXME("(%p/%p)->(%p,%p,%d): stub\n", iface, This, reference, return_velocity, with_rotation);
817 return E_NOTIMPL;
820 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetOrientation(IDirect3DRMFrame2 *iface,
821 IDirect3DRMFrame *reference, D3DVECTOR *dir, D3DVECTOR *up)
823 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
825 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, reference, dir, up);
827 return E_NOTIMPL;
830 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetVisuals(IDirect3DRMFrame2* iface,
831 LPDIRECT3DRMVISUALARRAY *visuals)
833 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
834 IDirect3DRMVisualArrayImpl* obj;
835 HRESULT hr;
837 TRACE("(%p/%p)->(%p)\n", iface, This, visuals);
839 if (!visuals)
840 return D3DRMERR_BADVALUE;
842 hr = Direct3DRMVisualArray_create(visuals);
844 if (hr != D3DRM_OK)
845 return hr;
847 obj = (IDirect3DRMVisualArrayImpl*)*visuals;
849 obj->size = This->nb_visuals;
850 if (This->nb_visuals)
852 ULONG i;
853 obj->visuals = HeapAlloc(GetProcessHeap(), 0, This->nb_visuals * sizeof(LPDIRECT3DRMVISUAL));
854 if (!obj->visuals)
855 return E_OUTOFMEMORY;
856 for (i = 0; i < This->nb_visuals; i++)
858 obj->visuals[i] = This->visuals[i];
859 IDirect3DRMVisual_AddRef(This->visuals[i]);
863 return D3DRM_OK;
866 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetTextureTopology(IDirect3DRMFrame2* iface,
867 BOOL *wrap_u, BOOL *wrap_v)
869 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
871 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, wrap_u, wrap_v);
873 return E_NOTIMPL;
876 static HRESULT WINAPI IDirect3DRMFrame2Impl_InverseTransform(IDirect3DRMFrame2* iface,
877 D3DVECTOR *d, D3DVECTOR *s)
879 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
881 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, d, s);
883 return E_NOTIMPL;
886 static HRESULT WINAPI IDirect3DRMFrame2Impl_Load(IDirect3DRMFrame2* iface, LPVOID filename,
887 LPVOID name, D3DRMLOADOPTIONS loadflags,
888 D3DRMLOADTEXTURECALLBACK cb, LPVOID lpArg)
890 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
892 FIXME("(%p/%p)->(%p,%p,%u,%p,%p): stub\n", iface, This, filename, name, loadflags, cb, lpArg);
894 return E_NOTIMPL;
897 static HRESULT WINAPI IDirect3DRMFrame2Impl_LookAt(IDirect3DRMFrame2* iface,
898 LPDIRECT3DRMFRAME target,
899 LPDIRECT3DRMFRAME reference,
900 D3DRMFRAMECONSTRAINT constraint)
902 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
904 FIXME("(%p/%p)->(%p,%p,%u): stub\n", iface, This, target, reference, constraint);
906 return E_NOTIMPL;
909 static HRESULT WINAPI IDirect3DRMFrame2Impl_Move(IDirect3DRMFrame2* iface, D3DVALUE delta)
911 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
913 FIXME("(%p/%p)->(%f): stub\n", iface, This, delta);
915 return E_NOTIMPL;
918 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteChild(IDirect3DRMFrame2* iface,
919 LPDIRECT3DRMFRAME frame)
921 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
922 IDirect3DRMFrame3 *child;
923 HRESULT hr;
925 TRACE("(%p/%p)->(%p)\n", iface, This, frame);
927 if (!frame)
928 return D3DRMERR_BADOBJECT;
929 hr = IDirect3DRMFrame_QueryInterface(frame, &IID_IDirect3DRMFrame3, (void**)&child);
930 if (hr != S_OK)
931 return D3DRMERR_BADOBJECT;
932 IDirect3DRMFrame_Release(frame);
934 return IDirect3DRMFrame3_DeleteChild(&This->IDirect3DRMFrame3_iface, child);
937 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteLight(IDirect3DRMFrame2* iface,
938 LPDIRECT3DRMLIGHT light)
940 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
942 TRACE("(%p/%p)->(%p)\n", iface, This, light);
944 return IDirect3DRMFrame3_DeleteLight(&This->IDirect3DRMFrame3_iface, light);
947 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteMoveCallback(IDirect3DRMFrame2* iface,
948 D3DRMFRAMEMOVECALLBACK cb, VOID *arg)
950 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
952 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, cb, arg);
954 return E_NOTIMPL;
957 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteVisual(IDirect3DRMFrame2* iface,
958 LPDIRECT3DRMVISUAL vis)
960 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
962 TRACE("(%p/%p)->(%p)\n", iface, This, vis);
964 return IDirect3DRMFrame3_DeleteVisual(&This->IDirect3DRMFrame3_iface, (LPUNKNOWN)vis);
967 static D3DCOLOR WINAPI IDirect3DRMFrame2Impl_GetSceneBackground(IDirect3DRMFrame2* iface)
969 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
971 TRACE("(%p/%p)->()\n", iface, This);
973 return IDirect3DRMFrame3_GetSceneBackground(&This->IDirect3DRMFrame3_iface);
976 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetSceneBackgroundDepth(IDirect3DRMFrame2 *iface,
977 IDirectDrawSurface **surface)
979 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
981 FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
983 return E_NOTIMPL;
986 static D3DCOLOR WINAPI IDirect3DRMFrame2Impl_GetSceneFogColor(IDirect3DRMFrame2* iface)
988 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
990 FIXME("(%p/%p)->(): stub\n", iface, This);
992 return 0;
995 static BOOL WINAPI IDirect3DRMFrame2Impl_GetSceneFogEnable(IDirect3DRMFrame2* iface)
997 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
999 FIXME("(%p/%p)->(): stub\n", iface, This);
1001 return FALSE;
1004 static D3DRMFOGMODE WINAPI IDirect3DRMFrame2Impl_GetSceneFogMode(IDirect3DRMFrame2* iface)
1006 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1008 FIXME("(%p/%p)->(): stub\n", iface, This);
1010 return D3DRMFOG_LINEAR;
1013 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetSceneFogParams(IDirect3DRMFrame2* iface,
1014 D3DVALUE *return_start,
1015 D3DVALUE *return_end,
1016 D3DVALUE *return_density)
1018 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1020 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, return_start, return_end, return_density);
1022 return E_NOTIMPL;
1025 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackground(IDirect3DRMFrame2* iface,
1026 D3DCOLOR color)
1028 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1030 TRACE("(%p/%p)->(%u)\n", iface, This, color);
1032 return IDirect3DRMFrame3_SetSceneBackground(&This->IDirect3DRMFrame3_iface, color);
1035 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackgroundRGB(IDirect3DRMFrame2* iface,
1036 D3DVALUE red, D3DVALUE green,
1037 D3DVALUE blue)
1039 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1041 TRACE("(%p/%p)->(%f,%f,%f)\n", iface, This, red, green, blue);
1043 return IDirect3DRMFrame3_SetSceneBackgroundRGB(&This->IDirect3DRMFrame3_iface, red, green, blue);
1046 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackgroundDepth(IDirect3DRMFrame2 *iface,
1047 IDirectDrawSurface *surface)
1049 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1051 FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
1053 return E_NOTIMPL;
1056 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackgroundImage(IDirect3DRMFrame2* iface,
1057 LPDIRECT3DRMTEXTURE texture)
1059 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1061 FIXME("(%p/%p)->(%p): stub\n", iface, This, texture);
1063 return E_NOTIMPL;
1066 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneFogEnable(IDirect3DRMFrame2* iface, BOOL enable)
1068 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1070 FIXME("(%p/%p)->(%d): stub\n", iface, This, enable);
1072 return E_NOTIMPL;
1075 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneFogColor(IDirect3DRMFrame2* iface,
1076 D3DCOLOR color)
1078 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1080 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
1082 return E_NOTIMPL;
1085 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneFogMode(IDirect3DRMFrame2* iface,
1086 D3DRMFOGMODE mode)
1088 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1090 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
1092 return E_NOTIMPL;
1095 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneFogParams(IDirect3DRMFrame2* iface,
1096 D3DVALUE start, D3DVALUE end,
1097 D3DVALUE density)
1099 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1101 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, start, end, density);
1103 return E_NOTIMPL;
1106 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetColor(IDirect3DRMFrame2* iface, D3DCOLOR color)
1108 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1110 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
1112 return E_NOTIMPL;
1115 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetColorRGB(IDirect3DRMFrame2* iface, D3DVALUE red,
1116 D3DVALUE green, D3DVALUE blue)
1118 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1120 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, red, green, blue);
1122 return E_NOTIMPL;
1125 static D3DRMZBUFFERMODE WINAPI IDirect3DRMFrame2Impl_GetZbufferMode(IDirect3DRMFrame2* iface)
1127 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1129 FIXME("(%p/%p)->(): stub\n", iface, This);
1131 return D3DRMZBUFFER_FROMPARENT;
1134 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetMaterialMode(IDirect3DRMFrame2* iface,
1135 D3DRMMATERIALMODE mode)
1137 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1139 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
1141 return E_NOTIMPL;
1144 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetOrientation(IDirect3DRMFrame2* iface,
1145 LPDIRECT3DRMFRAME reference,
1146 D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
1147 D3DVALUE ux, D3DVALUE uy, D3DVALUE uz )
1149 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1151 FIXME("(%p/%p)->(%p,%f,%f,%f,%f,%f,%f): stub\n", iface, This, reference,
1152 dx, dy, dz, ux, uy, uz);
1154 return E_NOTIMPL;
1157 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetPosition(IDirect3DRMFrame2* iface,
1158 LPDIRECT3DRMFRAME reference,
1159 D3DVALUE x, D3DVALUE y, D3DVALUE z)
1161 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1163 FIXME("(%p/%p)->(%p,%f,%f,%f): stub\n", iface, This, reference, x, y, z);
1165 return E_NOTIMPL;
1168 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetRotation(IDirect3DRMFrame2* iface,
1169 LPDIRECT3DRMFRAME reference,
1170 D3DVALUE x, D3DVALUE y, D3DVALUE z,
1171 D3DVALUE theta)
1173 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1175 FIXME("(%p/%p)->(%p,%f,%f,%f,%f): stub\n", iface, This, reference, x, y, z, theta);
1177 return E_NOTIMPL;
1180 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSortMode(IDirect3DRMFrame2* iface,
1181 D3DRMSORTMODE mode)
1183 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1185 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
1187 return E_NOTIMPL;
1190 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetTexture(IDirect3DRMFrame2* iface,
1191 LPDIRECT3DRMTEXTURE texture)
1193 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1195 FIXME("(%p/%p)->(%p): stub\n", iface, This, texture);
1197 return E_NOTIMPL;
1200 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetTextureTopology(IDirect3DRMFrame2* iface,
1201 BOOL wrap_u, BOOL wrap_v)
1203 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1205 FIXME("(%p/%p)->(%d,%d): stub\n", iface, This, wrap_u, wrap_v);
1207 return E_NOTIMPL;
1210 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetVelocity(IDirect3DRMFrame2* iface,
1211 LPDIRECT3DRMFRAME reference,
1212 D3DVALUE x, D3DVALUE y, D3DVALUE z,
1213 BOOL with_rotation)
1215 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1217 FIXME("(%p/%p)->(%p,%f,%f,%f,%d): stub\n", iface, This, reference, x, y, z, with_rotation);
1219 return E_NOTIMPL;
1222 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetZbufferMode(IDirect3DRMFrame2* iface,
1223 D3DRMZBUFFERMODE mode)
1225 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1227 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
1229 return E_NOTIMPL;
1232 static HRESULT WINAPI IDirect3DRMFrame2Impl_Transform(IDirect3DRMFrame2* iface, D3DVECTOR *d,
1233 D3DVECTOR *s)
1235 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1237 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, d, s);
1239 return E_NOTIMPL;
1242 /*** IDirect3DRMFrame2 methods ***/
1243 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddMoveCallback2(IDirect3DRMFrame2* iface,
1244 D3DRMFRAMEMOVECALLBACK cb, VOID *arg,
1245 DWORD flags)
1247 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1249 FIXME("(%p/%p)->(%p,%p,%u): stub\n", iface, This, cb, arg, flags);
1251 return E_NOTIMPL;
1254 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetBox(IDirect3DRMFrame2 *iface, D3DRMBOX *box)
1256 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1258 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
1260 return E_NOTIMPL;
1263 static BOOL WINAPI IDirect3DRMFrame2Impl_GetBoxEnable(IDirect3DRMFrame2* iface)
1265 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1267 FIXME("(%p/%p)->(): stub\n", iface, This);
1269 return E_NOTIMPL;
1272 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetAxes(IDirect3DRMFrame2 *iface,
1273 D3DVECTOR *dir, D3DVECTOR *up)
1275 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1277 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, dir, up);
1279 return E_NOTIMPL;
1282 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetMaterial(IDirect3DRMFrame2* iface,
1283 LPDIRECT3DRMMATERIAL *material)
1285 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1287 FIXME("(%p/%p)->(%p): stub\n", iface, This, material);
1289 return E_NOTIMPL;
1292 static BOOL WINAPI IDirect3DRMFrame2Impl_GetInheritAxes(IDirect3DRMFrame2* iface)
1294 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1296 FIXME("(%p/%p)->(): stub\n", iface, This);
1298 return E_NOTIMPL;
1301 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetHierarchyBox(IDirect3DRMFrame2 *iface, D3DRMBOX *box)
1303 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1305 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
1307 return E_NOTIMPL;
1310 static const struct IDirect3DRMFrame2Vtbl Direct3DRMFrame2_Vtbl =
1312 /*** IUnknown methods ***/
1313 IDirect3DRMFrame2Impl_QueryInterface,
1314 IDirect3DRMFrame2Impl_AddRef,
1315 IDirect3DRMFrame2Impl_Release,
1316 /*** IDirect3DRMObject methods ***/
1317 IDirect3DRMFrame2Impl_Clone,
1318 IDirect3DRMFrame2Impl_AddDestroyCallback,
1319 IDirect3DRMFrame2Impl_DeleteDestroyCallback,
1320 IDirect3DRMFrame2Impl_SetAppData,
1321 IDirect3DRMFrame2Impl_GetAppData,
1322 IDirect3DRMFrame2Impl_SetName,
1323 IDirect3DRMFrame2Impl_GetName,
1324 IDirect3DRMFrame2Impl_GetClassName,
1325 /*** IDirect3DRMFrame methods ***/
1326 IDirect3DRMFrame2Impl_AddChild,
1327 IDirect3DRMFrame2Impl_AddLight,
1328 IDirect3DRMFrame2Impl_AddMoveCallback,
1329 IDirect3DRMFrame2Impl_AddTransform,
1330 IDirect3DRMFrame2Impl_AddTranslation,
1331 IDirect3DRMFrame2Impl_AddScale,
1332 IDirect3DRMFrame2Impl_AddRotation,
1333 IDirect3DRMFrame2Impl_AddVisual,
1334 IDirect3DRMFrame2Impl_GetChildren,
1335 IDirect3DRMFrame2Impl_GetColor,
1336 IDirect3DRMFrame2Impl_GetLights,
1337 IDirect3DRMFrame2Impl_GetMaterialMode,
1338 IDirect3DRMFrame2Impl_GetParent,
1339 IDirect3DRMFrame2Impl_GetPosition,
1340 IDirect3DRMFrame2Impl_GetRotation,
1341 IDirect3DRMFrame2Impl_GetScene,
1342 IDirect3DRMFrame2Impl_GetSortMode,
1343 IDirect3DRMFrame2Impl_GetTexture,
1344 IDirect3DRMFrame2Impl_GetTransform,
1345 IDirect3DRMFrame2Impl_GetVelocity,
1346 IDirect3DRMFrame2Impl_GetOrientation,
1347 IDirect3DRMFrame2Impl_GetVisuals,
1348 IDirect3DRMFrame2Impl_GetTextureTopology,
1349 IDirect3DRMFrame2Impl_InverseTransform,
1350 IDirect3DRMFrame2Impl_Load,
1351 IDirect3DRMFrame2Impl_LookAt,
1352 IDirect3DRMFrame2Impl_Move,
1353 IDirect3DRMFrame2Impl_DeleteChild,
1354 IDirect3DRMFrame2Impl_DeleteLight,
1355 IDirect3DRMFrame2Impl_DeleteMoveCallback,
1356 IDirect3DRMFrame2Impl_DeleteVisual,
1357 IDirect3DRMFrame2Impl_GetSceneBackground,
1358 IDirect3DRMFrame2Impl_GetSceneBackgroundDepth,
1359 IDirect3DRMFrame2Impl_GetSceneFogColor,
1360 IDirect3DRMFrame2Impl_GetSceneFogEnable,
1361 IDirect3DRMFrame2Impl_GetSceneFogMode,
1362 IDirect3DRMFrame2Impl_GetSceneFogParams,
1363 IDirect3DRMFrame2Impl_SetSceneBackground,
1364 IDirect3DRMFrame2Impl_SetSceneBackgroundRGB,
1365 IDirect3DRMFrame2Impl_SetSceneBackgroundDepth,
1366 IDirect3DRMFrame2Impl_SetSceneBackgroundImage,
1367 IDirect3DRMFrame2Impl_SetSceneFogEnable,
1368 IDirect3DRMFrame2Impl_SetSceneFogColor,
1369 IDirect3DRMFrame2Impl_SetSceneFogMode,
1370 IDirect3DRMFrame2Impl_SetSceneFogParams,
1371 IDirect3DRMFrame2Impl_SetColor,
1372 IDirect3DRMFrame2Impl_SetColorRGB,
1373 IDirect3DRMFrame2Impl_GetZbufferMode,
1374 IDirect3DRMFrame2Impl_SetMaterialMode,
1375 IDirect3DRMFrame2Impl_SetOrientation,
1376 IDirect3DRMFrame2Impl_SetPosition,
1377 IDirect3DRMFrame2Impl_SetRotation,
1378 IDirect3DRMFrame2Impl_SetSortMode,
1379 IDirect3DRMFrame2Impl_SetTexture,
1380 IDirect3DRMFrame2Impl_SetTextureTopology,
1381 IDirect3DRMFrame2Impl_SetVelocity,
1382 IDirect3DRMFrame2Impl_SetZbufferMode,
1383 IDirect3DRMFrame2Impl_Transform,
1384 /*** IDirect3DRMFrame2 methods ***/
1385 IDirect3DRMFrame2Impl_AddMoveCallback2,
1386 IDirect3DRMFrame2Impl_GetBox,
1387 IDirect3DRMFrame2Impl_GetBoxEnable,
1388 IDirect3DRMFrame2Impl_GetAxes,
1389 IDirect3DRMFrame2Impl_GetMaterial,
1390 IDirect3DRMFrame2Impl_GetInheritAxes,
1391 IDirect3DRMFrame2Impl_GetHierarchyBox
1394 /*** IUnknown methods ***/
1395 static HRESULT WINAPI IDirect3DRMFrame3Impl_QueryInterface(IDirect3DRMFrame3* iface,
1396 REFIID riid, void** object)
1398 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1399 return IDirect3DRMFrame_QueryInterface(&This->IDirect3DRMFrame2_iface, riid, object);
1402 static ULONG WINAPI IDirect3DRMFrame3Impl_AddRef(IDirect3DRMFrame3* iface)
1404 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1405 return IDirect3DRMFrame2_AddRef(&This->IDirect3DRMFrame2_iface);
1408 static ULONG WINAPI IDirect3DRMFrame3Impl_Release(IDirect3DRMFrame3* iface)
1410 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1411 return IDirect3DRMFrame2_Release(&This->IDirect3DRMFrame2_iface);
1414 /*** IDirect3DRMObject methods ***/
1415 static HRESULT WINAPI IDirect3DRMFrame3Impl_Clone(IDirect3DRMFrame3* iface,
1416 LPUNKNOWN unkwn, REFIID riid,
1417 LPVOID* object)
1419 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1421 FIXME("(%p/%p)->(%p, %s, %p): stub\n", iface, This, unkwn, debugstr_guid(riid), object);
1423 return E_NOTIMPL;
1426 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddDestroyCallback(IDirect3DRMFrame3* iface,
1427 D3DRMOBJECTCALLBACK cb,
1428 LPVOID argument)
1430 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1432 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
1434 return E_NOTIMPL;
1437 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteDestroyCallback(IDirect3DRMFrame3* iface,
1438 D3DRMOBJECTCALLBACK cb,
1439 LPVOID argument)
1441 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1443 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
1445 return E_NOTIMPL;
1448 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetAppData(IDirect3DRMFrame3* iface,
1449 DWORD data)
1451 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1453 FIXME("(%p/%p)->(%u): stub\n", iface, This, data);
1455 return E_NOTIMPL;
1458 static DWORD WINAPI IDirect3DRMFrame3Impl_GetAppData(IDirect3DRMFrame3* iface)
1460 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1462 FIXME("(%p/%p)->(): stub\n", iface, This);
1464 return 0;
1467 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetName(IDirect3DRMFrame3* iface, LPCSTR name)
1469 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1471 FIXME("(%p/%p)->(%s): stub\n", iface, This, name);
1473 return E_NOTIMPL;
1476 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetName(IDirect3DRMFrame3* iface,
1477 LPDWORD size, LPSTR name)
1479 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1481 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, size, name);
1483 return E_NOTIMPL;
1486 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetClassName(IDirect3DRMFrame3* iface,
1487 LPDWORD size, LPSTR name)
1489 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1491 TRACE("(%p/%p)->(%p, %p)\n", iface, This, size, name);
1493 if (!size || *size < strlen("Frame") || !name)
1494 return E_INVALIDARG;
1496 strcpy(name, "Frame");
1497 *size = sizeof("Frame");
1499 return D3DRM_OK;
1502 /*** IDirect3DRMFrame methods ***/
1503 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddChild(IDirect3DRMFrame3* iface,
1504 LPDIRECT3DRMFRAME3 child)
1506 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1507 IDirect3DRMFrameImpl *child_obj = unsafe_impl_from_IDirect3DRMFrame3(child);
1509 TRACE("(%p/%p)->(%p)\n", iface, This, child);
1511 if (!child_obj)
1512 return D3DRMERR_BADOBJECT;
1514 if (child_obj->parent)
1516 IDirect3DRMFrame3* parent = &child_obj->parent->IDirect3DRMFrame3_iface;
1518 if (parent == iface)
1520 /* Passed frame is already a child so return success */
1521 return D3DRM_OK;
1523 else
1525 /* Remove parent and continue */
1526 IDirect3DRMFrame3_DeleteChild(parent, child);
1530 if ((This->nb_children + 1) > This->children_capacity)
1532 ULONG new_capacity;
1533 IDirect3DRMFrame3** children;
1535 if (!This->children_capacity)
1537 new_capacity = 16;
1538 children = HeapAlloc(GetProcessHeap(), 0, new_capacity * sizeof(IDirect3DRMFrame3*));
1540 else
1542 new_capacity = This->children_capacity * 2;
1543 children = HeapReAlloc(GetProcessHeap(), 0, This->children, new_capacity * sizeof(IDirect3DRMFrame3*));
1546 if (!children)
1547 return E_OUTOFMEMORY;
1549 This->children_capacity = new_capacity;
1550 This->children = children;
1553 This->children[This->nb_children++] = child;
1554 IDirect3DRMFrame3_AddRef(child);
1555 child_obj->parent = This;
1557 return D3DRM_OK;
1560 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddLight(IDirect3DRMFrame3* iface,
1561 LPDIRECT3DRMLIGHT light)
1563 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1564 ULONG i;
1565 IDirect3DRMLight** lights;
1567 TRACE("(%p/%p)->(%p)\n", iface, This, light);
1569 if (!light)
1570 return D3DRMERR_BADOBJECT;
1572 /* Check if already existing and return gracefully without increasing ref count */
1573 for (i = 0; i < This->nb_lights; i++)
1574 if (This->lights[i] == light)
1575 return D3DRM_OK;
1577 if ((This->nb_lights + 1) > This->lights_capacity)
1579 ULONG new_capacity;
1581 if (!This->lights_capacity)
1583 new_capacity = 16;
1584 lights = HeapAlloc(GetProcessHeap(), 0, new_capacity * sizeof(IDirect3DRMLight*));
1586 else
1588 new_capacity = This->lights_capacity * 2;
1589 lights = HeapReAlloc(GetProcessHeap(), 0, This->lights, new_capacity * sizeof(IDirect3DRMLight*));
1592 if (!lights)
1593 return E_OUTOFMEMORY;
1595 This->lights_capacity = new_capacity;
1596 This->lights = lights;
1599 This->lights[This->nb_lights++] = light;
1600 IDirect3DRMLight_AddRef(light);
1602 return D3DRM_OK;
1605 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddMoveCallback(IDirect3DRMFrame3* iface,
1606 D3DRMFRAME3MOVECALLBACK cb, VOID *arg,
1607 DWORD flags)
1609 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1611 FIXME("(%p/%p)->(%p,%p,%u): stub\n", iface, This, cb, arg, flags);
1613 return E_NOTIMPL;
1616 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddTransform(IDirect3DRMFrame3* iface,
1617 D3DRMCOMBINETYPE type,
1618 D3DRMMATRIX4D matrix)
1620 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1622 TRACE("(%p/%p)->(%u,%p)\n", iface, This, type, matrix);
1624 switch (type)
1626 case D3DRMCOMBINE_REPLACE:
1627 memcpy(This->transform, matrix, sizeof(D3DRMMATRIX4D));
1628 break;
1630 case D3DRMCOMBINE_BEFORE:
1631 FIXME("D3DRMCOMBINE_BEFORE not supported yed\n");
1632 break;
1634 case D3DRMCOMBINE_AFTER:
1635 FIXME("D3DRMCOMBINE_AFTER not supported yed\n");
1636 break;
1638 default:
1639 WARN("Unknown Combine Type %u\n", type);
1640 return D3DRMERR_BADVALUE;
1643 return S_OK;
1646 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddTranslation(IDirect3DRMFrame3* iface,
1647 D3DRMCOMBINETYPE type,
1648 D3DVALUE x, D3DVALUE y, D3DVALUE z)
1650 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1652 FIXME("(%p/%p)->(%u,%f,%f,%f): stub\n", iface, This, type, x, y, z);
1654 return E_NOTIMPL;
1657 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddScale(IDirect3DRMFrame3* iface,
1658 D3DRMCOMBINETYPE type,
1659 D3DVALUE sx, D3DVALUE sy, D3DVALUE sz)
1661 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1663 FIXME("(%p/%p)->(%u,%f,%f,%f): stub\n", iface, This, type, sx, sy, sz);
1665 return E_NOTIMPL;
1668 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddRotation(IDirect3DRMFrame3* iface,
1669 D3DRMCOMBINETYPE type,
1670 D3DVALUE x, D3DVALUE y, D3DVALUE z,
1671 D3DVALUE theta)
1673 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1675 FIXME("(%p/%p)->(%u,%f,%f,%f,%f): stub\n", iface, This, type, x, y, z, theta);
1677 return E_NOTIMPL;
1680 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddVisual(IDirect3DRMFrame3* iface, LPUNKNOWN vis)
1682 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1683 ULONG i;
1684 IDirect3DRMVisual** visuals;
1686 TRACE("(%p/%p)->(%p)\n", iface, This, vis);
1688 if (!vis)
1689 return D3DRMERR_BADOBJECT;
1691 /* Check if already existing and return gracefully without increasing ref count */
1692 for (i = 0; i < This->nb_visuals; i++)
1693 if (This->visuals[i] == (IDirect3DRMVisual*)vis)
1694 return D3DRM_OK;
1696 if ((This->nb_visuals + 1) > This->visuals_capacity)
1698 ULONG new_capacity;
1700 if (!This->visuals_capacity)
1702 new_capacity = 16;
1703 visuals = HeapAlloc(GetProcessHeap(), 0, new_capacity * sizeof(IDirect3DRMVisual*));
1705 else
1707 new_capacity = This->visuals_capacity * 2;
1708 visuals = HeapReAlloc(GetProcessHeap(), 0, This->visuals, new_capacity * sizeof(IDirect3DRMVisual*));
1711 if (!visuals)
1712 return E_OUTOFMEMORY;
1714 This->visuals_capacity = new_capacity;
1715 This->visuals = visuals;
1718 This->visuals[This->nb_visuals++] = (IDirect3DRMVisual*)vis;
1719 IDirect3DRMVisual_AddRef(vis);
1721 return D3DRM_OK;
1724 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetChildren(IDirect3DRMFrame3* iface,
1725 LPDIRECT3DRMFRAMEARRAY *children)
1727 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1728 IDirect3DRMFrameArrayImpl* obj;
1729 HRESULT hr;
1731 TRACE("(%p/%p)->(%p)\n", iface, This, children);
1733 if (!children)
1734 return D3DRMERR_BADVALUE;
1736 hr = Direct3DRMFrameArray_create(children);
1738 if (hr != D3DRM_OK)
1739 return hr;
1741 obj = (IDirect3DRMFrameArrayImpl*)*children;
1743 obj->size = This->nb_children;
1744 if (This->nb_children)
1746 ULONG i;
1747 obj->frames = HeapAlloc(GetProcessHeap(), 0, This->nb_children * sizeof(LPDIRECT3DRMFRAME));
1748 if (!obj->frames)
1749 return E_OUTOFMEMORY;
1750 for (i = 0; i < This->nb_children; i++)
1751 IDirect3DRMFrame3_QueryInterface(This->children[i], &IID_IDirect3DRMFrame, (void**)&obj->frames[i]);
1754 return D3DRM_OK;
1757 static D3DCOLOR WINAPI IDirect3DRMFrame3Impl_GetColor(IDirect3DRMFrame3* iface)
1759 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1761 FIXME("(%p/%p)->(): stub\n", iface, This);
1763 return 0;
1766 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetLights(IDirect3DRMFrame3* iface,
1767 LPDIRECT3DRMLIGHTARRAY *lights)
1769 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1770 IDirect3DRMLightArrayImpl* obj;
1771 HRESULT hr;
1773 TRACE("(%p/%p)->(%p)\n", iface, This, lights);
1775 if (!lights)
1776 return D3DRMERR_BADVALUE;
1778 hr = Direct3DRMLightArray_create(lights);
1780 if (hr != D3DRM_OK)
1781 return hr;
1783 obj = (IDirect3DRMLightArrayImpl*)*lights;
1785 obj->size = This->nb_lights;
1786 if (This->nb_lights)
1788 ULONG i;
1789 obj->lights = HeapAlloc(GetProcessHeap(), 0, This->nb_lights * sizeof(LPDIRECT3DRMLIGHT));
1790 if (!obj->lights)
1791 return E_OUTOFMEMORY;
1792 for (i = 0; i < This->nb_lights; i++)
1793 IDirect3DRMLight_QueryInterface(This->lights[i], &IID_IDirect3DRMLight, (void**)&obj->lights[i]);
1796 return D3DRM_OK;
1799 static D3DRMMATERIALMODE WINAPI IDirect3DRMFrame3Impl_GetMaterialMode(IDirect3DRMFrame3* iface)
1801 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1803 FIXME("(%p/%p)->(): stub\n", iface, This);
1805 return D3DRMMATERIAL_FROMPARENT;
1808 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetParent(IDirect3DRMFrame3* iface,
1809 LPDIRECT3DRMFRAME3 * frame)
1811 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1813 TRACE("(%p/%p)->(%p)\n", iface, This, frame);
1815 if (!frame)
1816 return D3DRMERR_BADVALUE;
1818 if (This->parent)
1820 *frame = &This->parent->IDirect3DRMFrame3_iface;
1821 IDirect3DRMFrame_AddRef(*frame);
1823 else
1825 *frame = NULL;
1828 return D3DRM_OK;
1831 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetPosition(IDirect3DRMFrame3 *iface,
1832 IDirect3DRMFrame3 *reference, D3DVECTOR *return_position)
1834 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1836 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, reference, return_position);
1838 return E_NOTIMPL;
1841 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetRotation(IDirect3DRMFrame3 *iface,
1842 IDirect3DRMFrame3 *reference, D3DVECTOR *axis, D3DVALUE *return_theta)
1844 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1846 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, reference, axis, return_theta);
1848 return E_NOTIMPL;
1851 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetScene(IDirect3DRMFrame3* iface,
1852 LPDIRECT3DRMFRAME3 * frame)
1854 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1856 FIXME("(%p/%p)->(%p): stub\n", iface, This, frame);
1858 return E_NOTIMPL;
1861 static D3DRMSORTMODE WINAPI IDirect3DRMFrame3Impl_GetSortMode(IDirect3DRMFrame3* iface)
1863 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1865 FIXME("(%p/%p)->(): stub\n", iface, This);
1867 return D3DRMSORT_FROMPARENT;
1870 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetTexture(IDirect3DRMFrame3* iface,
1871 LPDIRECT3DRMTEXTURE3 * tex)
1873 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1875 FIXME("(%p/%p)->(%p): stub\n", iface, This, tex);
1877 return E_NOTIMPL;
1880 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetTransform(IDirect3DRMFrame3* iface,
1881 LPDIRECT3DRMFRAME3 reference,
1882 D3DRMMATRIX4D return_matrix)
1884 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1886 TRACE("(%p/%p)->(%p,%p)\n", iface, This, reference, return_matrix);
1888 if (reference)
1889 FIXME("Specifying a frame as the root of the scene different from the current root frame is not supported yet\n");
1891 memcpy(return_matrix, This->transform, sizeof(D3DRMMATRIX4D));
1893 return D3DRM_OK;
1896 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetVelocity(IDirect3DRMFrame3 *iface,
1897 IDirect3DRMFrame3 *reference, D3DVECTOR *return_velocity, BOOL with_rotation)
1899 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1901 FIXME("(%p/%p)->(%p,%p,%d): stub\n", iface, This, reference, return_velocity, with_rotation);
1903 return E_NOTIMPL;
1906 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetOrientation(IDirect3DRMFrame3 *iface,
1907 IDirect3DRMFrame3 *reference, D3DVECTOR *dir, D3DVECTOR *up)
1909 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1911 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, reference, dir, up);
1913 return E_NOTIMPL;
1916 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetVisuals(IDirect3DRMFrame3* iface, LPDWORD num,
1917 LPUNKNOWN *visuals)
1919 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1921 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, num, visuals);
1923 return E_NOTIMPL;
1926 static HRESULT WINAPI IDirect3DRMFrame3Impl_InverseTransform(IDirect3DRMFrame3* iface,
1927 D3DVECTOR *d, D3DVECTOR *s)
1929 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1931 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, d, s);
1933 return E_NOTIMPL;
1936 static HRESULT WINAPI IDirect3DRMFrame3Impl_Load(IDirect3DRMFrame3* iface, LPVOID filename,
1937 LPVOID name, D3DRMLOADOPTIONS loadflags,
1938 D3DRMLOADTEXTURE3CALLBACK cb, LPVOID lpArg)
1940 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1942 FIXME("(%p/%p)->(%p,%p,%u,%p,%p): stub\n", iface, This, filename, name, loadflags, cb, lpArg);
1944 return E_NOTIMPL;
1947 static HRESULT WINAPI IDirect3DRMFrame3Impl_LookAt(IDirect3DRMFrame3* iface,
1948 LPDIRECT3DRMFRAME3 target,
1949 LPDIRECT3DRMFRAME3 reference,
1950 D3DRMFRAMECONSTRAINT constraint)
1952 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1954 FIXME("(%p/%p)->(%p,%p,%u): stub\n", iface, This, target, reference, constraint);
1956 return E_NOTIMPL;
1959 static HRESULT WINAPI IDirect3DRMFrame3Impl_Move(IDirect3DRMFrame3* iface, D3DVALUE delta)
1961 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1963 FIXME("(%p/%p)->(%f): stub\n", iface, This, delta);
1965 return E_NOTIMPL;
1968 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteChild(IDirect3DRMFrame3* iface,
1969 LPDIRECT3DRMFRAME3 frame)
1971 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1972 IDirect3DRMFrameImpl *frame_obj = unsafe_impl_from_IDirect3DRMFrame3(frame);
1973 ULONG i;
1975 TRACE("(%p/%p)->(%p)\n", iface, This, frame);
1977 if (!frame_obj)
1978 return D3DRMERR_BADOBJECT;
1980 /* Check if child exists */
1981 for (i = 0; i < This->nb_children; i++)
1982 if (This->children[i] == frame)
1983 break;
1985 if (i == This->nb_children)
1986 return D3DRMERR_BADVALUE;
1988 memmove(This->children + i, This->children + i + 1, sizeof(IDirect3DRMFrame3*) * (This->nb_children - 1 - i));
1989 IDirect3DRMFrame3_Release(frame);
1990 frame_obj->parent = NULL;
1991 This->nb_children--;
1993 return D3DRM_OK;
1996 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteLight(IDirect3DRMFrame3* iface,
1997 LPDIRECT3DRMLIGHT light)
1999 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2000 ULONG i;
2002 TRACE("(%p/%p)->(%p)\n", iface, This, light);
2004 if (!light)
2005 return D3DRMERR_BADOBJECT;
2007 /* Check if visual exists */
2008 for (i = 0; i < This->nb_lights; i++)
2009 if (This->lights[i] == light)
2010 break;
2012 if (i == This->nb_lights)
2013 return D3DRMERR_BADVALUE;
2015 memmove(This->lights + i, This->lights + i + 1, sizeof(IDirect3DRMLight*) * (This->nb_lights - 1 - i));
2016 IDirect3DRMLight_Release(light);
2017 This->nb_lights--;
2019 return D3DRM_OK;
2022 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteMoveCallback(IDirect3DRMFrame3* iface,
2023 D3DRMFRAME3MOVECALLBACK cb,
2024 VOID *arg)
2026 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2028 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, cb, arg);
2030 return E_NOTIMPL;
2033 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteVisual(IDirect3DRMFrame3* iface, LPUNKNOWN vis)
2035 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2036 ULONG i;
2038 TRACE("(%p/%p)->(%p)\n", iface, This, vis);
2040 if (!vis)
2041 return D3DRMERR_BADOBJECT;
2043 /* Check if visual exists */
2044 for (i = 0; i < This->nb_visuals; i++)
2045 if (This->visuals[i] == (IDirect3DRMVisual*)vis)
2046 break;
2048 if (i == This->nb_visuals)
2049 return D3DRMERR_BADVALUE;
2051 memmove(This->visuals + i, This->visuals + i + 1, sizeof(IDirect3DRMVisual*) * (This->nb_visuals - 1 - i));
2052 IDirect3DRMVisual_Release(vis);
2053 This->nb_visuals--;
2055 return D3DRM_OK;
2058 static D3DCOLOR WINAPI IDirect3DRMFrame3Impl_GetSceneBackground(IDirect3DRMFrame3* iface)
2060 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2062 TRACE("(%p/%p)->()\n", iface, This);
2064 return This->scenebackground;
2067 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetSceneBackgroundDepth(IDirect3DRMFrame3 *iface,
2068 IDirectDrawSurface **surface)
2070 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2072 FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
2074 return E_NOTIMPL;
2077 static D3DCOLOR WINAPI IDirect3DRMFrame3Impl_GetSceneFogColor(IDirect3DRMFrame3* iface)
2079 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2081 FIXME("(%p/%p)->(): stub\n", iface, This);
2083 return 0;
2086 static BOOL WINAPI IDirect3DRMFrame3Impl_GetSceneFogEnable(IDirect3DRMFrame3* iface)
2088 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2090 FIXME("(%p/%p)->(): stub\n", iface, This);
2092 return FALSE;
2095 static D3DRMFOGMODE WINAPI IDirect3DRMFrame3Impl_GetSceneFogMode(IDirect3DRMFrame3* iface)
2097 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2099 FIXME("(%p/%p)->(): stub\n", iface, This);
2101 return D3DRMFOG_LINEAR;
2104 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetSceneFogParams(IDirect3DRMFrame3* iface,
2105 D3DVALUE *return_start,
2106 D3DVALUE *return_end,
2107 D3DVALUE *return_density)
2109 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2111 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, return_start, return_end, return_density);
2113 return E_NOTIMPL;
2116 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackground(IDirect3DRMFrame3* iface,
2117 D3DCOLOR color)
2119 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2121 TRACE("(%p/%p)->(%u)\n", iface, This, color);
2123 This->scenebackground = color;
2125 return D3DRM_OK;
2128 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackgroundRGB(IDirect3DRMFrame3* iface,
2129 D3DVALUE red, D3DVALUE green,
2130 D3DVALUE blue)
2132 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2134 TRACE("(%p/%p)->(%f,%f,%f)\n", iface, This, red, green, blue);
2136 This->scenebackground = D3DCOLOR_ARGB(0xff, (BYTE)(red * 255.0f),
2137 (BYTE)(green * 255.0f),
2138 (BYTE)(blue * 255.0f));
2140 return D3DRM_OK;
2143 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackgroundDepth(IDirect3DRMFrame3 *iface,
2144 IDirectDrawSurface *surface)
2146 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2148 FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
2150 return E_NOTIMPL;
2153 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackgroundImage(IDirect3DRMFrame3* iface,
2154 LPDIRECT3DRMTEXTURE3 texture)
2156 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2158 FIXME("(%p/%p)->(%p): stub\n", iface, This, texture);
2160 return E_NOTIMPL;
2163 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogEnable(IDirect3DRMFrame3* iface, BOOL enable)
2165 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2167 FIXME("(%p/%p)->(%d): stub\n", iface, This, enable);
2169 return E_NOTIMPL;
2172 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogColor(IDirect3DRMFrame3* iface,
2173 D3DCOLOR color)
2175 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2177 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
2179 return E_NOTIMPL;
2182 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogMode(IDirect3DRMFrame3* iface,
2183 D3DRMFOGMODE mode)
2185 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2187 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
2189 return E_NOTIMPL;
2192 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogParams(IDirect3DRMFrame3* iface,
2193 D3DVALUE start, D3DVALUE end,
2194 D3DVALUE density)
2196 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2198 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, start, end, density);
2200 return E_NOTIMPL;
2203 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetColor(IDirect3DRMFrame3* iface, D3DCOLOR color)
2205 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2207 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
2209 return E_NOTIMPL;
2212 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetColorRGB(IDirect3DRMFrame3* iface, D3DVALUE red,
2213 D3DVALUE green, D3DVALUE blue)
2215 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2217 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, red, green, blue);
2219 return E_NOTIMPL;
2222 static D3DRMZBUFFERMODE WINAPI IDirect3DRMFrame3Impl_GetZbufferMode(IDirect3DRMFrame3* iface)
2224 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2226 FIXME("(%p/%p)->(): stub\n", iface, This);
2228 return D3DRMZBUFFER_FROMPARENT;
2231 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetMaterialMode(IDirect3DRMFrame3* iface,
2232 D3DRMMATERIALMODE mode)
2234 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2236 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
2238 return E_NOTIMPL;
2241 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetOrientation(IDirect3DRMFrame3* iface,
2242 LPDIRECT3DRMFRAME3 reference,
2243 D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
2244 D3DVALUE ux, D3DVALUE uy, D3DVALUE uz )
2246 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2248 FIXME("(%p/%p)->(%p,%f,%f,%f,%f,%f,%f): stub\n", iface, This, reference,
2249 dx, dy, dz, ux, uy, uz);
2251 return E_NOTIMPL;
2254 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetPosition(IDirect3DRMFrame3* iface,
2255 LPDIRECT3DRMFRAME3 reference,
2256 D3DVALUE x, D3DVALUE y, D3DVALUE z)
2258 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2260 FIXME("(%p/%p)->(%p,%f,%f,%f): stub\n", iface, This, reference, x, y, z);
2262 return E_NOTIMPL;
2265 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetRotation(IDirect3DRMFrame3* iface,
2266 LPDIRECT3DRMFRAME3 reference,
2267 D3DVALUE x, D3DVALUE y, D3DVALUE z,
2268 D3DVALUE theta)
2270 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2272 FIXME("(%p/%p)->(%p,%f,%f,%f,%f): stub\n", iface, This, reference, x, y, z, theta);
2274 return E_NOTIMPL;
2277 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSortMode(IDirect3DRMFrame3* iface,
2278 D3DRMSORTMODE mode)
2280 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2282 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
2284 return E_NOTIMPL;
2287 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetTexture(IDirect3DRMFrame3* iface,
2288 LPDIRECT3DRMTEXTURE3 texture)
2290 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2292 FIXME("(%p/%p)->(%p): stub\n", iface, This, texture);
2294 return E_NOTIMPL;
2297 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetVelocity(IDirect3DRMFrame3* iface,
2298 LPDIRECT3DRMFRAME3 reference,
2299 D3DVALUE x, D3DVALUE y, D3DVALUE z,
2300 BOOL with_rotation)
2302 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2304 FIXME("(%p/%p)->(%p,%f,%f,%f,%d): stub\n", iface, This, reference, x, y, z, with_rotation);
2306 return E_NOTIMPL;
2309 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetZbufferMode(IDirect3DRMFrame3* iface,
2310 D3DRMZBUFFERMODE mode)
2312 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2314 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
2316 return E_NOTIMPL;
2319 static HRESULT WINAPI IDirect3DRMFrame3Impl_Transform(IDirect3DRMFrame3* iface, D3DVECTOR *d,
2320 D3DVECTOR *s)
2322 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2324 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, d, s);
2326 return E_NOTIMPL;
2329 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetBox(IDirect3DRMFrame3 *iface, D3DRMBOX *box)
2331 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2333 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
2335 return E_NOTIMPL;
2338 static BOOL WINAPI IDirect3DRMFrame3Impl_GetBoxEnable(IDirect3DRMFrame3* iface)
2340 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2342 FIXME("(%p/%p)->(): stub\n", iface, This);
2344 return E_NOTIMPL;
2347 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetAxes(IDirect3DRMFrame3 *iface, D3DVECTOR *dir, D3DVECTOR *up)
2349 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2351 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, dir, up);
2353 return E_NOTIMPL;
2356 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetMaterial(IDirect3DRMFrame3* iface,
2357 LPDIRECT3DRMMATERIAL2 *material)
2359 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2361 FIXME("(%p/%p)->(%p): stub\n", iface, This, material);
2363 return E_NOTIMPL;
2366 static BOOL WINAPI IDirect3DRMFrame3Impl_GetInheritAxes(IDirect3DRMFrame3* iface)
2368 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2370 FIXME("(%p/%p)->(): stub\n", iface, This);
2372 return E_NOTIMPL;
2375 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetHierarchyBox(IDirect3DRMFrame3* iface, D3DRMBOX *box)
2377 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2379 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
2381 return E_NOTIMPL;
2384 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetBox(IDirect3DRMFrame3 *iface, D3DRMBOX *box)
2386 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2388 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
2390 return E_NOTIMPL;
2393 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetBoxEnable(IDirect3DRMFrame3* iface, BOOL enable)
2395 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2397 FIXME("(%p/%p)->(%u): stub\n", iface, This, enable);
2399 return E_NOTIMPL;
2402 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetAxes(IDirect3DRMFrame3* iface,
2403 D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
2404 D3DVALUE ux, D3DVALUE uy, D3DVALUE uz)
2406 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2408 FIXME("(%p/%p)->(%f,%f,%f,%f,%f,%f): stub\n", iface, This, dx, dy, dz, ux, uy, uz);
2410 return E_NOTIMPL;
2413 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetInheritAxes(IDirect3DRMFrame3* iface,
2414 BOOL inherit_from_parent)
2416 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2418 FIXME("(%p/%p)->(%u): stub\n", iface, This, inherit_from_parent);
2420 return E_NOTIMPL;
2423 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetMaterial(IDirect3DRMFrame3* iface,
2424 LPDIRECT3DRMMATERIAL2 material)
2426 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2428 FIXME("(%p/%p)->(%p): stub\n", iface, This, material);
2430 return E_NOTIMPL;
2433 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetQuaternion(IDirect3DRMFrame3* iface,
2434 LPDIRECT3DRMFRAME3 reference,
2435 D3DRMQUATERNION *q)
2437 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2439 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, reference, q);
2441 return E_NOTIMPL;
2444 static HRESULT WINAPI IDirect3DRMFrame3Impl_RayPick(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 *reference,
2445 D3DRMRAY *ray, DWORD flags, IDirect3DRMPicked2Array **return_visuals)
2447 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2449 FIXME("(%p/%p)->(%p,%p,%u,%p): stub\n", iface, This, reference, ray, flags, return_visuals);
2451 return E_NOTIMPL;
2454 static HRESULT WINAPI IDirect3DRMFrame3Impl_Save(IDirect3DRMFrame3* iface, LPCSTR filename,
2455 D3DRMXOFFORMAT d3dFormat,
2456 D3DRMSAVEOPTIONS d3dSaveFlags)
2458 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2460 FIXME("(%p/%p)->(%p,%u,%u): stub\n", iface, This, filename, d3dFormat, d3dSaveFlags);
2462 return E_NOTIMPL;
2465 static HRESULT WINAPI IDirect3DRMFrame3Impl_TransformVectors(IDirect3DRMFrame3 *iface,
2466 IDirect3DRMFrame3 *reference, DWORD num, D3DVECTOR *dst, D3DVECTOR *src)
2468 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2470 FIXME("(%p/%p)->(%p,%u,%p,%p): stub\n", iface, This, reference, num, dst, src);
2472 return E_NOTIMPL;
2475 static HRESULT WINAPI IDirect3DRMFrame3Impl_InverseTransformVectors(IDirect3DRMFrame3 *iface,
2476 IDirect3DRMFrame3 *reference, DWORD num, D3DVECTOR *dst, D3DVECTOR *src)
2478 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2480 FIXME("(%p/%p)->(%p,%u,%p,%p): stub\n", iface, This, reference, num, dst, src);
2482 return E_NOTIMPL;
2485 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetTraversalOptions(IDirect3DRMFrame3* iface,
2486 DWORD flags)
2488 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2490 FIXME("(%p/%p)->(%u): stub\n", iface, This, flags);
2492 return E_NOTIMPL;
2495 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetTraversalOptions(IDirect3DRMFrame3* iface,
2496 LPDWORD flags)
2498 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2500 FIXME("(%p/%p)->(%p): stub\n", iface, This, flags);
2502 return E_NOTIMPL;
2505 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogMethod(IDirect3DRMFrame3* iface,
2506 DWORD flags)
2508 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2510 FIXME("(%p/%p)->(%u): stub\n", iface, This, flags);
2512 return E_NOTIMPL;
2515 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetSceneFogMethod(IDirect3DRMFrame3* iface,
2516 LPDWORD flags)
2518 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2520 FIXME("(%p/%p)->(%p): stub\n", iface, This, flags);
2522 return E_NOTIMPL;
2525 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetMaterialOverride(IDirect3DRMFrame3 *iface,
2526 D3DRMMATERIALOVERRIDE *override)
2528 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2530 FIXME("(%p/%p)->(%p): stub\n", iface, This, override);
2532 return E_NOTIMPL;
2535 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetMaterialOverride(IDirect3DRMFrame3 *iface,
2536 D3DRMMATERIALOVERRIDE *override)
2538 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2540 FIXME("(%p/%p)->(%p): stub\n", iface, This, override);
2542 return E_NOTIMPL;
2545 static const struct IDirect3DRMFrame3Vtbl Direct3DRMFrame3_Vtbl =
2547 /*** IUnknown methods ***/
2548 IDirect3DRMFrame3Impl_QueryInterface,
2549 IDirect3DRMFrame3Impl_AddRef,
2550 IDirect3DRMFrame3Impl_Release,
2551 /*** IDirect3DRMObject methods ***/
2552 IDirect3DRMFrame3Impl_Clone,
2553 IDirect3DRMFrame3Impl_AddDestroyCallback,
2554 IDirect3DRMFrame3Impl_DeleteDestroyCallback,
2555 IDirect3DRMFrame3Impl_SetAppData,
2556 IDirect3DRMFrame3Impl_GetAppData,
2557 IDirect3DRMFrame3Impl_SetName,
2558 IDirect3DRMFrame3Impl_GetName,
2559 IDirect3DRMFrame3Impl_GetClassName,
2560 /*** IDirect3DRMFrame3 methods ***/
2561 IDirect3DRMFrame3Impl_AddChild,
2562 IDirect3DRMFrame3Impl_AddLight,
2563 IDirect3DRMFrame3Impl_AddMoveCallback,
2564 IDirect3DRMFrame3Impl_AddTransform,
2565 IDirect3DRMFrame3Impl_AddTranslation,
2566 IDirect3DRMFrame3Impl_AddScale,
2567 IDirect3DRMFrame3Impl_AddRotation,
2568 IDirect3DRMFrame3Impl_AddVisual,
2569 IDirect3DRMFrame3Impl_GetChildren,
2570 IDirect3DRMFrame3Impl_GetColor,
2571 IDirect3DRMFrame3Impl_GetLights,
2572 IDirect3DRMFrame3Impl_GetMaterialMode,
2573 IDirect3DRMFrame3Impl_GetParent,
2574 IDirect3DRMFrame3Impl_GetPosition,
2575 IDirect3DRMFrame3Impl_GetRotation,
2576 IDirect3DRMFrame3Impl_GetScene,
2577 IDirect3DRMFrame3Impl_GetSortMode,
2578 IDirect3DRMFrame3Impl_GetTexture,
2579 IDirect3DRMFrame3Impl_GetTransform,
2580 IDirect3DRMFrame3Impl_GetVelocity,
2581 IDirect3DRMFrame3Impl_GetOrientation,
2582 IDirect3DRMFrame3Impl_GetVisuals,
2583 IDirect3DRMFrame3Impl_InverseTransform,
2584 IDirect3DRMFrame3Impl_Load,
2585 IDirect3DRMFrame3Impl_LookAt,
2586 IDirect3DRMFrame3Impl_Move,
2587 IDirect3DRMFrame3Impl_DeleteChild,
2588 IDirect3DRMFrame3Impl_DeleteLight,
2589 IDirect3DRMFrame3Impl_DeleteMoveCallback,
2590 IDirect3DRMFrame3Impl_DeleteVisual,
2591 IDirect3DRMFrame3Impl_GetSceneBackground,
2592 IDirect3DRMFrame3Impl_GetSceneBackgroundDepth,
2593 IDirect3DRMFrame3Impl_GetSceneFogColor,
2594 IDirect3DRMFrame3Impl_GetSceneFogEnable,
2595 IDirect3DRMFrame3Impl_GetSceneFogMode,
2596 IDirect3DRMFrame3Impl_GetSceneFogParams,
2597 IDirect3DRMFrame3Impl_SetSceneBackground,
2598 IDirect3DRMFrame3Impl_SetSceneBackgroundRGB,
2599 IDirect3DRMFrame3Impl_SetSceneBackgroundDepth,
2600 IDirect3DRMFrame3Impl_SetSceneBackgroundImage,
2601 IDirect3DRMFrame3Impl_SetSceneFogEnable,
2602 IDirect3DRMFrame3Impl_SetSceneFogColor,
2603 IDirect3DRMFrame3Impl_SetSceneFogMode,
2604 IDirect3DRMFrame3Impl_SetSceneFogParams,
2605 IDirect3DRMFrame3Impl_SetColor,
2606 IDirect3DRMFrame3Impl_SetColorRGB,
2607 IDirect3DRMFrame3Impl_GetZbufferMode,
2608 IDirect3DRMFrame3Impl_SetMaterialMode,
2609 IDirect3DRMFrame3Impl_SetOrientation,
2610 IDirect3DRMFrame3Impl_SetPosition,
2611 IDirect3DRMFrame3Impl_SetRotation,
2612 IDirect3DRMFrame3Impl_SetSortMode,
2613 IDirect3DRMFrame3Impl_SetTexture,
2614 IDirect3DRMFrame3Impl_SetVelocity,
2615 IDirect3DRMFrame3Impl_SetZbufferMode,
2616 IDirect3DRMFrame3Impl_Transform,
2617 IDirect3DRMFrame3Impl_GetBox,
2618 IDirect3DRMFrame3Impl_GetBoxEnable,
2619 IDirect3DRMFrame3Impl_GetAxes,
2620 IDirect3DRMFrame3Impl_GetMaterial,
2621 IDirect3DRMFrame3Impl_GetInheritAxes,
2622 IDirect3DRMFrame3Impl_GetHierarchyBox,
2623 IDirect3DRMFrame3Impl_SetBox,
2624 IDirect3DRMFrame3Impl_SetBoxEnable,
2625 IDirect3DRMFrame3Impl_SetAxes,
2626 IDirect3DRMFrame3Impl_SetInheritAxes,
2627 IDirect3DRMFrame3Impl_SetMaterial,
2628 IDirect3DRMFrame3Impl_SetQuaternion,
2629 IDirect3DRMFrame3Impl_RayPick,
2630 IDirect3DRMFrame3Impl_Save,
2631 IDirect3DRMFrame3Impl_TransformVectors,
2632 IDirect3DRMFrame3Impl_InverseTransformVectors,
2633 IDirect3DRMFrame3Impl_SetTraversalOptions,
2634 IDirect3DRMFrame3Impl_GetTraversalOptions,
2635 IDirect3DRMFrame3Impl_SetSceneFogMethod,
2636 IDirect3DRMFrame3Impl_GetSceneFogMethod,
2637 IDirect3DRMFrame3Impl_SetMaterialOverride,
2638 IDirect3DRMFrame3Impl_GetMaterialOverride
2641 static inline IDirect3DRMFrameImpl *unsafe_impl_from_IDirect3DRMFrame3(IDirect3DRMFrame3 *iface)
2643 if (!iface)
2644 return NULL;
2645 assert(iface->lpVtbl == &Direct3DRMFrame3_Vtbl);
2647 return impl_from_IDirect3DRMFrame3(iface);
2650 HRESULT Direct3DRMFrame_create(REFIID riid, IUnknown* parent, IUnknown** ret_iface)
2652 IDirect3DRMFrameImpl* object;
2653 HRESULT hr;
2655 TRACE("(%s, %p, %p)\n", wine_dbgstr_guid(riid), parent, ret_iface);
2657 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMFrameImpl));
2658 if (!object)
2659 return E_OUTOFMEMORY;
2661 object->IDirect3DRMFrame2_iface.lpVtbl = &Direct3DRMFrame2_Vtbl;
2662 object->IDirect3DRMFrame3_iface.lpVtbl = &Direct3DRMFrame3_Vtbl;
2663 object->ref = 1;
2664 object->scenebackground = D3DCOLOR_ARGB(0xff, 0, 0, 0);
2666 memcpy(object->transform, identity, sizeof(D3DRMMATRIX4D));
2668 if (parent)
2670 IDirect3DRMFrame3 *p;
2672 hr = IDirect3DRMFrame_QueryInterface(parent, &IID_IDirect3DRMFrame3, (void**)&p);
2673 if (hr != S_OK)
2675 HeapFree(GetProcessHeap(), 0, object);
2676 return hr;
2678 IDirect3DRMFrame_Release(parent);
2679 IDirect3DRMFrame3_AddChild(p, &object->IDirect3DRMFrame3_iface);
2682 hr = IDirect3DRMFrame3_QueryInterface(&object->IDirect3DRMFrame3_iface, riid, (void**)ret_iface);
2683 IDirect3DRMFrame3_Release(&object->IDirect3DRMFrame3_iface);
2684 return S_OK;