Added spine example
This commit is contained in:
parent
e0d4cc3143
commit
df3ed39a25
83 changed files with 15884 additions and 1 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -138,3 +138,7 @@ GPATH
|
|||
GRTAGS
|
||||
GTAGS
|
||||
.vs
|
||||
|
||||
# Ignore intelliJ project files
|
||||
.idea
|
||||
cmake-build-debug
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
project(examples)
|
||||
|
||||
# Get the sources together
|
||||
set(example_dirs audio core models others shaders shapes text textures)
|
||||
set(example_dirs audio core models others others/spine shaders shapes text textures)
|
||||
set(CMAKE_REQUIRED_DEFINITIONS -D_POSIX_C_SOURCE=199309L)
|
||||
include(CheckSymbolExists)
|
||||
check_symbol_exists(CLOCK_MONOTONIC time.h HAVE_CLOCK_MONOTONIC)
|
||||
|
|
|
|||
588
examples/others/external/include/spine/Animation.h
vendored
Normal file
588
examples/others/external/include/spine/Animation.h
vendored
Normal file
|
|
@ -0,0 +1,588 @@
|
|||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated January 1, 2020. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2020, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef SPINE_ANIMATION_H_
|
||||
#define SPINE_ANIMATION_H_
|
||||
|
||||
#include <spine/dll.h>
|
||||
#include <spine/Event.h>
|
||||
#include <spine/Attachment.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct spTimeline spTimeline;
|
||||
struct spSkeleton;
|
||||
|
||||
typedef struct spAnimation {
|
||||
const char* const name;
|
||||
float duration;
|
||||
|
||||
int timelinesCount;
|
||||
spTimeline** timelines;
|
||||
|
||||
#ifdef __cplusplus
|
||||
spAnimation() :
|
||||
name(0),
|
||||
duration(0),
|
||||
timelinesCount(0),
|
||||
timelines(0) {
|
||||
}
|
||||
#endif
|
||||
} spAnimation;
|
||||
|
||||
typedef enum {
|
||||
SP_MIX_BLEND_SETUP,
|
||||
SP_MIX_BLEND_FIRST,
|
||||
SP_MIX_BLEND_REPLACE,
|
||||
SP_MIX_BLEND_ADD
|
||||
} spMixBlend;
|
||||
|
||||
typedef enum {
|
||||
SP_MIX_DIRECTION_IN,
|
||||
SP_MIX_DIRECTION_OUT
|
||||
} spMixDirection;
|
||||
|
||||
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.*/
|
||||
SP_API void spAnimation_apply (const spAnimation* self, struct spSkeleton* skeleton, float lastTime, float time, int loop,
|
||||
spEvent** events, int* eventsCount, float alpha, spMixBlend blend, spMixDirection direction);
|
||||
|
||||
#ifdef SPINE_SHORT_NAMES
|
||||
typedef spAnimation Animation;
|
||||
#define Animation_create(...) spAnimation_create(__VA_ARGS__)
|
||||
#define Animation_dispose(...) spAnimation_dispose(__VA_ARGS__)
|
||||
#define Animation_apply(...) spAnimation_apply(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
/**/
|
||||
|
||||
typedef enum {
|
||||
SP_TIMELINE_ROTATE,
|
||||
SP_TIMELINE_TRANSLATE,
|
||||
SP_TIMELINE_SCALE,
|
||||
SP_TIMELINE_SHEAR,
|
||||
SP_TIMELINE_ATTACHMENT,
|
||||
SP_TIMELINE_COLOR,
|
||||
SP_TIMELINE_DEFORM,
|
||||
SP_TIMELINE_EVENT,
|
||||
SP_TIMELINE_DRAWORDER,
|
||||
SP_TIMELINE_IKCONSTRAINT,
|
||||
SP_TIMELINE_TRANSFORMCONSTRAINT,
|
||||
SP_TIMELINE_PATHCONSTRAINTPOSITION,
|
||||
SP_TIMELINE_PATHCONSTRAINTSPACING,
|
||||
SP_TIMELINE_PATHCONSTRAINTMIX,
|
||||
SP_TIMELINE_TWOCOLOR
|
||||
} spTimelineType;
|
||||
|
||||
struct spTimeline {
|
||||
const spTimelineType type;
|
||||
const void* const vtable;
|
||||
|
||||
#ifdef __cplusplus
|
||||
spTimeline() :
|
||||
type(SP_TIMELINE_SCALE),
|
||||
vtable(0) {
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
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, spMixBlend blend, spMixDirection direction);
|
||||
SP_API int spTimeline_getPropertyId (const spTimeline* self);
|
||||
|
||||
#ifdef SPINE_SHORT_NAMES
|
||||
typedef spTimeline Timeline;
|
||||
#define TIMELINE_SCALE SP_TIMELINE_SCALE
|
||||
#define TIMELINE_ROTATE SP_TIMELINE_ROTATE
|
||||
#define TIMELINE_TRANSLATE SP_TIMELINE_TRANSLATE
|
||||
#define TIMELINE_COLOR SP_TIMELINE_COLOR
|
||||
#define TIMELINE_ATTACHMENT SP_TIMELINE_ATTACHMENT
|
||||
#define TIMELINE_EVENT SP_TIMELINE_EVENT
|
||||
#define TIMELINE_DRAWORDER SP_TIMELINE_DRAWORDER
|
||||
#define Timeline_dispose(...) spTimeline_dispose(__VA_ARGS__)
|
||||
#define Timeline_apply(...) spTimeline_apply(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
/**/
|
||||
|
||||
typedef struct spCurveTimeline {
|
||||
spTimeline super;
|
||||
float* curves; /* type, x, y, ... */
|
||||
|
||||
#ifdef __cplusplus
|
||||
spCurveTimeline() :
|
||||
super(),
|
||||
curves(0) {
|
||||
}
|
||||
#endif
|
||||
} spCurveTimeline;
|
||||
|
||||
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. */
|
||||
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;
|
||||
#define CurveTimeline_setLinear(...) spCurveTimeline_setLinear(__VA_ARGS__)
|
||||
#define CurveTimeline_setStepped(...) spCurveTimeline_setStepped(__VA_ARGS__)
|
||||
#define CurveTimeline_setCurve(...) spCurveTimeline_setCurve(__VA_ARGS__)
|
||||
#define CurveTimeline_getCurvePercent(...) spCurveTimeline_getCurvePercent(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
/**/
|
||||
|
||||
typedef struct spBaseTimeline {
|
||||
spCurveTimeline super;
|
||||
int const framesCount;
|
||||
float* const frames; /* time, angle, ... for rotate. time, x, y, ... for translate and scale. */
|
||||
int boneIndex;
|
||||
|
||||
#ifdef __cplusplus
|
||||
spBaseTimeline() :
|
||||
super(),
|
||||
framesCount(0),
|
||||
frames(0),
|
||||
boneIndex(0) {
|
||||
}
|
||||
#endif
|
||||
} spBaseTimeline;
|
||||
|
||||
/**/
|
||||
|
||||
static const int ROTATE_PREV_TIME = -2, ROTATE_PREV_ROTATION = -1;
|
||||
static const int ROTATE_ROTATION = 1;
|
||||
static const int ROTATE_ENTRIES = 2;
|
||||
|
||||
typedef struct spBaseTimeline spRotateTimeline;
|
||||
|
||||
SP_API spRotateTimeline* spRotateTimeline_create (int framesCount);
|
||||
|
||||
SP_API void spRotateTimeline_setFrame (spRotateTimeline* self, int frameIndex, float time, float angle);
|
||||
|
||||
#ifdef SPINE_SHORT_NAMES
|
||||
typedef spRotateTimeline RotateTimeline;
|
||||
#define RotateTimeline_create(...) spRotateTimeline_create(__VA_ARGS__)
|
||||
#define RotateTimeline_setFrame(...) spRotateTimeline_setFrame(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
/**/
|
||||
|
||||
static const int TRANSLATE_ENTRIES = 3;
|
||||
|
||||
typedef struct spBaseTimeline spTranslateTimeline;
|
||||
|
||||
SP_API spTranslateTimeline* spTranslateTimeline_create (int framesCount);
|
||||
|
||||
SP_API void spTranslateTimeline_setFrame (spTranslateTimeline* self, int frameIndex, float time, float x, float y);
|
||||
|
||||
#ifdef SPINE_SHORT_NAMES
|
||||
typedef spTranslateTimeline TranslateTimeline;
|
||||
#define TranslateTimeline_create(...) spTranslateTimeline_create(__VA_ARGS__)
|
||||
#define TranslateTimeline_setFrame(...) spTranslateTimeline_setFrame(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
/**/
|
||||
|
||||
typedef struct spBaseTimeline spScaleTimeline;
|
||||
|
||||
SP_API spScaleTimeline* spScaleTimeline_create (int framesCount);
|
||||
|
||||
SP_API void spScaleTimeline_setFrame (spScaleTimeline* self, int frameIndex, float time, float x, float y);
|
||||
|
||||
#ifdef SPINE_SHORT_NAMES
|
||||
typedef spScaleTimeline ScaleTimeline;
|
||||
#define ScaleTimeline_create(...) spScaleTimeline_create(__VA_ARGS__)
|
||||
#define ScaleTimeline_setFrame(...) spScaleTimeline_setFrame(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
/**/
|
||||
|
||||
typedef struct spBaseTimeline spShearTimeline;
|
||||
|
||||
SP_API spShearTimeline* spShearTimeline_create (int framesCount);
|
||||
|
||||
SP_API void spShearTimeline_setFrame (spShearTimeline* self, int frameIndex, float time, float x, float y);
|
||||
|
||||
#ifdef SPINE_SHORT_NAMES
|
||||
typedef spShearTimeline ShearTimeline;
|
||||
#define ShearTimeline_create(...) spShearTimeline_create(__VA_ARGS__)
|
||||
#define ShearTimeline_setFrame(...) spShearTimeline_setFrame(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
/**/
|
||||
|
||||
static const int COLOR_ENTRIES = 5;
|
||||
|
||||
typedef struct spColorTimeline {
|
||||
spCurveTimeline super;
|
||||
int const framesCount;
|
||||
float* const frames; /* time, r, g, b, a, ... */
|
||||
int slotIndex;
|
||||
|
||||
#ifdef __cplusplus
|
||||
spColorTimeline() :
|
||||
super(),
|
||||
framesCount(0),
|
||||
frames(0),
|
||||
slotIndex(0) {
|
||||
}
|
||||
#endif
|
||||
} spColorTimeline;
|
||||
|
||||
SP_API spColorTimeline* spColorTimeline_create (int framesCount);
|
||||
|
||||
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;
|
||||
#define ColorTimeline_create(...) spColorTimeline_create(__VA_ARGS__)
|
||||
#define ColorTimeline_setFrame(...) spColorTimeline_setFrame(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
/**/
|
||||
|
||||
static const int TWOCOLOR_ENTRIES = 8;
|
||||
|
||||
typedef struct spTwoColorTimeline {
|
||||
spCurveTimeline super;
|
||||
int const framesCount;
|
||||
float* const frames; /* time, r, g, b, a, ... */
|
||||
int slotIndex;
|
||||
|
||||
#ifdef __cplusplus
|
||||
spTwoColorTimeline() :
|
||||
super(),
|
||||
framesCount(0),
|
||||
frames(0),
|
||||
slotIndex(0) {
|
||||
}
|
||||
#endif
|
||||
} spTwoColorTimeline;
|
||||
|
||||
SP_API spTwoColorTimeline* spTwoColorTimeline_create (int framesCount);
|
||||
|
||||
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;
|
||||
#define TwoColorTimeline_create(...) spTwoColorTimeline_create(__VA_ARGS__)
|
||||
#define TwoColorTimeline_setFrame(...) spTwoColorTimeline_setFrame(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
/**/
|
||||
|
||||
typedef struct spAttachmentTimeline {
|
||||
spTimeline super;
|
||||
int const framesCount;
|
||||
float* const frames; /* time, ... */
|
||||
int slotIndex;
|
||||
const char** const attachmentNames;
|
||||
|
||||
#ifdef __cplusplus
|
||||
spAttachmentTimeline() :
|
||||
super(),
|
||||
framesCount(0),
|
||||
frames(0),
|
||||
slotIndex(0),
|
||||
attachmentNames(0) {
|
||||
}
|
||||
#endif
|
||||
} spAttachmentTimeline;
|
||||
|
||||
SP_API spAttachmentTimeline* spAttachmentTimeline_create (int framesCount);
|
||||
|
||||
/* @param attachmentName May be 0. */
|
||||
SP_API void spAttachmentTimeline_setFrame (spAttachmentTimeline* self, int frameIndex, float time, const char* attachmentName);
|
||||
|
||||
#ifdef SPINE_SHORT_NAMES
|
||||
typedef spAttachmentTimeline AttachmentTimeline;
|
||||
#define AttachmentTimeline_create(...) spAttachmentTimeline_create(__VA_ARGS__)
|
||||
#define AttachmentTimeline_setFrame(...) spAttachmentTimeline_setFrame(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
/**/
|
||||
|
||||
typedef struct spEventTimeline {
|
||||
spTimeline super;
|
||||
int const framesCount;
|
||||
float* const frames; /* time, ... */
|
||||
spEvent** const events;
|
||||
|
||||
#ifdef __cplusplus
|
||||
spEventTimeline() :
|
||||
super(),
|
||||
framesCount(0),
|
||||
frames(0),
|
||||
events(0) {
|
||||
}
|
||||
#endif
|
||||
} spEventTimeline;
|
||||
|
||||
SP_API spEventTimeline* spEventTimeline_create (int framesCount);
|
||||
|
||||
SP_API void spEventTimeline_setFrame (spEventTimeline* self, int frameIndex, spEvent* event);
|
||||
|
||||
#ifdef SPINE_SHORT_NAMES
|
||||
typedef spEventTimeline EventTimeline;
|
||||
#define EventTimeline_create(...) spEventTimeline_create(__VA_ARGS__)
|
||||
#define EventTimeline_setFrame(...) spEventTimeline_setFrame(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
/**/
|
||||
|
||||
typedef struct spDrawOrderTimeline {
|
||||
spTimeline super;
|
||||
int const framesCount;
|
||||
float* const frames; /* time, ... */
|
||||
const int** const drawOrders;
|
||||
int const slotsCount;
|
||||
|
||||
#ifdef __cplusplus
|
||||
spDrawOrderTimeline() :
|
||||
super(),
|
||||
framesCount(0),
|
||||
frames(0),
|
||||
drawOrders(0),
|
||||
slotsCount(0) {
|
||||
}
|
||||
#endif
|
||||
} spDrawOrderTimeline;
|
||||
|
||||
SP_API spDrawOrderTimeline* spDrawOrderTimeline_create (int framesCount, int slotsCount);
|
||||
|
||||
SP_API void spDrawOrderTimeline_setFrame (spDrawOrderTimeline* self, int frameIndex, float time, const int* drawOrder);
|
||||
|
||||
#ifdef SPINE_SHORT_NAMES
|
||||
typedef spDrawOrderTimeline DrawOrderTimeline;
|
||||
#define DrawOrderTimeline_create(...) spDrawOrderTimeline_create(__VA_ARGS__)
|
||||
#define DrawOrderTimeline_setFrame(...) spDrawOrderTimeline_setFrame(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
/**/
|
||||
|
||||
typedef struct spDeformTimeline {
|
||||
spCurveTimeline super;
|
||||
int const framesCount;
|
||||
float* const frames; /* time, ... */
|
||||
int const frameVerticesCount;
|
||||
const float** const frameVertices;
|
||||
int slotIndex;
|
||||
spAttachment* attachment;
|
||||
|
||||
#ifdef __cplusplus
|
||||
spDeformTimeline() :
|
||||
super(),
|
||||
framesCount(0),
|
||||
frames(0),
|
||||
frameVerticesCount(0),
|
||||
frameVertices(0),
|
||||
slotIndex(0) {
|
||||
}
|
||||
#endif
|
||||
} spDeformTimeline;
|
||||
|
||||
SP_API spDeformTimeline* spDeformTimeline_create (int framesCount, int frameVerticesCount);
|
||||
|
||||
SP_API void spDeformTimeline_setFrame (spDeformTimeline* self, int frameIndex, float time, float* vertices);
|
||||
|
||||
#ifdef SPINE_SHORT_NAMES
|
||||
typedef spDeformTimeline DeformTimeline;
|
||||
#define DeformTimeline_create(...) spDeformTimeline_create(__VA_ARGS__)
|
||||
#define DeformTimeline_setFrame(...) spDeformTimeline_setFrame(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
/**/
|
||||
|
||||
static const int IKCONSTRAINT_ENTRIES = 6;
|
||||
|
||||
typedef struct spIkConstraintTimeline {
|
||||
spCurveTimeline super;
|
||||
int const framesCount;
|
||||
float* const frames; /* time, mix, bendDirection, ... */
|
||||
int ikConstraintIndex;
|
||||
|
||||
#ifdef __cplusplus
|
||||
spIkConstraintTimeline() :
|
||||
super(),
|
||||
framesCount(0),
|
||||
frames(0),
|
||||
ikConstraintIndex(0) {
|
||||
}
|
||||
#endif
|
||||
} spIkConstraintTimeline;
|
||||
|
||||
SP_API spIkConstraintTimeline* spIkConstraintTimeline_create (int framesCount);
|
||||
|
||||
SP_API void spIkConstraintTimeline_setFrame (spIkConstraintTimeline* self, int frameIndex, float time, float mix, float softness, int bendDirection, int /*boolean*/ compress, int /**boolean**/ stretch);
|
||||
|
||||
#ifdef SPINE_SHORT_NAMES
|
||||
typedef spIkConstraintTimeline IkConstraintTimeline;
|
||||
#define IkConstraintTimeline_create(...) spIkConstraintTimeline_create(__VA_ARGS__)
|
||||
#define IkConstraintTimeline_setFrame(...) spIkConstraintTimeline_setFrame(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
/**/
|
||||
|
||||
static const int TRANSFORMCONSTRAINT_ENTRIES = 5;
|
||||
|
||||
typedef struct spTransformConstraintTimeline {
|
||||
spCurveTimeline super;
|
||||
int const framesCount;
|
||||
float* const frames; /* time, rotate mix, translate mix, scale mix, shear mix, ... */
|
||||
int transformConstraintIndex;
|
||||
|
||||
#ifdef __cplusplus
|
||||
spTransformConstraintTimeline() :
|
||||
super(),
|
||||
framesCount(0),
|
||||
frames(0),
|
||||
transformConstraintIndex(0) {
|
||||
}
|
||||
#endif
|
||||
} spTransformConstraintTimeline;
|
||||
|
||||
SP_API spTransformConstraintTimeline* spTransformConstraintTimeline_create (int framesCount);
|
||||
|
||||
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;
|
||||
#define TransformConstraintTimeline_create(...) spTransformConstraintTimeline_create(__VA_ARGS__)
|
||||
#define TransformConstraintTimeline_setFrame(...) spTransformConstraintTimeline_setFrame(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
/**/
|
||||
|
||||
static const int PATHCONSTRAINTPOSITION_ENTRIES = 2;
|
||||
|
||||
typedef struct spPathConstraintPositionTimeline {
|
||||
spCurveTimeline super;
|
||||
int const framesCount;
|
||||
float* const frames; /* time, rotate mix, translate mix, scale mix, shear mix, ... */
|
||||
int pathConstraintIndex;
|
||||
|
||||
#ifdef __cplusplus
|
||||
spPathConstraintPositionTimeline() :
|
||||
super(),
|
||||
framesCount(0),
|
||||
frames(0),
|
||||
pathConstraintIndex(0) {
|
||||
}
|
||||
#endif
|
||||
} spPathConstraintPositionTimeline;
|
||||
|
||||
SP_API spPathConstraintPositionTimeline* spPathConstraintPositionTimeline_create (int framesCount);
|
||||
|
||||
SP_API void spPathConstraintPositionTimeline_setFrame (spPathConstraintPositionTimeline* self, int frameIndex, float time, float value);
|
||||
|
||||
#ifdef SPINE_SHORT_NAMES
|
||||
typedef spPathConstraintPositionTimeline PathConstraintPositionTimeline;
|
||||
#define PathConstraintPositionTimeline_create(...) spPathConstraintPositionTimeline_create(__VA_ARGS__)
|
||||
#define PathConstraintPositionTimeline_setFrame(...) spPathConstraintPositionTimeline_setFrame(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
/**/
|
||||
|
||||
static const int PATHCONSTRAINTSPACING_ENTRIES = 2;
|
||||
|
||||
typedef struct spPathConstraintSpacingTimeline {
|
||||
spCurveTimeline super;
|
||||
int const framesCount;
|
||||
float* const frames; /* time, rotate mix, translate mix, scale mix, shear mix, ... */
|
||||
int pathConstraintIndex;
|
||||
|
||||
#ifdef __cplusplus
|
||||
spPathConstraintSpacingTimeline() :
|
||||
super(),
|
||||
framesCount(0),
|
||||
frames(0),
|
||||
pathConstraintIndex(0) {
|
||||
}
|
||||
#endif
|
||||
} spPathConstraintSpacingTimeline;
|
||||
|
||||
SP_API spPathConstraintSpacingTimeline* spPathConstraintSpacingTimeline_create (int framesCount);
|
||||
|
||||
SP_API void spPathConstraintSpacingTimeline_setFrame (spPathConstraintSpacingTimeline* self, int frameIndex, float time, float value);
|
||||
|
||||
#ifdef SPINE_SHORT_NAMES
|
||||
typedef spPathConstraintSpacingTimeline PathConstraintSpacingTimeline;
|
||||
#define PathConstraintSpacingTimeline_create(...) spPathConstraintSpacingTimeline_create(__VA_ARGS__)
|
||||
#define PathConstraintSpacingTimeline_setFrame(...) spPathConstraintSpacingTimeline_setFrame(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
/**/
|
||||
|
||||
static const int PATHCONSTRAINTMIX_ENTRIES = 3;
|
||||
|
||||
typedef struct spPathConstraintMixTimeline {
|
||||
spCurveTimeline super;
|
||||
int const framesCount;
|
||||
float* const frames; /* time, rotate mix, translate mix, scale mix, shear mix, ... */
|
||||
int pathConstraintIndex;
|
||||
|
||||
#ifdef __cplusplus
|
||||
spPathConstraintMixTimeline() :
|
||||
super(),
|
||||
framesCount(0),
|
||||
frames(0),
|
||||
pathConstraintIndex(0) {
|
||||
}
|
||||
#endif
|
||||
} spPathConstraintMixTimeline;
|
||||
|
||||
SP_API spPathConstraintMixTimeline* spPathConstraintMixTimeline_create (int framesCount);
|
||||
|
||||
SP_API void spPathConstraintMixTimeline_setFrame (spPathConstraintMixTimeline* self, int frameIndex, float time, float rotateMix, float translateMix);
|
||||
|
||||
#ifdef SPINE_SHORT_NAMES
|
||||
typedef spPathConstraintMixTimeline PathConstraintMixTimeline;
|
||||
#define PathConstraintMixTimeline_create(...) spPathConstraintMixTimeline_create(__VA_ARGS__)
|
||||
#define PathConstraintMixTimeline_setFrame(...) spPathConstraintMixTimeline_setFrame(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
/**/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* SPINE_ANIMATION_H_ */
|
||||
189
examples/others/external/include/spine/AnimationState.h
vendored
Normal file
189
examples/others/external/include/spine/AnimationState.h
vendored
Normal file
|
|
@ -0,0 +1,189 @@
|
|||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated January 1, 2020. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2020, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef SPINE_ANIMATIONSTATE_H_
|
||||
#define SPINE_ANIMATIONSTATE_H_
|
||||
|
||||
#include <spine/dll.h>
|
||||
#include <spine/Animation.h>
|
||||
#include <spine/AnimationStateData.h>
|
||||
#include <spine/Event.h>
|
||||
#include <spine/Array.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
SP_ANIMATION_START, SP_ANIMATION_INTERRUPT, SP_ANIMATION_END, SP_ANIMATION_COMPLETE, SP_ANIMATION_DISPOSE, SP_ANIMATION_EVENT
|
||||
} spEventType;
|
||||
|
||||
typedef struct spAnimationState spAnimationState;
|
||||
typedef struct spTrackEntry spTrackEntry;
|
||||
|
||||
typedef void (*spAnimationStateListener) (spAnimationState* state, spEventType type, spTrackEntry* entry, spEvent* event);
|
||||
|
||||
_SP_ARRAY_DECLARE_TYPE(spTrackEntryArray, spTrackEntry*)
|
||||
|
||||
struct spTrackEntry {
|
||||
spAnimation* animation;
|
||||
spTrackEntry* next;
|
||||
spTrackEntry* mixingFrom;
|
||||
spTrackEntry* mixingTo;
|
||||
spAnimationStateListener listener;
|
||||
int trackIndex;
|
||||
int /*boolean*/ loop;
|
||||
int /*boolean*/ holdPrevious;
|
||||
float eventThreshold, attachmentThreshold, drawOrderThreshold;
|
||||
float animationStart, animationEnd, animationLast, nextAnimationLast;
|
||||
float delay, trackTime, trackLast, nextTrackLast, trackEnd, timeScale;
|
||||
float alpha, mixTime, mixDuration, interruptAlpha, totalAlpha;
|
||||
spMixBlend mixBlend;
|
||||
spIntArray* timelineMode;
|
||||
spTrackEntryArray* timelineHoldMix;
|
||||
float* timelinesRotation;
|
||||
int timelinesRotationCount;
|
||||
void* rendererObject;
|
||||
void* userData;
|
||||
|
||||
#ifdef __cplusplus
|
||||
spTrackEntry() :
|
||||
animation(0),
|
||||
next(0), mixingFrom(0), mixingTo(0),
|
||||
listener(0),
|
||||
trackIndex(0),
|
||||
loop(0),
|
||||
holdPrevious(0),
|
||||
eventThreshold(0), attachmentThreshold(0), drawOrderThreshold(0),
|
||||
animationStart(0), animationEnd(0), animationLast(0), nextAnimationLast(0),
|
||||
delay(0), trackTime(0), trackLast(0), nextTrackLast(0), trackEnd(0), timeScale(0),
|
||||
alpha(0), mixTime(0), mixDuration(0), interruptAlpha(0), totalAlpha(0),
|
||||
mixBlend(SP_MIX_BLEND_REPLACE),
|
||||
timelineMode(0),
|
||||
timelineHoldMix(0),
|
||||
timelinesRotation(0),
|
||||
timelinesRotationCount(0),
|
||||
rendererObject(0), userData(0) {
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
struct spAnimationState {
|
||||
spAnimationStateData* const data;
|
||||
|
||||
int tracksCount;
|
||||
spTrackEntry** tracks;
|
||||
|
||||
spAnimationStateListener listener;
|
||||
|
||||
float timeScale;
|
||||
|
||||
void* rendererObject;
|
||||
void* userData;
|
||||
|
||||
#ifdef __cplusplus
|
||||
spAnimationState() :
|
||||
data(0),
|
||||
tracksCount(0),
|
||||
tracks(0),
|
||||
listener(0),
|
||||
timeScale(0),
|
||||
rendererObject(0),
|
||||
userData(0) {
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
/* @param data May be 0 for no mixing. */
|
||||
SP_API spAnimationState* spAnimationState_create (spAnimationStateData* data);
|
||||
SP_API void spAnimationState_dispose (spAnimationState* self);
|
||||
|
||||
SP_API void spAnimationState_update (spAnimationState* self, float delta);
|
||||
SP_API int /**bool**/ spAnimationState_apply (spAnimationState* self, struct spSkeleton* skeleton);
|
||||
|
||||
SP_API void spAnimationState_clearTracks (spAnimationState* self);
|
||||
SP_API void spAnimationState_clearTrack (spAnimationState* self, int trackIndex);
|
||||
|
||||
/** Set the current animation. Any queued animations are cleared. */
|
||||
SP_API spTrackEntry* spAnimationState_setAnimationByName (spAnimationState* self, int trackIndex, const char* animationName,
|
||||
int/*bool*/loop);
|
||||
SP_API spTrackEntry* spAnimationState_setAnimation (spAnimationState* self, int trackIndex, spAnimation* animation, int/*bool*/loop);
|
||||
|
||||
/** Adds an animation to be played delay seconds after the current or last queued animation, taking into account any mix
|
||||
* duration. */
|
||||
SP_API spTrackEntry* spAnimationState_addAnimationByName (spAnimationState* self, int trackIndex, const char* animationName,
|
||||
int/*bool*/loop, float delay);
|
||||
SP_API spTrackEntry* spAnimationState_addAnimation (spAnimationState* self, int trackIndex, spAnimation* animation, int/*bool*/loop,
|
||||
float delay);
|
||||
SP_API spTrackEntry* spAnimationState_setEmptyAnimation(spAnimationState* self, int trackIndex, float mixDuration);
|
||||
SP_API spTrackEntry* spAnimationState_addEmptyAnimation(spAnimationState* self, int trackIndex, float mixDuration, float delay);
|
||||
SP_API void spAnimationState_setEmptyAnimations(spAnimationState* self, float mixDuration);
|
||||
|
||||
SP_API spTrackEntry* spAnimationState_getCurrent (spAnimationState* self, int trackIndex);
|
||||
|
||||
SP_API void spAnimationState_clearListenerNotifications(spAnimationState* self);
|
||||
|
||||
SP_API float spTrackEntry_getAnimationTime (spTrackEntry* entry);
|
||||
|
||||
/** Use this to dispose static memory before your app exits to appease your memory leak detector*/
|
||||
SP_API void spAnimationState_disposeStatics ();
|
||||
|
||||
#ifdef SPINE_SHORT_NAMES
|
||||
typedef spEventType EventType;
|
||||
#define ANIMATION_START SP_ANIMATION_START
|
||||
#define ANIMATION_INTERRUPT SP_ANIMATION_INTERRUPT
|
||||
#define ANIMATION_END SP_ANIMATION_END
|
||||
#define ANIMATION_COMPLETE SP_ANIMATION_COMPLETE
|
||||
#define ANIMATION_DISPOSE SP_ANIMATION_DISPOSE
|
||||
#define ANIMATION_EVENT SP_ANIMATION_EVENT
|
||||
typedef spAnimationStateListener AnimationStateListener;
|
||||
typedef spTrackEntry TrackEntry;
|
||||
typedef spAnimationState AnimationState;
|
||||
#define AnimationState_create(...) spAnimationState_create(__VA_ARGS__)
|
||||
#define AnimationState_dispose(...) spAnimationState_dispose(__VA_ARGS__)
|
||||
#define AnimationState_update(...) spAnimationState_update(__VA_ARGS__)
|
||||
#define AnimationState_apply(...) spAnimationState_apply(__VA_ARGS__)
|
||||
#define AnimationState_clearTracks(...) spAnimationState_clearTracks(__VA_ARGS__)
|
||||
#define AnimationState_clearTrack(...) spAnimationState_clearTrack(__VA_ARGS__)
|
||||
#define AnimationState_setAnimationByName(...) spAnimationState_setAnimationByName(__VA_ARGS__)
|
||||
#define AnimationState_setAnimation(...) spAnimationState_setAnimation(__VA_ARGS__)
|
||||
#define AnimationState_addAnimationByName(...) spAnimationState_addAnimationByName(__VA_ARGS__)
|
||||
#define AnimationState_addAnimation(...) spAnimationState_addAnimation(__VA_ARGS__)
|
||||
#define AnimationState_setEmptyAnimation(...) spAnimationState_setEmptyAnimation(__VA_ARGS__)
|
||||
#define AnimationState_addEmptyAnimation(...) spAnimationState_addEmptyAnimation(__VA_ARGS__)
|
||||
#define AnimationState_setEmptyAnimations(...) spAnimationState_setEmptyAnimations(__VA_ARGS__)
|
||||
#define AnimationState_getCurrent(...) spAnimationState_getCurrent(__VA_ARGS__)
|
||||
#define AnimationState_clearListenerNotifications(...) spAnimationState_clearListenerNotifications(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* SPINE_ANIMATIONSTATE_H_ */
|
||||
76
examples/others/external/include/spine/AnimationStateData.h
vendored
Normal file
76
examples/others/external/include/spine/AnimationStateData.h
vendored
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated January 1, 2020. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2020, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef SPINE_ANIMATIONSTATEDATA_H_
|
||||
#define SPINE_ANIMATIONSTATEDATA_H_
|
||||
|
||||
#include <spine/dll.h>
|
||||
#include <spine/Animation.h>
|
||||
#include <spine/SkeletonData.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct spAnimationStateData {
|
||||
spSkeletonData* const skeletonData;
|
||||
float defaultMix;
|
||||
const void* const entries;
|
||||
|
||||
#ifdef __cplusplus
|
||||
spAnimationStateData() :
|
||||
skeletonData(0),
|
||||
defaultMix(0),
|
||||
entries(0) {
|
||||
}
|
||||
#endif
|
||||
} spAnimationStateData;
|
||||
|
||||
SP_API spAnimationStateData* spAnimationStateData_create (spSkeletonData* skeletonData);
|
||||
SP_API void spAnimationStateData_dispose (spAnimationStateData* self);
|
||||
|
||||
SP_API void spAnimationStateData_setMixByName (spAnimationStateData* self, const char* fromName, const char* toName, float duration);
|
||||
SP_API void spAnimationStateData_setMix (spAnimationStateData* self, spAnimation* from, spAnimation* to, float duration);
|
||||
/* Returns 0 if there is no mixing between the animations. */
|
||||
SP_API float spAnimationStateData_getMix (spAnimationStateData* self, spAnimation* from, spAnimation* to);
|
||||
|
||||
#ifdef SPINE_SHORT_NAMES
|
||||
typedef spAnimationStateData AnimationStateData;
|
||||
#define AnimationStateData_create(...) spAnimationStateData_create(__VA_ARGS__)
|
||||
#define AnimationStateData_dispose(...) spAnimationStateData_dispose(__VA_ARGS__)
|
||||
#define AnimationStateData_setMixByName(...) spAnimationStateData_setMixByName(__VA_ARGS__)
|
||||
#define AnimationStateData_setMix(...) spAnimationStateData_setMix(__VA_ARGS__)
|
||||
#define AnimationStateData_getMix(...) spAnimationStateData_getMix(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* SPINE_ANIMATIONSTATEDATA_H_ */
|
||||
132
examples/others/external/include/spine/Array.h
vendored
Normal file
132
examples/others/external/include/spine/Array.h
vendored
Normal file
|
|
@ -0,0 +1,132 @@
|
|||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated January 1, 2020. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2020, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef SPINE_ARRAY_H
|
||||
#define SPINE_ARRAY_H
|
||||
|
||||
#include <spine/dll.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define _SP_ARRAY_DECLARE_TYPE(name, itemType) \
|
||||
typedef struct name { int size; int capacity; itemType* items; } name; \
|
||||
SP_API name* name##_create(int initialCapacity); \
|
||||
SP_API void name##_dispose(name* self); \
|
||||
SP_API void name##_clear(name* self); \
|
||||
SP_API name* name##_setSize(name* self, int newSize); \
|
||||
SP_API void name##_ensureCapacity(name* self, int newCapacity); \
|
||||
SP_API void name##_add(name* self, itemType value); \
|
||||
SP_API void name##_addAll(name* self, name* other); \
|
||||
SP_API void name##_addAllValues(name* self, itemType* values, int offset, int count); \
|
||||
SP_API void name##_removeAt(name* self, int index); \
|
||||
SP_API int name##_contains(name* self, itemType value); \
|
||||
SP_API itemType name##_pop(name* self); \
|
||||
SP_API itemType name##_peek(name* self);
|
||||
|
||||
#define _SP_ARRAY_IMPLEMENT_TYPE(name, itemType) \
|
||||
name* name##_create(int initialCapacity) { \
|
||||
name* array = CALLOC(name, 1); \
|
||||
array->size = 0; \
|
||||
array->capacity = initialCapacity; \
|
||||
array->items = CALLOC(itemType, initialCapacity); \
|
||||
return array; \
|
||||
} \
|
||||
void name##_dispose(name* self) { \
|
||||
FREE(self->items); \
|
||||
FREE(self); \
|
||||
} \
|
||||
void name##_clear(name* self) { \
|
||||
self->size = 0; \
|
||||
} \
|
||||
name* name##_setSize(name* self, int newSize) { \
|
||||
self->size = newSize; \
|
||||
if (self->capacity < newSize) { \
|
||||
self->capacity = MAX(8, (int)(self->size * 1.75f)); \
|
||||
self->items = REALLOC(self->items, itemType, self->capacity); \
|
||||
} \
|
||||
return self; \
|
||||
} \
|
||||
void name##_ensureCapacity(name* self, int newCapacity) { \
|
||||
if (self->capacity >= newCapacity) return; \
|
||||
self->capacity = newCapacity; \
|
||||
self->items = REALLOC(self->items, itemType, self->capacity); \
|
||||
} \
|
||||
void name##_add(name* self, itemType value) { \
|
||||
if (self->size == self->capacity) { \
|
||||
self->capacity = MAX(8, (int)(self->size * 1.75f)); \
|
||||
self->items = REALLOC(self->items, itemType, self->capacity); \
|
||||
} \
|
||||
self->items[self->size++] = value; \
|
||||
} \
|
||||
void name##_addAll(name* self, name* other) { \
|
||||
int i = 0; \
|
||||
for (; i < other->size; i++) { \
|
||||
name##_add(self, other->items[i]); \
|
||||
} \
|
||||
} \
|
||||
void name##_addAllValues(name* self, itemType* values, int offset, int count) { \
|
||||
int i = offset, n = offset + count; \
|
||||
for (; i < n; i++) { \
|
||||
name##_add(self, values[i]); \
|
||||
} \
|
||||
} \
|
||||
void name##_removeAt(name* self, int index) { \
|
||||
self->size--; \
|
||||
memmove(self->items + index, self->items + index + 1, sizeof(itemType) * (self->size - index)); \
|
||||
} \
|
||||
int name##_contains(name* self, itemType value) { \
|
||||
itemType* items = self->items; \
|
||||
int i, n; \
|
||||
for (i = 0, n = self->size; i < n; i++) { \
|
||||
if (items[i] == value) return -1; \
|
||||
} \
|
||||
return 0; \
|
||||
} \
|
||||
itemType name##_pop(name* self) { \
|
||||
itemType item = self->items[--self->size]; \
|
||||
return item; \
|
||||
} \
|
||||
itemType name##_peek(name* self) { \
|
||||
return self->items[self->size - 1]; \
|
||||
}
|
||||
|
||||
_SP_ARRAY_DECLARE_TYPE(spFloatArray, float)
|
||||
_SP_ARRAY_DECLARE_TYPE(spIntArray, int)
|
||||
_SP_ARRAY_DECLARE_TYPE(spShortArray, short)
|
||||
_SP_ARRAY_DECLARE_TYPE(spUnsignedShortArray, unsigned short)
|
||||
_SP_ARRAY_DECLARE_TYPE(spArrayFloatArray, spFloatArray*)
|
||||
_SP_ARRAY_DECLARE_TYPE(spArrayShortArray, spShortArray*)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* SPINE_ARRAY_H */
|
||||
174
examples/others/external/include/spine/Atlas.h
vendored
Normal file
174
examples/others/external/include/spine/Atlas.h
vendored
Normal file
|
|
@ -0,0 +1,174 @@
|
|||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated January 1, 2020. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2020, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef SPINE_ATLAS_H_
|
||||
#define SPINE_ATLAS_H_
|
||||
|
||||
#include <spine/dll.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct spAtlas spAtlas;
|
||||
|
||||
typedef enum {
|
||||
SP_ATLAS_UNKNOWN_FORMAT,
|
||||
SP_ATLAS_ALPHA,
|
||||
SP_ATLAS_INTENSITY,
|
||||
SP_ATLAS_LUMINANCE_ALPHA,
|
||||
SP_ATLAS_RGB565,
|
||||
SP_ATLAS_RGBA4444,
|
||||
SP_ATLAS_RGB888,
|
||||
SP_ATLAS_RGBA8888
|
||||
} spAtlasFormat;
|
||||
|
||||
typedef enum {
|
||||
SP_ATLAS_UNKNOWN_FILTER,
|
||||
SP_ATLAS_NEAREST,
|
||||
SP_ATLAS_LINEAR,
|
||||
SP_ATLAS_MIPMAP,
|
||||
SP_ATLAS_MIPMAP_NEAREST_NEAREST,
|
||||
SP_ATLAS_MIPMAP_LINEAR_NEAREST,
|
||||
SP_ATLAS_MIPMAP_NEAREST_LINEAR,
|
||||
SP_ATLAS_MIPMAP_LINEAR_LINEAR
|
||||
} spAtlasFilter;
|
||||
|
||||
typedef enum {
|
||||
SP_ATLAS_MIRROREDREPEAT,
|
||||
SP_ATLAS_CLAMPTOEDGE,
|
||||
SP_ATLAS_REPEAT
|
||||
} spAtlasWrap;
|
||||
|
||||
typedef struct spAtlasPage spAtlasPage;
|
||||
struct spAtlasPage {
|
||||
const spAtlas* atlas;
|
||||
const char* name;
|
||||
spAtlasFormat format;
|
||||
spAtlasFilter minFilter, magFilter;
|
||||
spAtlasWrap uWrap, vWrap;
|
||||
|
||||
void* rendererObject;
|
||||
int width, height;
|
||||
|
||||
spAtlasPage* next;
|
||||
};
|
||||
|
||||
SP_API spAtlasPage* spAtlasPage_create (spAtlas* atlas, const char* name);
|
||||
SP_API void spAtlasPage_dispose (spAtlasPage* self);
|
||||
|
||||
#ifdef SPINE_SHORT_NAMES
|
||||
typedef spAtlasFormat AtlasFormat;
|
||||
#define ATLAS_UNKNOWN_FORMAT SP_ATLAS_UNKNOWN_FORMAT
|
||||
#define ATLAS_ALPHA SP_ATLAS_ALPHA
|
||||
#define ATLAS_INTENSITY SP_ATLAS_INTENSITY
|
||||
#define ATLAS_LUMINANCE_ALPHA SP_ATLAS_LUMINANCE_ALPHA
|
||||
#define ATLAS_RGB565 SP_ATLAS_RGB565
|
||||
#define ATLAS_RGBA4444 SP_ATLAS_RGBA4444
|
||||
#define ATLAS_RGB888 SP_ATLAS_RGB888
|
||||
#define ATLAS_RGBA8888 SP_ATLAS_RGBA8888
|
||||
typedef spAtlasFilter AtlasFilter;
|
||||
#define ATLAS_UNKNOWN_FILTER SP_ATLAS_UNKNOWN_FILTER
|
||||
#define ATLAS_NEAREST SP_ATLAS_NEAREST
|
||||
#define ATLAS_LINEAR SP_ATLAS_LINEAR
|
||||
#define ATLAS_MIPMAP SP_ATLAS_MIPMAP
|
||||
#define ATLAS_MIPMAP_NEAREST_NEAREST SP_ATLAS_MIPMAP_NEAREST_NEAREST
|
||||
#define ATLAS_MIPMAP_LINEAR_NEAREST SP_ATLAS_MIPMAP_LINEAR_NEAREST
|
||||
#define ATLAS_MIPMAP_NEAREST_LINEAR SP_ATLAS_MIPMAP_NEAREST_LINEAR
|
||||
#define ATLAS_MIPMAP_LINEAR_LINEAR SP_ATLAS_MIPMAP_LINEAR_LINEAR
|
||||
typedef spAtlasWrap AtlasWrap;
|
||||
#define ATLAS_MIRROREDREPEAT SP_ATLAS_MIRROREDREPEAT
|
||||
#define ATLAS_CLAMPTOEDGE SP_ATLAS_CLAMPTOEDGE
|
||||
#define ATLAS_REPEAT SP_ATLAS_REPEAT
|
||||
typedef spAtlasPage AtlasPage;
|
||||
#define AtlasPage_create(...) spAtlasPage_create(__VA_ARGS__)
|
||||
#define AtlasPage_dispose(...) spAtlasPage_dispose(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
/**/
|
||||
|
||||
typedef struct spAtlasRegion spAtlasRegion;
|
||||
struct spAtlasRegion {
|
||||
const char* name;
|
||||
int x, y, width, height;
|
||||
float u, v, u2, v2;
|
||||
int offsetX, offsetY;
|
||||
int originalWidth, originalHeight;
|
||||
int index;
|
||||
int/*bool*/rotate;
|
||||
int degrees;
|
||||
int/*bool*/flip;
|
||||
int* splits;
|
||||
int* pads;
|
||||
|
||||
spAtlasPage* page;
|
||||
|
||||
spAtlasRegion* next;
|
||||
};
|
||||
|
||||
SP_API spAtlasRegion* spAtlasRegion_create ();
|
||||
SP_API void spAtlasRegion_dispose (spAtlasRegion* self);
|
||||
|
||||
#ifdef SPINE_SHORT_NAMES
|
||||
typedef spAtlasRegion AtlasRegion;
|
||||
#define AtlasRegion_create(...) spAtlasRegion_create(__VA_ARGS__)
|
||||
#define AtlasRegion_dispose(...) spAtlasRegion_dispose(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
/**/
|
||||
|
||||
struct spAtlas {
|
||||
spAtlasPage* pages;
|
||||
spAtlasRegion* regions;
|
||||
|
||||
void* rendererObject;
|
||||
};
|
||||
|
||||
/* Image files referenced in the atlas file will be prefixed with dir. */
|
||||
SP_API spAtlas* spAtlas_create (const char* data, int length, const char* dir, void* rendererObject);
|
||||
/* Image files referenced in the atlas file will be prefixed with the directory containing the atlas file. */
|
||||
SP_API spAtlas* spAtlas_createFromFile (const char* path, void* rendererObject);
|
||||
SP_API void spAtlas_dispose (spAtlas* atlas);
|
||||
|
||||
/* Returns 0 if the region was not found. */
|
||||
SP_API spAtlasRegion* spAtlas_findRegion (const spAtlas* self, const char* name);
|
||||
|
||||
#ifdef SPINE_SHORT_NAMES
|
||||
typedef spAtlas Atlas;
|
||||
#define Atlas_create(...) spAtlas_create(__VA_ARGS__)
|
||||
#define Atlas_createFromFile(...) spAtlas_createFromFile(__VA_ARGS__)
|
||||
#define Atlas_dispose(...) spAtlas_dispose(__VA_ARGS__)
|
||||
#define Atlas_findRegion(...) spAtlas_findRegion(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* SPINE_ATLAS_H_ */
|
||||
57
examples/others/external/include/spine/AtlasAttachmentLoader.h
vendored
Normal file
57
examples/others/external/include/spine/AtlasAttachmentLoader.h
vendored
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated January 1, 2020. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2020, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef SPINE_ATLASATTACHMENTLOADER_H_
|
||||
#define SPINE_ATLASATTACHMENTLOADER_H_
|
||||
|
||||
#include <spine/dll.h>
|
||||
#include <spine/AttachmentLoader.h>
|
||||
#include <spine/Atlas.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct spAtlasAttachmentLoader {
|
||||
spAttachmentLoader super;
|
||||
spAtlas* atlas;
|
||||
} spAtlasAttachmentLoader;
|
||||
|
||||
SP_API spAtlasAttachmentLoader* spAtlasAttachmentLoader_create (spAtlas* atlas);
|
||||
|
||||
#ifdef SPINE_SHORT_NAMES
|
||||
typedef spAtlasAttachmentLoader AtlasAttachmentLoader;
|
||||
#define AtlasAttachmentLoader_create(...) spAtlasAttachmentLoader_create(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* SPINE_ATLASATTACHMENTLOADER_H_ */
|
||||
86
examples/others/external/include/spine/Attachment.h
vendored
Normal file
86
examples/others/external/include/spine/Attachment.h
vendored
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated January 1, 2020. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2020, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef SPINE_ATTACHMENT_H_
|
||||
#define SPINE_ATTACHMENT_H_
|
||||
|
||||
#include <spine/dll.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct spAttachmentLoader;
|
||||
|
||||
typedef enum {
|
||||
SP_ATTACHMENT_REGION,
|
||||
SP_ATTACHMENT_BOUNDING_BOX,
|
||||
SP_ATTACHMENT_MESH,
|
||||
SP_ATTACHMENT_LINKED_MESH,
|
||||
SP_ATTACHMENT_PATH,
|
||||
SP_ATTACHMENT_POINT,
|
||||
SP_ATTACHMENT_CLIPPING
|
||||
} spAttachmentType;
|
||||
|
||||
typedef struct spAttachment {
|
||||
const char* const name;
|
||||
const spAttachmentType type;
|
||||
const void* const vtable;
|
||||
int refCount;
|
||||
struct spAttachmentLoader* attachmentLoader;
|
||||
|
||||
#ifdef __cplusplus
|
||||
spAttachment() :
|
||||
name(0),
|
||||
type(SP_ATTACHMENT_REGION),
|
||||
vtable(0),
|
||||
refCount(0) {
|
||||
}
|
||||
#endif
|
||||
} spAttachment;
|
||||
|
||||
void spAttachment_dispose (spAttachment* self);
|
||||
|
||||
spAttachment* spAttachment_copy (spAttachment* self);
|
||||
|
||||
#ifdef SPINE_SHORT_NAMES
|
||||
typedef spAttachmentType AttachmentType;
|
||||
#define ATTACHMENT_REGION SP_ATTACHMENT_REGION
|
||||
#define ATTACHMENT_BOUNDING_BOX SP_ATTACHMENT_BOUNDING_BOX
|
||||
#define ATTACHMENT_MESH SP_ATTACHMENT_MESH
|
||||
#define ATTACHMENT_LINKED_MESH SP_ATTACHMENT_LINKED_MESH
|
||||
typedef spAttachment Attachment;
|
||||
#define Attachment_dispose(...) spAttachment_dispose(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* SPINE_ATTACHMENT_H_ */
|
||||
78
examples/others/external/include/spine/AttachmentLoader.h
vendored
Normal file
78
examples/others/external/include/spine/AttachmentLoader.h
vendored
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated January 1, 2020. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2020, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef SPINE_ATTACHMENTLOADER_H_
|
||||
#define SPINE_ATTACHMENTLOADER_H_
|
||||
|
||||
#include <spine/dll.h>
|
||||
#include <spine/Attachment.h>
|
||||
#include <spine/Skin.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct spAttachmentLoader {
|
||||
const char* error1;
|
||||
const char* error2;
|
||||
|
||||
const void* const vtable;
|
||||
#ifdef __cplusplus
|
||||
spAttachmentLoader () :
|
||||
error1(0),
|
||||
error2(0),
|
||||
vtable(0) {
|
||||
}
|
||||
#endif
|
||||
} spAttachmentLoader;
|
||||
|
||||
SP_API void spAttachmentLoader_dispose (spAttachmentLoader* self);
|
||||
|
||||
/* Called to create each attachment. Returns 0 to not load an attachment. If 0 is returned and _spAttachmentLoader_setError was
|
||||
* called, an error occurred. */
|
||||
SP_API spAttachment* spAttachmentLoader_createAttachment (spAttachmentLoader* self, spSkin* skin, spAttachmentType type, const char* name,
|
||||
const char* path);
|
||||
/* Called after the attachment has been fully configured. */
|
||||
SP_API void spAttachmentLoader_configureAttachment (spAttachmentLoader* self, spAttachment* attachment);
|
||||
/* Called just before the attachment is disposed. This can release allocations made in spAttachmentLoader_configureAttachment. */
|
||||
SP_API void spAttachmentLoader_disposeAttachment (spAttachmentLoader* self, spAttachment* attachment);
|
||||
|
||||
#ifdef SPINE_SHORT_NAMES
|
||||
typedef spAttachmentLoader AttachmentLoader;
|
||||
#define AttachmentLoader_dispose(...) spAttachmentLoader_dispose(__VA_ARGS__)
|
||||
#define AttachmentLoader_createAttachment(...) spAttachmentLoader_createAttachment(__VA_ARGS__)
|
||||
#define AttachmentLoader_configureAttachment(...) spAttachmentLoader_configureAttachment(__VA_ARGS__)
|
||||
#define AttachmentLoader_disposeAttachment(...) spAttachmentLoader_disposeAttachment(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* SPINE_ATTACHMENTLOADER_H_ */
|
||||
127
examples/others/external/include/spine/Bone.h
vendored
Normal file
127
examples/others/external/include/spine/Bone.h
vendored
Normal file
|
|
@ -0,0 +1,127 @@
|
|||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated January 1, 2020. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2020, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef SPINE_BONE_H_
|
||||
#define SPINE_BONE_H_
|
||||
|
||||
#include <spine/dll.h>
|
||||
#include <spine/BoneData.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct spSkeleton;
|
||||
|
||||
typedef struct spBone spBone;
|
||||
struct spBone {
|
||||
spBoneData* const data;
|
||||
struct spSkeleton* const skeleton;
|
||||
spBone* const parent;
|
||||
int childrenCount;
|
||||
spBone** const children;
|
||||
float x, y, rotation, scaleX, scaleY, shearX, shearY;
|
||||
float ax, ay, arotation, ascaleX, ascaleY, ashearX, ashearY;
|
||||
int /*bool*/ appliedValid;
|
||||
|
||||
float const a, b, worldX;
|
||||
float const c, d, worldY;
|
||||
|
||||
int/*bool*/ sorted;
|
||||
int/*bool*/ active;
|
||||
|
||||
#ifdef __cplusplus
|
||||
spBone() :
|
||||
data(0),
|
||||
skeleton(0),
|
||||
parent(0),
|
||||
childrenCount(0), children(0),
|
||||
x(0), y(0), rotation(0), scaleX(0), scaleY(0),
|
||||
ax(0), ay(0), arotation(0), ascaleX(0), ascaleY(0), ashearX(0), ashearY(0),
|
||||
appliedValid(0),
|
||||
|
||||
a(0), b(0), worldX(0),
|
||||
c(0), d(0), worldY(0),
|
||||
|
||||
sorted(0), active(0) {
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
SP_API void spBone_setYDown (int/*bool*/yDown);
|
||||
SP_API int/*bool*/spBone_isYDown ();
|
||||
|
||||
/* @param parent May be 0. */
|
||||
SP_API spBone* spBone_create (spBoneData* data, struct spSkeleton* skeleton, spBone* parent);
|
||||
SP_API void spBone_dispose (spBone* self);
|
||||
|
||||
SP_API void spBone_setToSetupPose (spBone* self);
|
||||
|
||||
SP_API void spBone_updateWorldTransform (spBone* self);
|
||||
SP_API void spBone_updateWorldTransformWith (spBone* self, float x, float y, float rotation, float scaleX, float scaleY, float shearX, float shearY);
|
||||
|
||||
SP_API float spBone_getWorldRotationX (spBone* self);
|
||||
SP_API float spBone_getWorldRotationY (spBone* self);
|
||||
SP_API float spBone_getWorldScaleX (spBone* self);
|
||||
SP_API float spBone_getWorldScaleY (spBone* self);
|
||||
|
||||
SP_API void spBone_updateAppliedTransform (spBone* self);
|
||||
|
||||
SP_API void spBone_worldToLocal (spBone* self, float worldX, float worldY, float* localX, float* localY);
|
||||
SP_API void spBone_localToWorld (spBone* self, float localX, float localY, float* worldX, float* worldY);
|
||||
SP_API float spBone_worldToLocalRotation (spBone* self, float worldRotation);
|
||||
SP_API float spBone_localToWorldRotation (spBone* self, float localRotation);
|
||||
SP_API void spBone_rotateWorld (spBone* self, float degrees);
|
||||
|
||||
#ifdef SPINE_SHORT_NAMES
|
||||
typedef spBone Bone;
|
||||
#define Bone_setYDown(...) spBone_setYDown(__VA_ARGS__)
|
||||
#define Bone_isYDown() spBone_isYDown()
|
||||
#define Bone_create(...) spBone_create(__VA_ARGS__)
|
||||
#define Bone_dispose(...) spBone_dispose(__VA_ARGS__)
|
||||
#define Bone_setToSetupPose(...) spBone_setToSetupPose(__VA_ARGS__)
|
||||
#define Bone_updateWorldTransform(...) spBone_updateWorldTransform(__VA_ARGS__)
|
||||
#define Bone_updateWorldTransformWith(...) spBone_updateWorldTransformWith(__VA_ARGS__)
|
||||
#define Bone_getWorldRotationX(...) spBone_getWorldRotationX(__VA_ARGS__)
|
||||
#define Bone_getWorldRotationY(...) spBone_getWorldRotationY(__VA_ARGS__)
|
||||
#define Bone_getWorldScaleX(...) spBone_getWorldScaleX(__VA_ARGS__)
|
||||
#define Bone_getWorldScaleY(...) spBone_getWorldScaleY(__VA_ARGS__)
|
||||
#define Bone_updateAppliedTransform(...) spBone_updateAppliedTransform(__VA_ARGS__)
|
||||
#define Bone_worldToLocal(...) spBone_worldToLocal(__VA_ARGS__)
|
||||
#define Bone_localToWorld(...) spBone_localToWorld(__VA_ARGS__)
|
||||
#define Bone_worldToLocalRotation(...) spBone_worldToLocalRotation(__VA_ARGS__)
|
||||
#define Bone_localToWorldRotation(...) spBone_localToWorldRotation(__VA_ARGS__)
|
||||
#define Bone_rotateWorld(...) spBone_rotateWorld(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* SPINE_BONE_H_ */
|
||||
86
examples/others/external/include/spine/BoneData.h
vendored
Normal file
86
examples/others/external/include/spine/BoneData.h
vendored
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated January 1, 2020. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2020, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef SPINE_BONEDATA_H_
|
||||
#define SPINE_BONEDATA_H_
|
||||
|
||||
#include <spine/dll.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
SP_TRANSFORMMODE_NORMAL,
|
||||
SP_TRANSFORMMODE_ONLYTRANSLATION,
|
||||
SP_TRANSFORMMODE_NOROTATIONORREFLECTION,
|
||||
SP_TRANSFORMMODE_NOSCALE,
|
||||
SP_TRANSFORMMODE_NOSCALEORREFLECTION
|
||||
} spTransformMode;
|
||||
|
||||
typedef struct spBoneData spBoneData;
|
||||
struct spBoneData {
|
||||
const int index;
|
||||
const char* const name;
|
||||
spBoneData* const parent;
|
||||
float length;
|
||||
float x, y, rotation, scaleX, scaleY, shearX, shearY;
|
||||
spTransformMode transformMode;
|
||||
int/*bool*/ skinRequired;
|
||||
|
||||
#ifdef __cplusplus
|
||||
spBoneData() :
|
||||
index(0),
|
||||
name(0),
|
||||
parent(0),
|
||||
length(0),
|
||||
x(0), y(0),
|
||||
rotation(0),
|
||||
scaleX(0), scaleY(0),
|
||||
shearX(0), shearY(0),
|
||||
transformMode(SP_TRANSFORMMODE_NORMAL),
|
||||
skinRequired(0) {
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
SP_API spBoneData* spBoneData_create (int index, const char* name, spBoneData* parent);
|
||||
SP_API void spBoneData_dispose (spBoneData* self);
|
||||
|
||||
#ifdef SPINE_SHORT_NAMES
|
||||
typedef spBoneData BoneData;
|
||||
#define BoneData_create(...) spBoneData_create(__VA_ARGS__)
|
||||
#define BoneData_dispose(...) spBoneData_dispose(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* SPINE_BONEDATA_H_ */
|
||||
58
examples/others/external/include/spine/BoundingBoxAttachment.h
vendored
Normal file
58
examples/others/external/include/spine/BoundingBoxAttachment.h
vendored
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated January 1, 2020. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2020, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef SPINE_BOUNDINGBOXATTACHMENT_H_
|
||||
#define SPINE_BOUNDINGBOXATTACHMENT_H_
|
||||
|
||||
#include <spine/dll.h>
|
||||
#include <spine/Attachment.h>
|
||||
#include <spine/VertexAttachment.h>
|
||||
#include <spine/Atlas.h>
|
||||
#include <spine/Slot.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct spBoundingBoxAttachment {
|
||||
spVertexAttachment super;
|
||||
} spBoundingBoxAttachment;
|
||||
|
||||
SP_API spBoundingBoxAttachment* spBoundingBoxAttachment_create (const char* name);
|
||||
|
||||
#ifdef SPINE_SHORT_NAMES
|
||||
typedef spBoundingBoxAttachment BoundingBoxAttachment;
|
||||
#define BoundingBoxAttachment_create(...) spBoundingBoxAttachment_create(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* SPINE_BOUNDINGBOXATTACHMENT_H_ */
|
||||
60
examples/others/external/include/spine/ClippingAttachment.h
vendored
Normal file
60
examples/others/external/include/spine/ClippingAttachment.h
vendored
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated January 1, 2020. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2020, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef SPINE_CLIPPINGATTACHMENT_H_
|
||||
#define SPINE_CLIPPINGATTACHMENT_H_
|
||||
|
||||
#include <spine/dll.h>
|
||||
#include <spine/Attachment.h>
|
||||
#include <spine/VertexAttachment.h>
|
||||
#include <spine/Atlas.h>
|
||||
#include <spine/Slot.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct spClippingAttachment {
|
||||
spVertexAttachment super;
|
||||
spSlotData* endSlot;
|
||||
} spClippingAttachment;
|
||||
|
||||
SP_API void _spClippingAttachment_dispose(spAttachment* self);
|
||||
SP_API spClippingAttachment* spClippingAttachment_create (const char* name);
|
||||
|
||||
#ifdef SPINE_SHORT_NAMES
|
||||
typedef spClippingAttachment ClippingAttachment;
|
||||
#define ClippingAttachment_create(...) spClippingAttachment_create(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* SPINE_CLIPPINGATTACHMENT_H_ */
|
||||
77
examples/others/external/include/spine/Color.h
vendored
Normal file
77
examples/others/external/include/spine/Color.h
vendored
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated January 1, 2020. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2020, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef SPINE_COLOR_H_
|
||||
#define SPINE_COLOR_H_
|
||||
|
||||
#include <spine/dll.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct spColor {
|
||||
float r, g, b, a;
|
||||
|
||||
#ifdef __cplusplus
|
||||
spColor() :
|
||||
r(0), g(0), b(0), a(0) {
|
||||
}
|
||||
|
||||
bool operator==(const spColor& rhs) {
|
||||
return r == rhs.r && g == rhs.g && b == rhs.b && a == rhs.a;
|
||||
}
|
||||
#endif
|
||||
} spColor;
|
||||
|
||||
/* @param attachmentName May be 0 for no setup pose attachment. */
|
||||
SP_API spColor* spColor_create();
|
||||
SP_API void spColor_dispose(spColor* self);
|
||||
SP_API void spColor_setFromFloats(spColor* color, float r, float g, float b, float a);
|
||||
SP_API void spColor_setFromColor(spColor* color, spColor* otherColor);
|
||||
SP_API void spColor_addFloats(spColor* color, float r, float g, float b, float a);
|
||||
SP_API void spColor_addColor(spColor* color, spColor* otherColor);
|
||||
SP_API void spColor_clamp(spColor* color);
|
||||
|
||||
#ifdef SPINE_SHORT_NAMES
|
||||
typedef spColor color;
|
||||
#define Color_create() spColor_create()
|
||||
#define Color_dispose(...) spColor_dispose(__VA_ARGS__)
|
||||
#define Color_setFromFloats(...) spColor_setFromFloats(__VA_ARGS__)
|
||||
#define Color_setFromColor(...) spColor_setFromColor(__VA_ARGS__)
|
||||
#define Color_addColor(...) spColor_addColor(__VA_ARGS__)
|
||||
#define Color_addFloats(...) spColor_addFloats(__VA_ARGS__)
|
||||
#define Color_clamp(...) spColor_clamp(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* SPINE_COLOR_H_ */
|
||||
75
examples/others/external/include/spine/Event.h
vendored
Normal file
75
examples/others/external/include/spine/Event.h
vendored
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated January 1, 2020. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2020, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef SPINE_EVENT_H_
|
||||
#define SPINE_EVENT_H_
|
||||
|
||||
#include <spine/dll.h>
|
||||
#include <spine/EventData.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct spEvent {
|
||||
spEventData* const data;
|
||||
float const time;
|
||||
int intValue;
|
||||
float floatValue;
|
||||
const char* stringValue;
|
||||
float volume;
|
||||
float balance;
|
||||
|
||||
#ifdef __cplusplus
|
||||
spEvent() :
|
||||
data(0),
|
||||
time(0),
|
||||
intValue(0),
|
||||
floatValue(0),
|
||||
stringValue(0),
|
||||
volume(0),
|
||||
balance(0) {
|
||||
}
|
||||
#endif
|
||||
} spEvent;
|
||||
|
||||
SP_API spEvent* spEvent_create (float time, spEventData* data);
|
||||
SP_API void spEvent_dispose (spEvent* self);
|
||||
|
||||
#ifdef SPINE_SHORT_NAMES
|
||||
typedef spEvent Event;
|
||||
#define Event_create(...) spEvent_create(__VA_ARGS__)
|
||||
#define Event_dispose(...) spEvent_dispose(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* SPINE_EVENT_H_ */
|
||||
74
examples/others/external/include/spine/EventData.h
vendored
Normal file
74
examples/others/external/include/spine/EventData.h
vendored
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated January 1, 2020. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2020, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef SPINE_EVENTDATA_H_
|
||||
#define SPINE_EVENTDATA_H_
|
||||
|
||||
#include <spine/dll.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct spEventData {
|
||||
const char* const name;
|
||||
int intValue;
|
||||
float floatValue;
|
||||
const char* stringValue;
|
||||
const char* audioPath;
|
||||
float volume;
|
||||
float balance;
|
||||
|
||||
#ifdef __cplusplus
|
||||
spEventData() :
|
||||
name(0),
|
||||
intValue(0),
|
||||
floatValue(0),
|
||||
stringValue(0),
|
||||
audioPath(0),
|
||||
volume(0),
|
||||
balance(0) {
|
||||
}
|
||||
#endif
|
||||
} spEventData;
|
||||
|
||||
SP_API spEventData* spEventData_create (const char* name);
|
||||
SP_API void spEventData_dispose (spEventData* self);
|
||||
|
||||
#ifdef SPINE_SHORT_NAMES
|
||||
typedef spEventData EventData;
|
||||
#define EventData_create(...) spEventData_create(__VA_ARGS__)
|
||||
#define EventData_dispose(...) spEventData_dispose(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* SPINE_EVENTDATA_H_ */
|
||||
94
examples/others/external/include/spine/IkConstraint.h
vendored
Normal file
94
examples/others/external/include/spine/IkConstraint.h
vendored
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated January 1, 2020. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2020, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef SPINE_IKCONSTRAINT_H_
|
||||
#define SPINE_IKCONSTRAINT_H_
|
||||
|
||||
#include <spine/dll.h>
|
||||
#include <spine/IkConstraintData.h>
|
||||
#include <spine/Bone.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct spSkeleton;
|
||||
|
||||
typedef struct spIkConstraint {
|
||||
spIkConstraintData* const data;
|
||||
|
||||
int bonesCount;
|
||||
spBone** bones;
|
||||
|
||||
spBone* target;
|
||||
int bendDirection;
|
||||
int /*boolean*/ compress;
|
||||
int /*boolean*/ stretch;
|
||||
float mix;
|
||||
float softness;
|
||||
|
||||
int /*boolean*/ active;
|
||||
|
||||
#ifdef __cplusplus
|
||||
spIkConstraint() :
|
||||
data(0),
|
||||
bonesCount(0),
|
||||
bones(0),
|
||||
target(0),
|
||||
bendDirection(0),
|
||||
stretch(0),
|
||||
mix(0),
|
||||
softness(0),
|
||||
active(0) {
|
||||
}
|
||||
#endif
|
||||
} spIkConstraint;
|
||||
|
||||
SP_API spIkConstraint* spIkConstraint_create (spIkConstraintData* data, const struct spSkeleton* skeleton);
|
||||
SP_API void spIkConstraint_dispose (spIkConstraint* self);
|
||||
|
||||
SP_API void spIkConstraint_apply (spIkConstraint* self);
|
||||
|
||||
SP_API void spIkConstraint_apply1 (spBone* bone, float targetX, float targetY, int /*boolean*/ compress, int /*boolean*/ stretch, int /*boolean*/ uniform, float alpha);
|
||||
SP_API void spIkConstraint_apply2 (spBone* parent, spBone* child, float targetX, float targetY, int bendDirection, int /*boolean*/ stretch, float softness, float alpha);
|
||||
|
||||
#ifdef SPINE_SHORT_NAMES
|
||||
typedef spIkConstraint IkConstraint;
|
||||
#define IkConstraint_create(...) spIkConstraint_create(__VA_ARGS__)
|
||||
#define IkConstraint_dispose(...) spIkConstraint_dispose(__VA_ARGS__)
|
||||
#define IkConstraint_apply(...) spIkConstraint_apply(__VA_ARGS__)
|
||||
#define IkConstraint_apply1(...) spIkConstraint_apply1(__VA_ARGS__)
|
||||
#define IkConstraint_apply2(...) spIkConstraint_apply2(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* SPINE_IKCONSTRAINT_H_ */
|
||||
86
examples/others/external/include/spine/IkConstraintData.h
vendored
Normal file
86
examples/others/external/include/spine/IkConstraintData.h
vendored
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated January 1, 2020. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2020, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef SPINE_IKCONSTRAINTDATA_H_
|
||||
#define SPINE_IKCONSTRAINTDATA_H_
|
||||
|
||||
#include <spine/dll.h>
|
||||
#include <spine/BoneData.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct spIkConstraintData {
|
||||
const char* const name;
|
||||
int order;
|
||||
int /*boolean*/ skinRequired;
|
||||
int bonesCount;
|
||||
spBoneData** bones;
|
||||
|
||||
spBoneData* target;
|
||||
int bendDirection;
|
||||
int /*boolean*/ compress;
|
||||
int /*boolean*/ stretch;
|
||||
int /*boolean*/ uniform;
|
||||
float mix;
|
||||
float softness;
|
||||
|
||||
#ifdef __cplusplus
|
||||
spIkConstraintData() :
|
||||
name(0),
|
||||
order(0),
|
||||
skinRequired(0),
|
||||
bonesCount(0),
|
||||
bones(0),
|
||||
target(0),
|
||||
bendDirection(0),
|
||||
compress(0),
|
||||
stretch(0),
|
||||
uniform(0),
|
||||
mix(0),
|
||||
softness(0) {
|
||||
}
|
||||
#endif
|
||||
} spIkConstraintData;
|
||||
|
||||
SP_API spIkConstraintData* spIkConstraintData_create (const char* name);
|
||||
SP_API void spIkConstraintData_dispose (spIkConstraintData* self);
|
||||
|
||||
#ifdef SPINE_SHORT_NAMES
|
||||
typedef spIkConstraintData IkConstraintData;
|
||||
#define IkConstraintData_create(...) spIkConstraintData_create(__VA_ARGS__)
|
||||
#define IkConstraintData_dispose(...) spIkConstraintData_dispose(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* SPINE_IKCONSTRAINTDATA_H_ */
|
||||
91
examples/others/external/include/spine/MeshAttachment.h
vendored
Normal file
91
examples/others/external/include/spine/MeshAttachment.h
vendored
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated January 1, 2020. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2020, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef SPINE_MESHATTACHMENT_H_
|
||||
#define SPINE_MESHATTACHMENT_H_
|
||||
|
||||
#include <spine/dll.h>
|
||||
#include <spine/Attachment.h>
|
||||
#include <spine/VertexAttachment.h>
|
||||
#include <spine/Atlas.h>
|
||||
#include <spine/Slot.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct spMeshAttachment spMeshAttachment;
|
||||
struct spMeshAttachment {
|
||||
spVertexAttachment super;
|
||||
|
||||
void* rendererObject;
|
||||
int regionOffsetX, regionOffsetY; /* Pixels stripped from the bottom left, unrotated. */
|
||||
int regionWidth, regionHeight; /* Unrotated, stripped pixel size. */
|
||||
int regionOriginalWidth, regionOriginalHeight; /* Unrotated, unstripped pixel size. */
|
||||
float regionU, regionV, regionU2, regionV2;
|
||||
int/*bool*/regionRotate;
|
||||
int regionDegrees;
|
||||
|
||||
const char* path;
|
||||
|
||||
float* regionUVs;
|
||||
float* uvs;
|
||||
|
||||
int trianglesCount;
|
||||
unsigned short* triangles;
|
||||
|
||||
spColor color;
|
||||
|
||||
int hullLength;
|
||||
|
||||
spMeshAttachment* const parentMesh;
|
||||
|
||||
/* Nonessential. */
|
||||
int edgesCount;
|
||||
int* edges;
|
||||
float width, height;
|
||||
};
|
||||
|
||||
SP_API spMeshAttachment* spMeshAttachment_create (const char* name);
|
||||
SP_API void spMeshAttachment_updateUVs (spMeshAttachment* self);
|
||||
SP_API void spMeshAttachment_setParentMesh (spMeshAttachment* self, spMeshAttachment* parentMesh);
|
||||
SP_API spMeshAttachment* spMeshAttachment_newLinkedMesh (spMeshAttachment* self);
|
||||
|
||||
#ifdef SPINE_SHORT_NAMES
|
||||
typedef spMeshAttachment MeshAttachment;
|
||||
#define MeshAttachment_create(...) spMeshAttachment_create(__VA_ARGS__)
|
||||
#define MeshAttachment_updateUVs(...) spMeshAttachment_updateUVs(__VA_ARGS__)
|
||||
#define MeshAttachment_setParentMesh(...) spMeshAttachment_setParentMesh(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* SPINE_MESHATTACHMENT_H_ */
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue