2 * Implementation of IDirect3DRMFrame Interface
4 * Copyright 2011, 2012 André Hentschel
5 * Copyright 2012 Christian Costa
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
23 #include "wine/port.h"
25 #include "d3drm_private.h"
27 WINE_DEFAULT_DEBUG_CHANNEL(d3drm
);
29 static D3DRMMATRIX4D identity
= {
30 { 1.0f
, 0.0f
, 0.0f
, 0.0f
},
31 { 0.0f
, 1.0f
, 0.0f
, 0.0f
},
32 { 0.0f
, 0.0f
, 1.0f
, 0.0f
},
33 { 0.0f
, 0.0f
, 0.0f
, 1.0f
}
36 struct d3drm_frame_array
38 IDirect3DRMFrameArray IDirect3DRMFrameArray_iface
;
41 IDirect3DRMFrame
**frames
;
44 struct d3drm_visual_array
46 IDirect3DRMVisualArray IDirect3DRMVisualArray_iface
;
49 IDirect3DRMVisual
**visuals
;
52 struct d3drm_light_array
54 IDirect3DRMLightArray IDirect3DRMLightArray_iface
;
57 IDirect3DRMLight
**lights
;
60 static inline struct d3drm_frame
*impl_from_IDirect3DRMFrame(IDirect3DRMFrame
*iface
)
62 return CONTAINING_RECORD(iface
, struct d3drm_frame
, IDirect3DRMFrame_iface
);
65 static inline struct d3drm_frame
*impl_from_IDirect3DRMFrame2(IDirect3DRMFrame2
*iface
)
67 return CONTAINING_RECORD(iface
, struct d3drm_frame
, IDirect3DRMFrame2_iface
);
70 static inline struct d3drm_frame
*impl_from_IDirect3DRMFrame3(IDirect3DRMFrame3
*iface
)
72 return CONTAINING_RECORD(iface
, struct d3drm_frame
, IDirect3DRMFrame3_iface
);
75 static inline struct d3drm_frame
*unsafe_impl_from_IDirect3DRMFrame3(IDirect3DRMFrame3
*iface
);
77 static inline struct d3drm_frame_array
*impl_from_IDirect3DRMFrameArray(IDirect3DRMFrameArray
*iface
)
79 return CONTAINING_RECORD(iface
, struct d3drm_frame_array
, IDirect3DRMFrameArray_iface
);
82 static inline struct d3drm_visual_array
*impl_from_IDirect3DRMVisualArray(IDirect3DRMVisualArray
*iface
)
84 return CONTAINING_RECORD(iface
, struct d3drm_visual_array
, IDirect3DRMVisualArray_iface
);
87 static inline struct d3drm_light_array
*impl_from_IDirect3DRMLightArray(IDirect3DRMLightArray
*iface
)
89 return CONTAINING_RECORD(iface
, struct d3drm_light_array
, IDirect3DRMLightArray_iface
);
92 static HRESULT WINAPI
d3drm_frame_array_QueryInterface(IDirect3DRMFrameArray
*iface
, REFIID riid
, void **out
)
94 TRACE("iface %p, riid %s, out %p.\n", iface
, debugstr_guid(riid
), out
);
96 if (IsEqualGUID(riid
, &IID_IDirect3DRMFrameArray
)
97 || IsEqualGUID(riid
, &IID_IUnknown
))
99 IDirect3DRMFrameArray_AddRef(iface
);
104 WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid
));
107 return E_NOINTERFACE
;
110 static ULONG WINAPI
d3drm_frame_array_AddRef(IDirect3DRMFrameArray
*iface
)
112 struct d3drm_frame_array
*array
= impl_from_IDirect3DRMFrameArray(iface
);
113 ULONG refcount
= InterlockedIncrement(&array
->ref
);
115 TRACE("%p increasing refcount to %u.\n", iface
, refcount
);
120 static ULONG WINAPI
d3drm_frame_array_Release(IDirect3DRMFrameArray
*iface
)
122 struct d3drm_frame_array
*array
= impl_from_IDirect3DRMFrameArray(iface
);
123 ULONG refcount
= InterlockedDecrement(&array
->ref
);
126 TRACE("%p decreasing refcount to %u.\n", iface
, refcount
);
130 for (i
= 0; i
< array
->size
; ++i
)
132 IDirect3DRMFrame_Release(array
->frames
[i
]);
134 HeapFree(GetProcessHeap(), 0, array
->frames
);
135 HeapFree(GetProcessHeap(), 0, array
);
141 static DWORD WINAPI
d3drm_frame_array_GetSize(IDirect3DRMFrameArray
*iface
)
143 struct d3drm_frame_array
*array
= impl_from_IDirect3DRMFrameArray(iface
);
145 TRACE("iface %p.\n", iface
);
150 static HRESULT WINAPI
d3drm_frame_array_GetElement(IDirect3DRMFrameArray
*iface
,
151 DWORD index
, IDirect3DRMFrame
**frame
)
153 struct d3drm_frame_array
*array
= impl_from_IDirect3DRMFrameArray(iface
);
155 TRACE("iface %p, index %u, frame %p.\n", iface
, index
, frame
);
158 return D3DRMERR_BADVALUE
;
160 if (index
>= array
->size
)
163 return D3DRMERR_BADVALUE
;
166 IDirect3DRMFrame_AddRef(array
->frames
[index
]);
167 *frame
= array
->frames
[index
];
172 static const struct IDirect3DRMFrameArrayVtbl d3drm_frame_array_vtbl
=
174 d3drm_frame_array_QueryInterface
,
175 d3drm_frame_array_AddRef
,
176 d3drm_frame_array_Release
,
177 d3drm_frame_array_GetSize
,
178 d3drm_frame_array_GetElement
,
181 static struct d3drm_frame_array
*d3drm_frame_array_create(unsigned int frame_count
, IDirect3DRMFrame3
**frames
)
183 struct d3drm_frame_array
*array
;
186 if (!(array
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(*array
))))
189 array
->IDirect3DRMFrameArray_iface
.lpVtbl
= &d3drm_frame_array_vtbl
;
191 array
->size
= frame_count
;
195 if (!(array
->frames
= HeapAlloc(GetProcessHeap(), 0, frame_count
* sizeof(*array
->frames
))))
197 HeapFree(GetProcessHeap(), 0, array
);
201 for (i
= 0; i
< frame_count
; ++i
)
203 IDirect3DRMFrame3_QueryInterface(frames
[i
], &IID_IDirect3DRMFrame
, (void **)&array
->frames
[i
]);
210 static HRESULT WINAPI
d3drm_visual_array_QueryInterface(IDirect3DRMVisualArray
*iface
, REFIID riid
, void **out
)
212 TRACE("iface %p, riid %s, out %p.\n", iface
, debugstr_guid(riid
), out
);
214 if (IsEqualGUID(riid
, &IID_IDirect3DRMVisualArray
)
215 || IsEqualGUID(riid
, &IID_IUnknown
))
217 IDirect3DRMVisualArray_AddRef(iface
);
222 WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid
));
225 return E_NOINTERFACE
;
228 static ULONG WINAPI
d3drm_visual_array_AddRef(IDirect3DRMVisualArray
*iface
)
230 struct d3drm_visual_array
*array
= impl_from_IDirect3DRMVisualArray(iface
);
231 ULONG refcount
= InterlockedIncrement(&array
->ref
);
233 TRACE("%p increasing refcount to %u.\n", iface
, refcount
);
238 static ULONG WINAPI
d3drm_visual_array_Release(IDirect3DRMVisualArray
*iface
)
240 struct d3drm_visual_array
*array
= impl_from_IDirect3DRMVisualArray(iface
);
241 ULONG refcount
= InterlockedDecrement(&array
->ref
);
244 TRACE("%p decreasing refcount to %u.\n", iface
, refcount
);
248 for (i
= 0; i
< array
->size
; ++i
)
250 IDirect3DRMVisual_Release(array
->visuals
[i
]);
252 HeapFree(GetProcessHeap(), 0, array
->visuals
);
253 HeapFree(GetProcessHeap(), 0, array
);
259 static DWORD WINAPI
d3drm_visual_array_GetSize(IDirect3DRMVisualArray
*iface
)
261 struct d3drm_visual_array
*array
= impl_from_IDirect3DRMVisualArray(iface
);
263 TRACE("iface %p.\n", iface
);
268 static HRESULT WINAPI
d3drm_visual_array_GetElement(IDirect3DRMVisualArray
*iface
,
269 DWORD index
, IDirect3DRMVisual
**visual
)
271 struct d3drm_visual_array
*array
= impl_from_IDirect3DRMVisualArray(iface
);
273 TRACE("iface %p, index %u, visual %p.\n", iface
, index
, visual
);
276 return D3DRMERR_BADVALUE
;
278 if (index
>= array
->size
)
281 return D3DRMERR_BADVALUE
;
284 IDirect3DRMVisual_AddRef(array
->visuals
[index
]);
285 *visual
= array
->visuals
[index
];
290 static const struct IDirect3DRMVisualArrayVtbl d3drm_visual_array_vtbl
=
292 d3drm_visual_array_QueryInterface
,
293 d3drm_visual_array_AddRef
,
294 d3drm_visual_array_Release
,
295 d3drm_visual_array_GetSize
,
296 d3drm_visual_array_GetElement
,
299 static struct d3drm_visual_array
*d3drm_visual_array_create(unsigned int visual_count
, IDirect3DRMVisual
**visuals
)
301 struct d3drm_visual_array
*array
;
304 if (!(array
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(*array
))))
307 array
->IDirect3DRMVisualArray_iface
.lpVtbl
= &d3drm_visual_array_vtbl
;
309 array
->size
= visual_count
;
313 if (!(array
->visuals
= HeapAlloc(GetProcessHeap(), 0, visual_count
* sizeof(*array
->visuals
))))
315 HeapFree(GetProcessHeap(), 0, array
);
319 for (i
= 0; i
< visual_count
; ++i
)
321 array
->visuals
[i
] = visuals
[i
];
322 IDirect3DRMVisual_AddRef(array
->visuals
[i
]);
329 static HRESULT WINAPI
d3drm_light_array_QueryInterface(IDirect3DRMLightArray
*iface
, REFIID riid
, void **out
)
331 TRACE("iface %p, riid %s, out %p.\n", iface
, debugstr_guid(riid
), out
);
333 if (IsEqualGUID(riid
, &IID_IDirect3DRMLightArray
)
334 || IsEqualGUID(riid
, &IID_IUnknown
))
336 IDirect3DRMLightArray_AddRef(iface
);
341 WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid
));
344 return E_NOINTERFACE
;
347 static ULONG WINAPI
d3drm_light_array_AddRef(IDirect3DRMLightArray
*iface
)
349 struct d3drm_light_array
*array
= impl_from_IDirect3DRMLightArray(iface
);
350 ULONG refcount
= InterlockedIncrement(&array
->ref
);
352 TRACE("%p increasing refcount to %u.\n", iface
, refcount
);
357 static ULONG WINAPI
d3drm_light_array_Release(IDirect3DRMLightArray
*iface
)
359 struct d3drm_light_array
*array
= impl_from_IDirect3DRMLightArray(iface
);
360 ULONG refcount
= InterlockedDecrement(&array
->ref
);
363 TRACE("%p decreasing refcount to %u.\n", iface
, refcount
);
367 for (i
= 0; i
< array
->size
; ++i
)
369 IDirect3DRMLight_Release(array
->lights
[i
]);
371 HeapFree(GetProcessHeap(), 0, array
->lights
);
372 HeapFree(GetProcessHeap(), 0, array
);
378 static DWORD WINAPI
d3drm_light_array_GetSize(IDirect3DRMLightArray
*iface
)
380 struct d3drm_light_array
*array
= impl_from_IDirect3DRMLightArray(iface
);
382 TRACE("iface %p.\n", iface
);
387 static HRESULT WINAPI
d3drm_light_array_GetElement(IDirect3DRMLightArray
*iface
,
388 DWORD index
, IDirect3DRMLight
**light
)
390 struct d3drm_light_array
*array
= impl_from_IDirect3DRMLightArray(iface
);
392 TRACE("iface %p, index %u, light %p.\n", iface
, index
, light
);
395 return D3DRMERR_BADVALUE
;
397 if (index
>= array
->size
)
400 return D3DRMERR_BADVALUE
;
403 IDirect3DRMLight_AddRef(array
->lights
[index
]);
404 *light
= array
->lights
[index
];
409 static const struct IDirect3DRMLightArrayVtbl d3drm_light_array_vtbl
=
411 d3drm_light_array_QueryInterface
,
412 d3drm_light_array_AddRef
,
413 d3drm_light_array_Release
,
414 d3drm_light_array_GetSize
,
415 d3drm_light_array_GetElement
,
418 static struct d3drm_light_array
*d3drm_light_array_create(unsigned int light_count
, IDirect3DRMLight
**lights
)
420 struct d3drm_light_array
*array
;
423 if (!(array
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(*array
))))
426 array
->IDirect3DRMLightArray_iface
.lpVtbl
= &d3drm_light_array_vtbl
;
428 array
->size
= light_count
;
432 if (!(array
->lights
= HeapAlloc(GetProcessHeap(), 0, light_count
* sizeof(*array
->lights
))))
434 HeapFree(GetProcessHeap(), 0, array
);
438 for (i
= 0; i
< light_count
; ++i
)
440 array
->lights
[i
] = lights
[i
];
441 IDirect3DRMLight_AddRef(array
->lights
[i
]);
448 static HRESULT WINAPI
d3drm_frame3_QueryInterface(IDirect3DRMFrame3
*iface
, REFIID riid
, void **out
)
450 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame3(iface
);
452 TRACE("iface %p, riid %s, out %p.\n", iface
, debugstr_guid(riid
), out
);
454 if (IsEqualGUID(riid
, &IID_IDirect3DRMFrame
)
455 || IsEqualGUID(riid
, &IID_IDirect3DRMObject
)
456 || IsEqualGUID(riid
, &IID_IDirect3DRMVisual
)
457 || IsEqualGUID(riid
, &IID_IUnknown
))
459 *out
= &frame
->IDirect3DRMFrame_iface
;
461 else if (IsEqualGUID(riid
, &IID_IDirect3DRMFrame2
))
463 *out
= &frame
->IDirect3DRMFrame2_iface
;
465 else if (IsEqualGUID(riid
, &IID_IDirect3DRMFrame3
))
467 *out
= &frame
->IDirect3DRMFrame3_iface
;
472 WARN("%s not implemented, returning CLASS_E_CLASSNOTAVAILABLE.\n", debugstr_guid(riid
));
473 return CLASS_E_CLASSNOTAVAILABLE
;
476 IUnknown_AddRef((IUnknown
*)*out
);
480 static HRESULT WINAPI
d3drm_frame2_QueryInterface(IDirect3DRMFrame2
*iface
, REFIID riid
, void **out
)
482 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
484 TRACE("iface %p, riid %s, out %p.\n", iface
, debugstr_guid(riid
), out
);
486 return d3drm_frame3_QueryInterface(&frame
->IDirect3DRMFrame3_iface
, riid
, out
);
489 static HRESULT WINAPI
d3drm_frame1_QueryInterface(IDirect3DRMFrame
*iface
, REFIID riid
, void **out
)
491 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
493 TRACE("iface %p, riid %s, out %p.\n", iface
, debugstr_guid(riid
), out
);
495 return d3drm_frame3_QueryInterface(&frame
->IDirect3DRMFrame3_iface
, riid
, out
);
498 static ULONG WINAPI
d3drm_frame3_AddRef(IDirect3DRMFrame3
*iface
)
500 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame3(iface
);
501 ULONG refcount
= InterlockedIncrement(&frame
->ref
);
503 TRACE("%p increasing refcount to %u.\n", iface
, refcount
);
508 static ULONG WINAPI
d3drm_frame2_AddRef(IDirect3DRMFrame2
*iface
)
510 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
512 TRACE("iface %p.\n", iface
);
514 return d3drm_frame3_AddRef(&frame
->IDirect3DRMFrame3_iface
);
517 static ULONG WINAPI
d3drm_frame1_AddRef(IDirect3DRMFrame
*iface
)
519 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
521 TRACE("iface %p.\n", iface
);
523 return d3drm_frame3_AddRef(&frame
->IDirect3DRMFrame3_iface
);
526 static ULONG WINAPI
d3drm_frame3_Release(IDirect3DRMFrame3
*iface
)
528 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame3(iface
);
529 ULONG refcount
= InterlockedDecrement(&frame
->ref
);
532 TRACE("%p decreasing refcount to %u.\n", iface
, refcount
);
536 for (i
= 0; i
< frame
->nb_children
; ++i
)
538 IDirect3DRMFrame3_Release(frame
->children
[i
]);
540 HeapFree(GetProcessHeap(), 0, frame
->children
);
541 for (i
= 0; i
< frame
->nb_visuals
; ++i
)
543 IDirect3DRMVisual_Release(frame
->visuals
[i
]);
545 HeapFree(GetProcessHeap(), 0, frame
->visuals
);
546 for (i
= 0; i
< frame
->nb_lights
; ++i
)
548 IDirect3DRMLight_Release(frame
->lights
[i
]);
550 HeapFree(GetProcessHeap(), 0, frame
->lights
);
551 HeapFree(GetProcessHeap(), 0, frame
);
557 static ULONG WINAPI
d3drm_frame2_Release(IDirect3DRMFrame2
*iface
)
559 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
561 TRACE("iface %p.\n", iface
);
563 return d3drm_frame3_Release(&frame
->IDirect3DRMFrame3_iface
);
566 static ULONG WINAPI
d3drm_frame1_Release(IDirect3DRMFrame
*iface
)
568 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
570 TRACE("iface %p.\n", iface
);
572 return d3drm_frame3_Release(&frame
->IDirect3DRMFrame3_iface
);
575 static HRESULT WINAPI
d3drm_frame3_Clone(IDirect3DRMFrame3
*iface
,
576 IUnknown
*outer
, REFIID iid
, void **out
)
578 FIXME("iface %p, outer %p, iid %s, out %p stub!\n", iface
, outer
, debugstr_guid(iid
), out
);
583 static HRESULT WINAPI
d3drm_frame2_Clone(IDirect3DRMFrame2
*iface
,
584 IUnknown
*outer
, REFIID iid
, void **out
)
586 FIXME("iface %p, outer %p, iid %s, out %p stub!\n", iface
, outer
, debugstr_guid(iid
), out
);
591 static HRESULT WINAPI
d3drm_frame1_Clone(IDirect3DRMFrame
*iface
,
592 IUnknown
*outer
, REFIID iid
, void **out
)
594 FIXME("iface %p, outer %p, iid %s, out %p stub!\n", iface
, outer
, debugstr_guid(iid
), out
);
599 static HRESULT WINAPI
d3drm_frame3_AddDestroyCallback(IDirect3DRMFrame3
*iface
,
600 D3DRMOBJECTCALLBACK cb
, void *ctx
)
602 FIXME("iface %p, cb %p, ctx %p stub!\n", iface
, cb
, ctx
);
607 static HRESULT WINAPI
d3drm_frame2_AddDestroyCallback(IDirect3DRMFrame2
*iface
,
608 D3DRMOBJECTCALLBACK cb
, void *ctx
)
610 FIXME("iface %p, cb %p, ctx %p stub!\n", iface
, cb
, ctx
);
615 static HRESULT WINAPI
d3drm_frame1_AddDestroyCallback(IDirect3DRMFrame
*iface
,
616 D3DRMOBJECTCALLBACK cb
, void *ctx
)
618 FIXME("iface %p, cb %p, ctx %p stub!\n", iface
, cb
, ctx
);
623 static HRESULT WINAPI
d3drm_frame3_DeleteDestroyCallback(IDirect3DRMFrame3
*iface
,
624 D3DRMOBJECTCALLBACK cb
, void *ctx
)
626 FIXME("iface %p, cb %p, ctx %p stub!\n", iface
, cb
, ctx
);
631 static HRESULT WINAPI
d3drm_frame2_DeleteDestroyCallback(IDirect3DRMFrame2
*iface
,
632 D3DRMOBJECTCALLBACK cb
, void *ctx
)
634 FIXME("iface %p, cb %p, ctx %p stub!\n", iface
, cb
, ctx
);
639 static HRESULT WINAPI
d3drm_frame1_DeleteDestroyCallback(IDirect3DRMFrame
*iface
,
640 D3DRMOBJECTCALLBACK cb
, void *ctx
)
642 FIXME("iface %p, cb %p, ctx %p stub!\n", iface
, cb
, ctx
);
647 static HRESULT WINAPI
d3drm_frame3_SetAppData(IDirect3DRMFrame3
*iface
, DWORD data
)
649 FIXME("iface %p, data %#x stub!\n", iface
, data
);
654 static HRESULT WINAPI
d3drm_frame2_SetAppData(IDirect3DRMFrame2
*iface
, DWORD data
)
656 FIXME("iface %p, data %#x stub!\n", iface
, data
);
661 static HRESULT WINAPI
d3drm_frame1_SetAppData(IDirect3DRMFrame
*iface
, DWORD data
)
663 FIXME("iface %p, data %#x stub!\n", iface
, data
);
668 static DWORD WINAPI
d3drm_frame3_GetAppData(IDirect3DRMFrame3
*iface
)
670 FIXME("iface %p stub!\n", iface
);
675 static DWORD WINAPI
d3drm_frame2_GetAppData(IDirect3DRMFrame2
*iface
)
677 FIXME("iface %p stub!\n", iface
);
682 static DWORD WINAPI
d3drm_frame1_GetAppData(IDirect3DRMFrame
*iface
)
684 FIXME("iface %p stub!\n", iface
);
689 static HRESULT WINAPI
d3drm_frame3_SetName(IDirect3DRMFrame3
*iface
, const char *name
)
691 FIXME("iface %p, name %s stub!\n", iface
, debugstr_a(name
));
696 static HRESULT WINAPI
d3drm_frame2_SetName(IDirect3DRMFrame2
*iface
, const char *name
)
698 FIXME("iface %p, name %s stub!\n", iface
, debugstr_a(name
));
703 static HRESULT WINAPI
d3drm_frame1_SetName(IDirect3DRMFrame
*iface
, const char *name
)
705 FIXME("iface %p, name %s stub!\n", iface
, debugstr_a(name
));
710 static HRESULT WINAPI
d3drm_frame3_GetName(IDirect3DRMFrame3
*iface
, DWORD
*size
, char *name
)
712 FIXME("iface %p, size %p, name %p stub!\n", iface
, size
, name
);
717 static HRESULT WINAPI
d3drm_frame2_GetName(IDirect3DRMFrame2
*iface
, DWORD
*size
, char *name
)
719 FIXME("iface %p, size %p, name %p stub!\n", iface
, size
, name
);
724 static HRESULT WINAPI
d3drm_frame1_GetName(IDirect3DRMFrame
*iface
, DWORD
*size
, char *name
)
726 FIXME("iface %p, size %p, name %p stub!\n", iface
, size
, name
);
731 static HRESULT WINAPI
d3drm_frame3_GetClassName(IDirect3DRMFrame3
*iface
, DWORD
*size
, char *name
)
733 TRACE("iface %p, size %p, name %p.\n", iface
, size
, name
);
735 if (!size
|| *size
< strlen("Frame") || !name
)
738 strcpy(name
, "Frame");
739 *size
= sizeof("Frame");
744 static HRESULT WINAPI
d3drm_frame2_GetClassName(IDirect3DRMFrame2
*iface
, DWORD
*size
, char *name
)
746 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
748 TRACE("iface %p, size %p, name %p.\n", iface
, size
, name
);
750 return d3drm_frame3_GetClassName(&frame
->IDirect3DRMFrame3_iface
, size
, name
);
753 static HRESULT WINAPI
d3drm_frame1_GetClassName(IDirect3DRMFrame
*iface
, DWORD
*size
, char *name
)
755 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
757 TRACE("iface %p, size %p, name %p.\n", iface
, size
, name
);
759 return d3drm_frame3_GetClassName(&frame
->IDirect3DRMFrame3_iface
, size
, name
);
762 static HRESULT WINAPI
d3drm_frame3_AddChild(IDirect3DRMFrame3
*iface
, IDirect3DRMFrame3
*child
)
764 struct d3drm_frame
*This
= impl_from_IDirect3DRMFrame3(iface
);
765 struct d3drm_frame
*child_obj
= unsafe_impl_from_IDirect3DRMFrame3(child
);
767 TRACE("iface %p, child %p.\n", iface
, child
);
770 return D3DRMERR_BADOBJECT
;
772 if (child_obj
->parent
)
774 IDirect3DRMFrame3
* parent
= &child_obj
->parent
->IDirect3DRMFrame3_iface
;
778 /* Passed frame is already a child so return success */
783 /* Remove parent and continue */
784 IDirect3DRMFrame3_DeleteChild(parent
, child
);
788 if ((This
->nb_children
+ 1) > This
->children_capacity
)
791 IDirect3DRMFrame3
** children
;
793 if (!This
->children_capacity
)
796 children
= HeapAlloc(GetProcessHeap(), 0, new_capacity
* sizeof(IDirect3DRMFrame3
*));
800 new_capacity
= This
->children_capacity
* 2;
801 children
= HeapReAlloc(GetProcessHeap(), 0, This
->children
, new_capacity
* sizeof(IDirect3DRMFrame3
*));
805 return E_OUTOFMEMORY
;
807 This
->children_capacity
= new_capacity
;
808 This
->children
= children
;
811 This
->children
[This
->nb_children
++] = child
;
812 IDirect3DRMFrame3_AddRef(child
);
813 child_obj
->parent
= This
;
818 static HRESULT WINAPI
d3drm_frame2_AddChild(IDirect3DRMFrame2
*iface
, IDirect3DRMFrame
*child
)
820 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
821 IDirect3DRMFrame3
*child3
;
824 TRACE("iface %p, child %p.\n", iface
, child
);
827 return D3DRMERR_BADOBJECT
;
828 hr
= IDirect3DRMFrame_QueryInterface(child
, &IID_IDirect3DRMFrame3
, (void **)&child3
);
830 return D3DRMERR_BADOBJECT
;
831 IDirect3DRMFrame_Release(child
);
833 return d3drm_frame3_AddChild(&frame
->IDirect3DRMFrame3_iface
, child3
);
836 static HRESULT WINAPI
d3drm_frame1_AddChild(IDirect3DRMFrame
*iface
, IDirect3DRMFrame
*child
)
838 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
839 struct d3drm_frame
*child_frame
= unsafe_impl_from_IDirect3DRMFrame(child
);
841 TRACE("iface %p, child %p.\n", iface
, child
);
844 return D3DRMERR_BADOBJECT
;
846 return d3drm_frame3_AddChild(&frame
->IDirect3DRMFrame3_iface
, &child_frame
->IDirect3DRMFrame3_iface
);
849 static HRESULT WINAPI
d3drm_frame3_AddLight(IDirect3DRMFrame3
*iface
, IDirect3DRMLight
*light
)
851 struct d3drm_frame
*This
= impl_from_IDirect3DRMFrame3(iface
);
853 IDirect3DRMLight
** lights
;
855 TRACE("iface %p, light %p.\n", iface
, light
);
858 return D3DRMERR_BADOBJECT
;
860 /* Check if already existing and return gracefully without increasing ref count */
861 for (i
= 0; i
< This
->nb_lights
; i
++)
862 if (This
->lights
[i
] == light
)
865 if ((This
->nb_lights
+ 1) > This
->lights_capacity
)
869 if (!This
->lights_capacity
)
872 lights
= HeapAlloc(GetProcessHeap(), 0, new_capacity
* sizeof(IDirect3DRMLight
*));
876 new_capacity
= This
->lights_capacity
* 2;
877 lights
= HeapReAlloc(GetProcessHeap(), 0, This
->lights
, new_capacity
* sizeof(IDirect3DRMLight
*));
881 return E_OUTOFMEMORY
;
883 This
->lights_capacity
= new_capacity
;
884 This
->lights
= lights
;
887 This
->lights
[This
->nb_lights
++] = light
;
888 IDirect3DRMLight_AddRef(light
);
893 static HRESULT WINAPI
d3drm_frame2_AddLight(IDirect3DRMFrame2
*iface
, IDirect3DRMLight
*light
)
895 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
897 TRACE("iface %p, light %p.\n", iface
, light
);
899 return d3drm_frame3_AddLight(&frame
->IDirect3DRMFrame3_iface
, light
);
902 static HRESULT WINAPI
d3drm_frame1_AddLight(IDirect3DRMFrame
*iface
, IDirect3DRMLight
*light
)
904 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
906 TRACE("iface %p, light %p.\n", iface
, light
);
908 return d3drm_frame3_AddLight(&frame
->IDirect3DRMFrame3_iface
, light
);
911 static HRESULT WINAPI
d3drm_frame3_AddMoveCallback(IDirect3DRMFrame3
*iface
,
912 D3DRMFRAME3MOVECALLBACK cb
, void *ctx
, DWORD flags
)
914 FIXME("iface %p, cb %p, ctx %p flags %#x stub!\n", iface
, cb
, ctx
, flags
);
919 static HRESULT WINAPI
d3drm_frame2_AddMoveCallback(IDirect3DRMFrame2
*iface
,
920 D3DRMFRAMEMOVECALLBACK cb
, void *ctx
)
922 FIXME("iface %p, cb %p, ctx %p stub!\n", iface
, cb
, ctx
);
927 static HRESULT WINAPI
d3drm_frame1_AddMoveCallback(IDirect3DRMFrame
*iface
,
928 D3DRMFRAMEMOVECALLBACK cb
, void *ctx
)
930 FIXME("iface %p, cb %p, ctx %p stub!\n", iface
, cb
, ctx
);
935 static HRESULT WINAPI
d3drm_frame3_AddTransform(IDirect3DRMFrame3
*iface
,
936 D3DRMCOMBINETYPE type
, D3DRMMATRIX4D matrix
)
938 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame3(iface
);
940 TRACE("iface %p, type %#x, matrix %p.\n", iface
, type
, matrix
);
944 case D3DRMCOMBINE_REPLACE
:
945 memcpy(frame
->transform
, matrix
, sizeof(D3DRMMATRIX4D
));
948 case D3DRMCOMBINE_BEFORE
:
949 FIXME("D3DRMCOMBINE_BEFORE not supported yet\n");
952 case D3DRMCOMBINE_AFTER
:
953 FIXME("D3DRMCOMBINE_AFTER not supported yet\n");
957 WARN("Unknown Combine Type %u\n", type
);
958 return D3DRMERR_BADVALUE
;
964 static HRESULT WINAPI
d3drm_frame2_AddTransform(IDirect3DRMFrame2
*iface
,
965 D3DRMCOMBINETYPE type
, D3DRMMATRIX4D matrix
)
967 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
969 TRACE("iface %p, type %#x, matrix %p.\n", iface
, type
, matrix
);
971 return d3drm_frame3_AddTransform(&frame
->IDirect3DRMFrame3_iface
, type
, matrix
);
974 static HRESULT WINAPI
d3drm_frame1_AddTransform(IDirect3DRMFrame
*iface
,
975 D3DRMCOMBINETYPE type
, D3DRMMATRIX4D matrix
)
977 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
979 TRACE("iface %p, type %#x, matrix %p.\n", iface
, type
, matrix
);
981 return d3drm_frame3_AddTransform(&frame
->IDirect3DRMFrame3_iface
, type
, matrix
);
984 static HRESULT WINAPI
d3drm_frame3_AddTranslation(IDirect3DRMFrame3
*iface
,
985 D3DRMCOMBINETYPE type
, D3DVALUE x
, D3DVALUE y
, D3DVALUE z
)
987 FIXME("iface %p, type %#x, x %.8e, y %.8e, z %.8e stub!\n", iface
, type
, x
, y
, z
);
992 static HRESULT WINAPI
d3drm_frame2_AddTranslation(IDirect3DRMFrame2
*iface
,
993 D3DRMCOMBINETYPE type
, D3DVALUE x
, D3DVALUE y
, D3DVALUE z
)
995 FIXME("iface %p, type %#x, x %.8e, y %.8e, z %.8e stub!\n", iface
, type
, x
, y
, z
);
1000 static HRESULT WINAPI
d3drm_frame1_AddTranslation(IDirect3DRMFrame
*iface
,
1001 D3DRMCOMBINETYPE type
, D3DVALUE x
, D3DVALUE y
, D3DVALUE z
)
1003 FIXME("iface %p, type %#x, x %.8e, y %.8e, z %.8e stub!\n", iface
, type
, x
, y
, z
);
1008 static HRESULT WINAPI
d3drm_frame3_AddScale(IDirect3DRMFrame3
*iface
,
1009 D3DRMCOMBINETYPE type
, D3DVALUE sx
, D3DVALUE sy
, D3DVALUE sz
)
1011 FIXME("iface %p, type %#x, sx %.8e, sy %.8e, sz %.8e stub!\n", iface
, type
, sx
, sy
, sz
);
1016 static HRESULT WINAPI
d3drm_frame2_AddScale(IDirect3DRMFrame2
*iface
,
1017 D3DRMCOMBINETYPE type
, D3DVALUE sx
, D3DVALUE sy
, D3DVALUE sz
)
1019 FIXME("iface %p, type %#x, sx %.8e, sy %.8e, sz %.8e stub!\n", iface
, type
, sx
, sy
, sz
);
1024 static HRESULT WINAPI
d3drm_frame1_AddScale(IDirect3DRMFrame
*iface
,
1025 D3DRMCOMBINETYPE type
, D3DVALUE sx
, D3DVALUE sy
, D3DVALUE sz
)
1027 FIXME("iface %p, type %#x, sx %.8e, sy %.8e, sz %.8e stub!\n", iface
, type
, sx
, sy
, sz
);
1032 static HRESULT WINAPI
d3drm_frame3_AddRotation(IDirect3DRMFrame3
*iface
,
1033 D3DRMCOMBINETYPE type
, D3DVALUE x
, D3DVALUE y
, D3DVALUE z
, D3DVALUE theta
)
1035 FIXME("iface %p, type %#x, x %.8e, y %.8e, z %.8e, theta %.8e stub!\n",
1036 iface
, type
, x
, y
, z
, theta
);
1041 static HRESULT WINAPI
d3drm_frame2_AddRotation(IDirect3DRMFrame2
*iface
,
1042 D3DRMCOMBINETYPE type
, D3DVALUE x
, D3DVALUE y
, D3DVALUE z
, D3DVALUE theta
)
1044 FIXME("iface %p, type %#x, x %.8e, y %.8e, z %.8e, theta %.8e stub!\n", iface
, type
, x
, y
, z
, theta
);
1049 static HRESULT WINAPI
d3drm_frame1_AddRotation(IDirect3DRMFrame
*iface
,
1050 D3DRMCOMBINETYPE type
, D3DVALUE x
, D3DVALUE y
, D3DVALUE z
, D3DVALUE theta
)
1052 FIXME("iface %p, type %#x, x %.8e, y %.8e, z %.8e, theta %.8e stub!\n", iface
, type
, x
, y
, z
, theta
);
1057 static HRESULT WINAPI
d3drm_frame3_AddVisual(IDirect3DRMFrame3
*iface
, IUnknown
*visual
)
1059 struct d3drm_frame
*This
= impl_from_IDirect3DRMFrame3(iface
);
1061 IDirect3DRMVisual
** visuals
;
1063 TRACE("iface %p, visual %p.\n", iface
, visual
);
1066 return D3DRMERR_BADOBJECT
;
1068 /* Check if already existing and return gracefully without increasing ref count */
1069 for (i
= 0; i
< This
->nb_visuals
; i
++)
1070 if (This
->visuals
[i
] == (IDirect3DRMVisual
*)visual
)
1073 if ((This
->nb_visuals
+ 1) > This
->visuals_capacity
)
1077 if (!This
->visuals_capacity
)
1080 visuals
= HeapAlloc(GetProcessHeap(), 0, new_capacity
* sizeof(IDirect3DRMVisual
*));
1084 new_capacity
= This
->visuals_capacity
* 2;
1085 visuals
= HeapReAlloc(GetProcessHeap(), 0, This
->visuals
, new_capacity
* sizeof(IDirect3DRMVisual
*));
1089 return E_OUTOFMEMORY
;
1091 This
->visuals_capacity
= new_capacity
;
1092 This
->visuals
= visuals
;
1095 This
->visuals
[This
->nb_visuals
++] = (IDirect3DRMVisual
*)visual
;
1096 IDirect3DRMVisual_AddRef(visual
);
1101 static HRESULT WINAPI
d3drm_frame2_AddVisual(IDirect3DRMFrame2
*iface
, IDirect3DRMVisual
*visual
)
1103 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
1105 TRACE("iface %p, visual %p.\n", iface
, visual
);
1107 return d3drm_frame3_AddVisual(&frame
->IDirect3DRMFrame3_iface
, (IUnknown
*)visual
);
1110 static HRESULT WINAPI
d3drm_frame1_AddVisual(IDirect3DRMFrame
*iface
, IDirect3DRMVisual
*visual
)
1112 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
1114 TRACE("iface %p, visual %p.\n", iface
, visual
);
1116 return d3drm_frame3_AddVisual(&frame
->IDirect3DRMFrame3_iface
, (IUnknown
*)visual
);
1119 static HRESULT WINAPI
d3drm_frame3_GetChildren(IDirect3DRMFrame3
*iface
, IDirect3DRMFrameArray
**children
)
1121 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame3(iface
);
1122 struct d3drm_frame_array
*array
;
1124 TRACE("iface %p, children %p.\n", iface
, children
);
1127 return D3DRMERR_BADVALUE
;
1129 if (!(array
= d3drm_frame_array_create(frame
->nb_children
, frame
->children
)))
1130 return E_OUTOFMEMORY
;
1132 *children
= &array
->IDirect3DRMFrameArray_iface
;
1137 static HRESULT WINAPI
d3drm_frame2_GetChildren(IDirect3DRMFrame2
*iface
, IDirect3DRMFrameArray
**children
)
1139 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
1141 TRACE("iface %p, children %p.\n", iface
, children
);
1143 return d3drm_frame3_GetChildren(&frame
->IDirect3DRMFrame3_iface
, children
);
1146 static HRESULT WINAPI
d3drm_frame1_GetChildren(IDirect3DRMFrame
*iface
, IDirect3DRMFrameArray
**children
)
1148 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
1150 TRACE("iface %p, children %p.\n", iface
, children
);
1152 return d3drm_frame3_GetChildren(&frame
->IDirect3DRMFrame3_iface
, children
);
1155 static D3DCOLOR WINAPI
d3drm_frame3_GetColor(IDirect3DRMFrame3
*iface
)
1157 FIXME("iface %p stub!\n", iface
);
1162 static D3DCOLOR WINAPI
d3drm_frame2_GetColor(IDirect3DRMFrame2
*iface
)
1164 FIXME("iface %p stub!\n", iface
);
1169 static D3DCOLOR WINAPI
d3drm_frame1_GetColor(IDirect3DRMFrame
*iface
)
1171 FIXME("iface %p stub!\n", iface
);
1176 static HRESULT WINAPI
d3drm_frame3_GetLights(IDirect3DRMFrame3
*iface
, IDirect3DRMLightArray
**lights
)
1178 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame3(iface
);
1179 struct d3drm_light_array
*array
;
1181 TRACE("iface %p, lights %p.\n", iface
, lights
);
1184 return D3DRMERR_BADVALUE
;
1186 if (!(array
= d3drm_light_array_create(frame
->nb_lights
, frame
->lights
)))
1187 return E_OUTOFMEMORY
;
1189 *lights
= &array
->IDirect3DRMLightArray_iface
;
1194 static HRESULT WINAPI
d3drm_frame2_GetLights(IDirect3DRMFrame2
*iface
, IDirect3DRMLightArray
**lights
)
1196 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
1198 TRACE("iface %p, lights %p.\n", iface
, lights
);
1200 return d3drm_frame3_GetLights(&frame
->IDirect3DRMFrame3_iface
, lights
);
1203 static HRESULT WINAPI
d3drm_frame1_GetLights(IDirect3DRMFrame
*iface
, IDirect3DRMLightArray
**lights
)
1205 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
1207 TRACE("iface %p, lights %p.\n", iface
, lights
);
1209 return d3drm_frame3_GetLights(&frame
->IDirect3DRMFrame3_iface
, lights
);
1212 static D3DRMMATERIALMODE WINAPI
d3drm_frame3_GetMaterialMode(IDirect3DRMFrame3
*iface
)
1214 FIXME("iface %p stub!\n", iface
);
1216 return D3DRMMATERIAL_FROMPARENT
;
1219 static D3DRMMATERIALMODE WINAPI
d3drm_frame2_GetMaterialMode(IDirect3DRMFrame2
*iface
)
1221 FIXME("iface %p stub!\n", iface
);
1223 return D3DRMMATERIAL_FROMPARENT
;
1226 static D3DRMMATERIALMODE WINAPI
d3drm_frame1_GetMaterialMode(IDirect3DRMFrame
*iface
)
1228 FIXME("iface %p stub!\n", iface
);
1230 return D3DRMMATERIAL_FROMPARENT
;
1233 static HRESULT WINAPI
d3drm_frame3_GetParent(IDirect3DRMFrame3
*iface
, IDirect3DRMFrame3
**parent
)
1235 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame3(iface
);
1237 TRACE("iface %p, parent %p.\n", iface
, parent
);
1240 return D3DRMERR_BADVALUE
;
1244 *parent
= &frame
->parent
->IDirect3DRMFrame3_iface
;
1245 IDirect3DRMFrame_AddRef(*parent
);
1255 static HRESULT WINAPI
d3drm_frame2_GetParent(IDirect3DRMFrame2
*iface
, IDirect3DRMFrame
**parent
)
1257 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
1259 TRACE("iface %p, parent %p.\n", iface
, parent
);
1262 return D3DRMERR_BADVALUE
;
1266 *parent
= &frame
->parent
->IDirect3DRMFrame_iface
;
1267 IDirect3DRMFrame_AddRef(*parent
);
1277 static HRESULT WINAPI
d3drm_frame1_GetParent(IDirect3DRMFrame
*iface
, IDirect3DRMFrame
**parent
)
1279 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
1281 TRACE("iface %p, parent %p.\n", iface
, parent
);
1283 return d3drm_frame2_GetParent(&frame
->IDirect3DRMFrame2_iface
, parent
);
1286 static HRESULT WINAPI
d3drm_frame3_GetPosition(IDirect3DRMFrame3
*iface
,
1287 IDirect3DRMFrame3
*reference
, D3DVECTOR
*position
)
1289 FIXME("iface %p, reference %p, position %p stub!\n", iface
, reference
, position
);
1294 static HRESULT WINAPI
d3drm_frame2_GetPosition(IDirect3DRMFrame2
*iface
,
1295 IDirect3DRMFrame
*reference
, D3DVECTOR
*position
)
1297 FIXME("iface %p, reference %p, position %p stub!\n", iface
, reference
, position
);
1302 static HRESULT WINAPI
d3drm_frame1_GetPosition(IDirect3DRMFrame
*iface
,
1303 IDirect3DRMFrame
*reference
, D3DVECTOR
*position
)
1305 FIXME("iface %p, reference %p, position %p stub!\n", iface
, reference
, position
);
1311 static HRESULT WINAPI
d3drm_frame3_GetRotation(IDirect3DRMFrame3
*iface
,
1312 IDirect3DRMFrame3
*reference
, D3DVECTOR
*axis
, D3DVALUE
*theta
)
1314 FIXME("iface %p, reference %p, axis %p, theta %p stub!\n", iface
, reference
, axis
, theta
);
1319 static HRESULT WINAPI
d3drm_frame2_GetRotation(IDirect3DRMFrame2
*iface
,
1320 IDirect3DRMFrame
*reference
, D3DVECTOR
*axis
, D3DVALUE
*theta
)
1322 FIXME("iface %p, reference %p, axis %p, theta %p stub!\n", iface
, reference
, axis
, theta
);
1327 static HRESULT WINAPI
d3drm_frame1_GetRotation(IDirect3DRMFrame
*iface
,
1328 IDirect3DRMFrame
*reference
, D3DVECTOR
*axis
, D3DVALUE
*theta
)
1330 FIXME("iface %p, reference %p, axis %p, theta %p stub!\n", iface
, reference
, axis
, theta
);
1335 static HRESULT WINAPI
d3drm_frame3_GetScene(IDirect3DRMFrame3
*iface
, IDirect3DRMFrame3
**scene
)
1337 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame3(iface
);
1339 TRACE("iface %p, scene %p.\n", iface
, scene
);
1342 return D3DRMERR_BADVALUE
;
1344 while (frame
->parent
)
1345 frame
= frame
->parent
;
1347 *scene
= &frame
->IDirect3DRMFrame3_iface
;
1348 IDirect3DRMFrame3_AddRef(*scene
);
1353 static HRESULT WINAPI
d3drm_frame2_GetScene(IDirect3DRMFrame2
*iface
, IDirect3DRMFrame
**scene
)
1355 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
1356 IDirect3DRMFrame3
*frame3
;
1359 TRACE("iface %p, scene %p.\n", iface
, scene
);
1362 return D3DRMERR_BADVALUE
;
1364 hr
= IDirect3DRMFrame3_GetScene(&frame
->IDirect3DRMFrame3_iface
, &frame3
);
1365 if (FAILED(hr
) || !frame3
)
1371 hr
= IDirect3DRMFrame3_QueryInterface(frame3
, &IID_IDirect3DRMFrame
, (void **)scene
);
1372 IDirect3DRMFrame3_Release(frame3
);
1377 static HRESULT WINAPI
d3drm_frame1_GetScene(IDirect3DRMFrame
*iface
, IDirect3DRMFrame
**scene
)
1379 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
1381 TRACE("iface %p, scene %p.\n", iface
, scene
);
1383 return d3drm_frame2_GetScene(&frame
->IDirect3DRMFrame2_iface
, scene
);
1386 static D3DRMSORTMODE WINAPI
d3drm_frame3_GetSortMode(IDirect3DRMFrame3
*iface
)
1388 FIXME("iface %p stub!\n", iface
);
1390 return D3DRMSORT_FROMPARENT
;
1393 static D3DRMSORTMODE WINAPI
d3drm_frame2_GetSortMode(IDirect3DRMFrame2
*iface
)
1395 FIXME("iface %p stub!\n", iface
);
1397 return D3DRMSORT_FROMPARENT
;
1400 static D3DRMSORTMODE WINAPI
d3drm_frame1_GetSortMode(IDirect3DRMFrame
*iface
)
1402 FIXME("iface %p stub!\n", iface
);
1404 return D3DRMSORT_FROMPARENT
;
1407 static HRESULT WINAPI
d3drm_frame3_GetTexture(IDirect3DRMFrame3
*iface
, IDirect3DRMTexture3
**texture
)
1409 FIXME("iface %p, texture %p stub!\n", iface
, texture
);
1414 static HRESULT WINAPI
d3drm_frame2_GetTexture(IDirect3DRMFrame2
*iface
, IDirect3DRMTexture
**texture
)
1416 FIXME("iface %p, texture %p stub!\n", iface
, texture
);
1421 static HRESULT WINAPI
d3drm_frame1_GetTexture(IDirect3DRMFrame
*iface
, IDirect3DRMTexture
**texture
)
1423 FIXME("iface %p, texture %p stub!\n", iface
, texture
);
1428 static HRESULT WINAPI
d3drm_frame3_GetTransform(IDirect3DRMFrame3
*iface
,
1429 IDirect3DRMFrame3
*reference
, D3DRMMATRIX4D matrix
)
1431 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame3(iface
);
1433 TRACE("iface %p, reference %p, matrix %p.\n", iface
, reference
, matrix
);
1436 FIXME("Specifying a frame as the root of the scene different from the current root frame is not supported yet\n");
1438 memcpy(matrix
, frame
->transform
, sizeof(D3DRMMATRIX4D
));
1443 static HRESULT WINAPI
d3drm_frame2_GetTransform(IDirect3DRMFrame2
*iface
, D3DRMMATRIX4D matrix
)
1445 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
1447 TRACE("iface %p, matrix %p.\n", iface
, matrix
);
1449 memcpy(matrix
, frame
->transform
, sizeof(D3DRMMATRIX4D
));
1454 static HRESULT WINAPI
d3drm_frame1_GetTransform(IDirect3DRMFrame
*iface
, D3DRMMATRIX4D matrix
)
1456 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
1458 TRACE("iface %p, matrix %p.\n", iface
, matrix
);
1460 return d3drm_frame2_GetTransform(&frame
->IDirect3DRMFrame2_iface
, matrix
);
1463 static HRESULT WINAPI
d3drm_frame3_GetVelocity(IDirect3DRMFrame3
*iface
,
1464 IDirect3DRMFrame3
*reference
, D3DVECTOR
*velocity
, BOOL with_rotation
)
1466 FIXME("iface %p, reference %p, velocity %p, with_rotation %#x stub!\n",
1467 iface
, reference
, velocity
, with_rotation
);
1472 static HRESULT WINAPI
d3drm_frame2_GetVelocity(IDirect3DRMFrame2
*iface
,
1473 IDirect3DRMFrame
*reference
, D3DVECTOR
*velocity
, BOOL with_rotation
)
1475 FIXME("iface %p, reference %p, velocity %p, with_rotation %#x stub!\n",
1476 iface
, reference
, velocity
, with_rotation
);
1481 static HRESULT WINAPI
d3drm_frame1_GetVelocity(IDirect3DRMFrame
*iface
,
1482 IDirect3DRMFrame
*reference
, D3DVECTOR
*velocity
, BOOL with_rotation
)
1484 FIXME("iface %p, reference %p, velocity %p, with_rotation %#x stub!\n",
1485 iface
, reference
, velocity
, with_rotation
);
1490 static HRESULT WINAPI
d3drm_frame3_GetOrientation(IDirect3DRMFrame3
*iface
,
1491 IDirect3DRMFrame3
*reference
, D3DVECTOR
*dir
, D3DVECTOR
*up
)
1493 FIXME("iface %p, reference %p, dir %p, up %p stub!\n", iface
, reference
, dir
, up
);
1498 static HRESULT WINAPI
d3drm_frame2_GetOrientation(IDirect3DRMFrame2
*iface
,
1499 IDirect3DRMFrame
*reference
, D3DVECTOR
*dir
, D3DVECTOR
*up
)
1501 FIXME("iface %p, reference %p, dir %p, up %p stub!\n", iface
, reference
, dir
, up
);
1506 static HRESULT WINAPI
d3drm_frame1_GetOrientation(IDirect3DRMFrame
*iface
,
1507 IDirect3DRMFrame
*reference
, D3DVECTOR
*dir
, D3DVECTOR
*up
)
1509 FIXME("iface %p, reference %p, dir %p, up %p stub!\n", iface
, reference
, dir
, up
);
1514 static HRESULT WINAPI
d3drm_frame3_GetVisuals(IDirect3DRMFrame3
*iface
, DWORD
*count
, IUnknown
**visuals
)
1516 FIXME("iface %p, count %p, visuals %p stub!\n", iface
, count
, visuals
);
1521 static HRESULT WINAPI
d3drm_frame2_GetVisuals(IDirect3DRMFrame2
*iface
, IDirect3DRMVisualArray
**visuals
)
1523 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
1524 struct d3drm_visual_array
*array
;
1526 TRACE("iface %p, visuals %p.\n", iface
, visuals
);
1529 return D3DRMERR_BADVALUE
;
1531 if (!(array
= d3drm_visual_array_create(frame
->nb_visuals
, frame
->visuals
)))
1532 return E_OUTOFMEMORY
;
1534 *visuals
= &array
->IDirect3DRMVisualArray_iface
;
1539 static HRESULT WINAPI
d3drm_frame1_GetVisuals(IDirect3DRMFrame
*iface
, IDirect3DRMVisualArray
**visuals
)
1541 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
1543 TRACE("iface %p, visuals %p.\n", iface
, visuals
);
1545 return d3drm_frame2_GetVisuals(&frame
->IDirect3DRMFrame2_iface
, visuals
);
1548 static HRESULT WINAPI
d3drm_frame2_GetTextureTopology(IDirect3DRMFrame2
*iface
, BOOL
*wrap_u
, BOOL
*wrap_v
)
1550 FIXME("iface %p, wrap_u %p, wrap_v %p stub!\n", iface
, wrap_u
, wrap_v
);
1555 static HRESULT WINAPI
d3drm_frame1_GetTextureTopology(IDirect3DRMFrame
*iface
, BOOL
*wrap_u
, BOOL
*wrap_v
)
1557 FIXME("iface %p, wrap_u %p, wrap_v %p stub!\n", iface
, wrap_u
, wrap_v
);
1562 static HRESULT WINAPI
d3drm_frame3_InverseTransform(IDirect3DRMFrame3
*iface
, D3DVECTOR
*d
, D3DVECTOR
*s
)
1564 FIXME("iface %p, d %p, s %p stub!\n", iface
, d
, s
);
1569 static HRESULT WINAPI
d3drm_frame2_InverseTransform(IDirect3DRMFrame2
*iface
, D3DVECTOR
*d
, D3DVECTOR
*s
)
1571 FIXME("iface %p, d %p, s %p stub!\n", iface
, d
, s
);
1576 static HRESULT WINAPI
d3drm_frame1_InverseTransform(IDirect3DRMFrame
*iface
, D3DVECTOR
*d
, D3DVECTOR
*s
)
1578 FIXME("iface %p, d %p, s %p stub!\n", iface
, d
, s
);
1583 static HRESULT WINAPI
d3drm_frame3_Load(IDirect3DRMFrame3
*iface
, void *filename
,
1584 void *name
, D3DRMLOADOPTIONS flags
, D3DRMLOADTEXTURE3CALLBACK cb
, void *ctx
)
1586 FIXME("iface %p, filename %p, name %p, flags %#x, cb %p, ctx %p stub!\n",
1587 iface
, filename
, name
, flags
, cb
, ctx
);
1592 static HRESULT WINAPI
d3drm_frame2_Load(IDirect3DRMFrame2
*iface
, void *filename
,
1593 void *name
, D3DRMLOADOPTIONS flags
, D3DRMLOADTEXTURECALLBACK cb
, void *ctx
)
1595 FIXME("iface %p, filename %p, name %p, flags %#x, cb %p, ctx %p stub!\n",
1596 iface
, filename
, name
, flags
, cb
, ctx
);
1601 static HRESULT WINAPI
d3drm_frame1_Load(IDirect3DRMFrame
*iface
, void *filename
,
1602 void *name
, D3DRMLOADOPTIONS flags
, D3DRMLOADTEXTURECALLBACK cb
, void *ctx
)
1604 FIXME("iface %p, filename %p, name %p, flags %#x, cb %p, ctx %p stub!\n",
1605 iface
, filename
, name
, flags
, cb
, ctx
);
1610 static HRESULT WINAPI
d3drm_frame3_LookAt(IDirect3DRMFrame3
*iface
, IDirect3DRMFrame3
*target
,
1611 IDirect3DRMFrame3
*reference
, D3DRMFRAMECONSTRAINT constraint
)
1613 FIXME("iface %p, target %p, reference %p, constraint %#x stub!\n", iface
, target
, reference
, constraint
);
1618 static HRESULT WINAPI
d3drm_frame2_LookAt(IDirect3DRMFrame2
*iface
, IDirect3DRMFrame
*target
,
1619 IDirect3DRMFrame
*reference
, D3DRMFRAMECONSTRAINT constraint
)
1621 FIXME("iface %p, target %p, reference %p, constraint %#x stub!\n", iface
, target
, reference
, constraint
);
1626 static HRESULT WINAPI
d3drm_frame1_LookAt(IDirect3DRMFrame
*iface
, IDirect3DRMFrame
*target
,
1627 IDirect3DRMFrame
*reference
, D3DRMFRAMECONSTRAINT constraint
)
1629 FIXME("iface %p, target %p, reference %p, constraint %#x stub!\n", iface
, target
, reference
, constraint
);
1634 static HRESULT WINAPI
d3drm_frame3_Move(IDirect3DRMFrame3
*iface
, D3DVALUE delta
)
1636 FIXME("iface %p, delta %.8e stub!\n", iface
, delta
);
1641 static HRESULT WINAPI
d3drm_frame2_Move(IDirect3DRMFrame2
*iface
, D3DVALUE delta
)
1643 FIXME("iface %p, delta %.8e stub!\n", iface
, delta
);
1648 static HRESULT WINAPI
d3drm_frame1_Move(IDirect3DRMFrame
*iface
, D3DVALUE delta
)
1650 FIXME("iface %p, delta %.8e stub!\n", iface
, delta
);
1655 static HRESULT WINAPI
d3drm_frame3_DeleteChild(IDirect3DRMFrame3
*iface
, IDirect3DRMFrame3
*child
)
1657 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame3(iface
);
1658 struct d3drm_frame
*child_impl
= unsafe_impl_from_IDirect3DRMFrame3(child
);
1661 TRACE("iface %p, child %p.\n", iface
, child
);
1664 return D3DRMERR_BADOBJECT
;
1666 /* Check if child exists */
1667 for (i
= 0; i
< frame
->nb_children
; ++i
)
1669 if (frame
->children
[i
] == child
)
1673 if (i
== frame
->nb_children
)
1674 return D3DRMERR_BADVALUE
;
1676 memmove(frame
->children
+ i
, frame
->children
+ i
+ 1, sizeof(*frame
->children
) * (frame
->nb_children
- 1 - i
));
1677 IDirect3DRMFrame3_Release(child
);
1678 child_impl
->parent
= NULL
;
1679 --frame
->nb_children
;
1684 static HRESULT WINAPI
d3drm_frame2_DeleteChild(IDirect3DRMFrame2
*iface
, IDirect3DRMFrame
*child
)
1686 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
1687 IDirect3DRMFrame3
*child3
;
1690 TRACE("iface %p, child %p.\n", iface
, child
);
1693 return D3DRMERR_BADOBJECT
;
1694 if (FAILED(hr
= IDirect3DRMFrame_QueryInterface(child
, &IID_IDirect3DRMFrame3
, (void **)&child3
)))
1695 return D3DRMERR_BADOBJECT
;
1696 IDirect3DRMFrame_Release(child
);
1698 return d3drm_frame3_DeleteChild(&frame
->IDirect3DRMFrame3_iface
, child3
);
1701 static HRESULT WINAPI
d3drm_frame1_DeleteChild(IDirect3DRMFrame
*iface
, IDirect3DRMFrame
*child
)
1703 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
1704 struct d3drm_frame
*child_frame
= unsafe_impl_from_IDirect3DRMFrame(child
);
1706 TRACE("iface %p, child %p.\n", iface
, child
);
1709 return D3DRMERR_BADOBJECT
;
1711 return d3drm_frame3_DeleteChild(&frame
->IDirect3DRMFrame3_iface
, &child_frame
->IDirect3DRMFrame3_iface
);
1714 static HRESULT WINAPI
d3drm_frame3_DeleteLight(IDirect3DRMFrame3
*iface
, IDirect3DRMLight
*light
)
1716 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame3(iface
);
1719 TRACE("iface %p, light %p.\n", iface
, light
);
1722 return D3DRMERR_BADOBJECT
;
1724 /* Check if visual exists */
1725 for (i
= 0; i
< frame
->nb_lights
; ++i
)
1727 if (frame
->lights
[i
] == light
)
1731 if (i
== frame
->nb_lights
)
1732 return D3DRMERR_BADVALUE
;
1734 memmove(frame
->lights
+ i
, frame
->lights
+ i
+ 1, sizeof(*frame
->lights
) * (frame
->nb_lights
- 1 - i
));
1735 IDirect3DRMLight_Release(light
);
1741 static HRESULT WINAPI
d3drm_frame2_DeleteLight(IDirect3DRMFrame2
*iface
, IDirect3DRMLight
*light
)
1743 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
1745 TRACE("iface %p, light %p.\n", iface
, light
);
1747 return d3drm_frame3_DeleteLight(&frame
->IDirect3DRMFrame3_iface
, light
);
1750 static HRESULT WINAPI
d3drm_frame1_DeleteLight(IDirect3DRMFrame
*iface
, IDirect3DRMLight
*light
)
1752 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
1754 TRACE("iface %p, light %p.\n", iface
, light
);
1756 return d3drm_frame3_DeleteLight(&frame
->IDirect3DRMFrame3_iface
, light
);
1759 static HRESULT WINAPI
d3drm_frame3_DeleteMoveCallback(IDirect3DRMFrame3
*iface
,
1760 D3DRMFRAME3MOVECALLBACK cb
, void *ctx
)
1762 FIXME("iface %p, cb %p, ctx %p stub!\n", iface
, cb
, ctx
);
1767 static HRESULT WINAPI
d3drm_frame2_DeleteMoveCallback(IDirect3DRMFrame2
*iface
,
1768 D3DRMFRAMEMOVECALLBACK cb
, void *ctx
)
1770 FIXME("iface %p, cb %p, ctx %p stub!\n", iface
, cb
, ctx
);
1775 static HRESULT WINAPI
d3drm_frame1_DeleteMoveCallback(IDirect3DRMFrame
*iface
,
1776 D3DRMFRAMEMOVECALLBACK cb
, void *ctx
)
1778 FIXME("iface %p, cb %p, ctx %p stub!\n", iface
, cb
, ctx
);
1783 static HRESULT WINAPI
d3drm_frame3_DeleteVisual(IDirect3DRMFrame3
*iface
, IUnknown
*visual
)
1785 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame3(iface
);
1788 TRACE("iface %p, visual %p.\n", iface
, visual
);
1791 return D3DRMERR_BADOBJECT
;
1793 /* Check if visual exists */
1794 for (i
= 0; i
< frame
->nb_visuals
; ++i
)
1796 if (frame
->visuals
[i
] == (IDirect3DRMVisual
*)visual
)
1800 if (i
== frame
->nb_visuals
)
1801 return D3DRMERR_BADVALUE
;
1803 memmove(frame
->visuals
+ i
, frame
->visuals
+ i
+ 1, sizeof(*frame
->visuals
) * (frame
->nb_visuals
- 1 - i
));
1804 IDirect3DRMVisual_Release(visual
);
1805 --frame
->nb_visuals
;
1810 static HRESULT WINAPI
d3drm_frame2_DeleteVisual(IDirect3DRMFrame2
*iface
, IDirect3DRMVisual
*visual
)
1812 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
1814 TRACE("iface %p, visual %p.\n", iface
, visual
);
1816 return d3drm_frame3_DeleteVisual(&frame
->IDirect3DRMFrame3_iface
, (IUnknown
*)visual
);
1819 static HRESULT WINAPI
d3drm_frame1_DeleteVisual(IDirect3DRMFrame
*iface
, IDirect3DRMVisual
*visual
)
1821 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
1823 TRACE("iface %p, visual %p.\n", iface
, visual
);
1825 return d3drm_frame3_DeleteVisual(&frame
->IDirect3DRMFrame3_iface
, (IUnknown
*)visual
);
1828 static D3DCOLOR WINAPI
d3drm_frame3_GetSceneBackground(IDirect3DRMFrame3
*iface
)
1830 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame3(iface
);
1832 TRACE("iface %p.\n", iface
);
1834 return frame
->scenebackground
;
1837 static D3DCOLOR WINAPI
d3drm_frame2_GetSceneBackground(IDirect3DRMFrame2
*iface
)
1839 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
1841 TRACE("iface %p.\n", iface
);
1843 return d3drm_frame3_GetSceneBackground(&frame
->IDirect3DRMFrame3_iface
);
1846 static D3DCOLOR WINAPI
d3drm_frame1_GetSceneBackground(IDirect3DRMFrame
*iface
)
1848 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
1850 TRACE("iface %p.\n", iface
);
1852 return d3drm_frame3_GetSceneBackground(&frame
->IDirect3DRMFrame3_iface
);
1855 static HRESULT WINAPI
d3drm_frame3_GetSceneBackgroundDepth(IDirect3DRMFrame3
*iface
,
1856 IDirectDrawSurface
**surface
)
1858 FIXME("iface %p, surface %p stub!\n", iface
, surface
);
1863 static HRESULT WINAPI
d3drm_frame2_GetSceneBackgroundDepth(IDirect3DRMFrame2
*iface
,
1864 IDirectDrawSurface
**surface
)
1866 FIXME("iface %p, surface %p stub!\n", iface
, surface
);
1871 static HRESULT WINAPI
d3drm_frame1_GetSceneBackgroundDepth(IDirect3DRMFrame
*iface
,
1872 IDirectDrawSurface
**surface
)
1874 FIXME("iface %p, surface %p stub!\n", iface
, surface
);
1879 static D3DCOLOR WINAPI
d3drm_frame3_GetSceneFogColor(IDirect3DRMFrame3
*iface
)
1881 FIXME("iface %p stub!\n", iface
);
1886 static D3DCOLOR WINAPI
d3drm_frame2_GetSceneFogColor(IDirect3DRMFrame2
*iface
)
1888 FIXME("iface %p stub!\n", iface
);
1893 static D3DCOLOR WINAPI
d3drm_frame1_GetSceneFogColor(IDirect3DRMFrame
*iface
)
1895 FIXME("iface %p stub!\n", iface
);
1900 static BOOL WINAPI
d3drm_frame3_GetSceneFogEnable(IDirect3DRMFrame3
*iface
)
1902 FIXME("iface %p stub!\n", iface
);
1907 static BOOL WINAPI
d3drm_frame2_GetSceneFogEnable(IDirect3DRMFrame2
*iface
)
1909 FIXME("iface %p stub!\n", iface
);
1914 static BOOL WINAPI
d3drm_frame1_GetSceneFogEnable(IDirect3DRMFrame
*iface
)
1916 FIXME("iface %p stub!\n", iface
);
1921 static D3DRMFOGMODE WINAPI
d3drm_frame3_GetSceneFogMode(IDirect3DRMFrame3
*iface
)
1923 FIXME("iface %p stub!\n", iface
);
1925 return D3DRMFOG_LINEAR
;
1928 static D3DRMFOGMODE WINAPI
d3drm_frame2_GetSceneFogMode(IDirect3DRMFrame2
*iface
)
1930 FIXME("iface %p stub!\n", iface
);
1932 return D3DRMFOG_LINEAR
;
1935 static D3DRMFOGMODE WINAPI
d3drm_frame1_GetSceneFogMode(IDirect3DRMFrame
*iface
)
1937 FIXME("iface %p stub!\n", iface
);
1939 return D3DRMFOG_LINEAR
;
1942 static HRESULT WINAPI
d3drm_frame3_GetSceneFogParams(IDirect3DRMFrame3
*iface
,
1943 D3DVALUE
*start
, D3DVALUE
*end
, D3DVALUE
*density
)
1945 FIXME("iface %p, start %p, end %p, density %p stub!\n", iface
, start
, end
, density
);
1950 static HRESULT WINAPI
d3drm_frame2_GetSceneFogParams(IDirect3DRMFrame2
*iface
,
1951 D3DVALUE
*start
, D3DVALUE
*end
, D3DVALUE
*density
)
1953 FIXME("iface %p, start %p, end %p, density %p stub!\n", iface
, start
, end
, density
);
1958 static HRESULT WINAPI
d3drm_frame1_GetSceneFogParams(IDirect3DRMFrame
*iface
,
1959 D3DVALUE
*start
, D3DVALUE
*end
, D3DVALUE
*density
)
1961 FIXME("iface %p, start %p, end %p, density %p stub!\n", iface
, start
, end
, density
);
1966 static HRESULT WINAPI
d3drm_frame3_SetSceneBackground(IDirect3DRMFrame3
*iface
, D3DCOLOR color
)
1968 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame3(iface
);
1970 TRACE("iface %p, color 0x%08x.\n", iface
, color
);
1972 frame
->scenebackground
= color
;
1977 static HRESULT WINAPI
d3drm_frame2_SetSceneBackground(IDirect3DRMFrame2
*iface
, D3DCOLOR color
)
1979 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
1981 TRACE("iface %p, color 0x%08x.\n", iface
, color
);
1983 return d3drm_frame3_SetSceneBackground(&frame
->IDirect3DRMFrame3_iface
, color
);
1986 static HRESULT WINAPI
d3drm_frame1_SetSceneBackground(IDirect3DRMFrame
*iface
, D3DCOLOR color
)
1988 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
1990 TRACE("iface %p, color 0x%08x.\n", iface
, color
);
1992 return d3drm_frame3_SetSceneBackground(&frame
->IDirect3DRMFrame3_iface
, color
);
1995 static HRESULT WINAPI
d3drm_frame3_SetSceneBackgroundRGB(IDirect3DRMFrame3
*iface
,
1996 D3DVALUE red
, D3DVALUE green
, D3DVALUE blue
)
1998 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame3(iface
);
2000 TRACE("iface %p, red %.8e, green %.8e, blue %.8e.\n", iface
, red
, green
, blue
);
2002 d3drm_set_color(&frame
->scenebackground
, red
, green
, blue
, 1.0f
);
2007 static HRESULT WINAPI
d3drm_frame2_SetSceneBackgroundRGB(IDirect3DRMFrame2
*iface
,
2008 D3DVALUE red
, D3DVALUE green
, D3DVALUE blue
)
2010 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
2012 TRACE("iface %p, red %.8e, green %.8e, blue %.8e.\n", iface
, red
, green
, blue
);
2014 return d3drm_frame3_SetSceneBackgroundRGB(&frame
->IDirect3DRMFrame3_iface
, red
, green
, blue
);
2017 static HRESULT WINAPI
d3drm_frame1_SetSceneBackgroundRGB(IDirect3DRMFrame
*iface
,
2018 D3DVALUE red
, D3DVALUE green
, D3DVALUE blue
)
2020 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
2022 TRACE("iface %p, red %.8e, green %.8e, blue %.8e.\n", iface
, red
, green
, blue
);
2024 return d3drm_frame3_SetSceneBackgroundRGB(&frame
->IDirect3DRMFrame3_iface
, red
, green
, blue
);
2027 static HRESULT WINAPI
d3drm_frame3_SetSceneBackgroundDepth(IDirect3DRMFrame3
*iface
,
2028 IDirectDrawSurface
*surface
)
2030 FIXME("iface %p, surface %p stub!\n", iface
, surface
);
2035 static HRESULT WINAPI
d3drm_frame2_SetSceneBackgroundDepth(IDirect3DRMFrame2
*iface
,
2036 IDirectDrawSurface
*surface
)
2038 FIXME("iface %p, surface %p stub!\n", iface
, surface
);
2043 static HRESULT WINAPI
d3drm_frame1_SetSceneBackgroundDepth(IDirect3DRMFrame
*iface
,
2044 IDirectDrawSurface
*surface
)
2046 FIXME("iface %p, surface %p stub!\n", iface
, surface
);
2051 static HRESULT WINAPI
d3drm_frame3_SetSceneBackgroundImage(IDirect3DRMFrame3
*iface
,
2052 IDirect3DRMTexture3
*texture
)
2054 FIXME("iface %p, texture %p stub!\n", iface
, texture
);
2059 static HRESULT WINAPI
d3drm_frame2_SetSceneBackgroundImage(IDirect3DRMFrame2
*iface
,
2060 IDirect3DRMTexture
*texture
)
2062 FIXME("iface %p, texture %p stub!\n", iface
, texture
);
2067 static HRESULT WINAPI
d3drm_frame1_SetSceneBackgroundImage(IDirect3DRMFrame
*iface
,
2068 IDirect3DRMTexture
*texture
)
2070 FIXME("iface %p, texture %p stub!\n", iface
, texture
);
2075 static HRESULT WINAPI
d3drm_frame3_SetSceneFogEnable(IDirect3DRMFrame3
*iface
, BOOL enable
)
2077 FIXME("iface %p, enable %#x stub!\n", iface
, enable
);
2082 static HRESULT WINAPI
d3drm_frame2_SetSceneFogEnable(IDirect3DRMFrame2
*iface
, BOOL enable
)
2084 FIXME("iface %p, enable %#x stub!\n", iface
, enable
);
2089 static HRESULT WINAPI
d3drm_frame1_SetSceneFogEnable(IDirect3DRMFrame
*iface
, BOOL enable
)
2091 FIXME("iface %p, enable %#x stub!\n", iface
, enable
);
2096 static HRESULT WINAPI
d3drm_frame3_SetSceneFogColor(IDirect3DRMFrame3
*iface
, D3DCOLOR color
)
2098 FIXME("iface %p, color 0x%08x stub!\n", iface
, color
);
2103 static HRESULT WINAPI
d3drm_frame2_SetSceneFogColor(IDirect3DRMFrame2
*iface
, D3DCOLOR color
)
2105 FIXME("iface %p, color 0x%08x stub!\n", iface
, color
);
2110 static HRESULT WINAPI
d3drm_frame1_SetSceneFogColor(IDirect3DRMFrame
*iface
, D3DCOLOR color
)
2112 FIXME("iface %p, color 0x%08x stub!\n", iface
, color
);
2117 static HRESULT WINAPI
d3drm_frame3_SetSceneFogMode(IDirect3DRMFrame3
*iface
, D3DRMFOGMODE mode
)
2119 FIXME("iface %p, mode %#x stub!\n", iface
, mode
);
2124 static HRESULT WINAPI
d3drm_frame2_SetSceneFogMode(IDirect3DRMFrame2
*iface
, D3DRMFOGMODE mode
)
2126 FIXME("iface %p, mode %#x stub!\n", iface
, mode
);
2131 static HRESULT WINAPI
d3drm_frame1_SetSceneFogMode(IDirect3DRMFrame
*iface
, D3DRMFOGMODE mode
)
2133 FIXME("iface %p, mode %#x stub!\n", iface
, mode
);
2138 static HRESULT WINAPI
d3drm_frame3_SetSceneFogParams(IDirect3DRMFrame3
*iface
,
2139 D3DVALUE start
, D3DVALUE end
, D3DVALUE density
)
2141 FIXME("iface %p, start %.8e, end %.8e, density %.8e stub!\n", iface
, start
, end
, density
);
2146 static HRESULT WINAPI
d3drm_frame2_SetSceneFogParams(IDirect3DRMFrame2
*iface
,
2147 D3DVALUE start
, D3DVALUE end
, D3DVALUE density
)
2149 FIXME("iface %p, start %.8e, end %.8e, density %.8e stub!\n", iface
, start
, end
, density
);
2154 static HRESULT WINAPI
d3drm_frame1_SetSceneFogParams(IDirect3DRMFrame
*iface
,
2155 D3DVALUE start
, D3DVALUE end
, D3DVALUE density
)
2157 FIXME("iface %p, start %.8e, end %.8e, density %.8e stub!\n", iface
, start
, end
, density
);
2162 static HRESULT WINAPI
d3drm_frame3_SetColor(IDirect3DRMFrame3
*iface
, D3DCOLOR color
)
2164 FIXME("iface %p, color 0x%08x stub!\n", iface
, color
);
2169 static HRESULT WINAPI
d3drm_frame2_SetColor(IDirect3DRMFrame2
*iface
, D3DCOLOR color
)
2171 FIXME("iface %p, color 0x%08x stub!\n", iface
, color
);
2176 static HRESULT WINAPI
d3drm_frame1_SetColor(IDirect3DRMFrame
*iface
, D3DCOLOR color
)
2178 FIXME("iface %p, color 0x%08x stub!\n", iface
, color
);
2183 static HRESULT WINAPI
d3drm_frame3_SetColorRGB(IDirect3DRMFrame3
*iface
,
2184 D3DVALUE red
, D3DVALUE green
, D3DVALUE blue
)
2186 FIXME("iface %p, red %.8e, green %.8e, blue %.8e stub!\n", iface
, red
, green
, blue
);
2191 static HRESULT WINAPI
d3drm_frame2_SetColorRGB(IDirect3DRMFrame2
*iface
,
2192 D3DVALUE red
, D3DVALUE green
, D3DVALUE blue
)
2194 FIXME("iface %p, red %.8e, green %.8e, blue %.8e stub!\n", iface
, red
, green
, blue
);
2199 static HRESULT WINAPI
d3drm_frame1_SetColorRGB(IDirect3DRMFrame
*iface
,
2200 D3DVALUE red
, D3DVALUE green
, D3DVALUE blue
)
2202 FIXME("iface %p, red %.8e, green %.8e, blue %.8e stub!\n", iface
, red
, green
, blue
);
2207 static D3DRMZBUFFERMODE WINAPI
d3drm_frame3_GetZbufferMode(IDirect3DRMFrame3
*iface
)
2209 FIXME("iface %p stub!\n", iface
);
2211 return D3DRMZBUFFER_FROMPARENT
;
2214 static D3DRMZBUFFERMODE WINAPI
d3drm_frame2_GetZbufferMode(IDirect3DRMFrame2
*iface
)
2216 FIXME("iface %p stub!\n", iface
);
2218 return D3DRMZBUFFER_FROMPARENT
;
2221 static D3DRMZBUFFERMODE WINAPI
d3drm_frame1_GetZbufferMode(IDirect3DRMFrame
*iface
)
2223 FIXME("iface %p stub!\n", iface
);
2225 return D3DRMZBUFFER_FROMPARENT
;
2228 static HRESULT WINAPI
d3drm_frame3_SetMaterialMode(IDirect3DRMFrame3
*iface
, D3DRMMATERIALMODE mode
)
2230 FIXME("iface %p, mode %#x stub!\n", iface
, mode
);
2235 static HRESULT WINAPI
d3drm_frame2_SetMaterialMode(IDirect3DRMFrame2
*iface
, D3DRMMATERIALMODE mode
)
2237 FIXME("iface %p, mode %#x stub!\n", iface
, mode
);
2242 static HRESULT WINAPI
d3drm_frame1_SetMaterialMode(IDirect3DRMFrame
*iface
, D3DRMMATERIALMODE mode
)
2244 FIXME("iface %p, mode %#x stub!\n", iface
, mode
);
2249 static HRESULT WINAPI
d3drm_frame3_SetOrientation(IDirect3DRMFrame3
*iface
, IDirect3DRMFrame3
*reference
,
2250 D3DVALUE dx
, D3DVALUE dy
, D3DVALUE dz
, D3DVALUE ux
, D3DVALUE uy
, D3DVALUE uz
)
2252 FIXME("iface %p, reference %p, dx %.8e, dy %.8e, dz %.8e, ux %.8e, uy %.8e, uz %.8e stub!\n",
2253 iface
, reference
, dx
, dy
, dz
, ux
, uy
, uz
);
2258 static HRESULT WINAPI
d3drm_frame2_SetOrientation(IDirect3DRMFrame2
*iface
, IDirect3DRMFrame
*reference
,
2259 D3DVALUE dx
, D3DVALUE dy
, D3DVALUE dz
, D3DVALUE ux
, D3DVALUE uy
, D3DVALUE uz
)
2261 FIXME("iface %p, reference %p, dx %.8e, dy %.8e, dz %.8e, ux %.8e, uy %.8e, uz %.8e stub!\n",
2262 iface
, reference
, dx
, dy
, dz
, ux
, uy
, uz
);
2267 static HRESULT WINAPI
d3drm_frame1_SetOrientation(IDirect3DRMFrame
*iface
, IDirect3DRMFrame
*reference
,
2268 D3DVALUE dx
, D3DVALUE dy
, D3DVALUE dz
, D3DVALUE ux
, D3DVALUE uy
, D3DVALUE uz
)
2270 FIXME("iface %p, reference %p, dx %.8e, dy %.8e, dz %.8e, ux %.8e, uy %.8e, uz %.8e stub!\n",
2271 iface
, reference
, dx
, dy
, dz
, ux
, uy
, uz
);
2276 static HRESULT WINAPI
d3drm_frame3_SetPosition(IDirect3DRMFrame3
*iface
,
2277 IDirect3DRMFrame3
*reference
, D3DVALUE x
, D3DVALUE y
, D3DVALUE z
)
2279 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e stub!\n", iface
, reference
, x
, y
, z
);
2284 static HRESULT WINAPI
d3drm_frame2_SetPosition(IDirect3DRMFrame2
*iface
,
2285 IDirect3DRMFrame
*reference
, D3DVALUE x
, D3DVALUE y
, D3DVALUE z
)
2287 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e stub!\n", iface
, reference
, x
, y
, z
);
2292 static HRESULT WINAPI
d3drm_frame1_SetPosition(IDirect3DRMFrame
*iface
,
2293 IDirect3DRMFrame
*reference
, D3DVALUE x
, D3DVALUE y
, D3DVALUE z
)
2295 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e stub!\n", iface
, reference
, x
, y
, z
);
2300 static HRESULT WINAPI
d3drm_frame3_SetRotation(IDirect3DRMFrame3
*iface
,
2301 IDirect3DRMFrame3
*reference
, D3DVALUE x
, D3DVALUE y
, D3DVALUE z
, D3DVALUE theta
)
2303 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e, theta %.8e stub!\n",
2304 iface
, reference
, x
, y
, z
, theta
);
2309 static HRESULT WINAPI
d3drm_frame2_SetRotation(IDirect3DRMFrame2
*iface
,
2310 IDirect3DRMFrame
*reference
, D3DVALUE x
, D3DVALUE y
, D3DVALUE z
, D3DVALUE theta
)
2312 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e, theta %.8e stub!\n",
2313 iface
, reference
, x
, y
, z
, theta
);
2318 static HRESULT WINAPI
d3drm_frame1_SetRotation(IDirect3DRMFrame
*iface
,
2319 IDirect3DRMFrame
*reference
, D3DVALUE x
, D3DVALUE y
, D3DVALUE z
, D3DVALUE theta
)
2321 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e, theta %.8e stub!\n",
2322 iface
, reference
, x
, y
, z
, theta
);
2327 static HRESULT WINAPI
d3drm_frame3_SetSortMode(IDirect3DRMFrame3
*iface
, D3DRMSORTMODE mode
)
2329 FIXME("iface %p, mode %#x stub!\n", iface
, mode
);
2334 static HRESULT WINAPI
d3drm_frame2_SetSortMode(IDirect3DRMFrame2
*iface
, D3DRMSORTMODE mode
)
2336 FIXME("iface %p, mode %#x stub!\n", iface
, mode
);
2341 static HRESULT WINAPI
d3drm_frame1_SetSortMode(IDirect3DRMFrame
*iface
, D3DRMSORTMODE mode
)
2343 FIXME("iface %p, mode %#x stub!\n", iface
, mode
);
2348 static HRESULT WINAPI
d3drm_frame3_SetTexture(IDirect3DRMFrame3
*iface
, IDirect3DRMTexture3
*texture
)
2350 FIXME("iface %p, texture %p stub!\n", iface
, texture
);
2355 static HRESULT WINAPI
d3drm_frame2_SetTexture(IDirect3DRMFrame2
*iface
, IDirect3DRMTexture
*texture
)
2357 FIXME("iface %p, texture %p stub!\n", iface
, texture
);
2362 static HRESULT WINAPI
d3drm_frame1_SetTexture(IDirect3DRMFrame
*iface
, IDirect3DRMTexture
*texture
)
2364 FIXME("iface %p, texture %p stub!\n", iface
, texture
);
2369 static HRESULT WINAPI
d3drm_frame2_SetTextureTopology(IDirect3DRMFrame2
*iface
, BOOL wrap_u
, BOOL wrap_v
)
2371 FIXME("iface %p, wrap_u %#x, wrap_v %#x stub!\n", iface
, wrap_u
, wrap_v
);
2376 static HRESULT WINAPI
d3drm_frame1_SetTextureTopology(IDirect3DRMFrame
*iface
, BOOL wrap_u
, BOOL wrap_v
)
2378 FIXME("iface %p, wrap_u %#x, wrap_v %#x stub!\n", iface
, wrap_u
, wrap_v
);
2383 static HRESULT WINAPI
d3drm_frame3_SetVelocity(IDirect3DRMFrame3
*iface
,
2384 IDirect3DRMFrame3
*reference
, D3DVALUE x
, D3DVALUE y
, D3DVALUE z
, BOOL with_rotation
)
2386 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e, with_rotation %#x.\n",
2387 iface
, reference
, x
, y
, z
, with_rotation
);
2392 static HRESULT WINAPI
d3drm_frame2_SetVelocity(IDirect3DRMFrame2
*iface
,
2393 IDirect3DRMFrame
*reference
, D3DVALUE x
, D3DVALUE y
, D3DVALUE z
, BOOL with_rotation
)
2395 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e, with_rotation %#x stub!\n",
2396 iface
, reference
, x
, y
, z
, with_rotation
);
2401 static HRESULT WINAPI
d3drm_frame1_SetVelocity(IDirect3DRMFrame
*iface
,
2402 IDirect3DRMFrame
*reference
, D3DVALUE x
, D3DVALUE y
, D3DVALUE z
, BOOL with_rotation
)
2404 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e, with_rotation %#x stub!\n",
2405 iface
, reference
, x
, y
, z
, with_rotation
);
2410 static HRESULT WINAPI
d3drm_frame3_SetZbufferMode(IDirect3DRMFrame3
*iface
, D3DRMZBUFFERMODE mode
)
2412 FIXME("iface %p, mode %#x stub!\n", iface
, mode
);
2417 static HRESULT WINAPI
d3drm_frame2_SetZbufferMode(IDirect3DRMFrame2
*iface
, D3DRMZBUFFERMODE mode
)
2419 FIXME("iface %p, mode %#x stub!\n", iface
, mode
);
2424 static HRESULT WINAPI
d3drm_frame1_SetZbufferMode(IDirect3DRMFrame
*iface
, D3DRMZBUFFERMODE mode
)
2426 FIXME("iface %p, mode %#x stub!\n", iface
, mode
);
2431 static HRESULT WINAPI
d3drm_frame3_Transform(IDirect3DRMFrame3
*iface
, D3DVECTOR
*d
, D3DVECTOR
*s
)
2433 FIXME("iface %p, d %p, s %p stub!\n", iface
, d
, s
);
2438 static HRESULT WINAPI
d3drm_frame2_Transform(IDirect3DRMFrame2
*iface
, D3DVECTOR
*d
, D3DVECTOR
*s
)
2440 FIXME("iface %p, d %p, s %p stub!\n", iface
, d
, s
);
2445 static HRESULT WINAPI
d3drm_frame1_Transform(IDirect3DRMFrame
*iface
, D3DVECTOR
*d
, D3DVECTOR
*s
)
2447 FIXME("iface %p, d %p, s %p stub!\n", iface
, d
, s
);
2452 static HRESULT WINAPI
d3drm_frame2_AddMoveCallback2(IDirect3DRMFrame2
*iface
,
2453 D3DRMFRAMEMOVECALLBACK cb
, void *ctx
, DWORD flags
)
2455 FIXME("iface %p, cb %p, ctx %p, flags %#x stub!\n", iface
, cb
, ctx
, flags
);
2460 static HRESULT WINAPI
d3drm_frame3_GetBox(IDirect3DRMFrame3
*iface
, D3DRMBOX
*box
)
2462 FIXME("iface %p, box %p stub!\n", iface
, box
);
2467 static HRESULT WINAPI
d3drm_frame2_GetBox(IDirect3DRMFrame2
*iface
, D3DRMBOX
*box
)
2469 FIXME("iface %p, box %p stub!\n", iface
, box
);
2474 static BOOL WINAPI
d3drm_frame3_GetBoxEnable(IDirect3DRMFrame3
*iface
)
2476 FIXME("iface %p stub!\n", iface
);
2481 static BOOL WINAPI
d3drm_frame2_GetBoxEnable(IDirect3DRMFrame2
*iface
)
2483 FIXME("iface %p stub!\n", iface
);
2488 static HRESULT WINAPI
d3drm_frame3_GetAxes(IDirect3DRMFrame3
*iface
, D3DVECTOR
*dir
, D3DVECTOR
*up
)
2490 FIXME("iface %p, dir %p, up %p stub!\n", iface
, dir
, up
);
2495 static HRESULT WINAPI
d3drm_frame2_GetAxes(IDirect3DRMFrame2
*iface
, D3DVECTOR
*dir
, D3DVECTOR
*up
)
2497 FIXME("iface %p, dir %p, up %p stub!\n", iface
, dir
, up
);
2502 static HRESULT WINAPI
d3drm_frame3_GetMaterial(IDirect3DRMFrame3
*iface
, IDirect3DRMMaterial2
**material
)
2504 FIXME("iface %p, material %p stub!\n", iface
, material
);
2509 static HRESULT WINAPI
d3drm_frame2_GetMaterial(IDirect3DRMFrame2
*iface
, IDirect3DRMMaterial
**material
)
2511 FIXME("iface %p, material %p stub!\n", iface
, material
);
2516 static BOOL WINAPI
d3drm_frame3_GetInheritAxes(IDirect3DRMFrame3
*iface
)
2518 FIXME("iface %p stub!\n", iface
);
2523 static BOOL WINAPI
d3drm_frame2_GetInheritAxes(IDirect3DRMFrame2
*iface
)
2525 FIXME("iface %p stub!\n", iface
);
2530 static HRESULT WINAPI
d3drm_frame3_GetHierarchyBox(IDirect3DRMFrame3
*iface
, D3DRMBOX
*box
)
2532 FIXME("iface %p, box %p stub!\n", iface
, box
);
2537 static HRESULT WINAPI
d3drm_frame2_GetHierarchyBox(IDirect3DRMFrame2
*iface
, D3DRMBOX
*box
)
2539 FIXME("iface %p, box %p stub!\n", iface
, box
);
2544 static HRESULT WINAPI
d3drm_frame3_SetBox(IDirect3DRMFrame3
*iface
, D3DRMBOX
*box
)
2546 FIXME("iface %p, box %p stub!\n", iface
, box
);
2551 static HRESULT WINAPI
d3drm_frame3_SetBoxEnable(IDirect3DRMFrame3
*iface
, BOOL enable
)
2553 FIXME("iface %p, enable %#x stub!\n", iface
, enable
);
2558 static HRESULT WINAPI
d3drm_frame3_SetAxes(IDirect3DRMFrame3
*iface
,
2559 D3DVALUE dx
, D3DVALUE dy
, D3DVALUE dz
, D3DVALUE ux
, D3DVALUE uy
, D3DVALUE uz
)
2561 FIXME("iface %p, dx %.8e, dy %.8e, dz %.8e, ux %.8e, uy %.8e, uz %.8e stub!\n",
2562 iface
, dx
, dy
, dz
, ux
, uy
, uz
);
2567 static HRESULT WINAPI
d3drm_frame3_SetInheritAxes(IDirect3DRMFrame3
*iface
, BOOL inherit
)
2569 FIXME("iface %p, inherit %#x stub!\n", iface
, inherit
);
2574 static HRESULT WINAPI
d3drm_frame3_SetMaterial(IDirect3DRMFrame3
*iface
, IDirect3DRMMaterial2
*material
)
2576 FIXME("iface %p, material %p stub!\n", iface
, material
);
2581 static HRESULT WINAPI
d3drm_frame3_SetQuaternion(IDirect3DRMFrame3
*iface
,
2582 IDirect3DRMFrame3
*reference
, D3DRMQUATERNION
*q
)
2584 FIXME("iface %p, reference %p, q %p stub!\n", iface
, reference
, q
);
2589 static HRESULT WINAPI
d3drm_frame3_RayPick(IDirect3DRMFrame3
*iface
, IDirect3DRMFrame3
*reference
,
2590 D3DRMRAY
*ray
, DWORD flags
, IDirect3DRMPicked2Array
**visuals
)
2592 FIXME("iface %p, reference %p, ray %p, flags %#x, visuals %p stub!\n",
2593 iface
, reference
, ray
, flags
, visuals
);
2598 static HRESULT WINAPI
d3drm_frame3_Save(IDirect3DRMFrame3
*iface
,
2599 const char *filename
, D3DRMXOFFORMAT format
, D3DRMSAVEOPTIONS flags
)
2601 FIXME("iface %p, filename %s, format %#x, flags %#x stub!\n",
2602 iface
, debugstr_a(filename
), format
, flags
);
2607 static HRESULT WINAPI
d3drm_frame3_TransformVectors(IDirect3DRMFrame3
*iface
,
2608 IDirect3DRMFrame3
*reference
, DWORD num
, D3DVECTOR
*dst
, D3DVECTOR
*src
)
2610 FIXME("iface %p, reference %p, num %u, dst %p, src %p stub!\n", iface
, reference
, num
, dst
, src
);
2615 static HRESULT WINAPI
d3drm_frame3_InverseTransformVectors(IDirect3DRMFrame3
*iface
,
2616 IDirect3DRMFrame3
*reference
, DWORD num
, D3DVECTOR
*dst
, D3DVECTOR
*src
)
2618 FIXME("iface %p, reference %p, num %u, dst %p, src %p stub!\n", iface
, reference
, num
, dst
, src
);
2623 static HRESULT WINAPI
d3drm_frame3_SetTraversalOptions(IDirect3DRMFrame3
*iface
, DWORD flags
)
2625 FIXME("iface %p, flags %#x stub!\n", iface
, flags
);
2630 static HRESULT WINAPI
d3drm_frame3_GetTraversalOptions(IDirect3DRMFrame3
*iface
, DWORD
*flags
)
2632 FIXME("iface %p, flags %p stub!\n", iface
, flags
);
2637 static HRESULT WINAPI
d3drm_frame3_SetSceneFogMethod(IDirect3DRMFrame3
*iface
, DWORD flags
)
2639 FIXME("iface %p, flags %#x stub!\n", iface
, flags
);
2644 static HRESULT WINAPI
d3drm_frame3_GetSceneFogMethod(IDirect3DRMFrame3
*iface
, DWORD
*fog_mode
)
2646 FIXME("iface %p, fog_mode %p stub!\n", iface
, fog_mode
);
2651 static HRESULT WINAPI
d3drm_frame3_SetMaterialOverride(IDirect3DRMFrame3
*iface
,
2652 D3DRMMATERIALOVERRIDE
*override
)
2654 FIXME("iface %p, override %p stub!\n", iface
, override
);
2659 static HRESULT WINAPI
d3drm_frame3_GetMaterialOverride(IDirect3DRMFrame3
*iface
,
2660 D3DRMMATERIALOVERRIDE
*override
)
2662 FIXME("iface %p, override %p stub!\n", iface
, override
);
2667 static const struct IDirect3DRMFrame3Vtbl d3drm_frame3_vtbl
=
2669 d3drm_frame3_QueryInterface
,
2670 d3drm_frame3_AddRef
,
2671 d3drm_frame3_Release
,
2673 d3drm_frame3_AddDestroyCallback
,
2674 d3drm_frame3_DeleteDestroyCallback
,
2675 d3drm_frame3_SetAppData
,
2676 d3drm_frame3_GetAppData
,
2677 d3drm_frame3_SetName
,
2678 d3drm_frame3_GetName
,
2679 d3drm_frame3_GetClassName
,
2680 d3drm_frame3_AddChild
,
2681 d3drm_frame3_AddLight
,
2682 d3drm_frame3_AddMoveCallback
,
2683 d3drm_frame3_AddTransform
,
2684 d3drm_frame3_AddTranslation
,
2685 d3drm_frame3_AddScale
,
2686 d3drm_frame3_AddRotation
,
2687 d3drm_frame3_AddVisual
,
2688 d3drm_frame3_GetChildren
,
2689 d3drm_frame3_GetColor
,
2690 d3drm_frame3_GetLights
,
2691 d3drm_frame3_GetMaterialMode
,
2692 d3drm_frame3_GetParent
,
2693 d3drm_frame3_GetPosition
,
2694 d3drm_frame3_GetRotation
,
2695 d3drm_frame3_GetScene
,
2696 d3drm_frame3_GetSortMode
,
2697 d3drm_frame3_GetTexture
,
2698 d3drm_frame3_GetTransform
,
2699 d3drm_frame3_GetVelocity
,
2700 d3drm_frame3_GetOrientation
,
2701 d3drm_frame3_GetVisuals
,
2702 d3drm_frame3_InverseTransform
,
2704 d3drm_frame3_LookAt
,
2706 d3drm_frame3_DeleteChild
,
2707 d3drm_frame3_DeleteLight
,
2708 d3drm_frame3_DeleteMoveCallback
,
2709 d3drm_frame3_DeleteVisual
,
2710 d3drm_frame3_GetSceneBackground
,
2711 d3drm_frame3_GetSceneBackgroundDepth
,
2712 d3drm_frame3_GetSceneFogColor
,
2713 d3drm_frame3_GetSceneFogEnable
,
2714 d3drm_frame3_GetSceneFogMode
,
2715 d3drm_frame3_GetSceneFogParams
,
2716 d3drm_frame3_SetSceneBackground
,
2717 d3drm_frame3_SetSceneBackgroundRGB
,
2718 d3drm_frame3_SetSceneBackgroundDepth
,
2719 d3drm_frame3_SetSceneBackgroundImage
,
2720 d3drm_frame3_SetSceneFogEnable
,
2721 d3drm_frame3_SetSceneFogColor
,
2722 d3drm_frame3_SetSceneFogMode
,
2723 d3drm_frame3_SetSceneFogParams
,
2724 d3drm_frame3_SetColor
,
2725 d3drm_frame3_SetColorRGB
,
2726 d3drm_frame3_GetZbufferMode
,
2727 d3drm_frame3_SetMaterialMode
,
2728 d3drm_frame3_SetOrientation
,
2729 d3drm_frame3_SetPosition
,
2730 d3drm_frame3_SetRotation
,
2731 d3drm_frame3_SetSortMode
,
2732 d3drm_frame3_SetTexture
,
2733 d3drm_frame3_SetVelocity
,
2734 d3drm_frame3_SetZbufferMode
,
2735 d3drm_frame3_Transform
,
2736 d3drm_frame3_GetBox
,
2737 d3drm_frame3_GetBoxEnable
,
2738 d3drm_frame3_GetAxes
,
2739 d3drm_frame3_GetMaterial
,
2740 d3drm_frame3_GetInheritAxes
,
2741 d3drm_frame3_GetHierarchyBox
,
2742 d3drm_frame3_SetBox
,
2743 d3drm_frame3_SetBoxEnable
,
2744 d3drm_frame3_SetAxes
,
2745 d3drm_frame3_SetInheritAxes
,
2746 d3drm_frame3_SetMaterial
,
2747 d3drm_frame3_SetQuaternion
,
2748 d3drm_frame3_RayPick
,
2750 d3drm_frame3_TransformVectors
,
2751 d3drm_frame3_InverseTransformVectors
,
2752 d3drm_frame3_SetTraversalOptions
,
2753 d3drm_frame3_GetTraversalOptions
,
2754 d3drm_frame3_SetSceneFogMethod
,
2755 d3drm_frame3_GetSceneFogMethod
,
2756 d3drm_frame3_SetMaterialOverride
,
2757 d3drm_frame3_GetMaterialOverride
,
2760 static const struct IDirect3DRMFrame2Vtbl d3drm_frame2_vtbl
=
2762 d3drm_frame2_QueryInterface
,
2763 d3drm_frame2_AddRef
,
2764 d3drm_frame2_Release
,
2766 d3drm_frame2_AddDestroyCallback
,
2767 d3drm_frame2_DeleteDestroyCallback
,
2768 d3drm_frame2_SetAppData
,
2769 d3drm_frame2_GetAppData
,
2770 d3drm_frame2_SetName
,
2771 d3drm_frame2_GetName
,
2772 d3drm_frame2_GetClassName
,
2773 d3drm_frame2_AddChild
,
2774 d3drm_frame2_AddLight
,
2775 d3drm_frame2_AddMoveCallback
,
2776 d3drm_frame2_AddTransform
,
2777 d3drm_frame2_AddTranslation
,
2778 d3drm_frame2_AddScale
,
2779 d3drm_frame2_AddRotation
,
2780 d3drm_frame2_AddVisual
,
2781 d3drm_frame2_GetChildren
,
2782 d3drm_frame2_GetColor
,
2783 d3drm_frame2_GetLights
,
2784 d3drm_frame2_GetMaterialMode
,
2785 d3drm_frame2_GetParent
,
2786 d3drm_frame2_GetPosition
,
2787 d3drm_frame2_GetRotation
,
2788 d3drm_frame2_GetScene
,
2789 d3drm_frame2_GetSortMode
,
2790 d3drm_frame2_GetTexture
,
2791 d3drm_frame2_GetTransform
,
2792 d3drm_frame2_GetVelocity
,
2793 d3drm_frame2_GetOrientation
,
2794 d3drm_frame2_GetVisuals
,
2795 d3drm_frame2_GetTextureTopology
,
2796 d3drm_frame2_InverseTransform
,
2798 d3drm_frame2_LookAt
,
2800 d3drm_frame2_DeleteChild
,
2801 d3drm_frame2_DeleteLight
,
2802 d3drm_frame2_DeleteMoveCallback
,
2803 d3drm_frame2_DeleteVisual
,
2804 d3drm_frame2_GetSceneBackground
,
2805 d3drm_frame2_GetSceneBackgroundDepth
,
2806 d3drm_frame2_GetSceneFogColor
,
2807 d3drm_frame2_GetSceneFogEnable
,
2808 d3drm_frame2_GetSceneFogMode
,
2809 d3drm_frame2_GetSceneFogParams
,
2810 d3drm_frame2_SetSceneBackground
,
2811 d3drm_frame2_SetSceneBackgroundRGB
,
2812 d3drm_frame2_SetSceneBackgroundDepth
,
2813 d3drm_frame2_SetSceneBackgroundImage
,
2814 d3drm_frame2_SetSceneFogEnable
,
2815 d3drm_frame2_SetSceneFogColor
,
2816 d3drm_frame2_SetSceneFogMode
,
2817 d3drm_frame2_SetSceneFogParams
,
2818 d3drm_frame2_SetColor
,
2819 d3drm_frame2_SetColorRGB
,
2820 d3drm_frame2_GetZbufferMode
,
2821 d3drm_frame2_SetMaterialMode
,
2822 d3drm_frame2_SetOrientation
,
2823 d3drm_frame2_SetPosition
,
2824 d3drm_frame2_SetRotation
,
2825 d3drm_frame2_SetSortMode
,
2826 d3drm_frame2_SetTexture
,
2827 d3drm_frame2_SetTextureTopology
,
2828 d3drm_frame2_SetVelocity
,
2829 d3drm_frame2_SetZbufferMode
,
2830 d3drm_frame2_Transform
,
2831 d3drm_frame2_AddMoveCallback2
,
2832 d3drm_frame2_GetBox
,
2833 d3drm_frame2_GetBoxEnable
,
2834 d3drm_frame2_GetAxes
,
2835 d3drm_frame2_GetMaterial
,
2836 d3drm_frame2_GetInheritAxes
,
2837 d3drm_frame2_GetHierarchyBox
,
2840 static const struct IDirect3DRMFrameVtbl d3drm_frame1_vtbl
=
2842 d3drm_frame1_QueryInterface
,
2843 d3drm_frame1_AddRef
,
2844 d3drm_frame1_Release
,
2846 d3drm_frame1_AddDestroyCallback
,
2847 d3drm_frame1_DeleteDestroyCallback
,
2848 d3drm_frame1_SetAppData
,
2849 d3drm_frame1_GetAppData
,
2850 d3drm_frame1_SetName
,
2851 d3drm_frame1_GetName
,
2852 d3drm_frame1_GetClassName
,
2853 d3drm_frame1_AddChild
,
2854 d3drm_frame1_AddLight
,
2855 d3drm_frame1_AddMoveCallback
,
2856 d3drm_frame1_AddTransform
,
2857 d3drm_frame1_AddTranslation
,
2858 d3drm_frame1_AddScale
,
2859 d3drm_frame1_AddRotation
,
2860 d3drm_frame1_AddVisual
,
2861 d3drm_frame1_GetChildren
,
2862 d3drm_frame1_GetColor
,
2863 d3drm_frame1_GetLights
,
2864 d3drm_frame1_GetMaterialMode
,
2865 d3drm_frame1_GetParent
,
2866 d3drm_frame1_GetPosition
,
2867 d3drm_frame1_GetRotation
,
2868 d3drm_frame1_GetScene
,
2869 d3drm_frame1_GetSortMode
,
2870 d3drm_frame1_GetTexture
,
2871 d3drm_frame1_GetTransform
,
2872 d3drm_frame1_GetVelocity
,
2873 d3drm_frame1_GetOrientation
,
2874 d3drm_frame1_GetVisuals
,
2875 d3drm_frame1_GetTextureTopology
,
2876 d3drm_frame1_InverseTransform
,
2878 d3drm_frame1_LookAt
,
2880 d3drm_frame1_DeleteChild
,
2881 d3drm_frame1_DeleteLight
,
2882 d3drm_frame1_DeleteMoveCallback
,
2883 d3drm_frame1_DeleteVisual
,
2884 d3drm_frame1_GetSceneBackground
,
2885 d3drm_frame1_GetSceneBackgroundDepth
,
2886 d3drm_frame1_GetSceneFogColor
,
2887 d3drm_frame1_GetSceneFogEnable
,
2888 d3drm_frame1_GetSceneFogMode
,
2889 d3drm_frame1_GetSceneFogParams
,
2890 d3drm_frame1_SetSceneBackground
,
2891 d3drm_frame1_SetSceneBackgroundRGB
,
2892 d3drm_frame1_SetSceneBackgroundDepth
,
2893 d3drm_frame1_SetSceneBackgroundImage
,
2894 d3drm_frame1_SetSceneFogEnable
,
2895 d3drm_frame1_SetSceneFogColor
,
2896 d3drm_frame1_SetSceneFogMode
,
2897 d3drm_frame1_SetSceneFogParams
,
2898 d3drm_frame1_SetColor
,
2899 d3drm_frame1_SetColorRGB
,
2900 d3drm_frame1_GetZbufferMode
,
2901 d3drm_frame1_SetMaterialMode
,
2902 d3drm_frame1_SetOrientation
,
2903 d3drm_frame1_SetPosition
,
2904 d3drm_frame1_SetRotation
,
2905 d3drm_frame1_SetSortMode
,
2906 d3drm_frame1_SetTexture
,
2907 d3drm_frame1_SetTextureTopology
,
2908 d3drm_frame1_SetVelocity
,
2909 d3drm_frame1_SetZbufferMode
,
2910 d3drm_frame1_Transform
,
2913 static inline struct d3drm_frame
*unsafe_impl_from_IDirect3DRMFrame3(IDirect3DRMFrame3
*iface
)
2917 assert(iface
->lpVtbl
== &d3drm_frame3_vtbl
);
2919 return impl_from_IDirect3DRMFrame3(iface
);
2922 struct d3drm_frame
*unsafe_impl_from_IDirect3DRMFrame(IDirect3DRMFrame
*iface
)
2926 assert(iface
->lpVtbl
== &d3drm_frame1_vtbl
);
2928 return impl_from_IDirect3DRMFrame(iface
);
2931 HRESULT
d3drm_frame_create(struct d3drm_frame
**frame
, IUnknown
*parent_frame
, IDirect3DRM
*d3drm
)
2933 struct d3drm_frame
*object
;
2934 HRESULT hr
= D3DRM_OK
;
2936 TRACE("frame %p, parent_frame %p, d3drm %p.\n", frame
, parent_frame
, d3drm
);
2938 if (!(object
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(*object
))))
2939 return E_OUTOFMEMORY
;
2941 object
->IDirect3DRMFrame_iface
.lpVtbl
= &d3drm_frame1_vtbl
;
2942 object
->IDirect3DRMFrame2_iface
.lpVtbl
= &d3drm_frame2_vtbl
;
2943 object
->IDirect3DRMFrame3_iface
.lpVtbl
= &d3drm_frame3_vtbl
;
2944 object
->d3drm
= d3drm
;
2946 d3drm_set_color(&object
->scenebackground
, 0.0f
, 0.0f
, 0.0f
, 1.0f
);
2948 memcpy(object
->transform
, identity
, sizeof(D3DRMMATRIX4D
));
2952 IDirect3DRMFrame3
*p
;
2954 if (FAILED(hr
= IDirect3DRMFrame_QueryInterface(parent_frame
, &IID_IDirect3DRMFrame3
, (void **)&p
)))
2956 HeapFree(GetProcessHeap(), 0, object
);
2959 IDirect3DRMFrame_Release(parent_frame
);
2960 IDirect3DRMFrame3_AddChild(p
, &object
->IDirect3DRMFrame3_iface
);