|
@@ -47,6 +47,15 @@ typedef struct spAnimation {
|
|
|
|
|
|
int timelinesCount;
|
|
int timelinesCount;
|
|
spTimeline** timelines;
|
|
spTimeline** timelines;
|
|
|
|
+
|
|
|
|
+#ifdef __cplusplus
|
|
|
|
+ spAnimation() :
|
|
|
|
+ name(0),
|
|
|
|
+ duration(0),
|
|
|
|
+ timelinesCount(0),
|
|
|
|
+ timelines(0) {
|
|
|
|
+ }
|
|
|
|
+#endif
|
|
} spAnimation;
|
|
} spAnimation;
|
|
|
|
|
|
spAnimation* spAnimation_create (const char* name, int timelinesCount);
|
|
spAnimation* spAnimation_create (const char* name, int timelinesCount);
|
|
@@ -91,8 +100,14 @@ typedef enum {
|
|
|
|
|
|
struct spTimeline {
|
|
struct spTimeline {
|
|
const spTimelineType type;
|
|
const spTimelineType type;
|
|
-
|
|
|
|
const void* const vtable;
|
|
const void* const vtable;
|
|
|
|
+
|
|
|
|
+#ifdef __cplusplus
|
|
|
|
+ spTimeline() :
|
|
|
|
+ type(SP_TIMELINE_SCALE),
|
|
|
|
+ vtable(0) {
|
|
|
|
+ }
|
|
|
|
+#endif
|
|
};
|
|
};
|
|
|
|
|
|
void spTimeline_dispose (spTimeline* self);
|
|
void spTimeline_dispose (spTimeline* self);
|
|
@@ -117,6 +132,13 @@ typedef spTimeline Timeline;
|
|
typedef struct spCurveTimeline {
|
|
typedef struct spCurveTimeline {
|
|
spTimeline super;
|
|
spTimeline super;
|
|
float* curves; /* type, x, y, ... */
|
|
float* curves; /* type, x, y, ... */
|
|
|
|
+
|
|
|
|
+#ifdef __cplusplus
|
|
|
|
+ spCurveTimeline() :
|
|
|
|
+ super(),
|
|
|
|
+ curves(0) {
|
|
|
|
+ }
|
|
|
|
+#endif
|
|
} spCurveTimeline;
|
|
} spCurveTimeline;
|
|
|
|
|
|
void spCurveTimeline_setLinear (spCurveTimeline* self, int frameIndex);
|
|
void spCurveTimeline_setLinear (spCurveTimeline* self, int frameIndex);
|
|
@@ -143,6 +165,15 @@ typedef struct spBaseTimeline {
|
|
int const framesCount;
|
|
int const framesCount;
|
|
float* const frames; /* time, angle, ... for rotate. time, x, y, ... for translate and scale. */
|
|
float* const frames; /* time, angle, ... for rotate. time, x, y, ... for translate and scale. */
|
|
int boneIndex;
|
|
int boneIndex;
|
|
|
|
+
|
|
|
|
+#ifdef __cplusplus
|
|
|
|
+ spBaseTimeline() :
|
|
|
|
+ super(),
|
|
|
|
+ framesCount(0),
|
|
|
|
+ frames(0),
|
|
|
|
+ boneIndex(0) {
|
|
|
|
+ }
|
|
|
|
+#endif
|
|
} spBaseTimeline;
|
|
} spBaseTimeline;
|
|
|
|
|
|
/**/
|
|
/**/
|
|
@@ -194,6 +225,15 @@ typedef struct spColorTimeline {
|
|
int const framesCount;
|
|
int const framesCount;
|
|
float* const frames; /* time, r, g, b, a, ... */
|
|
float* const frames; /* time, r, g, b, a, ... */
|
|
int slotIndex;
|
|
int slotIndex;
|
|
|
|
+
|
|
|
|
+#ifdef __cplusplus
|
|
|
|
+ spColorTimeline() :
|
|
|
|
+ super(),
|
|
|
|
+ framesCount(0),
|
|
|
|
+ frames(0),
|
|
|
|
+ slotIndex(0) {
|
|
|
|
+ }
|
|
|
|
+#endif
|
|
} spColorTimeline;
|
|
} spColorTimeline;
|
|
|
|
|
|
spColorTimeline* spColorTimeline_create (int framesCount);
|
|
spColorTimeline* spColorTimeline_create (int framesCount);
|
|
@@ -214,6 +254,16 @@ typedef struct spAttachmentTimeline {
|
|
float* const frames; /* time, ... */
|
|
float* const frames; /* time, ... */
|
|
int slotIndex;
|
|
int slotIndex;
|
|
const char** const attachmentNames;
|
|
const char** const attachmentNames;
|
|
|
|
+
|
|
|
|
+#ifdef __cplusplus
|
|
|
|
+ spAttachmentTimeline() :
|
|
|
|
+ super(),
|
|
|
|
+ framesCount(0),
|
|
|
|
+ frames(0),
|
|
|
|
+ slotIndex(0),
|
|
|
|
+ attachmentNames(0) {
|
|
|
|
+ }
|
|
|
|
+#endif
|
|
} spAttachmentTimeline;
|
|
} spAttachmentTimeline;
|
|
|
|
|
|
spAttachmentTimeline* spAttachmentTimeline_create (int framesCount);
|
|
spAttachmentTimeline* spAttachmentTimeline_create (int framesCount);
|
|
@@ -234,6 +284,15 @@ typedef struct spEventTimeline {
|
|
int const framesCount;
|
|
int const framesCount;
|
|
float* const frames; /* time, ... */
|
|
float* const frames; /* time, ... */
|
|
spEvent** const events;
|
|
spEvent** const events;
|
|
|
|
+
|
|
|
|
+#ifdef __cplusplus
|
|
|
|
+ spEventTimeline() :
|
|
|
|
+ super(),
|
|
|
|
+ framesCount(0),
|
|
|
|
+ frames(0),
|
|
|
|
+ events(0) {
|
|
|
|
+ }
|
|
|
|
+#endif
|
|
} spEventTimeline;
|
|
} spEventTimeline;
|
|
|
|
|
|
spEventTimeline* spEventTimeline_create (int framesCount);
|
|
spEventTimeline* spEventTimeline_create (int framesCount);
|
|
@@ -254,6 +313,16 @@ typedef struct spDrawOrderTimeline {
|
|
float* const frames; /* time, ... */
|
|
float* const frames; /* time, ... */
|
|
const int** const drawOrders;
|
|
const int** const drawOrders;
|
|
int const slotsCount;
|
|
int const slotsCount;
|
|
|
|
+
|
|
|
|
+#ifdef __cplusplus
|
|
|
|
+ spDrawOrderTimeline() :
|
|
|
|
+ super(),
|
|
|
|
+ framesCount(0),
|
|
|
|
+ frames(0),
|
|
|
|
+ drawOrders(0),
|
|
|
|
+ slotsCount(0) {
|
|
|
|
+ }
|
|
|
|
+#endif
|
|
} spDrawOrderTimeline;
|
|
} spDrawOrderTimeline;
|
|
|
|
|
|
spDrawOrderTimeline* spDrawOrderTimeline_create (int framesCount, int slotsCount);
|
|
spDrawOrderTimeline* spDrawOrderTimeline_create (int framesCount, int slotsCount);
|
|
@@ -276,6 +345,17 @@ typedef struct spFFDTimeline {
|
|
const float** const frameVertices;
|
|
const float** const frameVertices;
|
|
int slotIndex;
|
|
int slotIndex;
|
|
spAttachment* attachment;
|
|
spAttachment* attachment;
|
|
|
|
+
|
|
|
|
+#ifdef __cplusplus
|
|
|
|
+ spFFDTimeline() :
|
|
|
|
+ super(),
|
|
|
|
+ framesCount(0),
|
|
|
|
+ frames(0),
|
|
|
|
+ frameVerticesCount(0),
|
|
|
|
+ frameVertices(0),
|
|
|
|
+ slotIndex(0) {
|
|
|
|
+ }
|
|
|
|
+#endif
|
|
} spFFDTimeline;
|
|
} spFFDTimeline;
|
|
|
|
|
|
spFFDTimeline* spFFDTimeline_create (int framesCount, int frameVerticesCount);
|
|
spFFDTimeline* spFFDTimeline_create (int framesCount, int frameVerticesCount);
|
|
@@ -295,6 +375,15 @@ typedef struct spIkConstraintTimeline {
|
|
int const framesCount;
|
|
int const framesCount;
|
|
float* const frames; /* time, mix, bendDirection, ... */
|
|
float* const frames; /* time, mix, bendDirection, ... */
|
|
int ikConstraintIndex;
|
|
int ikConstraintIndex;
|
|
|
|
+
|
|
|
|
+#ifdef __cplusplus
|
|
|
|
+ spIkConstraintTimeline() :
|
|
|
|
+ super(),
|
|
|
|
+ framesCount(0),
|
|
|
|
+ frames(0),
|
|
|
|
+ ikConstraintIndex(0) {
|
|
|
|
+ }
|
|
|
|
+#endif
|
|
} spIkConstraintTimeline;
|
|
} spIkConstraintTimeline;
|
|
|
|
|
|
spIkConstraintTimeline* spIkConstraintTimeline_create (int framesCount);
|
|
spIkConstraintTimeline* spIkConstraintTimeline_create (int framesCount);
|
|
@@ -316,6 +405,16 @@ typedef struct spFlipTimeline {
|
|
int const framesCount;
|
|
int const framesCount;
|
|
float* const frames; /* time, flip, ... */
|
|
float* const frames; /* time, flip, ... */
|
|
int boneIndex;
|
|
int boneIndex;
|
|
|
|
+
|
|
|
|
+#ifdef __cplusplus
|
|
|
|
+ spFlipTimeline() :
|
|
|
|
+ super(),
|
|
|
|
+ x(0),
|
|
|
|
+ framesCount(0),
|
|
|
|
+ frames(0),
|
|
|
|
+ boneIndex(0) {
|
|
|
|
+ }
|
|
|
|
+#endif
|
|
} spFlipTimeline;
|
|
} spFlipTimeline;
|
|
|
|
|
|
spFlipTimeline* spFlipTimeline_create (int framesCount, int/*bool*/x);
|
|
spFlipTimeline* spFlipTimeline_create (int framesCount, int/*bool*/x);
|