msvcrt: Don't forward strcmp to ntdll.
[wine/wine-gecko.git] / dlls / d3drm / frame.c
blob33dfb655692c4a6112ae81bf550d04a8c38193d3
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 IUnknown *outer, REFIID iid, void **out)
518 FIXME("iface %p, outer %p, iid %s, out %p stub!\n", iface, outer, debugstr_guid(iid), out);
520 return E_NOTIMPL;
523 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddDestroyCallback(IDirect3DRMFrame2 *iface,
524 D3DRMOBJECTCALLBACK cb, void *ctx)
526 FIXME("iface %p, cb %p, ctx %p stub!\n", iface, cb, ctx);
528 return E_NOTIMPL;
531 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteDestroyCallback(IDirect3DRMFrame2 *iface,
532 D3DRMOBJECTCALLBACK cb, void *ctx)
534 FIXME("iface %p, cb %p, ctx %p stub!\n", iface, cb, ctx);
536 return E_NOTIMPL;
539 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetAppData(IDirect3DRMFrame2* iface,
540 DWORD data)
542 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
544 FIXME("(%p/%p)->(%u): stub\n", iface, This, data);
546 return E_NOTIMPL;
549 static DWORD WINAPI IDirect3DRMFrame2Impl_GetAppData(IDirect3DRMFrame2* iface)
551 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
553 FIXME("(%p/%p)->(): stub\n", iface, This);
555 return 0;
558 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetName(IDirect3DRMFrame2 *iface, const char *name)
560 FIXME("iface %p, name %s stub!\n", iface, debugstr_a(name));
562 return E_NOTIMPL;
565 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetName(IDirect3DRMFrame2 *iface, DWORD *size, char *name)
567 FIXME("iface %p, size %p, name %p stub!\n", iface, size, name);
569 return E_NOTIMPL;
572 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetClassName(IDirect3DRMFrame2 *iface, DWORD *size, char *name)
574 IDirect3DRMFrameImpl *frame = impl_from_IDirect3DRMFrame2(iface);
576 TRACE("iface %p, size %p, name %p.\n", iface, size, name);
578 return IDirect3DRMFrame3_GetClassName(&frame->IDirect3DRMFrame3_iface, size, name);
581 /*** IDirect3DRMFrame methods ***/
582 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddChild(IDirect3DRMFrame2 *iface, IDirect3DRMFrame *child)
584 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
585 IDirect3DRMFrame3 *frame;
586 HRESULT hr;
588 TRACE("(%p/%p)->(%p)\n", iface, This, child);
590 if (!child)
591 return D3DRMERR_BADOBJECT;
592 hr = IDirect3DRMFrame_QueryInterface(child, &IID_IDirect3DRMFrame3, (void**)&frame);
593 if (hr != S_OK)
594 return D3DRMERR_BADOBJECT;
595 IDirect3DRMFrame_Release(child);
597 return IDirect3DRMFrame3_AddChild(&This->IDirect3DRMFrame3_iface, frame);
600 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddLight(IDirect3DRMFrame2 *iface, IDirect3DRMLight *light)
602 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
604 TRACE("(%p/%p)->(%p)\n", iface, This, light);
606 return IDirect3DRMFrame3_AddLight(&This->IDirect3DRMFrame3_iface, light);
609 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddMoveCallback(IDirect3DRMFrame2* iface,
610 D3DRMFRAMEMOVECALLBACK cb, VOID *arg)
612 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
614 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, cb, arg);
616 return E_NOTIMPL;
619 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddTransform(IDirect3DRMFrame2* iface,
620 D3DRMCOMBINETYPE type,
621 D3DRMMATRIX4D matrix)
623 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
625 TRACE("(%p/%p)->(%u,%p)\n", iface, This, type, matrix);
627 return IDirect3DRMFrame3_AddTransform(&This->IDirect3DRMFrame3_iface, type, matrix);
630 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddTranslation(IDirect3DRMFrame2* iface,
631 D3DRMCOMBINETYPE type,
632 D3DVALUE x, D3DVALUE y, D3DVALUE z)
634 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
636 FIXME("(%p/%p)->(%u,%f,%f,%f): stub\n", iface, This, type, x, y, z);
638 return E_NOTIMPL;
641 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddScale(IDirect3DRMFrame2* iface,
642 D3DRMCOMBINETYPE type,
643 D3DVALUE sx, D3DVALUE sy, D3DVALUE sz)
645 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
647 FIXME("(%p/%p)->(%u,%f,%f,%f): stub\n", iface, This, type, sx, sy, sz);
649 return E_NOTIMPL;
652 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddRotation(IDirect3DRMFrame2* iface,
653 D3DRMCOMBINETYPE type,
654 D3DVALUE x, D3DVALUE y, D3DVALUE z,
655 D3DVALUE theta)
657 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
659 FIXME("(%p/%p)->(%u,%f,%f,%f,%f): stub\n", iface, This, type, x, y, z, theta);
661 return E_NOTIMPL;
664 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddVisual(IDirect3DRMFrame2 *iface, IDirect3DRMVisual *visual)
666 IDirect3DRMFrameImpl *frame = impl_from_IDirect3DRMFrame2(iface);
668 TRACE("iface %p, visual %p.\n", iface, visual);
670 return IDirect3DRMFrame3_AddVisual(&frame->IDirect3DRMFrame3_iface, (IUnknown *)visual);
673 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetChildren(IDirect3DRMFrame2 *iface, IDirect3DRMFrameArray **children)
675 IDirect3DRMFrameImpl *frame = impl_from_IDirect3DRMFrame2(iface);
677 TRACE("iface %p, children %p.\n", iface, children);
679 return IDirect3DRMFrame3_GetChildren(&frame->IDirect3DRMFrame3_iface, children);
682 static D3DCOLOR WINAPI IDirect3DRMFrame2Impl_GetColor(IDirect3DRMFrame2* iface)
684 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
686 FIXME("(%p/%p)->(): stub\n", iface, This);
688 return 0;
691 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetLights(IDirect3DRMFrame2 *iface, IDirect3DRMLightArray **lights)
693 IDirect3DRMFrameImpl *frame = impl_from_IDirect3DRMFrame2(iface);
695 TRACE("iface %p, lights %p.\n", iface, lights);
697 return IDirect3DRMFrame3_GetLights(&frame->IDirect3DRMFrame3_iface, lights);
700 static D3DRMMATERIALMODE WINAPI IDirect3DRMFrame2Impl_GetMaterialMode(IDirect3DRMFrame2* iface)
702 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
704 FIXME("(%p/%p)->(): stub\n", iface, This);
706 return D3DRMMATERIAL_FROMPARENT;
709 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetParent(IDirect3DRMFrame2 *iface, IDirect3DRMFrame **frame)
711 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
713 TRACE("(%p/%p)->(%p)\n", iface, This, frame);
715 if (!frame)
716 return D3DRMERR_BADVALUE;
718 if (This->parent)
720 *frame = (IDirect3DRMFrame *)&This->parent->IDirect3DRMFrame2_iface;
721 IDirect3DRMFrame_AddRef(*frame);
723 else
725 *frame = NULL;
728 return D3DRM_OK;
731 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetPosition(IDirect3DRMFrame2 *iface,
732 IDirect3DRMFrame *reference, D3DVECTOR *return_position)
734 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
736 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, reference, return_position);
738 return E_NOTIMPL;
741 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetRotation(IDirect3DRMFrame2 *iface,
742 IDirect3DRMFrame *reference, D3DVECTOR *axis, D3DVALUE *return_theta)
744 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
746 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, reference, axis, return_theta);
748 return E_NOTIMPL;
751 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetScene(IDirect3DRMFrame2 *iface, IDirect3DRMFrame **scene)
753 FIXME("iface %p, frame %p stub!\n", iface, scene);
755 return E_NOTIMPL;
758 static D3DRMSORTMODE WINAPI IDirect3DRMFrame2Impl_GetSortMode(IDirect3DRMFrame2* iface)
760 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
762 FIXME("(%p/%p)->(): stub\n", iface, This);
764 return D3DRMSORT_FROMPARENT;
767 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetTexture(IDirect3DRMFrame2 *iface, IDirect3DRMTexture **texture)
769 FIXME("iface %p, texture %p stub!\n", iface, texture);
771 return E_NOTIMPL;
774 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetTransform(IDirect3DRMFrame2* iface,
775 D3DRMMATRIX4D return_matrix)
777 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
779 TRACE("(%p/%p)->(%p)\n", iface, This, return_matrix);
781 memcpy(return_matrix, This->transform, sizeof(D3DRMMATRIX4D));
783 return D3DRM_OK;
786 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetVelocity(IDirect3DRMFrame2 *iface,
787 IDirect3DRMFrame *reference, D3DVECTOR *return_velocity, BOOL with_rotation)
789 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
791 FIXME("(%p/%p)->(%p,%p,%d): stub\n", iface, This, reference, return_velocity, with_rotation);
793 return E_NOTIMPL;
796 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetOrientation(IDirect3DRMFrame2 *iface,
797 IDirect3DRMFrame *reference, D3DVECTOR *dir, D3DVECTOR *up)
799 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
801 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, reference, dir, up);
803 return E_NOTIMPL;
806 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetVisuals(IDirect3DRMFrame2 *iface, IDirect3DRMVisualArray **visuals)
808 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
809 IDirect3DRMVisualArrayImpl* obj;
810 HRESULT hr;
812 TRACE("(%p/%p)->(%p)\n", iface, This, visuals);
814 if (!visuals)
815 return D3DRMERR_BADVALUE;
817 hr = Direct3DRMVisualArray_create(visuals);
819 if (hr != D3DRM_OK)
820 return hr;
822 obj = (IDirect3DRMVisualArrayImpl*)*visuals;
824 obj->size = This->nb_visuals;
825 if (This->nb_visuals)
827 ULONG i;
828 if (!(obj->visuals = HeapAlloc(GetProcessHeap(), 0, This->nb_visuals * sizeof(*obj->visuals))))
829 return E_OUTOFMEMORY;
830 for (i = 0; i < This->nb_visuals; i++)
832 obj->visuals[i] = This->visuals[i];
833 IDirect3DRMVisual_AddRef(This->visuals[i]);
837 return D3DRM_OK;
840 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetTextureTopology(IDirect3DRMFrame2* iface,
841 BOOL *wrap_u, BOOL *wrap_v)
843 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
845 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, wrap_u, wrap_v);
847 return E_NOTIMPL;
850 static HRESULT WINAPI IDirect3DRMFrame2Impl_InverseTransform(IDirect3DRMFrame2* iface,
851 D3DVECTOR *d, D3DVECTOR *s)
853 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
855 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, d, s);
857 return E_NOTIMPL;
860 static HRESULT WINAPI IDirect3DRMFrame2Impl_Load(IDirect3DRMFrame2 *iface, void *filename,
861 void *name, D3DRMLOADOPTIONS flags, D3DRMLOADTEXTURECALLBACK cb, void *ctx)
863 FIXME("iface %p, filename %p, name %p, flags %#x, cb %p, ctx %p stub!\n",
864 iface, filename, name, flags, cb, ctx);
866 return E_NOTIMPL;
869 static HRESULT WINAPI IDirect3DRMFrame2Impl_LookAt(IDirect3DRMFrame2 *iface, IDirect3DRMFrame *target,
870 IDirect3DRMFrame *reference, D3DRMFRAMECONSTRAINT constraint)
872 FIXME("iface %p, target %p, reference %p, constraint %#x stub!\n", iface, target, reference, constraint);
874 return E_NOTIMPL;
877 static HRESULT WINAPI IDirect3DRMFrame2Impl_Move(IDirect3DRMFrame2* iface, D3DVALUE delta)
879 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
881 FIXME("(%p/%p)->(%f): stub\n", iface, This, delta);
883 return E_NOTIMPL;
886 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteChild(IDirect3DRMFrame2 *iface, IDirect3DRMFrame *frame)
888 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
889 IDirect3DRMFrame3 *child;
890 HRESULT hr;
892 TRACE("(%p/%p)->(%p)\n", iface, This, frame);
894 if (!frame)
895 return D3DRMERR_BADOBJECT;
896 hr = IDirect3DRMFrame_QueryInterface(frame, &IID_IDirect3DRMFrame3, (void**)&child);
897 if (hr != S_OK)
898 return D3DRMERR_BADOBJECT;
899 IDirect3DRMFrame_Release(frame);
901 return IDirect3DRMFrame3_DeleteChild(&This->IDirect3DRMFrame3_iface, child);
904 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteLight(IDirect3DRMFrame2 *iface, IDirect3DRMLight *light)
906 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
908 TRACE("(%p/%p)->(%p)\n", iface, This, light);
910 return IDirect3DRMFrame3_DeleteLight(&This->IDirect3DRMFrame3_iface, light);
913 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteMoveCallback(IDirect3DRMFrame2* iface,
914 D3DRMFRAMEMOVECALLBACK cb, VOID *arg)
916 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
918 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, cb, arg);
920 return E_NOTIMPL;
923 static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteVisual(IDirect3DRMFrame2 *iface, IDirect3DRMVisual *visual)
925 IDirect3DRMFrameImpl *frame = impl_from_IDirect3DRMFrame2(iface);
927 TRACE("iface %p, visual %p.\n", iface, visual);
929 return IDirect3DRMFrame3_DeleteVisual(&frame->IDirect3DRMFrame3_iface, (IUnknown *)visual);
932 static D3DCOLOR WINAPI IDirect3DRMFrame2Impl_GetSceneBackground(IDirect3DRMFrame2* iface)
934 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
936 TRACE("(%p/%p)->()\n", iface, This);
938 return IDirect3DRMFrame3_GetSceneBackground(&This->IDirect3DRMFrame3_iface);
941 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetSceneBackgroundDepth(IDirect3DRMFrame2 *iface,
942 IDirectDrawSurface **surface)
944 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
946 FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
948 return E_NOTIMPL;
951 static D3DCOLOR WINAPI IDirect3DRMFrame2Impl_GetSceneFogColor(IDirect3DRMFrame2* iface)
953 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
955 FIXME("(%p/%p)->(): stub\n", iface, This);
957 return 0;
960 static BOOL WINAPI IDirect3DRMFrame2Impl_GetSceneFogEnable(IDirect3DRMFrame2* iface)
962 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
964 FIXME("(%p/%p)->(): stub\n", iface, This);
966 return FALSE;
969 static D3DRMFOGMODE WINAPI IDirect3DRMFrame2Impl_GetSceneFogMode(IDirect3DRMFrame2* iface)
971 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
973 FIXME("(%p/%p)->(): stub\n", iface, This);
975 return D3DRMFOG_LINEAR;
978 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetSceneFogParams(IDirect3DRMFrame2* iface,
979 D3DVALUE *return_start,
980 D3DVALUE *return_end,
981 D3DVALUE *return_density)
983 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
985 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, return_start, return_end, return_density);
987 return E_NOTIMPL;
990 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackground(IDirect3DRMFrame2* iface,
991 D3DCOLOR color)
993 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
995 TRACE("(%p/%p)->(%u)\n", iface, This, color);
997 return IDirect3DRMFrame3_SetSceneBackground(&This->IDirect3DRMFrame3_iface, color);
1000 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackgroundRGB(IDirect3DRMFrame2* iface,
1001 D3DVALUE red, D3DVALUE green,
1002 D3DVALUE blue)
1004 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1006 TRACE("(%p/%p)->(%f,%f,%f)\n", iface, This, red, green, blue);
1008 return IDirect3DRMFrame3_SetSceneBackgroundRGB(&This->IDirect3DRMFrame3_iface, red, green, blue);
1011 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackgroundDepth(IDirect3DRMFrame2 *iface,
1012 IDirectDrawSurface *surface)
1014 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1016 FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
1018 return E_NOTIMPL;
1021 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneBackgroundImage(IDirect3DRMFrame2 *iface,
1022 IDirect3DRMTexture *texture)
1024 FIXME("iface %p, texture %p stub!\n", iface, texture);
1026 return E_NOTIMPL;
1029 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneFogEnable(IDirect3DRMFrame2* iface, BOOL enable)
1031 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1033 FIXME("(%p/%p)->(%d): stub\n", iface, This, enable);
1035 return E_NOTIMPL;
1038 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneFogColor(IDirect3DRMFrame2* iface,
1039 D3DCOLOR color)
1041 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1043 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
1045 return E_NOTIMPL;
1048 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneFogMode(IDirect3DRMFrame2* iface,
1049 D3DRMFOGMODE mode)
1051 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1053 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
1055 return E_NOTIMPL;
1058 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSceneFogParams(IDirect3DRMFrame2* iface,
1059 D3DVALUE start, D3DVALUE end,
1060 D3DVALUE density)
1062 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1064 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, start, end, density);
1066 return E_NOTIMPL;
1069 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetColor(IDirect3DRMFrame2* iface, D3DCOLOR color)
1071 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1073 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
1075 return E_NOTIMPL;
1078 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetColorRGB(IDirect3DRMFrame2* iface, D3DVALUE red,
1079 D3DVALUE green, D3DVALUE blue)
1081 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1083 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, red, green, blue);
1085 return E_NOTIMPL;
1088 static D3DRMZBUFFERMODE WINAPI IDirect3DRMFrame2Impl_GetZbufferMode(IDirect3DRMFrame2* iface)
1090 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1092 FIXME("(%p/%p)->(): stub\n", iface, This);
1094 return D3DRMZBUFFER_FROMPARENT;
1097 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetMaterialMode(IDirect3DRMFrame2* iface,
1098 D3DRMMATERIALMODE mode)
1100 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1102 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
1104 return E_NOTIMPL;
1107 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetOrientation(IDirect3DRMFrame2 *iface, IDirect3DRMFrame *reference,
1108 D3DVALUE dx, D3DVALUE dy, D3DVALUE dz, D3DVALUE ux, D3DVALUE uy, D3DVALUE uz)
1110 FIXME("iface %p, reference %p, dx %.8e, dy %.8e, dz %.8e, ux %.8e, uy %.8e, uz %.8e stub!\n",
1111 iface, reference, dx, dy, dz, ux, uy, uz);
1113 return E_NOTIMPL;
1116 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetPosition(IDirect3DRMFrame2 *iface, IDirect3DRMFrame *reference,
1117 D3DVALUE x, D3DVALUE y, D3DVALUE z)
1119 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e stub!\n", iface, reference, x, y, z);
1121 return E_NOTIMPL;
1124 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetRotation(IDirect3DRMFrame2 *iface,
1125 IDirect3DRMFrame *reference, D3DVALUE x, D3DVALUE y, D3DVALUE z, D3DVALUE theta)
1127 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e, theta %.8e stub!\n",
1128 iface, reference, x, y, z, theta);
1130 return E_NOTIMPL;
1133 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetSortMode(IDirect3DRMFrame2* iface,
1134 D3DRMSORTMODE mode)
1136 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1138 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
1140 return E_NOTIMPL;
1143 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetTexture(IDirect3DRMFrame2 *iface, IDirect3DRMTexture *texture)
1145 FIXME("iface %p, texture %p stub!\n", iface, texture);
1147 return E_NOTIMPL;
1150 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetTextureTopology(IDirect3DRMFrame2* iface,
1151 BOOL wrap_u, BOOL wrap_v)
1153 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1155 FIXME("(%p/%p)->(%d,%d): stub\n", iface, This, wrap_u, wrap_v);
1157 return E_NOTIMPL;
1160 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetVelocity(IDirect3DRMFrame2 *iface,
1161 IDirect3DRMFrame *reference, D3DVALUE x, D3DVALUE y, D3DVALUE z, BOOL with_rotation)
1163 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e, with_rotation %#x stub!\n",
1164 iface, reference, x, y, z, with_rotation);
1166 return E_NOTIMPL;
1169 static HRESULT WINAPI IDirect3DRMFrame2Impl_SetZbufferMode(IDirect3DRMFrame2* iface,
1170 D3DRMZBUFFERMODE mode)
1172 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1174 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
1176 return E_NOTIMPL;
1179 static HRESULT WINAPI IDirect3DRMFrame2Impl_Transform(IDirect3DRMFrame2* iface, D3DVECTOR *d,
1180 D3DVECTOR *s)
1182 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1184 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, d, s);
1186 return E_NOTIMPL;
1189 /*** IDirect3DRMFrame2 methods ***/
1190 static HRESULT WINAPI IDirect3DRMFrame2Impl_AddMoveCallback2(IDirect3DRMFrame2* iface,
1191 D3DRMFRAMEMOVECALLBACK cb, VOID *arg,
1192 DWORD flags)
1194 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1196 FIXME("(%p/%p)->(%p,%p,%u): stub\n", iface, This, cb, arg, flags);
1198 return E_NOTIMPL;
1201 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetBox(IDirect3DRMFrame2 *iface, D3DRMBOX *box)
1203 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1205 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
1207 return E_NOTIMPL;
1210 static BOOL WINAPI IDirect3DRMFrame2Impl_GetBoxEnable(IDirect3DRMFrame2* iface)
1212 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1214 FIXME("(%p/%p)->(): stub\n", iface, This);
1216 return E_NOTIMPL;
1219 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetAxes(IDirect3DRMFrame2 *iface,
1220 D3DVECTOR *dir, D3DVECTOR *up)
1222 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1224 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, dir, up);
1226 return E_NOTIMPL;
1229 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetMaterial(IDirect3DRMFrame2 *iface, IDirect3DRMMaterial **material)
1231 FIXME("iface %p, material %p stub!\n", iface, material);
1233 return E_NOTIMPL;
1236 static BOOL WINAPI IDirect3DRMFrame2Impl_GetInheritAxes(IDirect3DRMFrame2* iface)
1238 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1240 FIXME("(%p/%p)->(): stub\n", iface, This);
1242 return E_NOTIMPL;
1245 static HRESULT WINAPI IDirect3DRMFrame2Impl_GetHierarchyBox(IDirect3DRMFrame2 *iface, D3DRMBOX *box)
1247 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
1249 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
1251 return E_NOTIMPL;
1254 static const struct IDirect3DRMFrame2Vtbl Direct3DRMFrame2_Vtbl =
1256 /*** IUnknown methods ***/
1257 IDirect3DRMFrame2Impl_QueryInterface,
1258 IDirect3DRMFrame2Impl_AddRef,
1259 IDirect3DRMFrame2Impl_Release,
1260 /*** IDirect3DRMObject methods ***/
1261 IDirect3DRMFrame2Impl_Clone,
1262 IDirect3DRMFrame2Impl_AddDestroyCallback,
1263 IDirect3DRMFrame2Impl_DeleteDestroyCallback,
1264 IDirect3DRMFrame2Impl_SetAppData,
1265 IDirect3DRMFrame2Impl_GetAppData,
1266 IDirect3DRMFrame2Impl_SetName,
1267 IDirect3DRMFrame2Impl_GetName,
1268 IDirect3DRMFrame2Impl_GetClassName,
1269 /*** IDirect3DRMFrame methods ***/
1270 IDirect3DRMFrame2Impl_AddChild,
1271 IDirect3DRMFrame2Impl_AddLight,
1272 IDirect3DRMFrame2Impl_AddMoveCallback,
1273 IDirect3DRMFrame2Impl_AddTransform,
1274 IDirect3DRMFrame2Impl_AddTranslation,
1275 IDirect3DRMFrame2Impl_AddScale,
1276 IDirect3DRMFrame2Impl_AddRotation,
1277 IDirect3DRMFrame2Impl_AddVisual,
1278 IDirect3DRMFrame2Impl_GetChildren,
1279 IDirect3DRMFrame2Impl_GetColor,
1280 IDirect3DRMFrame2Impl_GetLights,
1281 IDirect3DRMFrame2Impl_GetMaterialMode,
1282 IDirect3DRMFrame2Impl_GetParent,
1283 IDirect3DRMFrame2Impl_GetPosition,
1284 IDirect3DRMFrame2Impl_GetRotation,
1285 IDirect3DRMFrame2Impl_GetScene,
1286 IDirect3DRMFrame2Impl_GetSortMode,
1287 IDirect3DRMFrame2Impl_GetTexture,
1288 IDirect3DRMFrame2Impl_GetTransform,
1289 IDirect3DRMFrame2Impl_GetVelocity,
1290 IDirect3DRMFrame2Impl_GetOrientation,
1291 IDirect3DRMFrame2Impl_GetVisuals,
1292 IDirect3DRMFrame2Impl_GetTextureTopology,
1293 IDirect3DRMFrame2Impl_InverseTransform,
1294 IDirect3DRMFrame2Impl_Load,
1295 IDirect3DRMFrame2Impl_LookAt,
1296 IDirect3DRMFrame2Impl_Move,
1297 IDirect3DRMFrame2Impl_DeleteChild,
1298 IDirect3DRMFrame2Impl_DeleteLight,
1299 IDirect3DRMFrame2Impl_DeleteMoveCallback,
1300 IDirect3DRMFrame2Impl_DeleteVisual,
1301 IDirect3DRMFrame2Impl_GetSceneBackground,
1302 IDirect3DRMFrame2Impl_GetSceneBackgroundDepth,
1303 IDirect3DRMFrame2Impl_GetSceneFogColor,
1304 IDirect3DRMFrame2Impl_GetSceneFogEnable,
1305 IDirect3DRMFrame2Impl_GetSceneFogMode,
1306 IDirect3DRMFrame2Impl_GetSceneFogParams,
1307 IDirect3DRMFrame2Impl_SetSceneBackground,
1308 IDirect3DRMFrame2Impl_SetSceneBackgroundRGB,
1309 IDirect3DRMFrame2Impl_SetSceneBackgroundDepth,
1310 IDirect3DRMFrame2Impl_SetSceneBackgroundImage,
1311 IDirect3DRMFrame2Impl_SetSceneFogEnable,
1312 IDirect3DRMFrame2Impl_SetSceneFogColor,
1313 IDirect3DRMFrame2Impl_SetSceneFogMode,
1314 IDirect3DRMFrame2Impl_SetSceneFogParams,
1315 IDirect3DRMFrame2Impl_SetColor,
1316 IDirect3DRMFrame2Impl_SetColorRGB,
1317 IDirect3DRMFrame2Impl_GetZbufferMode,
1318 IDirect3DRMFrame2Impl_SetMaterialMode,
1319 IDirect3DRMFrame2Impl_SetOrientation,
1320 IDirect3DRMFrame2Impl_SetPosition,
1321 IDirect3DRMFrame2Impl_SetRotation,
1322 IDirect3DRMFrame2Impl_SetSortMode,
1323 IDirect3DRMFrame2Impl_SetTexture,
1324 IDirect3DRMFrame2Impl_SetTextureTopology,
1325 IDirect3DRMFrame2Impl_SetVelocity,
1326 IDirect3DRMFrame2Impl_SetZbufferMode,
1327 IDirect3DRMFrame2Impl_Transform,
1328 /*** IDirect3DRMFrame2 methods ***/
1329 IDirect3DRMFrame2Impl_AddMoveCallback2,
1330 IDirect3DRMFrame2Impl_GetBox,
1331 IDirect3DRMFrame2Impl_GetBoxEnable,
1332 IDirect3DRMFrame2Impl_GetAxes,
1333 IDirect3DRMFrame2Impl_GetMaterial,
1334 IDirect3DRMFrame2Impl_GetInheritAxes,
1335 IDirect3DRMFrame2Impl_GetHierarchyBox
1338 /*** IUnknown methods ***/
1339 static HRESULT WINAPI IDirect3DRMFrame3Impl_QueryInterface(IDirect3DRMFrame3* iface,
1340 REFIID riid, void** object)
1342 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1343 return IDirect3DRMFrame_QueryInterface(&This->IDirect3DRMFrame2_iface, riid, object);
1346 static ULONG WINAPI IDirect3DRMFrame3Impl_AddRef(IDirect3DRMFrame3* iface)
1348 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1349 return IDirect3DRMFrame2_AddRef(&This->IDirect3DRMFrame2_iface);
1352 static ULONG WINAPI IDirect3DRMFrame3Impl_Release(IDirect3DRMFrame3* iface)
1354 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1355 return IDirect3DRMFrame2_Release(&This->IDirect3DRMFrame2_iface);
1358 /*** IDirect3DRMObject methods ***/
1359 static HRESULT WINAPI IDirect3DRMFrame3Impl_Clone(IDirect3DRMFrame3 *iface,
1360 IUnknown *outer, REFIID iid, void **out)
1362 FIXME("iface %p, outer %p, iid %s, out %p stub!\n", iface, outer, debugstr_guid(iid), out);
1364 return E_NOTIMPL;
1367 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddDestroyCallback(IDirect3DRMFrame3 *iface,
1368 D3DRMOBJECTCALLBACK cb, void *ctx)
1370 FIXME("iface %p, cb %p, ctx %p stub!\n", iface, cb, ctx);
1372 return E_NOTIMPL;
1375 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteDestroyCallback(IDirect3DRMFrame3 *iface,
1376 D3DRMOBJECTCALLBACK cb, void *ctx)
1378 FIXME("iface %p, cb %p, ctx %p stub!\n", iface, cb, ctx);
1380 return E_NOTIMPL;
1383 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetAppData(IDirect3DRMFrame3* iface,
1384 DWORD data)
1386 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1388 FIXME("(%p/%p)->(%u): stub\n", iface, This, data);
1390 return E_NOTIMPL;
1393 static DWORD WINAPI IDirect3DRMFrame3Impl_GetAppData(IDirect3DRMFrame3* iface)
1395 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1397 FIXME("(%p/%p)->(): stub\n", iface, This);
1399 return 0;
1402 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetName(IDirect3DRMFrame3 *iface, const char *name)
1404 FIXME("iface %p, name %s stub!\n", iface, debugstr_a(name));
1406 return E_NOTIMPL;
1409 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetName(IDirect3DRMFrame3 *iface, DWORD *size, char *name)
1411 FIXME("iface %p, size %p, name %p stub!\n", iface, size, name);
1413 return E_NOTIMPL;
1416 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetClassName(IDirect3DRMFrame3 *iface, DWORD *size, char *name)
1418 TRACE("iface %p, size %p, name %p.\n", iface, size, name);
1420 if (!size || *size < strlen("Frame") || !name)
1421 return E_INVALIDARG;
1423 strcpy(name, "Frame");
1424 *size = sizeof("Frame");
1426 return D3DRM_OK;
1429 /*** IDirect3DRMFrame methods ***/
1430 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddChild(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 *child)
1432 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1433 IDirect3DRMFrameImpl *child_obj = unsafe_impl_from_IDirect3DRMFrame3(child);
1435 TRACE("(%p/%p)->(%p)\n", iface, This, child);
1437 if (!child_obj)
1438 return D3DRMERR_BADOBJECT;
1440 if (child_obj->parent)
1442 IDirect3DRMFrame3* parent = &child_obj->parent->IDirect3DRMFrame3_iface;
1444 if (parent == iface)
1446 /* Passed frame is already a child so return success */
1447 return D3DRM_OK;
1449 else
1451 /* Remove parent and continue */
1452 IDirect3DRMFrame3_DeleteChild(parent, child);
1456 if ((This->nb_children + 1) > This->children_capacity)
1458 ULONG new_capacity;
1459 IDirect3DRMFrame3** children;
1461 if (!This->children_capacity)
1463 new_capacity = 16;
1464 children = HeapAlloc(GetProcessHeap(), 0, new_capacity * sizeof(IDirect3DRMFrame3*));
1466 else
1468 new_capacity = This->children_capacity * 2;
1469 children = HeapReAlloc(GetProcessHeap(), 0, This->children, new_capacity * sizeof(IDirect3DRMFrame3*));
1472 if (!children)
1473 return E_OUTOFMEMORY;
1475 This->children_capacity = new_capacity;
1476 This->children = children;
1479 This->children[This->nb_children++] = child;
1480 IDirect3DRMFrame3_AddRef(child);
1481 child_obj->parent = This;
1483 return D3DRM_OK;
1486 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddLight(IDirect3DRMFrame3 *iface, IDirect3DRMLight *light)
1488 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1489 ULONG i;
1490 IDirect3DRMLight** lights;
1492 TRACE("(%p/%p)->(%p)\n", iface, This, light);
1494 if (!light)
1495 return D3DRMERR_BADOBJECT;
1497 /* Check if already existing and return gracefully without increasing ref count */
1498 for (i = 0; i < This->nb_lights; i++)
1499 if (This->lights[i] == light)
1500 return D3DRM_OK;
1502 if ((This->nb_lights + 1) > This->lights_capacity)
1504 ULONG new_capacity;
1506 if (!This->lights_capacity)
1508 new_capacity = 16;
1509 lights = HeapAlloc(GetProcessHeap(), 0, new_capacity * sizeof(IDirect3DRMLight*));
1511 else
1513 new_capacity = This->lights_capacity * 2;
1514 lights = HeapReAlloc(GetProcessHeap(), 0, This->lights, new_capacity * sizeof(IDirect3DRMLight*));
1517 if (!lights)
1518 return E_OUTOFMEMORY;
1520 This->lights_capacity = new_capacity;
1521 This->lights = lights;
1524 This->lights[This->nb_lights++] = light;
1525 IDirect3DRMLight_AddRef(light);
1527 return D3DRM_OK;
1530 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddMoveCallback(IDirect3DRMFrame3* iface,
1531 D3DRMFRAME3MOVECALLBACK cb, VOID *arg,
1532 DWORD flags)
1534 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1536 FIXME("(%p/%p)->(%p,%p,%u): stub\n", iface, This, cb, arg, flags);
1538 return E_NOTIMPL;
1541 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddTransform(IDirect3DRMFrame3* iface,
1542 D3DRMCOMBINETYPE type,
1543 D3DRMMATRIX4D matrix)
1545 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1547 TRACE("(%p/%p)->(%u,%p)\n", iface, This, type, matrix);
1549 switch (type)
1551 case D3DRMCOMBINE_REPLACE:
1552 memcpy(This->transform, matrix, sizeof(D3DRMMATRIX4D));
1553 break;
1555 case D3DRMCOMBINE_BEFORE:
1556 FIXME("D3DRMCOMBINE_BEFORE not supported yed\n");
1557 break;
1559 case D3DRMCOMBINE_AFTER:
1560 FIXME("D3DRMCOMBINE_AFTER not supported yed\n");
1561 break;
1563 default:
1564 WARN("Unknown Combine Type %u\n", type);
1565 return D3DRMERR_BADVALUE;
1568 return S_OK;
1571 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddTranslation(IDirect3DRMFrame3* iface,
1572 D3DRMCOMBINETYPE type,
1573 D3DVALUE x, D3DVALUE y, D3DVALUE z)
1575 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1577 FIXME("(%p/%p)->(%u,%f,%f,%f): stub\n", iface, This, type, x, y, z);
1579 return E_NOTIMPL;
1582 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddScale(IDirect3DRMFrame3* iface,
1583 D3DRMCOMBINETYPE type,
1584 D3DVALUE sx, D3DVALUE sy, D3DVALUE sz)
1586 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1588 FIXME("(%p/%p)->(%u,%f,%f,%f): stub\n", iface, This, type, sx, sy, sz);
1590 return E_NOTIMPL;
1593 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddRotation(IDirect3DRMFrame3* iface,
1594 D3DRMCOMBINETYPE type,
1595 D3DVALUE x, D3DVALUE y, D3DVALUE z,
1596 D3DVALUE theta)
1598 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1600 FIXME("(%p/%p)->(%u,%f,%f,%f,%f): stub\n", iface, This, type, x, y, z, theta);
1602 return E_NOTIMPL;
1605 static HRESULT WINAPI IDirect3DRMFrame3Impl_AddVisual(IDirect3DRMFrame3 *iface, IUnknown *visual)
1607 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1608 ULONG i;
1609 IDirect3DRMVisual** visuals;
1611 TRACE("iface %p, visual %p.\n", iface, visual);
1613 if (!visual)
1614 return D3DRMERR_BADOBJECT;
1616 /* Check if already existing and return gracefully without increasing ref count */
1617 for (i = 0; i < This->nb_visuals; i++)
1618 if (This->visuals[i] == (IDirect3DRMVisual *)visual)
1619 return D3DRM_OK;
1621 if ((This->nb_visuals + 1) > This->visuals_capacity)
1623 ULONG new_capacity;
1625 if (!This->visuals_capacity)
1627 new_capacity = 16;
1628 visuals = HeapAlloc(GetProcessHeap(), 0, new_capacity * sizeof(IDirect3DRMVisual*));
1630 else
1632 new_capacity = This->visuals_capacity * 2;
1633 visuals = HeapReAlloc(GetProcessHeap(), 0, This->visuals, new_capacity * sizeof(IDirect3DRMVisual*));
1636 if (!visuals)
1637 return E_OUTOFMEMORY;
1639 This->visuals_capacity = new_capacity;
1640 This->visuals = visuals;
1643 This->visuals[This->nb_visuals++] = (IDirect3DRMVisual *)visual;
1644 IDirect3DRMVisual_AddRef(visual);
1646 return D3DRM_OK;
1649 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetChildren(IDirect3DRMFrame3 *iface, IDirect3DRMFrameArray **children)
1651 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1652 IDirect3DRMFrameArrayImpl* obj;
1653 HRESULT hr;
1655 TRACE("(%p/%p)->(%p)\n", iface, This, children);
1657 if (!children)
1658 return D3DRMERR_BADVALUE;
1660 hr = Direct3DRMFrameArray_create(children);
1662 if (hr != D3DRM_OK)
1663 return hr;
1665 obj = (IDirect3DRMFrameArrayImpl*)*children;
1667 obj->size = This->nb_children;
1668 if (This->nb_children)
1670 ULONG i;
1671 if (!(obj->frames = HeapAlloc(GetProcessHeap(), 0, This->nb_children * sizeof(*obj->frames))))
1672 return E_OUTOFMEMORY;
1673 for (i = 0; i < This->nb_children; i++)
1674 IDirect3DRMFrame3_QueryInterface(This->children[i], &IID_IDirect3DRMFrame, (void**)&obj->frames[i]);
1677 return D3DRM_OK;
1680 static D3DCOLOR WINAPI IDirect3DRMFrame3Impl_GetColor(IDirect3DRMFrame3* iface)
1682 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1684 FIXME("(%p/%p)->(): stub\n", iface, This);
1686 return 0;
1689 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetLights(IDirect3DRMFrame3 *iface, IDirect3DRMLightArray **lights)
1691 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1692 IDirect3DRMLightArrayImpl* obj;
1693 HRESULT hr;
1695 TRACE("(%p/%p)->(%p)\n", iface, This, lights);
1697 if (!lights)
1698 return D3DRMERR_BADVALUE;
1700 hr = Direct3DRMLightArray_create(lights);
1702 if (hr != D3DRM_OK)
1703 return hr;
1705 obj = (IDirect3DRMLightArrayImpl*)*lights;
1707 obj->size = This->nb_lights;
1708 if (This->nb_lights)
1710 ULONG i;
1711 if (!(obj->lights = HeapAlloc(GetProcessHeap(), 0, This->nb_lights * sizeof(*obj->lights))))
1712 return E_OUTOFMEMORY;
1713 for (i = 0; i < This->nb_lights; i++)
1714 IDirect3DRMLight_QueryInterface(This->lights[i], &IID_IDirect3DRMLight, (void**)&obj->lights[i]);
1717 return D3DRM_OK;
1720 static D3DRMMATERIALMODE WINAPI IDirect3DRMFrame3Impl_GetMaterialMode(IDirect3DRMFrame3* iface)
1722 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1724 FIXME("(%p/%p)->(): stub\n", iface, This);
1726 return D3DRMMATERIAL_FROMPARENT;
1729 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetParent(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 **frame)
1731 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1733 TRACE("(%p/%p)->(%p)\n", iface, This, frame);
1735 if (!frame)
1736 return D3DRMERR_BADVALUE;
1738 if (This->parent)
1740 *frame = &This->parent->IDirect3DRMFrame3_iface;
1741 IDirect3DRMFrame_AddRef(*frame);
1743 else
1745 *frame = NULL;
1748 return D3DRM_OK;
1751 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetPosition(IDirect3DRMFrame3 *iface,
1752 IDirect3DRMFrame3 *reference, D3DVECTOR *return_position)
1754 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1756 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, reference, return_position);
1758 return E_NOTIMPL;
1761 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetRotation(IDirect3DRMFrame3 *iface,
1762 IDirect3DRMFrame3 *reference, D3DVECTOR *axis, D3DVALUE *return_theta)
1764 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1766 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, reference, axis, return_theta);
1768 return E_NOTIMPL;
1771 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetScene(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 **scene)
1773 FIXME("iface %p, scene %p stub!\n", iface, scene);
1775 return E_NOTIMPL;
1778 static D3DRMSORTMODE WINAPI IDirect3DRMFrame3Impl_GetSortMode(IDirect3DRMFrame3* iface)
1780 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1782 FIXME("(%p/%p)->(): stub\n", iface, This);
1784 return D3DRMSORT_FROMPARENT;
1787 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetTexture(IDirect3DRMFrame3 *iface, IDirect3DRMTexture3 **texture)
1789 FIXME("iface %p, texture %p stub!\n", iface, texture);
1791 return E_NOTIMPL;
1794 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetTransform(IDirect3DRMFrame3 *iface,
1795 IDirect3DRMFrame3 *reference, D3DRMMATRIX4D return_matrix)
1797 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1799 TRACE("(%p/%p)->(%p,%p)\n", iface, This, reference, return_matrix);
1801 if (reference)
1802 FIXME("Specifying a frame as the root of the scene different from the current root frame is not supported yet\n");
1804 memcpy(return_matrix, This->transform, sizeof(D3DRMMATRIX4D));
1806 return D3DRM_OK;
1809 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetVelocity(IDirect3DRMFrame3 *iface,
1810 IDirect3DRMFrame3 *reference, D3DVECTOR *return_velocity, BOOL with_rotation)
1812 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1814 FIXME("(%p/%p)->(%p,%p,%d): stub\n", iface, This, reference, return_velocity, with_rotation);
1816 return E_NOTIMPL;
1819 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetOrientation(IDirect3DRMFrame3 *iface,
1820 IDirect3DRMFrame3 *reference, D3DVECTOR *dir, D3DVECTOR *up)
1822 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1824 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, reference, dir, up);
1826 return E_NOTIMPL;
1829 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetVisuals(IDirect3DRMFrame3 *iface,
1830 DWORD *count, IUnknown **visuals)
1832 FIXME("iface %p, count %p, visuals %p stub!\n", iface, count, visuals);
1834 return E_NOTIMPL;
1837 static HRESULT WINAPI IDirect3DRMFrame3Impl_InverseTransform(IDirect3DRMFrame3* iface,
1838 D3DVECTOR *d, D3DVECTOR *s)
1840 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1842 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, d, s);
1844 return E_NOTIMPL;
1847 static HRESULT WINAPI IDirect3DRMFrame3Impl_Load(IDirect3DRMFrame3 *iface, void *filename,
1848 void *name, D3DRMLOADOPTIONS flags, D3DRMLOADTEXTURE3CALLBACK cb, void *ctx)
1850 FIXME("iface %p, filename %p, name %p, flags %#x, cb %p, ctx %p stub!\n",
1851 iface, filename, name, flags, cb, ctx);
1853 return E_NOTIMPL;
1856 static HRESULT WINAPI IDirect3DRMFrame3Impl_LookAt(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 *target,
1857 IDirect3DRMFrame3 *reference, D3DRMFRAMECONSTRAINT constraint)
1859 FIXME("iface %p, target %p, reference %p, constraint %#x stub!\n", iface, target, reference, constraint);
1861 return E_NOTIMPL;
1864 static HRESULT WINAPI IDirect3DRMFrame3Impl_Move(IDirect3DRMFrame3* iface, D3DVALUE delta)
1866 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1868 FIXME("(%p/%p)->(%f): stub\n", iface, This, delta);
1870 return E_NOTIMPL;
1873 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteChild(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 *frame)
1875 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1876 IDirect3DRMFrameImpl *frame_obj = unsafe_impl_from_IDirect3DRMFrame3(frame);
1877 ULONG i;
1879 TRACE("(%p/%p)->(%p)\n", iface, This, frame);
1881 if (!frame_obj)
1882 return D3DRMERR_BADOBJECT;
1884 /* Check if child exists */
1885 for (i = 0; i < This->nb_children; i++)
1886 if (This->children[i] == frame)
1887 break;
1889 if (i == This->nb_children)
1890 return D3DRMERR_BADVALUE;
1892 memmove(This->children + i, This->children + i + 1, sizeof(IDirect3DRMFrame3*) * (This->nb_children - 1 - i));
1893 IDirect3DRMFrame3_Release(frame);
1894 frame_obj->parent = NULL;
1895 This->nb_children--;
1897 return D3DRM_OK;
1900 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteLight(IDirect3DRMFrame3 *iface, IDirect3DRMLight *light)
1902 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1903 ULONG i;
1905 TRACE("(%p/%p)->(%p)\n", iface, This, light);
1907 if (!light)
1908 return D3DRMERR_BADOBJECT;
1910 /* Check if visual exists */
1911 for (i = 0; i < This->nb_lights; i++)
1912 if (This->lights[i] == light)
1913 break;
1915 if (i == This->nb_lights)
1916 return D3DRMERR_BADVALUE;
1918 memmove(This->lights + i, This->lights + i + 1, sizeof(IDirect3DRMLight*) * (This->nb_lights - 1 - i));
1919 IDirect3DRMLight_Release(light);
1920 This->nb_lights--;
1922 return D3DRM_OK;
1925 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteMoveCallback(IDirect3DRMFrame3* iface,
1926 D3DRMFRAME3MOVECALLBACK cb,
1927 VOID *arg)
1929 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1931 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, cb, arg);
1933 return E_NOTIMPL;
1936 static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteVisual(IDirect3DRMFrame3 *iface, IUnknown *visual)
1938 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1939 ULONG i;
1941 TRACE("iface %p, visual %p.\n", iface, visual);
1943 if (!visual)
1944 return D3DRMERR_BADOBJECT;
1946 /* Check if visual exists */
1947 for (i = 0; i < This->nb_visuals; i++)
1948 if (This->visuals[i] == (IDirect3DRMVisual *)visual)
1949 break;
1951 if (i == This->nb_visuals)
1952 return D3DRMERR_BADVALUE;
1954 memmove(This->visuals + i, This->visuals + i + 1, sizeof(IDirect3DRMVisual*) * (This->nb_visuals - 1 - i));
1955 IDirect3DRMVisual_Release(visual);
1956 This->nb_visuals--;
1958 return D3DRM_OK;
1961 static D3DCOLOR WINAPI IDirect3DRMFrame3Impl_GetSceneBackground(IDirect3DRMFrame3* iface)
1963 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1965 TRACE("(%p/%p)->()\n", iface, This);
1967 return This->scenebackground;
1970 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetSceneBackgroundDepth(IDirect3DRMFrame3 *iface,
1971 IDirectDrawSurface **surface)
1973 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1975 FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
1977 return E_NOTIMPL;
1980 static D3DCOLOR WINAPI IDirect3DRMFrame3Impl_GetSceneFogColor(IDirect3DRMFrame3* iface)
1982 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1984 FIXME("(%p/%p)->(): stub\n", iface, This);
1986 return 0;
1989 static BOOL WINAPI IDirect3DRMFrame3Impl_GetSceneFogEnable(IDirect3DRMFrame3* iface)
1991 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
1993 FIXME("(%p/%p)->(): stub\n", iface, This);
1995 return FALSE;
1998 static D3DRMFOGMODE WINAPI IDirect3DRMFrame3Impl_GetSceneFogMode(IDirect3DRMFrame3* iface)
2000 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2002 FIXME("(%p/%p)->(): stub\n", iface, This);
2004 return D3DRMFOG_LINEAR;
2007 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetSceneFogParams(IDirect3DRMFrame3* iface,
2008 D3DVALUE *return_start,
2009 D3DVALUE *return_end,
2010 D3DVALUE *return_density)
2012 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2014 FIXME("(%p/%p)->(%p,%p,%p): stub\n", iface, This, return_start, return_end, return_density);
2016 return E_NOTIMPL;
2019 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackground(IDirect3DRMFrame3* iface,
2020 D3DCOLOR color)
2022 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2024 TRACE("(%p/%p)->(%u)\n", iface, This, color);
2026 This->scenebackground = color;
2028 return D3DRM_OK;
2031 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackgroundRGB(IDirect3DRMFrame3* iface,
2032 D3DVALUE red, D3DVALUE green,
2033 D3DVALUE blue)
2035 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2037 TRACE("(%p/%p)->(%f,%f,%f)\n", iface, This, red, green, blue);
2039 This->scenebackground = RGBA_MAKE((BYTE)(red * 255.0f),
2040 (BYTE)(green * 255.0f), (BYTE)(blue * 255.0f), 0xff);
2042 return D3DRM_OK;
2045 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackgroundDepth(IDirect3DRMFrame3 *iface,
2046 IDirectDrawSurface *surface)
2048 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2050 FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
2052 return E_NOTIMPL;
2055 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneBackgroundImage(IDirect3DRMFrame3 *iface,
2056 IDirect3DRMTexture3 *texture)
2058 FIXME("iface %p, texture %p stub!\n", iface, texture);
2060 return E_NOTIMPL;
2063 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogEnable(IDirect3DRMFrame3* iface, BOOL enable)
2065 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2067 FIXME("(%p/%p)->(%d): stub\n", iface, This, enable);
2069 return E_NOTIMPL;
2072 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogColor(IDirect3DRMFrame3* iface,
2073 D3DCOLOR color)
2075 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2077 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
2079 return E_NOTIMPL;
2082 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogMode(IDirect3DRMFrame3* iface,
2083 D3DRMFOGMODE mode)
2085 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2087 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
2089 return E_NOTIMPL;
2092 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogParams(IDirect3DRMFrame3* iface,
2093 D3DVALUE start, D3DVALUE end,
2094 D3DVALUE density)
2096 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2098 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, start, end, density);
2100 return E_NOTIMPL;
2103 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetColor(IDirect3DRMFrame3* iface, D3DCOLOR color)
2105 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2107 FIXME("(%p/%p)->(%u): stub\n", iface, This, color);
2109 return E_NOTIMPL;
2112 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetColorRGB(IDirect3DRMFrame3* iface, D3DVALUE red,
2113 D3DVALUE green, D3DVALUE blue)
2115 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2117 FIXME("(%p/%p)->(%f,%f,%f): stub\n", iface, This, red, green, blue);
2119 return E_NOTIMPL;
2122 static D3DRMZBUFFERMODE WINAPI IDirect3DRMFrame3Impl_GetZbufferMode(IDirect3DRMFrame3* iface)
2124 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2126 FIXME("(%p/%p)->(): stub\n", iface, This);
2128 return D3DRMZBUFFER_FROMPARENT;
2131 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetMaterialMode(IDirect3DRMFrame3* iface,
2132 D3DRMMATERIALMODE mode)
2134 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2136 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
2138 return E_NOTIMPL;
2141 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetOrientation(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 *reference,
2142 D3DVALUE dx, D3DVALUE dy, D3DVALUE dz, D3DVALUE ux, D3DVALUE uy, D3DVALUE uz)
2144 FIXME("iface %p, reference %p, dx %.8e, dy %.8e, dz %.8e, ux %.8e, uy %.8e, uz %.8e stub!\n",
2145 iface, reference, dx, dy, dz, ux, uy, uz);
2147 return E_NOTIMPL;
2150 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetPosition(IDirect3DRMFrame3 *iface,
2151 IDirect3DRMFrame3 *reference, D3DVALUE x, D3DVALUE y, D3DVALUE z)
2153 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e stub!\n", iface, reference, x, y, z);
2155 return E_NOTIMPL;
2158 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetRotation(IDirect3DRMFrame3 *iface,
2159 IDirect3DRMFrame3 *reference, D3DVALUE x, D3DVALUE y, D3DVALUE z, D3DVALUE theta)
2161 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e, theta %.8e stub!\n",
2162 iface, reference, x, y, z, theta);
2164 return E_NOTIMPL;
2167 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSortMode(IDirect3DRMFrame3* iface,
2168 D3DRMSORTMODE mode)
2170 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2172 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
2174 return E_NOTIMPL;
2177 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetTexture(IDirect3DRMFrame3 *iface, IDirect3DRMTexture3 *texture)
2179 FIXME("iface %p, texture %p stub!\n", iface, texture);
2181 return E_NOTIMPL;
2184 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetVelocity(IDirect3DRMFrame3 *iface,
2185 IDirect3DRMFrame3 *reference, D3DVALUE x, D3DVALUE y, D3DVALUE z, BOOL with_rotation)
2187 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e, with_rotation %#x.\n",
2188 iface, reference, x, y, z, with_rotation);
2190 return E_NOTIMPL;
2193 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetZbufferMode(IDirect3DRMFrame3* iface,
2194 D3DRMZBUFFERMODE mode)
2196 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2198 FIXME("(%p/%p)->(%u): stub\n", iface, This, mode);
2200 return E_NOTIMPL;
2203 static HRESULT WINAPI IDirect3DRMFrame3Impl_Transform(IDirect3DRMFrame3* iface, D3DVECTOR *d,
2204 D3DVECTOR *s)
2206 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2208 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, d, s);
2210 return E_NOTIMPL;
2213 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetBox(IDirect3DRMFrame3 *iface, D3DRMBOX *box)
2215 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2217 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
2219 return E_NOTIMPL;
2222 static BOOL WINAPI IDirect3DRMFrame3Impl_GetBoxEnable(IDirect3DRMFrame3* iface)
2224 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2226 FIXME("(%p/%p)->(): stub\n", iface, This);
2228 return E_NOTIMPL;
2231 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetAxes(IDirect3DRMFrame3 *iface, D3DVECTOR *dir, D3DVECTOR *up)
2233 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2235 FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, dir, up);
2237 return E_NOTIMPL;
2240 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetMaterial(IDirect3DRMFrame3 *iface, IDirect3DRMMaterial2 **material)
2242 FIXME("iface %p, material %p stub!\n", iface, material);
2244 return E_NOTIMPL;
2247 static BOOL WINAPI IDirect3DRMFrame3Impl_GetInheritAxes(IDirect3DRMFrame3* iface)
2249 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2251 FIXME("(%p/%p)->(): stub\n", iface, This);
2253 return E_NOTIMPL;
2256 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetHierarchyBox(IDirect3DRMFrame3* iface, D3DRMBOX *box)
2258 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2260 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
2262 return E_NOTIMPL;
2265 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetBox(IDirect3DRMFrame3 *iface, D3DRMBOX *box)
2267 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2269 FIXME("(%p/%p)->(%p): stub\n", iface, This, box);
2271 return E_NOTIMPL;
2274 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetBoxEnable(IDirect3DRMFrame3* iface, BOOL enable)
2276 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2278 FIXME("(%p/%p)->(%u): stub\n", iface, This, enable);
2280 return E_NOTIMPL;
2283 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetAxes(IDirect3DRMFrame3* iface,
2284 D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
2285 D3DVALUE ux, D3DVALUE uy, D3DVALUE uz)
2287 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2289 FIXME("(%p/%p)->(%f,%f,%f,%f,%f,%f): stub\n", iface, This, dx, dy, dz, ux, uy, uz);
2291 return E_NOTIMPL;
2294 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetInheritAxes(IDirect3DRMFrame3* iface,
2295 BOOL inherit_from_parent)
2297 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2299 FIXME("(%p/%p)->(%u): stub\n", iface, This, inherit_from_parent);
2301 return E_NOTIMPL;
2304 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetMaterial(IDirect3DRMFrame3 *iface, IDirect3DRMMaterial2 *material)
2306 FIXME("iface %p, material %p stub!\n", iface, material);
2308 return E_NOTIMPL;
2311 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetQuaternion(IDirect3DRMFrame3 *iface,
2312 IDirect3DRMFrame3 *reference, D3DRMQUATERNION *q)
2314 FIXME("iface %p, reference %p, q %p stub!\n", iface, reference, q);
2316 return E_NOTIMPL;
2319 static HRESULT WINAPI IDirect3DRMFrame3Impl_RayPick(IDirect3DRMFrame3 *iface, IDirect3DRMFrame3 *reference,
2320 D3DRMRAY *ray, DWORD flags, IDirect3DRMPicked2Array **return_visuals)
2322 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2324 FIXME("(%p/%p)->(%p,%p,%u,%p): stub\n", iface, This, reference, ray, flags, return_visuals);
2326 return E_NOTIMPL;
2329 static HRESULT WINAPI IDirect3DRMFrame3Impl_Save(IDirect3DRMFrame3 *iface,
2330 const char *filename, D3DRMXOFFORMAT format, D3DRMSAVEOPTIONS flags)
2332 FIXME("iface %p, filename %s, format %#x, flags %#x stub!\n",
2333 iface, debugstr_a(filename), format, flags);
2335 return E_NOTIMPL;
2338 static HRESULT WINAPI IDirect3DRMFrame3Impl_TransformVectors(IDirect3DRMFrame3 *iface,
2339 IDirect3DRMFrame3 *reference, DWORD num, D3DVECTOR *dst, D3DVECTOR *src)
2341 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2343 FIXME("(%p/%p)->(%p,%u,%p,%p): stub\n", iface, This, reference, num, dst, src);
2345 return E_NOTIMPL;
2348 static HRESULT WINAPI IDirect3DRMFrame3Impl_InverseTransformVectors(IDirect3DRMFrame3 *iface,
2349 IDirect3DRMFrame3 *reference, DWORD num, D3DVECTOR *dst, D3DVECTOR *src)
2351 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2353 FIXME("(%p/%p)->(%p,%u,%p,%p): stub\n", iface, This, reference, num, dst, src);
2355 return E_NOTIMPL;
2358 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetTraversalOptions(IDirect3DRMFrame3* iface,
2359 DWORD flags)
2361 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2363 FIXME("(%p/%p)->(%u): stub\n", iface, This, flags);
2365 return E_NOTIMPL;
2368 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetTraversalOptions(IDirect3DRMFrame3 *iface, DWORD *flags)
2370 FIXME("iface %p, flags %p stub!\n", iface, flags);
2372 return E_NOTIMPL;
2375 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetSceneFogMethod(IDirect3DRMFrame3* iface,
2376 DWORD flags)
2378 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2380 FIXME("(%p/%p)->(%u): stub\n", iface, This, flags);
2382 return E_NOTIMPL;
2385 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetSceneFogMethod(IDirect3DRMFrame3 *iface, DWORD *fog_mode)
2387 FIXME("iface %p, fogmode %p stub!\n", iface, fog_mode);
2389 return E_NOTIMPL;
2392 static HRESULT WINAPI IDirect3DRMFrame3Impl_SetMaterialOverride(IDirect3DRMFrame3 *iface,
2393 D3DRMMATERIALOVERRIDE *override)
2395 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2397 FIXME("(%p/%p)->(%p): stub\n", iface, This, override);
2399 return E_NOTIMPL;
2402 static HRESULT WINAPI IDirect3DRMFrame3Impl_GetMaterialOverride(IDirect3DRMFrame3 *iface,
2403 D3DRMMATERIALOVERRIDE *override)
2405 IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
2407 FIXME("(%p/%p)->(%p): stub\n", iface, This, override);
2409 return E_NOTIMPL;
2412 static const struct IDirect3DRMFrame3Vtbl Direct3DRMFrame3_Vtbl =
2414 /*** IUnknown methods ***/
2415 IDirect3DRMFrame3Impl_QueryInterface,
2416 IDirect3DRMFrame3Impl_AddRef,
2417 IDirect3DRMFrame3Impl_Release,
2418 /*** IDirect3DRMObject methods ***/
2419 IDirect3DRMFrame3Impl_Clone,
2420 IDirect3DRMFrame3Impl_AddDestroyCallback,
2421 IDirect3DRMFrame3Impl_DeleteDestroyCallback,
2422 IDirect3DRMFrame3Impl_SetAppData,
2423 IDirect3DRMFrame3Impl_GetAppData,
2424 IDirect3DRMFrame3Impl_SetName,
2425 IDirect3DRMFrame3Impl_GetName,
2426 IDirect3DRMFrame3Impl_GetClassName,
2427 /*** IDirect3DRMFrame3 methods ***/
2428 IDirect3DRMFrame3Impl_AddChild,
2429 IDirect3DRMFrame3Impl_AddLight,
2430 IDirect3DRMFrame3Impl_AddMoveCallback,
2431 IDirect3DRMFrame3Impl_AddTransform,
2432 IDirect3DRMFrame3Impl_AddTranslation,
2433 IDirect3DRMFrame3Impl_AddScale,
2434 IDirect3DRMFrame3Impl_AddRotation,
2435 IDirect3DRMFrame3Impl_AddVisual,
2436 IDirect3DRMFrame3Impl_GetChildren,
2437 IDirect3DRMFrame3Impl_GetColor,
2438 IDirect3DRMFrame3Impl_GetLights,
2439 IDirect3DRMFrame3Impl_GetMaterialMode,
2440 IDirect3DRMFrame3Impl_GetParent,
2441 IDirect3DRMFrame3Impl_GetPosition,
2442 IDirect3DRMFrame3Impl_GetRotation,
2443 IDirect3DRMFrame3Impl_GetScene,
2444 IDirect3DRMFrame3Impl_GetSortMode,
2445 IDirect3DRMFrame3Impl_GetTexture,
2446 IDirect3DRMFrame3Impl_GetTransform,
2447 IDirect3DRMFrame3Impl_GetVelocity,
2448 IDirect3DRMFrame3Impl_GetOrientation,
2449 IDirect3DRMFrame3Impl_GetVisuals,
2450 IDirect3DRMFrame3Impl_InverseTransform,
2451 IDirect3DRMFrame3Impl_Load,
2452 IDirect3DRMFrame3Impl_LookAt,
2453 IDirect3DRMFrame3Impl_Move,
2454 IDirect3DRMFrame3Impl_DeleteChild,
2455 IDirect3DRMFrame3Impl_DeleteLight,
2456 IDirect3DRMFrame3Impl_DeleteMoveCallback,
2457 IDirect3DRMFrame3Impl_DeleteVisual,
2458 IDirect3DRMFrame3Impl_GetSceneBackground,
2459 IDirect3DRMFrame3Impl_GetSceneBackgroundDepth,
2460 IDirect3DRMFrame3Impl_GetSceneFogColor,
2461 IDirect3DRMFrame3Impl_GetSceneFogEnable,
2462 IDirect3DRMFrame3Impl_GetSceneFogMode,
2463 IDirect3DRMFrame3Impl_GetSceneFogParams,
2464 IDirect3DRMFrame3Impl_SetSceneBackground,
2465 IDirect3DRMFrame3Impl_SetSceneBackgroundRGB,
2466 IDirect3DRMFrame3Impl_SetSceneBackgroundDepth,
2467 IDirect3DRMFrame3Impl_SetSceneBackgroundImage,
2468 IDirect3DRMFrame3Impl_SetSceneFogEnable,
2469 IDirect3DRMFrame3Impl_SetSceneFogColor,
2470 IDirect3DRMFrame3Impl_SetSceneFogMode,
2471 IDirect3DRMFrame3Impl_SetSceneFogParams,
2472 IDirect3DRMFrame3Impl_SetColor,
2473 IDirect3DRMFrame3Impl_SetColorRGB,
2474 IDirect3DRMFrame3Impl_GetZbufferMode,
2475 IDirect3DRMFrame3Impl_SetMaterialMode,
2476 IDirect3DRMFrame3Impl_SetOrientation,
2477 IDirect3DRMFrame3Impl_SetPosition,
2478 IDirect3DRMFrame3Impl_SetRotation,
2479 IDirect3DRMFrame3Impl_SetSortMode,
2480 IDirect3DRMFrame3Impl_SetTexture,
2481 IDirect3DRMFrame3Impl_SetVelocity,
2482 IDirect3DRMFrame3Impl_SetZbufferMode,
2483 IDirect3DRMFrame3Impl_Transform,
2484 IDirect3DRMFrame3Impl_GetBox,
2485 IDirect3DRMFrame3Impl_GetBoxEnable,
2486 IDirect3DRMFrame3Impl_GetAxes,
2487 IDirect3DRMFrame3Impl_GetMaterial,
2488 IDirect3DRMFrame3Impl_GetInheritAxes,
2489 IDirect3DRMFrame3Impl_GetHierarchyBox,
2490 IDirect3DRMFrame3Impl_SetBox,
2491 IDirect3DRMFrame3Impl_SetBoxEnable,
2492 IDirect3DRMFrame3Impl_SetAxes,
2493 IDirect3DRMFrame3Impl_SetInheritAxes,
2494 IDirect3DRMFrame3Impl_SetMaterial,
2495 IDirect3DRMFrame3Impl_SetQuaternion,
2496 IDirect3DRMFrame3Impl_RayPick,
2497 IDirect3DRMFrame3Impl_Save,
2498 IDirect3DRMFrame3Impl_TransformVectors,
2499 IDirect3DRMFrame3Impl_InverseTransformVectors,
2500 IDirect3DRMFrame3Impl_SetTraversalOptions,
2501 IDirect3DRMFrame3Impl_GetTraversalOptions,
2502 IDirect3DRMFrame3Impl_SetSceneFogMethod,
2503 IDirect3DRMFrame3Impl_GetSceneFogMethod,
2504 IDirect3DRMFrame3Impl_SetMaterialOverride,
2505 IDirect3DRMFrame3Impl_GetMaterialOverride
2508 static inline IDirect3DRMFrameImpl *unsafe_impl_from_IDirect3DRMFrame3(IDirect3DRMFrame3 *iface)
2510 if (!iface)
2511 return NULL;
2512 assert(iface->lpVtbl == &Direct3DRMFrame3_Vtbl);
2514 return impl_from_IDirect3DRMFrame3(iface);
2517 HRESULT Direct3DRMFrame_create(REFIID riid, IUnknown* parent, IUnknown** ret_iface)
2519 IDirect3DRMFrameImpl* object;
2520 HRESULT hr;
2522 TRACE("(%s, %p, %p)\n", wine_dbgstr_guid(riid), parent, ret_iface);
2524 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMFrameImpl));
2525 if (!object)
2526 return E_OUTOFMEMORY;
2528 object->IDirect3DRMFrame2_iface.lpVtbl = &Direct3DRMFrame2_Vtbl;
2529 object->IDirect3DRMFrame3_iface.lpVtbl = &Direct3DRMFrame3_Vtbl;
2530 object->ref = 1;
2531 object->scenebackground = RGBA_MAKE(0, 0, 0, 0xff);
2533 memcpy(object->transform, identity, sizeof(D3DRMMATRIX4D));
2535 if (parent)
2537 IDirect3DRMFrame3 *p;
2539 hr = IDirect3DRMFrame_QueryInterface(parent, &IID_IDirect3DRMFrame3, (void**)&p);
2540 if (hr != S_OK)
2542 HeapFree(GetProcessHeap(), 0, object);
2543 return hr;
2545 IDirect3DRMFrame_Release(parent);
2546 IDirect3DRMFrame3_AddChild(p, &object->IDirect3DRMFrame3_iface);
2549 hr = IDirect3DRMFrame3_QueryInterface(&object->IDirect3DRMFrame3_iface, riid, (void**)ret_iface);
2550 IDirect3DRMFrame3_Release(&object->IDirect3DRMFrame3_iface);
2551 return S_OK;