d3drm: Avoid LPDIRECT3DRMLIGHTARRAY.
[wine.git] / dlls / d3drm / frame.c
blob4b6eae8bdddab41fe1b38a99334f17d7a745e119
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, IDirect3DRMFrameArray **children)
690 IDirect3DRMFrameImpl *frame = impl_from_IDirect3DRMFrame2(iface);
692 TRACE("iface %p, children %p.\n", iface, children);
694 return IDirect3DRMFrame3_GetChildren(&frame->IDirect3DRMFrame3_iface, children);
697 static D3DCOLOR WINAPI IDirect3DRMFrame2Impl_GetColor(IDirect3DRMFrame2* iface)
699 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
701 FIXME("(%p/%p)->(): stub\n", iface, This);
703 return 0;
706 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetLights(IDirect3DRMFrame2 *iface, IDirect3DRMLightArray **lights)
708 IDirect3DRMFrameImpl *frame = impl_from_IDirect3DRMFrame2(iface);
710 TRACE("iface %p, lights %p.\n", iface, lights);
712 return IDirect3DRMFrame3_GetLights(&frame->IDirect3DRMFrame3_iface, lights);
715 static D3DRMMATERIALMODE WINAPI IDirect3DRMFrame2Impl_GetMaterialMode(IDirect3DRMFrame2* iface)
717 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
719 FIXME("(%p/%p)->(): stub\n", iface, This);
721 return D3DRMMATERIAL_FROMPARENT;
724 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetParent(IDirect3DRMFrame2 *iface, IDirect3DRMFrame **frame)
726 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
728 TRACE("(%p/%p)->(%p)\n", iface, This, frame);
730 if (!frame)
731 return D3DRMERR_BADVALUE;
733 if (This->parent)
735 *frame = (IDirect3DRMFrame *)&This->parent->IDirect3DRMFrame2_iface;
736 IDirect3DRMFrame_AddRef(*frame);
738 else
740 *frame = NULL;
743 return D3DRM_OK;
746 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetPosition(IDirect3DRMFrame2 *iface,
747 IDirect3DRMFrame *reference, D3DVECTOR *return_position)
749 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
751 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, reference, return_position);
753 return E_NOTIMPL;
756 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetRotation(IDirect3DRMFrame2 *iface,
757 IDirect3DRMFrame *reference, D3DVECTOR *axis, D3DVALUE *return_theta)
759 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
761 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, reference, axis, return_theta);
763 return E_NOTIMPL;
766 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetScene(IDirect3DRMFrame2 *iface, IDirect3DRMFrame **scene)
768 FIXME("iface %p, frame %p stub!\n", iface, scene);
770 return E_NOTIMPL;
773 static D3DRMSORTMODE WINAPI IDirect3DRMFrame2Impl_GetSortMode(IDirect3DRMFrame2* iface)
775 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
777 FIXME("(%p/%p)->(): stub\n", iface, This);
779 return D3DRMSORT_FROMPARENT;
782 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetTexture(IDirect3DRMFrame2 *iface, IDirect3DRMTexture **texture)
784 FIXME("iface %p, texture %p stub!\n", iface, texture);
786 return E_NOTIMPL;
789 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetTransform(IDirect3DRMFrame2* iface,
790 D3DRMMATRIX4D return_matrix)
792 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
794 TRACE("(%p/%p)->(%p)\n", iface, This, return_matrix);
796 memcpy(return_matrix, This->transform, sizeof(D3DRMMATRIX4D));
798 return D3DRM_OK;
801 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetVelocity(IDirect3DRMFrame2 *iface,
802 IDirect3DRMFrame *reference, D3DVECTOR *return_velocity, BOOL with_rotation)
804 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
806 FIXME("(%p/%p)->(%p,%p,%d): stub\n", iface, This, reference, return_velocity, with_rotation);
808 return E_NOTIMPL;
811 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetOrientation(IDirect3DRMFrame2 *iface,
812 IDirect3DRMFrame *reference, D3DVECTOR *dir, D3DVECTOR *up)
814 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
816 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, reference, dir, up);
818 return E_NOTIMPL;
821 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetVisuals(IDirect3DRMFrame2 *iface, IDirect3DRMVisualArray **visuals)
823 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
824 IDirect3DRMVisualArrayImpl* obj;
825 HRESULT hr;
827 TRACE("(%p/%p)->(%p)\n", iface, This, visuals);
829 if (!visuals)
830 return D3DRMERR_BADVALUE;
832 hr = Direct3DRMVisualArray_create(visuals);
834 if (hr != D3DRM_OK)
835 return hr;
837 obj = (IDirect3DRMVisualArrayImpl*)*visuals;
839 obj->size = This->nb_visuals;
840 if (This->nb_visuals)
842 ULONG i;
843 if (!(obj->visuals = HeapAlloc(GetProcessHeap(), 0, This->nb_visuals * sizeof(*obj->visuals))))
844 return E_OUTOFMEMORY;
845 for (i = 0; i < This->nb_visuals; i++)
847 obj->visuals[i] = This->visuals[i];
848 IDirect3DRMVisual_AddRef(This->visuals[i]);
852 return D3DRM_OK;
855 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetTextureTopology(IDirect3DRMFrame2* iface,
856 BOOL *wrap_u, BOOL *wrap_v)
858 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
860 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, wrap_u, wrap_v);
862 return E_NOTIMPL;
865 static HRESULT WINAPI IDirect3DRMFrame2Impl_InverseTransform(IDirect3DRMFrame2* iface,
866 D3DVECTOR *d, D3DVECTOR *s)
868 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
870 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, d, s);
872 return E_NOTIMPL;
875 static HRESULT WINAPI IDirect3DRMFrame2Impl_Load(IDirect3DRMFrame2* iface, LPVOID filename,
876 LPVOID name, D3DRMLOADOPTIONS loadflags,
877 D3DRMLOADTEXTURECALLBACK cb, LPVOID lpArg)
879 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
881 FIXME("(%p/%p)->(%p,%p,%u,%p,%p): stub\n", iface, This, filename, name, loadflags, cb, lpArg);
883 return E_NOTIMPL;
886 static HRESULT WINAPI IDirect3DRMFrame2Impl_LookAt(IDirect3DRMFrame2 *iface, IDirect3DRMFrame *target,
887 IDirect3DRMFrame *reference, D3DRMFRAMECONSTRAINT constraint)
889 FIXME("iface %p, target %p, reference %p, constraint %#x stub!\n", iface, target, reference, constraint);
891 return E_NOTIMPL;
894 static HRESULT WINAPI IDirect3DRMFrame2Impl_Move(IDirect3DRMFrame2* iface, D3DVALUE delta)
896 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
898 FIXME("(%p/%p)->(%f): stub\n", iface, This, delta);
900 return E_NOTIMPL;
903 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteChild(IDirect3DRMFrame2 *iface, IDirect3DRMFrame *frame)
905 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
906 IDirect3DRMFrame3 *child;
907 HRESULT hr;
909 TRACE("(%p/%p)->(%p)\n", iface, This, frame);
911 if (!frame)
912 return D3DRMERR_BADOBJECT;
913 hr = IDirect3DRMFrame_QueryInterface(frame, &IID_IDirect3DRMFrame3, (void**)&child);
914 if (hr != S_OK)
915 return D3DRMERR_BADOBJECT;
916 IDirect3DRMFrame_Release(frame);
918 return IDirect3DRMFrame3_DeleteChild(&This->IDirect3DRMFrame3_iface, child);
921 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteLight(IDirect3DRMFrame2 *iface, IDirect3DRMLight *light)
923 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
925 TRACE("(%p/%p)->(%p)\n", iface, This, light);
927 return IDirect3DRMFrame3_DeleteLight(&This->IDirect3DRMFrame3_iface, light);
930 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteMoveCallback(IDirect3DRMFrame2* iface,
931 D3DRMFRAMEMOVECALLBACK cb, VOID *arg)
933 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
935 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, cb, arg);
937 return E_NOTIMPL;
940 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteVisual(IDirect3DRMFrame2 *iface, IDirect3DRMVisual *visual)
942 IDirect3DRMFrameImpl *frame = impl_from_IDirect3DRMFrame2(iface);
944 TRACE("iface %p, visual %p.\n", iface, visual);
946 return IDirect3DRMFrame3_DeleteVisual(&frame->IDirect3DRMFrame3_iface, (IUnknown *)visual);
949 static D3DCOLOR WINAPI IDirect3DRMFrame2Impl_GetSceneBackground(IDirect3DRMFrame2* iface)
951 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
953 TRACE("(%p/%p)->()\n", iface, This);
955 return IDirect3DRMFrame3_GetSceneBackground(&This->IDirect3DRMFrame3_iface);
958 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetSceneBackgroundDepth(IDirect3DRMFrame2 *iface,
959 IDirectDrawSurface **surface)
961 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
963 FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
965 return E_NOTIMPL;
968 static D3DCOLOR WINAPI IDirect3DRMFrame2Impl_GetSceneFogColor(IDirect3DRMFrame2* iface)
970 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
972 FIXME("(%p/%p)->(): stub\n", iface, This);
974 return 0;
977 static BOOL WINAPI IDirect3DRMFrame2Impl_GetSceneFogEnable(IDirect3DRMFrame2* iface)
979 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
981 FIXME("(%p/%p)->(): stub\n", iface, This);
983 return FALSE;
986 static D3DRMFOGMODE WINAPI IDirect3DRMFrame2Impl_GetSceneFogMode(IDirect3DRMFrame2* iface)
988 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
990 FIXME("(%p/%p)->(): stub\n", iface, This);
992 return D3DRMFOG_LINEAR;
995 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetSceneFogParams(IDirect3DRMFrame2* iface,
996 D3DVALUE *return_start,
997 D3DVALUE *return_end,
998 D3DVALUE *return_density)
1000 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1002 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, return_start, return_end, return_density);
1004 return E_NOTIMPL;
1007 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackground(IDirect3DRMFrame2* iface,
1008 D3DCOLOR color)
1010 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1012 TRACE("(%p/%p)->(%u)\n", iface, This, color);
1014 return IDirect3DRMFrame3_SetSceneBackground(&This->IDirect3DRMFrame3_iface, color);
1017 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackgroundRGB(IDirect3DRMFrame2* iface,
1018 D3DVALUE red, D3DVALUE green,
1019 D3DVALUE blue)
1021 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1023 TRACE("(%p/%p)->(%f,%f,%f)\n", iface, This, red, green, blue);
1025 return IDirect3DRMFrame3_SetSceneBackgroundRGB(&This->IDirect3DRMFrame3_iface, red, green, blue);
1028 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackgroundDepth(IDirect3DRMFrame2 *iface,
1029 IDirectDrawSurface *surface)
1031 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1033 FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
1035 return E_NOTIMPL;
1038 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackgroundImage(IDirect3DRMFrame2 *iface,
1039 IDirect3DRMTexture *texture)
1041 FIXME("iface %p, texture %p stub!\n", iface, texture);
1043 return E_NOTIMPL;
1046 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneFogEnable(IDirect3DRMFrame2* iface, BOOL enable)
1048 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1050 FIXME("(%p/%p)->(%d): stub\n", iface, This, enable);
1052 return E_NOTIMPL;
1055 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneFogColor(IDirect3DRMFrame2* iface,
1056 D3DCOLOR color)
1058 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1060 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
1062 return E_NOTIMPL;
1065 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneFogMode(IDirect3DRMFrame2* iface,
1066 D3DRMFOGMODE mode)
1068 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1070 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
1072 return E_NOTIMPL;
1075 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneFogParams(IDirect3DRMFrame2* iface,
1076 D3DVALUE start, D3DVALUE end,
1077 D3DVALUE density)
1079 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1081 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, start, end, density);
1083 return E_NOTIMPL;
1086 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetColor(IDirect3DRMFrame2* iface, D3DCOLOR color)
1088 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1090 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
1092 return E_NOTIMPL;
1095 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetColorRGB(IDirect3DRMFrame2* iface, D3DVALUE red,
1096 D3DVALUE green, D3DVALUE blue)
1098 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1100 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, red, green, blue);
1102 return E_NOTIMPL;
1105 static D3DRMZBUFFERMODE WINAPI IDirect3DRMFrame2Impl_GetZbufferMode(IDirect3DRMFrame2* iface)
1107 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1109 FIXME("(%p/%p)->(): stub\n", iface, This);
1111 return D3DRMZBUFFER_FROMPARENT;
1114 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetMaterialMode(IDirect3DRMFrame2* iface,
1115 D3DRMMATERIALMODE mode)
1117 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1119 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
1121 return E_NOTIMPL;
1124 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetOrientation(IDirect3DRMFrame2 *iface, IDirect3DRMFrame *reference,
1125 D3DVALUE dx, D3DVALUE dy, D3DVALUE dz, D3DVALUE ux, D3DVALUE uy, D3DVALUE uz)
1127 FIXME("iface %p, reference %p, dx %.8e, dy %.8e, dz %.8e, ux %.8e, uy %.8e, uz %.8e stub!\n",
1128 iface, reference, dx, dy, dz, ux, uy, uz);
1130 return E_NOTIMPL;
1133 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetPosition(IDirect3DRMFrame2 *iface, IDirect3DRMFrame *reference,
1134 D3DVALUE x, D3DVALUE y, D3DVALUE z)
1136 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e stub!\n", iface, reference, x, y, z);
1138 return E_NOTIMPL;
1141 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetRotation(IDirect3DRMFrame2 *iface,
1142 IDirect3DRMFrame *reference, D3DVALUE x, D3DVALUE y, D3DVALUE z, D3DVALUE theta)
1144 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e, theta %.8e stub!\n",
1145 iface, reference, x, y, z, theta);
1147 return E_NOTIMPL;
1150 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSortMode(IDirect3DRMFrame2* iface,
1151 D3DRMSORTMODE mode)
1153 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1155 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
1157 return E_NOTIMPL;
1160 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetTexture(IDirect3DRMFrame2 *iface, IDirect3DRMTexture *texture)
1162 FIXME("iface %p, texture %p stub!\n", iface, texture);
1164 return E_NOTIMPL;
1167 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetTextureTopology(IDirect3DRMFrame2* iface,
1168 BOOL wrap_u, BOOL wrap_v)
1170 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1172 FIXME("(%p/%p)->(%d,%d): stub\n", iface, This, wrap_u, wrap_v);
1174 return E_NOTIMPL;
1177 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetVelocity(IDirect3DRMFrame2 *iface,
1178 IDirect3DRMFrame *reference, D3DVALUE x, D3DVALUE y, D3DVALUE z, BOOL with_rotation)
1180 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e, with_rotation %#x stub!\n",
1181 iface, reference, x, y, z, with_rotation);
1183 return E_NOTIMPL;
1186 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetZbufferMode(IDirect3DRMFrame2* iface,
1187 D3DRMZBUFFERMODE mode)
1189 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1191 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
1193 return E_NOTIMPL;
1196 static HRESULT WINAPI IDirect3DRMFrame2Impl_Transform(IDirect3DRMFrame2* iface, D3DVECTOR *d,
1197 D3DVECTOR *s)
1199 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1201 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, d, s);
1203 return E_NOTIMPL;
1206 /*** IDirect3DRMFrame2 methods ***/
1207 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddMoveCallback2(IDirect3DRMFrame2* iface,
1208 D3DRMFRAMEMOVECALLBACK cb, VOID *arg,
1209 DWORD flags)
1211 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1213 FIXME("(%p/%p)->(%p,%p,%u): stub\n", iface, This, cb, arg, flags);
1215 return E_NOTIMPL;
1218 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetBox(IDirect3DRMFrame2 *iface, D3DRMBOX *box)
1220 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1222 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
1224 return E_NOTIMPL;
1227 static BOOL WINAPI IDirect3DRMFrame2Impl_GetBoxEnable(IDirect3DRMFrame2* iface)
1229 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1231 FIXME("(%p/%p)->(): stub\n", iface, This);
1233 return E_NOTIMPL;
1236 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetAxes(IDirect3DRMFrame2 *iface,
1237 D3DVECTOR *dir, D3DVECTOR *up)
1239 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1241 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, dir, up);
1243 return E_NOTIMPL;
1246 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetMaterial(IDirect3DRMFrame2 *iface, IDirect3DRMMaterial **material)
1248 FIXME("iface %p, material %p stub!\n", iface, material);
1250 return E_NOTIMPL;
1253 static BOOL WINAPI IDirect3DRMFrame2Impl_GetInheritAxes(IDirect3DRMFrame2* iface)
1255 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1257 FIXME("(%p/%p)->(): stub\n", iface, This);
1259 return E_NOTIMPL;
1262 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetHierarchyBox(IDirect3DRMFrame2 *iface, D3DRMBOX *box)
1264 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1266 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
1268 return E_NOTIMPL;
1271 static const struct IDirect3DRMFrame2Vtbl Direct3DRMFrame2_Vtbl =
1273 /*** IUnknown methods ***/
1274 IDirect3DRMFrame2Impl_QueryInterface,
1275 IDirect3DRMFrame2Impl_AddRef,
1276 IDirect3DRMFrame2Impl_Release,
1277 /*** IDirect3DRMObject methods ***/
1278 IDirect3DRMFrame2Impl_Clone,
1279 IDirect3DRMFrame2Impl_AddDestroyCallback,
1280 IDirect3DRMFrame2Impl_DeleteDestroyCallback,
1281 IDirect3DRMFrame2Impl_SetAppData,
1282 IDirect3DRMFrame2Impl_GetAppData,
1283 IDirect3DRMFrame2Impl_SetName,
1284 IDirect3DRMFrame2Impl_GetName,
1285 IDirect3DRMFrame2Impl_GetClassName,
1286 /*** IDirect3DRMFrame methods ***/
1287 IDirect3DRMFrame2Impl_AddChild,
1288 IDirect3DRMFrame2Impl_AddLight,
1289 IDirect3DRMFrame2Impl_AddMoveCallback,
1290 IDirect3DRMFrame2Impl_AddTransform,
1291 IDirect3DRMFrame2Impl_AddTranslation,
1292 IDirect3DRMFrame2Impl_AddScale,
1293 IDirect3DRMFrame2Impl_AddRotation,
1294 IDirect3DRMFrame2Impl_AddVisual,
1295 IDirect3DRMFrame2Impl_GetChildren,
1296 IDirect3DRMFrame2Impl_GetColor,
1297 IDirect3DRMFrame2Impl_GetLights,
1298 IDirect3DRMFrame2Impl_GetMaterialMode,
1299 IDirect3DRMFrame2Impl_GetParent,
1300 IDirect3DRMFrame2Impl_GetPosition,
1301 IDirect3DRMFrame2Impl_GetRotation,
1302 IDirect3DRMFrame2Impl_GetScene,
1303 IDirect3DRMFrame2Impl_GetSortMode,
1304 IDirect3DRMFrame2Impl_GetTexture,
1305 IDirect3DRMFrame2Impl_GetTransform,
1306 IDirect3DRMFrame2Impl_GetVelocity,
1307 IDirect3DRMFrame2Impl_GetOrientation,
1308 IDirect3DRMFrame2Impl_GetVisuals,
1309 IDirect3DRMFrame2Impl_GetTextureTopology,
1310 IDirect3DRMFrame2Impl_InverseTransform,
1311 IDirect3DRMFrame2Impl_Load,
1312 IDirect3DRMFrame2Impl_LookAt,
1313 IDirect3DRMFrame2Impl_Move,
1314 IDirect3DRMFrame2Impl_DeleteChild,
1315 IDirect3DRMFrame2Impl_DeleteLight,
1316 IDirect3DRMFrame2Impl_DeleteMoveCallback,
1317 IDirect3DRMFrame2Impl_DeleteVisual,
1318 IDirect3DRMFrame2Impl_GetSceneBackground,
1319 IDirect3DRMFrame2Impl_GetSceneBackgroundDepth,
1320 IDirect3DRMFrame2Impl_GetSceneFogColor,
1321 IDirect3DRMFrame2Impl_GetSceneFogEnable,
1322 IDirect3DRMFrame2Impl_GetSceneFogMode,
1323 IDirect3DRMFrame2Impl_GetSceneFogParams,
1324 IDirect3DRMFrame2Impl_SetSceneBackground,
1325 IDirect3DRMFrame2Impl_SetSceneBackgroundRGB,
1326 IDirect3DRMFrame2Impl_SetSceneBackgroundDepth,
1327 IDirect3DRMFrame2Impl_SetSceneBackgroundImage,
1328 IDirect3DRMFrame2Impl_SetSceneFogEnable,
1329 IDirect3DRMFrame2Impl_SetSceneFogColor,
1330 IDirect3DRMFrame2Impl_SetSceneFogMode,
1331 IDirect3DRMFrame2Impl_SetSceneFogParams,
1332 IDirect3DRMFrame2Impl_SetColor,
1333 IDirect3DRMFrame2Impl_SetColorRGB,
1334 IDirect3DRMFrame2Impl_GetZbufferMode,
1335 IDirect3DRMFrame2Impl_SetMaterialMode,
1336 IDirect3DRMFrame2Impl_SetOrientation,
1337 IDirect3DRMFrame2Impl_SetPosition,
1338 IDirect3DRMFrame2Impl_SetRotation,
1339 IDirect3DRMFrame2Impl_SetSortMode,
1340 IDirect3DRMFrame2Impl_SetTexture,
1341 IDirect3DRMFrame2Impl_SetTextureTopology,
1342 IDirect3DRMFrame2Impl_SetVelocity,
1343 IDirect3DRMFrame2Impl_SetZbufferMode,
1344 IDirect3DRMFrame2Impl_Transform,
1345 /*** IDirect3DRMFrame2 methods ***/
1346 IDirect3DRMFrame2Impl_AddMoveCallback2,
1347 IDirect3DRMFrame2Impl_GetBox,
1348 IDirect3DRMFrame2Impl_GetBoxEnable,
1349 IDirect3DRMFrame2Impl_GetAxes,
1350 IDirect3DRMFrame2Impl_GetMaterial,
1351 IDirect3DRMFrame2Impl_GetInheritAxes,
1352 IDirect3DRMFrame2Impl_GetHierarchyBox
1355 /*** IUnknown methods ***/
1356 static HRESULT WINAPI IDirect3DRMFrame3Impl_QueryInterface(IDirect3DRMFrame3* iface,
1357 REFIID riid, void** object)
1359 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1360 return IDirect3DRMFrame_QueryInterface(&This->IDirect3DRMFrame2_iface, riid, object);
1363 static ULONG WINAPI IDirect3DRMFrame3Impl_AddRef(IDirect3DRMFrame3* iface)
1365 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1366 return IDirect3DRMFrame2_AddRef(&This->IDirect3DRMFrame2_iface);
1369 static ULONG WINAPI IDirect3DRMFrame3Impl_Release(IDirect3DRMFrame3* iface)
1371 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1372 return IDirect3DRMFrame2_Release(&This->IDirect3DRMFrame2_iface);
1375 /*** IDirect3DRMObject methods ***/
1376 static HRESULT WINAPI IDirect3DRMFrame3Impl_Clone(IDirect3DRMFrame3* iface,
1377 LPUNKNOWN unkwn, REFIID riid,
1378 LPVOID* object)
1380 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1382 FIXME("(%p/%p)->(%p, %s, %p): stub\n", iface, This, unkwn, debugstr_guid(riid), object);
1384 return E_NOTIMPL;
1387 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddDestroyCallback(IDirect3DRMFrame3* iface,
1388 D3DRMOBJECTCALLBACK cb,
1389 LPVOID argument)
1391 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1393 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
1395 return E_NOTIMPL;
1398 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteDestroyCallback(IDirect3DRMFrame3* iface,
1399 D3DRMOBJECTCALLBACK cb,
1400 LPVOID argument)
1402 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1404 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
1406 return E_NOTIMPL;
1409 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetAppData(IDirect3DRMFrame3* iface,
1410 DWORD data)
1412 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1414 FIXME("(%p/%p)->(%u): stub\n", iface, This, data);
1416 return E_NOTIMPL;
1419 static DWORD WINAPI IDirect3DRMFrame3Impl_GetAppData(IDirect3DRMFrame3* iface)
1421 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1423 FIXME("(%p/%p)->(): stub\n", iface, This);
1425 return 0;
1428 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetName(IDirect3DRMFrame3* iface, LPCSTR name)
1430 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1432 FIXME("(%p/%p)->(%s): stub\n", iface, This, name);
1434 return E_NOTIMPL;
1437 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetName(IDirect3DRMFrame3* iface,
1438 LPDWORD size, LPSTR name)
1440 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1442 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, size, name);
1444 return E_NOTIMPL;
1447 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetClassName(IDirect3DRMFrame3* iface,
1448 LPDWORD size, LPSTR name)
1450 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1452 TRACE("(%p/%p)->(%p, %p)\n", iface, This, size, name);
1454 if (!size || *size < strlen("Frame") || !name)
1455 return E_INVALIDARG;
1457 strcpy(name, "Frame");
1458 *size = sizeof("Frame");
1460 return D3DRM_OK;
1463 /*** IDirect3DRMFrame methods ***/
1464 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddChild(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 *child)
1466 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1467 IDirect3DRMFrameImpl *child_obj = unsafe_impl_from_IDirect3DRMFrame3(child);
1469 TRACE("(%p/%p)->(%p)\n", iface, This, child);
1471 if (!child_obj)
1472 return D3DRMERR_BADOBJECT;
1474 if (child_obj->parent)
1476 IDirect3DRMFrame3* parent = &child_obj->parent->IDirect3DRMFrame3_iface;
1478 if (parent == iface)
1480 /* Passed frame is already a child so return success */
1481 return D3DRM_OK;
1483 else
1485 /* Remove parent and continue */
1486 IDirect3DRMFrame3_DeleteChild(parent, child);
1490 if ((This->nb_children + 1) > This->children_capacity)
1492 ULONG new_capacity;
1493 IDirect3DRMFrame3** children;
1495 if (!This->children_capacity)
1497 new_capacity = 16;
1498 children = HeapAlloc(GetProcessHeap(), 0, new_capacity * sizeof(IDirect3DRMFrame3*));
1500 else
1502 new_capacity = This->children_capacity * 2;
1503 children = HeapReAlloc(GetProcessHeap(), 0, This->children, new_capacity * sizeof(IDirect3DRMFrame3*));
1506 if (!children)
1507 return E_OUTOFMEMORY;
1509 This->children_capacity = new_capacity;
1510 This->children = children;
1513 This->children[This->nb_children++] = child;
1514 IDirect3DRMFrame3_AddRef(child);
1515 child_obj->parent = This;
1517 return D3DRM_OK;
1520 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddLight(IDirect3DRMFrame3 *iface, IDirect3DRMLight *light)
1522 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1523 ULONG i;
1524 IDirect3DRMLight** lights;
1526 TRACE("(%p/%p)->(%p)\n", iface, This, light);
1528 if (!light)
1529 return D3DRMERR_BADOBJECT;
1531 /* Check if already existing and return gracefully without increasing ref count */
1532 for (i = 0; i < This->nb_lights; i++)
1533 if (This->lights[i] == light)
1534 return D3DRM_OK;
1536 if ((This->nb_lights + 1) > This->lights_capacity)
1538 ULONG new_capacity;
1540 if (!This->lights_capacity)
1542 new_capacity = 16;
1543 lights = HeapAlloc(GetProcessHeap(), 0, new_capacity * sizeof(IDirect3DRMLight*));
1545 else
1547 new_capacity = This->lights_capacity * 2;
1548 lights = HeapReAlloc(GetProcessHeap(), 0, This->lights, new_capacity * sizeof(IDirect3DRMLight*));
1551 if (!lights)
1552 return E_OUTOFMEMORY;
1554 This->lights_capacity = new_capacity;
1555 This->lights = lights;
1558 This->lights[This->nb_lights++] = light;
1559 IDirect3DRMLight_AddRef(light);
1561 return D3DRM_OK;
1564 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddMoveCallback(IDirect3DRMFrame3* iface,
1565 D3DRMFRAME3MOVECALLBACK cb, VOID *arg,
1566 DWORD flags)
1568 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1570 FIXME("(%p/%p)->(%p,%p,%u): stub\n", iface, This, cb, arg, flags);
1572 return E_NOTIMPL;
1575 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddTransform(IDirect3DRMFrame3* iface,
1576 D3DRMCOMBINETYPE type,
1577 D3DRMMATRIX4D matrix)
1579 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1581 TRACE("(%p/%p)->(%u,%p)\n", iface, This, type, matrix);
1583 switch (type)
1585 case D3DRMCOMBINE_REPLACE:
1586 memcpy(This->transform, matrix, sizeof(D3DRMMATRIX4D));
1587 break;
1589 case D3DRMCOMBINE_BEFORE:
1590 FIXME("D3DRMCOMBINE_BEFORE not supported yed\n");
1591 break;
1593 case D3DRMCOMBINE_AFTER:
1594 FIXME("D3DRMCOMBINE_AFTER not supported yed\n");
1595 break;
1597 default:
1598 WARN("Unknown Combine Type %u\n", type);
1599 return D3DRMERR_BADVALUE;
1602 return S_OK;
1605 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddTranslation(IDirect3DRMFrame3* iface,
1606 D3DRMCOMBINETYPE type,
1607 D3DVALUE x, D3DVALUE y, D3DVALUE z)
1609 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1611 FIXME("(%p/%p)->(%u,%f,%f,%f): stub\n", iface, This, type, x, y, z);
1613 return E_NOTIMPL;
1616 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddScale(IDirect3DRMFrame3* iface,
1617 D3DRMCOMBINETYPE type,
1618 D3DVALUE sx, D3DVALUE sy, D3DVALUE sz)
1620 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1622 FIXME("(%p/%p)->(%u,%f,%f,%f): stub\n", iface, This, type, sx, sy, sz);
1624 return E_NOTIMPL;
1627 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddRotation(IDirect3DRMFrame3* iface,
1628 D3DRMCOMBINETYPE type,
1629 D3DVALUE x, D3DVALUE y, D3DVALUE z,
1630 D3DVALUE theta)
1632 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1634 FIXME("(%p/%p)->(%u,%f,%f,%f,%f): stub\n", iface, This, type, x, y, z, theta);
1636 return E_NOTIMPL;
1639 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddVisual(IDirect3DRMFrame3* iface, LPUNKNOWN vis)
1641 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1642 ULONG i;
1643 IDirect3DRMVisual** visuals;
1645 TRACE("(%p/%p)->(%p)\n", iface, This, vis);
1647 if (!vis)
1648 return D3DRMERR_BADOBJECT;
1650 /* Check if already existing and return gracefully without increasing ref count */
1651 for (i = 0; i < This->nb_visuals; i++)
1652 if (This->visuals[i] == (IDirect3DRMVisual*)vis)
1653 return D3DRM_OK;
1655 if ((This->nb_visuals + 1) > This->visuals_capacity)
1657 ULONG new_capacity;
1659 if (!This->visuals_capacity)
1661 new_capacity = 16;
1662 visuals = HeapAlloc(GetProcessHeap(), 0, new_capacity * sizeof(IDirect3DRMVisual*));
1664 else
1666 new_capacity = This->visuals_capacity * 2;
1667 visuals = HeapReAlloc(GetProcessHeap(), 0, This->visuals, new_capacity * sizeof(IDirect3DRMVisual*));
1670 if (!visuals)
1671 return E_OUTOFMEMORY;
1673 This->visuals_capacity = new_capacity;
1674 This->visuals = visuals;
1677 This->visuals[This->nb_visuals++] = (IDirect3DRMVisual*)vis;
1678 IDirect3DRMVisual_AddRef(vis);
1680 return D3DRM_OK;
1683 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetChildren(IDirect3DRMFrame3 *iface, IDirect3DRMFrameArray **children)
1685 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1686 IDirect3DRMFrameArrayImpl* obj;
1687 HRESULT hr;
1689 TRACE("(%p/%p)->(%p)\n", iface, This, children);
1691 if (!children)
1692 return D3DRMERR_BADVALUE;
1694 hr = Direct3DRMFrameArray_create(children);
1696 if (hr != D3DRM_OK)
1697 return hr;
1699 obj = (IDirect3DRMFrameArrayImpl*)*children;
1701 obj->size = This->nb_children;
1702 if (This->nb_children)
1704 ULONG i;
1705 if (!(obj->frames = HeapAlloc(GetProcessHeap(), 0, This->nb_children * sizeof(*obj->frames))))
1706 return E_OUTOFMEMORY;
1707 for (i = 0; i < This->nb_children; i++)
1708 IDirect3DRMFrame3_QueryInterface(This->children[i], &IID_IDirect3DRMFrame, (void**)&obj->frames[i]);
1711 return D3DRM_OK;
1714 static D3DCOLOR WINAPI IDirect3DRMFrame3Impl_GetColor(IDirect3DRMFrame3* iface)
1716 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1718 FIXME("(%p/%p)->(): stub\n", iface, This);
1720 return 0;
1723 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetLights(IDirect3DRMFrame3 *iface, IDirect3DRMLightArray **lights)
1725 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1726 IDirect3DRMLightArrayImpl* obj;
1727 HRESULT hr;
1729 TRACE("(%p/%p)->(%p)\n", iface, This, lights);
1731 if (!lights)
1732 return D3DRMERR_BADVALUE;
1734 hr = Direct3DRMLightArray_create(lights);
1736 if (hr != D3DRM_OK)
1737 return hr;
1739 obj = (IDirect3DRMLightArrayImpl*)*lights;
1741 obj->size = This->nb_lights;
1742 if (This->nb_lights)
1744 ULONG i;
1745 if (!(obj->lights = HeapAlloc(GetProcessHeap(), 0, This->nb_lights * sizeof(*obj->lights))))
1746 return E_OUTOFMEMORY;
1747 for (i = 0; i < This->nb_lights; i++)
1748 IDirect3DRMLight_QueryInterface(This->lights[i], &IID_IDirect3DRMLight, (void**)&obj->lights[i]);
1751 return D3DRM_OK;
1754 static D3DRMMATERIALMODE WINAPI IDirect3DRMFrame3Impl_GetMaterialMode(IDirect3DRMFrame3* iface)
1756 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1758 FIXME("(%p/%p)->(): stub\n", iface, This);
1760 return D3DRMMATERIAL_FROMPARENT;
1763 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetParent(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 **frame)
1765 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1767 TRACE("(%p/%p)->(%p)\n", iface, This, frame);
1769 if (!frame)
1770 return D3DRMERR_BADVALUE;
1772 if (This->parent)
1774 *frame = &This->parent->IDirect3DRMFrame3_iface;
1775 IDirect3DRMFrame_AddRef(*frame);
1777 else
1779 *frame = NULL;
1782 return D3DRM_OK;
1785 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetPosition(IDirect3DRMFrame3 *iface,
1786 IDirect3DRMFrame3 *reference, D3DVECTOR *return_position)
1788 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1790 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, reference, return_position);
1792 return E_NOTIMPL;
1795 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetRotation(IDirect3DRMFrame3 *iface,
1796 IDirect3DRMFrame3 *reference, D3DVECTOR *axis, D3DVALUE *return_theta)
1798 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1800 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, reference, axis, return_theta);
1802 return E_NOTIMPL;
1805 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetScene(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 **scene)
1807 FIXME("iface %p, scene %p stub!\n", iface, scene);
1809 return E_NOTIMPL;
1812 static D3DRMSORTMODE WINAPI IDirect3DRMFrame3Impl_GetSortMode(IDirect3DRMFrame3* iface)
1814 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1816 FIXME("(%p/%p)->(): stub\n", iface, This);
1818 return D3DRMSORT_FROMPARENT;
1821 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetTexture(IDirect3DRMFrame3 *iface, IDirect3DRMTexture3 **texture)
1823 FIXME("iface %p, texture %p stub!\n", iface, texture);
1825 return E_NOTIMPL;
1828 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetTransform(IDirect3DRMFrame3 *iface,
1829 IDirect3DRMFrame3 *reference, D3DRMMATRIX4D return_matrix)
1831 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1833 TRACE("(%p/%p)->(%p,%p)\n", iface, This, reference, return_matrix);
1835 if (reference)
1836 FIXME("Specifying a frame as the root of the scene different from the current root frame is not supported yet\n");
1838 memcpy(return_matrix, This->transform, sizeof(D3DRMMATRIX4D));
1840 return D3DRM_OK;
1843 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetVelocity(IDirect3DRMFrame3 *iface,
1844 IDirect3DRMFrame3 *reference, D3DVECTOR *return_velocity, BOOL with_rotation)
1846 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1848 FIXME("(%p/%p)->(%p,%p,%d): stub\n", iface, This, reference, return_velocity, with_rotation);
1850 return E_NOTIMPL;
1853 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetOrientation(IDirect3DRMFrame3 *iface,
1854 IDirect3DRMFrame3 *reference, D3DVECTOR *dir, D3DVECTOR *up)
1856 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1858 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, reference, dir, up);
1860 return E_NOTIMPL;
1863 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetVisuals(IDirect3DRMFrame3* iface, LPDWORD num,
1864 LPUNKNOWN *visuals)
1866 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1868 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, num, visuals);
1870 return E_NOTIMPL;
1873 static HRESULT WINAPI IDirect3DRMFrame3Impl_InverseTransform(IDirect3DRMFrame3* iface,
1874 D3DVECTOR *d, D3DVECTOR *s)
1876 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1878 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, d, s);
1880 return E_NOTIMPL;
1883 static HRESULT WINAPI IDirect3DRMFrame3Impl_Load(IDirect3DRMFrame3* iface, LPVOID filename,
1884 LPVOID name, D3DRMLOADOPTIONS loadflags,
1885 D3DRMLOADTEXTURE3CALLBACK cb, LPVOID lpArg)
1887 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1889 FIXME("(%p/%p)->(%p,%p,%u,%p,%p): stub\n", iface, This, filename, name, loadflags, cb, lpArg);
1891 return E_NOTIMPL;
1894 static HRESULT WINAPI IDirect3DRMFrame3Impl_LookAt(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 *target,
1895 IDirect3DRMFrame3 *reference, D3DRMFRAMECONSTRAINT constraint)
1897 FIXME("iface %p, target %p, reference %p, constraint %#x stub!\n", iface, target, reference, constraint);
1899 return E_NOTIMPL;
1902 static HRESULT WINAPI IDirect3DRMFrame3Impl_Move(IDirect3DRMFrame3* iface, D3DVALUE delta)
1904 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1906 FIXME("(%p/%p)->(%f): stub\n", iface, This, delta);
1908 return E_NOTIMPL;
1911 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteChild(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 *frame)
1913 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1914 IDirect3DRMFrameImpl *frame_obj = unsafe_impl_from_IDirect3DRMFrame3(frame);
1915 ULONG i;
1917 TRACE("(%p/%p)->(%p)\n", iface, This, frame);
1919 if (!frame_obj)
1920 return D3DRMERR_BADOBJECT;
1922 /* Check if child exists */
1923 for (i = 0; i < This->nb_children; i++)
1924 if (This->children[i] == frame)
1925 break;
1927 if (i == This->nb_children)
1928 return D3DRMERR_BADVALUE;
1930 memmove(This->children + i, This->children + i + 1, sizeof(IDirect3DRMFrame3*) * (This->nb_children - 1 - i));
1931 IDirect3DRMFrame3_Release(frame);
1932 frame_obj->parent = NULL;
1933 This->nb_children--;
1935 return D3DRM_OK;
1938 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteLight(IDirect3DRMFrame3 *iface, IDirect3DRMLight *light)
1940 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1941 ULONG i;
1943 TRACE("(%p/%p)->(%p)\n", iface, This, light);
1945 if (!light)
1946 return D3DRMERR_BADOBJECT;
1948 /* Check if visual exists */
1949 for (i = 0; i < This->nb_lights; i++)
1950 if (This->lights[i] == light)
1951 break;
1953 if (i == This->nb_lights)
1954 return D3DRMERR_BADVALUE;
1956 memmove(This->lights + i, This->lights + i + 1, sizeof(IDirect3DRMLight*) * (This->nb_lights - 1 - i));
1957 IDirect3DRMLight_Release(light);
1958 This->nb_lights--;
1960 return D3DRM_OK;
1963 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteMoveCallback(IDirect3DRMFrame3* iface,
1964 D3DRMFRAME3MOVECALLBACK cb,
1965 VOID *arg)
1967 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1969 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, cb, arg);
1971 return E_NOTIMPL;
1974 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteVisual(IDirect3DRMFrame3* iface, LPUNKNOWN vis)
1976 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1977 ULONG i;
1979 TRACE("(%p/%p)->(%p)\n", iface, This, vis);
1981 if (!vis)
1982 return D3DRMERR_BADOBJECT;
1984 /* Check if visual exists */
1985 for (i = 0; i < This->nb_visuals; i++)
1986 if (This->visuals[i] == (IDirect3DRMVisual*)vis)
1987 break;
1989 if (i == This->nb_visuals)
1990 return D3DRMERR_BADVALUE;
1992 memmove(This->visuals + i, This->visuals + i + 1, sizeof(IDirect3DRMVisual*) * (This->nb_visuals - 1 - i));
1993 IDirect3DRMVisual_Release(vis);
1994 This->nb_visuals--;
1996 return D3DRM_OK;
1999 static D3DCOLOR WINAPI IDirect3DRMFrame3Impl_GetSceneBackground(IDirect3DRMFrame3* iface)
2001 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2003 TRACE("(%p/%p)->()\n", iface, This);
2005 return This->scenebackground;
2008 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetSceneBackgroundDepth(IDirect3DRMFrame3 *iface,
2009 IDirectDrawSurface **surface)
2011 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2013 FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
2015 return E_NOTIMPL;
2018 static D3DCOLOR WINAPI IDirect3DRMFrame3Impl_GetSceneFogColor(IDirect3DRMFrame3* iface)
2020 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2022 FIXME("(%p/%p)->(): stub\n", iface, This);
2024 return 0;
2027 static BOOL WINAPI IDirect3DRMFrame3Impl_GetSceneFogEnable(IDirect3DRMFrame3* iface)
2029 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2031 FIXME("(%p/%p)->(): stub\n", iface, This);
2033 return FALSE;
2036 static D3DRMFOGMODE WINAPI IDirect3DRMFrame3Impl_GetSceneFogMode(IDirect3DRMFrame3* iface)
2038 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2040 FIXME("(%p/%p)->(): stub\n", iface, This);
2042 return D3DRMFOG_LINEAR;
2045 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetSceneFogParams(IDirect3DRMFrame3* iface,
2046 D3DVALUE *return_start,
2047 D3DVALUE *return_end,
2048 D3DVALUE *return_density)
2050 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2052 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, return_start, return_end, return_density);
2054 return E_NOTIMPL;
2057 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackground(IDirect3DRMFrame3* iface,
2058 D3DCOLOR color)
2060 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2062 TRACE("(%p/%p)->(%u)\n", iface, This, color);
2064 This->scenebackground = color;
2066 return D3DRM_OK;
2069 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackgroundRGB(IDirect3DRMFrame3* iface,
2070 D3DVALUE red, D3DVALUE green,
2071 D3DVALUE blue)
2073 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2075 TRACE("(%p/%p)->(%f,%f,%f)\n", iface, This, red, green, blue);
2077 This->scenebackground = RGBA_MAKE((BYTE)(red * 255.0f),
2078 (BYTE)(green * 255.0f), (BYTE)(blue * 255.0f), 0xff);
2080 return D3DRM_OK;
2083 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackgroundDepth(IDirect3DRMFrame3 *iface,
2084 IDirectDrawSurface *surface)
2086 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2088 FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
2090 return E_NOTIMPL;
2093 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackgroundImage(IDirect3DRMFrame3 *iface,
2094 IDirect3DRMTexture3 *texture)
2096 FIXME("iface %p, texture %p stub!\n", iface, texture);
2098 return E_NOTIMPL;
2101 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogEnable(IDirect3DRMFrame3* iface, BOOL enable)
2103 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2105 FIXME("(%p/%p)->(%d): stub\n", iface, This, enable);
2107 return E_NOTIMPL;
2110 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogColor(IDirect3DRMFrame3* iface,
2111 D3DCOLOR color)
2113 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2115 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
2117 return E_NOTIMPL;
2120 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogMode(IDirect3DRMFrame3* iface,
2121 D3DRMFOGMODE mode)
2123 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2125 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
2127 return E_NOTIMPL;
2130 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogParams(IDirect3DRMFrame3* iface,
2131 D3DVALUE start, D3DVALUE end,
2132 D3DVALUE density)
2134 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2136 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, start, end, density);
2138 return E_NOTIMPL;
2141 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetColor(IDirect3DRMFrame3* iface, D3DCOLOR color)
2143 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2145 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
2147 return E_NOTIMPL;
2150 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetColorRGB(IDirect3DRMFrame3* iface, D3DVALUE red,
2151 D3DVALUE green, D3DVALUE blue)
2153 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2155 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, red, green, blue);
2157 return E_NOTIMPL;
2160 static D3DRMZBUFFERMODE WINAPI IDirect3DRMFrame3Impl_GetZbufferMode(IDirect3DRMFrame3* iface)
2162 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2164 FIXME("(%p/%p)->(): stub\n", iface, This);
2166 return D3DRMZBUFFER_FROMPARENT;
2169 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetMaterialMode(IDirect3DRMFrame3* iface,
2170 D3DRMMATERIALMODE mode)
2172 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2174 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
2176 return E_NOTIMPL;
2179 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetOrientation(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 *reference,
2180 D3DVALUE dx, D3DVALUE dy, D3DVALUE dz, D3DVALUE ux, D3DVALUE uy, D3DVALUE uz)
2182 FIXME("iface %p, reference %p, dx %.8e, dy %.8e, dz %.8e, ux %.8e, uy %.8e, uz %.8e stub!\n",
2183 iface, reference, dx, dy, dz, ux, uy, uz);
2185 return E_NOTIMPL;
2188 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetPosition(IDirect3DRMFrame3 *iface,
2189 IDirect3DRMFrame3 *reference, D3DVALUE x, D3DVALUE y, D3DVALUE z)
2191 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e stub!\n", iface, reference, x, y, z);
2193 return E_NOTIMPL;
2196 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetRotation(IDirect3DRMFrame3 *iface,
2197 IDirect3DRMFrame3 *reference, D3DVALUE x, D3DVALUE y, D3DVALUE z, D3DVALUE theta)
2199 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e, theta %.8e stub!\n",
2200 iface, reference, x, y, z, theta);
2202 return E_NOTIMPL;
2205 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSortMode(IDirect3DRMFrame3* iface,
2206 D3DRMSORTMODE mode)
2208 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2210 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
2212 return E_NOTIMPL;
2215 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetTexture(IDirect3DRMFrame3 *iface, IDirect3DRMTexture3 *texture)
2217 FIXME("iface %p, texture %p stub!\n", iface, texture);
2219 return E_NOTIMPL;
2222 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetVelocity(IDirect3DRMFrame3 *iface,
2223 IDirect3DRMFrame3 *reference, D3DVALUE x, D3DVALUE y, D3DVALUE z, BOOL with_rotation)
2225 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e, with_rotation %#x.\n",
2226 iface, reference, x, y, z, with_rotation);
2228 return E_NOTIMPL;
2231 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetZbufferMode(IDirect3DRMFrame3* iface,
2232 D3DRMZBUFFERMODE mode)
2234 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2236 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
2238 return E_NOTIMPL;
2241 static HRESULT WINAPI IDirect3DRMFrame3Impl_Transform(IDirect3DRMFrame3* iface, D3DVECTOR *d,
2242 D3DVECTOR *s)
2244 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2246 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, d, s);
2248 return E_NOTIMPL;
2251 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetBox(IDirect3DRMFrame3 *iface, D3DRMBOX *box)
2253 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2255 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
2257 return E_NOTIMPL;
2260 static BOOL WINAPI IDirect3DRMFrame3Impl_GetBoxEnable(IDirect3DRMFrame3* iface)
2262 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2264 FIXME("(%p/%p)->(): stub\n", iface, This);
2266 return E_NOTIMPL;
2269 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetAxes(IDirect3DRMFrame3 *iface, D3DVECTOR *dir, D3DVECTOR *up)
2271 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2273 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, dir, up);
2275 return E_NOTIMPL;
2278 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetMaterial(IDirect3DRMFrame3 *iface, IDirect3DRMMaterial2 **material)
2280 FIXME("iface %p, material %p stub!\n", iface, material);
2282 return E_NOTIMPL;
2285 static BOOL WINAPI IDirect3DRMFrame3Impl_GetInheritAxes(IDirect3DRMFrame3* iface)
2287 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2289 FIXME("(%p/%p)->(): stub\n", iface, This);
2291 return E_NOTIMPL;
2294 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetHierarchyBox(IDirect3DRMFrame3* iface, D3DRMBOX *box)
2296 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2298 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
2300 return E_NOTIMPL;
2303 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetBox(IDirect3DRMFrame3 *iface, D3DRMBOX *box)
2305 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2307 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
2309 return E_NOTIMPL;
2312 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetBoxEnable(IDirect3DRMFrame3* iface, BOOL enable)
2314 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2316 FIXME("(%p/%p)->(%u): stub\n", iface, This, enable);
2318 return E_NOTIMPL;
2321 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetAxes(IDirect3DRMFrame3* iface,
2322 D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
2323 D3DVALUE ux, D3DVALUE uy, D3DVALUE uz)
2325 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2327 FIXME("(%p/%p)->(%f,%f,%f,%f,%f,%f): stub\n", iface, This, dx, dy, dz, ux, uy, uz);
2329 return E_NOTIMPL;
2332 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetInheritAxes(IDirect3DRMFrame3* iface,
2333 BOOL inherit_from_parent)
2335 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2337 FIXME("(%p/%p)->(%u): stub\n", iface, This, inherit_from_parent);
2339 return E_NOTIMPL;
2342 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetMaterial(IDirect3DRMFrame3 *iface, IDirect3DRMMaterial2 *material)
2344 FIXME("iface %p, material %p stub!\n", iface, material);
2346 return E_NOTIMPL;
2349 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetQuaternion(IDirect3DRMFrame3 *iface,
2350 IDirect3DRMFrame3 *reference, D3DRMQUATERNION *q)
2352 FIXME("iface %p, reference %p, q %p stub!\n", iface, reference, q);
2354 return E_NOTIMPL;
2357 static HRESULT WINAPI IDirect3DRMFrame3Impl_RayPick(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 *reference,
2358 D3DRMRAY *ray, DWORD flags, IDirect3DRMPicked2Array **return_visuals)
2360 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2362 FIXME("(%p/%p)->(%p,%p,%u,%p): stub\n", iface, This, reference, ray, flags, return_visuals);
2364 return E_NOTIMPL;
2367 static HRESULT WINAPI IDirect3DRMFrame3Impl_Save(IDirect3DRMFrame3* iface, LPCSTR filename,
2368 D3DRMXOFFORMAT d3dFormat,
2369 D3DRMSAVEOPTIONS d3dSaveFlags)
2371 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2373 FIXME("(%p/%p)->(%p,%u,%u): stub\n", iface, This, filename, d3dFormat, d3dSaveFlags);
2375 return E_NOTIMPL;
2378 static HRESULT WINAPI IDirect3DRMFrame3Impl_TransformVectors(IDirect3DRMFrame3 *iface,
2379 IDirect3DRMFrame3 *reference, DWORD num, D3DVECTOR *dst, D3DVECTOR *src)
2381 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2383 FIXME("(%p/%p)->(%p,%u,%p,%p): stub\n", iface, This, reference, num, dst, src);
2385 return E_NOTIMPL;
2388 static HRESULT WINAPI IDirect3DRMFrame3Impl_InverseTransformVectors(IDirect3DRMFrame3 *iface,
2389 IDirect3DRMFrame3 *reference, DWORD num, D3DVECTOR *dst, D3DVECTOR *src)
2391 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2393 FIXME("(%p/%p)->(%p,%u,%p,%p): stub\n", iface, This, reference, num, dst, src);
2395 return E_NOTIMPL;
2398 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetTraversalOptions(IDirect3DRMFrame3* iface,
2399 DWORD flags)
2401 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2403 FIXME("(%p/%p)->(%u): stub\n", iface, This, flags);
2405 return E_NOTIMPL;
2408 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetTraversalOptions(IDirect3DRMFrame3* iface,
2409 LPDWORD flags)
2411 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2413 FIXME("(%p/%p)->(%p): stub\n", iface, This, flags);
2415 return E_NOTIMPL;
2418 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogMethod(IDirect3DRMFrame3* iface,
2419 DWORD flags)
2421 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2423 FIXME("(%p/%p)->(%u): stub\n", iface, This, flags);
2425 return E_NOTIMPL;
2428 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetSceneFogMethod(IDirect3DRMFrame3* iface,
2429 LPDWORD flags)
2431 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2433 FIXME("(%p/%p)->(%p): stub\n", iface, This, flags);
2435 return E_NOTIMPL;
2438 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetMaterialOverride(IDirect3DRMFrame3 *iface,
2439 D3DRMMATERIALOVERRIDE *override)
2441 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2443 FIXME("(%p/%p)->(%p): stub\n", iface, This, override);
2445 return E_NOTIMPL;
2448 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetMaterialOverride(IDirect3DRMFrame3 *iface,
2449 D3DRMMATERIALOVERRIDE *override)
2451 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2453 FIXME("(%p/%p)->(%p): stub\n", iface, This, override);
2455 return E_NOTIMPL;
2458 static const struct IDirect3DRMFrame3Vtbl Direct3DRMFrame3_Vtbl =
2460 /*** IUnknown methods ***/
2461 IDirect3DRMFrame3Impl_QueryInterface,
2462 IDirect3DRMFrame3Impl_AddRef,
2463 IDirect3DRMFrame3Impl_Release,
2464 /*** IDirect3DRMObject methods ***/
2465 IDirect3DRMFrame3Impl_Clone,
2466 IDirect3DRMFrame3Impl_AddDestroyCallback,
2467 IDirect3DRMFrame3Impl_DeleteDestroyCallback,
2468 IDirect3DRMFrame3Impl_SetAppData,
2469 IDirect3DRMFrame3Impl_GetAppData,
2470 IDirect3DRMFrame3Impl_SetName,
2471 IDirect3DRMFrame3Impl_GetName,
2472 IDirect3DRMFrame3Impl_GetClassName,
2473 /*** IDirect3DRMFrame3 methods ***/
2474 IDirect3DRMFrame3Impl_AddChild,
2475 IDirect3DRMFrame3Impl_AddLight,
2476 IDirect3DRMFrame3Impl_AddMoveCallback,
2477 IDirect3DRMFrame3Impl_AddTransform,
2478 IDirect3DRMFrame3Impl_AddTranslation,
2479 IDirect3DRMFrame3Impl_AddScale,
2480 IDirect3DRMFrame3Impl_AddRotation,
2481 IDirect3DRMFrame3Impl_AddVisual,
2482 IDirect3DRMFrame3Impl_GetChildren,
2483 IDirect3DRMFrame3Impl_GetColor,
2484 IDirect3DRMFrame3Impl_GetLights,
2485 IDirect3DRMFrame3Impl_GetMaterialMode,
2486 IDirect3DRMFrame3Impl_GetParent,
2487 IDirect3DRMFrame3Impl_GetPosition,
2488 IDirect3DRMFrame3Impl_GetRotation,
2489 IDirect3DRMFrame3Impl_GetScene,
2490 IDirect3DRMFrame3Impl_GetSortMode,
2491 IDirect3DRMFrame3Impl_GetTexture,
2492 IDirect3DRMFrame3Impl_GetTransform,
2493 IDirect3DRMFrame3Impl_GetVelocity,
2494 IDirect3DRMFrame3Impl_GetOrientation,
2495 IDirect3DRMFrame3Impl_GetVisuals,
2496 IDirect3DRMFrame3Impl_InverseTransform,
2497 IDirect3DRMFrame3Impl_Load,
2498 IDirect3DRMFrame3Impl_LookAt,
2499 IDirect3DRMFrame3Impl_Move,
2500 IDirect3DRMFrame3Impl_DeleteChild,
2501 IDirect3DRMFrame3Impl_DeleteLight,
2502 IDirect3DRMFrame3Impl_DeleteMoveCallback,
2503 IDirect3DRMFrame3Impl_DeleteVisual,
2504 IDirect3DRMFrame3Impl_GetSceneBackground,
2505 IDirect3DRMFrame3Impl_GetSceneBackgroundDepth,
2506 IDirect3DRMFrame3Impl_GetSceneFogColor,
2507 IDirect3DRMFrame3Impl_GetSceneFogEnable,
2508 IDirect3DRMFrame3Impl_GetSceneFogMode,
2509 IDirect3DRMFrame3Impl_GetSceneFogParams,
2510 IDirect3DRMFrame3Impl_SetSceneBackground,
2511 IDirect3DRMFrame3Impl_SetSceneBackgroundRGB,
2512 IDirect3DRMFrame3Impl_SetSceneBackgroundDepth,
2513 IDirect3DRMFrame3Impl_SetSceneBackgroundImage,
2514 IDirect3DRMFrame3Impl_SetSceneFogEnable,
2515 IDirect3DRMFrame3Impl_SetSceneFogColor,
2516 IDirect3DRMFrame3Impl_SetSceneFogMode,
2517 IDirect3DRMFrame3Impl_SetSceneFogParams,
2518 IDirect3DRMFrame3Impl_SetColor,
2519 IDirect3DRMFrame3Impl_SetColorRGB,
2520 IDirect3DRMFrame3Impl_GetZbufferMode,
2521 IDirect3DRMFrame3Impl_SetMaterialMode,
2522 IDirect3DRMFrame3Impl_SetOrientation,
2523 IDirect3DRMFrame3Impl_SetPosition,
2524 IDirect3DRMFrame3Impl_SetRotation,
2525 IDirect3DRMFrame3Impl_SetSortMode,
2526 IDirect3DRMFrame3Impl_SetTexture,
2527 IDirect3DRMFrame3Impl_SetVelocity,
2528 IDirect3DRMFrame3Impl_SetZbufferMode,
2529 IDirect3DRMFrame3Impl_Transform,
2530 IDirect3DRMFrame3Impl_GetBox,
2531 IDirect3DRMFrame3Impl_GetBoxEnable,
2532 IDirect3DRMFrame3Impl_GetAxes,
2533 IDirect3DRMFrame3Impl_GetMaterial,
2534 IDirect3DRMFrame3Impl_GetInheritAxes,
2535 IDirect3DRMFrame3Impl_GetHierarchyBox,
2536 IDirect3DRMFrame3Impl_SetBox,
2537 IDirect3DRMFrame3Impl_SetBoxEnable,
2538 IDirect3DRMFrame3Impl_SetAxes,
2539 IDirect3DRMFrame3Impl_SetInheritAxes,
2540 IDirect3DRMFrame3Impl_SetMaterial,
2541 IDirect3DRMFrame3Impl_SetQuaternion,
2542 IDirect3DRMFrame3Impl_RayPick,
2543 IDirect3DRMFrame3Impl_Save,
2544 IDirect3DRMFrame3Impl_TransformVectors,
2545 IDirect3DRMFrame3Impl_InverseTransformVectors,
2546 IDirect3DRMFrame3Impl_SetTraversalOptions,
2547 IDirect3DRMFrame3Impl_GetTraversalOptions,
2548 IDirect3DRMFrame3Impl_SetSceneFogMethod,
2549 IDirect3DRMFrame3Impl_GetSceneFogMethod,
2550 IDirect3DRMFrame3Impl_SetMaterialOverride,
2551 IDirect3DRMFrame3Impl_GetMaterialOverride
2554 static inline IDirect3DRMFrameImpl *unsafe_impl_from_IDirect3DRMFrame3(IDirect3DRMFrame3 *iface)
2556 if (!iface)
2557 return NULL;
2558 assert(iface->lpVtbl == &Direct3DRMFrame3_Vtbl);
2560 return impl_from_IDirect3DRMFrame3(iface);
2563 HRESULT Direct3DRMFrame_create(REFIID riid, IUnknown* parent, IUnknown** ret_iface)
2565 IDirect3DRMFrameImpl* object;
2566 HRESULT hr;
2568 TRACE("(%s, %p, %p)\n", wine_dbgstr_guid(riid), parent, ret_iface);
2570 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMFrameImpl));
2571 if (!object)
2572 return E_OUTOFMEMORY;
2574 object->IDirect3DRMFrame2_iface.lpVtbl = &Direct3DRMFrame2_Vtbl;
2575 object->IDirect3DRMFrame3_iface.lpVtbl = &Direct3DRMFrame3_Vtbl;
2576 object->ref = 1;
2577 object->scenebackground = RGBA_MAKE(0, 0, 0, 0xff);
2579 memcpy(object->transform, identity, sizeof(D3DRMMATRIX4D));
2581 if (parent)
2583 IDirect3DRMFrame3 *p;
2585 hr = IDirect3DRMFrame_QueryInterface(parent, &IID_IDirect3DRMFrame3, (void**)&p);
2586 if (hr != S_OK)
2588 HeapFree(GetProcessHeap(), 0, object);
2589 return hr;
2591 IDirect3DRMFrame_Release(parent);
2592 IDirect3DRMFrame3_AddChild(p, &object->IDirect3DRMFrame3_iface);
2595 hr = IDirect3DRMFrame3_QueryInterface(&object->IDirect3DRMFrame3_iface, riid, (void**)ret_iface);
2596 IDirect3DRMFrame3_Release(&object->IDirect3DRMFrame3_iface);
2597 return S_OK;