ReactOS 0.4.15-dev-8422-g6219a1a
animation.c
Go to the documentation of this file.
1#ifdef __REACTOS__
2#include "precomp.h"
3#else
4/*
5 * Animation Controller operations specific to D3DX9.
6 *
7 * Copyright (C) 2015 Christian Costa
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
13 *
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 */
23
24
25#include "d3dx9_private.h"
26#endif /* __REACTOS__ */
27
29
31{
32 ID3DXAnimationController ID3DXAnimationController_iface;
34
39};
40
41static inline struct d3dx9_animation_controller *impl_from_ID3DXAnimationController(ID3DXAnimationController *iface)
42{
44}
45
46static HRESULT WINAPI d3dx9_animation_controller_QueryInterface(ID3DXAnimationController *iface, REFIID riid, void **out)
47{
48 TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
49
51 IsEqualGUID(riid, &IID_ID3DXAnimationController))
52 {
53 iface->lpVtbl->AddRef(iface);
54 *out = iface;
55 return D3D_OK;
56 }
57
58 WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
59 *out = NULL;
60 return E_NOINTERFACE;
61}
62
63static ULONG WINAPI d3dx9_animation_controller_AddRef(ID3DXAnimationController *iface)
64{
66 ULONG refcount = InterlockedIncrement(&animation->ref);
67
68 TRACE("%p increasing refcount to %u.\n", animation, refcount);
69
70 return refcount;
71}
72
73static ULONG WINAPI d3dx9_animation_controller_Release(ID3DXAnimationController *iface)
74{
76 ULONG refcount = InterlockedDecrement(&animation->ref);
77
78 TRACE("%p decreasing refcount to %u.\n", animation, refcount);
79
80 if (!refcount)
81 {
82 HeapFree(GetProcessHeap(), 0, animation);
83 }
84
85 return refcount;
86}
87
89{
91
92 TRACE("iface %p.\n", iface);
93
94 return animation->max_outputs;
95}
96
97static UINT WINAPI d3dx9_animation_controller_GetMaxNumAnimationSets(ID3DXAnimationController *iface)
98{
100
101 TRACE("iface %p.\n", iface);
102
103 return animation->max_sets;
104}
105
106static UINT WINAPI d3dx9_animation_controller_GetMaxNumTracks(ID3DXAnimationController *iface)
107{
109
110 TRACE("iface %p.\n", iface);
111
112 return animation->max_tracks;
113}
114
115static UINT WINAPI d3dx9_animation_controller_GetMaxNumEvents(ID3DXAnimationController *iface)
116{
118
119 TRACE("iface %p.\n", iface);
120
121 return animation->max_events;
122}
123
125 const char *name, D3DXMATRIX *matrix, D3DXVECTOR3 *scale, D3DXQUATERNION *rotation, D3DXVECTOR3 *translation)
126{
127 FIXME("iface %p, name %s, matrix %p, scale %p, rotation %p, translation %p stub.\n", iface, debugstr_a(name),
128 matrix, scale, rotation, translation);
129
130 return E_NOTIMPL;
131}
132
134 ID3DXAnimationSet *anim_set)
135{
136 FIXME("iface %p, anim_set %p stub.\n", iface, anim_set);
137
138 return E_NOTIMPL;
139}
140
142 ID3DXAnimationSet *anim_set)
143{
144 FIXME("iface %p, anim_set %p stub.\n", iface, anim_set);
145
146 return E_NOTIMPL;
147}
148
149static UINT WINAPI d3dx9_animation_controller_GetNumAnimationSets(ID3DXAnimationController *iface)
150{
151 FIXME("iface %p stub.\n", iface);
152
153 return 0;
154}
155
156static HRESULT WINAPI d3dx9_animation_controller_GetAnimationSet(ID3DXAnimationController *iface,
157 UINT index, ID3DXAnimationSet **anim_set)
158{
159 FIXME("iface %p, index %u, anim_set %p stub.\n", iface, index, anim_set);
160
161 return E_NOTIMPL;
162}
163
165 const char *name, ID3DXAnimationSet **anim_set)
166{
167 FIXME("iface %p, name %s, anim_set %p stub.\n", iface, debugstr_a(name), anim_set);
168
169 return E_NOTIMPL;
170}
171
172static HRESULT WINAPI d3dx9_animation_controller_AdvanceTime(ID3DXAnimationController *iface, double time_delta,
173 ID3DXAnimationCallbackHandler *callback_handler)
174{
175 FIXME("iface %p, time_delta %.16e, callback_handler %p stub.\n", iface, time_delta, callback_handler);
176
177 return E_NOTIMPL;
178}
179
180static HRESULT WINAPI d3dx9_animation_controller_Reset(ID3DXAnimationController *iface)
181{
182 FIXME("iface %p stub.\n", iface);
183
184 return E_NOTIMPL;
185}
186
187static double WINAPI d3dx9_animation_controller_GetTime(ID3DXAnimationController *iface)
188{
189 FIXME("iface %p stub.\n", iface);
190
191 return 0.0;
192}
193
195 UINT track, ID3DXAnimationSet *anim_set)
196{
197 FIXME("iface %p, track %u, anim_set %p stub.\n", iface, track, anim_set);
198
199 return E_NOTIMPL;
200}
201
203 UINT track, ID3DXAnimationSet **anim_set)
204{
205 FIXME("iface %p, track %u, anim_set %p stub.\n", iface, track, anim_set);
206
207 return E_NOTIMPL;
208}
209
210static HRESULT WINAPI d3dx9_animation_controller_SetTrackPriority(ID3DXAnimationController *iface,
212{
213 FIXME("iface %p, track %u, priority %u stub.\n", iface, track, priority);
214
215 return E_NOTIMPL;
216}
217
218static HRESULT WINAPI d3dx9_animation_controller_SetTrackSpeed(ID3DXAnimationController *iface,
219 UINT track, float speed)
220{
221 FIXME("iface %p, track %u, speed %.8e stub.\n", iface, track, speed);
222
223 return E_NOTIMPL;
224}
225
226static HRESULT WINAPI d3dx9_animation_controller_SetTrackWeight(ID3DXAnimationController *iface,
227 UINT track, float weight)
228{
229 FIXME("iface %p, track %u, weight %.8e stub.\n", iface, track, weight);
230
231 return E_NOTIMPL;
232}
233
234static HRESULT WINAPI d3dx9_animation_controller_SetTrackPosition(ID3DXAnimationController *iface,
235 UINT track, double position)
236{
237 FIXME("iface %p, track %u, position %.16e stub.\n", iface, track, position);
238
239 return E_NOTIMPL;
240}
241
242static HRESULT WINAPI d3dx9_animation_controller_SetTrackEnable(ID3DXAnimationController *iface,
243 UINT track, BOOL enable)
244{
245 FIXME("iface %p, track %u, enable %#x stub.\n", iface, track, enable);
246
247 return E_NOTIMPL;
248}
249
250static HRESULT WINAPI d3dx9_animation_controller_SetTrackDesc(ID3DXAnimationController *iface,
251 UINT track, D3DXTRACK_DESC *desc)
252{
253 FIXME("iface %p, track %u, desc %p stub.\n", iface, track, desc);
254
255 return E_NOTIMPL;
256}
257
258static HRESULT WINAPI d3dx9_animation_controller_GetTrackDesc(ID3DXAnimationController *iface,
259 UINT track, D3DXTRACK_DESC *desc)
260{
261 FIXME("iface %p, track %u, desc %p stub.\n", iface, track, desc);
262
263 return E_NOTIMPL;
264}
265
266static HRESULT WINAPI d3dx9_animation_controller_SetPriorityBlend(ID3DXAnimationController *iface,
267 float blend_weight)
268{
269 FIXME("iface %p, blend_weight %.8e stub.\n", iface, blend_weight);
270
271 return E_NOTIMPL;
272}
273
274static float WINAPI d3dx9_animation_controller_GetPriorityBlend(ID3DXAnimationController *iface)
275{
276 FIXME("iface %p stub.\n", iface);
277
278 return 0.0f;
279}
280
282 UINT track, float new_speed, double start_time, double duration, D3DXTRANSITION_TYPE transition)
283{
284 FIXME("iface %p, track %u, new_speed %.8e, start_time %.16e, duration %.16e, transition %u stub.\n", iface,
285 track, new_speed, start_time, duration, transition);
286
287 return 0;
288}
289
291 UINT track, float new_weight, double start_time, double duration, D3DXTRANSITION_TYPE transition)
292{
293 FIXME("iface %p, track %u, new_weight %.8e, start_time %.16e, duration %.16e, transition %u stub.\n", iface,
294 track, new_weight, start_time, duration, transition);
295
296 return 0;
297}
298
300 UINT track, double new_position, double start_time)
301{
302 FIXME("iface %p, track %u, new_position %.16e, start_time %.16e stub.\n", iface,
303 track, new_position, start_time);
304
305 return 0;
306}
307
309 UINT track, BOOL new_enable, double start_time)
310{
311 FIXME("iface %p, track %u, new_enable %#x, start_time %.16e stub.\n", iface,
312 track, new_enable, start_time);
313
314 return 0;
315}
316
318 float new_blend_weight, double start_time, double duration, D3DXTRANSITION_TYPE transition)
319{
320 FIXME("iface %p, new_blend_weight %.8e, start_time %.16e, duration %.16e, transition %u stub.\n", iface,
321 new_blend_weight, start_time, duration, transition);
322
323 return 0;
324}
325
327{
328 FIXME("iface %p, event %u stub.\n", iface, event);
329
330 return E_NOTIMPL;
331}
332
333static HRESULT WINAPI d3dx9_animation_controller_UnkeyAllTrackEvents(ID3DXAnimationController *iface, UINT track)
334{
335 FIXME("iface %p, track %u stub.\n", iface, track);
336
337 return E_NOTIMPL;
338}
339
341{
342 FIXME("iface %p stub.\n", iface);
343
344 return E_NOTIMPL;
345}
346
348 UINT track, D3DXEVENT_TYPE event_type)
349{
350 FIXME("iface %p, track %u, event_type %u stub.\n", iface, track, event_type);
351
352 return 0;
353}
354
356{
357 FIXME("iface %p stub.\n", iface);
358
359 return 0;
360}
361
364{
365 FIXME("iface %p, track %u, event %u stub.\n", iface, track, event);
366
367 return 0;
368}
369
372{
373 FIXME("iface %p, event %u stub.\n", iface, event);
374
375 return 0;
376}
377
379{
380 FIXME("iface %p, event %u stub.\n", iface, event);
381
382 return E_NOTIMPL;
383}
384
385static HRESULT WINAPI d3dx9_animation_controller_GetEventDesc(ID3DXAnimationController *iface,
387{
388 FIXME("iface %p, event %u, desc %p stub.\n", iface, event, desc);
389
390 return E_NOTIMPL;
391}
392
394 UINT max_sets, UINT max_tracks, UINT max_events, ID3DXAnimationController **anim_controller)
395{
396 FIXME("iface %p, max_outputs %u, max_sets %u, max_tracks %u, max_events %u, anim_controller %p stub.\n",
397 iface, max_outputs, max_sets, max_tracks, max_events, anim_controller);
398
399 return E_NOTIMPL;
400}
401
402static const struct ID3DXAnimationControllerVtbl d3dx9_animation_controller_vtbl =
403{
446};
447
449 UINT max_tracks, UINT max_events, ID3DXAnimationController **controller)
450{
452
453 TRACE("max_outputs %u, max_sets %u, max_tracks %u, max_events %u, controller %p.\n",
455
456 if (!max_outputs || !max_sets || !max_tracks || !max_events || !controller)
457 return D3D_OK;
458
459 object = HeapAlloc(GetProcessHeap(), 0, sizeof(*object));
460 if (!object)
461 return E_OUTOFMEMORY;
462
463 object->ID3DXAnimationController_iface.lpVtbl = &d3dx9_animation_controller_vtbl;
464 object->ref = 1;
465 object->max_outputs = max_outputs;
466 object->max_sets = max_sets;
467 object->max_tracks = max_tracks;
468 object->max_events = max_events;
469
470 *controller = &object->ID3DXAnimationController_iface;
471
472 return D3D_OK;
473}
474
476{
477 ID3DXKeyframedAnimationSet ID3DXKeyframedAnimationSet_iface;
479
480 const char *name;
483 unsigned int animation_count;
484 unsigned int callback_key_count;
486};
487
488static inline struct d3dx9_keyframed_animation_set *impl_from_ID3DXKeyframedAnimationSet(ID3DXKeyframedAnimationSet *iface)
489{
491}
492
493static HRESULT WINAPI d3dx9_keyframed_animation_QueryInterface(ID3DXKeyframedAnimationSet *iface,
494 REFIID riid, void **obj)
495{
496 TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), obj);
497
499 || IsEqualGUID(riid, &IID_ID3DXAnimationSet)
500 || IsEqualGUID(riid, &IID_ID3DXKeyframedAnimationSet))
501 {
502 iface->lpVtbl->AddRef(iface);
503 *obj = iface;
504 return D3D_OK;
505 }
506
507 WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
508 *obj = NULL;
509 return E_NOINTERFACE;
510}
511
512static ULONG WINAPI d3dx9_keyframed_animation_AddRef(ID3DXKeyframedAnimationSet *iface)
513{
515 ULONG refcount = InterlockedIncrement(&set->ref);
516
517 TRACE("%p increasing refcount to %u.\n", set, refcount);
518
519 return refcount;
520}
521
522static ULONG WINAPI d3dx9_keyframed_animation_Release(ID3DXKeyframedAnimationSet *iface)
523{
525 ULONG refcount = InterlockedDecrement(&set->ref);
526
527 TRACE("%p decreasing refcount to %u.\n", set, refcount);
528
529 if (!refcount)
530 {
531 heap_free((char *)set->name);
532 heap_free(set);
533 }
534
535 return refcount;
536}
537
538static const char * WINAPI d3dx9_keyframed_animation_GetName(ID3DXKeyframedAnimationSet *iface)
539{
541
542 TRACE("set %p.\n", set);
543 return set->name;
544}
545
546static double WINAPI d3dx9_keyframed_animation_GetPeriod(ID3DXKeyframedAnimationSet *iface)
547{
549
550 FIXME("set %p stub.\n", set);
551 return 0.0;
552}
553
554static double WINAPI d3dx9_keyframed_animation_GetPeriodicPosition(ID3DXKeyframedAnimationSet *iface, double position)
555{
557
558 FIXME("set %p, position %.16e stub.\n", set, position);
559 return 0.0;
560}
561
562static UINT WINAPI d3dx9_keyframed_animation_GetNumAnimations(ID3DXKeyframedAnimationSet *iface)
563{
565
566 FIXME("set %p stub.\n", set);
567 return 0;
568}
569
570static HRESULT WINAPI d3dx9_keyframed_animation_GetAnimationNameByIndex(ID3DXKeyframedAnimationSet *iface,
571 UINT index, const char **name)
572{
574
575 FIXME("set %p, index %u, name %p stub.\n", set, index, name);
576 return E_NOTIMPL;
577}
578
579static HRESULT WINAPI d3dx9_keyframed_animation_GetAnimationIndexByName(ID3DXKeyframedAnimationSet *iface,
580 const char *name, UINT *index)
581{
583
584 FIXME("set %p, name %s, index %p stub.\n", set, debugstr_a(name), index);
585 return E_NOTIMPL;
586}
587
588static HRESULT WINAPI d3dx9_keyframed_animation_GetSRT(ID3DXKeyframedAnimationSet *iface, double periodic_position,
589 UINT animation, D3DXVECTOR3 *scale, D3DXQUATERNION *rotation, D3DXVECTOR3 *translation)
590{
592
593 FIXME("set %p, periodic_position %.16e, animation %u, scale %p, rotation %p, translation %p stub.\n",
594 set, periodic_position, animation, scale, rotation, translation);
595 return E_NOTIMPL;
596}
597
598static HRESULT WINAPI d3dx9_keyframed_animation_GetCallback(ID3DXKeyframedAnimationSet *iface, double position,
599 DWORD flags, double *callback_position, void **callback_data)
600{
602
603 FIXME("set %p, position %.16e, flags %#x, callback_position %p, callback_data %p stub.\n",
604 set, position, flags, callback_position, callback_data);
605 return E_NOTIMPL;
606}
607
609{
611
612 TRACE("set %p.\n", set);
613 return set->playback_type;
614}
615
616static double WINAPI d3dx9_keyframed_animation_GetSourceTicksPerSecond(ID3DXKeyframedAnimationSet *iface)
617{
619
620 TRACE("set %p.\n", set);
621 return set->ticks_per_second;
622}
623
624static UINT WINAPI d3dx9_keyframed_animation_GetNumScaleKeys(ID3DXKeyframedAnimationSet *iface, UINT keys)
625{
627
628 FIXME("set %p, keys %u stub.\n", set, keys);
629 return 0;
630}
631
632static HRESULT WINAPI d3dx9_keyframed_animation_GetScaleKeys(ID3DXKeyframedAnimationSet *iface, UINT animation,
633 D3DXKEY_VECTOR3 *scale_keys)
634{
636
637 FIXME("set %p, animation %u, scale_keys %p stub.\n", set, animation, scale_keys);
638 return E_NOTIMPL;
639}
640
641static HRESULT WINAPI d3dx9_keyframed_animation_GetScaleKey(ID3DXKeyframedAnimationSet *iface, UINT animation,
642 UINT key, D3DXKEY_VECTOR3 *scale_key)
643{
645
646 FIXME("set %p, animation %u, key %u, scale_key %p stub.\n", set, animation, key, scale_key);
647 return E_NOTIMPL;
648}
649
650static HRESULT WINAPI d3dx9_keyframed_animation_SetScaleKey(ID3DXKeyframedAnimationSet *iface, UINT animation,
651 UINT key, D3DXKEY_VECTOR3 *scale_key)
652{
654
655 FIXME("set %p, animation %u, key %u, scale_key %p stub.\n", set, animation, key, scale_key);
656 return E_NOTIMPL;
657}
658
659static UINT WINAPI d3dx9_keyframed_animation_GetNumRotationKeys(ID3DXKeyframedAnimationSet *iface, UINT animation)
660{
662
663 FIXME("set %p, animation %u stub.\n", set, animation);
664 return E_NOTIMPL;
665}
666
667static HRESULT WINAPI d3dx9_keyframed_animation_GetRotationKeys(ID3DXKeyframedAnimationSet *iface,
668 UINT animation, D3DXKEY_QUATERNION *rotation_keys)
669{
671
672 FIXME("set %p, animation %u, rotation_keys %p stub.\n", set, animation, rotation_keys);
673 return E_NOTIMPL;
674}
675
676static HRESULT WINAPI d3dx9_keyframed_animation_GetRotationKey(ID3DXKeyframedAnimationSet *iface,
677 UINT animation, UINT key, D3DXKEY_QUATERNION *rotation_key)
678{
680
681 FIXME("set %p, animation %u, key %u, rotation_key %p stub.\n", set, animation, key, rotation_key);
682 return E_NOTIMPL;
683}
684
685static HRESULT WINAPI d3dx9_keyframed_animation_SetRotationKey(ID3DXKeyframedAnimationSet *iface,
686 UINT animation, UINT key, D3DXKEY_QUATERNION *rotation_key)
687{
689
690 FIXME("set %p, animation %u, key %u, rotation_key %p stub.\n", set, animation, key, rotation_key);
691 return E_NOTIMPL;
692}
693
694static UINT WINAPI d3dx9_keyframed_animation_GetNumTranslationKeys(ID3DXKeyframedAnimationSet *iface, UINT animation)
695{
697
698 FIXME("set %p, animation %u stub.\n", set, animation);
699 return E_NOTIMPL;
700}
701
702static HRESULT WINAPI d3dx9_keyframed_animation_GetTranslationKeys(ID3DXKeyframedAnimationSet *iface,
703 UINT animation, D3DXKEY_VECTOR3 *translation_keys)
704{
706
707 FIXME("set %p, animation %u, translation_keys %p stub.\n", set, animation, translation_keys);
708 return E_NOTIMPL;
709}
710
711static HRESULT WINAPI d3dx9_keyframed_animation_GetTranslationKey(ID3DXKeyframedAnimationSet *iface,
712 UINT animation, UINT key, D3DXKEY_VECTOR3 *translation_key)
713{
715
716 FIXME("set %p, animation %u, key %u, translation_key %p stub.\n", set, animation, key, translation_key);
717 return E_NOTIMPL;
718}
719
720static HRESULT WINAPI d3dx9_keyframed_animation_SetTranslationKey(ID3DXKeyframedAnimationSet *iface,
721 UINT animation, UINT key, D3DXKEY_VECTOR3 *translation_key)
722{
724
725 FIXME("set %p, animation %u, key %u, translation_key %p stub.\n", set, animation, key, translation_key);
726 return E_NOTIMPL;
727}
728
729static UINT WINAPI d3dx9_keyframed_animation_GetNumCallbackKeys(ID3DXKeyframedAnimationSet *iface)
730{
732
733 FIXME("set %p stub.\n", set);
734 return E_NOTIMPL;
735}
736
737static HRESULT WINAPI d3dx9_keyframed_animation_GetCallbackKeys(ID3DXKeyframedAnimationSet *iface,
739{
741
742 FIXME("set %p, callback_keys %p stub.\n", set, callback_keys);
743 return E_NOTIMPL;
744}
745
746static HRESULT WINAPI d3dx9_keyframed_animation_GetCallbackKey(ID3DXKeyframedAnimationSet *iface,
747 UINT key, D3DXKEY_CALLBACK *callback_key)
748{
750
751 FIXME("set %p, key %u, callback_key %p stub.\n", set, key, callback_key);
752 return E_NOTIMPL;
753}
754
755static HRESULT WINAPI d3dx9_keyframed_animation_SetCallbackKey(ID3DXKeyframedAnimationSet *iface,
756 UINT key, D3DXKEY_CALLBACK *callback_key)
757{
759
760 FIXME("set %p, key %u, callback_key %p stub.\n", set, key, callback_key);
761 return E_NOTIMPL;
762}
763
764static HRESULT WINAPI d3dx9_keyframed_animation_UnregisterScaleKey(ID3DXKeyframedAnimationSet *iface,
765 UINT animation, UINT key)
766{
768
769 FIXME("set %p, animation %u, key %u stub.\n", set, animation, key);
770 return E_NOTIMPL;
771}
772
773static HRESULT WINAPI d3dx9_keyframed_animation_UnregisterRotationKey(ID3DXKeyframedAnimationSet *iface,
774 UINT animation, UINT key)
775{
777
778 FIXME("set %p, animation %u, key %u stub.\n", set, animation, key);
779 return E_NOTIMPL;
780}
781
783 UINT animation, UINT key)
784{
786
787 FIXME("set %p, animation %u, key %u stub.\n", set, animation, key);
788 return E_NOTIMPL;
789}
790
792 const char *name, UINT scale_keys_count, UINT rotation_keys_count, UINT translation_keys_count,
793 const D3DXKEY_VECTOR3 *scale_keys, const D3DXKEY_QUATERNION *rotation_keys,
794 const D3DXKEY_VECTOR3 *translation_keys, DWORD *animation_index)
795{
797
798 FIXME("set %p, name %s, scale_keys_count %u, rotation_keys_count %u, translation_keys_count %u, "
799 "scale_keys %p, rotation_keys %p, translation_keys %p, animation_index %p stub.\n",
800 set, debugstr_a(name), scale_keys_count, rotation_keys_count, translation_keys_count,
801 scale_keys, rotation_keys, translation_keys, animation_index);
802 return E_NOTIMPL;
803}
804
805static HRESULT WINAPI d3dx9_keyframed_animation_Compress(ID3DXKeyframedAnimationSet *iface,
806 DWORD flags, float lossiness, D3DXFRAME *hierarchy, ID3DXBuffer **compressed_data)
807{
809
810 FIXME("set %p, flags %#x, lossiness %.8e, hierarchy %p, compressed_data %p stub.\n",
811 set, flags, lossiness, hierarchy, compressed_data);
812 return E_NOTIMPL;
813}
814
816{
818
819 FIXME("set %p, index %u stub.\n", set, index);
820 return E_NOTIMPL;
821}
822
823static const struct ID3DXKeyframedAnimationSetVtbl d3dx9_keyframed_animation_vtbl =
824{
860};
861
862HRESULT WINAPI D3DXCreateKeyframedAnimationSet(const char *name, double ticks_per_second,
863 D3DXPLAYBACK_TYPE playback_type, UINT animation_count, UINT callback_key_count,
864 const D3DXKEY_CALLBACK *callback_keys, ID3DXKeyframedAnimationSet **animation_set)
865{
867 char *string;
868
869 TRACE("name %s, ticks_per_second %.16e, playback_type %u, animation_count %u, "
870 "callback_key_count %u, callback_keys %p, animation_set %p.\n",
872 callback_key_count, callback_keys, animation_set);
873
874 if (!animation_count)
875 return D3DERR_INVALIDCALL;
876
877 if (!(object = heap_alloc(sizeof(*object))))
878 return E_OUTOFMEMORY;
879
880 object->ID3DXKeyframedAnimationSet_iface.lpVtbl = &d3dx9_keyframed_animation_vtbl;
881 object->ref = 1;
882 if (!(string = heap_alloc(strlen(name) + 1)))
883 {
884 heap_free(object);
885 return E_OUTOFMEMORY;
886 }
887 strcpy(string, name);
888 object->name = string;
889 object->ticks_per_second = ticks_per_second;
890 object->playback_type = playback_type;
891 object->animation_count = animation_count;
892 object->callback_key_count = callback_key_count;
893 object->callback_keys = callback_keys;
894
895 *animation_set = &object->ID3DXKeyframedAnimationSet_iface;
896
897 return D3D_OK;
898}
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
static UINT WINAPI d3dx9_keyframed_animation_GetNumScaleKeys(ID3DXKeyframedAnimationSet *iface, UINT keys)
Definition: animation.c:624
static float WINAPI d3dx9_animation_controller_GetPriorityBlend(ID3DXAnimationController *iface)
Definition: animation.c:274
static D3DXEVENTHANDLE WINAPI d3dx9_animation_controller_KeyTrackPosition(ID3DXAnimationController *iface, UINT track, double new_position, double start_time)
Definition: animation.c:299
static double WINAPI d3dx9_keyframed_animation_GetPeriodicPosition(ID3DXKeyframedAnimationSet *iface, double position)
Definition: animation.c:554
static HRESULT WINAPI d3dx9_keyframed_animation_GetCallbackKeys(ID3DXKeyframedAnimationSet *iface, D3DXKEY_CALLBACK *callback_keys)
Definition: animation.c:737
static HRESULT WINAPI d3dx9_keyframed_animation_SetCallbackKey(ID3DXKeyframedAnimationSet *iface, UINT key, D3DXKEY_CALLBACK *callback_key)
Definition: animation.c:755
static HRESULT WINAPI d3dx9_keyframed_animation_GetAnimationNameByIndex(ID3DXKeyframedAnimationSet *iface, UINT index, const char **name)
Definition: animation.c:570
static HRESULT WINAPI d3dx9_keyframed_animation_QueryInterface(ID3DXKeyframedAnimationSet *iface, REFIID riid, void **obj)
Definition: animation.c:493
static HRESULT WINAPI d3dx9_keyframed_animation_GetScaleKey(ID3DXKeyframedAnimationSet *iface, UINT animation, UINT key, D3DXKEY_VECTOR3 *scale_key)
Definition: animation.c:641
static HRESULT WINAPI d3dx9_animation_controller_SetTrackAnimationSet(ID3DXAnimationController *iface, UINT track, ID3DXAnimationSet *anim_set)
Definition: animation.c:194
static UINT WINAPI d3dx9_animation_controller_GetNumAnimationSets(ID3DXAnimationController *iface)
Definition: animation.c:149
static HRESULT WINAPI d3dx9_keyframed_animation_GetCallbackKey(ID3DXKeyframedAnimationSet *iface, UINT key, D3DXKEY_CALLBACK *callback_key)
Definition: animation.c:746
static D3DXEVENTHANDLE WINAPI d3dx9_animation_controller_KeyTrackSpeed(ID3DXAnimationController *iface, UINT track, float new_speed, double start_time, double duration, D3DXTRANSITION_TYPE transition)
Definition: animation.c:281
static HRESULT WINAPI d3dx9_animation_controller_SetTrackEnable(ID3DXAnimationController *iface, UINT track, BOOL enable)
Definition: animation.c:242
HRESULT WINAPI D3DXCreateKeyframedAnimationSet(const char *name, double ticks_per_second, D3DXPLAYBACK_TYPE playback_type, UINT animation_count, UINT callback_key_count, const D3DXKEY_CALLBACK *callback_keys, ID3DXKeyframedAnimationSet **animation_set)
Definition: animation.c:862
static UINT WINAPI d3dx9_animation_controller_GetMaxNumEvents(ID3DXAnimationController *iface)
Definition: animation.c:115
static HRESULT WINAPI d3dx9_keyframed_animation_UnregisterRotationKey(ID3DXKeyframedAnimationSet *iface, UINT animation, UINT key)
Definition: animation.c:773
static const struct ID3DXAnimationControllerVtbl d3dx9_animation_controller_vtbl
Definition: animation.c:402
static double WINAPI d3dx9_animation_controller_GetTime(ID3DXAnimationController *iface)
Definition: animation.c:187
static HRESULT WINAPI d3dx9_keyframed_animation_SetScaleKey(ID3DXKeyframedAnimationSet *iface, UINT animation, UINT key, D3DXKEY_VECTOR3 *scale_key)
Definition: animation.c:650
static D3DXEVENTHANDLE WINAPI d3dx9_animation_controller_KeyTrackWeight(ID3DXAnimationController *iface, UINT track, float new_weight, double start_time, double duration, D3DXTRANSITION_TYPE transition)
Definition: animation.c:290
static double WINAPI d3dx9_keyframed_animation_GetPeriod(ID3DXKeyframedAnimationSet *iface)
Definition: animation.c:546
static HRESULT WINAPI d3dx9_animation_controller_GetAnimationSet(ID3DXAnimationController *iface, UINT index, ID3DXAnimationSet **anim_set)
Definition: animation.c:156
static HRESULT WINAPI d3dx9_keyframed_animation_GetScaleKeys(ID3DXKeyframedAnimationSet *iface, UINT animation, D3DXKEY_VECTOR3 *scale_keys)
Definition: animation.c:632
static D3DXEVENTHANDLE WINAPI d3dx9_animation_controller_GetUpcomingPriorityBlend(ID3DXAnimationController *iface, D3DXEVENTHANDLE event)
Definition: animation.c:370
static D3DXEVENTHANDLE WINAPI d3dx9_animation_controller_GetCurrentTrackEvent(ID3DXAnimationController *iface, UINT track, D3DXEVENT_TYPE event_type)
Definition: animation.c:347
static HRESULT WINAPI d3dx9_keyframed_animation_UnregisterAnimation(ID3DXKeyframedAnimationSet *iface, UINT index)
Definition: animation.c:815
HRESULT WINAPI D3DXCreateAnimationController(UINT max_outputs, UINT max_sets, UINT max_tracks, UINT max_events, ID3DXAnimationController **controller)
Definition: animation.c:448
static HRESULT WINAPI d3dx9_keyframed_animation_GetAnimationIndexByName(ID3DXKeyframedAnimationSet *iface, const char *name, UINT *index)
Definition: animation.c:579
static const struct ID3DXKeyframedAnimationSetVtbl d3dx9_keyframed_animation_vtbl
Definition: animation.c:823
static HRESULT WINAPI d3dx9_animation_controller_GetEventDesc(ID3DXAnimationController *iface, D3DXEVENTHANDLE event, D3DXEVENT_DESC *desc)
Definition: animation.c:385
static UINT WINAPI d3dx9_animation_controller_GetMaxNumAnimationSets(ID3DXAnimationController *iface)
Definition: animation.c:97
static HRESULT WINAPI d3dx9_animation_controller_GetTrackAnimationSet(ID3DXAnimationController *iface, UINT track, ID3DXAnimationSet **anim_set)
Definition: animation.c:202
static HRESULT WINAPI d3dx9_animation_controller_CloneAnimationController(ID3DXAnimationController *iface, UINT max_outputs, UINT max_sets, UINT max_tracks, UINT max_events, ID3DXAnimationController **anim_controller)
Definition: animation.c:393
static ULONG WINAPI d3dx9_keyframed_animation_Release(ID3DXKeyframedAnimationSet *iface)
Definition: animation.c:522
static D3DXEVENTHANDLE WINAPI d3dx9_animation_controller_GetUpcomingTrackEvent(ID3DXAnimationController *iface, UINT track, D3DXEVENTHANDLE event)
Definition: animation.c:362
static HRESULT WINAPI d3dx9_animation_controller_UnkeyEvent(ID3DXAnimationController *iface, D3DXEVENTHANDLE event)
Definition: animation.c:326
static struct d3dx9_animation_controller * impl_from_ID3DXAnimationController(ID3DXAnimationController *iface)
Definition: animation.c:41
static HRESULT WINAPI d3dx9_keyframed_animation_Compress(ID3DXKeyframedAnimationSet *iface, DWORD flags, float lossiness, D3DXFRAME *hierarchy, ID3DXBuffer **compressed_data)
Definition: animation.c:805
static HRESULT WINAPI d3dx9_animation_controller_UnkeyAllTrackEvents(ID3DXAnimationController *iface, UINT track)
Definition: animation.c:333
static HRESULT WINAPI d3dx9_keyframed_animation_GetTranslationKey(ID3DXKeyframedAnimationSet *iface, UINT animation, UINT key, D3DXKEY_VECTOR3 *translation_key)
Definition: animation.c:711
static const char *WINAPI d3dx9_keyframed_animation_GetName(ID3DXKeyframedAnimationSet *iface)
Definition: animation.c:538
static HRESULT WINAPI d3dx9_keyframed_animation_GetRotationKeys(ID3DXKeyframedAnimationSet *iface, UINT animation, D3DXKEY_QUATERNION *rotation_keys)
Definition: animation.c:667
static HRESULT WINAPI d3dx9_animation_controller_GetTrackDesc(ID3DXAnimationController *iface, UINT track, D3DXTRACK_DESC *desc)
Definition: animation.c:258
static HRESULT WINAPI d3dx9_animation_controller_SetPriorityBlend(ID3DXAnimationController *iface, float blend_weight)
Definition: animation.c:266
static HRESULT WINAPI d3dx9_animation_controller_SetTrackDesc(ID3DXAnimationController *iface, UINT track, D3DXTRACK_DESC *desc)
Definition: animation.c:250
static ULONG WINAPI d3dx9_animation_controller_Release(ID3DXAnimationController *iface)
Definition: animation.c:73
static D3DXEVENTHANDLE WINAPI d3dx9_animation_controller_GetCurrentPriorityBlend(ID3DXAnimationController *iface)
Definition: animation.c:355
static double WINAPI d3dx9_keyframed_animation_GetSourceTicksPerSecond(ID3DXKeyframedAnimationSet *iface)
Definition: animation.c:616
static HRESULT WINAPI d3dx9_keyframed_animation_RegisterAnimationSRTKeys(ID3DXKeyframedAnimationSet *iface, const char *name, UINT scale_keys_count, UINT rotation_keys_count, UINT translation_keys_count, const D3DXKEY_VECTOR3 *scale_keys, const D3DXKEY_QUATERNION *rotation_keys, const D3DXKEY_VECTOR3 *translation_keys, DWORD *animation_index)
Definition: animation.c:791
static ULONG WINAPI d3dx9_keyframed_animation_AddRef(ID3DXKeyframedAnimationSet *iface)
Definition: animation.c:512
static HRESULT WINAPI d3dx9_animation_controller_SetTrackPosition(ID3DXAnimationController *iface, UINT track, double position)
Definition: animation.c:234
static D3DXPLAYBACK_TYPE WINAPI d3dx9_keyframed_animation_GetPlaybackType(ID3DXKeyframedAnimationSet *iface)
Definition: animation.c:608
static HRESULT WINAPI d3dx9_animation_controller_SetTrackPriority(ID3DXAnimationController *iface, UINT track, D3DXPRIORITY_TYPE priority)
Definition: animation.c:210
static HRESULT WINAPI d3dx9_keyframed_animation_GetSRT(ID3DXKeyframedAnimationSet *iface, double periodic_position, UINT animation, D3DXVECTOR3 *scale, D3DXQUATERNION *rotation, D3DXVECTOR3 *translation)
Definition: animation.c:588
static HRESULT WINAPI d3dx9_keyframed_animation_SetTranslationKey(ID3DXKeyframedAnimationSet *iface, UINT animation, UINT key, D3DXKEY_VECTOR3 *translation_key)
Definition: animation.c:720
static UINT WINAPI d3dx9_keyframed_animation_GetNumAnimations(ID3DXKeyframedAnimationSet *iface)
Definition: animation.c:562
static struct d3dx9_keyframed_animation_set * impl_from_ID3DXKeyframedAnimationSet(ID3DXKeyframedAnimationSet *iface)
Definition: animation.c:488
static UINT WINAPI d3dx9_keyframed_animation_GetNumTranslationKeys(ID3DXKeyframedAnimationSet *iface, UINT animation)
Definition: animation.c:694
static UINT WINAPI d3dx9_keyframed_animation_GetNumCallbackKeys(ID3DXKeyframedAnimationSet *iface)
Definition: animation.c:729
static UINT WINAPI d3dx9_keyframed_animation_GetNumRotationKeys(ID3DXKeyframedAnimationSet *iface, UINT animation)
Definition: animation.c:659
static HRESULT WINAPI d3dx9_animation_controller_QueryInterface(ID3DXAnimationController *iface, REFIID riid, void **out)
Definition: animation.c:46
static HRESULT WINAPI d3dx9_animation_controller_AdvanceTime(ID3DXAnimationController *iface, double time_delta, ID3DXAnimationCallbackHandler *callback_handler)
Definition: animation.c:172
static D3DXEVENTHANDLE WINAPI d3dx9_animation_controller_KeyTrackBlend(ID3DXAnimationController *iface, float new_blend_weight, double start_time, double duration, D3DXTRANSITION_TYPE transition)
Definition: animation.c:317
static HRESULT WINAPI d3dx9_animation_controller_RegisterAnimationOutput(ID3DXAnimationController *iface, const char *name, D3DXMATRIX *matrix, D3DXVECTOR3 *scale, D3DXQUATERNION *rotation, D3DXVECTOR3 *translation)
Definition: animation.c:124
static D3DXEVENTHANDLE WINAPI d3dx9_animation_controller_KeyTrackEnable(ID3DXAnimationController *iface, UINT track, BOOL new_enable, double start_time)
Definition: animation.c:308
static HRESULT WINAPI d3dx9_animation_controller_GetAnimationSetByName(ID3DXAnimationController *iface, const char *name, ID3DXAnimationSet **anim_set)
Definition: animation.c:164
static HRESULT WINAPI d3dx9_animation_controller_UnregisterAnimationSet(ID3DXAnimationController *iface, ID3DXAnimationSet *anim_set)
Definition: animation.c:141
static HRESULT WINAPI d3dx9_animation_controller_Reset(ID3DXAnimationController *iface)
Definition: animation.c:180
static HRESULT WINAPI d3dx9_animation_controller_UnkeyAllPriorityBlends(ID3DXAnimationController *iface)
Definition: animation.c:340
static HRESULT WINAPI d3dx9_animation_controller_SetTrackSpeed(ID3DXAnimationController *iface, UINT track, float speed)
Definition: animation.c:218
static UINT WINAPI d3dx9_animation_controller_GetMaxNumTracks(ID3DXAnimationController *iface)
Definition: animation.c:106
static HRESULT WINAPI d3dx9_keyframed_animation_GetCallback(ID3DXKeyframedAnimationSet *iface, double position, DWORD flags, double *callback_position, void **callback_data)
Definition: animation.c:598
static UINT WINAPI d3dx9_animation_controller_GetMaxNumAnimationOutputs(ID3DXAnimationController *iface)
Definition: animation.c:88
static HRESULT WINAPI d3dx9_keyframed_animation_GetRotationKey(ID3DXKeyframedAnimationSet *iface, UINT animation, UINT key, D3DXKEY_QUATERNION *rotation_key)
Definition: animation.c:676
static HRESULT WINAPI d3dx9_animation_controller_ValidateEvent(ID3DXAnimationController *iface, D3DXEVENTHANDLE event)
Definition: animation.c:378
static HRESULT WINAPI d3dx9_keyframed_animation_SetRotationKey(ID3DXKeyframedAnimationSet *iface, UINT animation, UINT key, D3DXKEY_QUATERNION *rotation_key)
Definition: animation.c:685
static ULONG WINAPI d3dx9_animation_controller_AddRef(ID3DXAnimationController *iface)
Definition: animation.c:63
static HRESULT WINAPI d3dx9_animation_controller_SetTrackWeight(ID3DXAnimationController *iface, UINT track, float weight)
Definition: animation.c:226
static HRESULT WINAPI d3dx9_keyframed_animation_UnregisterTranslationKey(ID3DXKeyframedAnimationSet *iface, UINT animation, UINT key)
Definition: animation.c:782
static HRESULT WINAPI d3dx9_animation_controller_RegisterAnimationSet(ID3DXAnimationController *iface, ID3DXAnimationSet *anim_set)
Definition: animation.c:133
static HRESULT WINAPI d3dx9_keyframed_animation_GetTranslationKeys(ID3DXKeyframedAnimationSet *iface, UINT animation, D3DXKEY_VECTOR3 *translation_keys)
Definition: animation.c:702
static HRESULT WINAPI d3dx9_keyframed_animation_UnregisterScaleKey(ID3DXKeyframedAnimationSet *iface, UINT animation, UINT key)
Definition: animation.c:764
static void * heap_alloc(size_t len)
Definition: appwiz.h:66
static BOOL heap_free(void *mem)
Definition: appwiz.h:76
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define FIXME(fmt,...)
Definition: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
const GUID IID_IUnknown
Definition: _set.h:50
#define D3D_OK
Definition: d3d.h:106
#define D3DERR_INVALIDCALL
struct ID3DXBuffer ID3DXBuffer
Definition: d3dx8core.h:51
DWORD D3DXEVENTHANDLE
Definition: d3dx9anim.h:157
enum _D3DXEVENT_TYPE D3DXEVENT_TYPE
enum _D3DXTRANSITION_TYPE D3DXTRANSITION_TYPE
enum _D3DXPRIORITY_TYPE D3DXPRIORITY_TYPE
enum _D3DXPLAYBACK_TYPE D3DXPLAYBACK_TYPE
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_NOTIMPL
Definition: ddrawi.h:99
#define NULL
Definition: types.h:112
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
struct _cl_event * event
Definition: glext.h:7739
GLenum GLenum GLenum GLenum GLenum scale
Definition: glext.h:9032
GLuint index
Definition: glext.h:6031
GLuint GLenum matrix
Definition: glext.h:9407
GLbitfield flags
Definition: glext.h:7161
GLboolean enable
Definition: glext.h:11120
REFIID riid
Definition: atlbase.h:39
#define debugstr_guid
Definition: kernel32.h:35
#define debugstr_a
Definition: kernel32.h:31
char string[160]
Definition: util.h:11
static const WCHAR desc[]
Definition: protectdata.c:36
static const h_entry hierarchy[]
Definition: dialog.c:66
static int priority
Definition: timer.c:163
unsigned int UINT
Definition: ndis.h:50
long LONG
Definition: pedump.c:60
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REFIID
Definition: guiddef.h:118
static FILE * out
Definition: regtests2xml.c:44
weight
Definition: sortkey.c:157
#define TRACE(s)
Definition: solgame.cpp:4
ID3DXAnimationController ID3DXAnimationController_iface
Definition: animation.c:32
const D3DXKEY_CALLBACK * callback_keys
Definition: animation.c:485
D3DXPLAYBACK_TYPE playback_type
Definition: animation.c:482
unsigned int callback_key_count
Definition: animation.c:484
ID3DXKeyframedAnimationSet ID3DXKeyframedAnimationSet_iface
Definition: animation.c:477
Definition: copy.c:22
Definition: name.c:39
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
#define WINAPI
Definition: msvc.h:6
#define E_NOINTERFACE
Definition: winerror.h:2364