d3drm: Avoid LPDIRECT3DRMMATERIAL2.
[wine/multimedia.git] / dlls / d3drm / frame.c
blob35d5643151cd5bdd6926f85aa34c539be0e16f38
1 /*
2 * Implementation of IDirect3DRMFrame Interface
4 * Copyright 2011, 2012 André Hentschel
5 * Copyright 2012 Christian Costa
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 #include <assert.h>
23 #include "wine/debug.h"
25 #define COBJMACROS
27 #include "winbase.h"
28 #include "wingdi.h"
30 #include "d3drm_private.h"
32 WINE_DEFAULT_DEBUG_CHANNEL(d3drm);
34 static D3DRMMATRIX4D identity = {
35 { 1.0f, 0.0f, 0.0f, 0.0f },
36 { 0.0f, 1.0f, 0.0f, 0.0f },
37 { 0.0f, 0.0f, 1.0f, 0.0f },
38 { 0.0f, 0.0f, 0.0f, 1.0f }
41 typedef struct IDirect3DRMFrameImpl IDirect3DRMFrameImpl;
43 struct IDirect3DRMFrameImpl {
44 IDirect3DRMFrame2 IDirect3DRMFrame2_iface;
45 IDirect3DRMFrame3 IDirect3DRMFrame3_iface;
46 LONG ref;
47 IDirect3DRMFrameImpl* parent;
48 ULONG nb_children;
49 ULONG children_capacity;
50 IDirect3DRMFrame3** children;
51 ULONG nb_visuals;
52 ULONG visuals_capacity;
53 IDirect3DRMVisual** visuals;
54 ULONG nb_lights;
55 ULONG lights_capacity;
56 IDirect3DRMLight** lights;
57 D3DRMMATRIX4D transform;
58 D3DCOLOR scenebackground;
61 typedef struct {
62 IDirect3DRMFrameArray IDirect3DRMFrameArray_iface;
63 LONG ref;
64 ULONG size;
65 IDirect3DRMFrame **frames;
66 } IDirect3DRMFrameArrayImpl;
68 typedef struct {
69 IDirect3DRMVisualArray IDirect3DRMVisualArray_iface;
70 LONG ref;
71 ULONG size;
72 IDirect3DRMVisual **visuals;
73 } IDirect3DRMVisualArrayImpl;
75 typedef struct {
76 IDirect3DRMLightArray IDirect3DRMLightArray_iface;
77 LONG ref;
78 ULONG size;
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);
107 *object = NULL;
109 if (IsEqualGUID(riid, &IID_IUnknown) ||
110 IsEqualGUID(riid, &IID_IDirect3DRMFrameArray))
112 *object = &This->IDirect3DRMFrameArray_iface;
114 else
116 FIXME("interface %s not implemented\n", debugstr_guid(riid));
117 return E_NOINTERFACE;
120 IDirect3DRMFrameArray_AddRef(iface);
121 return S_OK;
124 static ULONG WINAPI IDirect3DRMFrameArrayImpl_AddRef(IDirect3DRMFrameArray* iface)
126 IDirect3DRMFrameArrayImpl *This = (IDirect3DRMFrameArrayImpl*)iface;
127 ULONG ref = InterlockedIncrement(&This->ref);
129 TRACE("(%p)->(): new ref = %u\n", This, ref);
131 return ref;
134 static ULONG WINAPI IDirect3DRMFrameArrayImpl_Release(IDirect3DRMFrameArray* iface)
136 IDirect3DRMFrameArrayImpl *This = (IDirect3DRMFrameArrayImpl*)iface;
137 ULONG ref = InterlockedDecrement(&This->ref);
138 ULONG i;
140 TRACE("(%p)->(): new ref = %u\n", This, ref);
142 if (!ref)
144 for (i = 0; i < This->size; i++)
145 IDirect3DRMFrame_Release(This->frames[i]);
146 HeapFree(GetProcessHeap(), 0, This->frames);
147 HeapFree(GetProcessHeap(), 0, This);
150 return ref;
153 /*** IDirect3DRMArray methods ***/
154 static DWORD WINAPI IDirect3DRMFrameArrayImpl_GetSize(IDirect3DRMFrameArray* iface)
156 IDirect3DRMFrameArrayImpl *This = (IDirect3DRMFrameArrayImpl*)iface;
158 TRACE("(%p)->() = %d\n", This, This->size);
160 return This->size;
163 /*** IDirect3DRMFrameArray methods ***/
164 static HRESULT WINAPI IDirect3DRMFrameArrayImpl_GetElement(IDirect3DRMFrameArray *iface,
165 DWORD index, IDirect3DRMFrame **frame)
167 IDirect3DRMFrameArrayImpl *This = (IDirect3DRMFrameArrayImpl*)iface;
169 TRACE("(%p)->(%u, %p)\n", This, index, frame);
171 if (!frame)
172 return D3DRMERR_BADVALUE;
174 *frame = NULL;
176 if (index >= This->size)
177 return D3DRMERR_BADVALUE;
179 IDirect3DRMFrame_AddRef(This->frames[index]);
180 *frame = This->frames[index];
182 return D3DRM_OK;
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);
203 *obj = NULL;
205 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMFrameArrayImpl));
206 if (!object)
207 return E_OUTOFMEMORY;
209 object->IDirect3DRMFrameArray_iface.lpVtbl = &Direct3DRMFrameArray_Vtbl;
210 object->ref = 1;
212 *obj = &object->IDirect3DRMFrameArray_iface;
214 return S_OK;
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))
226 *ret_iface = iface;
227 IDirect3DRMVisualArray_AddRef(iface);
228 return S_OK;
231 *ret_iface = NULL;
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);
245 return ref;
248 static ULONG WINAPI IDirect3DRMVisualArrayImpl_Release(IDirect3DRMVisualArray* iface)
250 IDirect3DRMVisualArrayImpl *This = (IDirect3DRMVisualArrayImpl*)iface;
251 ULONG ref = InterlockedDecrement(&This->ref);
252 ULONG i;
254 TRACE("(%p)->(): new ref = %u\n", iface, ref);
256 if (!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);
264 return ref;
267 /*** IDirect3DRMArray methods ***/
268 static DWORD WINAPI IDirect3DRMVisualArrayImpl_GetSize(IDirect3DRMVisualArray* iface)
270 IDirect3DRMVisualArrayImpl *This = (IDirect3DRMVisualArrayImpl*)iface;
272 TRACE("(%p)->() = %d\n", iface, This->size);
274 return 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);
285 if (!visual)
286 return D3DRMERR_BADVALUE;
288 *visual = NULL;
290 if (index >= This->size)
291 return D3DRMERR_BADVALUE;
293 IDirect3DRMVisual_AddRef(This->visuals[index]);
294 *visual = This->visuals[index];
296 return D3DRM_OK;
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);
317 *ret_iface = NULL;
319 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMVisualArrayImpl));
320 if (!object)
321 return E_OUTOFMEMORY;
323 object->IDirect3DRMVisualArray_iface.lpVtbl = &Direct3DRMVisualArray_Vtbl;
324 object->ref = 1;
326 *ret_iface = &object->IDirect3DRMVisualArray_iface;
328 return S_OK;
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);
339 *object = NULL;
341 if (IsEqualGUID(riid, &IID_IUnknown) ||
342 IsEqualGUID(riid, &IID_IDirect3DRMLightArray))
344 *object = &This->IDirect3DRMLightArray_iface;
346 else
348 FIXME("interface %s not implemented\n", debugstr_guid(riid));
349 return E_NOINTERFACE;
352 IDirect3DRMLightArray_AddRef(iface);
353 return S_OK;
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);
363 return ref;
366 static ULONG WINAPI IDirect3DRMLightArrayImpl_Release(IDirect3DRMLightArray* iface)
368 IDirect3DRMLightArrayImpl *This = impl_from_IDirect3DRMLightArray(iface);
369 ULONG ref = InterlockedDecrement(&This->ref);
370 ULONG i;
372 TRACE("(%p)->(): new ref = %u\n", This, ref);
374 if (!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);
382 return ref;
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);
392 return 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);
403 if (!light)
404 return D3DRMERR_BADVALUE;
406 *light = NULL;
408 if (index >= This->size)
409 return D3DRMERR_BADVALUE;
411 IDirect3DRMLight_AddRef(This->lights[index]);
412 *light = This->lights[index];
414 return D3DRM_OK;
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);
435 *obj = NULL;
437 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMLightArrayImpl));
438 if (!object)
439 return E_OUTOFMEMORY;
441 object->IDirect3DRMLightArray_iface.lpVtbl = &Direct3DRMLightArray_Vtbl;
442 object->ref = 1;
444 *obj = &object->IDirect3DRMLightArray_iface;
446 return S_OK;
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);
457 *object = NULL;
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;
469 else
471 FIXME("interface %s not implemented\n", debugstr_guid(riid));
472 return E_NOINTERFACE;
475 IDirect3DRMFrame2_AddRef(iface);
476 return S_OK;
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);
486 return ref;
489 static ULONG WINAPI IDirect3DRMFrame2Impl_Release(IDirect3DRMFrame2* iface)
491 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
492 ULONG ref = InterlockedDecrement(&This->ref);
493 ULONG i;
495 TRACE("(%p)->(): new ref = %d\n", This, ref);
497 if (!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);
511 return ref;
514 /*** IDirect3DRMObject methods ***/
515 static HRESULT WINAPI IDirect3DRMFrame2Impl_Clone(IDirect3DRMFrame2* iface,
516 LPUNKNOWN unkwn, REFIID riid,
517 LPVOID* object)
519 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
521 FIXME("(%p/%p)->(%p, %s, %p): stub\n", iface, This, unkwn, debugstr_guid(riid), object);
523 return E_NOTIMPL;
526 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddDestroyCallback(IDirect3DRMFrame2* iface,
527 D3DRMOBJECTCALLBACK cb,
528 LPVOID argument)
530 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
532 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
534 return E_NOTIMPL;
537 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteDestroyCallback(IDirect3DRMFrame2* iface,
538 D3DRMOBJECTCALLBACK cb,
539 LPVOID argument)
541 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
543 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
545 return E_NOTIMPL;
548 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetAppData(IDirect3DRMFrame2* iface,
549 DWORD data)
551 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
553 FIXME("(%p/%p)->(%u): stub\n", iface, This, data);
555 return E_NOTIMPL;
558 static DWORD WINAPI IDirect3DRMFrame2Impl_GetAppData(IDirect3DRMFrame2* iface)
560 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
562 FIXME("(%p/%p)->(): stub\n", iface, This);
564 return 0;
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);
573 return E_NOTIMPL;
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);
583 return E_NOTIMPL;
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;
601 HRESULT hr;
603 TRACE("(%p/%p)->(%p)\n", iface, This, child);
605 if (!child)
606 return D3DRMERR_BADOBJECT;
607 hr = IDirect3DRMFrame_QueryInterface(child, &IID_IDirect3DRMFrame3, (void**)&frame);
608 if (hr != S_OK)
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);
631 return E_NOTIMPL;
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);
653 return E_NOTIMPL;
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);
664 return E_NOTIMPL;
667 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddRotation(IDirect3DRMFrame2* iface,
668 D3DRMCOMBINETYPE type,
669 D3DVALUE x, D3DVALUE y, D3DVALUE z,
670 D3DVALUE theta)
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);
676 return E_NOTIMPL;
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);
704 return 0;
707 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetLights(IDirect3DRMFrame2* iface,
708 LPDIRECT3DRMLIGHTARRAY *lights)
710 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
712 TRACE("(%p/%p)->(%p)\n", iface, This, lights);
714 return IDirect3DRMFrame3_GetLights(&This->IDirect3DRMFrame3_iface, lights);
717 static D3DRMMATERIALMODE WINAPI IDirect3DRMFrame2Impl_GetMaterialMode(IDirect3DRMFrame2* iface)
719 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
721 FIXME("(%p/%p)->(): stub\n", iface, This);
723 return D3DRMMATERIAL_FROMPARENT;
726 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetParent(IDirect3DRMFrame2 *iface, IDirect3DRMFrame **frame)
728 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
730 TRACE("(%p/%p)->(%p)\n", iface, This, frame);
732 if (!frame)
733 return D3DRMERR_BADVALUE;
735 if (This->parent)
737 *frame = (IDirect3DRMFrame *)&This->parent->IDirect3DRMFrame2_iface;
738 IDirect3DRMFrame_AddRef(*frame);
740 else
742 *frame = NULL;
745 return D3DRM_OK;
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);
755 return E_NOTIMPL;
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);
765 return E_NOTIMPL;
768 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetScene(IDirect3DRMFrame2 *iface, IDirect3DRMFrame **scene)
770 FIXME("iface %p, frame %p stub!\n", iface, scene);
772 return E_NOTIMPL;
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, IDirect3DRMTexture **texture)
786 FIXME("iface %p, texture %p stub!\n", iface, texture);
788 return E_NOTIMPL;
791 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetTransform(IDirect3DRMFrame2* iface,
792 D3DRMMATRIX4D return_matrix)
794 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
796 TRACE("(%p/%p)->(%p)\n", iface, This, return_matrix);
798 memcpy(return_matrix, This->transform, sizeof(D3DRMMATRIX4D));
800 return D3DRM_OK;
803 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetVelocity(IDirect3DRMFrame2 *iface,
804 IDirect3DRMFrame *reference, D3DVECTOR *return_velocity, BOOL with_rotation)
806 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
808 FIXME("(%p/%p)->(%p,%p,%d): stub\n", iface, This, reference, return_velocity, with_rotation);
810 return E_NOTIMPL;
813 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetOrientation(IDirect3DRMFrame2 *iface,
814 IDirect3DRMFrame *reference, D3DVECTOR *dir, D3DVECTOR *up)
816 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
818 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, reference, dir, up);
820 return E_NOTIMPL;
823 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetVisuals(IDirect3DRMFrame2* iface,
824 LPDIRECT3DRMVISUALARRAY *visuals)
826 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
827 IDirect3DRMVisualArrayImpl* obj;
828 HRESULT hr;
830 TRACE("(%p/%p)->(%p)\n", iface, This, visuals);
832 if (!visuals)
833 return D3DRMERR_BADVALUE;
835 hr = Direct3DRMVisualArray_create(visuals);
837 if (hr != D3DRM_OK)
838 return hr;
840 obj = (IDirect3DRMVisualArrayImpl*)*visuals;
842 obj->size = This->nb_visuals;
843 if (This->nb_visuals)
845 ULONG i;
846 if (!(obj->visuals = HeapAlloc(GetProcessHeap(), 0, This->nb_visuals * sizeof(*obj->visuals))))
847 return E_OUTOFMEMORY;
848 for (i = 0; i < This->nb_visuals; i++)
850 obj->visuals[i] = This->visuals[i];
851 IDirect3DRMVisual_AddRef(This->visuals[i]);
855 return D3DRM_OK;
858 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetTextureTopology(IDirect3DRMFrame2* iface,
859 BOOL *wrap_u, BOOL *wrap_v)
861 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
863 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, wrap_u, wrap_v);
865 return E_NOTIMPL;
868 static HRESULT WINAPI IDirect3DRMFrame2Impl_InverseTransform(IDirect3DRMFrame2* iface,
869 D3DVECTOR *d, D3DVECTOR *s)
871 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
873 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, d, s);
875 return E_NOTIMPL;
878 static HRESULT WINAPI IDirect3DRMFrame2Impl_Load(IDirect3DRMFrame2* iface, LPVOID filename,
879 LPVOID name, D3DRMLOADOPTIONS loadflags,
880 D3DRMLOADTEXTURECALLBACK cb, LPVOID lpArg)
882 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
884 FIXME("(%p/%p)->(%p,%p,%u,%p,%p): stub\n", iface, This, filename, name, loadflags, cb, lpArg);
886 return E_NOTIMPL;
889 static HRESULT WINAPI IDirect3DRMFrame2Impl_LookAt(IDirect3DRMFrame2 *iface, IDirect3DRMFrame *target,
890 IDirect3DRMFrame *reference, D3DRMFRAMECONSTRAINT constraint)
892 FIXME("iface %p, target %p, reference %p, constraint %#x stub!\n", iface, target, reference, constraint);
894 return E_NOTIMPL;
897 static HRESULT WINAPI IDirect3DRMFrame2Impl_Move(IDirect3DRMFrame2* iface, D3DVALUE delta)
899 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
901 FIXME("(%p/%p)->(%f): stub\n", iface, This, delta);
903 return E_NOTIMPL;
906 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteChild(IDirect3DRMFrame2 *iface, IDirect3DRMFrame *frame)
908 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
909 IDirect3DRMFrame3 *child;
910 HRESULT hr;
912 TRACE("(%p/%p)->(%p)\n", iface, This, frame);
914 if (!frame)
915 return D3DRMERR_BADOBJECT;
916 hr = IDirect3DRMFrame_QueryInterface(frame, &IID_IDirect3DRMFrame3, (void**)&child);
917 if (hr != S_OK)
918 return D3DRMERR_BADOBJECT;
919 IDirect3DRMFrame_Release(frame);
921 return IDirect3DRMFrame3_DeleteChild(&This->IDirect3DRMFrame3_iface, child);
924 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteLight(IDirect3DRMFrame2 *iface, IDirect3DRMLight *light)
926 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
928 TRACE("(%p/%p)->(%p)\n", iface, This, light);
930 return IDirect3DRMFrame3_DeleteLight(&This->IDirect3DRMFrame3_iface, light);
933 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteMoveCallback(IDirect3DRMFrame2* iface,
934 D3DRMFRAMEMOVECALLBACK cb, VOID *arg)
936 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
938 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, cb, arg);
940 return E_NOTIMPL;
943 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteVisual(IDirect3DRMFrame2 *iface, IDirect3DRMVisual *visual)
945 IDirect3DRMFrameImpl *frame = impl_from_IDirect3DRMFrame2(iface);
947 TRACE("iface %p, visual %p.\n", iface, visual);
949 return IDirect3DRMFrame3_DeleteVisual(&frame->IDirect3DRMFrame3_iface, (IUnknown *)visual);
952 static D3DCOLOR WINAPI IDirect3DRMFrame2Impl_GetSceneBackground(IDirect3DRMFrame2* iface)
954 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
956 TRACE("(%p/%p)->()\n", iface, This);
958 return IDirect3DRMFrame3_GetSceneBackground(&This->IDirect3DRMFrame3_iface);
961 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetSceneBackgroundDepth(IDirect3DRMFrame2 *iface,
962 IDirectDrawSurface **surface)
964 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
966 FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
968 return E_NOTIMPL;
971 static D3DCOLOR WINAPI IDirect3DRMFrame2Impl_GetSceneFogColor(IDirect3DRMFrame2* iface)
973 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
975 FIXME("(%p/%p)->(): stub\n", iface, This);
977 return 0;
980 static BOOL WINAPI IDirect3DRMFrame2Impl_GetSceneFogEnable(IDirect3DRMFrame2* iface)
982 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
984 FIXME("(%p/%p)->(): stub\n", iface, This);
986 return FALSE;
989 static D3DRMFOGMODE WINAPI IDirect3DRMFrame2Impl_GetSceneFogMode(IDirect3DRMFrame2* iface)
991 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
993 FIXME("(%p/%p)->(): stub\n", iface, This);
995 return D3DRMFOG_LINEAR;
998 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetSceneFogParams(IDirect3DRMFrame2* iface,
999 D3DVALUE *return_start,
1000 D3DVALUE *return_end,
1001 D3DVALUE *return_density)
1003 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1005 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, return_start, return_end, return_density);
1007 return E_NOTIMPL;
1010 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackground(IDirect3DRMFrame2* iface,
1011 D3DCOLOR color)
1013 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1015 TRACE("(%p/%p)->(%u)\n", iface, This, color);
1017 return IDirect3DRMFrame3_SetSceneBackground(&This->IDirect3DRMFrame3_iface, color);
1020 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackgroundRGB(IDirect3DRMFrame2* iface,
1021 D3DVALUE red, D3DVALUE green,
1022 D3DVALUE blue)
1024 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1026 TRACE("(%p/%p)->(%f,%f,%f)\n", iface, This, red, green, blue);
1028 return IDirect3DRMFrame3_SetSceneBackgroundRGB(&This->IDirect3DRMFrame3_iface, red, green, blue);
1031 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackgroundDepth(IDirect3DRMFrame2 *iface,
1032 IDirectDrawSurface *surface)
1034 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1036 FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
1038 return E_NOTIMPL;
1041 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackgroundImage(IDirect3DRMFrame2 *iface,
1042 IDirect3DRMTexture *texture)
1044 FIXME("iface %p, texture %p stub!\n", iface, texture);
1046 return E_NOTIMPL;
1049 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneFogEnable(IDirect3DRMFrame2* iface, BOOL enable)
1051 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1053 FIXME("(%p/%p)->(%d): stub\n", iface, This, enable);
1055 return E_NOTIMPL;
1058 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneFogColor(IDirect3DRMFrame2* iface,
1059 D3DCOLOR color)
1061 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1063 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
1065 return E_NOTIMPL;
1068 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneFogMode(IDirect3DRMFrame2* iface,
1069 D3DRMFOGMODE mode)
1071 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1073 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
1075 return E_NOTIMPL;
1078 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneFogParams(IDirect3DRMFrame2* iface,
1079 D3DVALUE start, D3DVALUE end,
1080 D3DVALUE density)
1082 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1084 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, start, end, density);
1086 return E_NOTIMPL;
1089 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetColor(IDirect3DRMFrame2* iface, D3DCOLOR color)
1091 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1093 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
1095 return E_NOTIMPL;
1098 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetColorRGB(IDirect3DRMFrame2* iface, D3DVALUE red,
1099 D3DVALUE green, D3DVALUE blue)
1101 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1103 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, red, green, blue);
1105 return E_NOTIMPL;
1108 static D3DRMZBUFFERMODE WINAPI IDirect3DRMFrame2Impl_GetZbufferMode(IDirect3DRMFrame2* iface)
1110 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1112 FIXME("(%p/%p)->(): stub\n", iface, This);
1114 return D3DRMZBUFFER_FROMPARENT;
1117 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetMaterialMode(IDirect3DRMFrame2* iface,
1118 D3DRMMATERIALMODE mode)
1120 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1122 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
1124 return E_NOTIMPL;
1127 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetOrientation(IDirect3DRMFrame2 *iface, IDirect3DRMFrame *reference,
1128 D3DVALUE dx, D3DVALUE dy, D3DVALUE dz, D3DVALUE ux, D3DVALUE uy, D3DVALUE uz)
1130 FIXME("iface %p, reference %p, dx %.8e, dy %.8e, dz %.8e, ux %.8e, uy %.8e, uz %.8e stub!\n",
1131 iface, reference, dx, dy, dz, ux, uy, uz);
1133 return E_NOTIMPL;
1136 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetPosition(IDirect3DRMFrame2 *iface, IDirect3DRMFrame *reference,
1137 D3DVALUE x, D3DVALUE y, D3DVALUE z)
1139 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e stub!\n", iface, reference, x, y, z);
1141 return E_NOTIMPL;
1144 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetRotation(IDirect3DRMFrame2 *iface,
1145 IDirect3DRMFrame *reference, D3DVALUE x, D3DVALUE y, D3DVALUE z, D3DVALUE theta)
1147 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e, theta %.8e stub!\n",
1148 iface, reference, x, y, z, theta);
1150 return E_NOTIMPL;
1153 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSortMode(IDirect3DRMFrame2* iface,
1154 D3DRMSORTMODE mode)
1156 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1158 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
1160 return E_NOTIMPL;
1163 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetTexture(IDirect3DRMFrame2 *iface, IDirect3DRMTexture *texture)
1165 FIXME("iface %p, texture %p stub!\n", iface, texture);
1167 return E_NOTIMPL;
1170 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetTextureTopology(IDirect3DRMFrame2* iface,
1171 BOOL wrap_u, BOOL wrap_v)
1173 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1175 FIXME("(%p/%p)->(%d,%d): stub\n", iface, This, wrap_u, wrap_v);
1177 return E_NOTIMPL;
1180 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetVelocity(IDirect3DRMFrame2 *iface,
1181 IDirect3DRMFrame *reference, D3DVALUE x, D3DVALUE y, D3DVALUE z, BOOL with_rotation)
1183 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e, with_rotation %#x stub!\n",
1184 iface, reference, x, y, z, with_rotation);
1186 return E_NOTIMPL;
1189 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetZbufferMode(IDirect3DRMFrame2* iface,
1190 D3DRMZBUFFERMODE mode)
1192 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1194 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
1196 return E_NOTIMPL;
1199 static HRESULT WINAPI IDirect3DRMFrame2Impl_Transform(IDirect3DRMFrame2* iface, D3DVECTOR *d,
1200 D3DVECTOR *s)
1202 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1204 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, d, s);
1206 return E_NOTIMPL;
1209 /*** IDirect3DRMFrame2 methods ***/
1210 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddMoveCallback2(IDirect3DRMFrame2* iface,
1211 D3DRMFRAMEMOVECALLBACK cb, VOID *arg,
1212 DWORD flags)
1214 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1216 FIXME("(%p/%p)->(%p,%p,%u): stub\n", iface, This, cb, arg, flags);
1218 return E_NOTIMPL;
1221 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetBox(IDirect3DRMFrame2 *iface, D3DRMBOX *box)
1223 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1225 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
1227 return E_NOTIMPL;
1230 static BOOL WINAPI IDirect3DRMFrame2Impl_GetBoxEnable(IDirect3DRMFrame2* iface)
1232 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1234 FIXME("(%p/%p)->(): stub\n", iface, This);
1236 return E_NOTIMPL;
1239 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetAxes(IDirect3DRMFrame2 *iface,
1240 D3DVECTOR *dir, D3DVECTOR *up)
1242 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1244 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, dir, up);
1246 return E_NOTIMPL;
1249 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetMaterial(IDirect3DRMFrame2 *iface, IDirect3DRMMaterial **material)
1251 FIXME("iface %p, material %p stub!\n", iface, material);
1253 return E_NOTIMPL;
1256 static BOOL WINAPI IDirect3DRMFrame2Impl_GetInheritAxes(IDirect3DRMFrame2* iface)
1258 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1260 FIXME("(%p/%p)->(): stub\n", iface, This);
1262 return E_NOTIMPL;
1265 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetHierarchyBox(IDirect3DRMFrame2 *iface, D3DRMBOX *box)
1267 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1269 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
1271 return E_NOTIMPL;
1274 static const struct IDirect3DRMFrame2Vtbl Direct3DRMFrame2_Vtbl =
1276 /*** IUnknown methods ***/
1277 IDirect3DRMFrame2Impl_QueryInterface,
1278 IDirect3DRMFrame2Impl_AddRef,
1279 IDirect3DRMFrame2Impl_Release,
1280 /*** IDirect3DRMObject methods ***/
1281 IDirect3DRMFrame2Impl_Clone,
1282 IDirect3DRMFrame2Impl_AddDestroyCallback,
1283 IDirect3DRMFrame2Impl_DeleteDestroyCallback,
1284 IDirect3DRMFrame2Impl_SetAppData,
1285 IDirect3DRMFrame2Impl_GetAppData,
1286 IDirect3DRMFrame2Impl_SetName,
1287 IDirect3DRMFrame2Impl_GetName,
1288 IDirect3DRMFrame2Impl_GetClassName,
1289 /*** IDirect3DRMFrame methods ***/
1290 IDirect3DRMFrame2Impl_AddChild,
1291 IDirect3DRMFrame2Impl_AddLight,
1292 IDirect3DRMFrame2Impl_AddMoveCallback,
1293 IDirect3DRMFrame2Impl_AddTransform,
1294 IDirect3DRMFrame2Impl_AddTranslation,
1295 IDirect3DRMFrame2Impl_AddScale,
1296 IDirect3DRMFrame2Impl_AddRotation,
1297 IDirect3DRMFrame2Impl_AddVisual,
1298 IDirect3DRMFrame2Impl_GetChildren,
1299 IDirect3DRMFrame2Impl_GetColor,
1300 IDirect3DRMFrame2Impl_GetLights,
1301 IDirect3DRMFrame2Impl_GetMaterialMode,
1302 IDirect3DRMFrame2Impl_GetParent,
1303 IDirect3DRMFrame2Impl_GetPosition,
1304 IDirect3DRMFrame2Impl_GetRotation,
1305 IDirect3DRMFrame2Impl_GetScene,
1306 IDirect3DRMFrame2Impl_GetSortMode,
1307 IDirect3DRMFrame2Impl_GetTexture,
1308 IDirect3DRMFrame2Impl_GetTransform,
1309 IDirect3DRMFrame2Impl_GetVelocity,
1310 IDirect3DRMFrame2Impl_GetOrientation,
1311 IDirect3DRMFrame2Impl_GetVisuals,
1312 IDirect3DRMFrame2Impl_GetTextureTopology,
1313 IDirect3DRMFrame2Impl_InverseTransform,
1314 IDirect3DRMFrame2Impl_Load,
1315 IDirect3DRMFrame2Impl_LookAt,
1316 IDirect3DRMFrame2Impl_Move,
1317 IDirect3DRMFrame2Impl_DeleteChild,
1318 IDirect3DRMFrame2Impl_DeleteLight,
1319 IDirect3DRMFrame2Impl_DeleteMoveCallback,
1320 IDirect3DRMFrame2Impl_DeleteVisual,
1321 IDirect3DRMFrame2Impl_GetSceneBackground,
1322 IDirect3DRMFrame2Impl_GetSceneBackgroundDepth,
1323 IDirect3DRMFrame2Impl_GetSceneFogColor,
1324 IDirect3DRMFrame2Impl_GetSceneFogEnable,
1325 IDirect3DRMFrame2Impl_GetSceneFogMode,
1326 IDirect3DRMFrame2Impl_GetSceneFogParams,
1327 IDirect3DRMFrame2Impl_SetSceneBackground,
1328 IDirect3DRMFrame2Impl_SetSceneBackgroundRGB,
1329 IDirect3DRMFrame2Impl_SetSceneBackgroundDepth,
1330 IDirect3DRMFrame2Impl_SetSceneBackgroundImage,
1331 IDirect3DRMFrame2Impl_SetSceneFogEnable,
1332 IDirect3DRMFrame2Impl_SetSceneFogColor,
1333 IDirect3DRMFrame2Impl_SetSceneFogMode,
1334 IDirect3DRMFrame2Impl_SetSceneFogParams,
1335 IDirect3DRMFrame2Impl_SetColor,
1336 IDirect3DRMFrame2Impl_SetColorRGB,
1337 IDirect3DRMFrame2Impl_GetZbufferMode,
1338 IDirect3DRMFrame2Impl_SetMaterialMode,
1339 IDirect3DRMFrame2Impl_SetOrientation,
1340 IDirect3DRMFrame2Impl_SetPosition,
1341 IDirect3DRMFrame2Impl_SetRotation,
1342 IDirect3DRMFrame2Impl_SetSortMode,
1343 IDirect3DRMFrame2Impl_SetTexture,
1344 IDirect3DRMFrame2Impl_SetTextureTopology,
1345 IDirect3DRMFrame2Impl_SetVelocity,
1346 IDirect3DRMFrame2Impl_SetZbufferMode,
1347 IDirect3DRMFrame2Impl_Transform,
1348 /*** IDirect3DRMFrame2 methods ***/
1349 IDirect3DRMFrame2Impl_AddMoveCallback2,
1350 IDirect3DRMFrame2Impl_GetBox,
1351 IDirect3DRMFrame2Impl_GetBoxEnable,
1352 IDirect3DRMFrame2Impl_GetAxes,
1353 IDirect3DRMFrame2Impl_GetMaterial,
1354 IDirect3DRMFrame2Impl_GetInheritAxes,
1355 IDirect3DRMFrame2Impl_GetHierarchyBox
1358 /*** IUnknown methods ***/
1359 static HRESULT WINAPI IDirect3DRMFrame3Impl_QueryInterface(IDirect3DRMFrame3* iface,
1360 REFIID riid, void** object)
1362 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1363 return IDirect3DRMFrame_QueryInterface(&This->IDirect3DRMFrame2_iface, riid, object);
1366 static ULONG WINAPI IDirect3DRMFrame3Impl_AddRef(IDirect3DRMFrame3* iface)
1368 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1369 return IDirect3DRMFrame2_AddRef(&This->IDirect3DRMFrame2_iface);
1372 static ULONG WINAPI IDirect3DRMFrame3Impl_Release(IDirect3DRMFrame3* iface)
1374 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1375 return IDirect3DRMFrame2_Release(&This->IDirect3DRMFrame2_iface);
1378 /*** IDirect3DRMObject methods ***/
1379 static HRESULT WINAPI IDirect3DRMFrame3Impl_Clone(IDirect3DRMFrame3* iface,
1380 LPUNKNOWN unkwn, REFIID riid,
1381 LPVOID* object)
1383 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1385 FIXME("(%p/%p)->(%p, %s, %p): stub\n", iface, This, unkwn, debugstr_guid(riid), object);
1387 return E_NOTIMPL;
1390 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddDestroyCallback(IDirect3DRMFrame3* iface,
1391 D3DRMOBJECTCALLBACK cb,
1392 LPVOID argument)
1394 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1396 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
1398 return E_NOTIMPL;
1401 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteDestroyCallback(IDirect3DRMFrame3* iface,
1402 D3DRMOBJECTCALLBACK cb,
1403 LPVOID argument)
1405 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1407 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
1409 return E_NOTIMPL;
1412 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetAppData(IDirect3DRMFrame3* iface,
1413 DWORD data)
1415 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1417 FIXME("(%p/%p)->(%u): stub\n", iface, This, data);
1419 return E_NOTIMPL;
1422 static DWORD WINAPI IDirect3DRMFrame3Impl_GetAppData(IDirect3DRMFrame3* iface)
1424 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1426 FIXME("(%p/%p)->(): stub\n", iface, This);
1428 return 0;
1431 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetName(IDirect3DRMFrame3* iface, LPCSTR name)
1433 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1435 FIXME("(%p/%p)->(%s): stub\n", iface, This, name);
1437 return E_NOTIMPL;
1440 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetName(IDirect3DRMFrame3* iface,
1441 LPDWORD size, LPSTR name)
1443 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1445 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, size, name);
1447 return E_NOTIMPL;
1450 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetClassName(IDirect3DRMFrame3* iface,
1451 LPDWORD size, LPSTR name)
1453 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1455 TRACE("(%p/%p)->(%p, %p)\n", iface, This, size, name);
1457 if (!size || *size < strlen("Frame") || !name)
1458 return E_INVALIDARG;
1460 strcpy(name, "Frame");
1461 *size = sizeof("Frame");
1463 return D3DRM_OK;
1466 /*** IDirect3DRMFrame methods ***/
1467 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddChild(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 *child)
1469 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1470 IDirect3DRMFrameImpl *child_obj = unsafe_impl_from_IDirect3DRMFrame3(child);
1472 TRACE("(%p/%p)->(%p)\n", iface, This, child);
1474 if (!child_obj)
1475 return D3DRMERR_BADOBJECT;
1477 if (child_obj->parent)
1479 IDirect3DRMFrame3* parent = &child_obj->parent->IDirect3DRMFrame3_iface;
1481 if (parent == iface)
1483 /* Passed frame is already a child so return success */
1484 return D3DRM_OK;
1486 else
1488 /* Remove parent and continue */
1489 IDirect3DRMFrame3_DeleteChild(parent, child);
1493 if ((This->nb_children + 1) > This->children_capacity)
1495 ULONG new_capacity;
1496 IDirect3DRMFrame3** children;
1498 if (!This->children_capacity)
1500 new_capacity = 16;
1501 children = HeapAlloc(GetProcessHeap(), 0, new_capacity * sizeof(IDirect3DRMFrame3*));
1503 else
1505 new_capacity = This->children_capacity * 2;
1506 children = HeapReAlloc(GetProcessHeap(), 0, This->children, new_capacity * sizeof(IDirect3DRMFrame3*));
1509 if (!children)
1510 return E_OUTOFMEMORY;
1512 This->children_capacity = new_capacity;
1513 This->children = children;
1516 This->children[This->nb_children++] = child;
1517 IDirect3DRMFrame3_AddRef(child);
1518 child_obj->parent = This;
1520 return D3DRM_OK;
1523 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddLight(IDirect3DRMFrame3 *iface, IDirect3DRMLight *light)
1525 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1526 ULONG i;
1527 IDirect3DRMLight** lights;
1529 TRACE("(%p/%p)->(%p)\n", iface, This, light);
1531 if (!light)
1532 return D3DRMERR_BADOBJECT;
1534 /* Check if already existing and return gracefully without increasing ref count */
1535 for (i = 0; i < This->nb_lights; i++)
1536 if (This->lights[i] == light)
1537 return D3DRM_OK;
1539 if ((This->nb_lights + 1) > This->lights_capacity)
1541 ULONG new_capacity;
1543 if (!This->lights_capacity)
1545 new_capacity = 16;
1546 lights = HeapAlloc(GetProcessHeap(), 0, new_capacity * sizeof(IDirect3DRMLight*));
1548 else
1550 new_capacity = This->lights_capacity * 2;
1551 lights = HeapReAlloc(GetProcessHeap(), 0, This->lights, new_capacity * sizeof(IDirect3DRMLight*));
1554 if (!lights)
1555 return E_OUTOFMEMORY;
1557 This->lights_capacity = new_capacity;
1558 This->lights = lights;
1561 This->lights[This->nb_lights++] = light;
1562 IDirect3DRMLight_AddRef(light);
1564 return D3DRM_OK;
1567 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddMoveCallback(IDirect3DRMFrame3* iface,
1568 D3DRMFRAME3MOVECALLBACK cb, VOID *arg,
1569 DWORD flags)
1571 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1573 FIXME("(%p/%p)->(%p,%p,%u): stub\n", iface, This, cb, arg, flags);
1575 return E_NOTIMPL;
1578 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddTransform(IDirect3DRMFrame3* iface,
1579 D3DRMCOMBINETYPE type,
1580 D3DRMMATRIX4D matrix)
1582 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1584 TRACE("(%p/%p)->(%u,%p)\n", iface, This, type, matrix);
1586 switch (type)
1588 case D3DRMCOMBINE_REPLACE:
1589 memcpy(This->transform, matrix, sizeof(D3DRMMATRIX4D));
1590 break;
1592 case D3DRMCOMBINE_BEFORE:
1593 FIXME("D3DRMCOMBINE_BEFORE not supported yed\n");
1594 break;
1596 case D3DRMCOMBINE_AFTER:
1597 FIXME("D3DRMCOMBINE_AFTER not supported yed\n");
1598 break;
1600 default:
1601 WARN("Unknown Combine Type %u\n", type);
1602 return D3DRMERR_BADVALUE;
1605 return S_OK;
1608 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddTranslation(IDirect3DRMFrame3* iface,
1609 D3DRMCOMBINETYPE type,
1610 D3DVALUE x, D3DVALUE y, D3DVALUE z)
1612 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1614 FIXME("(%p/%p)->(%u,%f,%f,%f): stub\n", iface, This, type, x, y, z);
1616 return E_NOTIMPL;
1619 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddScale(IDirect3DRMFrame3* iface,
1620 D3DRMCOMBINETYPE type,
1621 D3DVALUE sx, D3DVALUE sy, D3DVALUE sz)
1623 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1625 FIXME("(%p/%p)->(%u,%f,%f,%f): stub\n", iface, This, type, sx, sy, sz);
1627 return E_NOTIMPL;
1630 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddRotation(IDirect3DRMFrame3* iface,
1631 D3DRMCOMBINETYPE type,
1632 D3DVALUE x, D3DVALUE y, D3DVALUE z,
1633 D3DVALUE theta)
1635 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1637 FIXME("(%p/%p)->(%u,%f,%f,%f,%f): stub\n", iface, This, type, x, y, z, theta);
1639 return E_NOTIMPL;
1642 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddVisual(IDirect3DRMFrame3* iface, LPUNKNOWN vis)
1644 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1645 ULONG i;
1646 IDirect3DRMVisual** visuals;
1648 TRACE("(%p/%p)->(%p)\n", iface, This, vis);
1650 if (!vis)
1651 return D3DRMERR_BADOBJECT;
1653 /* Check if already existing and return gracefully without increasing ref count */
1654 for (i = 0; i < This->nb_visuals; i++)
1655 if (This->visuals[i] == (IDirect3DRMVisual*)vis)
1656 return D3DRM_OK;
1658 if ((This->nb_visuals + 1) > This->visuals_capacity)
1660 ULONG new_capacity;
1662 if (!This->visuals_capacity)
1664 new_capacity = 16;
1665 visuals = HeapAlloc(GetProcessHeap(), 0, new_capacity * sizeof(IDirect3DRMVisual*));
1667 else
1669 new_capacity = This->visuals_capacity * 2;
1670 visuals = HeapReAlloc(GetProcessHeap(), 0, This->visuals, new_capacity * sizeof(IDirect3DRMVisual*));
1673 if (!visuals)
1674 return E_OUTOFMEMORY;
1676 This->visuals_capacity = new_capacity;
1677 This->visuals = visuals;
1680 This->visuals[This->nb_visuals++] = (IDirect3DRMVisual*)vis;
1681 IDirect3DRMVisual_AddRef(vis);
1683 return D3DRM_OK;
1686 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetChildren(IDirect3DRMFrame3* iface,
1687 LPDIRECT3DRMFRAMEARRAY *children)
1689 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1690 IDirect3DRMFrameArrayImpl* obj;
1691 HRESULT hr;
1693 TRACE("(%p/%p)->(%p)\n", iface, This, children);
1695 if (!children)
1696 return D3DRMERR_BADVALUE;
1698 hr = Direct3DRMFrameArray_create(children);
1700 if (hr != D3DRM_OK)
1701 return hr;
1703 obj = (IDirect3DRMFrameArrayImpl*)*children;
1705 obj->size = This->nb_children;
1706 if (This->nb_children)
1708 ULONG i;
1709 if (!(obj->frames = HeapAlloc(GetProcessHeap(), 0, This->nb_children * sizeof(*obj->frames))))
1710 return E_OUTOFMEMORY;
1711 for (i = 0; i < This->nb_children; i++)
1712 IDirect3DRMFrame3_QueryInterface(This->children[i], &IID_IDirect3DRMFrame, (void**)&obj->frames[i]);
1715 return D3DRM_OK;
1718 static D3DCOLOR WINAPI IDirect3DRMFrame3Impl_GetColor(IDirect3DRMFrame3* iface)
1720 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1722 FIXME("(%p/%p)->(): stub\n", iface, This);
1724 return 0;
1727 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetLights(IDirect3DRMFrame3* iface,
1728 LPDIRECT3DRMLIGHTARRAY *lights)
1730 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1731 IDirect3DRMLightArrayImpl* obj;
1732 HRESULT hr;
1734 TRACE("(%p/%p)->(%p)\n", iface, This, lights);
1736 if (!lights)
1737 return D3DRMERR_BADVALUE;
1739 hr = Direct3DRMLightArray_create(lights);
1741 if (hr != D3DRM_OK)
1742 return hr;
1744 obj = (IDirect3DRMLightArrayImpl*)*lights;
1746 obj->size = This->nb_lights;
1747 if (This->nb_lights)
1749 ULONG i;
1750 if (!(obj->lights = HeapAlloc(GetProcessHeap(), 0, This->nb_lights * sizeof(*obj->lights))))
1751 return E_OUTOFMEMORY;
1752 for (i = 0; i < This->nb_lights; i++)
1753 IDirect3DRMLight_QueryInterface(This->lights[i], &IID_IDirect3DRMLight, (void**)&obj->lights[i]);
1756 return D3DRM_OK;
1759 static D3DRMMATERIALMODE WINAPI IDirect3DRMFrame3Impl_GetMaterialMode(IDirect3DRMFrame3* iface)
1761 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1763 FIXME("(%p/%p)->(): stub\n", iface, This);
1765 return D3DRMMATERIAL_FROMPARENT;
1768 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetParent(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 **frame)
1770 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1772 TRACE("(%p/%p)->(%p)\n", iface, This, frame);
1774 if (!frame)
1775 return D3DRMERR_BADVALUE;
1777 if (This->parent)
1779 *frame = &This->parent->IDirect3DRMFrame3_iface;
1780 IDirect3DRMFrame_AddRef(*frame);
1782 else
1784 *frame = NULL;
1787 return D3DRM_OK;
1790 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetPosition(IDirect3DRMFrame3 *iface,
1791 IDirect3DRMFrame3 *reference, D3DVECTOR *return_position)
1793 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1795 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, reference, return_position);
1797 return E_NOTIMPL;
1800 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetRotation(IDirect3DRMFrame3 *iface,
1801 IDirect3DRMFrame3 *reference, D3DVECTOR *axis, D3DVALUE *return_theta)
1803 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1805 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, reference, axis, return_theta);
1807 return E_NOTIMPL;
1810 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetScene(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 **scene)
1812 FIXME("iface %p, scene %p stub!\n", iface, scene);
1814 return E_NOTIMPL;
1817 static D3DRMSORTMODE WINAPI IDirect3DRMFrame3Impl_GetSortMode(IDirect3DRMFrame3* iface)
1819 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1821 FIXME("(%p/%p)->(): stub\n", iface, This);
1823 return D3DRMSORT_FROMPARENT;
1826 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetTexture(IDirect3DRMFrame3 *iface, IDirect3DRMTexture3 **texture)
1828 FIXME("iface %p, texture %p stub!\n", iface, texture);
1830 return E_NOTIMPL;
1833 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetTransform(IDirect3DRMFrame3 *iface,
1834 IDirect3DRMFrame3 *reference, D3DRMMATRIX4D return_matrix)
1836 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1838 TRACE("(%p/%p)->(%p,%p)\n", iface, This, reference, return_matrix);
1840 if (reference)
1841 FIXME("Specifying a frame as the root of the scene different from the current root frame is not supported yet\n");
1843 memcpy(return_matrix, This->transform, sizeof(D3DRMMATRIX4D));
1845 return D3DRM_OK;
1848 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetVelocity(IDirect3DRMFrame3 *iface,
1849 IDirect3DRMFrame3 *reference, D3DVECTOR *return_velocity, BOOL with_rotation)
1851 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1853 FIXME("(%p/%p)->(%p,%p,%d): stub\n", iface, This, reference, return_velocity, with_rotation);
1855 return E_NOTIMPL;
1858 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetOrientation(IDirect3DRMFrame3 *iface,
1859 IDirect3DRMFrame3 *reference, D3DVECTOR *dir, D3DVECTOR *up)
1861 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1863 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, reference, dir, up);
1865 return E_NOTIMPL;
1868 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetVisuals(IDirect3DRMFrame3* iface, LPDWORD num,
1869 LPUNKNOWN *visuals)
1871 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1873 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, num, visuals);
1875 return E_NOTIMPL;
1878 static HRESULT WINAPI IDirect3DRMFrame3Impl_InverseTransform(IDirect3DRMFrame3* iface,
1879 D3DVECTOR *d, D3DVECTOR *s)
1881 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1883 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, d, s);
1885 return E_NOTIMPL;
1888 static HRESULT WINAPI IDirect3DRMFrame3Impl_Load(IDirect3DRMFrame3* iface, LPVOID filename,
1889 LPVOID name, D3DRMLOADOPTIONS loadflags,
1890 D3DRMLOADTEXTURE3CALLBACK cb, LPVOID lpArg)
1892 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1894 FIXME("(%p/%p)->(%p,%p,%u,%p,%p): stub\n", iface, This, filename, name, loadflags, cb, lpArg);
1896 return E_NOTIMPL;
1899 static HRESULT WINAPI IDirect3DRMFrame3Impl_LookAt(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 *target,
1900 IDirect3DRMFrame3 *reference, D3DRMFRAMECONSTRAINT constraint)
1902 FIXME("iface %p, target %p, reference %p, constraint %#x stub!\n", iface, target, reference, constraint);
1904 return E_NOTIMPL;
1907 static HRESULT WINAPI IDirect3DRMFrame3Impl_Move(IDirect3DRMFrame3* iface, D3DVALUE delta)
1909 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1911 FIXME("(%p/%p)->(%f): stub\n", iface, This, delta);
1913 return E_NOTIMPL;
1916 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteChild(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 *frame)
1918 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1919 IDirect3DRMFrameImpl *frame_obj = unsafe_impl_from_IDirect3DRMFrame3(frame);
1920 ULONG i;
1922 TRACE("(%p/%p)->(%p)\n", iface, This, frame);
1924 if (!frame_obj)
1925 return D3DRMERR_BADOBJECT;
1927 /* Check if child exists */
1928 for (i = 0; i < This->nb_children; i++)
1929 if (This->children[i] == frame)
1930 break;
1932 if (i == This->nb_children)
1933 return D3DRMERR_BADVALUE;
1935 memmove(This->children + i, This->children + i + 1, sizeof(IDirect3DRMFrame3*) * (This->nb_children - 1 - i));
1936 IDirect3DRMFrame3_Release(frame);
1937 frame_obj->parent = NULL;
1938 This->nb_children--;
1940 return D3DRM_OK;
1943 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteLight(IDirect3DRMFrame3 *iface, IDirect3DRMLight *light)
1945 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1946 ULONG i;
1948 TRACE("(%p/%p)->(%p)\n", iface, This, light);
1950 if (!light)
1951 return D3DRMERR_BADOBJECT;
1953 /* Check if visual exists */
1954 for (i = 0; i < This->nb_lights; i++)
1955 if (This->lights[i] == light)
1956 break;
1958 if (i == This->nb_lights)
1959 return D3DRMERR_BADVALUE;
1961 memmove(This->lights + i, This->lights + i + 1, sizeof(IDirect3DRMLight*) * (This->nb_lights - 1 - i));
1962 IDirect3DRMLight_Release(light);
1963 This->nb_lights--;
1965 return D3DRM_OK;
1968 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteMoveCallback(IDirect3DRMFrame3* iface,
1969 D3DRMFRAME3MOVECALLBACK cb,
1970 VOID *arg)
1972 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1974 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, cb, arg);
1976 return E_NOTIMPL;
1979 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteVisual(IDirect3DRMFrame3* iface, LPUNKNOWN vis)
1981 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1982 ULONG i;
1984 TRACE("(%p/%p)->(%p)\n", iface, This, vis);
1986 if (!vis)
1987 return D3DRMERR_BADOBJECT;
1989 /* Check if visual exists */
1990 for (i = 0; i < This->nb_visuals; i++)
1991 if (This->visuals[i] == (IDirect3DRMVisual*)vis)
1992 break;
1994 if (i == This->nb_visuals)
1995 return D3DRMERR_BADVALUE;
1997 memmove(This->visuals + i, This->visuals + i + 1, sizeof(IDirect3DRMVisual*) * (This->nb_visuals - 1 - i));
1998 IDirect3DRMVisual_Release(vis);
1999 This->nb_visuals--;
2001 return D3DRM_OK;
2004 static D3DCOLOR WINAPI IDirect3DRMFrame3Impl_GetSceneBackground(IDirect3DRMFrame3* iface)
2006 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2008 TRACE("(%p/%p)->()\n", iface, This);
2010 return This->scenebackground;
2013 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetSceneBackgroundDepth(IDirect3DRMFrame3 *iface,
2014 IDirectDrawSurface **surface)
2016 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2018 FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
2020 return E_NOTIMPL;
2023 static D3DCOLOR WINAPI IDirect3DRMFrame3Impl_GetSceneFogColor(IDirect3DRMFrame3* iface)
2025 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2027 FIXME("(%p/%p)->(): stub\n", iface, This);
2029 return 0;
2032 static BOOL WINAPI IDirect3DRMFrame3Impl_GetSceneFogEnable(IDirect3DRMFrame3* iface)
2034 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2036 FIXME("(%p/%p)->(): stub\n", iface, This);
2038 return FALSE;
2041 static D3DRMFOGMODE WINAPI IDirect3DRMFrame3Impl_GetSceneFogMode(IDirect3DRMFrame3* iface)
2043 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2045 FIXME("(%p/%p)->(): stub\n", iface, This);
2047 return D3DRMFOG_LINEAR;
2050 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetSceneFogParams(IDirect3DRMFrame3* iface,
2051 D3DVALUE *return_start,
2052 D3DVALUE *return_end,
2053 D3DVALUE *return_density)
2055 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2057 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, return_start, return_end, return_density);
2059 return E_NOTIMPL;
2062 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackground(IDirect3DRMFrame3* iface,
2063 D3DCOLOR color)
2065 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2067 TRACE("(%p/%p)->(%u)\n", iface, This, color);
2069 This->scenebackground = color;
2071 return D3DRM_OK;
2074 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackgroundRGB(IDirect3DRMFrame3* iface,
2075 D3DVALUE red, D3DVALUE green,
2076 D3DVALUE blue)
2078 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2080 TRACE("(%p/%p)->(%f,%f,%f)\n", iface, This, red, green, blue);
2082 This->scenebackground = RGBA_MAKE((BYTE)(red * 255.0f),
2083 (BYTE)(green * 255.0f), (BYTE)(blue * 255.0f), 0xff);
2085 return D3DRM_OK;
2088 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackgroundDepth(IDirect3DRMFrame3 *iface,
2089 IDirectDrawSurface *surface)
2091 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2093 FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
2095 return E_NOTIMPL;
2098 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackgroundImage(IDirect3DRMFrame3 *iface,
2099 IDirect3DRMTexture3 *texture)
2101 FIXME("iface %p, texture %p stub!\n", iface, texture);
2103 return E_NOTIMPL;
2106 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogEnable(IDirect3DRMFrame3* iface, BOOL enable)
2108 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2110 FIXME("(%p/%p)->(%d): stub\n", iface, This, enable);
2112 return E_NOTIMPL;
2115 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogColor(IDirect3DRMFrame3* iface,
2116 D3DCOLOR color)
2118 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2120 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
2122 return E_NOTIMPL;
2125 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogMode(IDirect3DRMFrame3* iface,
2126 D3DRMFOGMODE mode)
2128 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2130 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
2132 return E_NOTIMPL;
2135 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogParams(IDirect3DRMFrame3* iface,
2136 D3DVALUE start, D3DVALUE end,
2137 D3DVALUE density)
2139 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2141 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, start, end, density);
2143 return E_NOTIMPL;
2146 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetColor(IDirect3DRMFrame3* iface, D3DCOLOR color)
2148 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2150 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
2152 return E_NOTIMPL;
2155 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetColorRGB(IDirect3DRMFrame3* iface, D3DVALUE red,
2156 D3DVALUE green, D3DVALUE blue)
2158 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2160 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, red, green, blue);
2162 return E_NOTIMPL;
2165 static D3DRMZBUFFERMODE WINAPI IDirect3DRMFrame3Impl_GetZbufferMode(IDirect3DRMFrame3* iface)
2167 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2169 FIXME("(%p/%p)->(): stub\n", iface, This);
2171 return D3DRMZBUFFER_FROMPARENT;
2174 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetMaterialMode(IDirect3DRMFrame3* iface,
2175 D3DRMMATERIALMODE mode)
2177 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2179 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
2181 return E_NOTIMPL;
2184 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetOrientation(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 *reference,
2185 D3DVALUE dx, D3DVALUE dy, D3DVALUE dz, D3DVALUE ux, D3DVALUE uy, D3DVALUE uz)
2187 FIXME("iface %p, reference %p, dx %.8e, dy %.8e, dz %.8e, ux %.8e, uy %.8e, uz %.8e stub!\n",
2188 iface, reference, dx, dy, dz, ux, uy, uz);
2190 return E_NOTIMPL;
2193 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetPosition(IDirect3DRMFrame3 *iface,
2194 IDirect3DRMFrame3 *reference, D3DVALUE x, D3DVALUE y, D3DVALUE z)
2196 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e stub!\n", iface, reference, x, y, z);
2198 return E_NOTIMPL;
2201 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetRotation(IDirect3DRMFrame3 *iface,
2202 IDirect3DRMFrame3 *reference, D3DVALUE x, D3DVALUE y, D3DVALUE z, D3DVALUE theta)
2204 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e, theta %.8e stub!\n",
2205 iface, reference, x, y, z, theta);
2207 return E_NOTIMPL;
2210 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSortMode(IDirect3DRMFrame3* iface,
2211 D3DRMSORTMODE mode)
2213 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2215 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
2217 return E_NOTIMPL;
2220 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetTexture(IDirect3DRMFrame3 *iface, IDirect3DRMTexture3 *texture)
2222 FIXME("iface %p, texture %p stub!\n", iface, texture);
2224 return E_NOTIMPL;
2227 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetVelocity(IDirect3DRMFrame3 *iface,
2228 IDirect3DRMFrame3 *reference, D3DVALUE x, D3DVALUE y, D3DVALUE z, BOOL with_rotation)
2230 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e, with_rotation %#x.\n",
2231 iface, reference, x, y, z, with_rotation);
2233 return E_NOTIMPL;
2236 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetZbufferMode(IDirect3DRMFrame3* iface,
2237 D3DRMZBUFFERMODE mode)
2239 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2241 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
2243 return E_NOTIMPL;
2246 static HRESULT WINAPI IDirect3DRMFrame3Impl_Transform(IDirect3DRMFrame3* iface, D3DVECTOR *d,
2247 D3DVECTOR *s)
2249 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2251 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, d, s);
2253 return E_NOTIMPL;
2256 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetBox(IDirect3DRMFrame3 *iface, D3DRMBOX *box)
2258 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2260 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
2262 return E_NOTIMPL;
2265 static BOOL WINAPI IDirect3DRMFrame3Impl_GetBoxEnable(IDirect3DRMFrame3* iface)
2267 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2269 FIXME("(%p/%p)->(): stub\n", iface, This);
2271 return E_NOTIMPL;
2274 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetAxes(IDirect3DRMFrame3 *iface, D3DVECTOR *dir, D3DVECTOR *up)
2276 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2278 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, dir, up);
2280 return E_NOTIMPL;
2283 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetMaterial(IDirect3DRMFrame3 *iface, IDirect3DRMMaterial2 **material)
2285 FIXME("iface %p, material %p stub!\n", iface, material);
2287 return E_NOTIMPL;
2290 static BOOL WINAPI IDirect3DRMFrame3Impl_GetInheritAxes(IDirect3DRMFrame3* iface)
2292 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2294 FIXME("(%p/%p)->(): stub\n", iface, This);
2296 return E_NOTIMPL;
2299 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetHierarchyBox(IDirect3DRMFrame3* iface, D3DRMBOX *box)
2301 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2303 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
2305 return E_NOTIMPL;
2308 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetBox(IDirect3DRMFrame3 *iface, D3DRMBOX *box)
2310 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2312 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
2314 return E_NOTIMPL;
2317 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetBoxEnable(IDirect3DRMFrame3* iface, BOOL enable)
2319 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2321 FIXME("(%p/%p)->(%u): stub\n", iface, This, enable);
2323 return E_NOTIMPL;
2326 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetAxes(IDirect3DRMFrame3* iface,
2327 D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
2328 D3DVALUE ux, D3DVALUE uy, D3DVALUE uz)
2330 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2332 FIXME("(%p/%p)->(%f,%f,%f,%f,%f,%f): stub\n", iface, This, dx, dy, dz, ux, uy, uz);
2334 return E_NOTIMPL;
2337 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetInheritAxes(IDirect3DRMFrame3* iface,
2338 BOOL inherit_from_parent)
2340 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2342 FIXME("(%p/%p)->(%u): stub\n", iface, This, inherit_from_parent);
2344 return E_NOTIMPL;
2347 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetMaterial(IDirect3DRMFrame3 *iface, IDirect3DRMMaterial2 *material)
2349 FIXME("iface %p, material %p stub!\n", iface, material);
2351 return E_NOTIMPL;
2354 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetQuaternion(IDirect3DRMFrame3 *iface,
2355 IDirect3DRMFrame3 *reference, D3DRMQUATERNION *q)
2357 FIXME("iface %p, reference %p, q %p stub!\n", iface, reference, q);
2359 return E_NOTIMPL;
2362 static HRESULT WINAPI IDirect3DRMFrame3Impl_RayPick(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 *reference,
2363 D3DRMRAY *ray, DWORD flags, IDirect3DRMPicked2Array **return_visuals)
2365 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2367 FIXME("(%p/%p)->(%p,%p,%u,%p): stub\n", iface, This, reference, ray, flags, return_visuals);
2369 return E_NOTIMPL;
2372 static HRESULT WINAPI IDirect3DRMFrame3Impl_Save(IDirect3DRMFrame3* iface, LPCSTR filename,
2373 D3DRMXOFFORMAT d3dFormat,
2374 D3DRMSAVEOPTIONS d3dSaveFlags)
2376 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2378 FIXME("(%p/%p)->(%p,%u,%u): stub\n", iface, This, filename, d3dFormat, d3dSaveFlags);
2380 return E_NOTIMPL;
2383 static HRESULT WINAPI IDirect3DRMFrame3Impl_TransformVectors(IDirect3DRMFrame3 *iface,
2384 IDirect3DRMFrame3 *reference, DWORD num, D3DVECTOR *dst, D3DVECTOR *src)
2386 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2388 FIXME("(%p/%p)->(%p,%u,%p,%p): stub\n", iface, This, reference, num, dst, src);
2390 return E_NOTIMPL;
2393 static HRESULT WINAPI IDirect3DRMFrame3Impl_InverseTransformVectors(IDirect3DRMFrame3 *iface,
2394 IDirect3DRMFrame3 *reference, DWORD num, D3DVECTOR *dst, D3DVECTOR *src)
2396 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2398 FIXME("(%p/%p)->(%p,%u,%p,%p): stub\n", iface, This, reference, num, dst, src);
2400 return E_NOTIMPL;
2403 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetTraversalOptions(IDirect3DRMFrame3* iface,
2404 DWORD flags)
2406 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2408 FIXME("(%p/%p)->(%u): stub\n", iface, This, flags);
2410 return E_NOTIMPL;
2413 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetTraversalOptions(IDirect3DRMFrame3* iface,
2414 LPDWORD flags)
2416 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2418 FIXME("(%p/%p)->(%p): stub\n", iface, This, flags);
2420 return E_NOTIMPL;
2423 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogMethod(IDirect3DRMFrame3* iface,
2424 DWORD flags)
2426 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2428 FIXME("(%p/%p)->(%u): stub\n", iface, This, flags);
2430 return E_NOTIMPL;
2433 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetSceneFogMethod(IDirect3DRMFrame3* iface,
2434 LPDWORD flags)
2436 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2438 FIXME("(%p/%p)->(%p): stub\n", iface, This, flags);
2440 return E_NOTIMPL;
2443 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetMaterialOverride(IDirect3DRMFrame3 *iface,
2444 D3DRMMATERIALOVERRIDE *override)
2446 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2448 FIXME("(%p/%p)->(%p): stub\n", iface, This, override);
2450 return E_NOTIMPL;
2453 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetMaterialOverride(IDirect3DRMFrame3 *iface,
2454 D3DRMMATERIALOVERRIDE *override)
2456 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2458 FIXME("(%p/%p)->(%p): stub\n", iface, This, override);
2460 return E_NOTIMPL;
2463 static const struct IDirect3DRMFrame3Vtbl Direct3DRMFrame3_Vtbl =
2465 /*** IUnknown methods ***/
2466 IDirect3DRMFrame3Impl_QueryInterface,
2467 IDirect3DRMFrame3Impl_AddRef,
2468 IDirect3DRMFrame3Impl_Release,
2469 /*** IDirect3DRMObject methods ***/
2470 IDirect3DRMFrame3Impl_Clone,
2471 IDirect3DRMFrame3Impl_AddDestroyCallback,
2472 IDirect3DRMFrame3Impl_DeleteDestroyCallback,
2473 IDirect3DRMFrame3Impl_SetAppData,
2474 IDirect3DRMFrame3Impl_GetAppData,
2475 IDirect3DRMFrame3Impl_SetName,
2476 IDirect3DRMFrame3Impl_GetName,
2477 IDirect3DRMFrame3Impl_GetClassName,
2478 /*** IDirect3DRMFrame3 methods ***/
2479 IDirect3DRMFrame3Impl_AddChild,
2480 IDirect3DRMFrame3Impl_AddLight,
2481 IDirect3DRMFrame3Impl_AddMoveCallback,
2482 IDirect3DRMFrame3Impl_AddTransform,
2483 IDirect3DRMFrame3Impl_AddTranslation,
2484 IDirect3DRMFrame3Impl_AddScale,
2485 IDirect3DRMFrame3Impl_AddRotation,
2486 IDirect3DRMFrame3Impl_AddVisual,
2487 IDirect3DRMFrame3Impl_GetChildren,
2488 IDirect3DRMFrame3Impl_GetColor,
2489 IDirect3DRMFrame3Impl_GetLights,
2490 IDirect3DRMFrame3Impl_GetMaterialMode,
2491 IDirect3DRMFrame3Impl_GetParent,
2492 IDirect3DRMFrame3Impl_GetPosition,
2493 IDirect3DRMFrame3Impl_GetRotation,
2494 IDirect3DRMFrame3Impl_GetScene,
2495 IDirect3DRMFrame3Impl_GetSortMode,
2496 IDirect3DRMFrame3Impl_GetTexture,
2497 IDirect3DRMFrame3Impl_GetTransform,
2498 IDirect3DRMFrame3Impl_GetVelocity,
2499 IDirect3DRMFrame3Impl_GetOrientation,
2500 IDirect3DRMFrame3Impl_GetVisuals,
2501 IDirect3DRMFrame3Impl_InverseTransform,
2502 IDirect3DRMFrame3Impl_Load,
2503 IDirect3DRMFrame3Impl_LookAt,
2504 IDirect3DRMFrame3Impl_Move,
2505 IDirect3DRMFrame3Impl_DeleteChild,
2506 IDirect3DRMFrame3Impl_DeleteLight,
2507 IDirect3DRMFrame3Impl_DeleteMoveCallback,
2508 IDirect3DRMFrame3Impl_DeleteVisual,
2509 IDirect3DRMFrame3Impl_GetSceneBackground,
2510 IDirect3DRMFrame3Impl_GetSceneBackgroundDepth,
2511 IDirect3DRMFrame3Impl_GetSceneFogColor,
2512 IDirect3DRMFrame3Impl_GetSceneFogEnable,
2513 IDirect3DRMFrame3Impl_GetSceneFogMode,
2514 IDirect3DRMFrame3Impl_GetSceneFogParams,
2515 IDirect3DRMFrame3Impl_SetSceneBackground,
2516 IDirect3DRMFrame3Impl_SetSceneBackgroundRGB,
2517 IDirect3DRMFrame3Impl_SetSceneBackgroundDepth,
2518 IDirect3DRMFrame3Impl_SetSceneBackgroundImage,
2519 IDirect3DRMFrame3Impl_SetSceneFogEnable,
2520 IDirect3DRMFrame3Impl_SetSceneFogColor,
2521 IDirect3DRMFrame3Impl_SetSceneFogMode,
2522 IDirect3DRMFrame3Impl_SetSceneFogParams,
2523 IDirect3DRMFrame3Impl_SetColor,
2524 IDirect3DRMFrame3Impl_SetColorRGB,
2525 IDirect3DRMFrame3Impl_GetZbufferMode,
2526 IDirect3DRMFrame3Impl_SetMaterialMode,
2527 IDirect3DRMFrame3Impl_SetOrientation,
2528 IDirect3DRMFrame3Impl_SetPosition,
2529 IDirect3DRMFrame3Impl_SetRotation,
2530 IDirect3DRMFrame3Impl_SetSortMode,
2531 IDirect3DRMFrame3Impl_SetTexture,
2532 IDirect3DRMFrame3Impl_SetVelocity,
2533 IDirect3DRMFrame3Impl_SetZbufferMode,
2534 IDirect3DRMFrame3Impl_Transform,
2535 IDirect3DRMFrame3Impl_GetBox,
2536 IDirect3DRMFrame3Impl_GetBoxEnable,
2537 IDirect3DRMFrame3Impl_GetAxes,
2538 IDirect3DRMFrame3Impl_GetMaterial,
2539 IDirect3DRMFrame3Impl_GetInheritAxes,
2540 IDirect3DRMFrame3Impl_GetHierarchyBox,
2541 IDirect3DRMFrame3Impl_SetBox,
2542 IDirect3DRMFrame3Impl_SetBoxEnable,
2543 IDirect3DRMFrame3Impl_SetAxes,
2544 IDirect3DRMFrame3Impl_SetInheritAxes,
2545 IDirect3DRMFrame3Impl_SetMaterial,
2546 IDirect3DRMFrame3Impl_SetQuaternion,
2547 IDirect3DRMFrame3Impl_RayPick,
2548 IDirect3DRMFrame3Impl_Save,
2549 IDirect3DRMFrame3Impl_TransformVectors,
2550 IDirect3DRMFrame3Impl_InverseTransformVectors,
2551 IDirect3DRMFrame3Impl_SetTraversalOptions,
2552 IDirect3DRMFrame3Impl_GetTraversalOptions,
2553 IDirect3DRMFrame3Impl_SetSceneFogMethod,
2554 IDirect3DRMFrame3Impl_GetSceneFogMethod,
2555 IDirect3DRMFrame3Impl_SetMaterialOverride,
2556 IDirect3DRMFrame3Impl_GetMaterialOverride
2559 static inline IDirect3DRMFrameImpl *unsafe_impl_from_IDirect3DRMFrame3(IDirect3DRMFrame3 *iface)
2561 if (!iface)
2562 return NULL;
2563 assert(iface->lpVtbl == &Direct3DRMFrame3_Vtbl);
2565 return impl_from_IDirect3DRMFrame3(iface);
2568 HRESULT Direct3DRMFrame_create(REFIID riid, IUnknown* parent, IUnknown** ret_iface)
2570 IDirect3DRMFrameImpl* object;
2571 HRESULT hr;
2573 TRACE("(%s, %p, %p)\n", wine_dbgstr_guid(riid), parent, ret_iface);
2575 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMFrameImpl));
2576 if (!object)
2577 return E_OUTOFMEMORY;
2579 object->IDirect3DRMFrame2_iface.lpVtbl = &Direct3DRMFrame2_Vtbl;
2580 object->IDirect3DRMFrame3_iface.lpVtbl = &Direct3DRMFrame3_Vtbl;
2581 object->ref = 1;
2582 object->scenebackground = RGBA_MAKE(0, 0, 0, 0xff);
2584 memcpy(object->transform, identity, sizeof(D3DRMMATRIX4D));
2586 if (parent)
2588 IDirect3DRMFrame3 *p;
2590 hr = IDirect3DRMFrame_QueryInterface(parent, &IID_IDirect3DRMFrame3, (void**)&p);
2591 if (hr != S_OK)
2593 HeapFree(GetProcessHeap(), 0, object);
2594 return hr;
2596 IDirect3DRMFrame_Release(parent);
2597 IDirect3DRMFrame3_AddChild(p, &object->IDirect3DRMFrame3_iface);
2600 hr = IDirect3DRMFrame3_QueryInterface(&object->IDirect3DRMFrame3_iface, riid, (void**)ret_iface);
2601 IDirect3DRMFrame3_Release(&object->IDirect3DRMFrame3_iface);
2602 return S_OK;