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 inline struct d3drm_animation
*impl_from_IDirect3DRMAnimation(IDirect3DRMAnimation
*iface
)
94 return CONTAINING_RECORD(iface
, struct d3drm_animation
, IDirect3DRMAnimation_iface
);
97 static inline struct d3drm_animation
*impl_from_IDirect3DRMAnimation2(IDirect3DRMAnimation2
*iface
)
99 return CONTAINING_RECORD(iface
, struct d3drm_animation
, IDirect3DRMAnimation2_iface
);
102 static HRESULT WINAPI
d3drm_frame_array_QueryInterface(IDirect3DRMFrameArray
*iface
, REFIID riid
, void **out
)
104 TRACE("iface %p, riid %s, out %p.\n", iface
, debugstr_guid(riid
), out
);
106 if (IsEqualGUID(riid
, &IID_IDirect3DRMFrameArray
)
107 || IsEqualGUID(riid
, &IID_IUnknown
))
109 IDirect3DRMFrameArray_AddRef(iface
);
114 WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid
));
117 return E_NOINTERFACE
;
120 static ULONG WINAPI
d3drm_frame_array_AddRef(IDirect3DRMFrameArray
*iface
)
122 struct d3drm_frame_array
*array
= impl_from_IDirect3DRMFrameArray(iface
);
123 ULONG refcount
= InterlockedIncrement(&array
->ref
);
125 TRACE("%p increasing refcount to %u.\n", iface
, refcount
);
130 static ULONG WINAPI
d3drm_frame_array_Release(IDirect3DRMFrameArray
*iface
)
132 struct d3drm_frame_array
*array
= impl_from_IDirect3DRMFrameArray(iface
);
133 ULONG refcount
= InterlockedDecrement(&array
->ref
);
136 TRACE("%p decreasing refcount to %u.\n", iface
, refcount
);
140 for (i
= 0; i
< array
->size
; ++i
)
142 IDirect3DRMFrame_Release(array
->frames
[i
]);
144 HeapFree(GetProcessHeap(), 0, array
->frames
);
145 HeapFree(GetProcessHeap(), 0, array
);
151 static DWORD WINAPI
d3drm_frame_array_GetSize(IDirect3DRMFrameArray
*iface
)
153 struct d3drm_frame_array
*array
= impl_from_IDirect3DRMFrameArray(iface
);
155 TRACE("iface %p.\n", iface
);
160 static HRESULT WINAPI
d3drm_frame_array_GetElement(IDirect3DRMFrameArray
*iface
,
161 DWORD index
, IDirect3DRMFrame
**frame
)
163 struct d3drm_frame_array
*array
= impl_from_IDirect3DRMFrameArray(iface
);
165 TRACE("iface %p, index %u, frame %p.\n", iface
, index
, frame
);
168 return D3DRMERR_BADVALUE
;
170 if (index
>= array
->size
)
173 return D3DRMERR_BADVALUE
;
176 IDirect3DRMFrame_AddRef(array
->frames
[index
]);
177 *frame
= array
->frames
[index
];
182 static const struct IDirect3DRMFrameArrayVtbl d3drm_frame_array_vtbl
=
184 d3drm_frame_array_QueryInterface
,
185 d3drm_frame_array_AddRef
,
186 d3drm_frame_array_Release
,
187 d3drm_frame_array_GetSize
,
188 d3drm_frame_array_GetElement
,
191 static struct d3drm_frame_array
*d3drm_frame_array_create(unsigned int frame_count
, IDirect3DRMFrame3
**frames
)
193 struct d3drm_frame_array
*array
;
196 if (!(array
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(*array
))))
199 array
->IDirect3DRMFrameArray_iface
.lpVtbl
= &d3drm_frame_array_vtbl
;
201 array
->size
= frame_count
;
205 if (!(array
->frames
= HeapAlloc(GetProcessHeap(), 0, frame_count
* sizeof(*array
->frames
))))
207 HeapFree(GetProcessHeap(), 0, array
);
211 for (i
= 0; i
< frame_count
; ++i
)
213 IDirect3DRMFrame3_QueryInterface(frames
[i
], &IID_IDirect3DRMFrame
, (void **)&array
->frames
[i
]);
220 static HRESULT WINAPI
d3drm_visual_array_QueryInterface(IDirect3DRMVisualArray
*iface
, REFIID riid
, void **out
)
222 TRACE("iface %p, riid %s, out %p.\n", iface
, debugstr_guid(riid
), out
);
224 if (IsEqualGUID(riid
, &IID_IDirect3DRMVisualArray
)
225 || IsEqualGUID(riid
, &IID_IUnknown
))
227 IDirect3DRMVisualArray_AddRef(iface
);
232 WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid
));
235 return E_NOINTERFACE
;
238 static ULONG WINAPI
d3drm_visual_array_AddRef(IDirect3DRMVisualArray
*iface
)
240 struct d3drm_visual_array
*array
= impl_from_IDirect3DRMVisualArray(iface
);
241 ULONG refcount
= InterlockedIncrement(&array
->ref
);
243 TRACE("%p increasing refcount to %u.\n", iface
, refcount
);
248 static ULONG WINAPI
d3drm_visual_array_Release(IDirect3DRMVisualArray
*iface
)
250 struct d3drm_visual_array
*array
= impl_from_IDirect3DRMVisualArray(iface
);
251 ULONG refcount
= InterlockedDecrement(&array
->ref
);
254 TRACE("%p decreasing refcount to %u.\n", iface
, refcount
);
258 for (i
= 0; i
< array
->size
; ++i
)
260 IDirect3DRMVisual_Release(array
->visuals
[i
]);
262 HeapFree(GetProcessHeap(), 0, array
->visuals
);
263 HeapFree(GetProcessHeap(), 0, array
);
269 static DWORD WINAPI
d3drm_visual_array_GetSize(IDirect3DRMVisualArray
*iface
)
271 struct d3drm_visual_array
*array
= impl_from_IDirect3DRMVisualArray(iface
);
273 TRACE("iface %p.\n", iface
);
278 static HRESULT WINAPI
d3drm_visual_array_GetElement(IDirect3DRMVisualArray
*iface
,
279 DWORD index
, IDirect3DRMVisual
**visual
)
281 struct d3drm_visual_array
*array
= impl_from_IDirect3DRMVisualArray(iface
);
283 TRACE("iface %p, index %u, visual %p.\n", iface
, index
, visual
);
286 return D3DRMERR_BADVALUE
;
288 if (index
>= array
->size
)
291 return D3DRMERR_BADVALUE
;
294 IDirect3DRMVisual_AddRef(array
->visuals
[index
]);
295 *visual
= array
->visuals
[index
];
300 static const struct IDirect3DRMVisualArrayVtbl d3drm_visual_array_vtbl
=
302 d3drm_visual_array_QueryInterface
,
303 d3drm_visual_array_AddRef
,
304 d3drm_visual_array_Release
,
305 d3drm_visual_array_GetSize
,
306 d3drm_visual_array_GetElement
,
309 static struct d3drm_visual_array
*d3drm_visual_array_create(unsigned int visual_count
, IDirect3DRMVisual
**visuals
)
311 struct d3drm_visual_array
*array
;
314 if (!(array
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(*array
))))
317 array
->IDirect3DRMVisualArray_iface
.lpVtbl
= &d3drm_visual_array_vtbl
;
319 array
->size
= visual_count
;
323 if (!(array
->visuals
= HeapAlloc(GetProcessHeap(), 0, visual_count
* sizeof(*array
->visuals
))))
325 HeapFree(GetProcessHeap(), 0, array
);
329 for (i
= 0; i
< visual_count
; ++i
)
331 array
->visuals
[i
] = visuals
[i
];
332 IDirect3DRMVisual_AddRef(array
->visuals
[i
]);
339 static HRESULT WINAPI
d3drm_light_array_QueryInterface(IDirect3DRMLightArray
*iface
, REFIID riid
, void **out
)
341 TRACE("iface %p, riid %s, out %p.\n", iface
, debugstr_guid(riid
), out
);
343 if (IsEqualGUID(riid
, &IID_IDirect3DRMLightArray
)
344 || IsEqualGUID(riid
, &IID_IUnknown
))
346 IDirect3DRMLightArray_AddRef(iface
);
351 WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid
));
354 return E_NOINTERFACE
;
357 static ULONG WINAPI
d3drm_light_array_AddRef(IDirect3DRMLightArray
*iface
)
359 struct d3drm_light_array
*array
= impl_from_IDirect3DRMLightArray(iface
);
360 ULONG refcount
= InterlockedIncrement(&array
->ref
);
362 TRACE("%p increasing refcount to %u.\n", iface
, refcount
);
367 static ULONG WINAPI
d3drm_light_array_Release(IDirect3DRMLightArray
*iface
)
369 struct d3drm_light_array
*array
= impl_from_IDirect3DRMLightArray(iface
);
370 ULONG refcount
= InterlockedDecrement(&array
->ref
);
373 TRACE("%p decreasing refcount to %u.\n", iface
, refcount
);
377 for (i
= 0; i
< array
->size
; ++i
)
379 IDirect3DRMLight_Release(array
->lights
[i
]);
381 HeapFree(GetProcessHeap(), 0, array
->lights
);
382 HeapFree(GetProcessHeap(), 0, array
);
388 static DWORD WINAPI
d3drm_light_array_GetSize(IDirect3DRMLightArray
*iface
)
390 struct d3drm_light_array
*array
= impl_from_IDirect3DRMLightArray(iface
);
392 TRACE("iface %p.\n", iface
);
397 static HRESULT WINAPI
d3drm_light_array_GetElement(IDirect3DRMLightArray
*iface
,
398 DWORD index
, IDirect3DRMLight
**light
)
400 struct d3drm_light_array
*array
= impl_from_IDirect3DRMLightArray(iface
);
402 TRACE("iface %p, index %u, light %p.\n", iface
, index
, light
);
405 return D3DRMERR_BADVALUE
;
407 if (index
>= array
->size
)
410 return D3DRMERR_BADVALUE
;
413 IDirect3DRMLight_AddRef(array
->lights
[index
]);
414 *light
= array
->lights
[index
];
419 static const struct IDirect3DRMLightArrayVtbl d3drm_light_array_vtbl
=
421 d3drm_light_array_QueryInterface
,
422 d3drm_light_array_AddRef
,
423 d3drm_light_array_Release
,
424 d3drm_light_array_GetSize
,
425 d3drm_light_array_GetElement
,
428 static struct d3drm_light_array
*d3drm_light_array_create(unsigned int light_count
, IDirect3DRMLight
**lights
)
430 struct d3drm_light_array
*array
;
433 if (!(array
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(*array
))))
436 array
->IDirect3DRMLightArray_iface
.lpVtbl
= &d3drm_light_array_vtbl
;
438 array
->size
= light_count
;
442 if (!(array
->lights
= HeapAlloc(GetProcessHeap(), 0, light_count
* sizeof(*array
->lights
))))
444 HeapFree(GetProcessHeap(), 0, array
);
448 for (i
= 0; i
< light_count
; ++i
)
450 array
->lights
[i
] = lights
[i
];
451 IDirect3DRMLight_AddRef(array
->lights
[i
]);
458 static HRESULT WINAPI
d3drm_frame3_QueryInterface(IDirect3DRMFrame3
*iface
, REFIID riid
, void **out
)
460 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame3(iface
);
462 TRACE("iface %p, riid %s, out %p.\n", iface
, debugstr_guid(riid
), out
);
464 if (IsEqualGUID(riid
, &IID_IDirect3DRMFrame
)
465 || IsEqualGUID(riid
, &IID_IDirect3DRMObject
)
466 || IsEqualGUID(riid
, &IID_IDirect3DRMVisual
)
467 || IsEqualGUID(riid
, &IID_IUnknown
))
469 *out
= &frame
->IDirect3DRMFrame_iface
;
471 else if (IsEqualGUID(riid
, &IID_IDirect3DRMFrame2
))
473 *out
= &frame
->IDirect3DRMFrame2_iface
;
475 else if (IsEqualGUID(riid
, &IID_IDirect3DRMFrame3
))
477 *out
= &frame
->IDirect3DRMFrame3_iface
;
482 WARN("%s not implemented, returning CLASS_E_CLASSNOTAVAILABLE.\n", debugstr_guid(riid
));
483 return CLASS_E_CLASSNOTAVAILABLE
;
486 IUnknown_AddRef((IUnknown
*)*out
);
490 static HRESULT WINAPI
d3drm_frame2_QueryInterface(IDirect3DRMFrame2
*iface
, REFIID riid
, void **out
)
492 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
494 TRACE("iface %p, riid %s, out %p.\n", iface
, debugstr_guid(riid
), out
);
496 return d3drm_frame3_QueryInterface(&frame
->IDirect3DRMFrame3_iface
, riid
, out
);
499 static HRESULT WINAPI
d3drm_frame1_QueryInterface(IDirect3DRMFrame
*iface
, REFIID riid
, void **out
)
501 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
503 TRACE("iface %p, riid %s, out %p.\n", iface
, debugstr_guid(riid
), out
);
505 return d3drm_frame3_QueryInterface(&frame
->IDirect3DRMFrame3_iface
, riid
, out
);
508 static ULONG WINAPI
d3drm_frame3_AddRef(IDirect3DRMFrame3
*iface
)
510 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame3(iface
);
511 ULONG refcount
= InterlockedIncrement(&frame
->ref
);
513 TRACE("%p increasing refcount to %u.\n", iface
, refcount
);
518 static ULONG WINAPI
d3drm_frame2_AddRef(IDirect3DRMFrame2
*iface
)
520 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
522 TRACE("iface %p.\n", iface
);
524 return d3drm_frame3_AddRef(&frame
->IDirect3DRMFrame3_iface
);
527 static ULONG WINAPI
d3drm_frame1_AddRef(IDirect3DRMFrame
*iface
)
529 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
531 TRACE("iface %p.\n", iface
);
533 return d3drm_frame3_AddRef(&frame
->IDirect3DRMFrame3_iface
);
536 static ULONG WINAPI
d3drm_frame3_Release(IDirect3DRMFrame3
*iface
)
538 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame3(iface
);
539 ULONG refcount
= InterlockedDecrement(&frame
->ref
);
542 TRACE("%p decreasing refcount to %u.\n", iface
, refcount
);
546 d3drm_object_cleanup((IDirect3DRMObject
*)&frame
->IDirect3DRMFrame_iface
, &frame
->obj
);
547 for (i
= 0; i
< frame
->nb_children
; ++i
)
549 IDirect3DRMFrame3_Release(frame
->children
[i
]);
551 HeapFree(GetProcessHeap(), 0, frame
->children
);
552 for (i
= 0; i
< frame
->nb_visuals
; ++i
)
554 IDirect3DRMVisual_Release(frame
->visuals
[i
]);
556 HeapFree(GetProcessHeap(), 0, frame
->visuals
);
557 for (i
= 0; i
< frame
->nb_lights
; ++i
)
559 IDirect3DRMLight_Release(frame
->lights
[i
]);
561 HeapFree(GetProcessHeap(), 0, frame
->lights
);
562 IDirect3DRM_Release(frame
->d3drm
);
563 HeapFree(GetProcessHeap(), 0, frame
);
569 static ULONG WINAPI
d3drm_frame2_Release(IDirect3DRMFrame2
*iface
)
571 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
573 TRACE("iface %p.\n", iface
);
575 return d3drm_frame3_Release(&frame
->IDirect3DRMFrame3_iface
);
578 static ULONG WINAPI
d3drm_frame1_Release(IDirect3DRMFrame
*iface
)
580 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
582 TRACE("iface %p.\n", iface
);
584 return d3drm_frame3_Release(&frame
->IDirect3DRMFrame3_iface
);
587 static HRESULT WINAPI
d3drm_frame3_Clone(IDirect3DRMFrame3
*iface
,
588 IUnknown
*outer
, REFIID iid
, void **out
)
590 FIXME("iface %p, outer %p, iid %s, out %p stub!\n", iface
, outer
, debugstr_guid(iid
), out
);
595 static HRESULT WINAPI
d3drm_frame2_Clone(IDirect3DRMFrame2
*iface
,
596 IUnknown
*outer
, REFIID iid
, void **out
)
598 FIXME("iface %p, outer %p, iid %s, out %p stub!\n", iface
, outer
, debugstr_guid(iid
), out
);
603 static HRESULT WINAPI
d3drm_frame1_Clone(IDirect3DRMFrame
*iface
,
604 IUnknown
*outer
, REFIID iid
, void **out
)
606 FIXME("iface %p, outer %p, iid %s, out %p stub!\n", iface
, outer
, debugstr_guid(iid
), out
);
611 static HRESULT WINAPI
d3drm_frame3_AddDestroyCallback(IDirect3DRMFrame3
*iface
,
612 D3DRMOBJECTCALLBACK cb
, void *ctx
)
614 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame3(iface
);
616 TRACE("iface %p, cb %p, ctx %p.\n", iface
, cb
, ctx
);
618 return d3drm_object_add_destroy_callback(&frame
->obj
, cb
, ctx
);
621 static HRESULT WINAPI
d3drm_frame2_AddDestroyCallback(IDirect3DRMFrame2
*iface
,
622 D3DRMOBJECTCALLBACK cb
, void *ctx
)
624 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
626 TRACE("iface %p, cb %p, ctx %p.\n", iface
, cb
, ctx
);
628 return IDirect3DRMFrame3_AddDestroyCallback(&frame
->IDirect3DRMFrame3_iface
, cb
, ctx
);
631 static HRESULT WINAPI
d3drm_frame1_AddDestroyCallback(IDirect3DRMFrame
*iface
,
632 D3DRMOBJECTCALLBACK cb
, void *ctx
)
634 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
636 TRACE("iface %p, cb %p, ctx %p.\n", iface
, cb
, ctx
);
638 return IDirect3DRMFrame3_AddDestroyCallback(&frame
->IDirect3DRMFrame3_iface
, cb
, ctx
);
641 static HRESULT WINAPI
d3drm_frame3_DeleteDestroyCallback(IDirect3DRMFrame3
*iface
,
642 D3DRMOBJECTCALLBACK cb
, void *ctx
)
644 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame3(iface
);
646 TRACE("iface %p, cb %p, ctx %p.\n", iface
, cb
, ctx
);
648 return d3drm_object_delete_destroy_callback(&frame
->obj
, cb
, ctx
);
651 static HRESULT WINAPI
d3drm_frame2_DeleteDestroyCallback(IDirect3DRMFrame2
*iface
,
652 D3DRMOBJECTCALLBACK cb
, void *ctx
)
654 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
656 TRACE("iface %p, cb %p, ctx %p.\n", iface
, cb
, ctx
);
658 return IDirect3DRMFrame3_DeleteDestroyCallback(&frame
->IDirect3DRMFrame3_iface
, cb
, ctx
);
661 static HRESULT WINAPI
d3drm_frame1_DeleteDestroyCallback(IDirect3DRMFrame
*iface
,
662 D3DRMOBJECTCALLBACK cb
, void *ctx
)
664 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
666 TRACE("iface %p, cb %p, ctx %p.\n", iface
, cb
, ctx
);
668 return IDirect3DRMFrame3_DeleteDestroyCallback(&frame
->IDirect3DRMFrame3_iface
, cb
, ctx
);
671 static HRESULT WINAPI
d3drm_frame3_SetAppData(IDirect3DRMFrame3
*iface
, DWORD data
)
673 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame3(iface
);
675 TRACE("iface %p, data %#x.\n", iface
, data
);
677 frame
->obj
.appdata
= data
;
682 static HRESULT WINAPI
d3drm_frame2_SetAppData(IDirect3DRMFrame2
*iface
, DWORD data
)
684 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
686 TRACE("iface %p, data %#x.\n", iface
, data
);
688 return d3drm_frame3_SetAppData(&frame
->IDirect3DRMFrame3_iface
, data
);
691 static HRESULT WINAPI
d3drm_frame1_SetAppData(IDirect3DRMFrame
*iface
, DWORD data
)
693 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
695 TRACE("iface %p, data %#x.\n", iface
, data
);
697 return d3drm_frame3_SetAppData(&frame
->IDirect3DRMFrame3_iface
, data
);
700 static DWORD WINAPI
d3drm_frame3_GetAppData(IDirect3DRMFrame3
*iface
)
702 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame3(iface
);
704 TRACE("iface %p.\n", iface
);
706 return frame
->obj
.appdata
;
709 static DWORD WINAPI
d3drm_frame2_GetAppData(IDirect3DRMFrame2
*iface
)
711 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
713 TRACE("iface %p.\n", iface
);
715 return d3drm_frame3_GetAppData(&frame
->IDirect3DRMFrame3_iface
);
718 static DWORD WINAPI
d3drm_frame1_GetAppData(IDirect3DRMFrame
*iface
)
720 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
722 TRACE("iface %p.\n", iface
);
724 return d3drm_frame3_GetAppData(&frame
->IDirect3DRMFrame3_iface
);
727 static HRESULT WINAPI
d3drm_frame3_SetName(IDirect3DRMFrame3
*iface
, const char *name
)
729 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame3(iface
);
731 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
733 return d3drm_object_set_name(&frame
->obj
, name
);
736 static HRESULT WINAPI
d3drm_frame2_SetName(IDirect3DRMFrame2
*iface
, const char *name
)
738 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
740 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
742 return d3drm_frame3_SetName(&frame
->IDirect3DRMFrame3_iface
, name
);
745 static HRESULT WINAPI
d3drm_frame1_SetName(IDirect3DRMFrame
*iface
, const char *name
)
747 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
749 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
751 return d3drm_frame3_SetName(&frame
->IDirect3DRMFrame3_iface
, name
);
754 static HRESULT WINAPI
d3drm_frame3_GetName(IDirect3DRMFrame3
*iface
, DWORD
*size
, char *name
)
756 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame3(iface
);
758 TRACE("iface %p, size %p, name %p.\n", iface
, size
, name
);
760 return d3drm_object_get_name(&frame
->obj
, size
, name
);
763 static HRESULT WINAPI
d3drm_frame2_GetName(IDirect3DRMFrame2
*iface
, DWORD
*size
, char *name
)
765 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
767 TRACE("iface %p, size %p, name %p.\n", iface
, size
, name
);
769 return d3drm_frame3_GetName(&frame
->IDirect3DRMFrame3_iface
, size
, name
);
772 static HRESULT WINAPI
d3drm_frame1_GetName(IDirect3DRMFrame
*iface
, DWORD
*size
, char *name
)
774 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
776 TRACE("iface %p, size %p, name %p.\n", iface
, size
, name
);
778 return d3drm_frame3_GetName(&frame
->IDirect3DRMFrame3_iface
, size
, name
);
781 static HRESULT WINAPI
d3drm_frame3_GetClassName(IDirect3DRMFrame3
*iface
, DWORD
*size
, char *name
)
783 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame3(iface
);
785 TRACE("iface %p, size %p, name %p.\n", iface
, size
, name
);
787 return d3drm_object_get_class_name(&frame
->obj
, size
, name
);
790 static HRESULT WINAPI
d3drm_frame2_GetClassName(IDirect3DRMFrame2
*iface
, DWORD
*size
, char *name
)
792 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
794 TRACE("iface %p, size %p, name %p.\n", iface
, size
, name
);
796 return d3drm_frame3_GetClassName(&frame
->IDirect3DRMFrame3_iface
, size
, name
);
799 static HRESULT WINAPI
d3drm_frame1_GetClassName(IDirect3DRMFrame
*iface
, DWORD
*size
, char *name
)
801 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
803 TRACE("iface %p, size %p, name %p.\n", iface
, size
, name
);
805 return d3drm_frame3_GetClassName(&frame
->IDirect3DRMFrame3_iface
, size
, name
);
808 static HRESULT WINAPI
d3drm_frame3_AddChild(IDirect3DRMFrame3
*iface
, IDirect3DRMFrame3
*child
)
810 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame3(iface
);
811 struct d3drm_frame
*child_obj
= unsafe_impl_from_IDirect3DRMFrame3(child
);
813 TRACE("iface %p, child %p.\n", iface
, child
);
816 return D3DRMERR_BADOBJECT
;
818 if (child_obj
->parent
)
820 IDirect3DRMFrame3
* parent
= &child_obj
->parent
->IDirect3DRMFrame3_iface
;
824 /* Passed frame is already a child so return success */
829 /* Remove parent and continue */
830 IDirect3DRMFrame3_DeleteChild(parent
, child
);
834 if (!d3drm_array_reserve((void **)&frame
->children
, &frame
->children_size
,
835 frame
->nb_children
+ 1, sizeof(*frame
->children
)))
836 return E_OUTOFMEMORY
;
838 frame
->children
[frame
->nb_children
++] = child
;
839 IDirect3DRMFrame3_AddRef(child
);
840 child_obj
->parent
= frame
;
845 static HRESULT WINAPI
d3drm_frame2_AddChild(IDirect3DRMFrame2
*iface
, IDirect3DRMFrame
*child
)
847 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
848 IDirect3DRMFrame3
*child3
;
851 TRACE("iface %p, child %p.\n", iface
, child
);
854 return D3DRMERR_BADOBJECT
;
855 hr
= IDirect3DRMFrame_QueryInterface(child
, &IID_IDirect3DRMFrame3
, (void **)&child3
);
857 return D3DRMERR_BADOBJECT
;
858 IDirect3DRMFrame_Release(child
);
860 return d3drm_frame3_AddChild(&frame
->IDirect3DRMFrame3_iface
, child3
);
863 static HRESULT WINAPI
d3drm_frame1_AddChild(IDirect3DRMFrame
*iface
, IDirect3DRMFrame
*child
)
865 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
866 struct d3drm_frame
*child_frame
= unsafe_impl_from_IDirect3DRMFrame(child
);
868 TRACE("iface %p, child %p.\n", iface
, child
);
871 return D3DRMERR_BADOBJECT
;
873 return d3drm_frame3_AddChild(&frame
->IDirect3DRMFrame3_iface
, &child_frame
->IDirect3DRMFrame3_iface
);
876 static HRESULT WINAPI
d3drm_frame3_AddLight(IDirect3DRMFrame3
*iface
, IDirect3DRMLight
*light
)
878 struct d3drm_frame
*This
= impl_from_IDirect3DRMFrame3(iface
);
880 IDirect3DRMLight
** lights
;
882 TRACE("iface %p, light %p.\n", iface
, light
);
885 return D3DRMERR_BADOBJECT
;
887 /* Check if already existing and return gracefully without increasing ref count */
888 for (i
= 0; i
< This
->nb_lights
; i
++)
889 if (This
->lights
[i
] == light
)
892 if ((This
->nb_lights
+ 1) > This
->lights_capacity
)
896 if (!This
->lights_capacity
)
899 lights
= HeapAlloc(GetProcessHeap(), 0, new_capacity
* sizeof(IDirect3DRMLight
*));
903 new_capacity
= This
->lights_capacity
* 2;
904 lights
= HeapReAlloc(GetProcessHeap(), 0, This
->lights
, new_capacity
* sizeof(IDirect3DRMLight
*));
908 return E_OUTOFMEMORY
;
910 This
->lights_capacity
= new_capacity
;
911 This
->lights
= lights
;
914 This
->lights
[This
->nb_lights
++] = light
;
915 IDirect3DRMLight_AddRef(light
);
920 static HRESULT WINAPI
d3drm_frame2_AddLight(IDirect3DRMFrame2
*iface
, IDirect3DRMLight
*light
)
922 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
924 TRACE("iface %p, light %p.\n", iface
, light
);
926 return d3drm_frame3_AddLight(&frame
->IDirect3DRMFrame3_iface
, light
);
929 static HRESULT WINAPI
d3drm_frame1_AddLight(IDirect3DRMFrame
*iface
, IDirect3DRMLight
*light
)
931 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
933 TRACE("iface %p, light %p.\n", iface
, light
);
935 return d3drm_frame3_AddLight(&frame
->IDirect3DRMFrame3_iface
, light
);
938 static HRESULT WINAPI
d3drm_frame3_AddMoveCallback(IDirect3DRMFrame3
*iface
,
939 D3DRMFRAME3MOVECALLBACK cb
, void *ctx
, DWORD flags
)
941 FIXME("iface %p, cb %p, ctx %p flags %#x stub!\n", iface
, cb
, ctx
, flags
);
946 static HRESULT WINAPI
d3drm_frame2_AddMoveCallback(IDirect3DRMFrame2
*iface
,
947 D3DRMFRAMEMOVECALLBACK cb
, void *ctx
)
949 FIXME("iface %p, cb %p, ctx %p stub!\n", iface
, cb
, ctx
);
954 static HRESULT WINAPI
d3drm_frame1_AddMoveCallback(IDirect3DRMFrame
*iface
,
955 D3DRMFRAMEMOVECALLBACK cb
, void *ctx
)
957 FIXME("iface %p, cb %p, ctx %p stub!\n", iface
, cb
, ctx
);
962 static HRESULT WINAPI
d3drm_frame3_AddTransform(IDirect3DRMFrame3
*iface
,
963 D3DRMCOMBINETYPE type
, D3DRMMATRIX4D matrix
)
965 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame3(iface
);
967 TRACE("iface %p, type %#x, matrix %p.\n", iface
, type
, matrix
);
971 case D3DRMCOMBINE_REPLACE
:
972 memcpy(frame
->transform
, matrix
, sizeof(D3DRMMATRIX4D
));
975 case D3DRMCOMBINE_BEFORE
:
976 FIXME("D3DRMCOMBINE_BEFORE not supported yet\n");
979 case D3DRMCOMBINE_AFTER
:
980 FIXME("D3DRMCOMBINE_AFTER not supported yet\n");
984 WARN("Unknown Combine Type %u\n", type
);
985 return D3DRMERR_BADVALUE
;
991 static HRESULT WINAPI
d3drm_frame2_AddTransform(IDirect3DRMFrame2
*iface
,
992 D3DRMCOMBINETYPE type
, D3DRMMATRIX4D matrix
)
994 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
996 TRACE("iface %p, type %#x, matrix %p.\n", iface
, type
, matrix
);
998 return d3drm_frame3_AddTransform(&frame
->IDirect3DRMFrame3_iface
, type
, matrix
);
1001 static HRESULT WINAPI
d3drm_frame1_AddTransform(IDirect3DRMFrame
*iface
,
1002 D3DRMCOMBINETYPE type
, D3DRMMATRIX4D matrix
)
1004 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
1006 TRACE("iface %p, type %#x, matrix %p.\n", iface
, type
, matrix
);
1008 return d3drm_frame3_AddTransform(&frame
->IDirect3DRMFrame3_iface
, type
, matrix
);
1011 static HRESULT WINAPI
d3drm_frame3_AddTranslation(IDirect3DRMFrame3
*iface
,
1012 D3DRMCOMBINETYPE type
, D3DVALUE x
, D3DVALUE y
, D3DVALUE z
)
1014 FIXME("iface %p, type %#x, x %.8e, y %.8e, z %.8e stub!\n", iface
, type
, x
, y
, z
);
1019 static HRESULT WINAPI
d3drm_frame2_AddTranslation(IDirect3DRMFrame2
*iface
,
1020 D3DRMCOMBINETYPE type
, D3DVALUE x
, D3DVALUE y
, D3DVALUE z
)
1022 FIXME("iface %p, type %#x, x %.8e, y %.8e, z %.8e stub!\n", iface
, type
, x
, y
, z
);
1027 static HRESULT WINAPI
d3drm_frame1_AddTranslation(IDirect3DRMFrame
*iface
,
1028 D3DRMCOMBINETYPE type
, D3DVALUE x
, D3DVALUE y
, D3DVALUE z
)
1030 FIXME("iface %p, type %#x, x %.8e, y %.8e, z %.8e stub!\n", iface
, type
, x
, y
, z
);
1035 static HRESULT WINAPI
d3drm_frame3_AddScale(IDirect3DRMFrame3
*iface
,
1036 D3DRMCOMBINETYPE type
, D3DVALUE sx
, D3DVALUE sy
, D3DVALUE sz
)
1038 FIXME("iface %p, type %#x, sx %.8e, sy %.8e, sz %.8e stub!\n", iface
, type
, sx
, sy
, sz
);
1043 static HRESULT WINAPI
d3drm_frame2_AddScale(IDirect3DRMFrame2
*iface
,
1044 D3DRMCOMBINETYPE type
, D3DVALUE sx
, D3DVALUE sy
, D3DVALUE sz
)
1046 FIXME("iface %p, type %#x, sx %.8e, sy %.8e, sz %.8e stub!\n", iface
, type
, sx
, sy
, sz
);
1051 static HRESULT WINAPI
d3drm_frame1_AddScale(IDirect3DRMFrame
*iface
,
1052 D3DRMCOMBINETYPE type
, D3DVALUE sx
, D3DVALUE sy
, D3DVALUE sz
)
1054 FIXME("iface %p, type %#x, sx %.8e, sy %.8e, sz %.8e stub!\n", iface
, type
, sx
, sy
, sz
);
1059 static HRESULT WINAPI
d3drm_frame3_AddRotation(IDirect3DRMFrame3
*iface
,
1060 D3DRMCOMBINETYPE type
, D3DVALUE x
, D3DVALUE y
, D3DVALUE z
, D3DVALUE theta
)
1062 FIXME("iface %p, type %#x, x %.8e, y %.8e, z %.8e, theta %.8e stub!\n",
1063 iface
, type
, x
, y
, z
, theta
);
1068 static HRESULT WINAPI
d3drm_frame2_AddRotation(IDirect3DRMFrame2
*iface
,
1069 D3DRMCOMBINETYPE type
, D3DVALUE x
, D3DVALUE y
, D3DVALUE z
, D3DVALUE theta
)
1071 FIXME("iface %p, type %#x, x %.8e, y %.8e, z %.8e, theta %.8e stub!\n", iface
, type
, x
, y
, z
, theta
);
1076 static HRESULT WINAPI
d3drm_frame1_AddRotation(IDirect3DRMFrame
*iface
,
1077 D3DRMCOMBINETYPE type
, D3DVALUE x
, D3DVALUE y
, D3DVALUE z
, D3DVALUE theta
)
1079 FIXME("iface %p, type %#x, x %.8e, y %.8e, z %.8e, theta %.8e stub!\n", iface
, type
, x
, y
, z
, theta
);
1084 static HRESULT WINAPI
d3drm_frame3_AddVisual(IDirect3DRMFrame3
*iface
, IUnknown
*visual
)
1086 struct d3drm_frame
*This
= impl_from_IDirect3DRMFrame3(iface
);
1088 IDirect3DRMVisual
** visuals
;
1090 TRACE("iface %p, visual %p.\n", iface
, visual
);
1093 return D3DRMERR_BADOBJECT
;
1095 /* Check if already existing and return gracefully without increasing ref count */
1096 for (i
= 0; i
< This
->nb_visuals
; i
++)
1097 if (This
->visuals
[i
] == (IDirect3DRMVisual
*)visual
)
1100 if ((This
->nb_visuals
+ 1) > This
->visuals_capacity
)
1104 if (!This
->visuals_capacity
)
1107 visuals
= HeapAlloc(GetProcessHeap(), 0, new_capacity
* sizeof(IDirect3DRMVisual
*));
1111 new_capacity
= This
->visuals_capacity
* 2;
1112 visuals
= HeapReAlloc(GetProcessHeap(), 0, This
->visuals
, new_capacity
* sizeof(IDirect3DRMVisual
*));
1116 return E_OUTOFMEMORY
;
1118 This
->visuals_capacity
= new_capacity
;
1119 This
->visuals
= visuals
;
1122 This
->visuals
[This
->nb_visuals
++] = (IDirect3DRMVisual
*)visual
;
1123 IDirect3DRMVisual_AddRef(visual
);
1128 static HRESULT WINAPI
d3drm_frame2_AddVisual(IDirect3DRMFrame2
*iface
, IDirect3DRMVisual
*visual
)
1130 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
1132 TRACE("iface %p, visual %p.\n", iface
, visual
);
1134 return d3drm_frame3_AddVisual(&frame
->IDirect3DRMFrame3_iface
, (IUnknown
*)visual
);
1137 static HRESULT WINAPI
d3drm_frame1_AddVisual(IDirect3DRMFrame
*iface
, IDirect3DRMVisual
*visual
)
1139 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
1141 TRACE("iface %p, visual %p.\n", iface
, visual
);
1143 return d3drm_frame3_AddVisual(&frame
->IDirect3DRMFrame3_iface
, (IUnknown
*)visual
);
1146 static HRESULT WINAPI
d3drm_frame3_GetChildren(IDirect3DRMFrame3
*iface
, IDirect3DRMFrameArray
**children
)
1148 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame3(iface
);
1149 struct d3drm_frame_array
*array
;
1151 TRACE("iface %p, children %p.\n", iface
, children
);
1154 return D3DRMERR_BADVALUE
;
1156 if (!(array
= d3drm_frame_array_create(frame
->nb_children
, frame
->children
)))
1157 return E_OUTOFMEMORY
;
1159 *children
= &array
->IDirect3DRMFrameArray_iface
;
1164 static HRESULT WINAPI
d3drm_frame2_GetChildren(IDirect3DRMFrame2
*iface
, IDirect3DRMFrameArray
**children
)
1166 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
1168 TRACE("iface %p, children %p.\n", iface
, children
);
1170 return d3drm_frame3_GetChildren(&frame
->IDirect3DRMFrame3_iface
, children
);
1173 static HRESULT WINAPI
d3drm_frame1_GetChildren(IDirect3DRMFrame
*iface
, IDirect3DRMFrameArray
**children
)
1175 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
1177 TRACE("iface %p, children %p.\n", iface
, children
);
1179 return d3drm_frame3_GetChildren(&frame
->IDirect3DRMFrame3_iface
, children
);
1182 static D3DCOLOR WINAPI
d3drm_frame3_GetColor(IDirect3DRMFrame3
*iface
)
1184 FIXME("iface %p stub!\n", iface
);
1189 static D3DCOLOR WINAPI
d3drm_frame2_GetColor(IDirect3DRMFrame2
*iface
)
1191 FIXME("iface %p stub!\n", iface
);
1196 static D3DCOLOR WINAPI
d3drm_frame1_GetColor(IDirect3DRMFrame
*iface
)
1198 FIXME("iface %p stub!\n", iface
);
1203 static HRESULT WINAPI
d3drm_frame3_GetLights(IDirect3DRMFrame3
*iface
, IDirect3DRMLightArray
**lights
)
1205 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame3(iface
);
1206 struct d3drm_light_array
*array
;
1208 TRACE("iface %p, lights %p.\n", iface
, lights
);
1211 return D3DRMERR_BADVALUE
;
1213 if (!(array
= d3drm_light_array_create(frame
->nb_lights
, frame
->lights
)))
1214 return E_OUTOFMEMORY
;
1216 *lights
= &array
->IDirect3DRMLightArray_iface
;
1221 static HRESULT WINAPI
d3drm_frame2_GetLights(IDirect3DRMFrame2
*iface
, IDirect3DRMLightArray
**lights
)
1223 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
1225 TRACE("iface %p, lights %p.\n", iface
, lights
);
1227 return d3drm_frame3_GetLights(&frame
->IDirect3DRMFrame3_iface
, lights
);
1230 static HRESULT WINAPI
d3drm_frame1_GetLights(IDirect3DRMFrame
*iface
, IDirect3DRMLightArray
**lights
)
1232 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
1234 TRACE("iface %p, lights %p.\n", iface
, lights
);
1236 return d3drm_frame3_GetLights(&frame
->IDirect3DRMFrame3_iface
, lights
);
1239 static D3DRMMATERIALMODE WINAPI
d3drm_frame3_GetMaterialMode(IDirect3DRMFrame3
*iface
)
1241 FIXME("iface %p stub!\n", iface
);
1243 return D3DRMMATERIAL_FROMPARENT
;
1246 static D3DRMMATERIALMODE WINAPI
d3drm_frame2_GetMaterialMode(IDirect3DRMFrame2
*iface
)
1248 FIXME("iface %p stub!\n", iface
);
1250 return D3DRMMATERIAL_FROMPARENT
;
1253 static D3DRMMATERIALMODE WINAPI
d3drm_frame1_GetMaterialMode(IDirect3DRMFrame
*iface
)
1255 FIXME("iface %p stub!\n", iface
);
1257 return D3DRMMATERIAL_FROMPARENT
;
1260 static HRESULT WINAPI
d3drm_frame3_GetParent(IDirect3DRMFrame3
*iface
, IDirect3DRMFrame3
**parent
)
1262 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame3(iface
);
1264 TRACE("iface %p, parent %p.\n", iface
, parent
);
1267 return D3DRMERR_BADVALUE
;
1271 *parent
= &frame
->parent
->IDirect3DRMFrame3_iface
;
1272 IDirect3DRMFrame_AddRef(*parent
);
1282 static HRESULT WINAPI
d3drm_frame2_GetParent(IDirect3DRMFrame2
*iface
, IDirect3DRMFrame
**parent
)
1284 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
1286 TRACE("iface %p, parent %p.\n", iface
, parent
);
1289 return D3DRMERR_BADVALUE
;
1293 *parent
= &frame
->parent
->IDirect3DRMFrame_iface
;
1294 IDirect3DRMFrame_AddRef(*parent
);
1304 static HRESULT WINAPI
d3drm_frame1_GetParent(IDirect3DRMFrame
*iface
, IDirect3DRMFrame
**parent
)
1306 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
1308 TRACE("iface %p, parent %p.\n", iface
, parent
);
1310 return d3drm_frame2_GetParent(&frame
->IDirect3DRMFrame2_iface
, parent
);
1313 static HRESULT WINAPI
d3drm_frame3_GetPosition(IDirect3DRMFrame3
*iface
,
1314 IDirect3DRMFrame3
*reference
, D3DVECTOR
*position
)
1316 FIXME("iface %p, reference %p, position %p stub!\n", iface
, reference
, position
);
1321 static HRESULT WINAPI
d3drm_frame2_GetPosition(IDirect3DRMFrame2
*iface
,
1322 IDirect3DRMFrame
*reference
, D3DVECTOR
*position
)
1324 FIXME("iface %p, reference %p, position %p stub!\n", iface
, reference
, position
);
1329 static HRESULT WINAPI
d3drm_frame1_GetPosition(IDirect3DRMFrame
*iface
,
1330 IDirect3DRMFrame
*reference
, D3DVECTOR
*position
)
1332 FIXME("iface %p, reference %p, position %p stub!\n", iface
, reference
, position
);
1338 static HRESULT WINAPI
d3drm_frame3_GetRotation(IDirect3DRMFrame3
*iface
,
1339 IDirect3DRMFrame3
*reference
, D3DVECTOR
*axis
, D3DVALUE
*theta
)
1341 FIXME("iface %p, reference %p, axis %p, theta %p stub!\n", iface
, reference
, axis
, theta
);
1346 static HRESULT WINAPI
d3drm_frame2_GetRotation(IDirect3DRMFrame2
*iface
,
1347 IDirect3DRMFrame
*reference
, D3DVECTOR
*axis
, D3DVALUE
*theta
)
1349 FIXME("iface %p, reference %p, axis %p, theta %p stub!\n", iface
, reference
, axis
, theta
);
1354 static HRESULT WINAPI
d3drm_frame1_GetRotation(IDirect3DRMFrame
*iface
,
1355 IDirect3DRMFrame
*reference
, D3DVECTOR
*axis
, D3DVALUE
*theta
)
1357 FIXME("iface %p, reference %p, axis %p, theta %p stub!\n", iface
, reference
, axis
, theta
);
1362 static HRESULT WINAPI
d3drm_frame3_GetScene(IDirect3DRMFrame3
*iface
, IDirect3DRMFrame3
**scene
)
1364 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame3(iface
);
1366 TRACE("iface %p, scene %p.\n", iface
, scene
);
1369 return D3DRMERR_BADVALUE
;
1371 while (frame
->parent
)
1372 frame
= frame
->parent
;
1374 *scene
= &frame
->IDirect3DRMFrame3_iface
;
1375 IDirect3DRMFrame3_AddRef(*scene
);
1380 static HRESULT WINAPI
d3drm_frame2_GetScene(IDirect3DRMFrame2
*iface
, IDirect3DRMFrame
**scene
)
1382 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
1383 IDirect3DRMFrame3
*frame3
;
1386 TRACE("iface %p, scene %p.\n", iface
, scene
);
1389 return D3DRMERR_BADVALUE
;
1391 hr
= IDirect3DRMFrame3_GetScene(&frame
->IDirect3DRMFrame3_iface
, &frame3
);
1392 if (FAILED(hr
) || !frame3
)
1398 hr
= IDirect3DRMFrame3_QueryInterface(frame3
, &IID_IDirect3DRMFrame
, (void **)scene
);
1399 IDirect3DRMFrame3_Release(frame3
);
1404 static HRESULT WINAPI
d3drm_frame1_GetScene(IDirect3DRMFrame
*iface
, IDirect3DRMFrame
**scene
)
1406 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
1408 TRACE("iface %p, scene %p.\n", iface
, scene
);
1410 return d3drm_frame2_GetScene(&frame
->IDirect3DRMFrame2_iface
, scene
);
1413 static D3DRMSORTMODE WINAPI
d3drm_frame3_GetSortMode(IDirect3DRMFrame3
*iface
)
1415 FIXME("iface %p stub!\n", iface
);
1417 return D3DRMSORT_FROMPARENT
;
1420 static D3DRMSORTMODE WINAPI
d3drm_frame2_GetSortMode(IDirect3DRMFrame2
*iface
)
1422 FIXME("iface %p stub!\n", iface
);
1424 return D3DRMSORT_FROMPARENT
;
1427 static D3DRMSORTMODE WINAPI
d3drm_frame1_GetSortMode(IDirect3DRMFrame
*iface
)
1429 FIXME("iface %p stub!\n", iface
);
1431 return D3DRMSORT_FROMPARENT
;
1434 static HRESULT WINAPI
d3drm_frame3_GetTexture(IDirect3DRMFrame3
*iface
, IDirect3DRMTexture3
**texture
)
1436 FIXME("iface %p, texture %p stub!\n", iface
, texture
);
1441 static HRESULT WINAPI
d3drm_frame2_GetTexture(IDirect3DRMFrame2
*iface
, IDirect3DRMTexture
**texture
)
1443 FIXME("iface %p, texture %p stub!\n", iface
, texture
);
1448 static HRESULT WINAPI
d3drm_frame1_GetTexture(IDirect3DRMFrame
*iface
, IDirect3DRMTexture
**texture
)
1450 FIXME("iface %p, texture %p stub!\n", iface
, texture
);
1455 static HRESULT WINAPI
d3drm_frame3_GetTransform(IDirect3DRMFrame3
*iface
,
1456 IDirect3DRMFrame3
*reference
, D3DRMMATRIX4D matrix
)
1458 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame3(iface
);
1460 TRACE("iface %p, reference %p, matrix %p.\n", iface
, reference
, matrix
);
1463 FIXME("Specifying a frame as the root of the scene different from the current root frame is not supported yet\n");
1465 memcpy(matrix
, frame
->transform
, sizeof(D3DRMMATRIX4D
));
1470 static HRESULT WINAPI
d3drm_frame2_GetTransform(IDirect3DRMFrame2
*iface
, D3DRMMATRIX4D matrix
)
1472 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
1474 TRACE("iface %p, matrix %p.\n", iface
, matrix
);
1476 memcpy(matrix
, frame
->transform
, sizeof(D3DRMMATRIX4D
));
1481 static HRESULT WINAPI
d3drm_frame1_GetTransform(IDirect3DRMFrame
*iface
, D3DRMMATRIX4D matrix
)
1483 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
1485 TRACE("iface %p, matrix %p.\n", iface
, matrix
);
1487 return d3drm_frame2_GetTransform(&frame
->IDirect3DRMFrame2_iface
, matrix
);
1490 static HRESULT WINAPI
d3drm_frame3_GetVelocity(IDirect3DRMFrame3
*iface
,
1491 IDirect3DRMFrame3
*reference
, D3DVECTOR
*velocity
, BOOL with_rotation
)
1493 FIXME("iface %p, reference %p, velocity %p, with_rotation %#x stub!\n",
1494 iface
, reference
, velocity
, with_rotation
);
1499 static HRESULT WINAPI
d3drm_frame2_GetVelocity(IDirect3DRMFrame2
*iface
,
1500 IDirect3DRMFrame
*reference
, D3DVECTOR
*velocity
, BOOL with_rotation
)
1502 FIXME("iface %p, reference %p, velocity %p, with_rotation %#x stub!\n",
1503 iface
, reference
, velocity
, with_rotation
);
1508 static HRESULT WINAPI
d3drm_frame1_GetVelocity(IDirect3DRMFrame
*iface
,
1509 IDirect3DRMFrame
*reference
, D3DVECTOR
*velocity
, BOOL with_rotation
)
1511 FIXME("iface %p, reference %p, velocity %p, with_rotation %#x stub!\n",
1512 iface
, reference
, velocity
, with_rotation
);
1517 static HRESULT WINAPI
d3drm_frame3_GetOrientation(IDirect3DRMFrame3
*iface
,
1518 IDirect3DRMFrame3
*reference
, D3DVECTOR
*dir
, D3DVECTOR
*up
)
1520 FIXME("iface %p, reference %p, dir %p, up %p stub!\n", iface
, reference
, dir
, up
);
1525 static HRESULT WINAPI
d3drm_frame2_GetOrientation(IDirect3DRMFrame2
*iface
,
1526 IDirect3DRMFrame
*reference
, D3DVECTOR
*dir
, D3DVECTOR
*up
)
1528 FIXME("iface %p, reference %p, dir %p, up %p stub!\n", iface
, reference
, dir
, up
);
1533 static HRESULT WINAPI
d3drm_frame1_GetOrientation(IDirect3DRMFrame
*iface
,
1534 IDirect3DRMFrame
*reference
, D3DVECTOR
*dir
, D3DVECTOR
*up
)
1536 FIXME("iface %p, reference %p, dir %p, up %p stub!\n", iface
, reference
, dir
, up
);
1541 static HRESULT WINAPI
d3drm_frame3_GetVisuals(IDirect3DRMFrame3
*iface
, DWORD
*count
, IUnknown
**visuals
)
1543 FIXME("iface %p, count %p, visuals %p stub!\n", iface
, count
, visuals
);
1548 static HRESULT WINAPI
d3drm_frame2_GetVisuals(IDirect3DRMFrame2
*iface
, IDirect3DRMVisualArray
**visuals
)
1550 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
1551 struct d3drm_visual_array
*array
;
1553 TRACE("iface %p, visuals %p.\n", iface
, visuals
);
1556 return D3DRMERR_BADVALUE
;
1558 if (!(array
= d3drm_visual_array_create(frame
->nb_visuals
, frame
->visuals
)))
1559 return E_OUTOFMEMORY
;
1561 *visuals
= &array
->IDirect3DRMVisualArray_iface
;
1566 static HRESULT WINAPI
d3drm_frame1_GetVisuals(IDirect3DRMFrame
*iface
, IDirect3DRMVisualArray
**visuals
)
1568 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
1570 TRACE("iface %p, visuals %p.\n", iface
, visuals
);
1572 return d3drm_frame2_GetVisuals(&frame
->IDirect3DRMFrame2_iface
, visuals
);
1575 static HRESULT WINAPI
d3drm_frame2_GetTextureTopology(IDirect3DRMFrame2
*iface
, BOOL
*wrap_u
, BOOL
*wrap_v
)
1577 FIXME("iface %p, wrap_u %p, wrap_v %p stub!\n", iface
, wrap_u
, wrap_v
);
1582 static HRESULT WINAPI
d3drm_frame1_GetTextureTopology(IDirect3DRMFrame
*iface
, BOOL
*wrap_u
, BOOL
*wrap_v
)
1584 FIXME("iface %p, wrap_u %p, wrap_v %p stub!\n", iface
, wrap_u
, wrap_v
);
1589 static HRESULT WINAPI
d3drm_frame3_InverseTransform(IDirect3DRMFrame3
*iface
, D3DVECTOR
*d
, D3DVECTOR
*s
)
1591 FIXME("iface %p, d %p, s %p stub!\n", iface
, d
, s
);
1596 static HRESULT WINAPI
d3drm_frame2_InverseTransform(IDirect3DRMFrame2
*iface
, D3DVECTOR
*d
, D3DVECTOR
*s
)
1598 FIXME("iface %p, d %p, s %p stub!\n", iface
, d
, s
);
1603 static HRESULT WINAPI
d3drm_frame1_InverseTransform(IDirect3DRMFrame
*iface
, D3DVECTOR
*d
, D3DVECTOR
*s
)
1605 FIXME("iface %p, d %p, s %p stub!\n", iface
, d
, s
);
1610 static HRESULT WINAPI
d3drm_frame3_Load(IDirect3DRMFrame3
*iface
, void *filename
,
1611 void *name
, D3DRMLOADOPTIONS flags
, D3DRMLOADTEXTURE3CALLBACK cb
, void *ctx
)
1613 FIXME("iface %p, filename %p, name %p, flags %#x, cb %p, ctx %p stub!\n",
1614 iface
, filename
, name
, flags
, cb
, ctx
);
1619 static HRESULT WINAPI
d3drm_frame2_Load(IDirect3DRMFrame2
*iface
, void *filename
,
1620 void *name
, D3DRMLOADOPTIONS flags
, D3DRMLOADTEXTURECALLBACK cb
, void *ctx
)
1622 FIXME("iface %p, filename %p, name %p, flags %#x, cb %p, ctx %p stub!\n",
1623 iface
, filename
, name
, flags
, cb
, ctx
);
1628 static HRESULT WINAPI
d3drm_frame1_Load(IDirect3DRMFrame
*iface
, void *filename
,
1629 void *name
, D3DRMLOADOPTIONS flags
, D3DRMLOADTEXTURECALLBACK cb
, void *ctx
)
1631 FIXME("iface %p, filename %p, name %p, flags %#x, cb %p, ctx %p stub!\n",
1632 iface
, filename
, name
, flags
, cb
, ctx
);
1637 static HRESULT WINAPI
d3drm_frame3_LookAt(IDirect3DRMFrame3
*iface
, IDirect3DRMFrame3
*target
,
1638 IDirect3DRMFrame3
*reference
, D3DRMFRAMECONSTRAINT constraint
)
1640 FIXME("iface %p, target %p, reference %p, constraint %#x stub!\n", iface
, target
, reference
, constraint
);
1645 static HRESULT WINAPI
d3drm_frame2_LookAt(IDirect3DRMFrame2
*iface
, IDirect3DRMFrame
*target
,
1646 IDirect3DRMFrame
*reference
, D3DRMFRAMECONSTRAINT constraint
)
1648 FIXME("iface %p, target %p, reference %p, constraint %#x stub!\n", iface
, target
, reference
, constraint
);
1653 static HRESULT WINAPI
d3drm_frame1_LookAt(IDirect3DRMFrame
*iface
, IDirect3DRMFrame
*target
,
1654 IDirect3DRMFrame
*reference
, D3DRMFRAMECONSTRAINT constraint
)
1656 FIXME("iface %p, target %p, reference %p, constraint %#x stub!\n", iface
, target
, reference
, constraint
);
1661 static HRESULT WINAPI
d3drm_frame3_Move(IDirect3DRMFrame3
*iface
, D3DVALUE delta
)
1663 FIXME("iface %p, delta %.8e stub!\n", iface
, delta
);
1668 static HRESULT WINAPI
d3drm_frame2_Move(IDirect3DRMFrame2
*iface
, D3DVALUE delta
)
1670 FIXME("iface %p, delta %.8e stub!\n", iface
, delta
);
1675 static HRESULT WINAPI
d3drm_frame1_Move(IDirect3DRMFrame
*iface
, D3DVALUE delta
)
1677 FIXME("iface %p, delta %.8e stub!\n", iface
, delta
);
1682 static HRESULT WINAPI
d3drm_frame3_DeleteChild(IDirect3DRMFrame3
*iface
, IDirect3DRMFrame3
*child
)
1684 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame3(iface
);
1685 struct d3drm_frame
*child_impl
= unsafe_impl_from_IDirect3DRMFrame3(child
);
1688 TRACE("iface %p, child %p.\n", iface
, child
);
1691 return D3DRMERR_BADOBJECT
;
1693 /* Check if child exists */
1694 for (i
= 0; i
< frame
->nb_children
; ++i
)
1696 if (frame
->children
[i
] == child
)
1700 if (i
== frame
->nb_children
)
1701 return D3DRMERR_BADVALUE
;
1703 memmove(frame
->children
+ i
, frame
->children
+ i
+ 1, sizeof(*frame
->children
) * (frame
->nb_children
- 1 - i
));
1704 IDirect3DRMFrame3_Release(child
);
1705 child_impl
->parent
= NULL
;
1706 --frame
->nb_children
;
1711 static HRESULT WINAPI
d3drm_frame2_DeleteChild(IDirect3DRMFrame2
*iface
, IDirect3DRMFrame
*child
)
1713 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
1714 IDirect3DRMFrame3
*child3
;
1717 TRACE("iface %p, child %p.\n", iface
, child
);
1720 return D3DRMERR_BADOBJECT
;
1721 if (FAILED(hr
= IDirect3DRMFrame_QueryInterface(child
, &IID_IDirect3DRMFrame3
, (void **)&child3
)))
1722 return D3DRMERR_BADOBJECT
;
1723 IDirect3DRMFrame_Release(child
);
1725 return d3drm_frame3_DeleteChild(&frame
->IDirect3DRMFrame3_iface
, child3
);
1728 static HRESULT WINAPI
d3drm_frame1_DeleteChild(IDirect3DRMFrame
*iface
, IDirect3DRMFrame
*child
)
1730 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
1731 struct d3drm_frame
*child_frame
= unsafe_impl_from_IDirect3DRMFrame(child
);
1733 TRACE("iface %p, child %p.\n", iface
, child
);
1736 return D3DRMERR_BADOBJECT
;
1738 return d3drm_frame3_DeleteChild(&frame
->IDirect3DRMFrame3_iface
, &child_frame
->IDirect3DRMFrame3_iface
);
1741 static HRESULT WINAPI
d3drm_frame3_DeleteLight(IDirect3DRMFrame3
*iface
, IDirect3DRMLight
*light
)
1743 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame3(iface
);
1746 TRACE("iface %p, light %p.\n", iface
, light
);
1749 return D3DRMERR_BADOBJECT
;
1751 /* Check if visual exists */
1752 for (i
= 0; i
< frame
->nb_lights
; ++i
)
1754 if (frame
->lights
[i
] == light
)
1758 if (i
== frame
->nb_lights
)
1759 return D3DRMERR_BADVALUE
;
1761 memmove(frame
->lights
+ i
, frame
->lights
+ i
+ 1, sizeof(*frame
->lights
) * (frame
->nb_lights
- 1 - i
));
1762 IDirect3DRMLight_Release(light
);
1768 static HRESULT WINAPI
d3drm_frame2_DeleteLight(IDirect3DRMFrame2
*iface
, IDirect3DRMLight
*light
)
1770 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
1772 TRACE("iface %p, light %p.\n", iface
, light
);
1774 return d3drm_frame3_DeleteLight(&frame
->IDirect3DRMFrame3_iface
, light
);
1777 static HRESULT WINAPI
d3drm_frame1_DeleteLight(IDirect3DRMFrame
*iface
, IDirect3DRMLight
*light
)
1779 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
1781 TRACE("iface %p, light %p.\n", iface
, light
);
1783 return d3drm_frame3_DeleteLight(&frame
->IDirect3DRMFrame3_iface
, light
);
1786 static HRESULT WINAPI
d3drm_frame3_DeleteMoveCallback(IDirect3DRMFrame3
*iface
,
1787 D3DRMFRAME3MOVECALLBACK cb
, void *ctx
)
1789 FIXME("iface %p, cb %p, ctx %p stub!\n", iface
, cb
, ctx
);
1794 static HRESULT WINAPI
d3drm_frame2_DeleteMoveCallback(IDirect3DRMFrame2
*iface
,
1795 D3DRMFRAMEMOVECALLBACK cb
, void *ctx
)
1797 FIXME("iface %p, cb %p, ctx %p stub!\n", iface
, cb
, ctx
);
1802 static HRESULT WINAPI
d3drm_frame1_DeleteMoveCallback(IDirect3DRMFrame
*iface
,
1803 D3DRMFRAMEMOVECALLBACK cb
, void *ctx
)
1805 FIXME("iface %p, cb %p, ctx %p stub!\n", iface
, cb
, ctx
);
1810 static HRESULT WINAPI
d3drm_frame3_DeleteVisual(IDirect3DRMFrame3
*iface
, IUnknown
*visual
)
1812 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame3(iface
);
1815 TRACE("iface %p, visual %p.\n", iface
, visual
);
1818 return D3DRMERR_BADOBJECT
;
1820 /* Check if visual exists */
1821 for (i
= 0; i
< frame
->nb_visuals
; ++i
)
1823 if (frame
->visuals
[i
] == (IDirect3DRMVisual
*)visual
)
1827 if (i
== frame
->nb_visuals
)
1828 return D3DRMERR_BADVALUE
;
1830 memmove(frame
->visuals
+ i
, frame
->visuals
+ i
+ 1, sizeof(*frame
->visuals
) * (frame
->nb_visuals
- 1 - i
));
1831 IDirect3DRMVisual_Release(visual
);
1832 --frame
->nb_visuals
;
1837 static HRESULT WINAPI
d3drm_frame2_DeleteVisual(IDirect3DRMFrame2
*iface
, IDirect3DRMVisual
*visual
)
1839 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
1841 TRACE("iface %p, visual %p.\n", iface
, visual
);
1843 return d3drm_frame3_DeleteVisual(&frame
->IDirect3DRMFrame3_iface
, (IUnknown
*)visual
);
1846 static HRESULT WINAPI
d3drm_frame1_DeleteVisual(IDirect3DRMFrame
*iface
, IDirect3DRMVisual
*visual
)
1848 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
1850 TRACE("iface %p, visual %p.\n", iface
, visual
);
1852 return d3drm_frame3_DeleteVisual(&frame
->IDirect3DRMFrame3_iface
, (IUnknown
*)visual
);
1855 static D3DCOLOR WINAPI
d3drm_frame3_GetSceneBackground(IDirect3DRMFrame3
*iface
)
1857 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame3(iface
);
1859 TRACE("iface %p.\n", iface
);
1861 return frame
->scenebackground
;
1864 static D3DCOLOR WINAPI
d3drm_frame2_GetSceneBackground(IDirect3DRMFrame2
*iface
)
1866 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
1868 TRACE("iface %p.\n", iface
);
1870 return d3drm_frame3_GetSceneBackground(&frame
->IDirect3DRMFrame3_iface
);
1873 static D3DCOLOR WINAPI
d3drm_frame1_GetSceneBackground(IDirect3DRMFrame
*iface
)
1875 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
1877 TRACE("iface %p.\n", iface
);
1879 return d3drm_frame3_GetSceneBackground(&frame
->IDirect3DRMFrame3_iface
);
1882 static HRESULT WINAPI
d3drm_frame3_GetSceneBackgroundDepth(IDirect3DRMFrame3
*iface
,
1883 IDirectDrawSurface
**surface
)
1885 FIXME("iface %p, surface %p stub!\n", iface
, surface
);
1890 static HRESULT WINAPI
d3drm_frame2_GetSceneBackgroundDepth(IDirect3DRMFrame2
*iface
,
1891 IDirectDrawSurface
**surface
)
1893 FIXME("iface %p, surface %p stub!\n", iface
, surface
);
1898 static HRESULT WINAPI
d3drm_frame1_GetSceneBackgroundDepth(IDirect3DRMFrame
*iface
,
1899 IDirectDrawSurface
**surface
)
1901 FIXME("iface %p, surface %p stub!\n", iface
, surface
);
1906 static D3DCOLOR WINAPI
d3drm_frame3_GetSceneFogColor(IDirect3DRMFrame3
*iface
)
1908 FIXME("iface %p stub!\n", iface
);
1913 static D3DCOLOR WINAPI
d3drm_frame2_GetSceneFogColor(IDirect3DRMFrame2
*iface
)
1915 FIXME("iface %p stub!\n", iface
);
1920 static D3DCOLOR WINAPI
d3drm_frame1_GetSceneFogColor(IDirect3DRMFrame
*iface
)
1922 FIXME("iface %p stub!\n", iface
);
1927 static BOOL WINAPI
d3drm_frame3_GetSceneFogEnable(IDirect3DRMFrame3
*iface
)
1929 FIXME("iface %p stub!\n", iface
);
1934 static BOOL WINAPI
d3drm_frame2_GetSceneFogEnable(IDirect3DRMFrame2
*iface
)
1936 FIXME("iface %p stub!\n", iface
);
1941 static BOOL WINAPI
d3drm_frame1_GetSceneFogEnable(IDirect3DRMFrame
*iface
)
1943 FIXME("iface %p stub!\n", iface
);
1948 static D3DRMFOGMODE WINAPI
d3drm_frame3_GetSceneFogMode(IDirect3DRMFrame3
*iface
)
1950 FIXME("iface %p stub!\n", iface
);
1952 return D3DRMFOG_LINEAR
;
1955 static D3DRMFOGMODE WINAPI
d3drm_frame2_GetSceneFogMode(IDirect3DRMFrame2
*iface
)
1957 FIXME("iface %p stub!\n", iface
);
1959 return D3DRMFOG_LINEAR
;
1962 static D3DRMFOGMODE WINAPI
d3drm_frame1_GetSceneFogMode(IDirect3DRMFrame
*iface
)
1964 FIXME("iface %p stub!\n", iface
);
1966 return D3DRMFOG_LINEAR
;
1969 static HRESULT WINAPI
d3drm_frame3_GetSceneFogParams(IDirect3DRMFrame3
*iface
,
1970 D3DVALUE
*start
, D3DVALUE
*end
, D3DVALUE
*density
)
1972 FIXME("iface %p, start %p, end %p, density %p stub!\n", iface
, start
, end
, density
);
1977 static HRESULT WINAPI
d3drm_frame2_GetSceneFogParams(IDirect3DRMFrame2
*iface
,
1978 D3DVALUE
*start
, D3DVALUE
*end
, D3DVALUE
*density
)
1980 FIXME("iface %p, start %p, end %p, density %p stub!\n", iface
, start
, end
, density
);
1985 static HRESULT WINAPI
d3drm_frame1_GetSceneFogParams(IDirect3DRMFrame
*iface
,
1986 D3DVALUE
*start
, D3DVALUE
*end
, D3DVALUE
*density
)
1988 FIXME("iface %p, start %p, end %p, density %p stub!\n", iface
, start
, end
, density
);
1993 static HRESULT WINAPI
d3drm_frame3_SetSceneBackground(IDirect3DRMFrame3
*iface
, D3DCOLOR color
)
1995 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame3(iface
);
1997 TRACE("iface %p, color 0x%08x.\n", iface
, color
);
1999 frame
->scenebackground
= color
;
2004 static HRESULT WINAPI
d3drm_frame2_SetSceneBackground(IDirect3DRMFrame2
*iface
, D3DCOLOR color
)
2006 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
2008 TRACE("iface %p, color 0x%08x.\n", iface
, color
);
2010 return d3drm_frame3_SetSceneBackground(&frame
->IDirect3DRMFrame3_iface
, color
);
2013 static HRESULT WINAPI
d3drm_frame1_SetSceneBackground(IDirect3DRMFrame
*iface
, D3DCOLOR color
)
2015 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
2017 TRACE("iface %p, color 0x%08x.\n", iface
, color
);
2019 return d3drm_frame3_SetSceneBackground(&frame
->IDirect3DRMFrame3_iface
, color
);
2022 static HRESULT WINAPI
d3drm_frame3_SetSceneBackgroundRGB(IDirect3DRMFrame3
*iface
,
2023 D3DVALUE red
, D3DVALUE green
, D3DVALUE blue
)
2025 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame3(iface
);
2027 TRACE("iface %p, red %.8e, green %.8e, blue %.8e.\n", iface
, red
, green
, blue
);
2029 d3drm_set_color(&frame
->scenebackground
, red
, green
, blue
, 1.0f
);
2034 static HRESULT WINAPI
d3drm_frame2_SetSceneBackgroundRGB(IDirect3DRMFrame2
*iface
,
2035 D3DVALUE red
, D3DVALUE green
, D3DVALUE blue
)
2037 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame2(iface
);
2039 TRACE("iface %p, red %.8e, green %.8e, blue %.8e.\n", iface
, red
, green
, blue
);
2041 return d3drm_frame3_SetSceneBackgroundRGB(&frame
->IDirect3DRMFrame3_iface
, red
, green
, blue
);
2044 static HRESULT WINAPI
d3drm_frame1_SetSceneBackgroundRGB(IDirect3DRMFrame
*iface
,
2045 D3DVALUE red
, D3DVALUE green
, D3DVALUE blue
)
2047 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame(iface
);
2049 TRACE("iface %p, red %.8e, green %.8e, blue %.8e.\n", iface
, red
, green
, blue
);
2051 return d3drm_frame3_SetSceneBackgroundRGB(&frame
->IDirect3DRMFrame3_iface
, red
, green
, blue
);
2054 static HRESULT WINAPI
d3drm_frame3_SetSceneBackgroundDepth(IDirect3DRMFrame3
*iface
,
2055 IDirectDrawSurface
*surface
)
2057 FIXME("iface %p, surface %p stub!\n", iface
, surface
);
2062 static HRESULT WINAPI
d3drm_frame2_SetSceneBackgroundDepth(IDirect3DRMFrame2
*iface
,
2063 IDirectDrawSurface
*surface
)
2065 FIXME("iface %p, surface %p stub!\n", iface
, surface
);
2070 static HRESULT WINAPI
d3drm_frame1_SetSceneBackgroundDepth(IDirect3DRMFrame
*iface
,
2071 IDirectDrawSurface
*surface
)
2073 FIXME("iface %p, surface %p stub!\n", iface
, surface
);
2078 static HRESULT WINAPI
d3drm_frame3_SetSceneBackgroundImage(IDirect3DRMFrame3
*iface
,
2079 IDirect3DRMTexture3
*texture
)
2081 FIXME("iface %p, texture %p stub!\n", iface
, texture
);
2086 static HRESULT WINAPI
d3drm_frame2_SetSceneBackgroundImage(IDirect3DRMFrame2
*iface
,
2087 IDirect3DRMTexture
*texture
)
2089 FIXME("iface %p, texture %p stub!\n", iface
, texture
);
2094 static HRESULT WINAPI
d3drm_frame1_SetSceneBackgroundImage(IDirect3DRMFrame
*iface
,
2095 IDirect3DRMTexture
*texture
)
2097 FIXME("iface %p, texture %p stub!\n", iface
, texture
);
2102 static HRESULT WINAPI
d3drm_frame3_SetSceneFogEnable(IDirect3DRMFrame3
*iface
, BOOL enable
)
2104 FIXME("iface %p, enable %#x stub!\n", iface
, enable
);
2109 static HRESULT WINAPI
d3drm_frame2_SetSceneFogEnable(IDirect3DRMFrame2
*iface
, BOOL enable
)
2111 FIXME("iface %p, enable %#x stub!\n", iface
, enable
);
2116 static HRESULT WINAPI
d3drm_frame1_SetSceneFogEnable(IDirect3DRMFrame
*iface
, BOOL enable
)
2118 FIXME("iface %p, enable %#x stub!\n", iface
, enable
);
2123 static HRESULT WINAPI
d3drm_frame3_SetSceneFogColor(IDirect3DRMFrame3
*iface
, D3DCOLOR color
)
2125 FIXME("iface %p, color 0x%08x stub!\n", iface
, color
);
2130 static HRESULT WINAPI
d3drm_frame2_SetSceneFogColor(IDirect3DRMFrame2
*iface
, D3DCOLOR color
)
2132 FIXME("iface %p, color 0x%08x stub!\n", iface
, color
);
2137 static HRESULT WINAPI
d3drm_frame1_SetSceneFogColor(IDirect3DRMFrame
*iface
, D3DCOLOR color
)
2139 FIXME("iface %p, color 0x%08x stub!\n", iface
, color
);
2144 static HRESULT WINAPI
d3drm_frame3_SetSceneFogMode(IDirect3DRMFrame3
*iface
, D3DRMFOGMODE mode
)
2146 FIXME("iface %p, mode %#x stub!\n", iface
, mode
);
2151 static HRESULT WINAPI
d3drm_frame2_SetSceneFogMode(IDirect3DRMFrame2
*iface
, D3DRMFOGMODE mode
)
2153 FIXME("iface %p, mode %#x stub!\n", iface
, mode
);
2158 static HRESULT WINAPI
d3drm_frame1_SetSceneFogMode(IDirect3DRMFrame
*iface
, D3DRMFOGMODE mode
)
2160 FIXME("iface %p, mode %#x stub!\n", iface
, mode
);
2165 static HRESULT WINAPI
d3drm_frame3_SetSceneFogParams(IDirect3DRMFrame3
*iface
,
2166 D3DVALUE start
, D3DVALUE end
, D3DVALUE density
)
2168 FIXME("iface %p, start %.8e, end %.8e, density %.8e stub!\n", iface
, start
, end
, density
);
2173 static HRESULT WINAPI
d3drm_frame2_SetSceneFogParams(IDirect3DRMFrame2
*iface
,
2174 D3DVALUE start
, D3DVALUE end
, D3DVALUE density
)
2176 FIXME("iface %p, start %.8e, end %.8e, density %.8e stub!\n", iface
, start
, end
, density
);
2181 static HRESULT WINAPI
d3drm_frame1_SetSceneFogParams(IDirect3DRMFrame
*iface
,
2182 D3DVALUE start
, D3DVALUE end
, D3DVALUE density
)
2184 FIXME("iface %p, start %.8e, end %.8e, density %.8e stub!\n", iface
, start
, end
, density
);
2189 static HRESULT WINAPI
d3drm_frame3_SetColor(IDirect3DRMFrame3
*iface
, D3DCOLOR color
)
2191 FIXME("iface %p, color 0x%08x stub!\n", iface
, color
);
2196 static HRESULT WINAPI
d3drm_frame2_SetColor(IDirect3DRMFrame2
*iface
, D3DCOLOR color
)
2198 FIXME("iface %p, color 0x%08x stub!\n", iface
, color
);
2203 static HRESULT WINAPI
d3drm_frame1_SetColor(IDirect3DRMFrame
*iface
, D3DCOLOR color
)
2205 FIXME("iface %p, color 0x%08x stub!\n", iface
, color
);
2210 static HRESULT WINAPI
d3drm_frame3_SetColorRGB(IDirect3DRMFrame3
*iface
,
2211 D3DVALUE red
, D3DVALUE green
, D3DVALUE blue
)
2213 FIXME("iface %p, red %.8e, green %.8e, blue %.8e stub!\n", iface
, red
, green
, blue
);
2218 static HRESULT WINAPI
d3drm_frame2_SetColorRGB(IDirect3DRMFrame2
*iface
,
2219 D3DVALUE red
, D3DVALUE green
, D3DVALUE blue
)
2221 FIXME("iface %p, red %.8e, green %.8e, blue %.8e stub!\n", iface
, red
, green
, blue
);
2226 static HRESULT WINAPI
d3drm_frame1_SetColorRGB(IDirect3DRMFrame
*iface
,
2227 D3DVALUE red
, D3DVALUE green
, D3DVALUE blue
)
2229 FIXME("iface %p, red %.8e, green %.8e, blue %.8e stub!\n", iface
, red
, green
, blue
);
2234 static D3DRMZBUFFERMODE WINAPI
d3drm_frame3_GetZbufferMode(IDirect3DRMFrame3
*iface
)
2236 FIXME("iface %p stub!\n", iface
);
2238 return D3DRMZBUFFER_FROMPARENT
;
2241 static D3DRMZBUFFERMODE WINAPI
d3drm_frame2_GetZbufferMode(IDirect3DRMFrame2
*iface
)
2243 FIXME("iface %p stub!\n", iface
);
2245 return D3DRMZBUFFER_FROMPARENT
;
2248 static D3DRMZBUFFERMODE WINAPI
d3drm_frame1_GetZbufferMode(IDirect3DRMFrame
*iface
)
2250 FIXME("iface %p stub!\n", iface
);
2252 return D3DRMZBUFFER_FROMPARENT
;
2255 static HRESULT WINAPI
d3drm_frame3_SetMaterialMode(IDirect3DRMFrame3
*iface
, D3DRMMATERIALMODE mode
)
2257 FIXME("iface %p, mode %#x stub!\n", iface
, mode
);
2262 static HRESULT WINAPI
d3drm_frame2_SetMaterialMode(IDirect3DRMFrame2
*iface
, D3DRMMATERIALMODE mode
)
2264 FIXME("iface %p, mode %#x stub!\n", iface
, mode
);
2269 static HRESULT WINAPI
d3drm_frame1_SetMaterialMode(IDirect3DRMFrame
*iface
, D3DRMMATERIALMODE mode
)
2271 FIXME("iface %p, mode %#x stub!\n", iface
, mode
);
2276 static HRESULT WINAPI
d3drm_frame3_SetOrientation(IDirect3DRMFrame3
*iface
, IDirect3DRMFrame3
*reference
,
2277 D3DVALUE dx
, D3DVALUE dy
, D3DVALUE dz
, D3DVALUE ux
, D3DVALUE uy
, D3DVALUE uz
)
2279 FIXME("iface %p, reference %p, dx %.8e, dy %.8e, dz %.8e, ux %.8e, uy %.8e, uz %.8e stub!\n",
2280 iface
, reference
, dx
, dy
, dz
, ux
, uy
, uz
);
2285 static HRESULT WINAPI
d3drm_frame2_SetOrientation(IDirect3DRMFrame2
*iface
, IDirect3DRMFrame
*reference
,
2286 D3DVALUE dx
, D3DVALUE dy
, D3DVALUE dz
, D3DVALUE ux
, D3DVALUE uy
, D3DVALUE uz
)
2288 FIXME("iface %p, reference %p, dx %.8e, dy %.8e, dz %.8e, ux %.8e, uy %.8e, uz %.8e stub!\n",
2289 iface
, reference
, dx
, dy
, dz
, ux
, uy
, uz
);
2294 static HRESULT WINAPI
d3drm_frame1_SetOrientation(IDirect3DRMFrame
*iface
, IDirect3DRMFrame
*reference
,
2295 D3DVALUE dx
, D3DVALUE dy
, D3DVALUE dz
, D3DVALUE ux
, D3DVALUE uy
, D3DVALUE uz
)
2297 FIXME("iface %p, reference %p, dx %.8e, dy %.8e, dz %.8e, ux %.8e, uy %.8e, uz %.8e stub!\n",
2298 iface
, reference
, dx
, dy
, dz
, ux
, uy
, uz
);
2303 static HRESULT WINAPI
d3drm_frame3_SetPosition(IDirect3DRMFrame3
*iface
,
2304 IDirect3DRMFrame3
*reference
, D3DVALUE x
, D3DVALUE y
, D3DVALUE z
)
2306 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e stub!\n", iface
, reference
, x
, y
, z
);
2311 static HRESULT WINAPI
d3drm_frame2_SetPosition(IDirect3DRMFrame2
*iface
,
2312 IDirect3DRMFrame
*reference
, D3DVALUE x
, D3DVALUE y
, D3DVALUE z
)
2314 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e stub!\n", iface
, reference
, x
, y
, z
);
2319 static HRESULT WINAPI
d3drm_frame1_SetPosition(IDirect3DRMFrame
*iface
,
2320 IDirect3DRMFrame
*reference
, D3DVALUE x
, D3DVALUE y
, D3DVALUE z
)
2322 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e stub!\n", iface
, reference
, x
, y
, z
);
2327 static HRESULT WINAPI
d3drm_frame3_SetRotation(IDirect3DRMFrame3
*iface
,
2328 IDirect3DRMFrame3
*reference
, D3DVALUE x
, D3DVALUE y
, D3DVALUE z
, D3DVALUE theta
)
2330 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e, theta %.8e stub!\n",
2331 iface
, reference
, x
, y
, z
, theta
);
2336 static HRESULT WINAPI
d3drm_frame2_SetRotation(IDirect3DRMFrame2
*iface
,
2337 IDirect3DRMFrame
*reference
, D3DVALUE x
, D3DVALUE y
, D3DVALUE z
, D3DVALUE theta
)
2339 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e, theta %.8e stub!\n",
2340 iface
, reference
, x
, y
, z
, theta
);
2345 static HRESULT WINAPI
d3drm_frame1_SetRotation(IDirect3DRMFrame
*iface
,
2346 IDirect3DRMFrame
*reference
, D3DVALUE x
, D3DVALUE y
, D3DVALUE z
, D3DVALUE theta
)
2348 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e, theta %.8e stub!\n",
2349 iface
, reference
, x
, y
, z
, theta
);
2354 static HRESULT WINAPI
d3drm_frame3_SetSortMode(IDirect3DRMFrame3
*iface
, D3DRMSORTMODE mode
)
2356 FIXME("iface %p, mode %#x stub!\n", iface
, mode
);
2361 static HRESULT WINAPI
d3drm_frame2_SetSortMode(IDirect3DRMFrame2
*iface
, D3DRMSORTMODE mode
)
2363 FIXME("iface %p, mode %#x stub!\n", iface
, mode
);
2368 static HRESULT WINAPI
d3drm_frame1_SetSortMode(IDirect3DRMFrame
*iface
, D3DRMSORTMODE mode
)
2370 FIXME("iface %p, mode %#x stub!\n", iface
, mode
);
2375 static HRESULT WINAPI
d3drm_frame3_SetTexture(IDirect3DRMFrame3
*iface
, IDirect3DRMTexture3
*texture
)
2377 FIXME("iface %p, texture %p stub!\n", iface
, texture
);
2382 static HRESULT WINAPI
d3drm_frame2_SetTexture(IDirect3DRMFrame2
*iface
, IDirect3DRMTexture
*texture
)
2384 FIXME("iface %p, texture %p stub!\n", iface
, texture
);
2389 static HRESULT WINAPI
d3drm_frame1_SetTexture(IDirect3DRMFrame
*iface
, IDirect3DRMTexture
*texture
)
2391 FIXME("iface %p, texture %p stub!\n", iface
, texture
);
2396 static HRESULT WINAPI
d3drm_frame2_SetTextureTopology(IDirect3DRMFrame2
*iface
, BOOL wrap_u
, BOOL wrap_v
)
2398 FIXME("iface %p, wrap_u %#x, wrap_v %#x stub!\n", iface
, wrap_u
, wrap_v
);
2403 static HRESULT WINAPI
d3drm_frame1_SetTextureTopology(IDirect3DRMFrame
*iface
, BOOL wrap_u
, BOOL wrap_v
)
2405 FIXME("iface %p, wrap_u %#x, wrap_v %#x stub!\n", iface
, wrap_u
, wrap_v
);
2410 static HRESULT WINAPI
d3drm_frame3_SetVelocity(IDirect3DRMFrame3
*iface
,
2411 IDirect3DRMFrame3
*reference
, D3DVALUE x
, D3DVALUE y
, D3DVALUE z
, BOOL with_rotation
)
2413 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e, with_rotation %#x.\n",
2414 iface
, reference
, x
, y
, z
, with_rotation
);
2419 static HRESULT WINAPI
d3drm_frame2_SetVelocity(IDirect3DRMFrame2
*iface
,
2420 IDirect3DRMFrame
*reference
, D3DVALUE x
, D3DVALUE y
, D3DVALUE z
, BOOL with_rotation
)
2422 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e, with_rotation %#x stub!\n",
2423 iface
, reference
, x
, y
, z
, with_rotation
);
2428 static HRESULT WINAPI
d3drm_frame1_SetVelocity(IDirect3DRMFrame
*iface
,
2429 IDirect3DRMFrame
*reference
, D3DVALUE x
, D3DVALUE y
, D3DVALUE z
, BOOL with_rotation
)
2431 FIXME("iface %p, reference %p, x %.8e, y %.8e, z %.8e, with_rotation %#x stub!\n",
2432 iface
, reference
, x
, y
, z
, with_rotation
);
2437 static HRESULT WINAPI
d3drm_frame3_SetZbufferMode(IDirect3DRMFrame3
*iface
, D3DRMZBUFFERMODE mode
)
2439 FIXME("iface %p, mode %#x stub!\n", iface
, mode
);
2444 static HRESULT WINAPI
d3drm_frame2_SetZbufferMode(IDirect3DRMFrame2
*iface
, D3DRMZBUFFERMODE mode
)
2446 FIXME("iface %p, mode %#x stub!\n", iface
, mode
);
2451 static HRESULT WINAPI
d3drm_frame1_SetZbufferMode(IDirect3DRMFrame
*iface
, D3DRMZBUFFERMODE mode
)
2453 FIXME("iface %p, mode %#x stub!\n", iface
, mode
);
2458 static HRESULT WINAPI
d3drm_frame3_Transform(IDirect3DRMFrame3
*iface
, D3DVECTOR
*d
, D3DVECTOR
*s
)
2460 FIXME("iface %p, d %p, s %p stub!\n", iface
, d
, s
);
2465 static HRESULT WINAPI
d3drm_frame2_Transform(IDirect3DRMFrame2
*iface
, D3DVECTOR
*d
, D3DVECTOR
*s
)
2467 FIXME("iface %p, d %p, s %p stub!\n", iface
, d
, s
);
2472 static HRESULT WINAPI
d3drm_frame1_Transform(IDirect3DRMFrame
*iface
, D3DVECTOR
*d
, D3DVECTOR
*s
)
2474 FIXME("iface %p, d %p, s %p stub!\n", iface
, d
, s
);
2479 static HRESULT WINAPI
d3drm_frame2_AddMoveCallback2(IDirect3DRMFrame2
*iface
,
2480 D3DRMFRAMEMOVECALLBACK cb
, void *ctx
, DWORD flags
)
2482 FIXME("iface %p, cb %p, ctx %p, flags %#x stub!\n", iface
, cb
, ctx
, flags
);
2487 static HRESULT WINAPI
d3drm_frame3_GetBox(IDirect3DRMFrame3
*iface
, D3DRMBOX
*box
)
2489 FIXME("iface %p, box %p stub!\n", iface
, box
);
2494 static HRESULT WINAPI
d3drm_frame2_GetBox(IDirect3DRMFrame2
*iface
, D3DRMBOX
*box
)
2496 FIXME("iface %p, box %p stub!\n", iface
, box
);
2501 static BOOL WINAPI
d3drm_frame3_GetBoxEnable(IDirect3DRMFrame3
*iface
)
2503 FIXME("iface %p stub!\n", iface
);
2508 static BOOL WINAPI
d3drm_frame2_GetBoxEnable(IDirect3DRMFrame2
*iface
)
2510 FIXME("iface %p stub!\n", iface
);
2515 static HRESULT WINAPI
d3drm_frame3_GetAxes(IDirect3DRMFrame3
*iface
, D3DVECTOR
*dir
, D3DVECTOR
*up
)
2517 FIXME("iface %p, dir %p, up %p stub!\n", iface
, dir
, up
);
2522 static HRESULT WINAPI
d3drm_frame2_GetAxes(IDirect3DRMFrame2
*iface
, D3DVECTOR
*dir
, D3DVECTOR
*up
)
2524 FIXME("iface %p, dir %p, up %p stub!\n", iface
, dir
, up
);
2529 static HRESULT WINAPI
d3drm_frame3_GetMaterial(IDirect3DRMFrame3
*iface
, IDirect3DRMMaterial2
**material
)
2531 FIXME("iface %p, material %p stub!\n", iface
, material
);
2536 static HRESULT WINAPI
d3drm_frame2_GetMaterial(IDirect3DRMFrame2
*iface
, IDirect3DRMMaterial
**material
)
2538 FIXME("iface %p, material %p stub!\n", iface
, material
);
2543 static BOOL WINAPI
d3drm_frame3_GetInheritAxes(IDirect3DRMFrame3
*iface
)
2545 FIXME("iface %p stub!\n", iface
);
2550 static BOOL WINAPI
d3drm_frame2_GetInheritAxes(IDirect3DRMFrame2
*iface
)
2552 FIXME("iface %p stub!\n", iface
);
2557 static HRESULT WINAPI
d3drm_frame3_GetHierarchyBox(IDirect3DRMFrame3
*iface
, D3DRMBOX
*box
)
2559 FIXME("iface %p, box %p stub!\n", iface
, box
);
2564 static HRESULT WINAPI
d3drm_frame2_GetHierarchyBox(IDirect3DRMFrame2
*iface
, D3DRMBOX
*box
)
2566 FIXME("iface %p, box %p stub!\n", iface
, box
);
2571 static HRESULT WINAPI
d3drm_frame3_SetBox(IDirect3DRMFrame3
*iface
, D3DRMBOX
*box
)
2573 FIXME("iface %p, box %p stub!\n", iface
, box
);
2578 static HRESULT WINAPI
d3drm_frame3_SetBoxEnable(IDirect3DRMFrame3
*iface
, BOOL enable
)
2580 FIXME("iface %p, enable %#x stub!\n", iface
, enable
);
2585 static HRESULT WINAPI
d3drm_frame3_SetAxes(IDirect3DRMFrame3
*iface
,
2586 D3DVALUE dx
, D3DVALUE dy
, D3DVALUE dz
, D3DVALUE ux
, D3DVALUE uy
, D3DVALUE uz
)
2588 FIXME("iface %p, dx %.8e, dy %.8e, dz %.8e, ux %.8e, uy %.8e, uz %.8e stub!\n",
2589 iface
, dx
, dy
, dz
, ux
, uy
, uz
);
2594 static HRESULT WINAPI
d3drm_frame3_SetInheritAxes(IDirect3DRMFrame3
*iface
, BOOL inherit
)
2596 FIXME("iface %p, inherit %#x stub!\n", iface
, inherit
);
2601 static HRESULT WINAPI
d3drm_frame3_SetMaterial(IDirect3DRMFrame3
*iface
, IDirect3DRMMaterial2
*material
)
2603 FIXME("iface %p, material %p stub!\n", iface
, material
);
2608 static HRESULT WINAPI
d3drm_frame3_SetQuaternion(IDirect3DRMFrame3
*iface
,
2609 IDirect3DRMFrame3
*reference
, D3DRMQUATERNION
*q
)
2611 FIXME("iface %p, reference %p, q %p stub!\n", iface
, reference
, q
);
2616 static HRESULT WINAPI
d3drm_frame3_RayPick(IDirect3DRMFrame3
*iface
, IDirect3DRMFrame3
*reference
,
2617 D3DRMRAY
*ray
, DWORD flags
, IDirect3DRMPicked2Array
**visuals
)
2619 FIXME("iface %p, reference %p, ray %p, flags %#x, visuals %p stub!\n",
2620 iface
, reference
, ray
, flags
, visuals
);
2625 static HRESULT WINAPI
d3drm_frame3_Save(IDirect3DRMFrame3
*iface
,
2626 const char *filename
, D3DRMXOFFORMAT format
, D3DRMSAVEOPTIONS flags
)
2628 FIXME("iface %p, filename %s, format %#x, flags %#x stub!\n",
2629 iface
, debugstr_a(filename
), format
, flags
);
2634 static HRESULT WINAPI
d3drm_frame3_TransformVectors(IDirect3DRMFrame3
*iface
,
2635 IDirect3DRMFrame3
*reference
, DWORD num
, D3DVECTOR
*dst
, D3DVECTOR
*src
)
2637 FIXME("iface %p, reference %p, num %u, dst %p, src %p stub!\n", iface
, reference
, num
, dst
, src
);
2642 static HRESULT WINAPI
d3drm_frame3_InverseTransformVectors(IDirect3DRMFrame3
*iface
,
2643 IDirect3DRMFrame3
*reference
, DWORD num
, D3DVECTOR
*dst
, D3DVECTOR
*src
)
2645 FIXME("iface %p, reference %p, num %u, dst %p, src %p stub!\n", iface
, reference
, num
, dst
, src
);
2650 static HRESULT WINAPI
d3drm_frame3_SetTraversalOptions(IDirect3DRMFrame3
*iface
, DWORD options
)
2652 static const DWORD supported_options
= D3DRMFRAME_RENDERENABLE
| D3DRMFRAME_PICKENABLE
;
2653 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame3(iface
);
2655 TRACE("iface %p, options %#x.\n", iface
, options
);
2657 if (options
& ~supported_options
)
2658 return D3DRMERR_BADVALUE
;
2660 frame
->traversal_options
= options
;
2665 static HRESULT WINAPI
d3drm_frame3_GetTraversalOptions(IDirect3DRMFrame3
*iface
, DWORD
*options
)
2667 struct d3drm_frame
*frame
= impl_from_IDirect3DRMFrame3(iface
);
2669 TRACE("iface %p, options %p.\n", iface
, options
);
2672 return D3DRMERR_BADVALUE
;
2674 *options
= frame
->traversal_options
;
2679 static HRESULT WINAPI
d3drm_frame3_SetSceneFogMethod(IDirect3DRMFrame3
*iface
, DWORD flags
)
2681 FIXME("iface %p, flags %#x stub!\n", iface
, flags
);
2686 static HRESULT WINAPI
d3drm_frame3_GetSceneFogMethod(IDirect3DRMFrame3
*iface
, DWORD
*fog_mode
)
2688 FIXME("iface %p, fog_mode %p stub!\n", iface
, fog_mode
);
2693 static HRESULT WINAPI
d3drm_frame3_SetMaterialOverride(IDirect3DRMFrame3
*iface
,
2694 D3DRMMATERIALOVERRIDE
*override
)
2696 FIXME("iface %p, override %p stub!\n", iface
, override
);
2701 static HRESULT WINAPI
d3drm_frame3_GetMaterialOverride(IDirect3DRMFrame3
*iface
,
2702 D3DRMMATERIALOVERRIDE
*override
)
2704 FIXME("iface %p, override %p stub!\n", iface
, override
);
2709 static const struct IDirect3DRMFrame3Vtbl d3drm_frame3_vtbl
=
2711 d3drm_frame3_QueryInterface
,
2712 d3drm_frame3_AddRef
,
2713 d3drm_frame3_Release
,
2715 d3drm_frame3_AddDestroyCallback
,
2716 d3drm_frame3_DeleteDestroyCallback
,
2717 d3drm_frame3_SetAppData
,
2718 d3drm_frame3_GetAppData
,
2719 d3drm_frame3_SetName
,
2720 d3drm_frame3_GetName
,
2721 d3drm_frame3_GetClassName
,
2722 d3drm_frame3_AddChild
,
2723 d3drm_frame3_AddLight
,
2724 d3drm_frame3_AddMoveCallback
,
2725 d3drm_frame3_AddTransform
,
2726 d3drm_frame3_AddTranslation
,
2727 d3drm_frame3_AddScale
,
2728 d3drm_frame3_AddRotation
,
2729 d3drm_frame3_AddVisual
,
2730 d3drm_frame3_GetChildren
,
2731 d3drm_frame3_GetColor
,
2732 d3drm_frame3_GetLights
,
2733 d3drm_frame3_GetMaterialMode
,
2734 d3drm_frame3_GetParent
,
2735 d3drm_frame3_GetPosition
,
2736 d3drm_frame3_GetRotation
,
2737 d3drm_frame3_GetScene
,
2738 d3drm_frame3_GetSortMode
,
2739 d3drm_frame3_GetTexture
,
2740 d3drm_frame3_GetTransform
,
2741 d3drm_frame3_GetVelocity
,
2742 d3drm_frame3_GetOrientation
,
2743 d3drm_frame3_GetVisuals
,
2744 d3drm_frame3_InverseTransform
,
2746 d3drm_frame3_LookAt
,
2748 d3drm_frame3_DeleteChild
,
2749 d3drm_frame3_DeleteLight
,
2750 d3drm_frame3_DeleteMoveCallback
,
2751 d3drm_frame3_DeleteVisual
,
2752 d3drm_frame3_GetSceneBackground
,
2753 d3drm_frame3_GetSceneBackgroundDepth
,
2754 d3drm_frame3_GetSceneFogColor
,
2755 d3drm_frame3_GetSceneFogEnable
,
2756 d3drm_frame3_GetSceneFogMode
,
2757 d3drm_frame3_GetSceneFogParams
,
2758 d3drm_frame3_SetSceneBackground
,
2759 d3drm_frame3_SetSceneBackgroundRGB
,
2760 d3drm_frame3_SetSceneBackgroundDepth
,
2761 d3drm_frame3_SetSceneBackgroundImage
,
2762 d3drm_frame3_SetSceneFogEnable
,
2763 d3drm_frame3_SetSceneFogColor
,
2764 d3drm_frame3_SetSceneFogMode
,
2765 d3drm_frame3_SetSceneFogParams
,
2766 d3drm_frame3_SetColor
,
2767 d3drm_frame3_SetColorRGB
,
2768 d3drm_frame3_GetZbufferMode
,
2769 d3drm_frame3_SetMaterialMode
,
2770 d3drm_frame3_SetOrientation
,
2771 d3drm_frame3_SetPosition
,
2772 d3drm_frame3_SetRotation
,
2773 d3drm_frame3_SetSortMode
,
2774 d3drm_frame3_SetTexture
,
2775 d3drm_frame3_SetVelocity
,
2776 d3drm_frame3_SetZbufferMode
,
2777 d3drm_frame3_Transform
,
2778 d3drm_frame3_GetBox
,
2779 d3drm_frame3_GetBoxEnable
,
2780 d3drm_frame3_GetAxes
,
2781 d3drm_frame3_GetMaterial
,
2782 d3drm_frame3_GetInheritAxes
,
2783 d3drm_frame3_GetHierarchyBox
,
2784 d3drm_frame3_SetBox
,
2785 d3drm_frame3_SetBoxEnable
,
2786 d3drm_frame3_SetAxes
,
2787 d3drm_frame3_SetInheritAxes
,
2788 d3drm_frame3_SetMaterial
,
2789 d3drm_frame3_SetQuaternion
,
2790 d3drm_frame3_RayPick
,
2792 d3drm_frame3_TransformVectors
,
2793 d3drm_frame3_InverseTransformVectors
,
2794 d3drm_frame3_SetTraversalOptions
,
2795 d3drm_frame3_GetTraversalOptions
,
2796 d3drm_frame3_SetSceneFogMethod
,
2797 d3drm_frame3_GetSceneFogMethod
,
2798 d3drm_frame3_SetMaterialOverride
,
2799 d3drm_frame3_GetMaterialOverride
,
2802 static const struct IDirect3DRMFrame2Vtbl d3drm_frame2_vtbl
=
2804 d3drm_frame2_QueryInterface
,
2805 d3drm_frame2_AddRef
,
2806 d3drm_frame2_Release
,
2808 d3drm_frame2_AddDestroyCallback
,
2809 d3drm_frame2_DeleteDestroyCallback
,
2810 d3drm_frame2_SetAppData
,
2811 d3drm_frame2_GetAppData
,
2812 d3drm_frame2_SetName
,
2813 d3drm_frame2_GetName
,
2814 d3drm_frame2_GetClassName
,
2815 d3drm_frame2_AddChild
,
2816 d3drm_frame2_AddLight
,
2817 d3drm_frame2_AddMoveCallback
,
2818 d3drm_frame2_AddTransform
,
2819 d3drm_frame2_AddTranslation
,
2820 d3drm_frame2_AddScale
,
2821 d3drm_frame2_AddRotation
,
2822 d3drm_frame2_AddVisual
,
2823 d3drm_frame2_GetChildren
,
2824 d3drm_frame2_GetColor
,
2825 d3drm_frame2_GetLights
,
2826 d3drm_frame2_GetMaterialMode
,
2827 d3drm_frame2_GetParent
,
2828 d3drm_frame2_GetPosition
,
2829 d3drm_frame2_GetRotation
,
2830 d3drm_frame2_GetScene
,
2831 d3drm_frame2_GetSortMode
,
2832 d3drm_frame2_GetTexture
,
2833 d3drm_frame2_GetTransform
,
2834 d3drm_frame2_GetVelocity
,
2835 d3drm_frame2_GetOrientation
,
2836 d3drm_frame2_GetVisuals
,
2837 d3drm_frame2_GetTextureTopology
,
2838 d3drm_frame2_InverseTransform
,
2840 d3drm_frame2_LookAt
,
2842 d3drm_frame2_DeleteChild
,
2843 d3drm_frame2_DeleteLight
,
2844 d3drm_frame2_DeleteMoveCallback
,
2845 d3drm_frame2_DeleteVisual
,
2846 d3drm_frame2_GetSceneBackground
,
2847 d3drm_frame2_GetSceneBackgroundDepth
,
2848 d3drm_frame2_GetSceneFogColor
,
2849 d3drm_frame2_GetSceneFogEnable
,
2850 d3drm_frame2_GetSceneFogMode
,
2851 d3drm_frame2_GetSceneFogParams
,
2852 d3drm_frame2_SetSceneBackground
,
2853 d3drm_frame2_SetSceneBackgroundRGB
,
2854 d3drm_frame2_SetSceneBackgroundDepth
,
2855 d3drm_frame2_SetSceneBackgroundImage
,
2856 d3drm_frame2_SetSceneFogEnable
,
2857 d3drm_frame2_SetSceneFogColor
,
2858 d3drm_frame2_SetSceneFogMode
,
2859 d3drm_frame2_SetSceneFogParams
,
2860 d3drm_frame2_SetColor
,
2861 d3drm_frame2_SetColorRGB
,
2862 d3drm_frame2_GetZbufferMode
,
2863 d3drm_frame2_SetMaterialMode
,
2864 d3drm_frame2_SetOrientation
,
2865 d3drm_frame2_SetPosition
,
2866 d3drm_frame2_SetRotation
,
2867 d3drm_frame2_SetSortMode
,
2868 d3drm_frame2_SetTexture
,
2869 d3drm_frame2_SetTextureTopology
,
2870 d3drm_frame2_SetVelocity
,
2871 d3drm_frame2_SetZbufferMode
,
2872 d3drm_frame2_Transform
,
2873 d3drm_frame2_AddMoveCallback2
,
2874 d3drm_frame2_GetBox
,
2875 d3drm_frame2_GetBoxEnable
,
2876 d3drm_frame2_GetAxes
,
2877 d3drm_frame2_GetMaterial
,
2878 d3drm_frame2_GetInheritAxes
,
2879 d3drm_frame2_GetHierarchyBox
,
2882 static const struct IDirect3DRMFrameVtbl d3drm_frame1_vtbl
=
2884 d3drm_frame1_QueryInterface
,
2885 d3drm_frame1_AddRef
,
2886 d3drm_frame1_Release
,
2888 d3drm_frame1_AddDestroyCallback
,
2889 d3drm_frame1_DeleteDestroyCallback
,
2890 d3drm_frame1_SetAppData
,
2891 d3drm_frame1_GetAppData
,
2892 d3drm_frame1_SetName
,
2893 d3drm_frame1_GetName
,
2894 d3drm_frame1_GetClassName
,
2895 d3drm_frame1_AddChild
,
2896 d3drm_frame1_AddLight
,
2897 d3drm_frame1_AddMoveCallback
,
2898 d3drm_frame1_AddTransform
,
2899 d3drm_frame1_AddTranslation
,
2900 d3drm_frame1_AddScale
,
2901 d3drm_frame1_AddRotation
,
2902 d3drm_frame1_AddVisual
,
2903 d3drm_frame1_GetChildren
,
2904 d3drm_frame1_GetColor
,
2905 d3drm_frame1_GetLights
,
2906 d3drm_frame1_GetMaterialMode
,
2907 d3drm_frame1_GetParent
,
2908 d3drm_frame1_GetPosition
,
2909 d3drm_frame1_GetRotation
,
2910 d3drm_frame1_GetScene
,
2911 d3drm_frame1_GetSortMode
,
2912 d3drm_frame1_GetTexture
,
2913 d3drm_frame1_GetTransform
,
2914 d3drm_frame1_GetVelocity
,
2915 d3drm_frame1_GetOrientation
,
2916 d3drm_frame1_GetVisuals
,
2917 d3drm_frame1_GetTextureTopology
,
2918 d3drm_frame1_InverseTransform
,
2920 d3drm_frame1_LookAt
,
2922 d3drm_frame1_DeleteChild
,
2923 d3drm_frame1_DeleteLight
,
2924 d3drm_frame1_DeleteMoveCallback
,
2925 d3drm_frame1_DeleteVisual
,
2926 d3drm_frame1_GetSceneBackground
,
2927 d3drm_frame1_GetSceneBackgroundDepth
,
2928 d3drm_frame1_GetSceneFogColor
,
2929 d3drm_frame1_GetSceneFogEnable
,
2930 d3drm_frame1_GetSceneFogMode
,
2931 d3drm_frame1_GetSceneFogParams
,
2932 d3drm_frame1_SetSceneBackground
,
2933 d3drm_frame1_SetSceneBackgroundRGB
,
2934 d3drm_frame1_SetSceneBackgroundDepth
,
2935 d3drm_frame1_SetSceneBackgroundImage
,
2936 d3drm_frame1_SetSceneFogEnable
,
2937 d3drm_frame1_SetSceneFogColor
,
2938 d3drm_frame1_SetSceneFogMode
,
2939 d3drm_frame1_SetSceneFogParams
,
2940 d3drm_frame1_SetColor
,
2941 d3drm_frame1_SetColorRGB
,
2942 d3drm_frame1_GetZbufferMode
,
2943 d3drm_frame1_SetMaterialMode
,
2944 d3drm_frame1_SetOrientation
,
2945 d3drm_frame1_SetPosition
,
2946 d3drm_frame1_SetRotation
,
2947 d3drm_frame1_SetSortMode
,
2948 d3drm_frame1_SetTexture
,
2949 d3drm_frame1_SetTextureTopology
,
2950 d3drm_frame1_SetVelocity
,
2951 d3drm_frame1_SetZbufferMode
,
2952 d3drm_frame1_Transform
,
2955 static inline struct d3drm_frame
*unsafe_impl_from_IDirect3DRMFrame3(IDirect3DRMFrame3
*iface
)
2959 assert(iface
->lpVtbl
== &d3drm_frame3_vtbl
);
2961 return impl_from_IDirect3DRMFrame3(iface
);
2964 struct d3drm_frame
*unsafe_impl_from_IDirect3DRMFrame(IDirect3DRMFrame
*iface
)
2968 assert(iface
->lpVtbl
== &d3drm_frame1_vtbl
);
2970 return impl_from_IDirect3DRMFrame(iface
);
2973 HRESULT
d3drm_frame_create(struct d3drm_frame
**frame
, IUnknown
*parent_frame
, IDirect3DRM
*d3drm
)
2975 static const char classname
[] = "Frame";
2976 struct d3drm_frame
*object
;
2977 HRESULT hr
= D3DRM_OK
;
2979 TRACE("frame %p, parent_frame %p, d3drm %p.\n", frame
, parent_frame
, d3drm
);
2981 if (!(object
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(*object
))))
2982 return E_OUTOFMEMORY
;
2984 object
->IDirect3DRMFrame_iface
.lpVtbl
= &d3drm_frame1_vtbl
;
2985 object
->IDirect3DRMFrame2_iface
.lpVtbl
= &d3drm_frame2_vtbl
;
2986 object
->IDirect3DRMFrame3_iface
.lpVtbl
= &d3drm_frame3_vtbl
;
2987 object
->d3drm
= d3drm
;
2989 d3drm_set_color(&object
->scenebackground
, 0.0f
, 0.0f
, 0.0f
, 1.0f
);
2990 object
->traversal_options
= D3DRMFRAME_RENDERENABLE
| D3DRMFRAME_PICKENABLE
;
2992 d3drm_object_init(&object
->obj
, classname
);
2994 memcpy(object
->transform
, identity
, sizeof(D3DRMMATRIX4D
));
2998 IDirect3DRMFrame3
*p
;
3000 if (FAILED(hr
= IDirect3DRMFrame_QueryInterface(parent_frame
, &IID_IDirect3DRMFrame3
, (void **)&p
)))
3002 HeapFree(GetProcessHeap(), 0, object
);
3005 IDirect3DRMFrame_Release(parent_frame
);
3006 IDirect3DRMFrame3_AddChild(p
, &object
->IDirect3DRMFrame3_iface
);
3009 IDirect3DRM_AddRef(object
->d3drm
);
3016 static HRESULT WINAPI
d3drm_animation2_QueryInterface(IDirect3DRMAnimation2
*iface
, REFIID riid
, void **out
)
3018 struct d3drm_animation
*animation
= impl_from_IDirect3DRMAnimation2(iface
);
3020 TRACE("iface %p, riid %s, out %p.\n", iface
, debugstr_guid(riid
), out
);
3022 if (IsEqualGUID(riid
, &IID_IDirect3DRMAnimation
)
3023 || IsEqualGUID(riid
, &IID_IDirect3DRMObject
)
3024 || IsEqualGUID(riid
, &IID_IUnknown
))
3026 *out
= &animation
->IDirect3DRMAnimation_iface
;
3028 else if (IsEqualGUID(riid
, &IID_IDirect3DRMAnimation2
))
3030 *out
= &animation
->IDirect3DRMAnimation2_iface
;
3035 WARN("%s not implemented, returning CLASS_E_CLASSNOTAVAILABLE.\n", debugstr_guid(riid
));
3036 return CLASS_E_CLASSNOTAVAILABLE
;
3039 IUnknown_AddRef((IUnknown
*)*out
);
3043 static HRESULT WINAPI
d3drm_animation1_QueryInterface(IDirect3DRMAnimation
*iface
, REFIID riid
, void **out
)
3045 struct d3drm_animation
*animation
= impl_from_IDirect3DRMAnimation(iface
);
3047 TRACE("iface %p, riid %s, out %p.\n", iface
, debugstr_guid(riid
), out
);
3049 return IDirect3DRMAnimation2_QueryInterface(&animation
->IDirect3DRMAnimation2_iface
, riid
, out
);
3052 static ULONG WINAPI
d3drm_animation2_AddRef(IDirect3DRMAnimation2
*iface
)
3054 struct d3drm_animation
*animation
= impl_from_IDirect3DRMAnimation2(iface
);
3055 ULONG refcount
= InterlockedIncrement(&animation
->ref
);
3057 TRACE("%p increasing refcount to %u.\n", iface
, refcount
);
3062 static ULONG WINAPI
d3drm_animation1_AddRef(IDirect3DRMAnimation
*iface
)
3064 struct d3drm_animation
*animation
= impl_from_IDirect3DRMAnimation(iface
);
3065 return IDirect3DRMAnimation2_AddRef(&animation
->IDirect3DRMAnimation2_iface
);
3068 static ULONG WINAPI
d3drm_animation2_Release(IDirect3DRMAnimation2
*iface
)
3070 struct d3drm_animation
*animation
= impl_from_IDirect3DRMAnimation2(iface
);
3071 ULONG refcount
= InterlockedDecrement(&animation
->ref
);
3073 TRACE("%p decreasing refcount to %u.\n", iface
, refcount
);
3077 d3drm_object_cleanup((IDirect3DRMObject
*)&animation
->IDirect3DRMAnimation_iface
, &animation
->obj
);
3078 IDirect3DRM_Release(animation
->d3drm
);
3079 HeapFree(GetProcessHeap(), 0, animation
->rotate
.keys
);
3080 HeapFree(GetProcessHeap(), 0, animation
->scale
.keys
);
3081 HeapFree(GetProcessHeap(), 0, animation
->position
.keys
);
3082 HeapFree(GetProcessHeap(), 0, animation
);
3088 static ULONG WINAPI
d3drm_animation1_Release(IDirect3DRMAnimation
*iface
)
3090 struct d3drm_animation
*animation
= impl_from_IDirect3DRMAnimation(iface
);
3092 return IDirect3DRMAnimation2_Release(&animation
->IDirect3DRMAnimation2_iface
);
3095 static HRESULT WINAPI
d3drm_animation2_Clone(IDirect3DRMAnimation2
*iface
, IUnknown
*outer
, REFIID iid
, void **out
)
3097 FIXME("iface %p, outer %p, iid %s, out %p stub!\n", iface
, outer
, debugstr_guid(iid
), out
);
3102 static HRESULT WINAPI
d3drm_animation1_Clone(IDirect3DRMAnimation
*iface
, IUnknown
*outer
, REFIID iid
, void **out
)
3104 FIXME("iface %p, outer %p, iid %s, out %p stub!\n", iface
, outer
, debugstr_guid(iid
), out
);
3109 static HRESULT WINAPI
d3drm_animation2_AddDestroyCallback(IDirect3DRMAnimation2
*iface
,
3110 D3DRMOBJECTCALLBACK cb
, void *ctx
)
3112 struct d3drm_animation
*animation
= impl_from_IDirect3DRMAnimation2(iface
);
3114 TRACE("iface %p, cb %p, ctx %p.\n", iface
, cb
, ctx
);
3116 return d3drm_object_add_destroy_callback(&animation
->obj
, cb
, ctx
);
3119 static HRESULT WINAPI
d3drm_animation1_AddDestroyCallback(IDirect3DRMAnimation
*iface
,
3120 D3DRMOBJECTCALLBACK cb
, void *ctx
)
3122 struct d3drm_animation
*animation
= impl_from_IDirect3DRMAnimation(iface
);
3124 TRACE("iface %p, cb %p, ctx %p.\n", iface
, cb
, ctx
);
3126 return IDirect3DRMAnimation2_AddDestroyCallback(&animation
->IDirect3DRMAnimation2_iface
, cb
, ctx
);
3129 static HRESULT WINAPI
d3drm_animation2_DeleteDestroyCallback(IDirect3DRMAnimation2
*iface
,
3130 D3DRMOBJECTCALLBACK cb
, void *ctx
)
3132 struct d3drm_animation
*animation
= impl_from_IDirect3DRMAnimation2(iface
);
3134 TRACE("iface %p, cb %p, ctx %p.\n", iface
, cb
, ctx
);
3136 return d3drm_object_delete_destroy_callback(&animation
->obj
, cb
, ctx
);
3139 static HRESULT WINAPI
d3drm_animation1_DeleteDestroyCallback(IDirect3DRMAnimation
*iface
,
3140 D3DRMOBJECTCALLBACK cb
, void *ctx
)
3142 struct d3drm_animation
*animation
= impl_from_IDirect3DRMAnimation(iface
);
3144 TRACE("iface %p, cb %p, ctx %p.\n", iface
, cb
, ctx
);
3146 return IDirect3DRMAnimation2_DeleteDestroyCallback(&animation
->IDirect3DRMAnimation2_iface
, cb
, ctx
);
3149 static HRESULT WINAPI
d3drm_animation2_SetAppData(IDirect3DRMAnimation2
*iface
, DWORD data
)
3151 struct d3drm_animation
*animation
= impl_from_IDirect3DRMAnimation2(iface
);
3153 TRACE("iface %p, data %#x.\n", iface
, data
);
3155 animation
->obj
.appdata
= data
;
3160 static HRESULT WINAPI
d3drm_animation1_SetAppData(IDirect3DRMAnimation
*iface
, DWORD data
)
3162 struct d3drm_animation
*animation
= impl_from_IDirect3DRMAnimation(iface
);
3164 TRACE("iface %p, data %#x.\n", iface
, data
);
3166 return d3drm_animation2_SetAppData(&animation
->IDirect3DRMAnimation2_iface
, data
);
3169 static DWORD WINAPI
d3drm_animation2_GetAppData(IDirect3DRMAnimation2
*iface
)
3171 struct d3drm_animation
*animation
= impl_from_IDirect3DRMAnimation2(iface
);
3173 TRACE("iface %p.\n", iface
);
3175 return animation
->obj
.appdata
;
3178 static DWORD WINAPI
d3drm_animation1_GetAppData(IDirect3DRMAnimation
*iface
)
3180 struct d3drm_animation
*animation
= impl_from_IDirect3DRMAnimation(iface
);
3182 TRACE("iface %p.\n", iface
);
3184 return d3drm_animation2_GetAppData(&animation
->IDirect3DRMAnimation2_iface
);
3187 static HRESULT WINAPI
d3drm_animation2_SetName(IDirect3DRMAnimation2
*iface
, const char *name
)
3189 struct d3drm_animation
*animation
= impl_from_IDirect3DRMAnimation2(iface
);
3191 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
3193 return d3drm_object_set_name(&animation
->obj
, name
);
3196 static HRESULT WINAPI
d3drm_animation1_SetName(IDirect3DRMAnimation
*iface
, const char *name
)
3198 struct d3drm_animation
*animation
= impl_from_IDirect3DRMAnimation(iface
);
3200 TRACE("iface %p, name %s.\n", iface
, debugstr_a(name
));
3202 return d3drm_animation2_SetName(&animation
->IDirect3DRMAnimation2_iface
, name
);
3205 static HRESULT WINAPI
d3drm_animation2_GetName(IDirect3DRMAnimation2
*iface
, DWORD
*size
, char *name
)
3207 struct d3drm_animation
*animation
= impl_from_IDirect3DRMAnimation2(iface
);
3209 TRACE("iface %p, size %p, name %p.\n", iface
, size
, name
);
3211 return d3drm_object_get_name(&animation
->obj
, size
, name
);
3214 static HRESULT WINAPI
d3drm_animation1_GetName(IDirect3DRMAnimation
*iface
, DWORD
*size
, char *name
)
3216 struct d3drm_animation
*animation
= impl_from_IDirect3DRMAnimation(iface
);
3218 TRACE("iface %p, size %p, name %p.\n", iface
, size
, name
);
3220 return d3drm_animation2_GetName(&animation
->IDirect3DRMAnimation2_iface
, size
, name
);
3223 static HRESULT WINAPI
d3drm_animation2_GetClassName(IDirect3DRMAnimation2
*iface
, DWORD
*size
, char *name
)
3225 struct d3drm_animation
*animation
= impl_from_IDirect3DRMAnimation2(iface
);
3227 TRACE("iface %p, size %p, name %p.\n", iface
, size
, name
);
3229 return d3drm_object_get_class_name(&animation
->obj
, size
, name
);
3232 static HRESULT WINAPI
d3drm_animation1_GetClassName(IDirect3DRMAnimation
*iface
, DWORD
*size
, char *name
)
3234 struct d3drm_animation
*animation
= impl_from_IDirect3DRMAnimation(iface
);
3236 TRACE("iface %p, size %p, name %p.\n", iface
, size
, name
);
3238 return d3drm_animation2_GetClassName(&animation
->IDirect3DRMAnimation2_iface
, size
, name
);
3241 static HRESULT WINAPI
d3drm_animation2_SetOptions(IDirect3DRMAnimation2
*iface
, D3DRMANIMATIONOPTIONS options
)
3243 struct d3drm_animation
*animation
= impl_from_IDirect3DRMAnimation2(iface
);
3244 static const DWORD supported_options
= D3DRMANIMATION_OPEN
| D3DRMANIMATION_CLOSED
| D3DRMANIMATION_LINEARPOSITION
3245 | D3DRMANIMATION_SPLINEPOSITION
| D3DRMANIMATION_SCALEANDROTATION
| D3DRMANIMATION_POSITION
;
3247 TRACE("iface %p, options %#x.\n", iface
, options
);
3249 if (!(options
& supported_options
))
3250 return D3DRMERR_BADVALUE
;
3252 if ((options
& (D3DRMANIMATION_OPEN
| D3DRMANIMATION_CLOSED
)) == (D3DRMANIMATION_OPEN
| D3DRMANIMATION_CLOSED
) ||
3253 (options
& (D3DRMANIMATION_LINEARPOSITION
| D3DRMANIMATION_SPLINEPOSITION
)) ==
3254 (D3DRMANIMATION_LINEARPOSITION
| D3DRMANIMATION_SPLINEPOSITION
) ||
3255 (options
& (D3DRMANIMATION_SCALEANDROTATION
| D3DRMANIMATION_POSITION
)) ==
3256 (D3DRMANIMATION_SCALEANDROTATION
| D3DRMANIMATION_POSITION
))
3258 return D3DRMERR_BADVALUE
;
3261 animation
->options
= options
;
3266 static HRESULT WINAPI
d3drm_animation1_SetOptions(IDirect3DRMAnimation
*iface
, D3DRMANIMATIONOPTIONS options
)
3268 struct d3drm_animation
*animation
= impl_from_IDirect3DRMAnimation(iface
);
3270 TRACE("iface %p, %#x.\n", iface
, options
);
3272 return d3drm_animation2_SetOptions(&animation
->IDirect3DRMAnimation2_iface
, options
);
3275 static SIZE_T
d3drm_animation_lookup_key(const struct d3drm_animation_key
*keys
,
3276 SIZE_T count
, D3DVALUE time
)
3278 SIZE_T start
= 0, cur
= 0, end
= count
;
3282 cur
= start
+ (end
- start
) / 2;
3284 if (time
== keys
[cur
].time
)
3287 if (time
< keys
[cur
].time
)
3296 static SIZE_T
d3drm_animation_get_index_min(const struct d3drm_animation_key
*keys
, SIZE_T count
, D3DVALUE time
)
3300 i
= d3drm_animation_lookup_key(keys
, count
, time
);
3301 while (i
> 0 && keys
[i
- 1].time
== time
)
3307 static SIZE_T
d3drm_animation_get_index_max(const struct d3drm_animation_key
*keys
, SIZE_T count
, D3DVALUE time
)
3311 i
= d3drm_animation_lookup_key(keys
, count
, time
);
3312 while (i
< count
- 1 && keys
[i
+ 1].time
== time
)
3318 static SIZE_T
d3drm_animation_get_insert_position(const struct d3drm_animation_keys
*keys
, D3DVALUE time
)
3320 if (!keys
->count
|| time
< keys
->keys
[0].time
)
3323 if (time
>= keys
->keys
[keys
->count
- 1].time
)
3326 return d3drm_animation_get_index_max(keys
->keys
, keys
->count
, time
);
3329 static const struct d3drm_animation_key
*d3drm_animation_get_range(const struct d3drm_animation_keys
*keys
,
3330 D3DVALUE time_min
, D3DVALUE time_max
, SIZE_T
*count
)
3334 if (!keys
->count
|| time_max
< keys
->keys
[0].time
3335 || time_min
> keys
->keys
[keys
->count
- 1].time
)
3338 min
= d3drm_animation_get_index_min(keys
->keys
, keys
->count
, time_min
);
3340 *count
= d3drm_animation_get_index_max(&keys
->keys
[min
], keys
->count
- min
, time_max
) - min
+ 1;
3342 return &keys
->keys
[min
];
3345 static HRESULT WINAPI
d3drm_animation2_AddKey(IDirect3DRMAnimation2
*iface
, D3DRMANIMATIONKEY
*key
)
3347 struct d3drm_animation
*animation
= impl_from_IDirect3DRMAnimation2(iface
);
3348 struct d3drm_animation_keys
*keys
;
3351 TRACE("iface %p, key %p.\n", iface
, key
);
3353 if (!key
|| key
->dwSize
!= sizeof(*key
))
3354 return E_INVALIDARG
;
3356 switch (key
->dwKeyType
)
3358 case D3DRMANIMATION_POSITIONKEY
:
3359 keys
= &animation
->position
;
3361 case D3DRMANIMATION_SCALEKEY
:
3362 keys
= &animation
->scale
;
3364 case D3DRMANIMATION_ROTATEKEY
:
3365 keys
= &animation
->rotate
;
3368 return E_INVALIDARG
;
3371 index
= d3drm_animation_get_insert_position(keys
, key
->dvTime
);
3373 if (!d3drm_array_reserve((void **)&keys
->keys
, &keys
->size
, keys
->count
+ 1, sizeof(*keys
->keys
)))
3374 return E_OUTOFMEMORY
;
3376 if (index
< keys
->count
)
3377 memmove(&keys
->keys
[index
+ 1], &keys
->keys
[index
], sizeof(*keys
->keys
) * (keys
->count
- index
));
3378 keys
->keys
[index
].time
= key
->dvTime
;
3379 switch (key
->dwKeyType
)
3381 case D3DRMANIMATION_POSITIONKEY
:
3382 keys
->keys
[index
].u
.position
= key
->u
.dvPositionKey
;
3384 case D3DRMANIMATION_SCALEKEY
:
3385 keys
->keys
[index
].u
.scale
= key
->u
.dvScaleKey
;
3387 case D3DRMANIMATION_ROTATEKEY
:
3388 keys
->keys
[index
].u
.rotate
= key
->u
.dqRotateKey
;
3396 static HRESULT WINAPI
d3drm_animation2_AddRotateKey(IDirect3DRMAnimation2
*iface
, D3DVALUE time
, D3DRMQUATERNION
*q
)
3398 D3DRMANIMATIONKEY key
;
3400 TRACE("iface %p, time %.8e, q %p.\n", iface
, time
, q
);
3402 key
.dwSize
= sizeof(key
);
3403 key
.dwKeyType
= D3DRMANIMATION_ROTATEKEY
;
3406 key
.u
.dqRotateKey
= *q
;
3408 return d3drm_animation2_AddKey(iface
, &key
);
3411 static HRESULT WINAPI
d3drm_animation1_AddRotateKey(IDirect3DRMAnimation
*iface
, D3DVALUE time
, D3DRMQUATERNION
*q
)
3413 struct d3drm_animation
*animation
= impl_from_IDirect3DRMAnimation(iface
);
3415 TRACE("iface %p, time %.8e, q %p.\n", iface
, time
, q
);
3417 return d3drm_animation2_AddRotateKey(&animation
->IDirect3DRMAnimation2_iface
, time
, q
);
3420 static HRESULT WINAPI
d3drm_animation2_AddPositionKey(IDirect3DRMAnimation2
*iface
, D3DVALUE time
,
3421 D3DVALUE x
, D3DVALUE y
, D3DVALUE z
)
3423 D3DRMANIMATIONKEY key
;
3425 TRACE("iface %p, time %.8e, x %.8e, y %.8e, z %.8e.\n", iface
, time
, x
, y
, z
);
3427 key
.dwSize
= sizeof(key
);
3428 key
.dwKeyType
= D3DRMANIMATION_POSITIONKEY
;
3431 key
.u
.dvPositionKey
.u1
.x
= x
;
3432 key
.u
.dvPositionKey
.u2
.y
= y
;
3433 key
.u
.dvPositionKey
.u3
.z
= z
;
3435 return d3drm_animation2_AddKey(iface
, &key
);
3438 static HRESULT WINAPI
d3drm_animation1_AddPositionKey(IDirect3DRMAnimation
*iface
, D3DVALUE time
,
3439 D3DVALUE x
, D3DVALUE y
, D3DVALUE z
)
3441 struct d3drm_animation
*animation
= impl_from_IDirect3DRMAnimation(iface
);
3443 TRACE("iface %p, time %.8e, x %.8e, y %.8e, z %.8e.\n", iface
, time
, x
, y
, z
);
3445 return d3drm_animation2_AddPositionKey(&animation
->IDirect3DRMAnimation2_iface
, time
, x
, y
, z
);
3448 static HRESULT WINAPI
d3drm_animation2_AddScaleKey(IDirect3DRMAnimation2
*iface
, D3DVALUE time
,
3449 D3DVALUE x
, D3DVALUE y
, D3DVALUE z
)
3451 D3DRMANIMATIONKEY key
;
3453 TRACE("iface %p, time %.8e, x %.8e, y %.8e, z %.8e.\n", iface
, time
, x
, y
, z
);
3455 key
.dwSize
= sizeof(key
);
3456 key
.dwKeyType
= D3DRMANIMATION_SCALEKEY
;
3459 key
.u
.dvScaleKey
.u1
.x
= x
;
3460 key
.u
.dvScaleKey
.u2
.y
= y
;
3461 key
.u
.dvScaleKey
.u3
.z
= z
;
3463 return d3drm_animation2_AddKey(iface
, &key
);
3466 static HRESULT WINAPI
d3drm_animation1_AddScaleKey(IDirect3DRMAnimation
*iface
, D3DVALUE time
,
3467 D3DVALUE x
, D3DVALUE y
, D3DVALUE z
)
3469 struct d3drm_animation
*animation
= impl_from_IDirect3DRMAnimation(iface
);
3471 TRACE("iface %p, time %.8e, x %.8e, y %.8e, z %.8e.\n", iface
, time
, x
, y
, z
);
3473 return d3drm_animation2_AddScaleKey(&animation
->IDirect3DRMAnimation2_iface
, time
, x
, y
, z
);
3476 static void d3drm_animation_delete_key(struct d3drm_animation_keys
*keys
, const struct d3drm_animation_key
*key
)
3478 SIZE_T index
= key
- keys
->keys
;
3480 if (index
< keys
->count
- 1)
3481 memmove(&keys
->keys
[index
], &keys
->keys
[index
+ 1], sizeof(*keys
->keys
) * (keys
->count
- index
- 1));
3485 static HRESULT WINAPI
d3drm_animation2_DeleteKey(IDirect3DRMAnimation2
*iface
, D3DVALUE time
)
3487 struct d3drm_animation
*animation
= impl_from_IDirect3DRMAnimation2(iface
);
3488 const struct d3drm_animation_key
*key
;
3490 TRACE("iface %p, time %.8e.\n", iface
, time
);
3492 if ((key
= d3drm_animation_get_range(&animation
->rotate
, time
, time
, NULL
)))
3493 d3drm_animation_delete_key(&animation
->rotate
, key
);
3495 if ((key
= d3drm_animation_get_range(&animation
->position
, time
, time
, NULL
)))
3496 d3drm_animation_delete_key(&animation
->position
, key
);
3498 if ((key
= d3drm_animation_get_range(&animation
->scale
, time
, time
, NULL
)))
3499 d3drm_animation_delete_key(&animation
->scale
, key
);
3504 static HRESULT WINAPI
d3drm_animation1_DeleteKey(IDirect3DRMAnimation
*iface
, D3DVALUE time
)
3506 struct d3drm_animation
*animation
= impl_from_IDirect3DRMAnimation(iface
);
3508 TRACE("iface %p, time %.8e.\n", iface
, time
);
3510 return d3drm_animation2_DeleteKey(&animation
->IDirect3DRMAnimation2_iface
, time
);
3513 static HRESULT WINAPI
d3drm_animation1_SetFrame(IDirect3DRMAnimation
*iface
, IDirect3DRMFrame
*frame
)
3515 struct d3drm_animation
*animation
= impl_from_IDirect3DRMAnimation(iface
);
3516 HRESULT hr
= D3DRM_OK
;
3518 TRACE("iface %p, frame %p.\n", iface
, frame
);
3522 hr
= IDirect3DRMFrame_QueryInterface(frame
, &IID_IDirect3DRMFrame3
, (void **)&animation
->frame
);
3524 IDirect3DRMFrame3_Release(animation
->frame
);
3527 animation
->frame
= NULL
;
3532 static HRESULT WINAPI
d3drm_animation1_SetTime(IDirect3DRMAnimation
*iface
, D3DVALUE time
)
3534 FIXME("iface %p, time %.8e.\n", iface
, time
);
3539 static D3DRMANIMATIONOPTIONS WINAPI
d3drm_animation2_GetOptions(IDirect3DRMAnimation2
*iface
)
3541 struct d3drm_animation
*animation
= impl_from_IDirect3DRMAnimation2(iface
);
3543 TRACE("iface %p.\n", iface
);
3545 return animation
->options
;
3548 static D3DRMANIMATIONOPTIONS WINAPI
d3drm_animation1_GetOptions(IDirect3DRMAnimation
*iface
)
3550 struct d3drm_animation
*animation
= impl_from_IDirect3DRMAnimation(iface
);
3552 TRACE("iface %p.\n", iface
);
3554 return d3drm_animation2_GetOptions(&animation
->IDirect3DRMAnimation2_iface
);
3557 static HRESULT WINAPI
d3drm_animation2_SetFrame(IDirect3DRMAnimation2
*iface
, IDirect3DRMFrame3
*frame
)
3559 struct d3drm_animation
*animation
= impl_from_IDirect3DRMAnimation2(iface
);
3561 TRACE("iface %p, frame %p.\n", iface
, frame
);
3563 animation
->frame
= frame
;
3568 static HRESULT WINAPI
d3drm_animation2_SetTime(IDirect3DRMAnimation2
*iface
, D3DVALUE time
)
3570 FIXME("iface %p, time %.8e.\n", iface
, time
);
3575 static HRESULT WINAPI
d3drm_animation2_GetFrame(IDirect3DRMAnimation2
*iface
, IDirect3DRMFrame3
**frame
)
3577 struct d3drm_animation
*animation
= impl_from_IDirect3DRMAnimation2(iface
);
3579 TRACE("iface %p, frame %p.\n", iface
, frame
);
3582 return D3DRMERR_BADVALUE
;
3584 *frame
= animation
->frame
;
3586 IDirect3DRMFrame3_AddRef(*frame
);
3591 static HRESULT WINAPI
d3drm_animation2_DeleteKeyByID(IDirect3DRMAnimation2
*iface
, DWORD id
)
3593 FIXME("iface %p, id %#x.\n", iface
, id
);
3598 static HRESULT WINAPI
d3drm_animation2_ModifyKey(IDirect3DRMAnimation2
*iface
, D3DRMANIMATIONKEY
*key
)
3600 FIXME("iface %p, key %p.\n", iface
, key
);
3605 static HRESULT WINAPI
d3drm_animation2_GetKeys(IDirect3DRMAnimation2
*iface
, D3DVALUE time_min
, D3DVALUE time_max
,
3606 DWORD
*key_count
, D3DRMANIMATIONKEY
*keys
)
3608 struct d3drm_animation
*animation
= impl_from_IDirect3DRMAnimation2(iface
);
3609 const struct d3drm_animation_key
*key
;
3612 TRACE("iface %p, time min %.8e, time max %.8e, key_count %p, keys %p.\n",
3613 iface
, time_min
, time_max
, key_count
, keys
);
3616 return D3DRMERR_BADVALUE
;
3620 if ((key
= d3drm_animation_get_range(&animation
->rotate
, time_min
, time_max
, &count
)))
3624 for (i
= 0; i
< count
; ++i
)
3626 keys
[i
].dwSize
= sizeof(*keys
);
3627 keys
[i
].dwKeyType
= D3DRMANIMATION_ROTATEKEY
;
3628 keys
[i
].dvTime
= key
[i
].time
;
3629 keys
[i
].dwID
= 0; /* FIXME */
3630 keys
[i
].u
.dqRotateKey
= key
[i
].u
.rotate
;
3634 *key_count
+= count
;
3637 if ((key
= d3drm_animation_get_range(&animation
->position
, time_min
, time_max
, &count
)))
3641 for (i
= 0; i
< count
; ++i
)
3643 keys
[i
].dwSize
= sizeof(*keys
);
3644 keys
[i
].dwKeyType
= D3DRMANIMATION_POSITIONKEY
;
3645 keys
[i
].dvTime
= key
[i
].time
;
3646 keys
[i
].dwID
= 0; /* FIXME */
3647 keys
[i
].u
.dvPositionKey
= key
[i
].u
.position
;
3651 *key_count
+= count
;
3654 if ((key
= d3drm_animation_get_range(&animation
->scale
, time_min
, time_max
, &count
)))
3658 for (i
= 0; keys
&& i
< count
; ++i
)
3660 keys
[i
].dwSize
= sizeof(*keys
);
3661 keys
[i
].dwKeyType
= D3DRMANIMATION_SCALEKEY
;
3662 keys
[i
].dvTime
= key
[i
].time
;
3663 keys
[i
].dwID
= 0; /* FIXME */
3664 keys
[i
].u
.dvScaleKey
= key
[i
].u
.scale
;
3668 *key_count
+= count
;
3671 return *key_count
? D3DRM_OK
: D3DRMERR_NOSUCHKEY
;
3674 static const struct IDirect3DRMAnimationVtbl d3drm_animation1_vtbl
=
3676 d3drm_animation1_QueryInterface
,
3677 d3drm_animation1_AddRef
,
3678 d3drm_animation1_Release
,
3679 d3drm_animation1_Clone
,
3680 d3drm_animation1_AddDestroyCallback
,
3681 d3drm_animation1_DeleteDestroyCallback
,
3682 d3drm_animation1_SetAppData
,
3683 d3drm_animation1_GetAppData
,
3684 d3drm_animation1_SetName
,
3685 d3drm_animation1_GetName
,
3686 d3drm_animation1_GetClassName
,
3687 d3drm_animation1_SetOptions
,
3688 d3drm_animation1_AddRotateKey
,
3689 d3drm_animation1_AddPositionKey
,
3690 d3drm_animation1_AddScaleKey
,
3691 d3drm_animation1_DeleteKey
,
3692 d3drm_animation1_SetFrame
,
3693 d3drm_animation1_SetTime
,
3694 d3drm_animation1_GetOptions
,
3697 static const struct IDirect3DRMAnimation2Vtbl d3drm_animation2_vtbl
=
3699 d3drm_animation2_QueryInterface
,
3700 d3drm_animation2_AddRef
,
3701 d3drm_animation2_Release
,
3702 d3drm_animation2_Clone
,
3703 d3drm_animation2_AddDestroyCallback
,
3704 d3drm_animation2_DeleteDestroyCallback
,
3705 d3drm_animation2_SetAppData
,
3706 d3drm_animation2_GetAppData
,
3707 d3drm_animation2_SetName
,
3708 d3drm_animation2_GetName
,
3709 d3drm_animation2_GetClassName
,
3710 d3drm_animation2_SetOptions
,
3711 d3drm_animation2_AddRotateKey
,
3712 d3drm_animation2_AddPositionKey
,
3713 d3drm_animation2_AddScaleKey
,
3714 d3drm_animation2_DeleteKey
,
3715 d3drm_animation2_SetFrame
,
3716 d3drm_animation2_SetTime
,
3717 d3drm_animation2_GetOptions
,
3718 d3drm_animation2_GetFrame
,
3719 d3drm_animation2_DeleteKeyByID
,
3720 d3drm_animation2_AddKey
,
3721 d3drm_animation2_ModifyKey
,
3722 d3drm_animation2_GetKeys
,
3725 HRESULT
d3drm_animation_create(struct d3drm_animation
**animation
, IDirect3DRM
*d3drm
)
3727 static const char classname
[] = "Animation";
3728 struct d3drm_animation
*object
;
3729 HRESULT hr
= D3DRM_OK
;
3731 TRACE("animation %p, d3drm %p.\n", animation
, d3drm
);
3733 if (!(object
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(*object
))))
3734 return E_OUTOFMEMORY
;
3736 object
->IDirect3DRMAnimation_iface
.lpVtbl
= &d3drm_animation1_vtbl
;
3737 object
->IDirect3DRMAnimation2_iface
.lpVtbl
= &d3drm_animation2_vtbl
;
3738 object
->d3drm
= d3drm
;
3740 object
->options
= D3DRMANIMATION_CLOSED
| D3DRMANIMATION_LINEARPOSITION
;
3742 d3drm_object_init(&object
->obj
, classname
);
3744 IDirect3DRM_AddRef(object
->d3drm
);
3746 *animation
= object
;