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