|
@@ -31,6 +31,7 @@
|
|
|
#ifndef SPINE_ANIMATION_H_
|
|
|
#define SPINE_ANIMATION_H_
|
|
|
|
|
|
+#include <spine/dll.h>
|
|
|
#include <spine/Event.h>
|
|
|
#include <spine/Attachment.h>
|
|
|
|
|
@@ -69,13 +70,13 @@ typedef enum {
|
|
|
SP_MIX_DIRECTION_OUT
|
|
|
} spMixDirection;
|
|
|
|
|
|
-spAnimation* spAnimation_create (const char* name, int timelinesCount);
|
|
|
-void spAnimation_dispose (spAnimation* self);
|
|
|
+SP_API spAnimation* spAnimation_create (const char* name, int timelinesCount);
|
|
|
+SP_API void spAnimation_dispose (spAnimation* self);
|
|
|
|
|
|
/** Poses the skeleton at the specified time for this animation.
|
|
|
* @param lastTime The last time the animation was applied.
|
|
|
* @param events Any triggered events are added. May be null.*/
|
|
|
-void spAnimation_apply (const spAnimation* self, struct spSkeleton* skeleton, float lastTime, float time, int loop,
|
|
|
+SP_API void spAnimation_apply (const spAnimation* self, struct spSkeleton* skeleton, float lastTime, float time, int loop,
|
|
|
spEvent** events, int* eventsCount, float alpha, spMixPose pose, spMixDirection direction);
|
|
|
|
|
|
#ifdef SPINE_SHORT_NAMES
|
|
@@ -117,10 +118,10 @@ struct spTimeline {
|
|
|
#endif
|
|
|
};
|
|
|
|
|
|
-void spTimeline_dispose (spTimeline* self);
|
|
|
-void spTimeline_apply (const spTimeline* self, struct spSkeleton* skeleton, float lastTime, float time, spEvent** firedEvents,
|
|
|
+SP_API void spTimeline_dispose (spTimeline* self);
|
|
|
+SP_API void spTimeline_apply (const spTimeline* self, struct spSkeleton* skeleton, float lastTime, float time, spEvent** firedEvents,
|
|
|
int* eventsCount, float alpha, spMixPose pose, spMixDirection direction);
|
|
|
-int spTimeline_getPropertyId (const spTimeline* self);
|
|
|
+SP_API int spTimeline_getPropertyId (const spTimeline* self);
|
|
|
|
|
|
#ifdef SPINE_SHORT_NAMES
|
|
|
typedef spTimeline Timeline;
|
|
@@ -149,14 +150,14 @@ typedef struct spCurveTimeline {
|
|
|
#endif
|
|
|
} spCurveTimeline;
|
|
|
|
|
|
-void spCurveTimeline_setLinear (spCurveTimeline* self, int frameIndex);
|
|
|
-void spCurveTimeline_setStepped (spCurveTimeline* self, int frameIndex);
|
|
|
+SP_API void spCurveTimeline_setLinear (spCurveTimeline* self, int frameIndex);
|
|
|
+SP_API void spCurveTimeline_setStepped (spCurveTimeline* self, int frameIndex);
|
|
|
|
|
|
/* Sets the control handle positions for an interpolation bezier curve used to transition from this keyframe to the next.
|
|
|
* cx1 and cx2 are from 0 to 1, representing the percent of time between the two keyframes. cy1 and cy2 are the percent of
|
|
|
* the difference between the keyframe's values. */
|
|
|
-void spCurveTimeline_setCurve (spCurveTimeline* self, int frameIndex, float cx1, float cy1, float cx2, float cy2);
|
|
|
-float spCurveTimeline_getCurvePercent (const spCurveTimeline* self, int frameIndex, float percent);
|
|
|
+SP_API void spCurveTimeline_setCurve (spCurveTimeline* self, int frameIndex, float cx1, float cy1, float cx2, float cy2);
|
|
|
+SP_API float spCurveTimeline_getCurvePercent (const spCurveTimeline* self, int frameIndex, float percent);
|
|
|
|
|
|
#ifdef SPINE_SHORT_NAMES
|
|
|
typedef spCurveTimeline CurveTimeline;
|
|
@@ -192,9 +193,9 @@ static const int ROTATE_ENTRIES = 2;
|
|
|
|
|
|
typedef struct spBaseTimeline spRotateTimeline;
|
|
|
|
|
|
-spRotateTimeline* spRotateTimeline_create (int framesCount);
|
|
|
+SP_API spRotateTimeline* spRotateTimeline_create (int framesCount);
|
|
|
|
|
|
-void spRotateTimeline_setFrame (spRotateTimeline* self, int frameIndex, float time, float angle);
|
|
|
+SP_API void spRotateTimeline_setFrame (spRotateTimeline* self, int frameIndex, float time, float angle);
|
|
|
|
|
|
#ifdef SPINE_SHORT_NAMES
|
|
|
typedef spRotateTimeline RotateTimeline;
|
|
@@ -208,9 +209,9 @@ static const int TRANSLATE_ENTRIES = 3;
|
|
|
|
|
|
typedef struct spBaseTimeline spTranslateTimeline;
|
|
|
|
|
|
-spTranslateTimeline* spTranslateTimeline_create (int framesCount);
|
|
|
+SP_API spTranslateTimeline* spTranslateTimeline_create (int framesCount);
|
|
|
|
|
|
-void spTranslateTimeline_setFrame (spTranslateTimeline* self, int frameIndex, float time, float x, float y);
|
|
|
+SP_API void spTranslateTimeline_setFrame (spTranslateTimeline* self, int frameIndex, float time, float x, float y);
|
|
|
|
|
|
#ifdef SPINE_SHORT_NAMES
|
|
|
typedef spTranslateTimeline TranslateTimeline;
|
|
@@ -222,9 +223,9 @@ typedef spTranslateTimeline TranslateTimeline;
|
|
|
|
|
|
typedef struct spBaseTimeline spScaleTimeline;
|
|
|
|
|
|
-spScaleTimeline* spScaleTimeline_create (int framesCount);
|
|
|
+SP_API spScaleTimeline* spScaleTimeline_create (int framesCount);
|
|
|
|
|
|
-void spScaleTimeline_setFrame (spScaleTimeline* self, int frameIndex, float time, float x, float y);
|
|
|
+SP_API void spScaleTimeline_setFrame (spScaleTimeline* self, int frameIndex, float time, float x, float y);
|
|
|
|
|
|
#ifdef SPINE_SHORT_NAMES
|
|
|
typedef spScaleTimeline ScaleTimeline;
|
|
@@ -236,9 +237,9 @@ typedef spScaleTimeline ScaleTimeline;
|
|
|
|
|
|
typedef struct spBaseTimeline spShearTimeline;
|
|
|
|
|
|
-spShearTimeline* spShearTimeline_create (int framesCount);
|
|
|
+SP_API spShearTimeline* spShearTimeline_create (int framesCount);
|
|
|
|
|
|
-void spShearTimeline_setFrame (spShearTimeline* self, int frameIndex, float time, float x, float y);
|
|
|
+SP_API void spShearTimeline_setFrame (spShearTimeline* self, int frameIndex, float time, float x, float y);
|
|
|
|
|
|
#ifdef SPINE_SHORT_NAMES
|
|
|
typedef spShearTimeline ShearTimeline;
|
|
@@ -266,9 +267,9 @@ typedef struct spColorTimeline {
|
|
|
#endif
|
|
|
} spColorTimeline;
|
|
|
|
|
|
-spColorTimeline* spColorTimeline_create (int framesCount);
|
|
|
+SP_API spColorTimeline* spColorTimeline_create (int framesCount);
|
|
|
|
|
|
-void spColorTimeline_setFrame (spColorTimeline* self, int frameIndex, float time, float r, float g, float b, float a);
|
|
|
+SP_API void spColorTimeline_setFrame (spColorTimeline* self, int frameIndex, float time, float r, float g, float b, float a);
|
|
|
|
|
|
#ifdef SPINE_SHORT_NAMES
|
|
|
typedef spColorTimeline ColorTimeline;
|
|
@@ -296,9 +297,9 @@ typedef struct spTwoColorTimeline {
|
|
|
#endif
|
|
|
} spTwoColorTimeline;
|
|
|
|
|
|
-spTwoColorTimeline* spTwoColorTimeline_create (int framesCount);
|
|
|
+SP_API spTwoColorTimeline* spTwoColorTimeline_create (int framesCount);
|
|
|
|
|
|
-void spTwoColorTimeline_setFrame (spTwoColorTimeline* self, int frameIndex, float time, float r, float g, float b, float a, float r2, float g2, float b2);
|
|
|
+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);
|
|
|
|
|
|
#ifdef SPINE_SHORT_NAMES
|
|
|
typedef spTwoColorTimeline TwoColorTimeline;
|
|
@@ -326,10 +327,10 @@ typedef struct spAttachmentTimeline {
|
|
|
#endif
|
|
|
} spAttachmentTimeline;
|
|
|
|
|
|
-spAttachmentTimeline* spAttachmentTimeline_create (int framesCount);
|
|
|
+SP_API spAttachmentTimeline* spAttachmentTimeline_create (int framesCount);
|
|
|
|
|
|
/* @param attachmentName May be 0. */
|
|
|
-void spAttachmentTimeline_setFrame (spAttachmentTimeline* self, int frameIndex, float time, const char* attachmentName);
|
|
|
+SP_API void spAttachmentTimeline_setFrame (spAttachmentTimeline* self, int frameIndex, float time, const char* attachmentName);
|
|
|
|
|
|
#ifdef SPINE_SHORT_NAMES
|
|
|
typedef spAttachmentTimeline AttachmentTimeline;
|
|
@@ -355,9 +356,9 @@ typedef struct spEventTimeline {
|
|
|
#endif
|
|
|
} spEventTimeline;
|
|
|
|
|
|
-spEventTimeline* spEventTimeline_create (int framesCount);
|
|
|
+SP_API spEventTimeline* spEventTimeline_create (int framesCount);
|
|
|
|
|
|
-void spEventTimeline_setFrame (spEventTimeline* self, int frameIndex, spEvent* event);
|
|
|
+SP_API void spEventTimeline_setFrame (spEventTimeline* self, int frameIndex, spEvent* event);
|
|
|
|
|
|
#ifdef SPINE_SHORT_NAMES
|
|
|
typedef spEventTimeline EventTimeline;
|
|
@@ -385,9 +386,9 @@ typedef struct spDrawOrderTimeline {
|
|
|
#endif
|
|
|
} spDrawOrderTimeline;
|
|
|
|
|
|
-spDrawOrderTimeline* spDrawOrderTimeline_create (int framesCount, int slotsCount);
|
|
|
+SP_API spDrawOrderTimeline* spDrawOrderTimeline_create (int framesCount, int slotsCount);
|
|
|
|
|
|
-void spDrawOrderTimeline_setFrame (spDrawOrderTimeline* self, int frameIndex, float time, const int* drawOrder);
|
|
|
+SP_API void spDrawOrderTimeline_setFrame (spDrawOrderTimeline* self, int frameIndex, float time, const int* drawOrder);
|
|
|
|
|
|
#ifdef SPINE_SHORT_NAMES
|
|
|
typedef spDrawOrderTimeline DrawOrderTimeline;
|
|
@@ -418,9 +419,9 @@ typedef struct spDeformTimeline {
|
|
|
#endif
|
|
|
} spDeformTimeline;
|
|
|
|
|
|
-spDeformTimeline* spDeformTimeline_create (int framesCount, int frameVerticesCount);
|
|
|
+SP_API spDeformTimeline* spDeformTimeline_create (int framesCount, int frameVerticesCount);
|
|
|
|
|
|
-void spDeformTimeline_setFrame (spDeformTimeline* self, int frameIndex, float time, float* vertices);
|
|
|
+SP_API void spDeformTimeline_setFrame (spDeformTimeline* self, int frameIndex, float time, float* vertices);
|
|
|
|
|
|
#ifdef SPINE_SHORT_NAMES
|
|
|
typedef spDeformTimeline DeformTimeline;
|
|
@@ -448,9 +449,9 @@ typedef struct spIkConstraintTimeline {
|
|
|
#endif
|
|
|
} spIkConstraintTimeline;
|
|
|
|
|
|
-spIkConstraintTimeline* spIkConstraintTimeline_create (int framesCount);
|
|
|
+SP_API spIkConstraintTimeline* spIkConstraintTimeline_create (int framesCount);
|
|
|
|
|
|
-void spIkConstraintTimeline_setFrame (spIkConstraintTimeline* self, int frameIndex, float time, float mix, int bendDirection);
|
|
|
+SP_API void spIkConstraintTimeline_setFrame (spIkConstraintTimeline* self, int frameIndex, float time, float mix, int bendDirection);
|
|
|
|
|
|
#ifdef SPINE_SHORT_NAMES
|
|
|
typedef spIkConstraintTimeline IkConstraintTimeline;
|
|
@@ -478,9 +479,9 @@ typedef struct spTransformConstraintTimeline {
|
|
|
#endif
|
|
|
} spTransformConstraintTimeline;
|
|
|
|
|
|
-spTransformConstraintTimeline* spTransformConstraintTimeline_create (int framesCount);
|
|
|
+SP_API spTransformConstraintTimeline* spTransformConstraintTimeline_create (int framesCount);
|
|
|
|
|
|
-void spTransformConstraintTimeline_setFrame (spTransformConstraintTimeline* self, int frameIndex, float time, float rotateMix, float translateMix, float scaleMix, float shearMix);
|
|
|
+SP_API void spTransformConstraintTimeline_setFrame (spTransformConstraintTimeline* self, int frameIndex, float time, float rotateMix, float translateMix, float scaleMix, float shearMix);
|
|
|
|
|
|
#ifdef SPINE_SHORT_NAMES
|
|
|
typedef spTransformConstraintTimeline TransformConstraintTimeline;
|
|
@@ -508,9 +509,9 @@ typedef struct spPathConstraintPositionTimeline {
|
|
|
#endif
|
|
|
} spPathConstraintPositionTimeline;
|
|
|
|
|
|
-spPathConstraintPositionTimeline* spPathConstraintPositionTimeline_create (int framesCount);
|
|
|
+SP_API spPathConstraintPositionTimeline* spPathConstraintPositionTimeline_create (int framesCount);
|
|
|
|
|
|
-void spPathConstraintPositionTimeline_setFrame (spPathConstraintPositionTimeline* self, int frameIndex, float time, float value);
|
|
|
+SP_API void spPathConstraintPositionTimeline_setFrame (spPathConstraintPositionTimeline* self, int frameIndex, float time, float value);
|
|
|
|
|
|
#ifdef SPINE_SHORT_NAMES
|
|
|
typedef spPathConstraintPositionTimeline PathConstraintPositionTimeline;
|
|
@@ -538,9 +539,9 @@ typedef struct spPathConstraintSpacingTimeline {
|
|
|
#endif
|
|
|
} spPathConstraintSpacingTimeline;
|
|
|
|
|
|
-spPathConstraintSpacingTimeline* spPathConstraintSpacingTimeline_create (int framesCount);
|
|
|
+SP_API spPathConstraintSpacingTimeline* spPathConstraintSpacingTimeline_create (int framesCount);
|
|
|
|
|
|
-void spPathConstraintSpacingTimeline_setFrame (spPathConstraintSpacingTimeline* self, int frameIndex, float time, float value);
|
|
|
+SP_API void spPathConstraintSpacingTimeline_setFrame (spPathConstraintSpacingTimeline* self, int frameIndex, float time, float value);
|
|
|
|
|
|
#ifdef SPINE_SHORT_NAMES
|
|
|
typedef spPathConstraintSpacingTimeline PathConstraintSpacingTimeline;
|
|
@@ -568,9 +569,9 @@ typedef struct spPathConstraintMixTimeline {
|
|
|
#endif
|
|
|
} spPathConstraintMixTimeline;
|
|
|
|
|
|
-spPathConstraintMixTimeline* spPathConstraintMixTimeline_create (int framesCount);
|
|
|
+SP_API spPathConstraintMixTimeline* spPathConstraintMixTimeline_create (int framesCount);
|
|
|
|
|
|
-void spPathConstraintMixTimeline_setFrame (spPathConstraintMixTimeline* self, int frameIndex, float time, float rotateMix, float translateMix);
|
|
|
+SP_API void spPathConstraintMixTimeline_setFrame (spPathConstraintMixTimeline* self, int frameIndex, float time, float rotateMix, float translateMix);
|
|
|
|
|
|
#ifdef SPINE_SHORT_NAMES
|
|
|
typedef spPathConstraintMixTimeline PathConstraintMixTimeline;
|