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
23 #include "wine/debug.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;
47 IDirect3DRMFrameImpl* parent;
49 ULONG children_capacity;
50 IDirect3DRMFrame3** children;
52 ULONG visuals_capacity;
53 IDirect3DRMVisual** visuals;
55 ULONG lights_capacity;
56 IDirect3DRMLight** lights;
57 D3DRMMATRIX4D transform;
58 D3DCOLOR scenebackground;
62 IDirect3DRMFrameArray IDirect3DRMFrameArray_iface;
65 IDirect3DRMFrame **frames;
66 } IDirect3DRMFrameArrayImpl;
69 IDirect3DRMVisualArray IDirect3DRMVisualArray_iface;
72 IDirect3DRMVisual **visuals;
73 } IDirect3DRMVisualArrayImpl;
76 IDirect3DRMLightArray IDirect3DRMLightArray_iface;
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);
109 if (IsEqualGUID(riid, &IID_IUnknown) ||
110 IsEqualGUID(riid, &IID_IDirect3DRMFrameArray))
112 *object = &This->IDirect3DRMFrameArray_iface;
116 FIXME("interface %s not implemented\n", debugstr_guid(riid));
117 return E_NOINTERFACE;
120 IDirect3DRMFrameArray_AddRef(iface);
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);
134 static ULONG WINAPI IDirect3DRMFrameArrayImpl_Release(IDirect3DRMFrameArray* iface)
136 IDirect3DRMFrameArrayImpl *This = (IDirect3DRMFrameArrayImpl*)iface;
137 ULONG ref = InterlockedDecrement(&This->ref);
140 TRACE("(%p)->(): new ref = %u\n", This, 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);
153 /*** IDirect3DRMArray methods ***/
154 static DWORD WINAPI IDirect3DRMFrameArrayImpl_GetSize(IDirect3DRMFrameArray* iface)
156 IDirect3DRMFrameArrayImpl *This = (IDirect3DRMFrameArrayImpl*)iface;
158 TRACE("(%p)->() = %d\n", This, This->size);
163 /*** IDirect3DRMFrameArray methods ***/
164 static HRESULT WINAPI IDirect3DRMFrameArrayImpl_GetElement(IDirect3DRMFrameArray *iface,
165 DWORD index, IDirect3DRMFrame **frame)
167 IDirect3DRMFrameArrayImpl *This = (IDirect3DRMFrameArrayImpl*)iface;
169 TRACE("(%p)->(%u, %p)\n", This, index, frame);
172 return D3DRMERR_BADVALUE;
176 if (index >= This->size)
177 return D3DRMERR_BADVALUE;
179 IDirect3DRMFrame_AddRef(This->frames[index]);
180 *frame = This->frames[index];
185 static const struct IDirect3DRMFrameArrayVtbl Direct3DRMFrameArray_Vtbl =
187 /*** IUnknown methods ***/
188 IDirect3DRMFrameArrayImpl_QueryInterface,
189 IDirect3DRMFrameArrayImpl_AddRef,
190 IDirect3DRMFrameArrayImpl_Release,
191 /*** IDirect3DRMArray methods ***/
192 IDirect3DRMFrameArrayImpl_GetSize,
193 /*** IDirect3DRMFrameArray methods ***/
194 IDirect3DRMFrameArrayImpl_GetElement
197 static HRESULT Direct3DRMFrameArray_create(IDirect3DRMFrameArray** obj)
199 IDirect3DRMFrameArrayImpl* object;
201 TRACE("(%p)\n", obj);
205 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMFrameArrayImpl));
207 return E_OUTOFMEMORY;
209 object->IDirect3DRMFrameArray_iface.lpVtbl = &Direct3DRMFrameArray_Vtbl;
212 *obj = &object->IDirect3DRMFrameArray_iface;
217 /*** IUnknown methods ***/
218 static HRESULT WINAPI IDirect3DRMVisualArrayImpl_QueryInterface(IDirect3DRMVisualArray* iface,
219 REFIID riid, void** ret_iface)
221 TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), ret_iface);
223 if (IsEqualGUID(riid, &IID_IUnknown) ||
224 IsEqualGUID(riid, &IID_IDirect3DRMFrameArray))
227 IDirect3DRMVisualArray_AddRef(iface);
233 WARN("Interface %s not implemented\n", debugstr_guid(riid));
235 return E_NOINTERFACE;
238 static ULONG WINAPI IDirect3DRMVisualArrayImpl_AddRef(IDirect3DRMVisualArray* iface)
240 IDirect3DRMVisualArrayImpl *This = (IDirect3DRMVisualArrayImpl*)iface;
241 ULONG ref = InterlockedIncrement(&This->ref);
243 TRACE("(%p)->(): new ref = %u\n", iface, ref);
248 static ULONG WINAPI IDirect3DRMVisualArrayImpl_Release(IDirect3DRMVisualArray* iface)
250 IDirect3DRMVisualArrayImpl *This = (IDirect3DRMVisualArrayImpl*)iface;
251 ULONG ref = InterlockedDecrement(&This->ref);
254 TRACE("(%p)->(): new ref = %u\n", iface, ref);
258 for (i = 0; i < This->size; i++)
259 IDirect3DRMVisual_Release(This->visuals[i]);
260 HeapFree(GetProcessHeap(), 0, This->visuals);
261 HeapFree(GetProcessHeap(), 0, This);
267 /*** IDirect3DRMArray methods ***/
268 static DWORD WINAPI IDirect3DRMVisualArrayImpl_GetSize(IDirect3DRMVisualArray* iface)
270 IDirect3DRMVisualArrayImpl *This = (IDirect3DRMVisualArrayImpl*)iface;
272 TRACE("(%p)->() = %d\n", iface, This->size);
277 /*** IDirect3DRMVisualArray methods ***/
278 static HRESULT WINAPI IDirect3DRMVisualArrayImpl_GetElement(IDirect3DRMVisualArray *iface,
279 DWORD index, IDirect3DRMVisual **visual)
281 IDirect3DRMVisualArrayImpl *This = (IDirect3DRMVisualArrayImpl*)iface;
283 TRACE("(%p)->(%u, %p)\n", iface, index, visual);
286 return D3DRMERR_BADVALUE;
290 if (index >= This->size)
291 return D3DRMERR_BADVALUE;
293 IDirect3DRMVisual_AddRef(This->visuals[index]);
294 *visual = This->visuals[index];
299 static const struct IDirect3DRMVisualArrayVtbl Direct3DRMVisualArray_Vtbl =
301 /*** IUnknown methods ***/
302 IDirect3DRMVisualArrayImpl_QueryInterface,
303 IDirect3DRMVisualArrayImpl_AddRef,
304 IDirect3DRMVisualArrayImpl_Release,
305 /*** IDirect3DRMArray methods ***/
306 IDirect3DRMVisualArrayImpl_GetSize,
307 /*** IDirect3DRMVisualArray methods ***/
308 IDirect3DRMVisualArrayImpl_GetElement
311 static HRESULT Direct3DRMVisualArray_create(IDirect3DRMVisualArray** ret_iface)
313 IDirect3DRMVisualArrayImpl* object;
315 TRACE("(%p)\n", ret_iface);
319 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMVisualArrayImpl));
321 return E_OUTOFMEMORY;
323 object->IDirect3DRMVisualArray_iface.lpVtbl = &Direct3DRMVisualArray_Vtbl;
326 *ret_iface = &object->IDirect3DRMVisualArray_iface;
331 /*** IUnknown methods ***/
332 static HRESULT WINAPI IDirect3DRMLightArrayImpl_QueryInterface(IDirect3DRMLightArray* iface,
333 REFIID riid, void** object)
335 IDirect3DRMLightArrayImpl *This = impl_from_IDirect3DRMLightArray(iface);
337 TRACE("(%p/%p)->(%s, %p)\n", iface, This, debugstr_guid(riid), object);
341 if (IsEqualGUID(riid, &IID_IUnknown) ||
342 IsEqualGUID(riid, &IID_IDirect3DRMLightArray))
344 *object = &This->IDirect3DRMLightArray_iface;
348 FIXME("interface %s not implemented\n", debugstr_guid(riid));
349 return E_NOINTERFACE;
352 IDirect3DRMLightArray_AddRef(iface);
356 static ULONG WINAPI IDirect3DRMLightArrayImpl_AddRef(IDirect3DRMLightArray* iface)
358 IDirect3DRMLightArrayImpl *This = impl_from_IDirect3DRMLightArray(iface);
359 ULONG ref = InterlockedIncrement(&This->ref);
361 TRACE("(%p)->(): new ref = %u\n", This, ref);
366 static ULONG WINAPI IDirect3DRMLightArrayImpl_Release(IDirect3DRMLightArray* iface)
368 IDirect3DRMLightArrayImpl *This = impl_from_IDirect3DRMLightArray(iface);
369 ULONG ref = InterlockedDecrement(&This->ref);
372 TRACE("(%p)->(): new ref = %u\n", This, ref);
376 for (i = 0; i < This->size; i++)
377 IDirect3DRMLight_Release(This->lights[i]);
378 HeapFree(GetProcessHeap(), 0, This->lights);
379 HeapFree(GetProcessHeap(), 0, This);
385 /*** IDirect3DRMArray methods ***/
386 static DWORD WINAPI IDirect3DRMLightArrayImpl_GetSize(IDirect3DRMLightArray* iface)
388 IDirect3DRMLightArrayImpl *This = impl_from_IDirect3DRMLightArray(iface);
390 TRACE("(%p)->() = %d\n", This, This->size);
395 /*** IDirect3DRMLightArray methods ***/
396 static HRESULT WINAPI IDirect3DRMLightArrayImpl_GetElement(IDirect3DRMLightArray* iface, DWORD index, LPDIRECT3DRMLIGHT* light)
398 IDirect3DRMLightArrayImpl *This = impl_from_IDirect3DRMLightArray(iface);
400 TRACE("(%p)->(%u, %p)\n", This, index, light);
403 return D3DRMERR_BADVALUE;
407 if (index >= This->size)
408 return D3DRMERR_BADVALUE;
410 IDirect3DRMLight_AddRef(This->lights[index]);
411 *light = This->lights[index];
416 static const struct IDirect3DRMLightArrayVtbl Direct3DRMLightArray_Vtbl =
418 /*** IUnknown methods ***/
419 IDirect3DRMLightArrayImpl_QueryInterface,
420 IDirect3DRMLightArrayImpl_AddRef,
421 IDirect3DRMLightArrayImpl_Release,
422 /*** IDirect3DRMArray methods ***/
423 IDirect3DRMLightArrayImpl_GetSize,
424 /*** IDirect3DRMLightArray methods ***/
425 IDirect3DRMLightArrayImpl_GetElement
428 static HRESULT Direct3DRMLightArray_create(IDirect3DRMLightArray** obj)
430 IDirect3DRMLightArrayImpl* object;
432 TRACE("(%p)\n", obj);
436 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMLightArrayImpl));
438 return E_OUTOFMEMORY;
440 object->IDirect3DRMLightArray_iface.lpVtbl = &Direct3DRMLightArray_Vtbl;
443 *obj = &object->IDirect3DRMLightArray_iface;
448 /*** IUnknown methods ***/
449 static HRESULT WINAPI IDirect3DRMFrame2Impl_QueryInterface(IDirect3DRMFrame2* iface,
450 REFIID riid, void** object)
452 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
454 TRACE("(%p/%p)->(%s, %p)\n", iface, This, debugstr_guid(riid), object);
458 if(IsEqualGUID(riid, &IID_IUnknown) ||
459 IsEqualGUID(riid, &IID_IDirect3DRMFrame) ||
460 IsEqualGUID(riid, &IID_IDirect3DRMFrame2))
462 *object = &This->IDirect3DRMFrame2_iface;
464 else if(IsEqualGUID(riid, &IID_IDirect3DRMFrame3))
466 *object = &This->IDirect3DRMFrame3_iface;
470 FIXME("interface %s not implemented\n", debugstr_guid(riid));
471 return E_NOINTERFACE;
474 IDirect3DRMFrame2_AddRef(iface);
478 static ULONG WINAPI IDirect3DRMFrame2Impl_AddRef(IDirect3DRMFrame2* iface)
480 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
481 ULONG ref = InterlockedIncrement(&This->ref);
483 TRACE("(%p)->(): new ref = %d\n", This, ref);
488 static ULONG WINAPI IDirect3DRMFrame2Impl_Release(IDirect3DRMFrame2* iface)
490 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
491 ULONG ref = InterlockedDecrement(&This->ref);
494 TRACE("(%p)->(): new ref = %d\n", This, ref);
498 for (i = 0; i < This->nb_children; i++)
499 IDirect3DRMFrame3_Release(This->children[i]);
500 HeapFree(GetProcessHeap(), 0, This->children);
501 for (i = 0; i < This->nb_visuals; i++)
502 IDirect3DRMVisual_Release(This->visuals[i]);
503 HeapFree(GetProcessHeap(), 0, This->visuals);
504 for (i = 0; i < This->nb_lights; i++)
505 IDirect3DRMLight_Release(This->lights[i]);
506 HeapFree(GetProcessHeap(), 0, This->lights);
507 HeapFree(GetProcessHeap(), 0, This);
513 /*** IDirect3DRMObject methods ***/
514 static HRESULT WINAPI IDirect3DRMFrame2Impl_Clone(IDirect3DRMFrame2* iface,
515 LPUNKNOWN unkwn, REFIID riid,
518 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
520 FIXME("(%p/%p)->(%p, %s, %p): stub\n", iface, This, unkwn, debugstr_guid(riid), object);
525 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddDestroyCallback(IDirect3DRMFrame2* iface,
526 D3DRMOBJECTCALLBACK cb,
529 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
531 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
536 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteDestroyCallback(IDirect3DRMFrame2* iface,
537 D3DRMOBJECTCALLBACK cb,
540 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
542 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
547 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetAppData(IDirect3DRMFrame2* iface,
550 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
552 FIXME("(%p/%p)->(%u): stub\n", iface, This, data);
557 static DWORD WINAPI IDirect3DRMFrame2Impl_GetAppData(IDirect3DRMFrame2* iface)
559 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
561 FIXME("(%p/%p)->(): stub\n", iface, This);
566 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetName(IDirect3DRMFrame2* iface, LPCSTR name)
568 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
570 FIXME("(%p/%p)->(%s): stub\n", iface, This, name);
575 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetName(IDirect3DRMFrame2* iface,
576 LPDWORD size, LPSTR name)
578 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
580 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, size, name);
585 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetClassName(IDirect3DRMFrame2* iface,
586 LPDWORD size, LPSTR name)
588 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
590 TRACE("(%p/%p)->(%p, %p)\n", iface, This, size, name);
592 return IDirect3DRMFrame3_GetClassName(&This->IDirect3DRMFrame3_iface, size, name);
595 /*** IDirect3DRMFrame methods ***/
596 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddChild(IDirect3DRMFrame2 *iface, IDirect3DRMFrame *child)
598 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
599 IDirect3DRMFrame3 *frame;
602 TRACE("(%p/%p)->(%p)\n", iface, This, child);
605 return D3DRMERR_BADOBJECT;
606 hr = IDirect3DRMFrame_QueryInterface(child, &IID_IDirect3DRMFrame3, (void**)&frame);
608 return D3DRMERR_BADOBJECT;
609 IDirect3DRMFrame_Release(child);
611 return IDirect3DRMFrame3_AddChild(&This->IDirect3DRMFrame3_iface, frame);
614 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddLight(IDirect3DRMFrame2* iface,
615 LPDIRECT3DRMLIGHT light)
617 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
619 TRACE("(%p/%p)->(%p)\n", iface, This, light);
621 return IDirect3DRMFrame3_AddLight(&This->IDirect3DRMFrame3_iface, light);
624 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddMoveCallback(IDirect3DRMFrame2* iface,
625 D3DRMFRAMEMOVECALLBACK cb, VOID *arg)
627 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
629 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, cb, arg);
634 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddTransform(IDirect3DRMFrame2* iface,
635 D3DRMCOMBINETYPE type,
636 D3DRMMATRIX4D matrix)
638 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
640 TRACE("(%p/%p)->(%u,%p)\n", iface, This, type, matrix);
642 return IDirect3DRMFrame3_AddTransform(&This->IDirect3DRMFrame3_iface, type, matrix);
645 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddTranslation(IDirect3DRMFrame2* iface,
646 D3DRMCOMBINETYPE type,
647 D3DVALUE x, D3DVALUE y, D3DVALUE z)
649 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
651 FIXME("(%p/%p)->(%u,%f,%f,%f): stub\n", iface, This, type, x, y, z);
656 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddScale(IDirect3DRMFrame2* iface,
657 D3DRMCOMBINETYPE type,
658 D3DVALUE sx, D3DVALUE sy, D3DVALUE sz)
660 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
662 FIXME("(%p/%p)->(%u,%f,%f,%f): stub\n", iface, This, type, sx, sy, sz);
667 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddRotation(IDirect3DRMFrame2* iface,
668 D3DRMCOMBINETYPE type,
669 D3DVALUE x, D3DVALUE y, D3DVALUE z,
672 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
674 FIXME("(%p/%p)->(%u,%f,%f,%f,%f): stub\n", iface, This, type, x, y, z, theta);
679 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddVisual(IDirect3DRMFrame2 *iface, IDirect3DRMVisual *visual)
681 IDirect3DRMFrameImpl *frame = impl_from_IDirect3DRMFrame2(iface);
683 TRACE("iface %p, visual %p.\n", iface, visual);
685 return IDirect3DRMFrame3_AddVisual(&frame->IDirect3DRMFrame3_iface, (IUnknown *)visual);
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);
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, IDirect3DRMFrame **frame)
728 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
730 TRACE("(%p/%p)->(%p)\n", iface, This, frame);
733 return D3DRMERR_BADVALUE;
737 *frame = (IDirect3DRMFrame *)&This->parent->IDirect3DRMFrame2_iface;
738 IDirect3DRMFrame_AddRef(*frame);
748 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetPosition(IDirect3DRMFrame2 *iface,
749 IDirect3DRMFrame *reference, D3DVECTOR *return_position)
751 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
753 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, reference, return_position);
758 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetRotation(IDirect3DRMFrame2 *iface,
759 IDirect3DRMFrame *reference, D3DVECTOR *axis, D3DVALUE *return_theta)
761 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
763 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, reference, axis, return_theta);
768 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetScene(IDirect3DRMFrame2 *iface, IDirect3DRMFrame **scene)
770 FIXME("iface %p, frame %p stub!\n", iface, scene);
775 static D3DRMSORTMODE WINAPI IDirect3DRMFrame2Impl_GetSortMode(IDirect3DRMFrame2* iface)
777 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
779 FIXME("(%p/%p)->(): stub\n", iface, This);
781 return D3DRMSORT_FROMPARENT;
784 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetTexture(IDirect3DRMFrame2* iface,
785 LPDIRECT3DRMTEXTURE * tex)
787 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
789 FIXME("(%p/%p)->(%p): stub\n", iface, This, tex);
794 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetTransform(IDirect3DRMFrame2* iface,
795 D3DRMMATRIX4D return_matrix)
797 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
799 TRACE("(%p/%p)->(%p)\n", iface, This, return_matrix);
801 memcpy(return_matrix, This->transform, sizeof(D3DRMMATRIX4D));
806 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetVelocity(IDirect3DRMFrame2 *iface,
807 IDirect3DRMFrame *reference, D3DVECTOR *return_velocity, BOOL with_rotation)
809 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
811 FIXME("(%p/%p)->(%p,%p,%d): stub\n", iface, This, reference, return_velocity, with_rotation);
816 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetOrientation(IDirect3DRMFrame2 *iface,
817 IDirect3DRMFrame *reference, D3DVECTOR *dir, D3DVECTOR *up)
819 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
821 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, reference, dir, up);
826 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetVisuals(IDirect3DRMFrame2* iface,
827 LPDIRECT3DRMVISUALARRAY *visuals)
829 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
830 IDirect3DRMVisualArrayImpl* obj;
833 TRACE("(%p/%p)->(%p)\n", iface, This, visuals);
836 return D3DRMERR_BADVALUE;
838 hr = Direct3DRMVisualArray_create(visuals);
843 obj = (IDirect3DRMVisualArrayImpl*)*visuals;
845 obj->size = This->nb_visuals;
846 if (This->nb_visuals)
849 if (!(obj->visuals = HeapAlloc(GetProcessHeap(), 0, This->nb_visuals * sizeof(*obj->visuals))))
850 return E_OUTOFMEMORY;
851 for (i = 0; i < This->nb_visuals; i++)
853 obj->visuals[i] = This->visuals[i];
854 IDirect3DRMVisual_AddRef(This->visuals[i]);
861 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetTextureTopology(IDirect3DRMFrame2* iface,
862 BOOL *wrap_u, BOOL *wrap_v)
864 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
866 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, wrap_u, wrap_v);
871 static HRESULT WINAPI IDirect3DRMFrame2Impl_InverseTransform(IDirect3DRMFrame2* iface,
872 D3DVECTOR *d, D3DVECTOR *s)
874 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
876 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, d, s);
881 static HRESULT WINAPI IDirect3DRMFrame2Impl_Load(IDirect3DRMFrame2* iface, LPVOID filename,
882 LPVOID name, D3DRMLOADOPTIONS loadflags,
883 D3DRMLOADTEXTURECALLBACK cb, LPVOID lpArg)
885 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
887 FIXME("(%p/%p)->(%p,%p,%u,%p,%p): stub\n", iface, This, filename, name, loadflags, cb, lpArg);
892 static HRESULT WINAPI IDirect3DRMFrame2Impl_LookAt(IDirect3DRMFrame2 *iface, IDirect3DRMFrame *target,
893 IDirect3DRMFrame *reference, D3DRMFRAMECONSTRAINT constraint)
895 FIXME("iface %p, target %p, reference %p, constraint %#x stub!\n", iface, target, reference, constraint);
900 static HRESULT WINAPI IDirect3DRMFrame2Impl_Move(IDirect3DRMFrame2* iface, D3DVALUE delta)
902 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
904 FIXME("(%p/%p)->(%f): stub\n", iface, This, delta);
909 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteChild(IDirect3DRMFrame2 *iface, IDirect3DRMFrame *frame)
911 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
912 IDirect3DRMFrame3 *child;
915 TRACE("(%p/%p)->(%p)\n", iface, This, frame);
918 return D3DRMERR_BADOBJECT;
919 hr = IDirect3DRMFrame_QueryInterface(frame, &IID_IDirect3DRMFrame3, (void**)&child);
921 return D3DRMERR_BADOBJECT;
922 IDirect3DRMFrame_Release(frame);
924 return IDirect3DRMFrame3_DeleteChild(&This->IDirect3DRMFrame3_iface, child);
927 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteLight(IDirect3DRMFrame2* iface,
928 LPDIRECT3DRMLIGHT light)
930 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
932 TRACE("(%p/%p)->(%p)\n", iface, This, light);
934 return IDirect3DRMFrame3_DeleteLight(&This->IDirect3DRMFrame3_iface, light);
937 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteMoveCallback(IDirect3DRMFrame2* iface,
938 D3DRMFRAMEMOVECALLBACK cb, VOID *arg)
940 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
942 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, cb, arg);
947 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteVisual(IDirect3DRMFrame2 *iface, IDirect3DRMVisual *visual)
949 IDirect3DRMFrameImpl *frame = impl_from_IDirect3DRMFrame2(iface);
951 TRACE("iface %p, visual %p.\n", iface, visual);
953 return IDirect3DRMFrame3_DeleteVisual(&frame->IDirect3DRMFrame3_iface, (IUnknown *)visual);
956 static D3DCOLOR WINAPI IDirect3DRMFrame2Impl_GetSceneBackground(IDirect3DRMFrame2* iface)
958 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
960 TRACE("(%p/%p)->()\n", iface, This);
962 return IDirect3DRMFrame3_GetSceneBackground(&This->IDirect3DRMFrame3_iface);
965 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetSceneBackgroundDepth(IDirect3DRMFrame2 *iface,
966 IDirectDrawSurface **surface)
968 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
970 FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
975 static D3DCOLOR WINAPI IDirect3DRMFrame2Impl_GetSceneFogColor(IDirect3DRMFrame2* iface)
977 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
979 FIXME("(%p/%p)->(): stub\n", iface, This);
984 static BOOL WINAPI IDirect3DRMFrame2Impl_GetSceneFogEnable(IDirect3DRMFrame2* iface)
986 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
988 FIXME("(%p/%p)->(): stub\n", iface, This);
993 static D3DRMFOGMODE WINAPI IDirect3DRMFrame2Impl_GetSceneFogMode(IDirect3DRMFrame2* iface)
995 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
997 FIXME("(%p/%p)->(): stub\n", iface, This);
999 return D3DRMFOG_LINEAR;
1002 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetSceneFogParams(IDirect3DRMFrame2* iface,
1003 D3DVALUE *return_start,
1004 D3DVALUE *return_end,
1005 D3DVALUE *return_density)
1007 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1009 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, return_start, return_end, return_density);
1014 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackground(IDirect3DRMFrame2* iface,
1017 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1019 TRACE("(%p/%p)->(%u)\n", iface, This, color);
1021 return IDirect3DRMFrame3_SetSceneBackground(&This->IDirect3DRMFrame3_iface, color);
1024 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackgroundRGB(IDirect3DRMFrame2* iface,
1025 D3DVALUE red, D3DVALUE green,
1028 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1030 TRACE("(%p/%p)->(%f,%f,%f)\n", iface, This, red, green, blue);
1032 return IDirect3DRMFrame3_SetSceneBackgroundRGB(&This->IDirect3DRMFrame3_iface, red, green, blue);
1035 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackgroundDepth(IDirect3DRMFrame2 *iface,
1036 IDirectDrawSurface *surface)
1038 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1040 FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
1045 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackgroundImage(IDirect3DRMFrame2* iface,
1046 LPDIRECT3DRMTEXTURE texture)
1048 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1050 FIXME("(%p/%p)->(%p): stub\n", iface, This, texture);
1055 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneFogEnable(IDirect3DRMFrame2* iface, BOOL enable)
1057 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1059 FIXME("(%p/%p)->(%d): stub\n", iface, This, enable);
1064 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneFogColor(IDirect3DRMFrame2* iface,
1067 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1069 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
1074 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneFogMode(IDirect3DRMFrame2* iface,
1077 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1079 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
1084 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneFogParams(IDirect3DRMFrame2* iface,
1085 D3DVALUE start, D3DVALUE end,
1088 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1090 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, start, end, density);
1095 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetColor(IDirect3DRMFrame2* iface, D3DCOLOR color)
1097 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1099 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
1104 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetColorRGB(IDirect3DRMFrame2* iface, D3DVALUE red,
1105 D3DVALUE green, D3DVALUE blue)
1107 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1109 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, red, green, blue);
1114 static D3DRMZBUFFERMODE WINAPI IDirect3DRMFrame2Impl_GetZbufferMode(IDirect3DRMFrame2* iface)
1116 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1118 FIXME("(%p/%p)->(): stub\n", iface, This);
1120 return D3DRMZBUFFER_FROMPARENT;
1123 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetMaterialMode(IDirect3DRMFrame2* iface,
1124 D3DRMMATERIALMODE mode)
1126 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1128 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
1133 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetOrientation(IDirect3DRMFrame2 *iface, IDirect3DRMFrame *reference,
1134 D3DVALUE dx, D3DVALUE dy, D3DVALUE dz, D3DVALUE ux, D3DVALUE uy, D3DVALUE uz)
1136 FIXME("iface %p, reference %p, dx %.8e, dy %.8e, dz %.8e, ux %.8e, uy %.8e, uz %.8e stub!\n",
1137 iface, reference, dx, dy, dz, ux, uy, uz);
1142 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetPosition(IDirect3DRMFrame2 *iface, IDirect3DRMFrame *reference,
1143 D3DVALUE x, D3DVALUE y, D3DVALUE z)
1145 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e stub!\n", iface, reference, x, y, z);
1150 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetRotation(IDirect3DRMFrame2 *iface,
1151 IDirect3DRMFrame *reference, D3DVALUE x, D3DVALUE y, D3DVALUE z, D3DVALUE theta)
1153 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e, theta %.8e stub!\n",
1154 iface, reference, x, y, z, theta);
1159 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSortMode(IDirect3DRMFrame2* iface,
1162 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1164 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
1169 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetTexture(IDirect3DRMFrame2* iface,
1170 LPDIRECT3DRMTEXTURE texture)
1172 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1174 FIXME("(%p/%p)->(%p): stub\n", iface, This, texture);
1179 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetTextureTopology(IDirect3DRMFrame2* iface,
1180 BOOL wrap_u, BOOL wrap_v)
1182 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1184 FIXME("(%p/%p)->(%d,%d): stub\n", iface, This, wrap_u, wrap_v);
1189 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetVelocity(IDirect3DRMFrame2 *iface,
1190 IDirect3DRMFrame *reference, D3DVALUE x, D3DVALUE y, D3DVALUE z, BOOL with_rotation)
1192 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e, with_rotation %#x stub!\n",
1193 iface, reference, x, y, z, with_rotation);
1198 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetZbufferMode(IDirect3DRMFrame2* iface,
1199 D3DRMZBUFFERMODE mode)
1201 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1203 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
1208 static HRESULT WINAPI IDirect3DRMFrame2Impl_Transform(IDirect3DRMFrame2* iface, D3DVECTOR *d,
1211 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1213 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, d, s);
1218 /*** IDirect3DRMFrame2 methods ***/
1219 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddMoveCallback2(IDirect3DRMFrame2* iface,
1220 D3DRMFRAMEMOVECALLBACK cb, VOID *arg,
1223 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1225 FIXME("(%p/%p)->(%p,%p,%u): stub\n", iface, This, cb, arg, flags);
1230 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetBox(IDirect3DRMFrame2 *iface, D3DRMBOX *box)
1232 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1234 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
1239 static BOOL WINAPI IDirect3DRMFrame2Impl_GetBoxEnable(IDirect3DRMFrame2* iface)
1241 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1243 FIXME("(%p/%p)->(): stub\n", iface, This);
1248 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetAxes(IDirect3DRMFrame2 *iface,
1249 D3DVECTOR *dir, D3DVECTOR *up)
1251 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1253 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, dir, up);
1258 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetMaterial(IDirect3DRMFrame2* iface,
1259 LPDIRECT3DRMMATERIAL *material)
1261 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1263 FIXME("(%p/%p)->(%p): stub\n", iface, This, material);
1268 static BOOL WINAPI IDirect3DRMFrame2Impl_GetInheritAxes(IDirect3DRMFrame2* iface)
1270 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1272 FIXME("(%p/%p)->(): stub\n", iface, This);
1277 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetHierarchyBox(IDirect3DRMFrame2 *iface, D3DRMBOX *box)
1279 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1281 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
1286 static const struct IDirect3DRMFrame2Vtbl Direct3DRMFrame2_Vtbl =
1288 /*** IUnknown methods ***/
1289 IDirect3DRMFrame2Impl_QueryInterface,
1290 IDirect3DRMFrame2Impl_AddRef,
1291 IDirect3DRMFrame2Impl_Release,
1292 /*** IDirect3DRMObject methods ***/
1293 IDirect3DRMFrame2Impl_Clone,
1294 IDirect3DRMFrame2Impl_AddDestroyCallback,
1295 IDirect3DRMFrame2Impl_DeleteDestroyCallback,
1296 IDirect3DRMFrame2Impl_SetAppData,
1297 IDirect3DRMFrame2Impl_GetAppData,
1298 IDirect3DRMFrame2Impl_SetName,
1299 IDirect3DRMFrame2Impl_GetName,
1300 IDirect3DRMFrame2Impl_GetClassName,
1301 /*** IDirect3DRMFrame methods ***/
1302 IDirect3DRMFrame2Impl_AddChild,
1303 IDirect3DRMFrame2Impl_AddLight,
1304 IDirect3DRMFrame2Impl_AddMoveCallback,
1305 IDirect3DRMFrame2Impl_AddTransform,
1306 IDirect3DRMFrame2Impl_AddTranslation,
1307 IDirect3DRMFrame2Impl_AddScale,
1308 IDirect3DRMFrame2Impl_AddRotation,
1309 IDirect3DRMFrame2Impl_AddVisual,
1310 IDirect3DRMFrame2Impl_GetChildren,
1311 IDirect3DRMFrame2Impl_GetColor,
1312 IDirect3DRMFrame2Impl_GetLights,
1313 IDirect3DRMFrame2Impl_GetMaterialMode,
1314 IDirect3DRMFrame2Impl_GetParent,
1315 IDirect3DRMFrame2Impl_GetPosition,
1316 IDirect3DRMFrame2Impl_GetRotation,
1317 IDirect3DRMFrame2Impl_GetScene,
1318 IDirect3DRMFrame2Impl_GetSortMode,
1319 IDirect3DRMFrame2Impl_GetTexture,
1320 IDirect3DRMFrame2Impl_GetTransform,
1321 IDirect3DRMFrame2Impl_GetVelocity,
1322 IDirect3DRMFrame2Impl_GetOrientation,
1323 IDirect3DRMFrame2Impl_GetVisuals,
1324 IDirect3DRMFrame2Impl_GetTextureTopology,
1325 IDirect3DRMFrame2Impl_InverseTransform,
1326 IDirect3DRMFrame2Impl_Load,
1327 IDirect3DRMFrame2Impl_LookAt,
1328 IDirect3DRMFrame2Impl_Move,
1329 IDirect3DRMFrame2Impl_DeleteChild,
1330 IDirect3DRMFrame2Impl_DeleteLight,
1331 IDirect3DRMFrame2Impl_DeleteMoveCallback,
1332 IDirect3DRMFrame2Impl_DeleteVisual,
1333 IDirect3DRMFrame2Impl_GetSceneBackground,
1334 IDirect3DRMFrame2Impl_GetSceneBackgroundDepth,
1335 IDirect3DRMFrame2Impl_GetSceneFogColor,
1336 IDirect3DRMFrame2Impl_GetSceneFogEnable,
1337 IDirect3DRMFrame2Impl_GetSceneFogMode,
1338 IDirect3DRMFrame2Impl_GetSceneFogParams,
1339 IDirect3DRMFrame2Impl_SetSceneBackground,
1340 IDirect3DRMFrame2Impl_SetSceneBackgroundRGB,
1341 IDirect3DRMFrame2Impl_SetSceneBackgroundDepth,
1342 IDirect3DRMFrame2Impl_SetSceneBackgroundImage,
1343 IDirect3DRMFrame2Impl_SetSceneFogEnable,
1344 IDirect3DRMFrame2Impl_SetSceneFogColor,
1345 IDirect3DRMFrame2Impl_SetSceneFogMode,
1346 IDirect3DRMFrame2Impl_SetSceneFogParams,
1347 IDirect3DRMFrame2Impl_SetColor,
1348 IDirect3DRMFrame2Impl_SetColorRGB,
1349 IDirect3DRMFrame2Impl_GetZbufferMode,
1350 IDirect3DRMFrame2Impl_SetMaterialMode,
1351 IDirect3DRMFrame2Impl_SetOrientation,
1352 IDirect3DRMFrame2Impl_SetPosition,
1353 IDirect3DRMFrame2Impl_SetRotation,
1354 IDirect3DRMFrame2Impl_SetSortMode,
1355 IDirect3DRMFrame2Impl_SetTexture,
1356 IDirect3DRMFrame2Impl_SetTextureTopology,
1357 IDirect3DRMFrame2Impl_SetVelocity,
1358 IDirect3DRMFrame2Impl_SetZbufferMode,
1359 IDirect3DRMFrame2Impl_Transform,
1360 /*** IDirect3DRMFrame2 methods ***/
1361 IDirect3DRMFrame2Impl_AddMoveCallback2,
1362 IDirect3DRMFrame2Impl_GetBox,
1363 IDirect3DRMFrame2Impl_GetBoxEnable,
1364 IDirect3DRMFrame2Impl_GetAxes,
1365 IDirect3DRMFrame2Impl_GetMaterial,
1366 IDirect3DRMFrame2Impl_GetInheritAxes,
1367 IDirect3DRMFrame2Impl_GetHierarchyBox
1370 /*** IUnknown methods ***/
1371 static HRESULT WINAPI IDirect3DRMFrame3Impl_QueryInterface(IDirect3DRMFrame3* iface,
1372 REFIID riid, void** object)
1374 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1375 return IDirect3DRMFrame_QueryInterface(&This->IDirect3DRMFrame2_iface, riid, object);
1378 static ULONG WINAPI IDirect3DRMFrame3Impl_AddRef(IDirect3DRMFrame3* iface)
1380 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1381 return IDirect3DRMFrame2_AddRef(&This->IDirect3DRMFrame2_iface);
1384 static ULONG WINAPI IDirect3DRMFrame3Impl_Release(IDirect3DRMFrame3* iface)
1386 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1387 return IDirect3DRMFrame2_Release(&This->IDirect3DRMFrame2_iface);
1390 /*** IDirect3DRMObject methods ***/
1391 static HRESULT WINAPI IDirect3DRMFrame3Impl_Clone(IDirect3DRMFrame3* iface,
1392 LPUNKNOWN unkwn, REFIID riid,
1395 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1397 FIXME("(%p/%p)->(%p, %s, %p): stub\n", iface, This, unkwn, debugstr_guid(riid), object);
1402 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddDestroyCallback(IDirect3DRMFrame3* iface,
1403 D3DRMOBJECTCALLBACK cb,
1406 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1408 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
1413 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteDestroyCallback(IDirect3DRMFrame3* iface,
1414 D3DRMOBJECTCALLBACK cb,
1417 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1419 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
1424 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetAppData(IDirect3DRMFrame3* iface,
1427 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1429 FIXME("(%p/%p)->(%u): stub\n", iface, This, data);
1434 static DWORD WINAPI IDirect3DRMFrame3Impl_GetAppData(IDirect3DRMFrame3* iface)
1436 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1438 FIXME("(%p/%p)->(): stub\n", iface, This);
1443 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetName(IDirect3DRMFrame3* iface, LPCSTR name)
1445 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1447 FIXME("(%p/%p)->(%s): stub\n", iface, This, name);
1452 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetName(IDirect3DRMFrame3* iface,
1453 LPDWORD size, LPSTR name)
1455 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1457 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, size, name);
1462 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetClassName(IDirect3DRMFrame3* iface,
1463 LPDWORD size, LPSTR name)
1465 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1467 TRACE("(%p/%p)->(%p, %p)\n", iface, This, size, name);
1469 if (!size || *size < strlen("Frame") || !name)
1470 return E_INVALIDARG;
1472 strcpy(name, "Frame");
1473 *size = sizeof("Frame");
1478 /*** IDirect3DRMFrame methods ***/
1479 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddChild(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 *child)
1481 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1482 IDirect3DRMFrameImpl *child_obj = unsafe_impl_from_IDirect3DRMFrame3(child);
1484 TRACE("(%p/%p)->(%p)\n", iface, This, child);
1487 return D3DRMERR_BADOBJECT;
1489 if (child_obj->parent)
1491 IDirect3DRMFrame3* parent = &child_obj->parent->IDirect3DRMFrame3_iface;
1493 if (parent == iface)
1495 /* Passed frame is already a child so return success */
1500 /* Remove parent and continue */
1501 IDirect3DRMFrame3_DeleteChild(parent, child);
1505 if ((This->nb_children + 1) > This->children_capacity)
1508 IDirect3DRMFrame3** children;
1510 if (!This->children_capacity)
1513 children = HeapAlloc(GetProcessHeap(), 0, new_capacity * sizeof(IDirect3DRMFrame3*));
1517 new_capacity = This->children_capacity * 2;
1518 children = HeapReAlloc(GetProcessHeap(), 0, This->children, new_capacity * sizeof(IDirect3DRMFrame3*));
1522 return E_OUTOFMEMORY;
1524 This->children_capacity = new_capacity;
1525 This->children = children;
1528 This->children[This->nb_children++] = child;
1529 IDirect3DRMFrame3_AddRef(child);
1530 child_obj->parent = This;
1535 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddLight(IDirect3DRMFrame3* iface,
1536 LPDIRECT3DRMLIGHT light)
1538 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1540 IDirect3DRMLight** lights;
1542 TRACE("(%p/%p)->(%p)\n", iface, This, light);
1545 return D3DRMERR_BADOBJECT;
1547 /* Check if already existing and return gracefully without increasing ref count */
1548 for (i = 0; i < This->nb_lights; i++)
1549 if (This->lights[i] == light)
1552 if ((This->nb_lights + 1) > This->lights_capacity)
1556 if (!This->lights_capacity)
1559 lights = HeapAlloc(GetProcessHeap(), 0, new_capacity * sizeof(IDirect3DRMLight*));
1563 new_capacity = This->lights_capacity * 2;
1564 lights = HeapReAlloc(GetProcessHeap(), 0, This->lights, new_capacity * sizeof(IDirect3DRMLight*));
1568 return E_OUTOFMEMORY;
1570 This->lights_capacity = new_capacity;
1571 This->lights = lights;
1574 This->lights[This->nb_lights++] = light;
1575 IDirect3DRMLight_AddRef(light);
1580 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddMoveCallback(IDirect3DRMFrame3* iface,
1581 D3DRMFRAME3MOVECALLBACK cb, VOID *arg,
1584 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1586 FIXME("(%p/%p)->(%p,%p,%u): stub\n", iface, This, cb, arg, flags);
1591 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddTransform(IDirect3DRMFrame3* iface,
1592 D3DRMCOMBINETYPE type,
1593 D3DRMMATRIX4D matrix)
1595 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1597 TRACE("(%p/%p)->(%u,%p)\n", iface, This, type, matrix);
1601 case D3DRMCOMBINE_REPLACE:
1602 memcpy(This->transform, matrix, sizeof(D3DRMMATRIX4D));
1605 case D3DRMCOMBINE_BEFORE:
1606 FIXME("D3DRMCOMBINE_BEFORE not supported yed\n");
1609 case D3DRMCOMBINE_AFTER:
1610 FIXME("D3DRMCOMBINE_AFTER not supported yed\n");
1614 WARN("Unknown Combine Type %u\n", type);
1615 return D3DRMERR_BADVALUE;
1621 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddTranslation(IDirect3DRMFrame3* iface,
1622 D3DRMCOMBINETYPE type,
1623 D3DVALUE x, D3DVALUE y, D3DVALUE z)
1625 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1627 FIXME("(%p/%p)->(%u,%f,%f,%f): stub\n", iface, This, type, x, y, z);
1632 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddScale(IDirect3DRMFrame3* iface,
1633 D3DRMCOMBINETYPE type,
1634 D3DVALUE sx, D3DVALUE sy, D3DVALUE sz)
1636 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1638 FIXME("(%p/%p)->(%u,%f,%f,%f): stub\n", iface, This, type, sx, sy, sz);
1643 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddRotation(IDirect3DRMFrame3* iface,
1644 D3DRMCOMBINETYPE type,
1645 D3DVALUE x, D3DVALUE y, D3DVALUE z,
1648 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1650 FIXME("(%p/%p)->(%u,%f,%f,%f,%f): stub\n", iface, This, type, x, y, z, theta);
1655 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddVisual(IDirect3DRMFrame3* iface, LPUNKNOWN vis)
1657 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1659 IDirect3DRMVisual** visuals;
1661 TRACE("(%p/%p)->(%p)\n", iface, This, vis);
1664 return D3DRMERR_BADOBJECT;
1666 /* Check if already existing and return gracefully without increasing ref count */
1667 for (i = 0; i < This->nb_visuals; i++)
1668 if (This->visuals[i] == (IDirect3DRMVisual*)vis)
1671 if ((This->nb_visuals + 1) > This->visuals_capacity)
1675 if (!This->visuals_capacity)
1678 visuals = HeapAlloc(GetProcessHeap(), 0, new_capacity * sizeof(IDirect3DRMVisual*));
1682 new_capacity = This->visuals_capacity * 2;
1683 visuals = HeapReAlloc(GetProcessHeap(), 0, This->visuals, new_capacity * sizeof(IDirect3DRMVisual*));
1687 return E_OUTOFMEMORY;
1689 This->visuals_capacity = new_capacity;
1690 This->visuals = visuals;
1693 This->visuals[This->nb_visuals++] = (IDirect3DRMVisual*)vis;
1694 IDirect3DRMVisual_AddRef(vis);
1699 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetChildren(IDirect3DRMFrame3* iface,
1700 LPDIRECT3DRMFRAMEARRAY *children)
1702 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1703 IDirect3DRMFrameArrayImpl* obj;
1706 TRACE("(%p/%p)->(%p)\n", iface, This, children);
1709 return D3DRMERR_BADVALUE;
1711 hr = Direct3DRMFrameArray_create(children);
1716 obj = (IDirect3DRMFrameArrayImpl*)*children;
1718 obj->size = This->nb_children;
1719 if (This->nb_children)
1722 if (!(obj->frames = HeapAlloc(GetProcessHeap(), 0, This->nb_children * sizeof(*obj->frames))))
1723 return E_OUTOFMEMORY;
1724 for (i = 0; i < This->nb_children; i++)
1725 IDirect3DRMFrame3_QueryInterface(This->children[i], &IID_IDirect3DRMFrame, (void**)&obj->frames[i]);
1731 static D3DCOLOR WINAPI IDirect3DRMFrame3Impl_GetColor(IDirect3DRMFrame3* iface)
1733 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1735 FIXME("(%p/%p)->(): stub\n", iface, This);
1740 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetLights(IDirect3DRMFrame3* iface,
1741 LPDIRECT3DRMLIGHTARRAY *lights)
1743 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1744 IDirect3DRMLightArrayImpl* obj;
1747 TRACE("(%p/%p)->(%p)\n", iface, This, lights);
1750 return D3DRMERR_BADVALUE;
1752 hr = Direct3DRMLightArray_create(lights);
1757 obj = (IDirect3DRMLightArrayImpl*)*lights;
1759 obj->size = This->nb_lights;
1760 if (This->nb_lights)
1763 obj->lights = HeapAlloc(GetProcessHeap(), 0, This->nb_lights * sizeof(LPDIRECT3DRMLIGHT));
1765 return E_OUTOFMEMORY;
1766 for (i = 0; i < This->nb_lights; i++)
1767 IDirect3DRMLight_QueryInterface(This->lights[i], &IID_IDirect3DRMLight, (void**)&obj->lights[i]);
1773 static D3DRMMATERIALMODE WINAPI IDirect3DRMFrame3Impl_GetMaterialMode(IDirect3DRMFrame3* iface)
1775 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1777 FIXME("(%p/%p)->(): stub\n", iface, This);
1779 return D3DRMMATERIAL_FROMPARENT;
1782 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetParent(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 **frame)
1784 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1786 TRACE("(%p/%p)->(%p)\n", iface, This, frame);
1789 return D3DRMERR_BADVALUE;
1793 *frame = &This->parent->IDirect3DRMFrame3_iface;
1794 IDirect3DRMFrame_AddRef(*frame);
1804 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetPosition(IDirect3DRMFrame3 *iface,
1805 IDirect3DRMFrame3 *reference, D3DVECTOR *return_position)
1807 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1809 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, reference, return_position);
1814 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetRotation(IDirect3DRMFrame3 *iface,
1815 IDirect3DRMFrame3 *reference, D3DVECTOR *axis, D3DVALUE *return_theta)
1817 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1819 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, reference, axis, return_theta);
1824 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetScene(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 **scene)
1826 FIXME("iface %p, scene %p stub!\n", iface, scene);
1831 static D3DRMSORTMODE WINAPI IDirect3DRMFrame3Impl_GetSortMode(IDirect3DRMFrame3* iface)
1833 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1835 FIXME("(%p/%p)->(): stub\n", iface, This);
1837 return D3DRMSORT_FROMPARENT;
1840 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetTexture(IDirect3DRMFrame3* iface,
1841 LPDIRECT3DRMTEXTURE3 * tex)
1843 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1845 FIXME("(%p/%p)->(%p): stub\n", iface, This, tex);
1850 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetTransform(IDirect3DRMFrame3 *iface,
1851 IDirect3DRMFrame3 *reference, D3DRMMATRIX4D return_matrix)
1853 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1855 TRACE("(%p/%p)->(%p,%p)\n", iface, This, reference, return_matrix);
1858 FIXME("Specifying a frame as the root of the scene different from the current root frame is not supported yet\n");
1860 memcpy(return_matrix, This->transform, sizeof(D3DRMMATRIX4D));
1865 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetVelocity(IDirect3DRMFrame3 *iface,
1866 IDirect3DRMFrame3 *reference, D3DVECTOR *return_velocity, BOOL with_rotation)
1868 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1870 FIXME("(%p/%p)->(%p,%p,%d): stub\n", iface, This, reference, return_velocity, with_rotation);
1875 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetOrientation(IDirect3DRMFrame3 *iface,
1876 IDirect3DRMFrame3 *reference, D3DVECTOR *dir, D3DVECTOR *up)
1878 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1880 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, reference, dir, up);
1885 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetVisuals(IDirect3DRMFrame3* iface, LPDWORD num,
1888 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1890 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, num, visuals);
1895 static HRESULT WINAPI IDirect3DRMFrame3Impl_InverseTransform(IDirect3DRMFrame3* iface,
1896 D3DVECTOR *d, D3DVECTOR *s)
1898 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1900 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, d, s);
1905 static HRESULT WINAPI IDirect3DRMFrame3Impl_Load(IDirect3DRMFrame3* iface, LPVOID filename,
1906 LPVOID name, D3DRMLOADOPTIONS loadflags,
1907 D3DRMLOADTEXTURE3CALLBACK cb, LPVOID lpArg)
1909 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1911 FIXME("(%p/%p)->(%p,%p,%u,%p,%p): stub\n", iface, This, filename, name, loadflags, cb, lpArg);
1916 static HRESULT WINAPI IDirect3DRMFrame3Impl_LookAt(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 *target,
1917 IDirect3DRMFrame3 *reference, D3DRMFRAMECONSTRAINT constraint)
1919 FIXME("iface %p, target %p, reference %p, constraint %#x stub!\n", iface, target, reference, constraint);
1924 static HRESULT WINAPI IDirect3DRMFrame3Impl_Move(IDirect3DRMFrame3* iface, D3DVALUE delta)
1926 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1928 FIXME("(%p/%p)->(%f): stub\n", iface, This, delta);
1933 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteChild(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 *frame)
1935 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1936 IDirect3DRMFrameImpl *frame_obj = unsafe_impl_from_IDirect3DRMFrame3(frame);
1939 TRACE("(%p/%p)->(%p)\n", iface, This, frame);
1942 return D3DRMERR_BADOBJECT;
1944 /* Check if child exists */
1945 for (i = 0; i < This->nb_children; i++)
1946 if (This->children[i] == frame)
1949 if (i == This->nb_children)
1950 return D3DRMERR_BADVALUE;
1952 memmove(This->children + i, This->children + i + 1, sizeof(IDirect3DRMFrame3*) * (This->nb_children - 1 - i));
1953 IDirect3DRMFrame3_Release(frame);
1954 frame_obj->parent = NULL;
1955 This->nb_children--;
1960 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteLight(IDirect3DRMFrame3* iface,
1961 LPDIRECT3DRMLIGHT light)
1963 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1966 TRACE("(%p/%p)->(%p)\n", iface, This, light);
1969 return D3DRMERR_BADOBJECT;
1971 /* Check if visual exists */
1972 for (i = 0; i < This->nb_lights; i++)
1973 if (This->lights[i] == light)
1976 if (i == This->nb_lights)
1977 return D3DRMERR_BADVALUE;
1979 memmove(This->lights + i, This->lights + i + 1, sizeof(IDirect3DRMLight*) * (This->nb_lights - 1 - i));
1980 IDirect3DRMLight_Release(light);
1986 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteMoveCallback(IDirect3DRMFrame3* iface,
1987 D3DRMFRAME3MOVECALLBACK cb,
1990 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1992 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, cb, arg);
1997 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteVisual(IDirect3DRMFrame3* iface, LPUNKNOWN vis)
1999 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2002 TRACE("(%p/%p)->(%p)\n", iface, This, vis);
2005 return D3DRMERR_BADOBJECT;
2007 /* Check if visual exists */
2008 for (i = 0; i < This->nb_visuals; i++)
2009 if (This->visuals[i] == (IDirect3DRMVisual*)vis)
2012 if (i == This->nb_visuals)
2013 return D3DRMERR_BADVALUE;
2015 memmove(This->visuals + i, This->visuals + i + 1, sizeof(IDirect3DRMVisual*) * (This->nb_visuals - 1 - i));
2016 IDirect3DRMVisual_Release(vis);
2022 static D3DCOLOR WINAPI IDirect3DRMFrame3Impl_GetSceneBackground(IDirect3DRMFrame3* iface)
2024 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2026 TRACE("(%p/%p)->()\n", iface, This);
2028 return This->scenebackground;
2031 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetSceneBackgroundDepth(IDirect3DRMFrame3 *iface,
2032 IDirectDrawSurface **surface)
2034 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2036 FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
2041 static D3DCOLOR WINAPI IDirect3DRMFrame3Impl_GetSceneFogColor(IDirect3DRMFrame3* iface)
2043 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2045 FIXME("(%p/%p)->(): stub\n", iface, This);
2050 static BOOL WINAPI IDirect3DRMFrame3Impl_GetSceneFogEnable(IDirect3DRMFrame3* iface)
2052 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2054 FIXME("(%p/%p)->(): stub\n", iface, This);
2059 static D3DRMFOGMODE WINAPI IDirect3DRMFrame3Impl_GetSceneFogMode(IDirect3DRMFrame3* iface)
2061 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2063 FIXME("(%p/%p)->(): stub\n", iface, This);
2065 return D3DRMFOG_LINEAR;
2068 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetSceneFogParams(IDirect3DRMFrame3* iface,
2069 D3DVALUE *return_start,
2070 D3DVALUE *return_end,
2071 D3DVALUE *return_density)
2073 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2075 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, return_start, return_end, return_density);
2080 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackground(IDirect3DRMFrame3* iface,
2083 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2085 TRACE("(%p/%p)->(%u)\n", iface, This, color);
2087 This->scenebackground = color;
2092 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackgroundRGB(IDirect3DRMFrame3* iface,
2093 D3DVALUE red, D3DVALUE green,
2096 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2098 TRACE("(%p/%p)->(%f,%f,%f)\n", iface, This, red, green, blue);
2100 This->scenebackground = RGBA_MAKE((BYTE)(red * 255.0f),
2101 (BYTE)(green * 255.0f), (BYTE)(blue * 255.0f), 0xff);
2106 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackgroundDepth(IDirect3DRMFrame3 *iface,
2107 IDirectDrawSurface *surface)
2109 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2111 FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
2116 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackgroundImage(IDirect3DRMFrame3* iface,
2117 LPDIRECT3DRMTEXTURE3 texture)
2119 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2121 FIXME("(%p/%p)->(%p): stub\n", iface, This, texture);
2126 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogEnable(IDirect3DRMFrame3* iface, BOOL enable)
2128 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2130 FIXME("(%p/%p)->(%d): stub\n", iface, This, enable);
2135 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogColor(IDirect3DRMFrame3* iface,
2138 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2140 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
2145 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogMode(IDirect3DRMFrame3* iface,
2148 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2150 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
2155 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogParams(IDirect3DRMFrame3* iface,
2156 D3DVALUE start, D3DVALUE end,
2159 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2161 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, start, end, density);
2166 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetColor(IDirect3DRMFrame3* iface, D3DCOLOR color)
2168 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2170 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
2175 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetColorRGB(IDirect3DRMFrame3* iface, D3DVALUE red,
2176 D3DVALUE green, D3DVALUE blue)
2178 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2180 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, red, green, blue);
2185 static D3DRMZBUFFERMODE WINAPI IDirect3DRMFrame3Impl_GetZbufferMode(IDirect3DRMFrame3* iface)
2187 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2189 FIXME("(%p/%p)->(): stub\n", iface, This);
2191 return D3DRMZBUFFER_FROMPARENT;
2194 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetMaterialMode(IDirect3DRMFrame3* iface,
2195 D3DRMMATERIALMODE mode)
2197 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2199 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
2204 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetOrientation(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 *reference,
2205 D3DVALUE dx, D3DVALUE dy, D3DVALUE dz, D3DVALUE ux, D3DVALUE uy, D3DVALUE uz)
2207 FIXME("iface %p, reference %p, dx %.8e, dy %.8e, dz %.8e, ux %.8e, uy %.8e, uz %.8e stub!\n",
2208 iface, reference, dx, dy, dz, ux, uy, uz);
2213 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetPosition(IDirect3DRMFrame3 *iface,
2214 IDirect3DRMFrame3 *reference, D3DVALUE x, D3DVALUE y, D3DVALUE z)
2216 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e stub!\n", iface, reference, x, y, z);
2221 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetRotation(IDirect3DRMFrame3 *iface,
2222 IDirect3DRMFrame3 *reference, D3DVALUE x, D3DVALUE y, D3DVALUE z, D3DVALUE theta)
2224 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e, theta %.8e stub!\n",
2225 iface, reference, x, y, z, theta);
2230 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSortMode(IDirect3DRMFrame3* iface,
2233 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2235 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
2240 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetTexture(IDirect3DRMFrame3* iface,
2241 LPDIRECT3DRMTEXTURE3 texture)
2243 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2245 FIXME("(%p/%p)->(%p): stub\n", iface, This, texture);
2250 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetVelocity(IDirect3DRMFrame3 *iface,
2251 IDirect3DRMFrame3 *reference, D3DVALUE x, D3DVALUE y, D3DVALUE z, BOOL with_rotation)
2253 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e, with_rotation %#x.\n",
2254 iface, reference, x, y, z, with_rotation);
2259 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetZbufferMode(IDirect3DRMFrame3* iface,
2260 D3DRMZBUFFERMODE mode)
2262 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2264 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
2269 static HRESULT WINAPI IDirect3DRMFrame3Impl_Transform(IDirect3DRMFrame3* iface, D3DVECTOR *d,
2272 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2274 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, d, s);
2279 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetBox(IDirect3DRMFrame3 *iface, D3DRMBOX *box)
2281 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2283 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
2288 static BOOL WINAPI IDirect3DRMFrame3Impl_GetBoxEnable(IDirect3DRMFrame3* iface)
2290 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2292 FIXME("(%p/%p)->(): stub\n", iface, This);
2297 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetAxes(IDirect3DRMFrame3 *iface, D3DVECTOR *dir, D3DVECTOR *up)
2299 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2301 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, dir, up);
2306 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetMaterial(IDirect3DRMFrame3* iface,
2307 LPDIRECT3DRMMATERIAL2 *material)
2309 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2311 FIXME("(%p/%p)->(%p): stub\n", iface, This, material);
2316 static BOOL WINAPI IDirect3DRMFrame3Impl_GetInheritAxes(IDirect3DRMFrame3* iface)
2318 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2320 FIXME("(%p/%p)->(): stub\n", iface, This);
2325 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetHierarchyBox(IDirect3DRMFrame3* iface, D3DRMBOX *box)
2327 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2329 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
2334 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetBox(IDirect3DRMFrame3 *iface, D3DRMBOX *box)
2336 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2338 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
2343 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetBoxEnable(IDirect3DRMFrame3* iface, BOOL enable)
2345 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2347 FIXME("(%p/%p)->(%u): stub\n", iface, This, enable);
2352 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetAxes(IDirect3DRMFrame3* iface,
2353 D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
2354 D3DVALUE ux, D3DVALUE uy, D3DVALUE uz)
2356 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2358 FIXME("(%p/%p)->(%f,%f,%f,%f,%f,%f): stub\n", iface, This, dx, dy, dz, ux, uy, uz);
2363 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetInheritAxes(IDirect3DRMFrame3* iface,
2364 BOOL inherit_from_parent)
2366 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2368 FIXME("(%p/%p)->(%u): stub\n", iface, This, inherit_from_parent);
2373 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetMaterial(IDirect3DRMFrame3* iface,
2374 LPDIRECT3DRMMATERIAL2 material)
2376 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2378 FIXME("(%p/%p)->(%p): stub\n", iface, This, material);
2383 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetQuaternion(IDirect3DRMFrame3 *iface,
2384 IDirect3DRMFrame3 *reference, D3DRMQUATERNION *q)
2386 FIXME("iface %p, reference %p, q %p stub!\n", iface, reference, q);
2391 static HRESULT WINAPI IDirect3DRMFrame3Impl_RayPick(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 *reference,
2392 D3DRMRAY *ray, DWORD flags, IDirect3DRMPicked2Array **return_visuals)
2394 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2396 FIXME("(%p/%p)->(%p,%p,%u,%p): stub\n", iface, This, reference, ray, flags, return_visuals);
2401 static HRESULT WINAPI IDirect3DRMFrame3Impl_Save(IDirect3DRMFrame3* iface, LPCSTR filename,
2402 D3DRMXOFFORMAT d3dFormat,
2403 D3DRMSAVEOPTIONS d3dSaveFlags)
2405 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2407 FIXME("(%p/%p)->(%p,%u,%u): stub\n", iface, This, filename, d3dFormat, d3dSaveFlags);
2412 static HRESULT WINAPI IDirect3DRMFrame3Impl_TransformVectors(IDirect3DRMFrame3 *iface,
2413 IDirect3DRMFrame3 *reference, DWORD num, D3DVECTOR *dst, D3DVECTOR *src)
2415 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2417 FIXME("(%p/%p)->(%p,%u,%p,%p): stub\n", iface, This, reference, num, dst, src);
2422 static HRESULT WINAPI IDirect3DRMFrame3Impl_InverseTransformVectors(IDirect3DRMFrame3 *iface,
2423 IDirect3DRMFrame3 *reference, DWORD num, D3DVECTOR *dst, D3DVECTOR *src)
2425 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2427 FIXME("(%p/%p)->(%p,%u,%p,%p): stub\n", iface, This, reference, num, dst, src);
2432 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetTraversalOptions(IDirect3DRMFrame3* iface,
2435 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2437 FIXME("(%p/%p)->(%u): stub\n", iface, This, flags);
2442 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetTraversalOptions(IDirect3DRMFrame3* iface,
2445 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2447 FIXME("(%p/%p)->(%p): stub\n", iface, This, flags);
2452 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogMethod(IDirect3DRMFrame3* iface,
2455 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2457 FIXME("(%p/%p)->(%u): stub\n", iface, This, flags);
2462 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetSceneFogMethod(IDirect3DRMFrame3* iface,
2465 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2467 FIXME("(%p/%p)->(%p): stub\n", iface, This, flags);
2472 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetMaterialOverride(IDirect3DRMFrame3 *iface,
2473 D3DRMMATERIALOVERRIDE *override)
2475 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2477 FIXME("(%p/%p)->(%p): stub\n", iface, This, override);
2482 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetMaterialOverride(IDirect3DRMFrame3 *iface,
2483 D3DRMMATERIALOVERRIDE *override)
2485 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2487 FIXME("(%p/%p)->(%p): stub\n", iface, This, override);
2492 static const struct IDirect3DRMFrame3Vtbl Direct3DRMFrame3_Vtbl =
2494 /*** IUnknown methods ***/
2495 IDirect3DRMFrame3Impl_QueryInterface,
2496 IDirect3DRMFrame3Impl_AddRef,
2497 IDirect3DRMFrame3Impl_Release,
2498 /*** IDirect3DRMObject methods ***/
2499 IDirect3DRMFrame3Impl_Clone,
2500 IDirect3DRMFrame3Impl_AddDestroyCallback,
2501 IDirect3DRMFrame3Impl_DeleteDestroyCallback,
2502 IDirect3DRMFrame3Impl_SetAppData,
2503 IDirect3DRMFrame3Impl_GetAppData,
2504 IDirect3DRMFrame3Impl_SetName,
2505 IDirect3DRMFrame3Impl_GetName,
2506 IDirect3DRMFrame3Impl_GetClassName,
2507 /*** IDirect3DRMFrame3 methods ***/
2508 IDirect3DRMFrame3Impl_AddChild,
2509 IDirect3DRMFrame3Impl_AddLight,
2510 IDirect3DRMFrame3Impl_AddMoveCallback,
2511 IDirect3DRMFrame3Impl_AddTransform,
2512 IDirect3DRMFrame3Impl_AddTranslation,
2513 IDirect3DRMFrame3Impl_AddScale,
2514 IDirect3DRMFrame3Impl_AddRotation,
2515 IDirect3DRMFrame3Impl_AddVisual,
2516 IDirect3DRMFrame3Impl_GetChildren,
2517 IDirect3DRMFrame3Impl_GetColor,
2518 IDirect3DRMFrame3Impl_GetLights,
2519 IDirect3DRMFrame3Impl_GetMaterialMode,
2520 IDirect3DRMFrame3Impl_GetParent,
2521 IDirect3DRMFrame3Impl_GetPosition,
2522 IDirect3DRMFrame3Impl_GetRotation,
2523 IDirect3DRMFrame3Impl_GetScene,
2524 IDirect3DRMFrame3Impl_GetSortMode,
2525 IDirect3DRMFrame3Impl_GetTexture,
2526 IDirect3DRMFrame3Impl_GetTransform,
2527 IDirect3DRMFrame3Impl_GetVelocity,
2528 IDirect3DRMFrame3Impl_GetOrientation,
2529 IDirect3DRMFrame3Impl_GetVisuals,
2530 IDirect3DRMFrame3Impl_InverseTransform,
2531 IDirect3DRMFrame3Impl_Load,
2532 IDirect3DRMFrame3Impl_LookAt,
2533 IDirect3DRMFrame3Impl_Move,
2534 IDirect3DRMFrame3Impl_DeleteChild,
2535 IDirect3DRMFrame3Impl_DeleteLight,
2536 IDirect3DRMFrame3Impl_DeleteMoveCallback,
2537 IDirect3DRMFrame3Impl_DeleteVisual,
2538 IDirect3DRMFrame3Impl_GetSceneBackground,
2539 IDirect3DRMFrame3Impl_GetSceneBackgroundDepth,
2540 IDirect3DRMFrame3Impl_GetSceneFogColor,
2541 IDirect3DRMFrame3Impl_GetSceneFogEnable,
2542 IDirect3DRMFrame3Impl_GetSceneFogMode,
2543 IDirect3DRMFrame3Impl_GetSceneFogParams,
2544 IDirect3DRMFrame3Impl_SetSceneBackground,
2545 IDirect3DRMFrame3Impl_SetSceneBackgroundRGB,
2546 IDirect3DRMFrame3Impl_SetSceneBackgroundDepth,
2547 IDirect3DRMFrame3Impl_SetSceneBackgroundImage,
2548 IDirect3DRMFrame3Impl_SetSceneFogEnable,
2549 IDirect3DRMFrame3Impl_SetSceneFogColor,
2550 IDirect3DRMFrame3Impl_SetSceneFogMode,
2551 IDirect3DRMFrame3Impl_SetSceneFogParams,
2552 IDirect3DRMFrame3Impl_SetColor,
2553 IDirect3DRMFrame3Impl_SetColorRGB,
2554 IDirect3DRMFrame3Impl_GetZbufferMode,
2555 IDirect3DRMFrame3Impl_SetMaterialMode,
2556 IDirect3DRMFrame3Impl_SetOrientation,
2557 IDirect3DRMFrame3Impl_SetPosition,
2558 IDirect3DRMFrame3Impl_SetRotation,
2559 IDirect3DRMFrame3Impl_SetSortMode,
2560 IDirect3DRMFrame3Impl_SetTexture,
2561 IDirect3DRMFrame3Impl_SetVelocity,
2562 IDirect3DRMFrame3Impl_SetZbufferMode,
2563 IDirect3DRMFrame3Impl_Transform,
2564 IDirect3DRMFrame3Impl_GetBox,
2565 IDirect3DRMFrame3Impl_GetBoxEnable,
2566 IDirect3DRMFrame3Impl_GetAxes,
2567 IDirect3DRMFrame3Impl_GetMaterial,
2568 IDirect3DRMFrame3Impl_GetInheritAxes,
2569 IDirect3DRMFrame3Impl_GetHierarchyBox,
2570 IDirect3DRMFrame3Impl_SetBox,
2571 IDirect3DRMFrame3Impl_SetBoxEnable,
2572 IDirect3DRMFrame3Impl_SetAxes,
2573 IDirect3DRMFrame3Impl_SetInheritAxes,
2574 IDirect3DRMFrame3Impl_SetMaterial,
2575 IDirect3DRMFrame3Impl_SetQuaternion,
2576 IDirect3DRMFrame3Impl_RayPick,
2577 IDirect3DRMFrame3Impl_Save,
2578 IDirect3DRMFrame3Impl_TransformVectors,
2579 IDirect3DRMFrame3Impl_InverseTransformVectors,
2580 IDirect3DRMFrame3Impl_SetTraversalOptions,
2581 IDirect3DRMFrame3Impl_GetTraversalOptions,
2582 IDirect3DRMFrame3Impl_SetSceneFogMethod,
2583 IDirect3DRMFrame3Impl_GetSceneFogMethod,
2584 IDirect3DRMFrame3Impl_SetMaterialOverride,
2585 IDirect3DRMFrame3Impl_GetMaterialOverride
2588 static inline IDirect3DRMFrameImpl *unsafe_impl_from_IDirect3DRMFrame3(IDirect3DRMFrame3 *iface)
2592 assert(iface->lpVtbl == &Direct3DRMFrame3_Vtbl);
2594 return impl_from_IDirect3DRMFrame3(iface);
2597 HRESULT Direct3DRMFrame_create(REFIID riid, IUnknown* parent, IUnknown** ret_iface)
2599 IDirect3DRMFrameImpl* object;
2602 TRACE("(%s, %p, %p)\n", wine_dbgstr_guid(riid), parent, ret_iface);
2604 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMFrameImpl));
2606 return E_OUTOFMEMORY;
2608 object->IDirect3DRMFrame2_iface.lpVtbl = &Direct3DRMFrame2_Vtbl;
2609 object->IDirect3DRMFrame3_iface.lpVtbl = &Direct3DRMFrame3_Vtbl;
2611 object->scenebackground = RGBA_MAKE(0, 0, 0, 0xff);
2613 memcpy(object->transform, identity, sizeof(D3DRMMATRIX4D));
2617 IDirect3DRMFrame3 *p;
2619 hr = IDirect3DRMFrame_QueryInterface(parent, &IID_IDirect3DRMFrame3, (void**)&p);
2622 HeapFree(GetProcessHeap(), 0, object);
2625 IDirect3DRMFrame_Release(parent);
2626 IDirect3DRMFrame3_AddChild(p, &object->IDirect3DRMFrame3_iface);
2629 hr = IDirect3DRMFrame3_QueryInterface(&object->IDirect3DRMFrame3_iface, riid, (void**)ret_iface);
2630 IDirect3DRMFrame3_Release(&object->IDirect3DRMFrame3_iface);