Animation.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588
  1. /******************************************************************************
  2. * Spine Runtimes License Agreement
  3. * Last updated January 1, 2020. Replaces all prior versions.
  4. *
  5. * Copyright (c) 2013-2020, Esoteric Software LLC
  6. *
  7. * Integration of the Spine Runtimes into software or otherwise creating
  8. * derivative works of the Spine Runtimes is permitted under the terms and
  9. * conditions of Section 2 of the Spine Editor License Agreement:
  10. * http://esotericsoftware.com/spine-editor-license
  11. *
  12. * Otherwise, it is permitted to integrate the Spine Runtimes into software
  13. * or otherwise create derivative works of the Spine Runtimes (collectively,
  14. * "Products"), provided that each user of the Products must obtain their own
  15. * Spine Editor license and redistribution of the Products in any form must
  16. * include this license and copyright notice.
  17. *
  18. * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
  19. * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  20. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  21. * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
  22. * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  23. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
  24. * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
  25. * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  26. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  27. * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  28. *****************************************************************************/
  29. #ifndef SPINE_ANIMATION_H_
  30. #define SPINE_ANIMATION_H_
  31. #include <spine/dll.h>
  32. #include <spine/Event.h>
  33. #include <spine/Attachment.h>
  34. #ifdef __cplusplus
  35. extern "C" {
  36. #endif
  37. typedef struct spTimeline spTimeline;
  38. struct spSkeleton;
  39. typedef struct spAnimation {
  40. const char* const name;
  41. float duration;
  42. int timelinesCount;
  43. spTimeline** timelines;
  44. #ifdef __cplusplus
  45. spAnimation() :
  46. name(0),
  47. duration(0),
  48. timelinesCount(0),
  49. timelines(0) {
  50. }
  51. #endif
  52. } spAnimation;
  53. typedef enum {
  54. SP_MIX_BLEND_SETUP,
  55. SP_MIX_BLEND_FIRST,
  56. SP_MIX_BLEND_REPLACE,
  57. SP_MIX_BLEND_ADD
  58. } spMixBlend;
  59. typedef enum {
  60. SP_MIX_DIRECTION_IN,
  61. SP_MIX_DIRECTION_OUT
  62. } spMixDirection;
  63. SP_API spAnimation* spAnimation_create (const char* name, int timelinesCount);
  64. SP_API void spAnimation_dispose (spAnimation* self);
  65. /** Poses the skeleton at the specified time for this animation.
  66. * @param lastTime The last time the animation was applied.
  67. * @param events Any triggered events are added. May be null.*/
  68. SP_API void spAnimation_apply (const spAnimation* self, struct spSkeleton* skeleton, float lastTime, float time, int loop,
  69. spEvent** events, int* eventsCount, float alpha, spMixBlend blend, spMixDirection direction);
  70. #ifdef SPINE_SHORT_NAMES
  71. typedef spAnimation Animation;
  72. #define Animation_create(...) spAnimation_create(__VA_ARGS__)
  73. #define Animation_dispose(...) spAnimation_dispose(__VA_ARGS__)
  74. #define Animation_apply(...) spAnimation_apply(__VA_ARGS__)
  75. #endif
  76. /**/
  77. typedef enum {
  78. SP_TIMELINE_ROTATE,
  79. SP_TIMELINE_TRANSLATE,
  80. SP_TIMELINE_SCALE,
  81. SP_TIMELINE_SHEAR,
  82. SP_TIMELINE_ATTACHMENT,
  83. SP_TIMELINE_COLOR,
  84. SP_TIMELINE_DEFORM,
  85. SP_TIMELINE_EVENT,
  86. SP_TIMELINE_DRAWORDER,
  87. SP_TIMELINE_IKCONSTRAINT,
  88. SP_TIMELINE_TRANSFORMCONSTRAINT,
  89. SP_TIMELINE_PATHCONSTRAINTPOSITION,
  90. SP_TIMELINE_PATHCONSTRAINTSPACING,
  91. SP_TIMELINE_PATHCONSTRAINTMIX,
  92. SP_TIMELINE_TWOCOLOR
  93. } spTimelineType;
  94. struct spTimeline {
  95. const spTimelineType type;
  96. const void* const vtable;
  97. #ifdef __cplusplus
  98. spTimeline() :
  99. type(SP_TIMELINE_SCALE),
  100. vtable(0) {
  101. }
  102. #endif
  103. };
  104. SP_API void spTimeline_dispose (spTimeline* self);
  105. SP_API void spTimeline_apply (const spTimeline* self, struct spSkeleton* skeleton, float lastTime, float time, spEvent** firedEvents,
  106. int* eventsCount, float alpha, spMixBlend blend, spMixDirection direction);
  107. SP_API int spTimeline_getPropertyId (const spTimeline* self);
  108. #ifdef SPINE_SHORT_NAMES
  109. typedef spTimeline Timeline;
  110. #define TIMELINE_SCALE SP_TIMELINE_SCALE
  111. #define TIMELINE_ROTATE SP_TIMELINE_ROTATE
  112. #define TIMELINE_TRANSLATE SP_TIMELINE_TRANSLATE
  113. #define TIMELINE_COLOR SP_TIMELINE_COLOR
  114. #define TIMELINE_ATTACHMENT SP_TIMELINE_ATTACHMENT
  115. #define TIMELINE_EVENT SP_TIMELINE_EVENT
  116. #define TIMELINE_DRAWORDER SP_TIMELINE_DRAWORDER
  117. #define Timeline_dispose(...) spTimeline_dispose(__VA_ARGS__)
  118. #define Timeline_apply(...) spTimeline_apply(__VA_ARGS__)
  119. #endif
  120. /**/
  121. typedef struct spCurveTimeline {
  122. spTimeline super;
  123. float* curves; /* type, x, y, ... */
  124. #ifdef __cplusplus
  125. spCurveTimeline() :
  126. super(),
  127. curves(0) {
  128. }
  129. #endif
  130. } spCurveTimeline;
  131. SP_API void spCurveTimeline_setLinear (spCurveTimeline* self, int frameIndex);
  132. SP_API void spCurveTimeline_setStepped (spCurveTimeline* self, int frameIndex);
  133. /* Sets the control handle positions for an interpolation bezier curve used to transition from this keyframe to the next.
  134. * cx1 and cx2 are from 0 to 1, representing the percent of time between the two keyframes. cy1 and cy2 are the percent of
  135. * the difference between the keyframe's values. */
  136. SP_API void spCurveTimeline_setCurve (spCurveTimeline* self, int frameIndex, float cx1, float cy1, float cx2, float cy2);
  137. SP_API float spCurveTimeline_getCurvePercent (const spCurveTimeline* self, int frameIndex, float percent);
  138. #ifdef SPINE_SHORT_NAMES
  139. typedef spCurveTimeline CurveTimeline;
  140. #define CurveTimeline_setLinear(...) spCurveTimeline_setLinear(__VA_ARGS__)
  141. #define CurveTimeline_setStepped(...) spCurveTimeline_setStepped(__VA_ARGS__)
  142. #define CurveTimeline_setCurve(...) spCurveTimeline_setCurve(__VA_ARGS__)
  143. #define CurveTimeline_getCurvePercent(...) spCurveTimeline_getCurvePercent(__VA_ARGS__)
  144. #endif
  145. /**/
  146. typedef struct spBaseTimeline {
  147. spCurveTimeline super;
  148. int const framesCount;
  149. float* const frames; /* time, angle, ... for rotate. time, x, y, ... for translate and scale. */
  150. int boneIndex;
  151. #ifdef __cplusplus
  152. spBaseTimeline() :
  153. super(),
  154. framesCount(0),
  155. frames(0),
  156. boneIndex(0) {
  157. }
  158. #endif
  159. } spBaseTimeline;
  160. /**/
  161. static const int ROTATE_PREV_TIME = -2, ROTATE_PREV_ROTATION = -1;
  162. static const int ROTATE_ROTATION = 1;
  163. static const int ROTATE_ENTRIES = 2;
  164. typedef struct spBaseTimeline spRotateTimeline;
  165. SP_API spRotateTimeline* spRotateTimeline_create (int framesCount);
  166. SP_API void spRotateTimeline_setFrame (spRotateTimeline* self, int frameIndex, float time, float angle);
  167. #ifdef SPINE_SHORT_NAMES
  168. typedef spRotateTimeline RotateTimeline;
  169. #define RotateTimeline_create(...) spRotateTimeline_create(__VA_ARGS__)
  170. #define RotateTimeline_setFrame(...) spRotateTimeline_setFrame(__VA_ARGS__)
  171. #endif
  172. /**/
  173. static const int TRANSLATE_ENTRIES = 3;
  174. typedef struct spBaseTimeline spTranslateTimeline;
  175. SP_API spTranslateTimeline* spTranslateTimeline_create (int framesCount);
  176. SP_API void spTranslateTimeline_setFrame (spTranslateTimeline* self, int frameIndex, float time, float x, float y);
  177. #ifdef SPINE_SHORT_NAMES
  178. typedef spTranslateTimeline TranslateTimeline;
  179. #define TranslateTimeline_create(...) spTranslateTimeline_create(__VA_ARGS__)
  180. #define TranslateTimeline_setFrame(...) spTranslateTimeline_setFrame(__VA_ARGS__)
  181. #endif
  182. /**/
  183. typedef struct spBaseTimeline spScaleTimeline;
  184. SP_API spScaleTimeline* spScaleTimeline_create (int framesCount);
  185. SP_API void spScaleTimeline_setFrame (spScaleTimeline* self, int frameIndex, float time, float x, float y);
  186. #ifdef SPINE_SHORT_NAMES
  187. typedef spScaleTimeline ScaleTimeline;
  188. #define ScaleTimeline_create(...) spScaleTimeline_create(__VA_ARGS__)
  189. #define ScaleTimeline_setFrame(...) spScaleTimeline_setFrame(__VA_ARGS__)
  190. #endif
  191. /**/
  192. typedef struct spBaseTimeline spShearTimeline;
  193. SP_API spShearTimeline* spShearTimeline_create (int framesCount);
  194. SP_API void spShearTimeline_setFrame (spShearTimeline* self, int frameIndex, float time, float x, float y);
  195. #ifdef SPINE_SHORT_NAMES
  196. typedef spShearTimeline ShearTimeline;
  197. #define ShearTimeline_create(...) spShearTimeline_create(__VA_ARGS__)
  198. #define ShearTimeline_setFrame(...) spShearTimeline_setFrame(__VA_ARGS__)
  199. #endif
  200. /**/
  201. static const int COLOR_ENTRIES = 5;
  202. typedef struct spColorTimeline {
  203. spCurveTimeline super;
  204. int const framesCount;
  205. float* const frames; /* time, r, g, b, a, ... */
  206. int slotIndex;
  207. #ifdef __cplusplus
  208. spColorTimeline() :
  209. super(),
  210. framesCount(0),
  211. frames(0),
  212. slotIndex(0) {
  213. }
  214. #endif
  215. } spColorTimeline;
  216. SP_API spColorTimeline* spColorTimeline_create (int framesCount);
  217. SP_API void spColorTimeline_setFrame (spColorTimeline* self, int frameIndex, float time, float r, float g, float b, float a);
  218. #ifdef SPINE_SHORT_NAMES
  219. typedef spColorTimeline ColorTimeline;
  220. #define ColorTimeline_create(...) spColorTimeline_create(__VA_ARGS__)
  221. #define ColorTimeline_setFrame(...) spColorTimeline_setFrame(__VA_ARGS__)
  222. #endif
  223. /**/
  224. static const int TWOCOLOR_ENTRIES = 8;
  225. typedef struct spTwoColorTimeline {
  226. spCurveTimeline super;
  227. int const framesCount;
  228. float* const frames; /* time, r, g, b, a, ... */
  229. int slotIndex;
  230. #ifdef __cplusplus
  231. spTwoColorTimeline() :
  232. super(),
  233. framesCount(0),
  234. frames(0),
  235. slotIndex(0) {
  236. }
  237. #endif
  238. } spTwoColorTimeline;
  239. SP_API spTwoColorTimeline* spTwoColorTimeline_create (int framesCount);
  240. SP_API void spTwoColorTimeline_setFrame (spTwoColorTimeline* self, int frameIndex, float time, float r, float g, float b, float a, float r2, float g2, float b2);
  241. #ifdef SPINE_SHORT_NAMES
  242. typedef spTwoColorTimeline TwoColorTimeline;
  243. #define TwoColorTimeline_create(...) spTwoColorTimeline_create(__VA_ARGS__)
  244. #define TwoColorTimeline_setFrame(...) spTwoColorTimeline_setFrame(__VA_ARGS__)
  245. #endif
  246. /**/
  247. typedef struct spAttachmentTimeline {
  248. spTimeline super;
  249. int const framesCount;
  250. float* const frames; /* time, ... */
  251. int slotIndex;
  252. const char** const attachmentNames;
  253. #ifdef __cplusplus
  254. spAttachmentTimeline() :
  255. super(),
  256. framesCount(0),
  257. frames(0),
  258. slotIndex(0),
  259. attachmentNames(0) {
  260. }
  261. #endif
  262. } spAttachmentTimeline;
  263. SP_API spAttachmentTimeline* spAttachmentTimeline_create (int framesCount);
  264. /* @param attachmentName May be 0. */
  265. SP_API void spAttachmentTimeline_setFrame (spAttachmentTimeline* self, int frameIndex, float time, const char* attachmentName);
  266. #ifdef SPINE_SHORT_NAMES
  267. typedef spAttachmentTimeline AttachmentTimeline;
  268. #define AttachmentTimeline_create(...) spAttachmentTimeline_create(__VA_ARGS__)
  269. #define AttachmentTimeline_setFrame(...) spAttachmentTimeline_setFrame(__VA_ARGS__)
  270. #endif
  271. /**/
  272. typedef struct spEventTimeline {
  273. spTimeline super;
  274. int const framesCount;
  275. float* const frames; /* time, ... */
  276. spEvent** const events;
  277. #ifdef __cplusplus
  278. spEventTimeline() :
  279. super(),
  280. framesCount(0),
  281. frames(0),
  282. events(0) {
  283. }
  284. #endif
  285. } spEventTimeline;
  286. SP_API spEventTimeline* spEventTimeline_create (int framesCount);
  287. SP_API void spEventTimeline_setFrame (spEventTimeline* self, int frameIndex, spEvent* event);
  288. #ifdef SPINE_SHORT_NAMES
  289. typedef spEventTimeline EventTimeline;
  290. #define EventTimeline_create(...) spEventTimeline_create(__VA_ARGS__)
  291. #define EventTimeline_setFrame(...) spEventTimeline_setFrame(__VA_ARGS__)
  292. #endif
  293. /**/
  294. typedef struct spDrawOrderTimeline {
  295. spTimeline super;
  296. int const framesCount;
  297. float* const frames; /* time, ... */
  298. const int** const drawOrders;
  299. int const slotsCount;
  300. #ifdef __cplusplus
  301. spDrawOrderTimeline() :
  302. super(),
  303. framesCount(0),
  304. frames(0),
  305. drawOrders(0),
  306. slotsCount(0) {
  307. }
  308. #endif
  309. } spDrawOrderTimeline;
  310. SP_API spDrawOrderTimeline* spDrawOrderTimeline_create (int framesCount, int slotsCount);
  311. SP_API void spDrawOrderTimeline_setFrame (spDrawOrderTimeline* self, int frameIndex, float time, const int* drawOrder);
  312. #ifdef SPINE_SHORT_NAMES
  313. typedef spDrawOrderTimeline DrawOrderTimeline;
  314. #define DrawOrderTimeline_create(...) spDrawOrderTimeline_create(__VA_ARGS__)
  315. #define DrawOrderTimeline_setFrame(...) spDrawOrderTimeline_setFrame(__VA_ARGS__)
  316. #endif
  317. /**/
  318. typedef struct spDeformTimeline {
  319. spCurveTimeline super;
  320. int const framesCount;
  321. float* const frames; /* time, ... */
  322. int const frameVerticesCount;
  323. const float** const frameVertices;
  324. int slotIndex;
  325. spAttachment* attachment;
  326. #ifdef __cplusplus
  327. spDeformTimeline() :
  328. super(),
  329. framesCount(0),
  330. frames(0),
  331. frameVerticesCount(0),
  332. frameVertices(0),
  333. slotIndex(0) {
  334. }
  335. #endif
  336. } spDeformTimeline;
  337. SP_API spDeformTimeline* spDeformTimeline_create (int framesCount, int frameVerticesCount);
  338. SP_API void spDeformTimeline_setFrame (spDeformTimeline* self, int frameIndex, float time, float* vertices);
  339. #ifdef SPINE_SHORT_NAMES
  340. typedef spDeformTimeline DeformTimeline;
  341. #define DeformTimeline_create(...) spDeformTimeline_create(__VA_ARGS__)
  342. #define DeformTimeline_setFrame(...) spDeformTimeline_setFrame(__VA_ARGS__)
  343. #endif
  344. /**/
  345. static const int IKCONSTRAINT_ENTRIES = 6;
  346. typedef struct spIkConstraintTimeline {
  347. spCurveTimeline super;
  348. int const framesCount;
  349. float* const frames; /* time, mix, bendDirection, ... */
  350. int ikConstraintIndex;
  351. #ifdef __cplusplus
  352. spIkConstraintTimeline() :
  353. super(),
  354. framesCount(0),
  355. frames(0),
  356. ikConstraintIndex(0) {
  357. }
  358. #endif
  359. } spIkConstraintTimeline;
  360. SP_API spIkConstraintTimeline* spIkConstraintTimeline_create (int framesCount);
  361. SP_API void spIkConstraintTimeline_setFrame (spIkConstraintTimeline* self, int frameIndex, float time, float mix, float softness, int bendDirection, int /*boolean*/ compress, int /**boolean**/ stretch);
  362. #ifdef SPINE_SHORT_NAMES
  363. typedef spIkConstraintTimeline IkConstraintTimeline;
  364. #define IkConstraintTimeline_create(...) spIkConstraintTimeline_create(__VA_ARGS__)
  365. #define IkConstraintTimeline_setFrame(...) spIkConstraintTimeline_setFrame(__VA_ARGS__)
  366. #endif
  367. /**/
  368. static const int TRANSFORMCONSTRAINT_ENTRIES = 5;
  369. typedef struct spTransformConstraintTimeline {
  370. spCurveTimeline super;
  371. int const framesCount;
  372. float* const frames; /* time, rotate mix, translate mix, scale mix, shear mix, ... */
  373. int transformConstraintIndex;
  374. #ifdef __cplusplus
  375. spTransformConstraintTimeline() :
  376. super(),
  377. framesCount(0),
  378. frames(0),
  379. transformConstraintIndex(0) {
  380. }
  381. #endif
  382. } spTransformConstraintTimeline;
  383. SP_API spTransformConstraintTimeline* spTransformConstraintTimeline_create (int framesCount);
  384. SP_API void spTransformConstraintTimeline_setFrame (spTransformConstraintTimeline* self, int frameIndex, float time, float rotateMix, float translateMix, float scaleMix, float shearMix);
  385. #ifdef SPINE_SHORT_NAMES
  386. typedef spTransformConstraintTimeline TransformConstraintTimeline;
  387. #define TransformConstraintTimeline_create(...) spTransformConstraintTimeline_create(__VA_ARGS__)
  388. #define TransformConstraintTimeline_setFrame(...) spTransformConstraintTimeline_setFrame(__VA_ARGS__)
  389. #endif
  390. /**/
  391. static const int PATHCONSTRAINTPOSITION_ENTRIES = 2;
  392. typedef struct spPathConstraintPositionTimeline {
  393. spCurveTimeline super;
  394. int const framesCount;
  395. float* const frames; /* time, rotate mix, translate mix, scale mix, shear mix, ... */
  396. int pathConstraintIndex;
  397. #ifdef __cplusplus
  398. spPathConstraintPositionTimeline() :
  399. super(),
  400. framesCount(0),
  401. frames(0),
  402. pathConstraintIndex(0) {
  403. }
  404. #endif
  405. } spPathConstraintPositionTimeline;
  406. SP_API spPathConstraintPositionTimeline* spPathConstraintPositionTimeline_create (int framesCount);
  407. SP_API void spPathConstraintPositionTimeline_setFrame (spPathConstraintPositionTimeline* self, int frameIndex, float time, float value);
  408. #ifdef SPINE_SHORT_NAMES
  409. typedef spPathConstraintPositionTimeline PathConstraintPositionTimeline;
  410. #define PathConstraintPositionTimeline_create(...) spPathConstraintPositionTimeline_create(__VA_ARGS__)
  411. #define PathConstraintPositionTimeline_setFrame(...) spPathConstraintPositionTimeline_setFrame(__VA_ARGS__)
  412. #endif
  413. /**/
  414. static const int PATHCONSTRAINTSPACING_ENTRIES = 2;
  415. typedef struct spPathConstraintSpacingTimeline {
  416. spCurveTimeline super;
  417. int const framesCount;
  418. float* const frames; /* time, rotate mix, translate mix, scale mix, shear mix, ... */
  419. int pathConstraintIndex;
  420. #ifdef __cplusplus
  421. spPathConstraintSpacingTimeline() :
  422. super(),
  423. framesCount(0),
  424. frames(0),
  425. pathConstraintIndex(0) {
  426. }
  427. #endif
  428. } spPathConstraintSpacingTimeline;
  429. SP_API spPathConstraintSpacingTimeline* spPathConstraintSpacingTimeline_create (int framesCount);
  430. SP_API void spPathConstraintSpacingTimeline_setFrame (spPathConstraintSpacingTimeline* self, int frameIndex, float time, float value);
  431. #ifdef SPINE_SHORT_NAMES
  432. typedef spPathConstraintSpacingTimeline PathConstraintSpacingTimeline;
  433. #define PathConstraintSpacingTimeline_create(...) spPathConstraintSpacingTimeline_create(__VA_ARGS__)
  434. #define PathConstraintSpacingTimeline_setFrame(...) spPathConstraintSpacingTimeline_setFrame(__VA_ARGS__)
  435. #endif
  436. /**/
  437. static const int PATHCONSTRAINTMIX_ENTRIES = 3;
  438. typedef struct spPathConstraintMixTimeline {
  439. spCurveTimeline super;
  440. int const framesCount;
  441. float* const frames; /* time, rotate mix, translate mix, scale mix, shear mix, ... */
  442. int pathConstraintIndex;
  443. #ifdef __cplusplus
  444. spPathConstraintMixTimeline() :
  445. super(),
  446. framesCount(0),
  447. frames(0),
  448. pathConstraintIndex(0) {
  449. }
  450. #endif
  451. } spPathConstraintMixTimeline;
  452. SP_API spPathConstraintMixTimeline* spPathConstraintMixTimeline_create (int framesCount);
  453. SP_API void spPathConstraintMixTimeline_setFrame (spPathConstraintMixTimeline* self, int frameIndex, float time, float rotateMix, float translateMix);
  454. #ifdef SPINE_SHORT_NAMES
  455. typedef spPathConstraintMixTimeline PathConstraintMixTimeline;
  456. #define PathConstraintMixTimeline_create(...) spPathConstraintMixTimeline_create(__VA_ARGS__)
  457. #define PathConstraintMixTimeline_setFrame(...) spPathConstraintMixTimeline_setFrame(__VA_ARGS__)
  458. #endif
  459. /**/
  460. #ifdef __cplusplus
  461. }
  462. #endif
  463. #endif /* SPINE_ANIMATION_H_ */