windowscodecs: Add more tests for PNG metadata.
[wine/multimedia.git] / dlls / d3drm / frame.c
blob6cab5fa808c15e88a732e006b92069941a8f34e5
1 /*
2 * Implementation of IDirect3DRMFrame Interface
4 * Copyright 2011, 2012 André Hentschel
5 * Copyright 2012 Christian Costa
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 #include <assert.h>
23 #include "wine/debug.h"
25 #define COBJMACROS
27 #include "winbase.h"
28 #include "wingdi.h"
30 #include "d3drm_private.h"
32 WINE_DEFAULT_DEBUG_CHANNEL(d3drm);
34 static D3DRMMATRIX4D identity = {
35 { 1.0f, 0.0f, 0.0f, 0.0f },
36 { 0.0f, 1.0f, 0.0f, 0.0f },
37 { 0.0f, 0.0f, 1.0f, 0.0f },
38 { 0.0f, 0.0f, 0.0f, 1.0f }
41 typedef struct IDirect3DRMFrameImpl IDirect3DRMFrameImpl;
43 struct IDirect3DRMFrameImpl {
44 IDirect3DRMFrame2 IDirect3DRMFrame2_iface;
45 IDirect3DRMFrame3 IDirect3DRMFrame3_iface;
46 LONG ref;
47 IDirect3DRMFrameImpl* parent;
48 ULONG nb_children;
49 ULONG children_capacity;
50 IDirect3DRMFrame3** children;
51 ULONG nb_visuals;
52 ULONG visuals_capacity;
53 IDirect3DRMVisual** visuals;
54 ULONG nb_lights;
55 ULONG lights_capacity;
56 IDirect3DRMLight** lights;
57 D3DRMMATRIX4D transform;
58 D3DCOLOR scenebackground;
61 typedef struct {
62 IDirect3DRMFrameArray IDirect3DRMFrameArray_iface;
63 LONG ref;
64 ULONG size;
65 LPDIRECT3DRMFRAME* frames;
66 } IDirect3DRMFrameArrayImpl;
68 typedef struct {
69 IDirect3DRMVisualArray IDirect3DRMVisualArray_iface;
70 LONG ref;
71 ULONG size;
72 LPDIRECT3DRMVISUAL* visuals;
73 } IDirect3DRMVisualArrayImpl;
75 typedef struct {
76 IDirect3DRMLightArray IDirect3DRMLightArray_iface;
77 LONG ref;
78 ULONG size;
79 LPDIRECT3DRMLIGHT* lights;
80 } IDirect3DRMLightArrayImpl;
82 static inline IDirect3DRMFrameImpl *impl_from_IDirect3DRMFrame2(IDirect3DRMFrame2 *iface)
84 return CONTAINING_RECORD(iface, IDirect3DRMFrameImpl, IDirect3DRMFrame2_iface);
87 static inline IDirect3DRMFrameImpl *impl_from_IDirect3DRMFrame3(IDirect3DRMFrame3 *iface)
89 return CONTAINING_RECORD(iface, IDirect3DRMFrameImpl, IDirect3DRMFrame3_iface);
92 static inline IDirect3DRMFrameImpl *unsafe_impl_from_IDirect3DRMFrame3(IDirect3DRMFrame3 *iface);
94 static inline IDirect3DRMLightArrayImpl *impl_from_IDirect3DRMLightArray(IDirect3DRMLightArray *iface)
96 return CONTAINING_RECORD(iface, IDirect3DRMLightArrayImpl, IDirect3DRMLightArray_iface);
99 /*** IUnknown methods ***/
100 static HRESULT WINAPI IDirect3DRMFrameArrayImpl_QueryInterface(IDirect3DRMFrameArray* iface,
101 REFIID riid, void** object)
103 IDirect3DRMFrameArrayImpl *This = (IDirect3DRMFrameArrayImpl*)iface;
105 TRACE("(%p/%p)->(%s, %p)\n", iface, This, debugstr_guid(riid), object);
107 *object = NULL;
109 if (IsEqualGUID(riid, &IID_IUnknown) ||
110 IsEqualGUID(riid, &IID_IDirect3DRMFrameArray))
112 *object = &This->IDirect3DRMFrameArray_iface;
114 else
116 FIXME("interface %s not implemented\n", debugstr_guid(riid));
117 return E_NOINTERFACE;
120 IDirect3DRMFrameArray_AddRef(iface);
121 return S_OK;
124 static ULONG WINAPI IDirect3DRMFrameArrayImpl_AddRef(IDirect3DRMFrameArray* iface)
126 IDirect3DRMFrameArrayImpl *This = (IDirect3DRMFrameArrayImpl*)iface;
127 ULONG ref = InterlockedIncrement(&This->ref);
129 TRACE("(%p)->(): new ref = %u\n", This, ref);
131 return ref;
134 static ULONG WINAPI IDirect3DRMFrameArrayImpl_Release(IDirect3DRMFrameArray* iface)
136 IDirect3DRMFrameArrayImpl *This = (IDirect3DRMFrameArrayImpl*)iface;
137 ULONG ref = InterlockedDecrement(&This->ref);
138 ULONG i;
140 TRACE("(%p)->(): new ref = %u\n", This, ref);
142 if (!ref)
144 for (i = 0; i < This->size; i++)
145 IDirect3DRMFrame_Release(This->frames[i]);
146 HeapFree(GetProcessHeap(), 0, This->frames);
147 HeapFree(GetProcessHeap(), 0, This);
150 return ref;
153 /*** IDirect3DRMArray methods ***/
154 static DWORD WINAPI IDirect3DRMFrameArrayImpl_GetSize(IDirect3DRMFrameArray* iface)
156 IDirect3DRMFrameArrayImpl *This = (IDirect3DRMFrameArrayImpl*)iface;
158 TRACE("(%p)->() = %d\n", This, This->size);
160 return This->size;
163 /*** IDirect3DRMFrameArray methods ***/
164 static HRESULT WINAPI IDirect3DRMFrameArrayImpl_GetElement(IDirect3DRMFrameArray* iface, DWORD index, LPDIRECT3DRMFRAME* frame)
166 IDirect3DRMFrameArrayImpl *This = (IDirect3DRMFrameArrayImpl*)iface;
168 TRACE("(%p)->(%u, %p)\n", This, index, frame);
170 if (!frame)
171 return D3DRMERR_BADVALUE;
173 *frame = NULL;
175 if (index >= This->size)
176 return D3DRMERR_BADVALUE;
178 IDirect3DRMFrame_AddRef(This->frames[index]);
179 *frame = This->frames[index];
181 return D3DRM_OK;
184 static const struct IDirect3DRMFrameArrayVtbl Direct3DRMFrameArray_Vtbl =
186 /*** IUnknown methods ***/
187 IDirect3DRMFrameArrayImpl_QueryInterface,
188 IDirect3DRMFrameArrayImpl_AddRef,
189 IDirect3DRMFrameArrayImpl_Release,
190 /*** IDirect3DRMArray methods ***/
191 IDirect3DRMFrameArrayImpl_GetSize,
192 /*** IDirect3DRMFrameArray methods ***/
193 IDirect3DRMFrameArrayImpl_GetElement
196 static HRESULT Direct3DRMFrameArray_create(IDirect3DRMFrameArray** obj)
198 IDirect3DRMFrameArrayImpl* object;
200 TRACE("(%p)\n", obj);
202 *obj = NULL;
204 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMFrameArrayImpl));
205 if (!object)
207 ERR("Out of memory\n");
208 return E_OUTOFMEMORY;
211 object->IDirect3DRMFrameArray_iface.lpVtbl = &Direct3DRMFrameArray_Vtbl;
212 object->ref = 1;
214 *obj = &object->IDirect3DRMFrameArray_iface;
216 return S_OK;
219 /*** IUnknown methods ***/
220 static HRESULT WINAPI IDirect3DRMVisualArrayImpl_QueryInterface(IDirect3DRMVisualArray* iface,
221 REFIID riid, void** ret_iface)
223 TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), ret_iface);
225 if (IsEqualGUID(riid, &IID_IUnknown) ||
226 IsEqualGUID(riid, &IID_IDirect3DRMFrameArray))
228 *ret_iface = iface;
229 IDirect3DRMVisualArray_AddRef(iface);
230 return S_OK;
233 *ret_iface = NULL;
235 WARN("Interface %s not implemented\n", debugstr_guid(riid));
237 return E_NOINTERFACE;
240 static ULONG WINAPI IDirect3DRMVisualArrayImpl_AddRef(IDirect3DRMVisualArray* iface)
242 IDirect3DRMVisualArrayImpl *This = (IDirect3DRMVisualArrayImpl*)iface;
243 ULONG ref = InterlockedIncrement(&This->ref);
245 TRACE("(%p)->(): new ref = %u\n", iface, ref);
247 return ref;
250 static ULONG WINAPI IDirect3DRMVisualArrayImpl_Release(IDirect3DRMVisualArray* iface)
252 IDirect3DRMVisualArrayImpl *This = (IDirect3DRMVisualArrayImpl*)iface;
253 ULONG ref = InterlockedDecrement(&This->ref);
254 ULONG i;
256 TRACE("(%p)->(): new ref = %u\n", iface, ref);
258 if (!ref)
260 for (i = 0; i < This->size; i++)
261 IDirect3DRMVisual_Release(This->visuals[i]);
262 HeapFree(GetProcessHeap(), 0, This->visuals);
263 HeapFree(GetProcessHeap(), 0, This);
266 return ref;
269 /*** IDirect3DRMArray methods ***/
270 static DWORD WINAPI IDirect3DRMVisualArrayImpl_GetSize(IDirect3DRMVisualArray* iface)
272 IDirect3DRMVisualArrayImpl *This = (IDirect3DRMVisualArrayImpl*)iface;
274 TRACE("(%p)->() = %d\n", iface, This->size);
276 return This->size;
279 /*** IDirect3DRMVisualArray methods ***/
280 static HRESULT WINAPI IDirect3DRMVisualArrayImpl_GetElement(IDirect3DRMVisualArray* iface, DWORD index, LPDIRECT3DRMVISUAL* visual)
282 IDirect3DRMVisualArrayImpl *This = (IDirect3DRMVisualArrayImpl*)iface;
284 TRACE("(%p)->(%u, %p)\n", iface, index, visual);
286 if (!visual)
287 return D3DRMERR_BADVALUE;
289 *visual = NULL;
291 if (index >= This->size)
292 return D3DRMERR_BADVALUE;
294 IDirect3DRMVisual_AddRef(This->visuals[index]);
295 *visual = This->visuals[index];
297 return D3DRM_OK;
300 static const struct IDirect3DRMVisualArrayVtbl Direct3DRMVisualArray_Vtbl =
302 /*** IUnknown methods ***/
303 IDirect3DRMVisualArrayImpl_QueryInterface,
304 IDirect3DRMVisualArrayImpl_AddRef,
305 IDirect3DRMVisualArrayImpl_Release,
306 /*** IDirect3DRMArray methods ***/
307 IDirect3DRMVisualArrayImpl_GetSize,
308 /*** IDirect3DRMVisualArray methods ***/
309 IDirect3DRMVisualArrayImpl_GetElement
312 static HRESULT Direct3DRMVisualArray_create(IDirect3DRMVisualArray** ret_iface)
314 IDirect3DRMVisualArrayImpl* object;
316 TRACE("(%p)\n", ret_iface);
318 *ret_iface = NULL;
320 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMVisualArrayImpl));
321 if (!object)
323 ERR("Out of memory\n");
324 return E_OUTOFMEMORY;
327 object->IDirect3DRMVisualArray_iface.lpVtbl = &Direct3DRMVisualArray_Vtbl;
328 object->ref = 1;
330 *ret_iface = &object->IDirect3DRMVisualArray_iface;
332 return S_OK;
335 /*** IUnknown methods ***/
336 static HRESULT WINAPI IDirect3DRMLightArrayImpl_QueryInterface(IDirect3DRMLightArray* iface,
337 REFIID riid, void** object)
339 IDirect3DRMLightArrayImpl *This = impl_from_IDirect3DRMLightArray(iface);
341 TRACE("(%p/%p)->(%s, %p)\n", iface, This, debugstr_guid(riid), object);
343 *object = NULL;
345 if (IsEqualGUID(riid, &IID_IUnknown) ||
346 IsEqualGUID(riid, &IID_IDirect3DRMLightArray))
348 *object = &This->IDirect3DRMLightArray_iface;
350 else
352 FIXME("interface %s not implemented\n", debugstr_guid(riid));
353 return E_NOINTERFACE;
356 IDirect3DRMLightArray_AddRef(iface);
357 return S_OK;
360 static ULONG WINAPI IDirect3DRMLightArrayImpl_AddRef(IDirect3DRMLightArray* iface)
362 IDirect3DRMLightArrayImpl *This = impl_from_IDirect3DRMLightArray(iface);
363 ULONG ref = InterlockedIncrement(&This->ref);
365 TRACE("(%p)->(): new ref = %u\n", This, ref);
367 return ref;
370 static ULONG WINAPI IDirect3DRMLightArrayImpl_Release(IDirect3DRMLightArray* iface)
372 IDirect3DRMLightArrayImpl *This = impl_from_IDirect3DRMLightArray(iface);
373 ULONG ref = InterlockedDecrement(&This->ref);
374 ULONG i;
376 TRACE("(%p)->(): new ref = %u\n", This, ref);
378 if (!ref)
380 for (i = 0; i < This->size; i++)
381 IDirect3DRMLight_Release(This->lights[i]);
382 HeapFree(GetProcessHeap(), 0, This->lights);
383 HeapFree(GetProcessHeap(), 0, This);
386 return ref;
389 /*** IDirect3DRMArray methods ***/
390 static DWORD WINAPI IDirect3DRMLightArrayImpl_GetSize(IDirect3DRMLightArray* iface)
392 IDirect3DRMLightArrayImpl *This = impl_from_IDirect3DRMLightArray(iface);
394 TRACE("(%p)->() = %d\n", This, This->size);
396 return This->size;
399 /*** IDirect3DRMLightArray methods ***/
400 static HRESULT WINAPI IDirect3DRMLightArrayImpl_GetElement(IDirect3DRMLightArray* iface, DWORD index, LPDIRECT3DRMLIGHT* light)
402 IDirect3DRMLightArrayImpl *This = impl_from_IDirect3DRMLightArray(iface);
404 TRACE("(%p)->(%u, %p)\n", This, index, light);
406 if (!light)
407 return D3DRMERR_BADVALUE;
409 *light = NULL;
411 if (index >= This->size)
412 return D3DRMERR_BADVALUE;
414 IDirect3DRMLight_AddRef(This->lights[index]);
415 *light = This->lights[index];
417 return D3DRM_OK;
420 static const struct IDirect3DRMLightArrayVtbl Direct3DRMLightArray_Vtbl =
422 /*** IUnknown methods ***/
423 IDirect3DRMLightArrayImpl_QueryInterface,
424 IDirect3DRMLightArrayImpl_AddRef,
425 IDirect3DRMLightArrayImpl_Release,
426 /*** IDirect3DRMArray methods ***/
427 IDirect3DRMLightArrayImpl_GetSize,
428 /*** IDirect3DRMLightArray methods ***/
429 IDirect3DRMLightArrayImpl_GetElement
432 static HRESULT Direct3DRMLightArray_create(IDirect3DRMLightArray** obj)
434 IDirect3DRMLightArrayImpl* object;
436 TRACE("(%p)\n", obj);
438 *obj = NULL;
440 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMLightArrayImpl));
441 if (!object)
443 ERR("Out of memory\n");
444 return E_OUTOFMEMORY;
447 object->IDirect3DRMLightArray_iface.lpVtbl = &Direct3DRMLightArray_Vtbl;
448 object->ref = 1;
450 *obj = &object->IDirect3DRMLightArray_iface;
452 return S_OK;
455 /*** IUnknown methods ***/
456 static HRESULT WINAPI IDirect3DRMFrame2Impl_QueryInterface(IDirect3DRMFrame2* iface,
457 REFIID riid, void** object)
459 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
461 TRACE("(%p/%p)->(%s, %p)\n", iface, This, debugstr_guid(riid), object);
463 *object = NULL;
465 if(IsEqualGUID(riid, &IID_IUnknown) ||
466 IsEqualGUID(riid, &IID_IDirect3DRMFrame) ||
467 IsEqualGUID(riid, &IID_IDirect3DRMFrame2))
469 *object = &This->IDirect3DRMFrame2_iface;
471 else if(IsEqualGUID(riid, &IID_IDirect3DRMFrame3))
473 *object = &This->IDirect3DRMFrame3_iface;
475 else
477 FIXME("interface %s not implemented\n", debugstr_guid(riid));
478 return E_NOINTERFACE;
481 IDirect3DRMFrame2_AddRef(iface);
482 return S_OK;
485 static ULONG WINAPI IDirect3DRMFrame2Impl_AddRef(IDirect3DRMFrame2* iface)
487 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
488 ULONG ref = InterlockedIncrement(&This->ref);
490 TRACE("(%p)->(): new ref = %d\n", This, ref);
492 return ref;
495 static ULONG WINAPI IDirect3DRMFrame2Impl_Release(IDirect3DRMFrame2* iface)
497 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
498 ULONG ref = InterlockedDecrement(&This->ref);
499 ULONG i;
501 TRACE("(%p)->(): new ref = %d\n", This, ref);
503 if (!ref)
505 for (i = 0; i < This->nb_children; i++)
506 IDirect3DRMFrame3_Release(This->children[i]);
507 HeapFree(GetProcessHeap(), 0, This->children);
508 for (i = 0; i < This->nb_visuals; i++)
509 IDirect3DRMVisual_Release(This->visuals[i]);
510 HeapFree(GetProcessHeap(), 0, This->visuals);
511 for (i = 0; i < This->nb_lights; i++)
512 IDirect3DRMLight_Release(This->lights[i]);
513 HeapFree(GetProcessHeap(), 0, This->lights);
514 HeapFree(GetProcessHeap(), 0, This);
517 return ref;
520 /*** IDirect3DRMObject methods ***/
521 static HRESULT WINAPI IDirect3DRMFrame2Impl_Clone(IDirect3DRMFrame2* iface,
522 LPUNKNOWN unkwn, REFIID riid,
523 LPVOID* object)
525 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
527 FIXME("(%p/%p)->(%p, %s, %p): stub\n", iface, This, unkwn, debugstr_guid(riid), object);
529 return E_NOTIMPL;
532 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddDestroyCallback(IDirect3DRMFrame2* iface,
533 D3DRMOBJECTCALLBACK cb,
534 LPVOID argument)
536 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
538 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
540 return E_NOTIMPL;
543 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteDestroyCallback(IDirect3DRMFrame2* iface,
544 D3DRMOBJECTCALLBACK cb,
545 LPVOID argument)
547 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
549 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
551 return E_NOTIMPL;
554 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetAppData(IDirect3DRMFrame2* iface,
555 DWORD data)
557 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
559 FIXME("(%p/%p)->(%u): stub\n", iface, This, data);
561 return E_NOTIMPL;
564 static DWORD WINAPI IDirect3DRMFrame2Impl_GetAppData(IDirect3DRMFrame2* iface)
566 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
568 FIXME("(%p/%p)->(): stub\n", iface, This);
570 return 0;
573 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetName(IDirect3DRMFrame2* iface, LPCSTR name)
575 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
577 FIXME("(%p/%p)->(%s): stub\n", iface, This, name);
579 return E_NOTIMPL;
582 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetName(IDirect3DRMFrame2* iface,
583 LPDWORD size, LPSTR name)
585 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
587 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, size, name);
589 return E_NOTIMPL;
592 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetClassName(IDirect3DRMFrame2* iface,
593 LPDWORD size, LPSTR name)
595 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
597 TRACE("(%p/%p)->(%p, %p)\n", iface, This, size, name);
599 return IDirect3DRMFrame3_GetClassName(&This->IDirect3DRMFrame3_iface, size, name);
602 /*** IDirect3DRMFrame methods ***/
603 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddChild(IDirect3DRMFrame2* iface,
604 LPDIRECT3DRMFRAME child)
606 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
607 IDirect3DRMFrame3 *frame;
608 HRESULT hr;
610 TRACE("(%p/%p)->(%p)\n", iface, This, child);
612 if (!child)
613 return D3DRMERR_BADOBJECT;
614 hr = IDirect3DRMFrame_QueryInterface(child, &IID_IDirect3DRMFrame3, (void**)&frame);
615 if (hr != S_OK)
616 return D3DRMERR_BADOBJECT;
617 IDirect3DRMFrame_Release(child);
619 return IDirect3DRMFrame3_AddChild(&This->IDirect3DRMFrame3_iface, frame);
622 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddLight(IDirect3DRMFrame2* iface,
623 LPDIRECT3DRMLIGHT light)
625 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
627 TRACE("(%p/%p)->(%p)\n", iface, This, light);
629 return IDirect3DRMFrame3_AddLight(&This->IDirect3DRMFrame3_iface, light);
632 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddMoveCallback(IDirect3DRMFrame2* iface,
633 D3DRMFRAMEMOVECALLBACK cb, VOID *arg)
635 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
637 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, cb, arg);
639 return E_NOTIMPL;
642 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddTransform(IDirect3DRMFrame2* iface,
643 D3DRMCOMBINETYPE type,
644 D3DRMMATRIX4D matrix)
646 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
648 TRACE("(%p/%p)->(%u,%p)\n", iface, This, type, matrix);
650 return IDirect3DRMFrame3_AddTransform(&This->IDirect3DRMFrame3_iface, type, matrix);
653 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddTranslation(IDirect3DRMFrame2* iface,
654 D3DRMCOMBINETYPE type,
655 D3DVALUE x, D3DVALUE y, D3DVALUE z)
657 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
659 FIXME("(%p/%p)->(%u,%f,%f,%f): stub\n", iface, This, type, x, y, z);
661 return E_NOTIMPL;
664 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddScale(IDirect3DRMFrame2* iface,
665 D3DRMCOMBINETYPE type,
666 D3DVALUE sx, D3DVALUE sy, D3DVALUE sz)
668 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
670 FIXME("(%p/%p)->(%u,%f,%f,%f): stub\n", iface, This, type, sx, sy, sz);
672 return E_NOTIMPL;
675 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddRotation(IDirect3DRMFrame2* iface,
676 D3DRMCOMBINETYPE type,
677 D3DVALUE x, D3DVALUE y, D3DVALUE z,
678 D3DVALUE theta)
680 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
682 FIXME("(%p/%p)->(%u,%f,%f,%f,%f): stub\n", iface, This, type, x, y, z, theta);
684 return E_NOTIMPL;
687 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddVisual(IDirect3DRMFrame2* iface,
688 LPDIRECT3DRMVISUAL vis)
690 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
692 TRACE("(%p/%p)->(%p)\n", iface, This, vis);
694 return IDirect3DRMFrame3_AddVisual(&This->IDirect3DRMFrame3_iface, (LPUNKNOWN)vis);
697 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetChildren(IDirect3DRMFrame2* iface,
698 LPDIRECT3DRMFRAMEARRAY *children)
700 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
702 TRACE("(%p/%p)->(%p)\n", iface, This, children);
704 return IDirect3DRMFrame3_GetChildren(&This->IDirect3DRMFrame3_iface, children);
707 static D3DCOLOR WINAPI IDirect3DRMFrame2Impl_GetColor(IDirect3DRMFrame2* iface)
709 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
711 FIXME("(%p/%p)->(): stub\n", iface, This);
713 return 0;
716 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetLights(IDirect3DRMFrame2* iface,
717 LPDIRECT3DRMLIGHTARRAY *lights)
719 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
721 TRACE("(%p/%p)->(%p)\n", iface, This, lights);
723 return IDirect3DRMFrame3_GetLights(&This->IDirect3DRMFrame3_iface, lights);
726 static D3DRMMATERIALMODE WINAPI IDirect3DRMFrame2Impl_GetMaterialMode(IDirect3DRMFrame2* iface)
728 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
730 FIXME("(%p/%p)->(): stub\n", iface, This);
732 return D3DRMMATERIAL_FROMPARENT;
735 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetParent(IDirect3DRMFrame2* iface,
736 LPDIRECT3DRMFRAME * frame)
738 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
740 TRACE("(%p/%p)->(%p)\n", iface, This, frame);
742 if (!frame)
743 return D3DRMERR_BADVALUE;
745 if (This->parent)
747 *frame = (LPDIRECT3DRMFRAME)&This->parent->IDirect3DRMFrame2_iface;
748 IDirect3DRMFrame_AddRef(*frame);
750 else
752 *frame = NULL;
755 return D3DRM_OK;
758 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetPosition(IDirect3DRMFrame2* iface,
759 LPDIRECT3DRMFRAME reference,
760 LPD3DVECTOR return_position)
762 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
764 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, reference, return_position);
766 return E_NOTIMPL;
769 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetRotation(IDirect3DRMFrame2* iface,
770 LPDIRECT3DRMFRAME reference,
771 LPD3DVECTOR axis, LPD3DVALUE return_theta)
773 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
775 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, reference, axis, return_theta);
777 return E_NOTIMPL;
780 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetScene(IDirect3DRMFrame2* iface,
781 LPDIRECT3DRMFRAME * frame)
783 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
785 FIXME("(%p/%p)->(%p): stub\n", iface, This, frame);
787 return E_NOTIMPL;
790 static D3DRMSORTMODE WINAPI IDirect3DRMFrame2Impl_GetSortMode(IDirect3DRMFrame2* iface)
792 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
794 FIXME("(%p/%p)->(): stub\n", iface, This);
796 return D3DRMSORT_FROMPARENT;
799 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetTexture(IDirect3DRMFrame2* iface,
800 LPDIRECT3DRMTEXTURE * tex)
802 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
804 FIXME("(%p/%p)->(%p): stub\n", iface, This, tex);
806 return E_NOTIMPL;
809 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetTransform(IDirect3DRMFrame2* iface,
810 D3DRMMATRIX4D return_matrix)
812 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
814 TRACE("(%p/%p)->(%p)\n", iface, This, return_matrix);
816 memcpy(&return_matrix[0][0], &This->transform[0][0], sizeof(D3DRMMATRIX4D));
818 return D3DRM_OK;
821 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetVelocity(IDirect3DRMFrame2* iface,
822 LPDIRECT3DRMFRAME reference,
823 LPD3DVECTOR return_velocity,
824 BOOL with_rotation)
826 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
828 FIXME("(%p/%p)->(%p,%p,%d): stub\n", iface, This, reference, return_velocity, with_rotation);
830 return E_NOTIMPL;
833 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetOrientation(IDirect3DRMFrame2* iface,
834 LPDIRECT3DRMFRAME reference,
835 LPD3DVECTOR dir, LPD3DVECTOR up)
837 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
839 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, reference, dir, up);
841 return E_NOTIMPL;
844 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetVisuals(IDirect3DRMFrame2* iface,
845 LPDIRECT3DRMVISUALARRAY *visuals)
847 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
848 IDirect3DRMVisualArrayImpl* obj;
849 HRESULT hr;
851 TRACE("(%p/%p)->(%p)\n", iface, This, visuals);
853 if (!visuals)
854 return D3DRMERR_BADVALUE;
856 hr = Direct3DRMVisualArray_create(visuals);
858 if (hr != D3DRM_OK)
859 return hr;
861 obj = (IDirect3DRMVisualArrayImpl*)*visuals;
863 obj->size = This->nb_visuals;
864 if (This->nb_visuals)
866 ULONG i;
867 obj->visuals = HeapAlloc(GetProcessHeap(), 0, This->nb_visuals * sizeof(LPDIRECT3DRMVISUAL));
868 if (!obj->visuals)
869 return E_OUTOFMEMORY;
870 for (i = 0; i < This->nb_visuals; i++)
872 obj->visuals[i] = This->visuals[i];
873 IDirect3DRMVisual_AddRef(This->visuals[i]);
877 return D3DRM_OK;
880 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetTextureTopology(IDirect3DRMFrame2* iface,
881 BOOL *wrap_u, BOOL *wrap_v)
883 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
885 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, wrap_u, wrap_v);
887 return E_NOTIMPL;
890 static HRESULT WINAPI IDirect3DRMFrame2Impl_InverseTransform(IDirect3DRMFrame2* iface,
891 D3DVECTOR *d, D3DVECTOR *s)
893 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
895 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, d, s);
897 return E_NOTIMPL;
900 static HRESULT WINAPI IDirect3DRMFrame2Impl_Load(IDirect3DRMFrame2* iface, LPVOID filename,
901 LPVOID name, D3DRMLOADOPTIONS loadflags,
902 D3DRMLOADTEXTURECALLBACK cb, LPVOID lpArg)
904 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
906 FIXME("(%p/%p)->(%p,%p,%u,%p,%p): stub\n", iface, This, filename, name, loadflags, cb, lpArg);
908 return E_NOTIMPL;
911 static HRESULT WINAPI IDirect3DRMFrame2Impl_LookAt(IDirect3DRMFrame2* iface,
912 LPDIRECT3DRMFRAME target,
913 LPDIRECT3DRMFRAME reference,
914 D3DRMFRAMECONSTRAINT constraint)
916 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
918 FIXME("(%p/%p)->(%p,%p,%u): stub\n", iface, This, target, reference, constraint);
920 return E_NOTIMPL;
923 static HRESULT WINAPI IDirect3DRMFrame2Impl_Move(IDirect3DRMFrame2* iface, D3DVALUE delta)
925 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
927 FIXME("(%p/%p)->(%f): stub\n", iface, This, delta);
929 return E_NOTIMPL;
932 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteChild(IDirect3DRMFrame2* iface,
933 LPDIRECT3DRMFRAME frame)
935 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
936 IDirect3DRMFrame3 *child;
937 HRESULT hr;
939 TRACE("(%p/%p)->(%p)\n", iface, This, frame);
941 if (!frame)
942 return D3DRMERR_BADOBJECT;
943 hr = IDirect3DRMFrame_QueryInterface(frame, &IID_IDirect3DRMFrame3, (void**)&child);
944 if (hr != S_OK)
945 return D3DRMERR_BADOBJECT;
946 IDirect3DRMFrame_Release(frame);
948 return IDirect3DRMFrame3_DeleteChild(&This->IDirect3DRMFrame3_iface, child);
951 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteLight(IDirect3DRMFrame2* iface,
952 LPDIRECT3DRMLIGHT light)
954 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
956 TRACE("(%p/%p)->(%p)\n", iface, This, light);
958 return IDirect3DRMFrame3_DeleteLight(&This->IDirect3DRMFrame3_iface, light);
961 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteMoveCallback(IDirect3DRMFrame2* iface,
962 D3DRMFRAMEMOVECALLBACK cb, VOID *arg)
964 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
966 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, cb, arg);
968 return E_NOTIMPL;
971 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteVisual(IDirect3DRMFrame2* iface,
972 LPDIRECT3DRMVISUAL vis)
974 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
976 TRACE("(%p/%p)->(%p)\n", iface, This, vis);
978 return IDirect3DRMFrame3_DeleteVisual(&This->IDirect3DRMFrame3_iface, (LPUNKNOWN)vis);
981 static D3DCOLOR WINAPI IDirect3DRMFrame2Impl_GetSceneBackground(IDirect3DRMFrame2* iface)
983 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
985 TRACE("(%p/%p)->()\n", iface, This);
987 return IDirect3DRMFrame3_GetSceneBackground(&This->IDirect3DRMFrame3_iface);
990 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetSceneBackgroundDepth(IDirect3DRMFrame2* iface,
991 LPDIRECTDRAWSURFACE * surface)
993 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
995 FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
997 return E_NOTIMPL;
1000 static D3DCOLOR WINAPI IDirect3DRMFrame2Impl_GetSceneFogColor(IDirect3DRMFrame2* iface)
1002 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1004 FIXME("(%p/%p)->(): stub\n", iface, This);
1006 return 0;
1009 static BOOL WINAPI IDirect3DRMFrame2Impl_GetSceneFogEnable(IDirect3DRMFrame2* iface)
1011 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1013 FIXME("(%p/%p)->(): stub\n", iface, This);
1015 return FALSE;
1018 static D3DRMFOGMODE WINAPI IDirect3DRMFrame2Impl_GetSceneFogMode(IDirect3DRMFrame2* iface)
1020 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1022 FIXME("(%p/%p)->(): stub\n", iface, This);
1024 return D3DRMFOG_LINEAR;
1027 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetSceneFogParams(IDirect3DRMFrame2* iface,
1028 D3DVALUE *return_start,
1029 D3DVALUE *return_end,
1030 D3DVALUE *return_density)
1032 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1034 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, return_start, return_end, return_density);
1036 return E_NOTIMPL;
1039 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackground(IDirect3DRMFrame2* iface,
1040 D3DCOLOR color)
1042 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1044 TRACE("(%p/%p)->(%u)\n", iface, This, color);
1046 return IDirect3DRMFrame3_SetSceneBackground(&This->IDirect3DRMFrame3_iface, color);
1049 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackgroundRGB(IDirect3DRMFrame2* iface,
1050 D3DVALUE red, D3DVALUE green,
1051 D3DVALUE blue)
1053 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1055 TRACE("(%p/%p)->(%f,%f,%f)\n", iface, This, red, green, blue);
1057 return IDirect3DRMFrame3_SetSceneBackgroundRGB(&This->IDirect3DRMFrame3_iface, red, green, blue);
1060 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackgroundDepth(IDirect3DRMFrame2* iface,
1061 LPDIRECTDRAWSURFACE surface)
1063 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1065 FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
1067 return E_NOTIMPL;
1070 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackgroundImage(IDirect3DRMFrame2* iface,
1071 LPDIRECT3DRMTEXTURE texture)
1073 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1075 FIXME("(%p/%p)->(%p): stub\n", iface, This, texture);
1077 return E_NOTIMPL;
1080 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneFogEnable(IDirect3DRMFrame2* iface, BOOL enable)
1082 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1084 FIXME("(%p/%p)->(%d): stub\n", iface, This, enable);
1086 return E_NOTIMPL;
1089 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneFogColor(IDirect3DRMFrame2* iface,
1090 D3DCOLOR color)
1092 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1094 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
1096 return E_NOTIMPL;
1099 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneFogMode(IDirect3DRMFrame2* iface,
1100 D3DRMFOGMODE mode)
1102 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1104 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
1106 return E_NOTIMPL;
1109 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneFogParams(IDirect3DRMFrame2* iface,
1110 D3DVALUE start, D3DVALUE end,
1111 D3DVALUE density)
1113 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1115 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, start, end, density);
1117 return E_NOTIMPL;
1120 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetColor(IDirect3DRMFrame2* iface, D3DCOLOR color)
1122 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1124 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
1126 return E_NOTIMPL;
1129 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetColorRGB(IDirect3DRMFrame2* iface, D3DVALUE red,
1130 D3DVALUE green, D3DVALUE blue)
1132 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1134 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, red, green, blue);
1136 return E_NOTIMPL;
1139 static D3DRMZBUFFERMODE WINAPI IDirect3DRMFrame2Impl_GetZbufferMode(IDirect3DRMFrame2* iface)
1141 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1143 FIXME("(%p/%p)->(): stub\n", iface, This);
1145 return D3DRMZBUFFER_FROMPARENT;
1148 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetMaterialMode(IDirect3DRMFrame2* iface,
1149 D3DRMMATERIALMODE mode)
1151 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1153 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
1155 return E_NOTIMPL;
1158 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetOrientation(IDirect3DRMFrame2* iface,
1159 LPDIRECT3DRMFRAME reference,
1160 D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
1161 D3DVALUE ux, D3DVALUE uy, D3DVALUE uz )
1163 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1165 FIXME("(%p/%p)->(%p,%f,%f,%f,%f,%f,%f): stub\n", iface, This, reference,
1166 dx, dy, dz, ux, uy, uz);
1168 return E_NOTIMPL;
1171 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetPosition(IDirect3DRMFrame2* iface,
1172 LPDIRECT3DRMFRAME reference,
1173 D3DVALUE x, D3DVALUE y, D3DVALUE z)
1175 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1177 FIXME("(%p/%p)->(%p,%f,%f,%f): stub\n", iface, This, reference, x, y, z);
1179 return E_NOTIMPL;
1182 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetRotation(IDirect3DRMFrame2* iface,
1183 LPDIRECT3DRMFRAME reference,
1184 D3DVALUE x, D3DVALUE y, D3DVALUE z,
1185 D3DVALUE theta)
1187 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1189 FIXME("(%p/%p)->(%p,%f,%f,%f,%f): stub\n", iface, This, reference, x, y, z, theta);
1191 return E_NOTIMPL;
1194 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSortMode(IDirect3DRMFrame2* iface,
1195 D3DRMSORTMODE mode)
1197 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1199 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
1201 return E_NOTIMPL;
1204 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetTexture(IDirect3DRMFrame2* iface,
1205 LPDIRECT3DRMTEXTURE texture)
1207 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1209 FIXME("(%p/%p)->(%p): stub\n", iface, This, texture);
1211 return E_NOTIMPL;
1214 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetTextureTopology(IDirect3DRMFrame2* iface,
1215 BOOL wrap_u, BOOL wrap_v)
1217 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1219 FIXME("(%p/%p)->(%d,%d): stub\n", iface, This, wrap_u, wrap_v);
1221 return E_NOTIMPL;
1224 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetVelocity(IDirect3DRMFrame2* iface,
1225 LPDIRECT3DRMFRAME reference,
1226 D3DVALUE x, D3DVALUE y, D3DVALUE z,
1227 BOOL with_rotation)
1229 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1231 FIXME("(%p/%p)->(%p,%f,%f,%f,%d): stub\n", iface, This, reference, x, y, z, with_rotation);
1233 return E_NOTIMPL;
1236 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetZbufferMode(IDirect3DRMFrame2* iface,
1237 D3DRMZBUFFERMODE mode)
1239 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1241 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
1243 return E_NOTIMPL;
1246 static HRESULT WINAPI IDirect3DRMFrame2Impl_Transform(IDirect3DRMFrame2* iface, D3DVECTOR *d,
1247 D3DVECTOR *s)
1249 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1251 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, d, s);
1253 return E_NOTIMPL;
1256 /*** IDirect3DRMFrame2 methods ***/
1257 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddMoveCallback2(IDirect3DRMFrame2* iface,
1258 D3DRMFRAMEMOVECALLBACK cb, VOID *arg,
1259 DWORD flags)
1261 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1263 FIXME("(%p/%p)->(%p,%p,%u): stub\n", iface, This, cb, arg, flags);
1265 return E_NOTIMPL;
1268 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetBox(IDirect3DRMFrame2* iface, LPD3DRMBOX box)
1270 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1272 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
1274 return E_NOTIMPL;
1277 static BOOL WINAPI IDirect3DRMFrame2Impl_GetBoxEnable(IDirect3DRMFrame2* iface)
1279 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1281 FIXME("(%p/%p)->(): stub\n", iface, This);
1283 return E_NOTIMPL;
1286 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetAxes(IDirect3DRMFrame2* iface,
1287 LPD3DVECTOR dir, LPD3DVECTOR up)
1289 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1291 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, dir, up);
1293 return E_NOTIMPL;
1296 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetMaterial(IDirect3DRMFrame2* iface,
1297 LPDIRECT3DRMMATERIAL *material)
1299 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1301 FIXME("(%p/%p)->(%p): stub\n", iface, This, material);
1303 return E_NOTIMPL;
1306 static BOOL WINAPI IDirect3DRMFrame2Impl_GetInheritAxes(IDirect3DRMFrame2* iface)
1308 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1310 FIXME("(%p/%p)->(): stub\n", iface, This);
1312 return E_NOTIMPL;
1315 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetHierarchyBox(IDirect3DRMFrame2* iface,
1316 LPD3DRMBOX box)
1318 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1320 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
1322 return E_NOTIMPL;
1325 static const struct IDirect3DRMFrame2Vtbl Direct3DRMFrame2_Vtbl =
1327 /*** IUnknown methods ***/
1328 IDirect3DRMFrame2Impl_QueryInterface,
1329 IDirect3DRMFrame2Impl_AddRef,
1330 IDirect3DRMFrame2Impl_Release,
1331 /*** IDirect3DRMObject methods ***/
1332 IDirect3DRMFrame2Impl_Clone,
1333 IDirect3DRMFrame2Impl_AddDestroyCallback,
1334 IDirect3DRMFrame2Impl_DeleteDestroyCallback,
1335 IDirect3DRMFrame2Impl_SetAppData,
1336 IDirect3DRMFrame2Impl_GetAppData,
1337 IDirect3DRMFrame2Impl_SetName,
1338 IDirect3DRMFrame2Impl_GetName,
1339 IDirect3DRMFrame2Impl_GetClassName,
1340 /*** IDirect3DRMFrame methods ***/
1341 IDirect3DRMFrame2Impl_AddChild,
1342 IDirect3DRMFrame2Impl_AddLight,
1343 IDirect3DRMFrame2Impl_AddMoveCallback,
1344 IDirect3DRMFrame2Impl_AddTransform,
1345 IDirect3DRMFrame2Impl_AddTranslation,
1346 IDirect3DRMFrame2Impl_AddScale,
1347 IDirect3DRMFrame2Impl_AddRotation,
1348 IDirect3DRMFrame2Impl_AddVisual,
1349 IDirect3DRMFrame2Impl_GetChildren,
1350 IDirect3DRMFrame2Impl_GetColor,
1351 IDirect3DRMFrame2Impl_GetLights,
1352 IDirect3DRMFrame2Impl_GetMaterialMode,
1353 IDirect3DRMFrame2Impl_GetParent,
1354 IDirect3DRMFrame2Impl_GetPosition,
1355 IDirect3DRMFrame2Impl_GetRotation,
1356 IDirect3DRMFrame2Impl_GetScene,
1357 IDirect3DRMFrame2Impl_GetSortMode,
1358 IDirect3DRMFrame2Impl_GetTexture,
1359 IDirect3DRMFrame2Impl_GetTransform,
1360 IDirect3DRMFrame2Impl_GetVelocity,
1361 IDirect3DRMFrame2Impl_GetOrientation,
1362 IDirect3DRMFrame2Impl_GetVisuals,
1363 IDirect3DRMFrame2Impl_GetTextureTopology,
1364 IDirect3DRMFrame2Impl_InverseTransform,
1365 IDirect3DRMFrame2Impl_Load,
1366 IDirect3DRMFrame2Impl_LookAt,
1367 IDirect3DRMFrame2Impl_Move,
1368 IDirect3DRMFrame2Impl_DeleteChild,
1369 IDirect3DRMFrame2Impl_DeleteLight,
1370 IDirect3DRMFrame2Impl_DeleteMoveCallback,
1371 IDirect3DRMFrame2Impl_DeleteVisual,
1372 IDirect3DRMFrame2Impl_GetSceneBackground,
1373 IDirect3DRMFrame2Impl_GetSceneBackgroundDepth,
1374 IDirect3DRMFrame2Impl_GetSceneFogColor,
1375 IDirect3DRMFrame2Impl_GetSceneFogEnable,
1376 IDirect3DRMFrame2Impl_GetSceneFogMode,
1377 IDirect3DRMFrame2Impl_GetSceneFogParams,
1378 IDirect3DRMFrame2Impl_SetSceneBackground,
1379 IDirect3DRMFrame2Impl_SetSceneBackgroundRGB,
1380 IDirect3DRMFrame2Impl_SetSceneBackgroundDepth,
1381 IDirect3DRMFrame2Impl_SetSceneBackgroundImage,
1382 IDirect3DRMFrame2Impl_SetSceneFogEnable,
1383 IDirect3DRMFrame2Impl_SetSceneFogColor,
1384 IDirect3DRMFrame2Impl_SetSceneFogMode,
1385 IDirect3DRMFrame2Impl_SetSceneFogParams,
1386 IDirect3DRMFrame2Impl_SetColor,
1387 IDirect3DRMFrame2Impl_SetColorRGB,
1388 IDirect3DRMFrame2Impl_GetZbufferMode,
1389 IDirect3DRMFrame2Impl_SetMaterialMode,
1390 IDirect3DRMFrame2Impl_SetOrientation,
1391 IDirect3DRMFrame2Impl_SetPosition,
1392 IDirect3DRMFrame2Impl_SetRotation,
1393 IDirect3DRMFrame2Impl_SetSortMode,
1394 IDirect3DRMFrame2Impl_SetTexture,
1395 IDirect3DRMFrame2Impl_SetTextureTopology,
1396 IDirect3DRMFrame2Impl_SetVelocity,
1397 IDirect3DRMFrame2Impl_SetZbufferMode,
1398 IDirect3DRMFrame2Impl_Transform,
1399 /*** IDirect3DRMFrame2 methods ***/
1400 IDirect3DRMFrame2Impl_AddMoveCallback2,
1401 IDirect3DRMFrame2Impl_GetBox,
1402 IDirect3DRMFrame2Impl_GetBoxEnable,
1403 IDirect3DRMFrame2Impl_GetAxes,
1404 IDirect3DRMFrame2Impl_GetMaterial,
1405 IDirect3DRMFrame2Impl_GetInheritAxes,
1406 IDirect3DRMFrame2Impl_GetHierarchyBox
1409 /*** IUnknown methods ***/
1410 static HRESULT WINAPI IDirect3DRMFrame3Impl_QueryInterface(IDirect3DRMFrame3* iface,
1411 REFIID riid, void** object)
1413 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1414 return IDirect3DRMFrame_QueryInterface(&This->IDirect3DRMFrame2_iface, riid, object);
1417 static ULONG WINAPI IDirect3DRMFrame3Impl_AddRef(IDirect3DRMFrame3* iface)
1419 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1420 return IDirect3DRMFrame2_AddRef(&This->IDirect3DRMFrame2_iface);
1423 static ULONG WINAPI IDirect3DRMFrame3Impl_Release(IDirect3DRMFrame3* iface)
1425 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1426 return IDirect3DRMFrame2_Release(&This->IDirect3DRMFrame2_iface);
1429 /*** IDirect3DRMObject methods ***/
1430 static HRESULT WINAPI IDirect3DRMFrame3Impl_Clone(IDirect3DRMFrame3* iface,
1431 LPUNKNOWN unkwn, REFIID riid,
1432 LPVOID* object)
1434 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1436 FIXME("(%p/%p)->(%p, %s, %p): stub\n", iface, This, unkwn, debugstr_guid(riid), object);
1438 return E_NOTIMPL;
1441 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddDestroyCallback(IDirect3DRMFrame3* iface,
1442 D3DRMOBJECTCALLBACK cb,
1443 LPVOID argument)
1445 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1447 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
1449 return E_NOTIMPL;
1452 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteDestroyCallback(IDirect3DRMFrame3* iface,
1453 D3DRMOBJECTCALLBACK cb,
1454 LPVOID argument)
1456 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1458 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
1460 return E_NOTIMPL;
1463 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetAppData(IDirect3DRMFrame3* iface,
1464 DWORD data)
1466 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1468 FIXME("(%p/%p)->(%u): stub\n", iface, This, data);
1470 return E_NOTIMPL;
1473 static DWORD WINAPI IDirect3DRMFrame3Impl_GetAppData(IDirect3DRMFrame3* iface)
1475 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1477 FIXME("(%p/%p)->(): stub\n", iface, This);
1479 return 0;
1482 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetName(IDirect3DRMFrame3* iface, LPCSTR name)
1484 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1486 FIXME("(%p/%p)->(%s): stub\n", iface, This, name);
1488 return E_NOTIMPL;
1491 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetName(IDirect3DRMFrame3* iface,
1492 LPDWORD size, LPSTR name)
1494 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1496 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, size, name);
1498 return E_NOTIMPL;
1501 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetClassName(IDirect3DRMFrame3* iface,
1502 LPDWORD size, LPSTR name)
1504 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1506 TRACE("(%p/%p)->(%p, %p)\n", iface, This, size, name);
1508 if (!size || *size < strlen("Frame") || !name)
1509 return E_INVALIDARG;
1511 strcpy(name, "Frame");
1512 *size = sizeof("Frame");
1514 return D3DRM_OK;
1517 /*** IDirect3DRMFrame methods ***/
1518 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddChild(IDirect3DRMFrame3* iface,
1519 LPDIRECT3DRMFRAME3 child)
1521 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1522 IDirect3DRMFrameImpl *child_obj = unsafe_impl_from_IDirect3DRMFrame3(child);
1524 TRACE("(%p/%p)->(%p)\n", iface, This, child);
1526 if (!child_obj)
1527 return D3DRMERR_BADOBJECT;
1529 if (child_obj->parent)
1531 IDirect3DRMFrame3* parent = &child_obj->parent->IDirect3DRMFrame3_iface;
1533 if (parent == iface)
1535 /* Passed frame is already a child so return success */
1536 return D3DRM_OK;
1538 else
1540 /* Remove parent and continue */
1541 IDirect3DRMFrame3_DeleteChild(parent, child);
1545 if ((This->nb_children + 1) > This->children_capacity)
1547 ULONG new_capacity;
1548 IDirect3DRMFrame3** children;
1550 if (!This->children_capacity)
1552 new_capacity = 16;
1553 children = HeapAlloc(GetProcessHeap(), 0, new_capacity * sizeof(IDirect3DRMFrame3*));
1555 else
1557 new_capacity = This->children_capacity * 2;
1558 children = HeapReAlloc(GetProcessHeap(), 0, This->children, new_capacity * sizeof(IDirect3DRMFrame3*));
1561 if (!children)
1562 return E_OUTOFMEMORY;
1564 This->children_capacity = new_capacity;
1565 This->children = children;
1568 This->children[This->nb_children++] = child;
1569 IDirect3DRMFrame3_AddRef(child);
1570 child_obj->parent = This;
1572 return D3DRM_OK;
1575 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddLight(IDirect3DRMFrame3* iface,
1576 LPDIRECT3DRMLIGHT light)
1578 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1579 ULONG i;
1580 IDirect3DRMLight** lights;
1582 TRACE("(%p/%p)->(%p)\n", iface, This, light);
1584 if (!light)
1585 return D3DRMERR_BADOBJECT;
1587 /* Check if already existing and return gracefully without increasing ref count */
1588 for (i = 0; i < This->nb_lights; i++)
1589 if (This->lights[i] == light)
1590 return D3DRM_OK;
1592 if ((This->nb_lights + 1) > This->lights_capacity)
1594 ULONG new_capacity;
1596 if (!This->lights_capacity)
1598 new_capacity = 16;
1599 lights = HeapAlloc(GetProcessHeap(), 0, new_capacity * sizeof(IDirect3DRMLight*));
1601 else
1603 new_capacity = This->lights_capacity * 2;
1604 lights = HeapReAlloc(GetProcessHeap(), 0, This->lights, new_capacity * sizeof(IDirect3DRMLight*));
1607 if (!lights)
1608 return E_OUTOFMEMORY;
1610 This->lights_capacity = new_capacity;
1611 This->lights = lights;
1614 This->lights[This->nb_lights++] = light;
1615 IDirect3DRMLight_AddRef(light);
1617 return D3DRM_OK;
1620 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddMoveCallback(IDirect3DRMFrame3* iface,
1621 D3DRMFRAME3MOVECALLBACK cb, VOID *arg,
1622 DWORD flags)
1624 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1626 FIXME("(%p/%p)->(%p,%p,%u): stub\n", iface, This, cb, arg, flags);
1628 return E_NOTIMPL;
1631 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddTransform(IDirect3DRMFrame3* iface,
1632 D3DRMCOMBINETYPE type,
1633 D3DRMMATRIX4D matrix)
1635 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1637 TRACE("(%p/%p)->(%u,%p)\n", iface, This, type, matrix);
1639 switch (type)
1641 case D3DRMCOMBINE_REPLACE:
1642 memcpy(&This->transform[0][0], &matrix[0][0], sizeof(D3DRMMATRIX4D));
1643 break;
1645 case D3DRMCOMBINE_BEFORE:
1646 FIXME("D3DRMCOMBINE_BEFORE not supported yed\n");
1647 break;
1649 case D3DRMCOMBINE_AFTER:
1650 FIXME("D3DRMCOMBINE_AFTER not supported yed\n");
1651 break;
1653 default:
1654 WARN("Unknown Combine Type %u\n", type);
1655 return D3DRMERR_BADVALUE;
1658 return S_OK;
1661 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddTranslation(IDirect3DRMFrame3* iface,
1662 D3DRMCOMBINETYPE type,
1663 D3DVALUE x, D3DVALUE y, D3DVALUE z)
1665 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1667 FIXME("(%p/%p)->(%u,%f,%f,%f): stub\n", iface, This, type, x, y, z);
1669 return E_NOTIMPL;
1672 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddScale(IDirect3DRMFrame3* iface,
1673 D3DRMCOMBINETYPE type,
1674 D3DVALUE sx, D3DVALUE sy, D3DVALUE sz)
1676 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1678 FIXME("(%p/%p)->(%u,%f,%f,%f): stub\n", iface, This, type, sx, sy, sz);
1680 return E_NOTIMPL;
1683 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddRotation(IDirect3DRMFrame3* iface,
1684 D3DRMCOMBINETYPE type,
1685 D3DVALUE x, D3DVALUE y, D3DVALUE z,
1686 D3DVALUE theta)
1688 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1690 FIXME("(%p/%p)->(%u,%f,%f,%f,%f): stub\n", iface, This, type, x, y, z, theta);
1692 return E_NOTIMPL;
1695 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddVisual(IDirect3DRMFrame3* iface, LPUNKNOWN vis)
1697 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1698 ULONG i;
1699 IDirect3DRMVisual** visuals;
1701 TRACE("(%p/%p)->(%p)\n", iface, This, vis);
1703 if (!vis)
1704 return D3DRMERR_BADOBJECT;
1706 /* Check if already existing and return gracefully without increasing ref count */
1707 for (i = 0; i < This->nb_visuals; i++)
1708 if (This->visuals[i] == (IDirect3DRMVisual*)vis)
1709 return D3DRM_OK;
1711 if ((This->nb_visuals + 1) > This->visuals_capacity)
1713 ULONG new_capacity;
1715 if (!This->visuals_capacity)
1717 new_capacity = 16;
1718 visuals = HeapAlloc(GetProcessHeap(), 0, new_capacity * sizeof(IDirect3DRMVisual*));
1720 else
1722 new_capacity = This->visuals_capacity * 2;
1723 visuals = HeapReAlloc(GetProcessHeap(), 0, This->visuals, new_capacity * sizeof(IDirect3DRMVisual*));
1726 if (!visuals)
1727 return E_OUTOFMEMORY;
1729 This->visuals_capacity = new_capacity;
1730 This->visuals = visuals;
1733 This->visuals[This->nb_visuals++] = (IDirect3DRMVisual*)vis;
1734 IDirect3DRMVisual_AddRef(vis);
1736 return D3DRM_OK;
1739 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetChildren(IDirect3DRMFrame3* iface,
1740 LPDIRECT3DRMFRAMEARRAY *children)
1742 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1743 IDirect3DRMFrameArrayImpl* obj;
1744 HRESULT hr;
1746 TRACE("(%p/%p)->(%p)\n", iface, This, children);
1748 if (!children)
1749 return D3DRMERR_BADVALUE;
1751 hr = Direct3DRMFrameArray_create(children);
1753 if (hr != D3DRM_OK)
1754 return hr;
1756 obj = (IDirect3DRMFrameArrayImpl*)*children;
1758 obj->size = This->nb_children;
1759 if (This->nb_children)
1761 ULONG i;
1762 obj->frames = HeapAlloc(GetProcessHeap(), 0, This->nb_children * sizeof(LPDIRECT3DRMFRAME));
1763 if (!obj->frames)
1764 return E_OUTOFMEMORY;
1765 for (i = 0; i < This->nb_children; i++)
1766 IDirect3DRMFrame3_QueryInterface(This->children[i], &IID_IDirect3DRMFrame, (void**)&obj->frames[i]);
1769 return D3DRM_OK;
1772 static D3DCOLOR WINAPI IDirect3DRMFrame3Impl_GetColor(IDirect3DRMFrame3* iface)
1774 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1776 FIXME("(%p/%p)->(): stub\n", iface, This);
1778 return 0;
1781 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetLights(IDirect3DRMFrame3* iface,
1782 LPDIRECT3DRMLIGHTARRAY *lights)
1784 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1785 IDirect3DRMLightArrayImpl* obj;
1786 HRESULT hr;
1788 TRACE("(%p/%p)->(%p)\n", iface, This, lights);
1790 if (!lights)
1791 return D3DRMERR_BADVALUE;
1793 hr = Direct3DRMLightArray_create(lights);
1795 if (hr != D3DRM_OK)
1796 return hr;
1798 obj = (IDirect3DRMLightArrayImpl*)*lights;
1800 obj->size = This->nb_lights;
1801 if (This->nb_lights)
1803 ULONG i;
1804 obj->lights = HeapAlloc(GetProcessHeap(), 0, This->nb_lights * sizeof(LPDIRECT3DRMLIGHT));
1805 if (!obj->lights)
1806 return E_OUTOFMEMORY;
1807 for (i = 0; i < This->nb_lights; i++)
1808 IDirect3DRMLight_QueryInterface(This->lights[i], &IID_IDirect3DRMLight, (void**)&obj->lights[i]);
1811 return D3DRM_OK;
1814 static D3DRMMATERIALMODE WINAPI IDirect3DRMFrame3Impl_GetMaterialMode(IDirect3DRMFrame3* iface)
1816 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1818 FIXME("(%p/%p)->(): stub\n", iface, This);
1820 return D3DRMMATERIAL_FROMPARENT;
1823 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetParent(IDirect3DRMFrame3* iface,
1824 LPDIRECT3DRMFRAME3 * frame)
1826 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1828 TRACE("(%p/%p)->(%p)\n", iface, This, frame);
1830 if (!frame)
1831 return D3DRMERR_BADVALUE;
1833 if (This->parent)
1835 *frame = &This->parent->IDirect3DRMFrame3_iface;
1836 IDirect3DRMFrame_AddRef(*frame);
1838 else
1840 *frame = NULL;
1843 return D3DRM_OK;
1846 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetPosition(IDirect3DRMFrame3* iface,
1847 LPDIRECT3DRMFRAME3 reference,
1848 LPD3DVECTOR return_position)
1850 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1852 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, reference, return_position);
1854 return E_NOTIMPL;
1857 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetRotation(IDirect3DRMFrame3* iface,
1858 LPDIRECT3DRMFRAME3 reference,
1859 LPD3DVECTOR axis, LPD3DVALUE return_theta)
1861 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1863 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, reference, axis, return_theta);
1865 return E_NOTIMPL;
1868 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetScene(IDirect3DRMFrame3* iface,
1869 LPDIRECT3DRMFRAME3 * frame)
1871 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1873 FIXME("(%p/%p)->(%p): stub\n", iface, This, frame);
1875 return E_NOTIMPL;
1878 static D3DRMSORTMODE WINAPI IDirect3DRMFrame3Impl_GetSortMode(IDirect3DRMFrame3* iface)
1880 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1882 FIXME("(%p/%p)->(): stub\n", iface, This);
1884 return D3DRMSORT_FROMPARENT;
1887 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetTexture(IDirect3DRMFrame3* iface,
1888 LPDIRECT3DRMTEXTURE3 * tex)
1890 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1892 FIXME("(%p/%p)->(%p): stub\n", iface, This, tex);
1894 return E_NOTIMPL;
1897 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetTransform(IDirect3DRMFrame3* iface,
1898 LPDIRECT3DRMFRAME3 reference,
1899 D3DRMMATRIX4D return_matrix)
1901 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1903 TRACE("(%p/%p)->(%p,%p)\n", iface, This, reference, return_matrix);
1905 if (reference)
1906 FIXME("Specifying a frame as the root of the scene different from the current root frame is not supported yet\n");
1908 memcpy(&return_matrix[0][0], &This->transform[0][0], sizeof(D3DRMMATRIX4D));
1910 return D3DRM_OK;
1913 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetVelocity(IDirect3DRMFrame3* iface,
1914 LPDIRECT3DRMFRAME3 reference,
1915 LPD3DVECTOR return_velocity,
1916 BOOL with_rotation)
1918 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1920 FIXME("(%p/%p)->(%p,%p,%d): stub\n", iface, This, reference, return_velocity, with_rotation);
1922 return E_NOTIMPL;
1925 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetOrientation(IDirect3DRMFrame3* iface,
1926 LPDIRECT3DRMFRAME3 reference,
1927 LPD3DVECTOR dir, LPD3DVECTOR up)
1929 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1931 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, reference, dir, up);
1933 return E_NOTIMPL;
1936 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetVisuals(IDirect3DRMFrame3* iface, LPDWORD num,
1937 LPUNKNOWN *visuals)
1939 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1941 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, num, visuals);
1943 return E_NOTIMPL;
1946 static HRESULT WINAPI IDirect3DRMFrame3Impl_InverseTransform(IDirect3DRMFrame3* iface,
1947 D3DVECTOR *d, D3DVECTOR *s)
1949 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1951 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, d, s);
1953 return E_NOTIMPL;
1956 static HRESULT WINAPI IDirect3DRMFrame3Impl_Load(IDirect3DRMFrame3* iface, LPVOID filename,
1957 LPVOID name, D3DRMLOADOPTIONS loadflags,
1958 D3DRMLOADTEXTURE3CALLBACK cb, LPVOID lpArg)
1960 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1962 FIXME("(%p/%p)->(%p,%p,%u,%p,%p): stub\n", iface, This, filename, name, loadflags, cb, lpArg);
1964 return E_NOTIMPL;
1967 static HRESULT WINAPI IDirect3DRMFrame3Impl_LookAt(IDirect3DRMFrame3* iface,
1968 LPDIRECT3DRMFRAME3 target,
1969 LPDIRECT3DRMFRAME3 reference,
1970 D3DRMFRAMECONSTRAINT constraint)
1972 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1974 FIXME("(%p/%p)->(%p,%p,%u): stub\n", iface, This, target, reference, constraint);
1976 return E_NOTIMPL;
1979 static HRESULT WINAPI IDirect3DRMFrame3Impl_Move(IDirect3DRMFrame3* iface, D3DVALUE delta)
1981 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1983 FIXME("(%p/%p)->(%f): stub\n", iface, This, delta);
1985 return E_NOTIMPL;
1988 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteChild(IDirect3DRMFrame3* iface,
1989 LPDIRECT3DRMFRAME3 frame)
1991 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1992 IDirect3DRMFrameImpl *frame_obj = unsafe_impl_from_IDirect3DRMFrame3(frame);
1993 ULONG i;
1995 TRACE("(%p/%p)->(%p)\n", iface, This, frame);
1997 if (!frame_obj)
1998 return D3DRMERR_BADOBJECT;
2000 /* Check if child exists */
2001 for (i = 0; i < This->nb_children; i++)
2002 if (This->children[i] == frame)
2003 break;
2005 if (i == This->nb_children)
2006 return D3DRMERR_BADVALUE;
2008 memmove(This->children + i, This->children + i + 1, sizeof(IDirect3DRMFrame3*) * (This->nb_children - 1 - i));
2009 IDirect3DRMFrame3_Release(frame);
2010 frame_obj->parent = NULL;
2011 This->nb_children--;
2013 return D3DRM_OK;
2016 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteLight(IDirect3DRMFrame3* iface,
2017 LPDIRECT3DRMLIGHT light)
2019 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2020 ULONG i;
2022 TRACE("(%p/%p)->(%p)\n", iface, This, light);
2024 if (!light)
2025 return D3DRMERR_BADOBJECT;
2027 /* Check if visual exists */
2028 for (i = 0; i < This->nb_lights; i++)
2029 if (This->lights[i] == light)
2030 break;
2032 if (i == This->nb_lights)
2033 return D3DRMERR_BADVALUE;
2035 memmove(This->lights + i, This->lights + i + 1, sizeof(IDirect3DRMLight*) * (This->nb_lights - 1 - i));
2036 IDirect3DRMLight_Release(light);
2037 This->nb_lights--;
2039 return D3DRM_OK;
2042 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteMoveCallback(IDirect3DRMFrame3* iface,
2043 D3DRMFRAME3MOVECALLBACK cb,
2044 VOID *arg)
2046 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2048 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, cb, arg);
2050 return E_NOTIMPL;
2053 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteVisual(IDirect3DRMFrame3* iface, LPUNKNOWN vis)
2055 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2056 ULONG i;
2058 TRACE("(%p/%p)->(%p)\n", iface, This, vis);
2060 if (!vis)
2061 return D3DRMERR_BADOBJECT;
2063 /* Check if visual exists */
2064 for (i = 0; i < This->nb_visuals; i++)
2065 if (This->visuals[i] == (IDirect3DRMVisual*)vis)
2066 break;
2068 if (i == This->nb_visuals)
2069 return D3DRMERR_BADVALUE;
2071 memmove(This->visuals + i, This->visuals + i + 1, sizeof(IDirect3DRMVisual*) * (This->nb_visuals - 1 - i));
2072 IDirect3DRMVisual_Release(vis);
2073 This->nb_visuals--;
2075 return D3DRM_OK;
2078 static D3DCOLOR WINAPI IDirect3DRMFrame3Impl_GetSceneBackground(IDirect3DRMFrame3* iface)
2080 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2082 TRACE("(%p/%p)->()\n", iface, This);
2084 return This->scenebackground;
2087 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetSceneBackgroundDepth(IDirect3DRMFrame3* iface,
2088 LPDIRECTDRAWSURFACE * surface)
2090 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2092 FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
2094 return E_NOTIMPL;
2097 static D3DCOLOR WINAPI IDirect3DRMFrame3Impl_GetSceneFogColor(IDirect3DRMFrame3* iface)
2099 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2101 FIXME("(%p/%p)->(): stub\n", iface, This);
2103 return 0;
2106 static BOOL WINAPI IDirect3DRMFrame3Impl_GetSceneFogEnable(IDirect3DRMFrame3* iface)
2108 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2110 FIXME("(%p/%p)->(): stub\n", iface, This);
2112 return FALSE;
2115 static D3DRMFOGMODE WINAPI IDirect3DRMFrame3Impl_GetSceneFogMode(IDirect3DRMFrame3* iface)
2117 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2119 FIXME("(%p/%p)->(): stub\n", iface, This);
2121 return D3DRMFOG_LINEAR;
2124 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetSceneFogParams(IDirect3DRMFrame3* iface,
2125 D3DVALUE *return_start,
2126 D3DVALUE *return_end,
2127 D3DVALUE *return_density)
2129 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2131 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, return_start, return_end, return_density);
2133 return E_NOTIMPL;
2136 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackground(IDirect3DRMFrame3* iface,
2137 D3DCOLOR color)
2139 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2141 TRACE("(%p/%p)->(%u)\n", iface, This, color);
2143 This->scenebackground = color;
2145 return D3DRM_OK;
2148 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackgroundRGB(IDirect3DRMFrame3* iface,
2149 D3DVALUE red, D3DVALUE green,
2150 D3DVALUE blue)
2152 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2154 TRACE("(%p/%p)->(%f,%f,%f)\n", iface, This, red, green, blue);
2156 This->scenebackground = D3DCOLOR_ARGB(0xff, (BYTE)(red * 255.0f),
2157 (BYTE)(green * 255.0f),
2158 (BYTE)(blue * 255.0f));
2160 return D3DRM_OK;
2163 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackgroundDepth(IDirect3DRMFrame3* iface,
2164 LPDIRECTDRAWSURFACE surface)
2166 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2168 FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
2170 return E_NOTIMPL;
2173 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackgroundImage(IDirect3DRMFrame3* iface,
2174 LPDIRECT3DRMTEXTURE3 texture)
2176 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2178 FIXME("(%p/%p)->(%p): stub\n", iface, This, texture);
2180 return E_NOTIMPL;
2183 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogEnable(IDirect3DRMFrame3* iface, BOOL enable)
2185 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2187 FIXME("(%p/%p)->(%d): stub\n", iface, This, enable);
2189 return E_NOTIMPL;
2192 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogColor(IDirect3DRMFrame3* iface,
2193 D3DCOLOR color)
2195 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2197 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
2199 return E_NOTIMPL;
2202 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogMode(IDirect3DRMFrame3* iface,
2203 D3DRMFOGMODE mode)
2205 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2207 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
2209 return E_NOTIMPL;
2212 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogParams(IDirect3DRMFrame3* iface,
2213 D3DVALUE start, D3DVALUE end,
2214 D3DVALUE density)
2216 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2218 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, start, end, density);
2220 return E_NOTIMPL;
2223 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetColor(IDirect3DRMFrame3* iface, D3DCOLOR color)
2225 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2227 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
2229 return E_NOTIMPL;
2232 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetColorRGB(IDirect3DRMFrame3* iface, D3DVALUE red,
2233 D3DVALUE green, D3DVALUE blue)
2235 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2237 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, red, green, blue);
2239 return E_NOTIMPL;
2242 static D3DRMZBUFFERMODE WINAPI IDirect3DRMFrame3Impl_GetZbufferMode(IDirect3DRMFrame3* iface)
2244 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2246 FIXME("(%p/%p)->(): stub\n", iface, This);
2248 return D3DRMZBUFFER_FROMPARENT;
2251 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetMaterialMode(IDirect3DRMFrame3* iface,
2252 D3DRMMATERIALMODE mode)
2254 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2256 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
2258 return E_NOTIMPL;
2261 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetOrientation(IDirect3DRMFrame3* iface,
2262 LPDIRECT3DRMFRAME3 reference,
2263 D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
2264 D3DVALUE ux, D3DVALUE uy, D3DVALUE uz )
2266 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2268 FIXME("(%p/%p)->(%p,%f,%f,%f,%f,%f,%f): stub\n", iface, This, reference,
2269 dx, dy, dz, ux, uy, uz);
2271 return E_NOTIMPL;
2274 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetPosition(IDirect3DRMFrame3* iface,
2275 LPDIRECT3DRMFRAME3 reference,
2276 D3DVALUE x, D3DVALUE y, D3DVALUE z)
2278 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2280 FIXME("(%p/%p)->(%p,%f,%f,%f): stub\n", iface, This, reference, x, y, z);
2282 return E_NOTIMPL;
2285 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetRotation(IDirect3DRMFrame3* iface,
2286 LPDIRECT3DRMFRAME3 reference,
2287 D3DVALUE x, D3DVALUE y, D3DVALUE z,
2288 D3DVALUE theta)
2290 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2292 FIXME("(%p/%p)->(%p,%f,%f,%f,%f): stub\n", iface, This, reference, x, y, z, theta);
2294 return E_NOTIMPL;
2297 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSortMode(IDirect3DRMFrame3* iface,
2298 D3DRMSORTMODE mode)
2300 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2302 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
2304 return E_NOTIMPL;
2307 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetTexture(IDirect3DRMFrame3* iface,
2308 LPDIRECT3DRMTEXTURE3 texture)
2310 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2312 FIXME("(%p/%p)->(%p): stub\n", iface, This, texture);
2314 return E_NOTIMPL;
2317 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetVelocity(IDirect3DRMFrame3* iface,
2318 LPDIRECT3DRMFRAME3 reference,
2319 D3DVALUE x, D3DVALUE y, D3DVALUE z,
2320 BOOL with_rotation)
2322 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2324 FIXME("(%p/%p)->(%p,%f,%f,%f,%d): stub\n", iface, This, reference, x, y, z, with_rotation);
2326 return E_NOTIMPL;
2329 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetZbufferMode(IDirect3DRMFrame3* iface,
2330 D3DRMZBUFFERMODE mode)
2332 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2334 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
2336 return E_NOTIMPL;
2339 static HRESULT WINAPI IDirect3DRMFrame3Impl_Transform(IDirect3DRMFrame3* iface, D3DVECTOR *d,
2340 D3DVECTOR *s)
2342 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2344 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, d, s);
2346 return E_NOTIMPL;
2349 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetBox(IDirect3DRMFrame3* iface, LPD3DRMBOX box)
2351 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2353 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
2355 return E_NOTIMPL;
2358 static BOOL WINAPI IDirect3DRMFrame3Impl_GetBoxEnable(IDirect3DRMFrame3* iface)
2360 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2362 FIXME("(%p/%p)->(): stub\n", iface, This);
2364 return E_NOTIMPL;
2367 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetAxes(IDirect3DRMFrame3* iface,
2368 LPD3DVECTOR dir, LPD3DVECTOR up)
2370 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2372 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, dir, up);
2374 return E_NOTIMPL;
2377 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetMaterial(IDirect3DRMFrame3* iface,
2378 LPDIRECT3DRMMATERIAL2 *material)
2380 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2382 FIXME("(%p/%p)->(%p): stub\n", iface, This, material);
2384 return E_NOTIMPL;
2387 static BOOL WINAPI IDirect3DRMFrame3Impl_GetInheritAxes(IDirect3DRMFrame3* iface)
2389 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2391 FIXME("(%p/%p)->(): stub\n", iface, This);
2393 return E_NOTIMPL;
2396 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetHierarchyBox(IDirect3DRMFrame3* iface,
2397 LPD3DRMBOX box)
2399 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2401 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
2403 return E_NOTIMPL;
2406 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetBox(IDirect3DRMFrame3* iface, LPD3DRMBOX box)
2408 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2410 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
2412 return E_NOTIMPL;
2415 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetBoxEnable(IDirect3DRMFrame3* iface, BOOL enable)
2417 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2419 FIXME("(%p/%p)->(%u): stub\n", iface, This, enable);
2421 return E_NOTIMPL;
2424 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetAxes(IDirect3DRMFrame3* iface,
2425 D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
2426 D3DVALUE ux, D3DVALUE uy, D3DVALUE uz)
2428 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2430 FIXME("(%p/%p)->(%f,%f,%f,%f,%f,%f): stub\n", iface, This, dx, dy, dz, ux, uy, uz);
2432 return E_NOTIMPL;
2435 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetInheritAxes(IDirect3DRMFrame3* iface,
2436 BOOL inherit_from_parent)
2438 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2440 FIXME("(%p/%p)->(%u): stub\n", iface, This, inherit_from_parent);
2442 return E_NOTIMPL;
2445 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetMaterial(IDirect3DRMFrame3* iface,
2446 LPDIRECT3DRMMATERIAL2 material)
2448 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2450 FIXME("(%p/%p)->(%p): stub\n", iface, This, material);
2452 return E_NOTIMPL;
2455 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetQuaternion(IDirect3DRMFrame3* iface,
2456 LPDIRECT3DRMFRAME3 reference,
2457 D3DRMQUATERNION *q)
2459 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2461 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, reference, q);
2463 return E_NOTIMPL;
2466 static HRESULT WINAPI IDirect3DRMFrame3Impl_RayPick(IDirect3DRMFrame3* iface,
2467 LPDIRECT3DRMFRAME3 reference, LPD3DRMRAY ray,
2468 DWORD flags,
2469 LPDIRECT3DRMPICKED2ARRAY *return_visuals)
2471 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2473 FIXME("(%p/%p)->(%p,%p,%u,%p): stub\n", iface, This, reference, ray, flags, return_visuals);
2475 return E_NOTIMPL;
2478 static HRESULT WINAPI IDirect3DRMFrame3Impl_Save(IDirect3DRMFrame3* iface, LPCSTR filename,
2479 D3DRMXOFFORMAT d3dFormat,
2480 D3DRMSAVEOPTIONS d3dSaveFlags)
2482 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2484 FIXME("(%p/%p)->(%p,%u,%u): stub\n", iface, This, filename, d3dFormat, d3dSaveFlags);
2486 return E_NOTIMPL;
2489 static HRESULT WINAPI IDirect3DRMFrame3Impl_TransformVectors(IDirect3DRMFrame3* iface,
2490 LPDIRECT3DRMFRAME3 reference,
2491 DWORD num, LPD3DVECTOR dst,
2492 LPD3DVECTOR src)
2494 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2496 FIXME("(%p/%p)->(%p,%u,%p,%p): stub\n", iface, This, reference, num, dst, src);
2498 return E_NOTIMPL;
2501 static HRESULT WINAPI IDirect3DRMFrame3Impl_InverseTransformVectors(IDirect3DRMFrame3* iface,
2502 LPDIRECT3DRMFRAME3 reference,
2503 DWORD num, LPD3DVECTOR dst,
2504 LPD3DVECTOR src)
2506 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2508 FIXME("(%p/%p)->(%p,%u,%p,%p): stub\n", iface, This, reference, num, dst, src);
2510 return E_NOTIMPL;
2513 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetTraversalOptions(IDirect3DRMFrame3* iface,
2514 DWORD flags)
2516 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2518 FIXME("(%p/%p)->(%u): stub\n", iface, This, flags);
2520 return E_NOTIMPL;
2523 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetTraversalOptions(IDirect3DRMFrame3* iface,
2524 LPDWORD flags)
2526 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2528 FIXME("(%p/%p)->(%p): stub\n", iface, This, flags);
2530 return E_NOTIMPL;
2533 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogMethod(IDirect3DRMFrame3* iface,
2534 DWORD flags)
2536 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2538 FIXME("(%p/%p)->(%u): stub\n", iface, This, flags);
2540 return E_NOTIMPL;
2543 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetSceneFogMethod(IDirect3DRMFrame3* iface,
2544 LPDWORD flags)
2546 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2548 FIXME("(%p/%p)->(%p): stub\n", iface, This, flags);
2550 return E_NOTIMPL;
2553 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetMaterialOverride(IDirect3DRMFrame3* iface,
2554 LPD3DRMMATERIALOVERRIDE override)
2556 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2558 FIXME("(%p/%p)->(%p): stub\n", iface, This, override);
2560 return E_NOTIMPL;
2563 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetMaterialOverride(IDirect3DRMFrame3* iface,
2564 LPD3DRMMATERIALOVERRIDE override)
2566 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2568 FIXME("(%p/%p)->(%p): stub\n", iface, This, override);
2570 return E_NOTIMPL;
2573 static const struct IDirect3DRMFrame3Vtbl Direct3DRMFrame3_Vtbl =
2575 /*** IUnknown methods ***/
2576 IDirect3DRMFrame3Impl_QueryInterface,
2577 IDirect3DRMFrame3Impl_AddRef,
2578 IDirect3DRMFrame3Impl_Release,
2579 /*** IDirect3DRMObject methods ***/
2580 IDirect3DRMFrame3Impl_Clone,
2581 IDirect3DRMFrame3Impl_AddDestroyCallback,
2582 IDirect3DRMFrame3Impl_DeleteDestroyCallback,
2583 IDirect3DRMFrame3Impl_SetAppData,
2584 IDirect3DRMFrame3Impl_GetAppData,
2585 IDirect3DRMFrame3Impl_SetName,
2586 IDirect3DRMFrame3Impl_GetName,
2587 IDirect3DRMFrame3Impl_GetClassName,
2588 /*** IDirect3DRMFrame3 methods ***/
2589 IDirect3DRMFrame3Impl_AddChild,
2590 IDirect3DRMFrame3Impl_AddLight,
2591 IDirect3DRMFrame3Impl_AddMoveCallback,
2592 IDirect3DRMFrame3Impl_AddTransform,
2593 IDirect3DRMFrame3Impl_AddTranslation,
2594 IDirect3DRMFrame3Impl_AddScale,
2595 IDirect3DRMFrame3Impl_AddRotation,
2596 IDirect3DRMFrame3Impl_AddVisual,
2597 IDirect3DRMFrame3Impl_GetChildren,
2598 IDirect3DRMFrame3Impl_GetColor,
2599 IDirect3DRMFrame3Impl_GetLights,
2600 IDirect3DRMFrame3Impl_GetMaterialMode,
2601 IDirect3DRMFrame3Impl_GetParent,
2602 IDirect3DRMFrame3Impl_GetPosition,
2603 IDirect3DRMFrame3Impl_GetRotation,
2604 IDirect3DRMFrame3Impl_GetScene,
2605 IDirect3DRMFrame3Impl_GetSortMode,
2606 IDirect3DRMFrame3Impl_GetTexture,
2607 IDirect3DRMFrame3Impl_GetTransform,
2608 IDirect3DRMFrame3Impl_GetVelocity,
2609 IDirect3DRMFrame3Impl_GetOrientation,
2610 IDirect3DRMFrame3Impl_GetVisuals,
2611 IDirect3DRMFrame3Impl_InverseTransform,
2612 IDirect3DRMFrame3Impl_Load,
2613 IDirect3DRMFrame3Impl_LookAt,
2614 IDirect3DRMFrame3Impl_Move,
2615 IDirect3DRMFrame3Impl_DeleteChild,
2616 IDirect3DRMFrame3Impl_DeleteLight,
2617 IDirect3DRMFrame3Impl_DeleteMoveCallback,
2618 IDirect3DRMFrame3Impl_DeleteVisual,
2619 IDirect3DRMFrame3Impl_GetSceneBackground,
2620 IDirect3DRMFrame3Impl_GetSceneBackgroundDepth,
2621 IDirect3DRMFrame3Impl_GetSceneFogColor,
2622 IDirect3DRMFrame3Impl_GetSceneFogEnable,
2623 IDirect3DRMFrame3Impl_GetSceneFogMode,
2624 IDirect3DRMFrame3Impl_GetSceneFogParams,
2625 IDirect3DRMFrame3Impl_SetSceneBackground,
2626 IDirect3DRMFrame3Impl_SetSceneBackgroundRGB,
2627 IDirect3DRMFrame3Impl_SetSceneBackgroundDepth,
2628 IDirect3DRMFrame3Impl_SetSceneBackgroundImage,
2629 IDirect3DRMFrame3Impl_SetSceneFogEnable,
2630 IDirect3DRMFrame3Impl_SetSceneFogColor,
2631 IDirect3DRMFrame3Impl_SetSceneFogMode,
2632 IDirect3DRMFrame3Impl_SetSceneFogParams,
2633 IDirect3DRMFrame3Impl_SetColor,
2634 IDirect3DRMFrame3Impl_SetColorRGB,
2635 IDirect3DRMFrame3Impl_GetZbufferMode,
2636 IDirect3DRMFrame3Impl_SetMaterialMode,
2637 IDirect3DRMFrame3Impl_SetOrientation,
2638 IDirect3DRMFrame3Impl_SetPosition,
2639 IDirect3DRMFrame3Impl_SetRotation,
2640 IDirect3DRMFrame3Impl_SetSortMode,
2641 IDirect3DRMFrame3Impl_SetTexture,
2642 IDirect3DRMFrame3Impl_SetVelocity,
2643 IDirect3DRMFrame3Impl_SetZbufferMode,
2644 IDirect3DRMFrame3Impl_Transform,
2645 IDirect3DRMFrame3Impl_GetBox,
2646 IDirect3DRMFrame3Impl_GetBoxEnable,
2647 IDirect3DRMFrame3Impl_GetAxes,
2648 IDirect3DRMFrame3Impl_GetMaterial,
2649 IDirect3DRMFrame3Impl_GetInheritAxes,
2650 IDirect3DRMFrame3Impl_GetHierarchyBox,
2651 IDirect3DRMFrame3Impl_SetBox,
2652 IDirect3DRMFrame3Impl_SetBoxEnable,
2653 IDirect3DRMFrame3Impl_SetAxes,
2654 IDirect3DRMFrame3Impl_SetInheritAxes,
2655 IDirect3DRMFrame3Impl_SetMaterial,
2656 IDirect3DRMFrame3Impl_SetQuaternion,
2657 IDirect3DRMFrame3Impl_RayPick,
2658 IDirect3DRMFrame3Impl_Save,
2659 IDirect3DRMFrame3Impl_TransformVectors,
2660 IDirect3DRMFrame3Impl_InverseTransformVectors,
2661 IDirect3DRMFrame3Impl_SetTraversalOptions,
2662 IDirect3DRMFrame3Impl_GetTraversalOptions,
2663 IDirect3DRMFrame3Impl_SetSceneFogMethod,
2664 IDirect3DRMFrame3Impl_GetSceneFogMethod,
2665 IDirect3DRMFrame3Impl_SetMaterialOverride,
2666 IDirect3DRMFrame3Impl_GetMaterialOverride
2669 static inline IDirect3DRMFrameImpl *unsafe_impl_from_IDirect3DRMFrame3(IDirect3DRMFrame3 *iface)
2671 if (!iface)
2672 return NULL;
2673 assert(iface->lpVtbl == &Direct3DRMFrame3_Vtbl);
2675 return impl_from_IDirect3DRMFrame3(iface);
2678 HRESULT Direct3DRMFrame_create(REFIID riid, IUnknown* parent, IUnknown** ret_iface)
2680 IDirect3DRMFrameImpl* object;
2681 HRESULT hr;
2683 TRACE("(%s, %p, %p)\n", wine_dbgstr_guid(riid), parent, ret_iface);
2685 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMFrameImpl));
2686 if (!object)
2688 ERR("Out of memory\n");
2689 return E_OUTOFMEMORY;
2692 object->IDirect3DRMFrame2_iface.lpVtbl = &Direct3DRMFrame2_Vtbl;
2693 object->IDirect3DRMFrame3_iface.lpVtbl = &Direct3DRMFrame3_Vtbl;
2694 object->ref = 1;
2695 object->scenebackground = D3DCOLOR_ARGB(0xff, 0, 0, 0);
2697 memcpy(&object->transform[0][0], &identity[0][0], sizeof(D3DRMMATRIX4D));
2699 if (parent)
2701 IDirect3DRMFrame3 *p;
2703 hr = IDirect3DRMFrame_QueryInterface(parent, &IID_IDirect3DRMFrame3, (void**)&p);
2704 if (hr != S_OK)
2705 return hr;
2706 IDirect3DRMFrame_Release(parent);
2707 IDirect3DRMFrame3_AddChild(p, &object->IDirect3DRMFrame3_iface);
2710 hr = IDirect3DRMFrame3_QueryInterface(&object->IDirect3DRMFrame3_iface, riid, (void**)ret_iface);
2711 IDirect3DRMFrame3_Release(&object->IDirect3DRMFrame3_iface);
2712 return S_OK;