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 IDirect3DRMLight **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,
397 DWORD index, IDirect3DRMLight **light)
399 IDirect3DRMLightArrayImpl *This = impl_from_IDirect3DRMLightArray(iface);
401 TRACE("(%p)->(%u, %p)\n", This, index, light);
404 return D3DRMERR_BADVALUE;
408 if (index >= This->size)
409 return D3DRMERR_BADVALUE;
411 IDirect3DRMLight_AddRef(This->lights[index]);
412 *light = This->lights[index];
417 static const struct IDirect3DRMLightArrayVtbl Direct3DRMLightArray_Vtbl =
419 /*** IUnknown methods ***/
420 IDirect3DRMLightArrayImpl_QueryInterface,
421 IDirect3DRMLightArrayImpl_AddRef,
422 IDirect3DRMLightArrayImpl_Release,
423 /*** IDirect3DRMArray methods ***/
424 IDirect3DRMLightArrayImpl_GetSize,
425 /*** IDirect3DRMLightArray methods ***/
426 IDirect3DRMLightArrayImpl_GetElement
429 static HRESULT Direct3DRMLightArray_create(IDirect3DRMLightArray** obj)
431 IDirect3DRMLightArrayImpl* object;
433 TRACE("(%p)\n", obj);
437 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMLightArrayImpl));
439 return E_OUTOFMEMORY;
441 object->IDirect3DRMLightArray_iface.lpVtbl = &Direct3DRMLightArray_Vtbl;
444 *obj = &object->IDirect3DRMLightArray_iface;
449 /*** IUnknown methods ***/
450 static HRESULT WINAPI IDirect3DRMFrame2Impl_QueryInterface(IDirect3DRMFrame2* iface,
451 REFIID riid, void** object)
453 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
455 TRACE("(%p/%p)->(%s, %p)\n", iface, This, debugstr_guid(riid), object);
459 if(IsEqualGUID(riid, &IID_IUnknown) ||
460 IsEqualGUID(riid, &IID_IDirect3DRMFrame) ||
461 IsEqualGUID(riid, &IID_IDirect3DRMFrame2))
463 *object = &This->IDirect3DRMFrame2_iface;
465 else if(IsEqualGUID(riid, &IID_IDirect3DRMFrame3))
467 *object = &This->IDirect3DRMFrame3_iface;
471 FIXME("interface %s not implemented\n", debugstr_guid(riid));
472 return E_NOINTERFACE;
475 IDirect3DRMFrame2_AddRef(iface);
479 static ULONG WINAPI IDirect3DRMFrame2Impl_AddRef(IDirect3DRMFrame2* iface)
481 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
482 ULONG ref = InterlockedIncrement(&This->ref);
484 TRACE("(%p)->(): new ref = %d\n", This, ref);
489 static ULONG WINAPI IDirect3DRMFrame2Impl_Release(IDirect3DRMFrame2* iface)
491 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
492 ULONG ref = InterlockedDecrement(&This->ref);
495 TRACE("(%p)->(): new ref = %d\n", This, ref);
499 for (i = 0; i < This->nb_children; i++)
500 IDirect3DRMFrame3_Release(This->children[i]);
501 HeapFree(GetProcessHeap(), 0, This->children);
502 for (i = 0; i < This->nb_visuals; i++)
503 IDirect3DRMVisual_Release(This->visuals[i]);
504 HeapFree(GetProcessHeap(), 0, This->visuals);
505 for (i = 0; i < This->nb_lights; i++)
506 IDirect3DRMLight_Release(This->lights[i]);
507 HeapFree(GetProcessHeap(), 0, This->lights);
508 HeapFree(GetProcessHeap(), 0, This);
514 /*** IDirect3DRMObject methods ***/
515 static HRESULT WINAPI IDirect3DRMFrame2Impl_Clone(IDirect3DRMFrame2* iface,
516 LPUNKNOWN unkwn, REFIID riid,
519 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
521 FIXME("(%p/%p)->(%p, %s, %p): stub\n", iface, This, unkwn, debugstr_guid(riid), object);
526 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddDestroyCallback(IDirect3DRMFrame2* iface,
527 D3DRMOBJECTCALLBACK cb,
530 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
532 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
537 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteDestroyCallback(IDirect3DRMFrame2* iface,
538 D3DRMOBJECTCALLBACK cb,
541 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
543 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
548 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetAppData(IDirect3DRMFrame2* iface,
551 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
553 FIXME("(%p/%p)->(%u): stub\n", iface, This, data);
558 static DWORD WINAPI IDirect3DRMFrame2Impl_GetAppData(IDirect3DRMFrame2* iface)
560 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
562 FIXME("(%p/%p)->(): stub\n", iface, This);
567 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetName(IDirect3DRMFrame2* iface, LPCSTR name)
569 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
571 FIXME("(%p/%p)->(%s): stub\n", iface, This, name);
576 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetName(IDirect3DRMFrame2* iface,
577 LPDWORD size, LPSTR name)
579 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
581 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, size, name);
586 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetClassName(IDirect3DRMFrame2* iface,
587 LPDWORD size, LPSTR name)
589 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
591 TRACE("(%p/%p)->(%p, %p)\n", iface, This, size, name);
593 return IDirect3DRMFrame3_GetClassName(&This->IDirect3DRMFrame3_iface, size, name);
596 /*** IDirect3DRMFrame methods ***/
597 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddChild(IDirect3DRMFrame2 *iface, IDirect3DRMFrame *child)
599 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
600 IDirect3DRMFrame3 *frame;
603 TRACE("(%p/%p)->(%p)\n", iface, This, child);
606 return D3DRMERR_BADOBJECT;
607 hr = IDirect3DRMFrame_QueryInterface(child, &IID_IDirect3DRMFrame3, (void**)&frame);
609 return D3DRMERR_BADOBJECT;
610 IDirect3DRMFrame_Release(child);
612 return IDirect3DRMFrame3_AddChild(&This->IDirect3DRMFrame3_iface, frame);
615 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddLight(IDirect3DRMFrame2 *iface, IDirect3DRMLight *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, IDirect3DRMLight *light)
929 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
931 TRACE("(%p/%p)->(%p)\n", iface, This, light);
933 return IDirect3DRMFrame3_DeleteLight(&This->IDirect3DRMFrame3_iface, light);
936 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteMoveCallback(IDirect3DRMFrame2* iface,
937 D3DRMFRAMEMOVECALLBACK cb, VOID *arg)
939 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
941 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, cb, arg);
946 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteVisual(IDirect3DRMFrame2 *iface, IDirect3DRMVisual *visual)
948 IDirect3DRMFrameImpl *frame = impl_from_IDirect3DRMFrame2(iface);
950 TRACE("iface %p, visual %p.\n", iface, visual);
952 return IDirect3DRMFrame3_DeleteVisual(&frame->IDirect3DRMFrame3_iface, (IUnknown *)visual);
955 static D3DCOLOR WINAPI IDirect3DRMFrame2Impl_GetSceneBackground(IDirect3DRMFrame2* iface)
957 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
959 TRACE("(%p/%p)->()\n", iface, This);
961 return IDirect3DRMFrame3_GetSceneBackground(&This->IDirect3DRMFrame3_iface);
964 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetSceneBackgroundDepth(IDirect3DRMFrame2 *iface,
965 IDirectDrawSurface **surface)
967 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
969 FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
974 static D3DCOLOR WINAPI IDirect3DRMFrame2Impl_GetSceneFogColor(IDirect3DRMFrame2* iface)
976 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
978 FIXME("(%p/%p)->(): stub\n", iface, This);
983 static BOOL WINAPI IDirect3DRMFrame2Impl_GetSceneFogEnable(IDirect3DRMFrame2* iface)
985 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
987 FIXME("(%p/%p)->(): stub\n", iface, This);
992 static D3DRMFOGMODE WINAPI IDirect3DRMFrame2Impl_GetSceneFogMode(IDirect3DRMFrame2* iface)
994 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
996 FIXME("(%p/%p)->(): stub\n", iface, This);
998 return D3DRMFOG_LINEAR;
1001 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetSceneFogParams(IDirect3DRMFrame2* iface,
1002 D3DVALUE *return_start,
1003 D3DVALUE *return_end,
1004 D3DVALUE *return_density)
1006 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1008 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, return_start, return_end, return_density);
1013 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackground(IDirect3DRMFrame2* iface,
1016 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1018 TRACE("(%p/%p)->(%u)\n", iface, This, color);
1020 return IDirect3DRMFrame3_SetSceneBackground(&This->IDirect3DRMFrame3_iface, color);
1023 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackgroundRGB(IDirect3DRMFrame2* iface,
1024 D3DVALUE red, D3DVALUE green,
1027 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1029 TRACE("(%p/%p)->(%f,%f,%f)\n", iface, This, red, green, blue);
1031 return IDirect3DRMFrame3_SetSceneBackgroundRGB(&This->IDirect3DRMFrame3_iface, red, green, blue);
1034 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackgroundDepth(IDirect3DRMFrame2 *iface,
1035 IDirectDrawSurface *surface)
1037 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1039 FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
1044 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackgroundImage(IDirect3DRMFrame2* iface,
1045 LPDIRECT3DRMTEXTURE texture)
1047 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1049 FIXME("(%p/%p)->(%p): stub\n", iface, This, texture);
1054 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneFogEnable(IDirect3DRMFrame2* iface, BOOL enable)
1056 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1058 FIXME("(%p/%p)->(%d): stub\n", iface, This, enable);
1063 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneFogColor(IDirect3DRMFrame2* iface,
1066 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1068 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
1073 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneFogMode(IDirect3DRMFrame2* iface,
1076 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1078 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
1083 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneFogParams(IDirect3DRMFrame2* iface,
1084 D3DVALUE start, D3DVALUE end,
1087 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1089 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, start, end, density);
1094 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetColor(IDirect3DRMFrame2* iface, D3DCOLOR color)
1096 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1098 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
1103 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetColorRGB(IDirect3DRMFrame2* iface, D3DVALUE red,
1104 D3DVALUE green, D3DVALUE blue)
1106 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1108 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, red, green, blue);
1113 static D3DRMZBUFFERMODE WINAPI IDirect3DRMFrame2Impl_GetZbufferMode(IDirect3DRMFrame2* iface)
1115 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1117 FIXME("(%p/%p)->(): stub\n", iface, This);
1119 return D3DRMZBUFFER_FROMPARENT;
1122 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetMaterialMode(IDirect3DRMFrame2* iface,
1123 D3DRMMATERIALMODE mode)
1125 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1127 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
1132 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetOrientation(IDirect3DRMFrame2 *iface, IDirect3DRMFrame *reference,
1133 D3DVALUE dx, D3DVALUE dy, D3DVALUE dz, D3DVALUE ux, D3DVALUE uy, D3DVALUE uz)
1135 FIXME("iface %p, reference %p, dx %.8e, dy %.8e, dz %.8e, ux %.8e, uy %.8e, uz %.8e stub!\n",
1136 iface, reference, dx, dy, dz, ux, uy, uz);
1141 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetPosition(IDirect3DRMFrame2 *iface, IDirect3DRMFrame *reference,
1142 D3DVALUE x, D3DVALUE y, D3DVALUE z)
1144 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e stub!\n", iface, reference, x, y, z);
1149 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetRotation(IDirect3DRMFrame2 *iface,
1150 IDirect3DRMFrame *reference, D3DVALUE x, D3DVALUE y, D3DVALUE z, D3DVALUE theta)
1152 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e, theta %.8e stub!\n",
1153 iface, reference, x, y, z, theta);
1158 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSortMode(IDirect3DRMFrame2* iface,
1161 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1163 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
1168 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetTexture(IDirect3DRMFrame2* iface,
1169 LPDIRECT3DRMTEXTURE texture)
1171 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1173 FIXME("(%p/%p)->(%p): stub\n", iface, This, texture);
1178 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetTextureTopology(IDirect3DRMFrame2* iface,
1179 BOOL wrap_u, BOOL wrap_v)
1181 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1183 FIXME("(%p/%p)->(%d,%d): stub\n", iface, This, wrap_u, wrap_v);
1188 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetVelocity(IDirect3DRMFrame2 *iface,
1189 IDirect3DRMFrame *reference, D3DVALUE x, D3DVALUE y, D3DVALUE z, BOOL with_rotation)
1191 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e, with_rotation %#x stub!\n",
1192 iface, reference, x, y, z, with_rotation);
1197 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetZbufferMode(IDirect3DRMFrame2* iface,
1198 D3DRMZBUFFERMODE mode)
1200 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1202 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
1207 static HRESULT WINAPI IDirect3DRMFrame2Impl_Transform(IDirect3DRMFrame2* iface, D3DVECTOR *d,
1210 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1212 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, d, s);
1217 /*** IDirect3DRMFrame2 methods ***/
1218 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddMoveCallback2(IDirect3DRMFrame2* iface,
1219 D3DRMFRAMEMOVECALLBACK cb, VOID *arg,
1222 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1224 FIXME("(%p/%p)->(%p,%p,%u): stub\n", iface, This, cb, arg, flags);
1229 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetBox(IDirect3DRMFrame2 *iface, D3DRMBOX *box)
1231 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1233 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
1238 static BOOL WINAPI IDirect3DRMFrame2Impl_GetBoxEnable(IDirect3DRMFrame2* iface)
1240 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1242 FIXME("(%p/%p)->(): stub\n", iface, This);
1247 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetAxes(IDirect3DRMFrame2 *iface,
1248 D3DVECTOR *dir, D3DVECTOR *up)
1250 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1252 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, dir, up);
1257 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetMaterial(IDirect3DRMFrame2* iface,
1258 LPDIRECT3DRMMATERIAL *material)
1260 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1262 FIXME("(%p/%p)->(%p): stub\n", iface, This, material);
1267 static BOOL WINAPI IDirect3DRMFrame2Impl_GetInheritAxes(IDirect3DRMFrame2* iface)
1269 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1271 FIXME("(%p/%p)->(): stub\n", iface, This);
1276 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetHierarchyBox(IDirect3DRMFrame2 *iface, D3DRMBOX *box)
1278 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1280 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
1285 static const struct IDirect3DRMFrame2Vtbl Direct3DRMFrame2_Vtbl =
1287 /*** IUnknown methods ***/
1288 IDirect3DRMFrame2Impl_QueryInterface,
1289 IDirect3DRMFrame2Impl_AddRef,
1290 IDirect3DRMFrame2Impl_Release,
1291 /*** IDirect3DRMObject methods ***/
1292 IDirect3DRMFrame2Impl_Clone,
1293 IDirect3DRMFrame2Impl_AddDestroyCallback,
1294 IDirect3DRMFrame2Impl_DeleteDestroyCallback,
1295 IDirect3DRMFrame2Impl_SetAppData,
1296 IDirect3DRMFrame2Impl_GetAppData,
1297 IDirect3DRMFrame2Impl_SetName,
1298 IDirect3DRMFrame2Impl_GetName,
1299 IDirect3DRMFrame2Impl_GetClassName,
1300 /*** IDirect3DRMFrame methods ***/
1301 IDirect3DRMFrame2Impl_AddChild,
1302 IDirect3DRMFrame2Impl_AddLight,
1303 IDirect3DRMFrame2Impl_AddMoveCallback,
1304 IDirect3DRMFrame2Impl_AddTransform,
1305 IDirect3DRMFrame2Impl_AddTranslation,
1306 IDirect3DRMFrame2Impl_AddScale,
1307 IDirect3DRMFrame2Impl_AddRotation,
1308 IDirect3DRMFrame2Impl_AddVisual,
1309 IDirect3DRMFrame2Impl_GetChildren,
1310 IDirect3DRMFrame2Impl_GetColor,
1311 IDirect3DRMFrame2Impl_GetLights,
1312 IDirect3DRMFrame2Impl_GetMaterialMode,
1313 IDirect3DRMFrame2Impl_GetParent,
1314 IDirect3DRMFrame2Impl_GetPosition,
1315 IDirect3DRMFrame2Impl_GetRotation,
1316 IDirect3DRMFrame2Impl_GetScene,
1317 IDirect3DRMFrame2Impl_GetSortMode,
1318 IDirect3DRMFrame2Impl_GetTexture,
1319 IDirect3DRMFrame2Impl_GetTransform,
1320 IDirect3DRMFrame2Impl_GetVelocity,
1321 IDirect3DRMFrame2Impl_GetOrientation,
1322 IDirect3DRMFrame2Impl_GetVisuals,
1323 IDirect3DRMFrame2Impl_GetTextureTopology,
1324 IDirect3DRMFrame2Impl_InverseTransform,
1325 IDirect3DRMFrame2Impl_Load,
1326 IDirect3DRMFrame2Impl_LookAt,
1327 IDirect3DRMFrame2Impl_Move,
1328 IDirect3DRMFrame2Impl_DeleteChild,
1329 IDirect3DRMFrame2Impl_DeleteLight,
1330 IDirect3DRMFrame2Impl_DeleteMoveCallback,
1331 IDirect3DRMFrame2Impl_DeleteVisual,
1332 IDirect3DRMFrame2Impl_GetSceneBackground,
1333 IDirect3DRMFrame2Impl_GetSceneBackgroundDepth,
1334 IDirect3DRMFrame2Impl_GetSceneFogColor,
1335 IDirect3DRMFrame2Impl_GetSceneFogEnable,
1336 IDirect3DRMFrame2Impl_GetSceneFogMode,
1337 IDirect3DRMFrame2Impl_GetSceneFogParams,
1338 IDirect3DRMFrame2Impl_SetSceneBackground,
1339 IDirect3DRMFrame2Impl_SetSceneBackgroundRGB,
1340 IDirect3DRMFrame2Impl_SetSceneBackgroundDepth,
1341 IDirect3DRMFrame2Impl_SetSceneBackgroundImage,
1342 IDirect3DRMFrame2Impl_SetSceneFogEnable,
1343 IDirect3DRMFrame2Impl_SetSceneFogColor,
1344 IDirect3DRMFrame2Impl_SetSceneFogMode,
1345 IDirect3DRMFrame2Impl_SetSceneFogParams,
1346 IDirect3DRMFrame2Impl_SetColor,
1347 IDirect3DRMFrame2Impl_SetColorRGB,
1348 IDirect3DRMFrame2Impl_GetZbufferMode,
1349 IDirect3DRMFrame2Impl_SetMaterialMode,
1350 IDirect3DRMFrame2Impl_SetOrientation,
1351 IDirect3DRMFrame2Impl_SetPosition,
1352 IDirect3DRMFrame2Impl_SetRotation,
1353 IDirect3DRMFrame2Impl_SetSortMode,
1354 IDirect3DRMFrame2Impl_SetTexture,
1355 IDirect3DRMFrame2Impl_SetTextureTopology,
1356 IDirect3DRMFrame2Impl_SetVelocity,
1357 IDirect3DRMFrame2Impl_SetZbufferMode,
1358 IDirect3DRMFrame2Impl_Transform,
1359 /*** IDirect3DRMFrame2 methods ***/
1360 IDirect3DRMFrame2Impl_AddMoveCallback2,
1361 IDirect3DRMFrame2Impl_GetBox,
1362 IDirect3DRMFrame2Impl_GetBoxEnable,
1363 IDirect3DRMFrame2Impl_GetAxes,
1364 IDirect3DRMFrame2Impl_GetMaterial,
1365 IDirect3DRMFrame2Impl_GetInheritAxes,
1366 IDirect3DRMFrame2Impl_GetHierarchyBox
1369 /*** IUnknown methods ***/
1370 static HRESULT WINAPI IDirect3DRMFrame3Impl_QueryInterface(IDirect3DRMFrame3* iface,
1371 REFIID riid, void** object)
1373 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1374 return IDirect3DRMFrame_QueryInterface(&This->IDirect3DRMFrame2_iface, riid, object);
1377 static ULONG WINAPI IDirect3DRMFrame3Impl_AddRef(IDirect3DRMFrame3* iface)
1379 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1380 return IDirect3DRMFrame2_AddRef(&This->IDirect3DRMFrame2_iface);
1383 static ULONG WINAPI IDirect3DRMFrame3Impl_Release(IDirect3DRMFrame3* iface)
1385 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1386 return IDirect3DRMFrame2_Release(&This->IDirect3DRMFrame2_iface);
1389 /*** IDirect3DRMObject methods ***/
1390 static HRESULT WINAPI IDirect3DRMFrame3Impl_Clone(IDirect3DRMFrame3* iface,
1391 LPUNKNOWN unkwn, REFIID riid,
1394 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1396 FIXME("(%p/%p)->(%p, %s, %p): stub\n", iface, This, unkwn, debugstr_guid(riid), object);
1401 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddDestroyCallback(IDirect3DRMFrame3* iface,
1402 D3DRMOBJECTCALLBACK cb,
1405 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1407 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
1412 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteDestroyCallback(IDirect3DRMFrame3* iface,
1413 D3DRMOBJECTCALLBACK cb,
1416 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1418 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
1423 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetAppData(IDirect3DRMFrame3* iface,
1426 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1428 FIXME("(%p/%p)->(%u): stub\n", iface, This, data);
1433 static DWORD WINAPI IDirect3DRMFrame3Impl_GetAppData(IDirect3DRMFrame3* iface)
1435 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1437 FIXME("(%p/%p)->(): stub\n", iface, This);
1442 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetName(IDirect3DRMFrame3* iface, LPCSTR name)
1444 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1446 FIXME("(%p/%p)->(%s): stub\n", iface, This, name);
1451 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetName(IDirect3DRMFrame3* iface,
1452 LPDWORD size, LPSTR name)
1454 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1456 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, size, name);
1461 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetClassName(IDirect3DRMFrame3* iface,
1462 LPDWORD size, LPSTR name)
1464 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1466 TRACE("(%p/%p)->(%p, %p)\n", iface, This, size, name);
1468 if (!size || *size < strlen("Frame") || !name)
1469 return E_INVALIDARG;
1471 strcpy(name, "Frame");
1472 *size = sizeof("Frame");
1477 /*** IDirect3DRMFrame methods ***/
1478 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddChild(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 *child)
1480 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1481 IDirect3DRMFrameImpl *child_obj = unsafe_impl_from_IDirect3DRMFrame3(child);
1483 TRACE("(%p/%p)->(%p)\n", iface, This, child);
1486 return D3DRMERR_BADOBJECT;
1488 if (child_obj->parent)
1490 IDirect3DRMFrame3* parent = &child_obj->parent->IDirect3DRMFrame3_iface;
1492 if (parent == iface)
1494 /* Passed frame is already a child so return success */
1499 /* Remove parent and continue */
1500 IDirect3DRMFrame3_DeleteChild(parent, child);
1504 if ((This->nb_children + 1) > This->children_capacity)
1507 IDirect3DRMFrame3** children;
1509 if (!This->children_capacity)
1512 children = HeapAlloc(GetProcessHeap(), 0, new_capacity * sizeof(IDirect3DRMFrame3*));
1516 new_capacity = This->children_capacity * 2;
1517 children = HeapReAlloc(GetProcessHeap(), 0, This->children, new_capacity * sizeof(IDirect3DRMFrame3*));
1521 return E_OUTOFMEMORY;
1523 This->children_capacity = new_capacity;
1524 This->children = children;
1527 This->children[This->nb_children++] = child;
1528 IDirect3DRMFrame3_AddRef(child);
1529 child_obj->parent = This;
1534 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddLight(IDirect3DRMFrame3 *iface, IDirect3DRMLight *light)
1536 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1538 IDirect3DRMLight** lights;
1540 TRACE("(%p/%p)->(%p)\n", iface, This, light);
1543 return D3DRMERR_BADOBJECT;
1545 /* Check if already existing and return gracefully without increasing ref count */
1546 for (i = 0; i < This->nb_lights; i++)
1547 if (This->lights[i] == light)
1550 if ((This->nb_lights + 1) > This->lights_capacity)
1554 if (!This->lights_capacity)
1557 lights = HeapAlloc(GetProcessHeap(), 0, new_capacity * sizeof(IDirect3DRMLight*));
1561 new_capacity = This->lights_capacity * 2;
1562 lights = HeapReAlloc(GetProcessHeap(), 0, This->lights, new_capacity * sizeof(IDirect3DRMLight*));
1566 return E_OUTOFMEMORY;
1568 This->lights_capacity = new_capacity;
1569 This->lights = lights;
1572 This->lights[This->nb_lights++] = light;
1573 IDirect3DRMLight_AddRef(light);
1578 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddMoveCallback(IDirect3DRMFrame3* iface,
1579 D3DRMFRAME3MOVECALLBACK cb, VOID *arg,
1582 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1584 FIXME("(%p/%p)->(%p,%p,%u): stub\n", iface, This, cb, arg, flags);
1589 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddTransform(IDirect3DRMFrame3* iface,
1590 D3DRMCOMBINETYPE type,
1591 D3DRMMATRIX4D matrix)
1593 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1595 TRACE("(%p/%p)->(%u,%p)\n", iface, This, type, matrix);
1599 case D3DRMCOMBINE_REPLACE:
1600 memcpy(This->transform, matrix, sizeof(D3DRMMATRIX4D));
1603 case D3DRMCOMBINE_BEFORE:
1604 FIXME("D3DRMCOMBINE_BEFORE not supported yed\n");
1607 case D3DRMCOMBINE_AFTER:
1608 FIXME("D3DRMCOMBINE_AFTER not supported yed\n");
1612 WARN("Unknown Combine Type %u\n", type);
1613 return D3DRMERR_BADVALUE;
1619 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddTranslation(IDirect3DRMFrame3* iface,
1620 D3DRMCOMBINETYPE type,
1621 D3DVALUE x, D3DVALUE y, D3DVALUE z)
1623 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1625 FIXME("(%p/%p)->(%u,%f,%f,%f): stub\n", iface, This, type, x, y, z);
1630 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddScale(IDirect3DRMFrame3* iface,
1631 D3DRMCOMBINETYPE type,
1632 D3DVALUE sx, D3DVALUE sy, D3DVALUE sz)
1634 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1636 FIXME("(%p/%p)->(%u,%f,%f,%f): stub\n", iface, This, type, sx, sy, sz);
1641 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddRotation(IDirect3DRMFrame3* iface,
1642 D3DRMCOMBINETYPE type,
1643 D3DVALUE x, D3DVALUE y, D3DVALUE z,
1646 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1648 FIXME("(%p/%p)->(%u,%f,%f,%f,%f): stub\n", iface, This, type, x, y, z, theta);
1653 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddVisual(IDirect3DRMFrame3* iface, LPUNKNOWN vis)
1655 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1657 IDirect3DRMVisual** visuals;
1659 TRACE("(%p/%p)->(%p)\n", iface, This, vis);
1662 return D3DRMERR_BADOBJECT;
1664 /* Check if already existing and return gracefully without increasing ref count */
1665 for (i = 0; i < This->nb_visuals; i++)
1666 if (This->visuals[i] == (IDirect3DRMVisual*)vis)
1669 if ((This->nb_visuals + 1) > This->visuals_capacity)
1673 if (!This->visuals_capacity)
1676 visuals = HeapAlloc(GetProcessHeap(), 0, new_capacity * sizeof(IDirect3DRMVisual*));
1680 new_capacity = This->visuals_capacity * 2;
1681 visuals = HeapReAlloc(GetProcessHeap(), 0, This->visuals, new_capacity * sizeof(IDirect3DRMVisual*));
1685 return E_OUTOFMEMORY;
1687 This->visuals_capacity = new_capacity;
1688 This->visuals = visuals;
1691 This->visuals[This->nb_visuals++] = (IDirect3DRMVisual*)vis;
1692 IDirect3DRMVisual_AddRef(vis);
1697 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetChildren(IDirect3DRMFrame3* iface,
1698 LPDIRECT3DRMFRAMEARRAY *children)
1700 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1701 IDirect3DRMFrameArrayImpl* obj;
1704 TRACE("(%p/%p)->(%p)\n", iface, This, children);
1707 return D3DRMERR_BADVALUE;
1709 hr = Direct3DRMFrameArray_create(children);
1714 obj = (IDirect3DRMFrameArrayImpl*)*children;
1716 obj->size = This->nb_children;
1717 if (This->nb_children)
1720 if (!(obj->frames = HeapAlloc(GetProcessHeap(), 0, This->nb_children * sizeof(*obj->frames))))
1721 return E_OUTOFMEMORY;
1722 for (i = 0; i < This->nb_children; i++)
1723 IDirect3DRMFrame3_QueryInterface(This->children[i], &IID_IDirect3DRMFrame, (void**)&obj->frames[i]);
1729 static D3DCOLOR WINAPI IDirect3DRMFrame3Impl_GetColor(IDirect3DRMFrame3* iface)
1731 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1733 FIXME("(%p/%p)->(): stub\n", iface, This);
1738 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetLights(IDirect3DRMFrame3* iface,
1739 LPDIRECT3DRMLIGHTARRAY *lights)
1741 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1742 IDirect3DRMLightArrayImpl* obj;
1745 TRACE("(%p/%p)->(%p)\n", iface, This, lights);
1748 return D3DRMERR_BADVALUE;
1750 hr = Direct3DRMLightArray_create(lights);
1755 obj = (IDirect3DRMLightArrayImpl*)*lights;
1757 obj->size = This->nb_lights;
1758 if (This->nb_lights)
1761 if (!(obj->lights = HeapAlloc(GetProcessHeap(), 0, This->nb_lights * sizeof(*obj->lights))))
1762 return E_OUTOFMEMORY;
1763 for (i = 0; i < This->nb_lights; i++)
1764 IDirect3DRMLight_QueryInterface(This->lights[i], &IID_IDirect3DRMLight, (void**)&obj->lights[i]);
1770 static D3DRMMATERIALMODE WINAPI IDirect3DRMFrame3Impl_GetMaterialMode(IDirect3DRMFrame3* iface)
1772 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1774 FIXME("(%p/%p)->(): stub\n", iface, This);
1776 return D3DRMMATERIAL_FROMPARENT;
1779 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetParent(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 **frame)
1781 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1783 TRACE("(%p/%p)->(%p)\n", iface, This, frame);
1786 return D3DRMERR_BADVALUE;
1790 *frame = &This->parent->IDirect3DRMFrame3_iface;
1791 IDirect3DRMFrame_AddRef(*frame);
1801 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetPosition(IDirect3DRMFrame3 *iface,
1802 IDirect3DRMFrame3 *reference, D3DVECTOR *return_position)
1804 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1806 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, reference, return_position);
1811 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetRotation(IDirect3DRMFrame3 *iface,
1812 IDirect3DRMFrame3 *reference, D3DVECTOR *axis, D3DVALUE *return_theta)
1814 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1816 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, reference, axis, return_theta);
1821 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetScene(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 **scene)
1823 FIXME("iface %p, scene %p stub!\n", iface, scene);
1828 static D3DRMSORTMODE WINAPI IDirect3DRMFrame3Impl_GetSortMode(IDirect3DRMFrame3* iface)
1830 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1832 FIXME("(%p/%p)->(): stub\n", iface, This);
1834 return D3DRMSORT_FROMPARENT;
1837 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetTexture(IDirect3DRMFrame3* iface,
1838 LPDIRECT3DRMTEXTURE3 * tex)
1840 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1842 FIXME("(%p/%p)->(%p): stub\n", iface, This, tex);
1847 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetTransform(IDirect3DRMFrame3 *iface,
1848 IDirect3DRMFrame3 *reference, D3DRMMATRIX4D return_matrix)
1850 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1852 TRACE("(%p/%p)->(%p,%p)\n", iface, This, reference, return_matrix);
1855 FIXME("Specifying a frame as the root of the scene different from the current root frame is not supported yet\n");
1857 memcpy(return_matrix, This->transform, sizeof(D3DRMMATRIX4D));
1862 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetVelocity(IDirect3DRMFrame3 *iface,
1863 IDirect3DRMFrame3 *reference, D3DVECTOR *return_velocity, BOOL with_rotation)
1865 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1867 FIXME("(%p/%p)->(%p,%p,%d): stub\n", iface, This, reference, return_velocity, with_rotation);
1872 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetOrientation(IDirect3DRMFrame3 *iface,
1873 IDirect3DRMFrame3 *reference, D3DVECTOR *dir, D3DVECTOR *up)
1875 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1877 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, reference, dir, up);
1882 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetVisuals(IDirect3DRMFrame3* iface, LPDWORD num,
1885 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1887 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, num, visuals);
1892 static HRESULT WINAPI IDirect3DRMFrame3Impl_InverseTransform(IDirect3DRMFrame3* iface,
1893 D3DVECTOR *d, D3DVECTOR *s)
1895 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1897 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, d, s);
1902 static HRESULT WINAPI IDirect3DRMFrame3Impl_Load(IDirect3DRMFrame3* iface, LPVOID filename,
1903 LPVOID name, D3DRMLOADOPTIONS loadflags,
1904 D3DRMLOADTEXTURE3CALLBACK cb, LPVOID lpArg)
1906 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1908 FIXME("(%p/%p)->(%p,%p,%u,%p,%p): stub\n", iface, This, filename, name, loadflags, cb, lpArg);
1913 static HRESULT WINAPI IDirect3DRMFrame3Impl_LookAt(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 *target,
1914 IDirect3DRMFrame3 *reference, D3DRMFRAMECONSTRAINT constraint)
1916 FIXME("iface %p, target %p, reference %p, constraint %#x stub!\n", iface, target, reference, constraint);
1921 static HRESULT WINAPI IDirect3DRMFrame3Impl_Move(IDirect3DRMFrame3* iface, D3DVALUE delta)
1923 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1925 FIXME("(%p/%p)->(%f): stub\n", iface, This, delta);
1930 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteChild(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 *frame)
1932 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1933 IDirect3DRMFrameImpl *frame_obj = unsafe_impl_from_IDirect3DRMFrame3(frame);
1936 TRACE("(%p/%p)->(%p)\n", iface, This, frame);
1939 return D3DRMERR_BADOBJECT;
1941 /* Check if child exists */
1942 for (i = 0; i < This->nb_children; i++)
1943 if (This->children[i] == frame)
1946 if (i == This->nb_children)
1947 return D3DRMERR_BADVALUE;
1949 memmove(This->children + i, This->children + i + 1, sizeof(IDirect3DRMFrame3*) * (This->nb_children - 1 - i));
1950 IDirect3DRMFrame3_Release(frame);
1951 frame_obj->parent = NULL;
1952 This->nb_children--;
1957 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteLight(IDirect3DRMFrame3 *iface, IDirect3DRMLight *light)
1959 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1962 TRACE("(%p/%p)->(%p)\n", iface, This, light);
1965 return D3DRMERR_BADOBJECT;
1967 /* Check if visual exists */
1968 for (i = 0; i < This->nb_lights; i++)
1969 if (This->lights[i] == light)
1972 if (i == This->nb_lights)
1973 return D3DRMERR_BADVALUE;
1975 memmove(This->lights + i, This->lights + i + 1, sizeof(IDirect3DRMLight*) * (This->nb_lights - 1 - i));
1976 IDirect3DRMLight_Release(light);
1982 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteMoveCallback(IDirect3DRMFrame3* iface,
1983 D3DRMFRAME3MOVECALLBACK cb,
1986 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1988 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, cb, arg);
1993 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteVisual(IDirect3DRMFrame3* iface, LPUNKNOWN vis)
1995 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1998 TRACE("(%p/%p)->(%p)\n", iface, This, vis);
2001 return D3DRMERR_BADOBJECT;
2003 /* Check if visual exists */
2004 for (i = 0; i < This->nb_visuals; i++)
2005 if (This->visuals[i] == (IDirect3DRMVisual*)vis)
2008 if (i == This->nb_visuals)
2009 return D3DRMERR_BADVALUE;
2011 memmove(This->visuals + i, This->visuals + i + 1, sizeof(IDirect3DRMVisual*) * (This->nb_visuals - 1 - i));
2012 IDirect3DRMVisual_Release(vis);
2018 static D3DCOLOR WINAPI IDirect3DRMFrame3Impl_GetSceneBackground(IDirect3DRMFrame3* iface)
2020 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2022 TRACE("(%p/%p)->()\n", iface, This);
2024 return This->scenebackground;
2027 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetSceneBackgroundDepth(IDirect3DRMFrame3 *iface,
2028 IDirectDrawSurface **surface)
2030 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2032 FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
2037 static D3DCOLOR WINAPI IDirect3DRMFrame3Impl_GetSceneFogColor(IDirect3DRMFrame3* iface)
2039 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2041 FIXME("(%p/%p)->(): stub\n", iface, This);
2046 static BOOL WINAPI IDirect3DRMFrame3Impl_GetSceneFogEnable(IDirect3DRMFrame3* iface)
2048 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2050 FIXME("(%p/%p)->(): stub\n", iface, This);
2055 static D3DRMFOGMODE WINAPI IDirect3DRMFrame3Impl_GetSceneFogMode(IDirect3DRMFrame3* iface)
2057 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2059 FIXME("(%p/%p)->(): stub\n", iface, This);
2061 return D3DRMFOG_LINEAR;
2064 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetSceneFogParams(IDirect3DRMFrame3* iface,
2065 D3DVALUE *return_start,
2066 D3DVALUE *return_end,
2067 D3DVALUE *return_density)
2069 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2071 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, return_start, return_end, return_density);
2076 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackground(IDirect3DRMFrame3* iface,
2079 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2081 TRACE("(%p/%p)->(%u)\n", iface, This, color);
2083 This->scenebackground = color;
2088 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackgroundRGB(IDirect3DRMFrame3* iface,
2089 D3DVALUE red, D3DVALUE green,
2092 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2094 TRACE("(%p/%p)->(%f,%f,%f)\n", iface, This, red, green, blue);
2096 This->scenebackground = RGBA_MAKE((BYTE)(red * 255.0f),
2097 (BYTE)(green * 255.0f), (BYTE)(blue * 255.0f), 0xff);
2102 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackgroundDepth(IDirect3DRMFrame3 *iface,
2103 IDirectDrawSurface *surface)
2105 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2107 FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
2112 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackgroundImage(IDirect3DRMFrame3* iface,
2113 LPDIRECT3DRMTEXTURE3 texture)
2115 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2117 FIXME("(%p/%p)->(%p): stub\n", iface, This, texture);
2122 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogEnable(IDirect3DRMFrame3* iface, BOOL enable)
2124 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2126 FIXME("(%p/%p)->(%d): stub\n", iface, This, enable);
2131 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogColor(IDirect3DRMFrame3* iface,
2134 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2136 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
2141 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogMode(IDirect3DRMFrame3* iface,
2144 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2146 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
2151 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogParams(IDirect3DRMFrame3* iface,
2152 D3DVALUE start, D3DVALUE end,
2155 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2157 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, start, end, density);
2162 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetColor(IDirect3DRMFrame3* iface, D3DCOLOR color)
2164 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2166 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
2171 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetColorRGB(IDirect3DRMFrame3* iface, D3DVALUE red,
2172 D3DVALUE green, D3DVALUE blue)
2174 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2176 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, red, green, blue);
2181 static D3DRMZBUFFERMODE WINAPI IDirect3DRMFrame3Impl_GetZbufferMode(IDirect3DRMFrame3* iface)
2183 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2185 FIXME("(%p/%p)->(): stub\n", iface, This);
2187 return D3DRMZBUFFER_FROMPARENT;
2190 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetMaterialMode(IDirect3DRMFrame3* iface,
2191 D3DRMMATERIALMODE mode)
2193 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2195 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
2200 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetOrientation(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 *reference,
2201 D3DVALUE dx, D3DVALUE dy, D3DVALUE dz, D3DVALUE ux, D3DVALUE uy, D3DVALUE uz)
2203 FIXME("iface %p, reference %p, dx %.8e, dy %.8e, dz %.8e, ux %.8e, uy %.8e, uz %.8e stub!\n",
2204 iface, reference, dx, dy, dz, ux, uy, uz);
2209 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetPosition(IDirect3DRMFrame3 *iface,
2210 IDirect3DRMFrame3 *reference, D3DVALUE x, D3DVALUE y, D3DVALUE z)
2212 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e stub!\n", iface, reference, x, y, z);
2217 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetRotation(IDirect3DRMFrame3 *iface,
2218 IDirect3DRMFrame3 *reference, D3DVALUE x, D3DVALUE y, D3DVALUE z, D3DVALUE theta)
2220 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e, theta %.8e stub!\n",
2221 iface, reference, x, y, z, theta);
2226 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSortMode(IDirect3DRMFrame3* iface,
2229 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2231 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
2236 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetTexture(IDirect3DRMFrame3* iface,
2237 LPDIRECT3DRMTEXTURE3 texture)
2239 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2241 FIXME("(%p/%p)->(%p): stub\n", iface, This, texture);
2246 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetVelocity(IDirect3DRMFrame3 *iface,
2247 IDirect3DRMFrame3 *reference, D3DVALUE x, D3DVALUE y, D3DVALUE z, BOOL with_rotation)
2249 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e, with_rotation %#x.\n",
2250 iface, reference, x, y, z, with_rotation);
2255 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetZbufferMode(IDirect3DRMFrame3* iface,
2256 D3DRMZBUFFERMODE mode)
2258 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2260 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
2265 static HRESULT WINAPI IDirect3DRMFrame3Impl_Transform(IDirect3DRMFrame3* iface, D3DVECTOR *d,
2268 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2270 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, d, s);
2275 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetBox(IDirect3DRMFrame3 *iface, D3DRMBOX *box)
2277 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2279 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
2284 static BOOL WINAPI IDirect3DRMFrame3Impl_GetBoxEnable(IDirect3DRMFrame3* iface)
2286 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2288 FIXME("(%p/%p)->(): stub\n", iface, This);
2293 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetAxes(IDirect3DRMFrame3 *iface, D3DVECTOR *dir, D3DVECTOR *up)
2295 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2297 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, dir, up);
2302 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetMaterial(IDirect3DRMFrame3* iface,
2303 LPDIRECT3DRMMATERIAL2 *material)
2305 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2307 FIXME("(%p/%p)->(%p): stub\n", iface, This, material);
2312 static BOOL WINAPI IDirect3DRMFrame3Impl_GetInheritAxes(IDirect3DRMFrame3* iface)
2314 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2316 FIXME("(%p/%p)->(): stub\n", iface, This);
2321 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetHierarchyBox(IDirect3DRMFrame3* iface, D3DRMBOX *box)
2323 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2325 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
2330 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetBox(IDirect3DRMFrame3 *iface, D3DRMBOX *box)
2332 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2334 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
2339 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetBoxEnable(IDirect3DRMFrame3* iface, BOOL enable)
2341 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2343 FIXME("(%p/%p)->(%u): stub\n", iface, This, enable);
2348 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetAxes(IDirect3DRMFrame3* iface,
2349 D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
2350 D3DVALUE ux, D3DVALUE uy, D3DVALUE uz)
2352 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2354 FIXME("(%p/%p)->(%f,%f,%f,%f,%f,%f): stub\n", iface, This, dx, dy, dz, ux, uy, uz);
2359 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetInheritAxes(IDirect3DRMFrame3* iface,
2360 BOOL inherit_from_parent)
2362 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2364 FIXME("(%p/%p)->(%u): stub\n", iface, This, inherit_from_parent);
2369 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetMaterial(IDirect3DRMFrame3* iface,
2370 LPDIRECT3DRMMATERIAL2 material)
2372 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2374 FIXME("(%p/%p)->(%p): stub\n", iface, This, material);
2379 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetQuaternion(IDirect3DRMFrame3 *iface,
2380 IDirect3DRMFrame3 *reference, D3DRMQUATERNION *q)
2382 FIXME("iface %p, reference %p, q %p stub!\n", iface, reference, q);
2387 static HRESULT WINAPI IDirect3DRMFrame3Impl_RayPick(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 *reference,
2388 D3DRMRAY *ray, DWORD flags, IDirect3DRMPicked2Array **return_visuals)
2390 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2392 FIXME("(%p/%p)->(%p,%p,%u,%p): stub\n", iface, This, reference, ray, flags, return_visuals);
2397 static HRESULT WINAPI IDirect3DRMFrame3Impl_Save(IDirect3DRMFrame3* iface, LPCSTR filename,
2398 D3DRMXOFFORMAT d3dFormat,
2399 D3DRMSAVEOPTIONS d3dSaveFlags)
2401 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2403 FIXME("(%p/%p)->(%p,%u,%u): stub\n", iface, This, filename, d3dFormat, d3dSaveFlags);
2408 static HRESULT WINAPI IDirect3DRMFrame3Impl_TransformVectors(IDirect3DRMFrame3 *iface,
2409 IDirect3DRMFrame3 *reference, DWORD num, D3DVECTOR *dst, D3DVECTOR *src)
2411 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2413 FIXME("(%p/%p)->(%p,%u,%p,%p): stub\n", iface, This, reference, num, dst, src);
2418 static HRESULT WINAPI IDirect3DRMFrame3Impl_InverseTransformVectors(IDirect3DRMFrame3 *iface,
2419 IDirect3DRMFrame3 *reference, DWORD num, D3DVECTOR *dst, D3DVECTOR *src)
2421 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2423 FIXME("(%p/%p)->(%p,%u,%p,%p): stub\n", iface, This, reference, num, dst, src);
2428 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetTraversalOptions(IDirect3DRMFrame3* iface,
2431 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2433 FIXME("(%p/%p)->(%u): stub\n", iface, This, flags);
2438 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetTraversalOptions(IDirect3DRMFrame3* iface,
2441 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2443 FIXME("(%p/%p)->(%p): stub\n", iface, This, flags);
2448 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogMethod(IDirect3DRMFrame3* iface,
2451 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2453 FIXME("(%p/%p)->(%u): stub\n", iface, This, flags);
2458 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetSceneFogMethod(IDirect3DRMFrame3* iface,
2461 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2463 FIXME("(%p/%p)->(%p): stub\n", iface, This, flags);
2468 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetMaterialOverride(IDirect3DRMFrame3 *iface,
2469 D3DRMMATERIALOVERRIDE *override)
2471 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2473 FIXME("(%p/%p)->(%p): stub\n", iface, This, override);
2478 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetMaterialOverride(IDirect3DRMFrame3 *iface,
2479 D3DRMMATERIALOVERRIDE *override)
2481 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2483 FIXME("(%p/%p)->(%p): stub\n", iface, This, override);
2488 static const struct IDirect3DRMFrame3Vtbl Direct3DRMFrame3_Vtbl =
2490 /*** IUnknown methods ***/
2491 IDirect3DRMFrame3Impl_QueryInterface,
2492 IDirect3DRMFrame3Impl_AddRef,
2493 IDirect3DRMFrame3Impl_Release,
2494 /*** IDirect3DRMObject methods ***/
2495 IDirect3DRMFrame3Impl_Clone,
2496 IDirect3DRMFrame3Impl_AddDestroyCallback,
2497 IDirect3DRMFrame3Impl_DeleteDestroyCallback,
2498 IDirect3DRMFrame3Impl_SetAppData,
2499 IDirect3DRMFrame3Impl_GetAppData,
2500 IDirect3DRMFrame3Impl_SetName,
2501 IDirect3DRMFrame3Impl_GetName,
2502 IDirect3DRMFrame3Impl_GetClassName,
2503 /*** IDirect3DRMFrame3 methods ***/
2504 IDirect3DRMFrame3Impl_AddChild,
2505 IDirect3DRMFrame3Impl_AddLight,
2506 IDirect3DRMFrame3Impl_AddMoveCallback,
2507 IDirect3DRMFrame3Impl_AddTransform,
2508 IDirect3DRMFrame3Impl_AddTranslation,
2509 IDirect3DRMFrame3Impl_AddScale,
2510 IDirect3DRMFrame3Impl_AddRotation,
2511 IDirect3DRMFrame3Impl_AddVisual,
2512 IDirect3DRMFrame3Impl_GetChildren,
2513 IDirect3DRMFrame3Impl_GetColor,
2514 IDirect3DRMFrame3Impl_GetLights,
2515 IDirect3DRMFrame3Impl_GetMaterialMode,
2516 IDirect3DRMFrame3Impl_GetParent,
2517 IDirect3DRMFrame3Impl_GetPosition,
2518 IDirect3DRMFrame3Impl_GetRotation,
2519 IDirect3DRMFrame3Impl_GetScene,
2520 IDirect3DRMFrame3Impl_GetSortMode,
2521 IDirect3DRMFrame3Impl_GetTexture,
2522 IDirect3DRMFrame3Impl_GetTransform,
2523 IDirect3DRMFrame3Impl_GetVelocity,
2524 IDirect3DRMFrame3Impl_GetOrientation,
2525 IDirect3DRMFrame3Impl_GetVisuals,
2526 IDirect3DRMFrame3Impl_InverseTransform,
2527 IDirect3DRMFrame3Impl_Load,
2528 IDirect3DRMFrame3Impl_LookAt,
2529 IDirect3DRMFrame3Impl_Move,
2530 IDirect3DRMFrame3Impl_DeleteChild,
2531 IDirect3DRMFrame3Impl_DeleteLight,
2532 IDirect3DRMFrame3Impl_DeleteMoveCallback,
2533 IDirect3DRMFrame3Impl_DeleteVisual,
2534 IDirect3DRMFrame3Impl_GetSceneBackground,
2535 IDirect3DRMFrame3Impl_GetSceneBackgroundDepth,
2536 IDirect3DRMFrame3Impl_GetSceneFogColor,
2537 IDirect3DRMFrame3Impl_GetSceneFogEnable,
2538 IDirect3DRMFrame3Impl_GetSceneFogMode,
2539 IDirect3DRMFrame3Impl_GetSceneFogParams,
2540 IDirect3DRMFrame3Impl_SetSceneBackground,
2541 IDirect3DRMFrame3Impl_SetSceneBackgroundRGB,
2542 IDirect3DRMFrame3Impl_SetSceneBackgroundDepth,
2543 IDirect3DRMFrame3Impl_SetSceneBackgroundImage,
2544 IDirect3DRMFrame3Impl_SetSceneFogEnable,
2545 IDirect3DRMFrame3Impl_SetSceneFogColor,
2546 IDirect3DRMFrame3Impl_SetSceneFogMode,
2547 IDirect3DRMFrame3Impl_SetSceneFogParams,
2548 IDirect3DRMFrame3Impl_SetColor,
2549 IDirect3DRMFrame3Impl_SetColorRGB,
2550 IDirect3DRMFrame3Impl_GetZbufferMode,
2551 IDirect3DRMFrame3Impl_SetMaterialMode,
2552 IDirect3DRMFrame3Impl_SetOrientation,
2553 IDirect3DRMFrame3Impl_SetPosition,
2554 IDirect3DRMFrame3Impl_SetRotation,
2555 IDirect3DRMFrame3Impl_SetSortMode,
2556 IDirect3DRMFrame3Impl_SetTexture,
2557 IDirect3DRMFrame3Impl_SetVelocity,
2558 IDirect3DRMFrame3Impl_SetZbufferMode,
2559 IDirect3DRMFrame3Impl_Transform,
2560 IDirect3DRMFrame3Impl_GetBox,
2561 IDirect3DRMFrame3Impl_GetBoxEnable,
2562 IDirect3DRMFrame3Impl_GetAxes,
2563 IDirect3DRMFrame3Impl_GetMaterial,
2564 IDirect3DRMFrame3Impl_GetInheritAxes,
2565 IDirect3DRMFrame3Impl_GetHierarchyBox,
2566 IDirect3DRMFrame3Impl_SetBox,
2567 IDirect3DRMFrame3Impl_SetBoxEnable,
2568 IDirect3DRMFrame3Impl_SetAxes,
2569 IDirect3DRMFrame3Impl_SetInheritAxes,
2570 IDirect3DRMFrame3Impl_SetMaterial,
2571 IDirect3DRMFrame3Impl_SetQuaternion,
2572 IDirect3DRMFrame3Impl_RayPick,
2573 IDirect3DRMFrame3Impl_Save,
2574 IDirect3DRMFrame3Impl_TransformVectors,
2575 IDirect3DRMFrame3Impl_InverseTransformVectors,
2576 IDirect3DRMFrame3Impl_SetTraversalOptions,
2577 IDirect3DRMFrame3Impl_GetTraversalOptions,
2578 IDirect3DRMFrame3Impl_SetSceneFogMethod,
2579 IDirect3DRMFrame3Impl_GetSceneFogMethod,
2580 IDirect3DRMFrame3Impl_SetMaterialOverride,
2581 IDirect3DRMFrame3Impl_GetMaterialOverride
2584 static inline IDirect3DRMFrameImpl *unsafe_impl_from_IDirect3DRMFrame3(IDirect3DRMFrame3 *iface)
2588 assert(iface->lpVtbl == &Direct3DRMFrame3_Vtbl);
2590 return impl_from_IDirect3DRMFrame3(iface);
2593 HRESULT Direct3DRMFrame_create(REFIID riid, IUnknown* parent, IUnknown** ret_iface)
2595 IDirect3DRMFrameImpl* object;
2598 TRACE("(%s, %p, %p)\n", wine_dbgstr_guid(riid), parent, ret_iface);
2600 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMFrameImpl));
2602 return E_OUTOFMEMORY;
2604 object->IDirect3DRMFrame2_iface.lpVtbl = &Direct3DRMFrame2_Vtbl;
2605 object->IDirect3DRMFrame3_iface.lpVtbl = &Direct3DRMFrame3_Vtbl;
2607 object->scenebackground = RGBA_MAKE(0, 0, 0, 0xff);
2609 memcpy(object->transform, identity, sizeof(D3DRMMATRIX4D));
2613 IDirect3DRMFrame3 *p;
2615 hr = IDirect3DRMFrame_QueryInterface(parent, &IID_IDirect3DRMFrame3, (void**)&p);
2618 HeapFree(GetProcessHeap(), 0, object);
2621 IDirect3DRMFrame_Release(parent);
2622 IDirect3DRMFrame3_AddChild(p, &object->IDirect3DRMFrame3_iface);
2625 hr = IDirect3DRMFrame3_QueryInterface(&object->IDirect3DRMFrame3_iface, riid, (void**)ret_iface);
2626 IDirect3DRMFrame3_Release(&object->IDirect3DRMFrame3_iface);