ソースを参照

Merge remote-tracking branch 'origin/3.6' into 3.6

Nathan Sweet 8 年 前
コミット
cfd2abf55c
87 ファイル変更650 行追加331 行削除
  1. 2 0
      CHANGELOG.md
  2. BIN
      spine-as3/spine-as3-example/lib/spine-as3.swc
  3. 2 1
      spine-as3/spine-as3/src/spine/animation/AnimationState.as
  4. 41 40
      spine-c/spine-c/include/spine/Animation.h
  5. 18 17
      spine-c/spine-c/include/spine/AnimationState.h
  6. 6 5
      spine-c/spine-c/include/spine/AnimationStateData.h
  7. 14 12
      spine-c/spine-c/include/spine/Array.h
  8. 10 8
      spine-c/spine-c/include/spine/Atlas.h
  9. 2 1
      spine-c/spine-c/include/spine/AtlasAttachmentLoader.h
  10. 2 0
      spine-c/spine-c/include/spine/Attachment.h
  11. 5 4
      spine-c/spine-c/include/spine/AttachmentLoader.h
  12. 18 17
      spine-c/spine-c/include/spine/Bone.h
  13. 4 2
      spine-c/spine-c/include/spine/BoneData.h
  14. 2 1
      spine-c/spine-c/include/spine/BoundingBoxAttachment.h
  15. 3 2
      spine-c/spine-c/include/spine/ClippingAttachment.h
  16. 9 7
      spine-c/spine-c/include/spine/Color.h
  17. 3 2
      spine-c/spine-c/include/spine/Event.h
  18. 4 2
      spine-c/spine-c/include/spine/EventData.h
  19. 6 5
      spine-c/spine-c/include/spine/IkConstraint.h
  20. 3 2
      spine-c/spine-c/include/spine/IkConstraintData.h
  21. 4 3
      spine-c/spine-c/include/spine/MeshAttachment.h
  22. 2 1
      spine-c/spine-c/include/spine/PathAttachment.h
  23. 5 4
      spine-c/spine-c/include/spine/PathConstraint.h
  24. 3 2
      spine-c/spine-c/include/spine/PathConstraintData.h
  25. 4 3
      spine-c/spine-c/include/spine/PointAttachment.h
  26. 5 4
      spine-c/spine-c/include/spine/RegionAttachment.h
  27. 21 20
      spine-c/spine-c/include/spine/Skeleton.h
  28. 6 5
      spine-c/spine-c/include/spine/SkeletonBinary.h
  29. 14 13
      spine-c/spine-c/include/spine/SkeletonBounds.h
  30. 8 7
      spine-c/spine-c/include/spine/SkeletonClipping.h
  31. 13 12
      spine-c/spine-c/include/spine/SkeletonData.h
  32. 6 5
      spine-c/spine-c/include/spine/SkeletonJson.h
  33. 7 6
      spine-c/spine-c/include/spine/Skin.h
  34. 7 6
      spine-c/spine-c/include/spine/Slot.h
  35. 4 3
      spine-c/spine-c/include/spine/SlotData.h
  36. 4 3
      spine-c/spine-c/include/spine/TransformConstraint.h
  37. 3 2
      spine-c/spine-c/include/spine/TransformConstraintData.h
  38. 5 4
      spine-c/spine-c/include/spine/Triangulator.h
  39. 2 1
      spine-c/spine-c/include/spine/VertexAttachment.h
  40. 5 4
      spine-c/spine-c/include/spine/VertexEffect.h
  41. 48 0
      spine-c/spine-c/include/spine/dll.h
  42. 1 0
      spine-c/spine-c/include/spine/spine.h
  43. 2 1
      spine-c/spine-c/src/spine/AnimationState.c
  44. 4 4
      spine-csharp/src/Animation.cs
  45. 2 1
      spine-lua/AnimationState.lua
  46. BIN
      spine-starling/spine-starling-example/lib/spine-as3.swc
  47. BIN
      spine-starling/spine-starling/lib/spine-as3.swc
  48. 4 0
      spine-ts/build/spine-all.d.ts
  49. 14 2
      spine-ts/build/spine-all.js
  50. 0 0
      spine-ts/build/spine-all.js.map
  51. 4 0
      spine-ts/build/spine-canvas.d.ts
  52. 14 2
      spine-ts/build/spine-canvas.js
  53. 0 0
      spine-ts/build/spine-canvas.js.map
  54. 4 0
      spine-ts/build/spine-core.d.ts
  55. 14 2
      spine-ts/build/spine-core.js
  56. 0 0
      spine-ts/build/spine-core.js.map
  57. 4 0
      spine-ts/build/spine-threejs.d.ts
  58. 14 2
      spine-ts/build/spine-threejs.js
  59. 0 0
      spine-ts/build/spine-threejs.js.map
  60. 4 0
      spine-ts/build/spine-webgl.d.ts
  61. 14 2
      spine-ts/build/spine-webgl.js
  62. 0 0
      spine-ts/build/spine-webgl.js.map
  63. 4 0
      spine-ts/build/spine-widget.d.ts
  64. 14 2
      spine-ts/build/spine-widget.js
  65. 0 0
      spine-ts/build/spine-widget.js.map
  66. 2 1
      spine-ts/core/src/AnimationState.ts
  67. BIN
      spine-ue4/Content/GettingStarted/06-cpp.umap
  68. BIN
      spine-ue4/Content/Test/Test.umap
  69. 1 0
      spine-ue4/Plugins/RuntimeMeshComponentPlugin/Source/RuntimeMeshComponent/Public/RuntimeMeshCore.h
  70. 1 1
      spine-ue4/Plugins/RuntimeMeshComponentPlugin/Source/RuntimeMeshComponent/RuntimeMeshComponent.Build.cs
  71. 1 1
      spine-ue4/Plugins/RuntimeMeshComponentPlugin/Source/RuntimeMeshComponentEditor/RuntimeMeshComponentEditor.Build.cs
  72. 0 1
      spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineBoneDriverComponent.cpp
  73. 0 1
      spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineBoneFollowerComponent.cpp
  74. 0 1
      spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonAnimationComponent.cpp
  75. 0 1
      spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonComponent.cpp
  76. 0 1
      spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonRendererComponent.cpp
  77. 21 12
      spine-ue4/Plugins/SpinePlugin/SpinePlugin.uplugin
  78. 3 15
      spine-ue4/Source/SpineUE4.Target.cs
  79. 37 0
      spine-ue4/Source/SpineUE4/MySceneComponent.cpp
  80. 30 0
      spine-ue4/Source/SpineUE4/MySceneComponent.h
  81. 1 1
      spine-ue4/Source/SpineUE4/SpineUE4.Build.cs
  82. 2 14
      spine-ue4/Source/SpineUE4Editor.Target.cs
  83. 1 1
      spine-ue4/SpineUE4.uproject
  84. 2 2
      spine-unity/Assets/spine-unity/Editor/SkeletonRendererInspector.cs
  85. 4 2
      spine-unity/Assets/spine-unity/Modules/Ghost/SkeletonGhost.cs
  86. 30 3
      spine-unity/Assets/spine-unity/Modules/SkeletonRenderSeparator/SkeletonRenderSeparator.cs
  87. 67 19
      spine-unity/Assets/spine-unity/SkeletonAnimator.cs

+ 2 - 0
CHANGELOG.md

@@ -50,6 +50,7 @@
   * `Animation#apply` and `Timeline#apply`` now take enums `MixPose` and `MixDirection` instead of booleans
   * Added `spVertexEffect` and corresponding implementations `spJitterVertexEffect` and `spSwirlVertexEffect`. Create/dispose through the corresponding `spXXXVertexEffect_create()/dispose()` functions. Set on framework/engine specific renderer. See changes for spine-c based frameworks/engines below.
   * Functions in `extension.h` are not prefixed with `_sp` instead of just `_` to avoid interference with other libraries.
+  * Introduced `SP_API` macro. Every spine-c function is prefixed with this macro. By default, it is an empty string. Can be used to markup spine-c functions with e.g. ``__declspec` when compiling to a dll or linking to that dll.
 
 ### Cocos2d-X
  * Fixed renderer to work with 3.6 changes
@@ -79,6 +80,7 @@
  * Switched from built-in ProceduralMeshComponent to RuntimeMeshComponent by Koderz (https://github.com/Koderz/UE4RuntimeMeshComponent, MIT). Needed for more flexibility regarding vertex format, should not have an impact on existing code/assets. You need to copy the RuntimeMeshComponentPlugin from our repository in `spine-ue4\Plugins\` to your project as well!
  * Added support for two color tinting. All base materials, e.g. SpineUnlitNormalMaterial, now do proper two color tinting. No material parameters have changed.
  * Updated to Unreal Engine 4.16.1. Note that 4.16 has a regression which will make it impossible to compile plain .c files!
+ * spine-c is now exposed from the plugin shared library on Windows via __declspec.
 
 ## C#
 * **Breaking changes**

BIN
spine-as3/spine-as3-example/lib/spine-as3.swc


+ 2 - 1
spine-as3/spine-as3/src/spine/animation/AnimationState.as

@@ -132,7 +132,8 @@ package spine.animation {
 
 			// Require mixTime > 0 to ensure the mixing from entry was applied at least once.
 			if (to.mixTime > 0 && (to.mixTime >= to.mixDuration || to.timeScale == 0)) {
-				if (from.totalAlpha == 0) {
+				// Require totalAlpha == 0 to ensure mixing is complete, unless mixDuration == 0 (the transition is a single frame).
+				if (from.totalAlpha == 0 || to.mixDuration == 0) {
 					to.mixingFrom = from.mixingFrom;
 					to.interruptAlpha = from.interruptAlpha;
 					queue.end(from);					

+ 41 - 40
spine-c/spine-c/include/spine/Animation.h

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

+ 18 - 17
spine-c/spine-c/include/spine/AnimationState.h

@@ -31,6 +31,7 @@
 #ifndef SPINE_ANIMATIONSTATE_H_
 #define SPINE_ANIMATIONSTATE_H_
 
+#include <spine/dll.h>
 #include <spine/Animation.h>
 #include <spine/AnimationStateData.h>
 #include <spine/Event.h>
@@ -116,38 +117,38 @@ struct spAnimationState {
 };
 
 /* @param data May be 0 for no mixing. */
-spAnimationState* spAnimationState_create (spAnimationStateData* data);
-void spAnimationState_dispose (spAnimationState* self);
+SP_API spAnimationState* spAnimationState_create (spAnimationStateData* data);
+SP_API void spAnimationState_dispose (spAnimationState* self);
 
-void spAnimationState_update (spAnimationState* self, float delta);
-int /**bool**/ spAnimationState_apply (spAnimationState* self, struct spSkeleton* skeleton);
+SP_API void spAnimationState_update (spAnimationState* self, float delta);
+SP_API int /**bool**/ spAnimationState_apply (spAnimationState* self, struct spSkeleton* skeleton);
 
-void spAnimationState_clearTracks (spAnimationState* self);
-void spAnimationState_clearTrack (spAnimationState* self, int trackIndex);
+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. */
-spTrackEntry* spAnimationState_setAnimationByName (spAnimationState* self, int trackIndex, const char* animationName,
+SP_API spTrackEntry* spAnimationState_setAnimationByName (spAnimationState* self, int trackIndex, const char* animationName,
 		int/*bool*/loop);
-spTrackEntry* spAnimationState_setAnimation (spAnimationState* self, int trackIndex, spAnimation* animation, 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. */
-spTrackEntry* spAnimationState_addAnimationByName (spAnimationState* self, int trackIndex, const char* animationName,
+SP_API spTrackEntry* spAnimationState_addAnimationByName (spAnimationState* self, int trackIndex, const char* animationName,
 		int/*bool*/loop, float delay);
-spTrackEntry* spAnimationState_addAnimation (spAnimationState* self, int trackIndex, spAnimation* animation, int/*bool*/loop,
+SP_API spTrackEntry* spAnimationState_addAnimation (spAnimationState* self, int trackIndex, spAnimation* animation, int/*bool*/loop,
 		float delay);
-spTrackEntry* spAnimationState_setEmptyAnimation(spAnimationState* self, int trackIndex, float mixDuration);
-spTrackEntry* spAnimationState_addEmptyAnimation(spAnimationState* self, int trackIndex, float mixDuration, float delay);
-void spAnimationState_setEmptyAnimations(spAnimationState* self, float mixDuration);
+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);
 
-spTrackEntry* spAnimationState_getCurrent (spAnimationState* self, int trackIndex);
+SP_API spTrackEntry* spAnimationState_getCurrent (spAnimationState* self, int trackIndex);
 
-void spAnimationState_clearListenerNotifications(spAnimationState* self);
+SP_API void spAnimationState_clearListenerNotifications(spAnimationState* self);
 
-float spTrackEntry_getAnimationTime (spTrackEntry* entry);
+SP_API float spTrackEntry_getAnimationTime (spTrackEntry* entry);
 
 /** Use this to dispose static memory before your app exits to appease your memory leak detector*/
-void spAnimationState_disposeStatics ();
+SP_API void spAnimationState_disposeStatics ();
 
 #ifdef SPINE_SHORT_NAMES
 typedef spEventType EventType;

+ 6 - 5
spine-c/spine-c/include/spine/AnimationStateData.h

@@ -31,6 +31,7 @@
 #ifndef SPINE_ANIMATIONSTATEDATA_H_
 #define SPINE_ANIMATIONSTATEDATA_H_
 
+#include <spine/dll.h>
 #include <spine/Animation.h>
 #include <spine/SkeletonData.h>
 
@@ -52,13 +53,13 @@ typedef struct spAnimationStateData {
 #endif
 } spAnimationStateData;
 
-spAnimationStateData* spAnimationStateData_create (spSkeletonData* skeletonData);
-void spAnimationStateData_dispose (spAnimationStateData* self);
+SP_API spAnimationStateData* spAnimationStateData_create (spSkeletonData* skeletonData);
+SP_API void spAnimationStateData_dispose (spAnimationStateData* self);
 
-void spAnimationStateData_setMixByName (spAnimationStateData* self, const char* fromName, const char* toName, float duration);
-void spAnimationStateData_setMix (spAnimationStateData* self, spAnimation* from, spAnimation* to, float duration);
+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. */
-float spAnimationStateData_getMix (spAnimationStateData* self, spAnimation* from, spAnimation* to);
+SP_API float spAnimationStateData_getMix (spAnimationStateData* self, spAnimation* from, spAnimation* to);
 
 #ifdef SPINE_SHORT_NAMES
 typedef spAnimationStateData AnimationStateData;

+ 14 - 12
spine-c/spine-c/include/spine/Array.h

@@ -31,24 +31,26 @@
 #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; \
-	name* name##_create(int initialCapacity); \
-	void name##_dispose(name* self); \
-	void name##_clear(name* self); \
-	name* name##_setSize(name* self, int newSize); \
-	void name##_ensureCapacity(name* self, int newCapacity); \
-	void name##_add(name* self, itemType value); \
-	void name##_addAll(name* self, name* other); \
-	void name##_addAllValues(name* self, itemType* values, int offset, int count); \
-	void name##_removeAt(name* self, int index); \
-	int name##_contains(name* self, itemType value); \
-	itemType name##_pop(name* self); \
-	itemType name##_peek(name* self);
+	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) { \

+ 10 - 8
spine-c/spine-c/include/spine/Atlas.h

@@ -31,6 +31,8 @@
 #ifndef SPINE_ATLAS_H_
 #define SPINE_ATLAS_H_
 
+#include <spine/dll.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -79,8 +81,8 @@ struct spAtlasPage {
 	spAtlasPage* next;
 };
 
-spAtlasPage* spAtlasPage_create (spAtlas* atlas, const char* name);
-void spAtlasPage_dispose (spAtlasPage* self);
+SP_API spAtlasPage* spAtlasPage_create (spAtlas* atlas, const char* name);
+SP_API void spAtlasPage_dispose (spAtlasPage* self);
 
 #ifdef SPINE_SHORT_NAMES
 typedef spAtlasFormat AtlasFormat;
@@ -130,8 +132,8 @@ struct spAtlasRegion {
 	spAtlasRegion* next;
 };
 
-spAtlasRegion* spAtlasRegion_create ();
-void spAtlasRegion_dispose (spAtlasRegion* self);
+SP_API spAtlasRegion* spAtlasRegion_create ();
+SP_API void spAtlasRegion_dispose (spAtlasRegion* self);
 
 #ifdef SPINE_SHORT_NAMES
 typedef spAtlasRegion AtlasRegion;
@@ -149,13 +151,13 @@ struct spAtlas {
 };
 
 /* Image files referenced in the atlas file will be prefixed with dir. */
-spAtlas* spAtlas_create (const char* data, int length, const char* dir, void* rendererObject);
+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. */
-spAtlas* spAtlas_createFromFile (const char* path, void* rendererObject);
-void spAtlas_dispose (spAtlas* atlas);
+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. */
-spAtlasRegion* spAtlas_findRegion (const spAtlas* self, const char* name);
+SP_API spAtlasRegion* spAtlas_findRegion (const spAtlas* self, const char* name);
 
 #ifdef SPINE_SHORT_NAMES
 typedef spAtlas Atlas;

+ 2 - 1
spine-c/spine-c/include/spine/AtlasAttachmentLoader.h

@@ -31,6 +31,7 @@
 #ifndef SPINE_ATLASATTACHMENTLOADER_H_
 #define SPINE_ATLASATTACHMENTLOADER_H_
 
+#include <spine/dll.h>
 #include <spine/AttachmentLoader.h>
 #include <spine/Atlas.h>
 
@@ -43,7 +44,7 @@ typedef struct spAtlasAttachmentLoader {
 	spAtlas* atlas;
 } spAtlasAttachmentLoader;
 
-spAtlasAttachmentLoader* spAtlasAttachmentLoader_create (spAtlas* atlas);
+SP_API spAtlasAttachmentLoader* spAtlasAttachmentLoader_create (spAtlas* atlas);
 
 #ifdef SPINE_SHORT_NAMES
 typedef spAtlasAttachmentLoader AtlasAttachmentLoader;

+ 2 - 0
spine-c/spine-c/include/spine/Attachment.h

@@ -31,6 +31,8 @@
 #ifndef SPINE_ATTACHMENT_H_
 #define SPINE_ATTACHMENT_H_
 
+#include <spine/dll.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif

+ 5 - 4
spine-c/spine-c/include/spine/AttachmentLoader.h

@@ -31,6 +31,7 @@
 #ifndef SPINE_ATTACHMENTLOADER_H_
 #define SPINE_ATTACHMENTLOADER_H_
 
+#include <spine/dll.h>
 #include <spine/Attachment.h>
 #include <spine/Skin.h>
 
@@ -52,16 +53,16 @@ typedef struct spAttachmentLoader {
 #endif
 } spAttachmentLoader;
 
-void spAttachmentLoader_dispose (spAttachmentLoader* self);
+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. */
-spAttachment* spAttachmentLoader_createAttachment (spAttachmentLoader* self, spSkin* skin, spAttachmentType type, const char* name,
+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. */
-void spAttachmentLoader_configureAttachment (spAttachmentLoader* self, spAttachment* attachment);
+SP_API void spAttachmentLoader_configureAttachment (spAttachmentLoader* self, spAttachment* attachment);
 /* Called just before the attachment is disposed. This can release allocations made in spAttachmentLoader_configureAttachment. */
-void spAttachmentLoader_disposeAttachment (spAttachmentLoader* self, spAttachment* attachment);
+SP_API void spAttachmentLoader_disposeAttachment (spAttachmentLoader* self, spAttachment* attachment);
 
 #ifdef SPINE_SHORT_NAMES
 typedef spAttachmentLoader AttachmentLoader;

+ 18 - 17
spine-c/spine-c/include/spine/Bone.h

@@ -31,6 +31,7 @@
 #ifndef SPINE_BONE_H_
 #define SPINE_BONE_H_
 
+#include <spine/dll.h>
 #include <spine/BoneData.h>
 
 #ifdef __cplusplus
@@ -73,30 +74,30 @@ struct spBone {
 #endif
 };
 
-void spBone_setYDown (int/*bool*/yDown);
-int/*bool*/spBone_isYDown ();
+SP_API void spBone_setYDown (int/*bool*/yDown);
+SP_API int/*bool*/spBone_isYDown ();
 
 /* @param parent May be 0. */
-spBone* spBone_create (spBoneData* data, struct spSkeleton* skeleton, spBone* parent);
-void spBone_dispose (spBone* self);
+SP_API spBone* spBone_create (spBoneData* data, struct spSkeleton* skeleton, spBone* parent);
+SP_API void spBone_dispose (spBone* self);
 
-void spBone_setToSetupPose (spBone* self);
+SP_API void spBone_setToSetupPose (spBone* self);
 
-void spBone_updateWorldTransform (spBone* self);
-void spBone_updateWorldTransformWith (spBone* self, float x, float y, float rotation, float scaleX, float scaleY, float shearX, float shearY);
+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);
 
-float spBone_getWorldRotationX (spBone* self);
-float spBone_getWorldRotationY (spBone* self);
-float spBone_getWorldScaleX (spBone* self);
-float spBone_getWorldScaleY (spBone* self);
+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);
 
-void spBone_updateAppliedTransform (spBone* self);
+SP_API void spBone_updateAppliedTransform (spBone* self);
 
-void spBone_worldToLocal (spBone* self, float worldX, float worldY, float* localX, float* localY);
-void spBone_localToWorld (spBone* self, float localX, float localY, float* worldX, float* worldY);
-float spBone_worldToLocalRotation (spBone* self, float worldRotation);
-float spBone_localToWorldRotation (spBone* self, float localRotation);
-void spBone_rotateWorld (spBone* self, float degrees);
+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;

+ 4 - 2
spine-c/spine-c/include/spine/BoneData.h

@@ -31,6 +31,8 @@
 #ifndef SPINE_BONEDATA_H_
 #define SPINE_BONEDATA_H_
 
+#include <spine/dll.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -67,8 +69,8 @@ struct spBoneData {
 #endif
 };
 
-spBoneData* spBoneData_create (int index, const char* name, spBoneData* parent);
-void spBoneData_dispose (spBoneData* self);
+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;

+ 2 - 1
spine-c/spine-c/include/spine/BoundingBoxAttachment.h

@@ -31,6 +31,7 @@
 #ifndef SPINE_BOUNDINGBOXATTACHMENT_H_
 #define SPINE_BOUNDINGBOXATTACHMENT_H_
 
+#include <spine/dll.h>
 #include <spine/Attachment.h>
 #include <spine/VertexAttachment.h>
 #include <spine/Atlas.h>
@@ -44,7 +45,7 @@ typedef struct spBoundingBoxAttachment {
 	spVertexAttachment super;
 } spBoundingBoxAttachment;
 
-spBoundingBoxAttachment* spBoundingBoxAttachment_create (const char* name);
+SP_API spBoundingBoxAttachment* spBoundingBoxAttachment_create (const char* name);
 
 #ifdef SPINE_SHORT_NAMES
 typedef spBoundingBoxAttachment BoundingBoxAttachment;

+ 3 - 2
spine-c/spine-c/include/spine/ClippingAttachment.h

@@ -31,6 +31,7 @@
 #ifndef SPINE_CLIPPINGATTACHMENT_H_
 #define SPINE_CLIPPINGATTACHMENT_H_
 
+#include <spine/dll.h>
 #include <spine/Attachment.h>
 #include <spine/VertexAttachment.h>
 #include <spine/Atlas.h>
@@ -45,8 +46,8 @@ typedef struct spClippingAttachment {
 	spSlotData* endSlot;
 } spClippingAttachment;
 
-void _spClippingAttachment_dispose(spAttachment* self);
-spClippingAttachment* spClippingAttachment_create (const char* name);
+SP_API void _spClippingAttachment_dispose(spAttachment* self);
+SP_API spClippingAttachment* spClippingAttachment_create (const char* name);
 
 #ifdef SPINE_SHORT_NAMES
 typedef spClippingAttachment ClippingAttachment;

+ 9 - 7
spine-c/spine-c/include/spine/Color.h

@@ -31,6 +31,8 @@
 #ifndef SPINE_COLOR_H_
 #define SPINE_COLOR_H_
 
+#include <spine/dll.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -50,13 +52,13 @@ typedef struct spColor {
 } spColor;
 
 /* @param attachmentName May be 0 for no setup pose attachment. */
-spColor* spColor_create();
-void spColor_dispose(spColor* self);
-void spColor_setFromFloats(spColor* color, float r, float g, float b, float a);
-void spColor_setFromColor(spColor* color, spColor* otherColor);
-void spColor_addFloats(spColor* color, float r, float g, float b, float a);
-void spColor_addColor(spColor* color, spColor* otherColor);
-void spColor_clamp(spColor* color);
+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;

+ 3 - 2
spine-c/spine-c/include/spine/Event.h

@@ -31,6 +31,7 @@
 #ifndef SPINE_EVENT_H_
 #define SPINE_EVENT_H_
 
+#include <spine/dll.h>
 #include <spine/EventData.h>
 
 #ifdef __cplusplus
@@ -55,8 +56,8 @@ typedef struct spEvent {
 #endif
 } spEvent;
 
-spEvent* spEvent_create (float time, spEventData* data);
-void spEvent_dispose (spEvent* self);
+SP_API spEvent* spEvent_create (float time, spEventData* data);
+SP_API void spEvent_dispose (spEvent* self);
 
 #ifdef SPINE_SHORT_NAMES
 typedef spEvent Event;

+ 4 - 2
spine-c/spine-c/include/spine/EventData.h

@@ -31,6 +31,8 @@
 #ifndef SPINE_EVENTDATA_H_
 #define SPINE_EVENTDATA_H_
 
+#include <spine/dll.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -51,8 +53,8 @@ typedef struct spEventData {
 #endif
 } spEventData;
 
-spEventData* spEventData_create (const char* name);
-void spEventData_dispose (spEventData* self);
+SP_API spEventData* spEventData_create (const char* name);
+SP_API void spEventData_dispose (spEventData* self);
 
 #ifdef SPINE_SHORT_NAMES
 typedef spEventData EventData;

+ 6 - 5
spine-c/spine-c/include/spine/IkConstraint.h

@@ -31,6 +31,7 @@
 #ifndef SPINE_IKCONSTRAINT_H_
 #define SPINE_IKCONSTRAINT_H_
 
+#include <spine/dll.h>
 #include <spine/IkConstraintData.h>
 #include <spine/Bone.h>
 
@@ -62,13 +63,13 @@ typedef struct spIkConstraint {
 #endif
 } spIkConstraint;
 
-spIkConstraint* spIkConstraint_create (spIkConstraintData* data, const struct spSkeleton* skeleton);
-void spIkConstraint_dispose (spIkConstraint* self);
+SP_API spIkConstraint* spIkConstraint_create (spIkConstraintData* data, const struct spSkeleton* skeleton);
+SP_API void spIkConstraint_dispose (spIkConstraint* self);
 
-void spIkConstraint_apply (spIkConstraint* self);
+SP_API void spIkConstraint_apply (spIkConstraint* self);
 
-void spIkConstraint_apply1 (spBone* bone, float targetX, float targetY, float alpha);
-void spIkConstraint_apply2 (spBone* parent, spBone* child, float targetX, float targetY, int bendDirection, float alpha);
+SP_API void spIkConstraint_apply1 (spBone* bone, float targetX, float targetY, float alpha);
+SP_API void spIkConstraint_apply2 (spBone* parent, spBone* child, float targetX, float targetY, int bendDirection, float alpha);
 
 #ifdef SPINE_SHORT_NAMES
 typedef spIkConstraint IkConstraint;

+ 3 - 2
spine-c/spine-c/include/spine/IkConstraintData.h

@@ -31,6 +31,7 @@
 #ifndef SPINE_IKCONSTRAINTDATA_H_
 #define SPINE_IKCONSTRAINTDATA_H_
 
+#include <spine/dll.h>
 #include <spine/BoneData.h>
 
 #ifdef __cplusplus
@@ -59,8 +60,8 @@ typedef struct spIkConstraintData {
 #endif
 } spIkConstraintData;
 
-spIkConstraintData* spIkConstraintData_create (const char* name);
-void spIkConstraintData_dispose (spIkConstraintData* self);
+SP_API spIkConstraintData* spIkConstraintData_create (const char* name);
+SP_API void spIkConstraintData_dispose (spIkConstraintData* self);
 
 #ifdef SPINE_SHORT_NAMES
 typedef spIkConstraintData IkConstraintData;

+ 4 - 3
spine-c/spine-c/include/spine/MeshAttachment.h

@@ -31,6 +31,7 @@
 #ifndef SPINE_MESHATTACHMENT_H_
 #define SPINE_MESHATTACHMENT_H_
 
+#include <spine/dll.h>
 #include <spine/Attachment.h>
 #include <spine/VertexAttachment.h>
 #include <spine/Atlas.h>
@@ -72,9 +73,9 @@ struct spMeshAttachment {
 	float width, height;
 };
 
-spMeshAttachment* spMeshAttachment_create (const char* name);
-void spMeshAttachment_updateUVs (spMeshAttachment* self);
-void spMeshAttachment_setParentMesh (spMeshAttachment* self, spMeshAttachment* parentMesh);
+SP_API spMeshAttachment* spMeshAttachment_create (const char* name);
+SP_API void spMeshAttachment_updateUVs (spMeshAttachment* self);
+SP_API void spMeshAttachment_setParentMesh (spMeshAttachment* self, spMeshAttachment* parentMesh);
 
 #ifdef SPINE_SHORT_NAMES
 typedef spMeshAttachment MeshAttachment;

+ 2 - 1
spine-c/spine-c/include/spine/PathAttachment.h

@@ -31,6 +31,7 @@
 #ifndef SPINE_PATHATTACHMENT_H_
 #define SPINE_PATHATTACHMENT_H_
 
+#include <spine/dll.h>
 #include <spine/Attachment.h>
 #include <spine/VertexAttachment.h>
 #include <spine/Atlas.h>
@@ -47,7 +48,7 @@ typedef struct spPathAttachment {
 	int/*bool*/ closed, constantSpeed;
 } spPathAttachment;
 
-spPathAttachment* spPathAttachment_create (const char* name);
+SP_API spPathAttachment* spPathAttachment_create (const char* name);
 
 #ifdef SPINE_SHORT_NAMES
 typedef spPathAttachment PathAttachment;

+ 5 - 4
spine-c/spine-c/include/spine/PathConstraint.h

@@ -31,6 +31,7 @@
 #ifndef SPINE_PATHCONSTRAINT_H_
 #define SPINE_PATHCONSTRAINT_H_
 
+#include <spine/dll.h>
 #include <spine/PathConstraintData.h>
 #include <spine/Bone.h>
 #include <spine/Slot.h>
@@ -92,11 +93,11 @@ typedef struct spPathConstraint {
 
 #define SP_PATHCONSTRAINT_
 
-spPathConstraint* spPathConstraint_create (spPathConstraintData* data, const struct spSkeleton* skeleton);
-void spPathConstraint_dispose (spPathConstraint* self);
+SP_API spPathConstraint* spPathConstraint_create (spPathConstraintData* data, const struct spSkeleton* skeleton);
+SP_API void spPathConstraint_dispose (spPathConstraint* self);
 
-void spPathConstraint_apply (spPathConstraint* self);
-float* spPathConstraint_computeWorldPositions(spPathConstraint* self, spPathAttachment* path, int spacesCount, int/*bool*/ tangents, int/*bool*/percentPosition, int/**/percentSpacing);
+SP_API void spPathConstraint_apply (spPathConstraint* self);
+SP_API float* spPathConstraint_computeWorldPositions(spPathConstraint* self, spPathAttachment* path, int spacesCount, int/*bool*/ tangents, int/*bool*/percentPosition, int/**/percentSpacing);
 
 #ifdef SPINE_SHORT_NAMES
 typedef spPathConstraint PathConstraint;

+ 3 - 2
spine-c/spine-c/include/spine/PathConstraintData.h

@@ -31,6 +31,7 @@
 #ifndef SPINE_PATHCONSTRAINTDATA_H_
 #define SPINE_PATHCONSTRAINTDATA_H_
 
+#include <spine/dll.h>
 #include <spine/BoneData.h>
 #include <spine/SlotData.h>
 
@@ -80,8 +81,8 @@ typedef struct spPathConstraintData {
 #endif
 } spPathConstraintData;
 
-spPathConstraintData* spPathConstraintData_create (const char* name);
-void spPathConstraintData_dispose (spPathConstraintData* self);
+SP_API spPathConstraintData* spPathConstraintData_create (const char* name);
+SP_API void spPathConstraintData_dispose (spPathConstraintData* self);
 
 #ifdef SPINE_SHORT_NAMES
 typedef spPathConstraintData PathConstraintData;

+ 4 - 3
spine-c/spine-c/include/spine/PointAttachment.h

@@ -31,6 +31,7 @@
 #ifndef SPINE_POINTATTACHMENT_H_
 #define SPINE_POINTATTACHMENT_H_
 
+#include <spine/dll.h>
 #include <spine/Attachment.h>
 #include <spine/VertexAttachment.h>
 #include <spine/Atlas.h>
@@ -46,9 +47,9 @@ typedef struct spPointAttachment {
 	spColor color;
 } spPointAttachment;
 
-spPointAttachment* spPointAttachment_create (const char* name);
-void spPointAttachment_computeWorldPosition (spPointAttachment* self, spBone* bone, float* x, float* y);
-float spPointAttachment_computeWorldRotation (spPointAttachment* self, spBone* bone);
+SP_API spPointAttachment* spPointAttachment_create (const char* name);
+SP_API void spPointAttachment_computeWorldPosition (spPointAttachment* self, spBone* bone, float* x, float* y);
+SP_API float spPointAttachment_computeWorldRotation (spPointAttachment* self, spBone* bone);
 
 #ifdef SPINE_SHORT_NAMES
 typedef spPointAttachment PointAttachment;

+ 5 - 4
spine-c/spine-c/include/spine/RegionAttachment.h

@@ -31,6 +31,7 @@
 #ifndef SPINE_REGIONATTACHMENT_H_
 #define SPINE_REGIONATTACHMENT_H_
 
+#include <spine/dll.h>
 #include <spine/Attachment.h>
 #include <spine/Atlas.h>
 #include <spine/Slot.h>
@@ -54,10 +55,10 @@ typedef struct spRegionAttachment {
 	float uvs[8];
 } spRegionAttachment;
 
-spRegionAttachment* spRegionAttachment_create (const char* name);
-void spRegionAttachment_setUVs (spRegionAttachment* self, float u, float v, float u2, float v2, int/*bool*/rotate);
-void spRegionAttachment_updateOffset (spRegionAttachment* self);
-void spRegionAttachment_computeWorldVertices (spRegionAttachment* self, spBone* bone, float* vertices, int offset, int stride);
+SP_API spRegionAttachment* spRegionAttachment_create (const char* name);
+SP_API void spRegionAttachment_setUVs (spRegionAttachment* self, float u, float v, float u2, float v2, int/*bool*/rotate);
+SP_API void spRegionAttachment_updateOffset (spRegionAttachment* self);
+SP_API void spRegionAttachment_computeWorldVertices (spRegionAttachment* self, spBone* bone, float* vertices, int offset, int stride);
 
 #ifdef SPINE_SHORT_NAMES
 typedef spRegionAttachment RegionAttachment;

+ 21 - 20
spine-c/spine-c/include/spine/Skeleton.h

@@ -31,6 +31,7 @@
 #ifndef SPINE_SKELETON_H_
 #define SPINE_SKELETON_H_
 
+#include <spine/dll.h>
 #include <spine/SkeletonData.h>
 #include <spine/Slot.h>
 #include <spine/Skin.h>
@@ -94,57 +95,57 @@ typedef struct spSkeleton {
 #endif
 } spSkeleton;
 
-spSkeleton* spSkeleton_create (spSkeletonData* data);
-void spSkeleton_dispose (spSkeleton* self);
+SP_API spSkeleton* spSkeleton_create (spSkeletonData* data);
+SP_API void spSkeleton_dispose (spSkeleton* self);
 
 /* Caches information about bones and constraints. Must be called if bones or constraints, or weighted path attachments
  * are added or removed. */
-void spSkeleton_updateCache (spSkeleton* self);
-void spSkeleton_updateWorldTransform (const spSkeleton* self);
+SP_API void spSkeleton_updateCache (spSkeleton* self);
+SP_API void spSkeleton_updateWorldTransform (const spSkeleton* self);
 
 /* Sets the bones, constraints, and slots to their setup pose values. */
-void spSkeleton_setToSetupPose (const spSkeleton* self);
+SP_API void spSkeleton_setToSetupPose (const spSkeleton* self);
 /* Sets the bones and constraints to their setup pose values. */
-void spSkeleton_setBonesToSetupPose (const spSkeleton* self);
-void spSkeleton_setSlotsToSetupPose (const spSkeleton* self);
+SP_API void spSkeleton_setBonesToSetupPose (const spSkeleton* self);
+SP_API void spSkeleton_setSlotsToSetupPose (const spSkeleton* self);
 
 /* Returns 0 if the bone was not found. */
-spBone* spSkeleton_findBone (const spSkeleton* self, const char* boneName);
+SP_API spBone* spSkeleton_findBone (const spSkeleton* self, const char* boneName);
 /* Returns -1 if the bone was not found. */
-int spSkeleton_findBoneIndex (const spSkeleton* self, const char* boneName);
+SP_API int spSkeleton_findBoneIndex (const spSkeleton* self, const char* boneName);
 
 /* Returns 0 if the slot was not found. */
-spSlot* spSkeleton_findSlot (const spSkeleton* self, const char* slotName);
+SP_API spSlot* spSkeleton_findSlot (const spSkeleton* self, const char* slotName);
 /* Returns -1 if the slot was not found. */
-int spSkeleton_findSlotIndex (const spSkeleton* self, const char* slotName);
+SP_API int spSkeleton_findSlotIndex (const spSkeleton* self, const char* slotName);
 
 /* Sets the skin used to look up attachments before looking in the SkeletonData defaultSkin. Attachments from the new skin are
  * attached if the corresponding attachment from the old skin was attached. If there was no old skin, each slot's setup mode
  * attachment is attached from the new skin.
  * @param skin May be 0.*/
-void spSkeleton_setSkin (spSkeleton* self, spSkin* skin);
+SP_API void spSkeleton_setSkin (spSkeleton* self, spSkin* skin);
 /* Returns 0 if the skin was not found. See spSkeleton_setSkin.
  * @param skinName May be 0. */
-int spSkeleton_setSkinByName (spSkeleton* self, const char* skinName);
+SP_API int spSkeleton_setSkinByName (spSkeleton* self, const char* skinName);
 
 /* Returns 0 if the slot or attachment was not found. */
-spAttachment* spSkeleton_getAttachmentForSlotName (const spSkeleton* self, const char* slotName, const char* attachmentName);
+SP_API spAttachment* spSkeleton_getAttachmentForSlotName (const spSkeleton* self, const char* slotName, const char* attachmentName);
 /* Returns 0 if the slot or attachment was not found. */
-spAttachment* spSkeleton_getAttachmentForSlotIndex (const spSkeleton* self, int slotIndex, const char* attachmentName);
+SP_API spAttachment* spSkeleton_getAttachmentForSlotIndex (const spSkeleton* self, int slotIndex, const char* attachmentName);
 /* Returns 0 if the slot or attachment was not found.
  * @param attachmentName May be 0. */
-int spSkeleton_setAttachment (spSkeleton* self, const char* slotName, const char* attachmentName);
+SP_API int spSkeleton_setAttachment (spSkeleton* self, const char* slotName, const char* attachmentName);
 
 /* Returns 0 if the IK constraint was not found. */
-spIkConstraint* spSkeleton_findIkConstraint (const spSkeleton* self, const char* constraintName);
+SP_API spIkConstraint* spSkeleton_findIkConstraint (const spSkeleton* self, const char* constraintName);
 
 /* Returns 0 if the transform constraint was not found. */
-spTransformConstraint* spSkeleton_findTransformConstraint (const spSkeleton* self, const char* constraintName);
+SP_API spTransformConstraint* spSkeleton_findTransformConstraint (const spSkeleton* self, const char* constraintName);
 
 /* Returns 0 if the path constraint was not found. */
-spPathConstraint* spSkeleton_findPathConstraint (const spSkeleton* self, const char* constraintName);
+SP_API spPathConstraint* spSkeleton_findPathConstraint (const spSkeleton* self, const char* constraintName);
 
-void spSkeleton_update (spSkeleton* self, float deltaTime);
+SP_API void spSkeleton_update (spSkeleton* self, float deltaTime);
 
 #ifdef SPINE_SHORT_NAMES
 typedef spSkeleton Skeleton;

+ 6 - 5
spine-c/spine-c/include/spine/SkeletonBinary.h

@@ -31,6 +31,7 @@
 #ifndef SPINE_SKELETONBINARY_H_
 #define SPINE_SKELETONBINARY_H_
 
+#include <spine/dll.h>
 #include <spine/Attachment.h>
 #include <spine/AttachmentLoader.h>
 #include <spine/SkeletonData.h>
@@ -48,12 +49,12 @@ typedef struct spSkeletonBinary {
 	const char* const error;
 } spSkeletonBinary;
 
-spSkeletonBinary* spSkeletonBinary_createWithLoader (spAttachmentLoader* attachmentLoader);
-spSkeletonBinary* spSkeletonBinary_create (spAtlas* atlas);
-void spSkeletonBinary_dispose (spSkeletonBinary* self);
+SP_API spSkeletonBinary* spSkeletonBinary_createWithLoader (spAttachmentLoader* attachmentLoader);
+SP_API spSkeletonBinary* spSkeletonBinary_create (spAtlas* atlas);
+SP_API void spSkeletonBinary_dispose (spSkeletonBinary* self);
 
-spSkeletonData* spSkeletonBinary_readSkeletonData (spSkeletonBinary* self, const unsigned char* binary, const int length);
-spSkeletonData* spSkeletonBinary_readSkeletonDataFile (spSkeletonBinary* self, const char* path);
+SP_API spSkeletonData* spSkeletonBinary_readSkeletonData (spSkeletonBinary* self, const unsigned char* binary, const int length);
+SP_API spSkeletonData* spSkeletonBinary_readSkeletonDataFile (spSkeletonBinary* self, const char* path);
 
 #ifdef SPINE_SHORT_NAMES
 typedef spSkeletonBinary SkeletonBinary;

+ 14 - 13
spine-c/spine-c/include/spine/SkeletonBounds.h

@@ -31,6 +31,7 @@
 #ifndef SPINE_SKELETONBOUNDS_H_
 #define SPINE_SKELETONBOUNDS_H_
 
+#include <spine/dll.h>
 #include <spine/BoundingBoxAttachment.h>
 #include <spine/Skeleton.h>
 
@@ -44,11 +45,11 @@ typedef struct spPolygon {
 	int capacity;
 } spPolygon;
 
-spPolygon* spPolygon_create (int capacity);
-void spPolygon_dispose (spPolygon* self);
+SP_API spPolygon* spPolygon_create (int capacity);
+SP_API void spPolygon_dispose (spPolygon* self);
 
-int/*bool*/spPolygon_containsPoint (spPolygon* polygon, float x, float y);
-int/*bool*/spPolygon_intersectsSegment (spPolygon* polygon, float x1, float y1, float x2, float y2);
+SP_API int/*bool*/spPolygon_containsPoint (spPolygon* polygon, float x, float y);
+SP_API int/*bool*/spPolygon_intersectsSegment (spPolygon* polygon, float x1, float y1, float x2, float y2);
 
 #ifdef SPINE_SHORT_NAMES
 typedef spPolygon Polygon;
@@ -68,29 +69,29 @@ typedef struct spSkeletonBounds {
 	float minX, minY, maxX, maxY;
 } spSkeletonBounds;
 
-spSkeletonBounds* spSkeletonBounds_create ();
-void spSkeletonBounds_dispose (spSkeletonBounds* self);
-void spSkeletonBounds_update (spSkeletonBounds* self, spSkeleton* skeleton, int/*bool*/updateAabb);
+SP_API spSkeletonBounds* spSkeletonBounds_create ();
+SP_API void spSkeletonBounds_dispose (spSkeletonBounds* self);
+SP_API void spSkeletonBounds_update (spSkeletonBounds* self, spSkeleton* skeleton, int/*bool*/updateAabb);
 
 /** Returns true if the axis aligned bounding box contains the point. */
-int/*bool*/spSkeletonBounds_aabbContainsPoint (spSkeletonBounds* self, float x, float y);
+SP_API int/*bool*/spSkeletonBounds_aabbContainsPoint (spSkeletonBounds* self, float x, float y);
 
 /** Returns true if the axis aligned bounding box intersects the line segment. */
-int/*bool*/spSkeletonBounds_aabbIntersectsSegment (spSkeletonBounds* self, float x1, float y1, float x2, float y2);
+SP_API int/*bool*/spSkeletonBounds_aabbIntersectsSegment (spSkeletonBounds* self, float x1, float y1, float x2, float y2);
 
 /** Returns true if the axis aligned bounding box intersects the axis aligned bounding box of the specified bounds. */
-int/*bool*/spSkeletonBounds_aabbIntersectsSkeleton (spSkeletonBounds* self, spSkeletonBounds* bounds);
+SP_API int/*bool*/spSkeletonBounds_aabbIntersectsSkeleton (spSkeletonBounds* self, spSkeletonBounds* bounds);
 
 /** Returns the first bounding box attachment that contains the point, or null. When doing many checks, it is usually more
  * efficient to only call this method if spSkeletonBounds_aabbContainsPoint returns true. */
-spBoundingBoxAttachment* spSkeletonBounds_containsPoint (spSkeletonBounds* self, float x, float y);
+SP_API spBoundingBoxAttachment* spSkeletonBounds_containsPoint (spSkeletonBounds* self, float x, float y);
 
 /** Returns the first bounding box attachment that contains the line segment, or null. When doing many checks, it is usually
  * more efficient to only call this method if spSkeletonBounds_aabbIntersectsSegment returns true. */
-spBoundingBoxAttachment* spSkeletonBounds_intersectsSegment (spSkeletonBounds* self, float x1, float y1, float x2, float y2);
+SP_API spBoundingBoxAttachment* spSkeletonBounds_intersectsSegment (spSkeletonBounds* self, float x1, float y1, float x2, float y2);
 
 /** Returns the polygon for the specified bounding box, or null. */
-spPolygon* spSkeletonBounds_getPolygon (spSkeletonBounds* self, spBoundingBoxAttachment* boundingBox);
+SP_API spPolygon* spSkeletonBounds_getPolygon (spSkeletonBounds* self, spBoundingBoxAttachment* boundingBox);
 
 #ifdef SPINE_SHORT_NAMES
 typedef spSkeletonBounds SkeletonBounds;

+ 8 - 7
spine-c/spine-c/include/spine/SkeletonClipping.h

@@ -31,6 +31,7 @@
 #ifndef SPINE_SKELETONCLIPPING_H
 #define SPINE_SKELETONCLIPPING_H
 
+#include <spine/dll.h>
 #include <spine/Array.h>
 #include <spine/ClippingAttachment.h>
 #include <spine/Slot.h>
@@ -52,13 +53,13 @@ typedef struct spSkeletonClipping {
 	spArrayFloatArray* clippingPolygons;
 } spSkeletonClipping;
 
-spSkeletonClipping* spSkeletonClipping_create();
-int spSkeletonClipping_clipStart(spSkeletonClipping* self, spSlot* slot, spClippingAttachment* clip);
-void spSkeletonClipping_clipEnd(spSkeletonClipping* self, spSlot* slot);
-void spSkeletonClipping_clipEnd2(spSkeletonClipping* self);
-int /*boolean*/ spSkeletonClipping_isClipping(spSkeletonClipping* self);
-void spSkeletonClipping_clipTriangles(spSkeletonClipping* self, float* vertices, int verticesLength, unsigned short* triangles, int trianglesLength, float* uvs, int stride);
-void spSkeletonClipping_dispose(spSkeletonClipping* self);
+SP_API spSkeletonClipping* spSkeletonClipping_create();
+SP_API int spSkeletonClipping_clipStart(spSkeletonClipping* self, spSlot* slot, spClippingAttachment* clip);
+SP_API void spSkeletonClipping_clipEnd(spSkeletonClipping* self, spSlot* slot);
+SP_API void spSkeletonClipping_clipEnd2(spSkeletonClipping* self);
+SP_API int /*boolean*/ spSkeletonClipping_isClipping(spSkeletonClipping* self);
+SP_API void spSkeletonClipping_clipTriangles(spSkeletonClipping* self, float* vertices, int verticesLength, unsigned short* triangles, int trianglesLength, float* uvs, int stride);
+SP_API void spSkeletonClipping_dispose(spSkeletonClipping* self);
 
 #ifdef __cplusplus
 }

+ 13 - 12
spine-c/spine-c/include/spine/SkeletonData.h

@@ -31,6 +31,7 @@
 #ifndef SPINE_SKELETONDATA_H_
 #define SPINE_SKELETONDATA_H_
 
+#include <spine/dll.h>
 #include <spine/BoneData.h>
 #include <spine/SlotData.h>
 #include <spine/Skin.h>
@@ -75,26 +76,26 @@ typedef struct spSkeletonData {
 	spPathConstraintData** pathConstraints;
 } spSkeletonData;
 
-spSkeletonData* spSkeletonData_create ();
-void spSkeletonData_dispose (spSkeletonData* self);
+SP_API spSkeletonData* spSkeletonData_create ();
+SP_API void spSkeletonData_dispose (spSkeletonData* self);
 
-spBoneData* spSkeletonData_findBone (const spSkeletonData* self, const char* boneName);
-int spSkeletonData_findBoneIndex (const spSkeletonData* self, const char* boneName);
+SP_API spBoneData* spSkeletonData_findBone (const spSkeletonData* self, const char* boneName);
+SP_API int spSkeletonData_findBoneIndex (const spSkeletonData* self, const char* boneName);
 
-spSlotData* spSkeletonData_findSlot (const spSkeletonData* self, const char* slotName);
-int spSkeletonData_findSlotIndex (const spSkeletonData* self, const char* slotName);
+SP_API spSlotData* spSkeletonData_findSlot (const spSkeletonData* self, const char* slotName);
+SP_API int spSkeletonData_findSlotIndex (const spSkeletonData* self, const char* slotName);
 
-spSkin* spSkeletonData_findSkin (const spSkeletonData* self, const char* skinName);
+SP_API spSkin* spSkeletonData_findSkin (const spSkeletonData* self, const char* skinName);
 
-spEventData* spSkeletonData_findEvent (const spSkeletonData* self, const char* eventName);
+SP_API spEventData* spSkeletonData_findEvent (const spSkeletonData* self, const char* eventName);
 
-spAnimation* spSkeletonData_findAnimation (const spSkeletonData* self, const char* animationName);
+SP_API spAnimation* spSkeletonData_findAnimation (const spSkeletonData* self, const char* animationName);
 
-spIkConstraintData* spSkeletonData_findIkConstraint (const spSkeletonData* self, const char* constraintName);
+SP_API spIkConstraintData* spSkeletonData_findIkConstraint (const spSkeletonData* self, const char* constraintName);
 
-spTransformConstraintData* spSkeletonData_findTransformConstraint (const spSkeletonData* self, const char* constraintName);
+SP_API spTransformConstraintData* spSkeletonData_findTransformConstraint (const spSkeletonData* self, const char* constraintName);
 
-spPathConstraintData* spSkeletonData_findPathConstraint (const spSkeletonData* self, const char* constraintName);
+SP_API spPathConstraintData* spSkeletonData_findPathConstraint (const spSkeletonData* self, const char* constraintName);
 
 #ifdef SPINE_SHORT_NAMES
 typedef spSkeletonData SkeletonData;

+ 6 - 5
spine-c/spine-c/include/spine/SkeletonJson.h

@@ -31,6 +31,7 @@
 #ifndef SPINE_SKELETONJSON_H_
 #define SPINE_SKELETONJSON_H_
 
+#include <spine/dll.h>
 #include <spine/Attachment.h>
 #include <spine/AttachmentLoader.h>
 #include <spine/SkeletonData.h>
@@ -49,12 +50,12 @@ typedef struct spSkeletonJson {
 	const char* const error;
 } spSkeletonJson;
 
-spSkeletonJson* spSkeletonJson_createWithLoader (spAttachmentLoader* attachmentLoader);
-spSkeletonJson* spSkeletonJson_create (spAtlas* atlas);
-void spSkeletonJson_dispose (spSkeletonJson* self);
+SP_API spSkeletonJson* spSkeletonJson_createWithLoader (spAttachmentLoader* attachmentLoader);
+SP_API spSkeletonJson* spSkeletonJson_create (spAtlas* atlas);
+SP_API void spSkeletonJson_dispose (spSkeletonJson* self);
 
-spSkeletonData* spSkeletonJson_readSkeletonData (spSkeletonJson* self, const char* json);
-spSkeletonData* spSkeletonJson_readSkeletonDataFile (spSkeletonJson* self, const char* path);
+SP_API spSkeletonData* spSkeletonJson_readSkeletonData (spSkeletonJson* self, const char* json);
+SP_API spSkeletonData* spSkeletonJson_readSkeletonDataFile (spSkeletonJson* self, const char* path);
 
 #ifdef SPINE_SHORT_NAMES
 typedef spSkeletonJson SkeletonJson;

+ 7 - 6
spine-c/spine-c/include/spine/Skin.h

@@ -31,6 +31,7 @@
 #ifndef SPINE_SKIN_H_
 #define SPINE_SKIN_H_
 
+#include <spine/dll.h>
 #include <spine/Attachment.h>
 
 #ifdef __cplusplus
@@ -63,19 +64,19 @@ typedef struct {
 	_Entry* entries;
 } _spSkin;
 
-spSkin* spSkin_create (const char* name);
-void spSkin_dispose (spSkin* self);
+SP_API spSkin* spSkin_create (const char* name);
+SP_API void spSkin_dispose (spSkin* self);
 
 /* The Skin owns the attachment. */
-void spSkin_addAttachment (spSkin* self, int slotIndex, const char* name, spAttachment* attachment);
+SP_API void spSkin_addAttachment (spSkin* self, int slotIndex, const char* name, spAttachment* attachment);
 /* Returns 0 if the attachment was not found. */
-spAttachment* spSkin_getAttachment (const spSkin* self, int slotIndex, const char* name);
+SP_API spAttachment* spSkin_getAttachment (const spSkin* self, int slotIndex, const char* name);
 
 /* Returns 0 if the slot or attachment was not found. */
-const char* spSkin_getAttachmentName (const spSkin* self, int slotIndex, int attachmentIndex);
+SP_API const char* spSkin_getAttachmentName (const spSkin* self, int slotIndex, int attachmentIndex);
 
 /** Attach each attachment in this skin if the corresponding attachment in oldSkin is currently attached. */
-void spSkin_attachAll (const spSkin* self, struct spSkeleton* skeleton, const spSkin* oldspSkin);
+SP_API void spSkin_attachAll (const spSkin* self, struct spSkeleton* skeleton, const spSkin* oldspSkin);
 
 #ifdef SPINE_SHORT_NAMES
 typedef spSkin Skin;

+ 7 - 6
spine-c/spine-c/include/spine/Slot.h

@@ -31,6 +31,7 @@
 #ifndef SPINE_SLOT_H_
 #define SPINE_SLOT_H_
 
+#include <spine/dll.h>
 #include <spine/Bone.h>
 #include <spine/Attachment.h>
 #include <spine/SlotData.h>
@@ -64,16 +65,16 @@ typedef struct spSlot {
 #endif
 } spSlot;
 
-spSlot* spSlot_create (spSlotData* data, spBone* bone);
-void spSlot_dispose (spSlot* self);
+SP_API spSlot* spSlot_create (spSlotData* data, spBone* bone);
+SP_API void spSlot_dispose (spSlot* self);
 
 /* @param attachment May be 0 to clear the attachment for the slot. */
-void spSlot_setAttachment (spSlot* self, spAttachment* attachment);
+SP_API void spSlot_setAttachment (spSlot* self, spAttachment* attachment);
 
-void spSlot_setAttachmentTime (spSlot* self, float time);
-float spSlot_getAttachmentTime (const spSlot* self);
+SP_API void spSlot_setAttachmentTime (spSlot* self, float time);
+SP_API float spSlot_getAttachmentTime (const spSlot* self);
 
-void spSlot_setToSetupPose (spSlot* self);
+SP_API void spSlot_setToSetupPose (spSlot* self);
 
 #ifdef SPINE_SHORT_NAMES
 typedef spSlot Slot;

+ 4 - 3
spine-c/spine-c/include/spine/SlotData.h

@@ -31,6 +31,7 @@
 #ifndef SPINE_SLOTDATA_H_
 #define SPINE_SLOTDATA_H_
 
+#include <spine/dll.h>
 #include <spine/BoneData.h>
 #include <spine/Color.h>
 
@@ -64,11 +65,11 @@ typedef struct spSlotData {
 #endif
 } spSlotData;
 
-spSlotData* spSlotData_create (const int index, const char* name, spBoneData* boneData);
-void spSlotData_dispose (spSlotData* self);
+SP_API spSlotData* spSlotData_create (const int index, const char* name, spBoneData* boneData);
+SP_API void spSlotData_dispose (spSlotData* self);
 
 /* @param attachmentName May be 0 for no setup pose attachment. */
-void spSlotData_setAttachmentName (spSlotData* self, const char* attachmentName);
+SP_API void spSlotData_setAttachmentName (spSlotData* self, const char* attachmentName);
 
 #ifdef SPINE_SHORT_NAMES
 typedef spBlendMode BlendMode;

+ 4 - 3
spine-c/spine-c/include/spine/TransformConstraint.h

@@ -31,6 +31,7 @@
 #ifndef SPINE_TRANSFORMCONSTRAINT_H_
 #define SPINE_TRANSFORMCONSTRAINT_H_
 
+#include <spine/dll.h>
 #include <spine/TransformConstraintData.h>
 #include <spine/Bone.h>
 
@@ -61,10 +62,10 @@ typedef struct spTransformConstraint {
 #endif
 } spTransformConstraint;
 
-spTransformConstraint* spTransformConstraint_create (spTransformConstraintData* data, const struct spSkeleton* skeleton);
-void spTransformConstraint_dispose (spTransformConstraint* self);
+SP_API spTransformConstraint* spTransformConstraint_create (spTransformConstraintData* data, const struct spSkeleton* skeleton);
+SP_API void spTransformConstraint_dispose (spTransformConstraint* self);
 
-void spTransformConstraint_apply (spTransformConstraint* self);
+SP_API void spTransformConstraint_apply (spTransformConstraint* self);
 
 #ifdef SPINE_SHORT_NAMES
 typedef spTransformConstraint TransformConstraint;

+ 3 - 2
spine-c/spine-c/include/spine/TransformConstraintData.h

@@ -31,6 +31,7 @@
 #ifndef SPINE_TRANSFORMCONSTRAINTDATA_H_
 #define SPINE_TRANSFORMCONSTRAINTDATA_H_
 
+#include <spine/dll.h>
 #include <spine/BoneData.h>
 
 #ifdef __cplusplus
@@ -70,8 +71,8 @@ typedef struct spTransformConstraintData {
 #endif
 } spTransformConstraintData;
 
-spTransformConstraintData* spTransformConstraintData_create (const char* name);
-void spTransformConstraintData_dispose (spTransformConstraintData* self);
+SP_API spTransformConstraintData* spTransformConstraintData_create (const char* name);
+SP_API void spTransformConstraintData_dispose (spTransformConstraintData* self);
 
 #ifdef SPINE_SHORT_NAMES
 typedef spTransformConstraintData TransformConstraintData;

+ 5 - 4
spine-c/spine-c/include/spine/Triangulator.h

@@ -31,6 +31,7 @@
 #ifndef SPINE_TRIANGULATOR_H
 #define SPINE_TRIANGULATOR_H
 
+#include <spine/dll.h>
 #include <spine/Array.h>
 
 #ifdef __cplusplus
@@ -49,10 +50,10 @@ typedef struct spTriangulator {
 	spArrayShortArray* polygonIndicesPool;
 } spTriangulator;
 
-spTriangulator* spTriangulator_create();
-spShortArray* spTriangulator_triangulate(spTriangulator* self, spFloatArray* verticesArray);
-spArrayFloatArray* spTriangulator_decompose(spTriangulator* self, spFloatArray* verticesArray, spShortArray* triangles);
-void spTriangulator_dispose(spTriangulator* self);
+SP_API spTriangulator* spTriangulator_create();
+SP_API spShortArray* spTriangulator_triangulate(spTriangulator* self, spFloatArray* verticesArray);
+SP_API spArrayFloatArray* spTriangulator_decompose(spTriangulator* self, spFloatArray* verticesArray, spShortArray* triangles);
+SP_API void spTriangulator_dispose(spTriangulator* self);
 
 
 #ifdef __cplusplus

+ 2 - 1
spine-c/spine-c/include/spine/VertexAttachment.h

@@ -31,6 +31,7 @@
 #ifndef SPINE_VERTEXATTACHMENT_H_
 #define SPINE_VERTEXATTACHMENT_H_
 
+#include <spine/dll.h>
 #include <spine/Attachment.h>
 #include <spine/Slot.h>
 
@@ -53,7 +54,7 @@ struct spVertexAttachment {
 	int id;
 };
 
-void spVertexAttachment_computeWorldVertices (spVertexAttachment* self, spSlot* slot, int start, int count, float* worldVertices, int offset, int stride);
+SP_API void spVertexAttachment_computeWorldVertices (spVertexAttachment* self, spSlot* slot, int start, int count, float* worldVertices, int offset, int stride);
 
 #ifdef SPINE_SHORT_NAMES
 typedef spVertexAttachment VertexAttachment;

+ 5 - 4
spine-c/spine-c/include/spine/VertexEffect.h

@@ -31,6 +31,7 @@
 #ifndef SPINE_VERTEXEFFECT_H_
 #define SPINE_VERTEXEFFECT_H_
 
+#include <spine/dll.h>
 #include <spine/Skeleton.h>
 #include <spine/Color.h>
 
@@ -69,13 +70,13 @@ typedef struct spSwirlVertexEffect {
 	float worldY;
 } spSwirlVertexEffect;
 
-spJitterVertexEffect *spJitterVertexEffect_create(float jitterX, float jitterY);
+SP_API spJitterVertexEffect *spJitterVertexEffect_create(float jitterX, float jitterY);
 
-void spJitterVertexEffect_dispose(spJitterVertexEffect *effect);
+SP_API void spJitterVertexEffect_dispose(spJitterVertexEffect *effect);
 
-spSwirlVertexEffect *spSwirlVertexEffect_create(float radius);
+SP_API spSwirlVertexEffect *spSwirlVertexEffect_create(float radius);
 
-void spSwirlVertexEffect_dispose(spSwirlVertexEffect *effect);
+SP_API void spSwirlVertexEffect_dispose(spSwirlVertexEffect *effect);
 
 #ifdef __cplusplus
 }

+ 48 - 0
spine-c/spine-c/include/spine/dll.h

@@ -0,0 +1,48 @@
+/******************************************************************************
+ * Spine Runtimes Software License v2.5
+ *
+ * Copyright (c) 2013-2016, Esoteric Software
+ * All rights reserved.
+ *
+ * You are granted a perpetual, non-exclusive, non-sublicensable, and
+ * non-transferable license to use, install, execute, and perform the Spine
+ * Runtimes software and derivative works solely for personal or internal
+ * use. Without the written permission of Esoteric Software (see Section 2 of
+ * the Spine Software License Agreement), you may not (a) modify, translate,
+ * adapt, or develop new applications using the Spine Runtimes or otherwise
+ * create derivative works or improvements of the Spine Runtimes or (b) remove,
+ * delete, alter, or obscure any trademarks or any copyright, trademark, patent,
+ * or other intellectual property or proprietary rights notices on or in the
+ * Software, including any copy thereof. Redistributions in binary or source
+ * form must include this license and terms.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "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 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 THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *****************************************************************************/
+
+#ifndef SPINE_SHAREDLIB_H
+#define SPINE_SHAREDLIB_H
+
+#define SP_API
+
+#ifdef _WIN32
+	#define DLLIMPORT __declspec(dllimport)
+	#define DLLEXPORT __declspec(dllexport)
+#else
+	#define DLLIMPORT
+	#define DLLEXPORT
+#endif
+
+#ifdef SPINEPLUGIN_API
+	#define SP_API SPINEPLUGIN_API
+#endif
+
+#endif /* SPINE_SHAREDLIB_H */

+ 1 - 0
spine-c/spine-c/include/spine/spine.h

@@ -31,6 +31,7 @@
 #ifndef SPINE_SPINE_H_
 #define SPINE_SPINE_H_
 
+#include <spine/dll.h>
 #include <spine/Animation.h>
 #include <spine/AnimationState.h>
 #include <spine/AnimationStateData.h>

+ 2 - 1
spine-c/spine-c/src/spine/AnimationState.c

@@ -312,7 +312,8 @@ int /*boolean*/ _spAnimationState_updateMixingFrom (spAnimationState* self, spTr
 
 	/* Require mixTime > 0 to ensure the mixing from entry was applied at least once. */
 	if (to->mixTime > 0 && (to->mixTime >= to->mixDuration || to->timeScale == 0)) {
-		if (from->totalAlpha == 0) {
+		/* Require totalAlpha == 0 to ensure mixing is complete, unless mixDuration == 0 (the transition is a single frame). */
+		if (from->totalAlpha == 0 || to->mixDuration == 0) {
 			to->mixingFrom = from->mixingFrom;
 			to->interruptAlpha = from->interruptAlpha;
 			_spEventQueue_end(internal->queue, from);

+ 4 - 4
spine-csharp/src/Animation.cs

@@ -436,11 +436,11 @@ namespace Spine {
 				}
 				// Mixing out uses sign of setup or current pose, else use sign of key.
 				if (direction == MixDirection.Out) {
-					x = Math.Abs(x) * Math.Sign(bx);
-					y = Math.Abs(y) * Math.Sign(by);
+					x = (x >= 0 ? x : -x) * (bx >= 0 ? 1 : -1);
+					y = (y >= 0 ? y : -y) * (by >= 0 ? 1 : -1);
 				} else {
-					bx = Math.Abs(bx) * Math.Sign(x);
-					by = Math.Abs(by) * Math.Sign(y);
+					bx = (bx >= 0 ? bx : -bx) * (x >= 0 ? 1 : -1);
+					by = (by >= 0 ? by : -by) * (y >= 0 ? 1 : -1);
 				}
 				bone.scaleX = bx + (x - bx) * alpha;
 				bone.scaleY = by + (y - by) * alpha;

+ 2 - 1
spine-lua/AnimationState.lua

@@ -346,7 +346,8 @@ function AnimationState:updateMixingFrom (to, delta)
 	
 	-- Require mixTime > 0 to ensure the mixing from entry was applied at least once.
 	if (to.mixTime > 0 and (to.mixTime >= to.mixDuration or to.timeScale == 0)) then
-		if (from.totalAlpha == 0) then
+		-- Require totalAlpha == 0 to ensure mixing is complete, unless mixDuration == 0 (the transition is a single frame).
+		if (from.totalAlpha == 0 or to.mixDuration == 0) then
 			to.mixingFrom = from.mixingFrom
 			to.interruptAlpha = from.interruptAlpha
 			self.queue:_end(from)

BIN
spine-starling/spine-starling-example/lib/spine-as3.swc


BIN
spine-starling/spine-starling/lib/spine-as3.swc


+ 4 - 0
spine-ts/build/spine-all.d.ts

@@ -585,6 +585,9 @@ declare module spine {
 		ChainScale = 2,
 	}
 }
+interface Math {
+	fround(n: number): number;
+}
 declare module spine {
 	class SharedAssetManager implements Disposable {
 		private pathPrefix;
@@ -987,6 +990,7 @@ declare module spine {
 		static newFloatArray(size: number): ArrayLike<number>;
 		static newShortArray(size: number): ArrayLike<number>;
 		static toFloatArray(array: Array<number>): number[] | Float32Array;
+		static toSinglePrecision(value: number): number;
 	}
 	class DebugUtils {
 		static logBones(skeleton: Skeleton): void;

+ 14 - 2
spine-ts/build/spine-all.js

@@ -1216,7 +1216,7 @@ var spine;
 				return true;
 			var finished = this.updateMixingFrom(from, delta);
 			if (to.mixTime > 0 && (to.mixTime >= to.mixDuration || to.timeScale == 0)) {
-				if (from.totalAlpha == 0) {
+				if (from.totalAlpha == 0 || to.mixDuration == 0) {
 					to.mixingFrom = from.mixingFrom;
 					to.interruptAlpha = from.interruptAlpha;
 					this.queue.end(from);
@@ -2974,6 +2974,15 @@ var spine;
 		RotateMode[RotateMode["ChainScale"] = 2] = "ChainScale";
 	})(RotateMode = spine.RotateMode || (spine.RotateMode = {}));
 })(spine || (spine = {}));
+(function () {
+	if (!Math.fround) {
+		Math.fround = (function (array) {
+			return function (x) {
+				return array[0] = x, array[0];
+			};
+		})(new Float32Array(1));
+	}
+})();
 var spine;
 (function (spine) {
 	var Assets = (function () {
@@ -4745,7 +4754,7 @@ var spine;
 					var eventData = skeletonData.findEvent(eventMap.name);
 					if (eventData == null)
 						throw new Error("Event not found: " + eventMap.name);
-					var event_5 = new spine.Event(eventMap.time, eventData);
+					var event_5 = new spine.Event(spine.Utils.toSinglePrecision(eventMap.time), eventData);
 					event_5.intValue = this.getValue(eventMap, "int", eventData.intValue);
 					event_5.floatValue = this.getValue(eventMap, "float", eventData.floatValue);
 					event_5.stringValue = this.getValue(eventMap, "string", eventData.stringValue);
@@ -5879,6 +5888,9 @@ var spine;
 		Utils.toFloatArray = function (array) {
 			return Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array;
 		};
+		Utils.toSinglePrecision = function (value) {
+			return Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value;
+		};
 		return Utils;
 	}());
 	Utils.SUPPORTS_TYPED_ARRAYS = typeof (Float32Array) !== "undefined";

ファイルの差分が大きいため隠しています
+ 0 - 0
spine-ts/build/spine-all.js.map


+ 4 - 0
spine-ts/build/spine-canvas.d.ts

@@ -585,6 +585,9 @@ declare module spine {
 		ChainScale = 2,
 	}
 }
+interface Math {
+	fround(n: number): number;
+}
 declare module spine {
 	class SharedAssetManager implements Disposable {
 		private pathPrefix;
@@ -987,6 +990,7 @@ declare module spine {
 		static newFloatArray(size: number): ArrayLike<number>;
 		static newShortArray(size: number): ArrayLike<number>;
 		static toFloatArray(array: Array<number>): number[] | Float32Array;
+		static toSinglePrecision(value: number): number;
 	}
 	class DebugUtils {
 		static logBones(skeleton: Skeleton): void;

+ 14 - 2
spine-ts/build/spine-canvas.js

@@ -1216,7 +1216,7 @@ var spine;
 				return true;
 			var finished = this.updateMixingFrom(from, delta);
 			if (to.mixTime > 0 && (to.mixTime >= to.mixDuration || to.timeScale == 0)) {
-				if (from.totalAlpha == 0) {
+				if (from.totalAlpha == 0 || to.mixDuration == 0) {
 					to.mixingFrom = from.mixingFrom;
 					to.interruptAlpha = from.interruptAlpha;
 					this.queue.end(from);
@@ -2974,6 +2974,15 @@ var spine;
 		RotateMode[RotateMode["ChainScale"] = 2] = "ChainScale";
 	})(RotateMode = spine.RotateMode || (spine.RotateMode = {}));
 })(spine || (spine = {}));
+(function () {
+	if (!Math.fround) {
+		Math.fround = (function (array) {
+			return function (x) {
+				return array[0] = x, array[0];
+			};
+		})(new Float32Array(1));
+	}
+})();
 var spine;
 (function (spine) {
 	var Assets = (function () {
@@ -4745,7 +4754,7 @@ var spine;
 					var eventData = skeletonData.findEvent(eventMap.name);
 					if (eventData == null)
 						throw new Error("Event not found: " + eventMap.name);
-					var event_5 = new spine.Event(eventMap.time, eventData);
+					var event_5 = new spine.Event(spine.Utils.toSinglePrecision(eventMap.time), eventData);
 					event_5.intValue = this.getValue(eventMap, "int", eventData.intValue);
 					event_5.floatValue = this.getValue(eventMap, "float", eventData.floatValue);
 					event_5.stringValue = this.getValue(eventMap, "string", eventData.stringValue);
@@ -5879,6 +5888,9 @@ var spine;
 		Utils.toFloatArray = function (array) {
 			return Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array;
 		};
+		Utils.toSinglePrecision = function (value) {
+			return Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value;
+		};
 		return Utils;
 	}());
 	Utils.SUPPORTS_TYPED_ARRAYS = typeof (Float32Array) !== "undefined";

ファイルの差分が大きいため隠しています
+ 0 - 0
spine-ts/build/spine-canvas.js.map


+ 4 - 0
spine-ts/build/spine-core.d.ts

@@ -585,6 +585,9 @@ declare module spine {
 		ChainScale = 2,
 	}
 }
+interface Math {
+	fround(n: number): number;
+}
 declare module spine {
 	class SharedAssetManager implements Disposable {
 		private pathPrefix;
@@ -987,6 +990,7 @@ declare module spine {
 		static newFloatArray(size: number): ArrayLike<number>;
 		static newShortArray(size: number): ArrayLike<number>;
 		static toFloatArray(array: Array<number>): number[] | Float32Array;
+		static toSinglePrecision(value: number): number;
 	}
 	class DebugUtils {
 		static logBones(skeleton: Skeleton): void;

+ 14 - 2
spine-ts/build/spine-core.js

@@ -1216,7 +1216,7 @@ var spine;
 				return true;
 			var finished = this.updateMixingFrom(from, delta);
 			if (to.mixTime > 0 && (to.mixTime >= to.mixDuration || to.timeScale == 0)) {
-				if (from.totalAlpha == 0) {
+				if (from.totalAlpha == 0 || to.mixDuration == 0) {
 					to.mixingFrom = from.mixingFrom;
 					to.interruptAlpha = from.interruptAlpha;
 					this.queue.end(from);
@@ -2974,6 +2974,15 @@ var spine;
 		RotateMode[RotateMode["ChainScale"] = 2] = "ChainScale";
 	})(RotateMode = spine.RotateMode || (spine.RotateMode = {}));
 })(spine || (spine = {}));
+(function () {
+	if (!Math.fround) {
+		Math.fround = (function (array) {
+			return function (x) {
+				return array[0] = x, array[0];
+			};
+		})(new Float32Array(1));
+	}
+})();
 var spine;
 (function (spine) {
 	var Assets = (function () {
@@ -4745,7 +4754,7 @@ var spine;
 					var eventData = skeletonData.findEvent(eventMap.name);
 					if (eventData == null)
 						throw new Error("Event not found: " + eventMap.name);
-					var event_5 = new spine.Event(eventMap.time, eventData);
+					var event_5 = new spine.Event(spine.Utils.toSinglePrecision(eventMap.time), eventData);
 					event_5.intValue = this.getValue(eventMap, "int", eventData.intValue);
 					event_5.floatValue = this.getValue(eventMap, "float", eventData.floatValue);
 					event_5.stringValue = this.getValue(eventMap, "string", eventData.stringValue);
@@ -5879,6 +5888,9 @@ var spine;
 		Utils.toFloatArray = function (array) {
 			return Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array;
 		};
+		Utils.toSinglePrecision = function (value) {
+			return Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value;
+		};
 		return Utils;
 	}());
 	Utils.SUPPORTS_TYPED_ARRAYS = typeof (Float32Array) !== "undefined";

ファイルの差分が大きいため隠しています
+ 0 - 0
spine-ts/build/spine-core.js.map


+ 4 - 0
spine-ts/build/spine-threejs.d.ts

@@ -585,6 +585,9 @@ declare module spine {
 		ChainScale = 2,
 	}
 }
+interface Math {
+	fround(n: number): number;
+}
 declare module spine {
 	class SharedAssetManager implements Disposable {
 		private pathPrefix;
@@ -987,6 +990,7 @@ declare module spine {
 		static newFloatArray(size: number): ArrayLike<number>;
 		static newShortArray(size: number): ArrayLike<number>;
 		static toFloatArray(array: Array<number>): number[] | Float32Array;
+		static toSinglePrecision(value: number): number;
 	}
 	class DebugUtils {
 		static logBones(skeleton: Skeleton): void;

+ 14 - 2
spine-ts/build/spine-threejs.js

@@ -1216,7 +1216,7 @@ var spine;
 				return true;
 			var finished = this.updateMixingFrom(from, delta);
 			if (to.mixTime > 0 && (to.mixTime >= to.mixDuration || to.timeScale == 0)) {
-				if (from.totalAlpha == 0) {
+				if (from.totalAlpha == 0 || to.mixDuration == 0) {
 					to.mixingFrom = from.mixingFrom;
 					to.interruptAlpha = from.interruptAlpha;
 					this.queue.end(from);
@@ -2974,6 +2974,15 @@ var spine;
 		RotateMode[RotateMode["ChainScale"] = 2] = "ChainScale";
 	})(RotateMode = spine.RotateMode || (spine.RotateMode = {}));
 })(spine || (spine = {}));
+(function () {
+	if (!Math.fround) {
+		Math.fround = (function (array) {
+			return function (x) {
+				return array[0] = x, array[0];
+			};
+		})(new Float32Array(1));
+	}
+})();
 var spine;
 (function (spine) {
 	var Assets = (function () {
@@ -4745,7 +4754,7 @@ var spine;
 					var eventData = skeletonData.findEvent(eventMap.name);
 					if (eventData == null)
 						throw new Error("Event not found: " + eventMap.name);
-					var event_5 = new spine.Event(eventMap.time, eventData);
+					var event_5 = new spine.Event(spine.Utils.toSinglePrecision(eventMap.time), eventData);
 					event_5.intValue = this.getValue(eventMap, "int", eventData.intValue);
 					event_5.floatValue = this.getValue(eventMap, "float", eventData.floatValue);
 					event_5.stringValue = this.getValue(eventMap, "string", eventData.stringValue);
@@ -5879,6 +5888,9 @@ var spine;
 		Utils.toFloatArray = function (array) {
 			return Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array;
 		};
+		Utils.toSinglePrecision = function (value) {
+			return Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value;
+		};
 		return Utils;
 	}());
 	Utils.SUPPORTS_TYPED_ARRAYS = typeof (Float32Array) !== "undefined";

ファイルの差分が大きいため隠しています
+ 0 - 0
spine-ts/build/spine-threejs.js.map


+ 4 - 0
spine-ts/build/spine-webgl.d.ts

@@ -585,6 +585,9 @@ declare module spine {
 		ChainScale = 2,
 	}
 }
+interface Math {
+	fround(n: number): number;
+}
 declare module spine {
 	class SharedAssetManager implements Disposable {
 		private pathPrefix;
@@ -987,6 +990,7 @@ declare module spine {
 		static newFloatArray(size: number): ArrayLike<number>;
 		static newShortArray(size: number): ArrayLike<number>;
 		static toFloatArray(array: Array<number>): number[] | Float32Array;
+		static toSinglePrecision(value: number): number;
 	}
 	class DebugUtils {
 		static logBones(skeleton: Skeleton): void;

+ 14 - 2
spine-ts/build/spine-webgl.js

@@ -1216,7 +1216,7 @@ var spine;
 				return true;
 			var finished = this.updateMixingFrom(from, delta);
 			if (to.mixTime > 0 && (to.mixTime >= to.mixDuration || to.timeScale == 0)) {
-				if (from.totalAlpha == 0) {
+				if (from.totalAlpha == 0 || to.mixDuration == 0) {
 					to.mixingFrom = from.mixingFrom;
 					to.interruptAlpha = from.interruptAlpha;
 					this.queue.end(from);
@@ -2974,6 +2974,15 @@ var spine;
 		RotateMode[RotateMode["ChainScale"] = 2] = "ChainScale";
 	})(RotateMode = spine.RotateMode || (spine.RotateMode = {}));
 })(spine || (spine = {}));
+(function () {
+	if (!Math.fround) {
+		Math.fround = (function (array) {
+			return function (x) {
+				return array[0] = x, array[0];
+			};
+		})(new Float32Array(1));
+	}
+})();
 var spine;
 (function (spine) {
 	var Assets = (function () {
@@ -4745,7 +4754,7 @@ var spine;
 					var eventData = skeletonData.findEvent(eventMap.name);
 					if (eventData == null)
 						throw new Error("Event not found: " + eventMap.name);
-					var event_5 = new spine.Event(eventMap.time, eventData);
+					var event_5 = new spine.Event(spine.Utils.toSinglePrecision(eventMap.time), eventData);
 					event_5.intValue = this.getValue(eventMap, "int", eventData.intValue);
 					event_5.floatValue = this.getValue(eventMap, "float", eventData.floatValue);
 					event_5.stringValue = this.getValue(eventMap, "string", eventData.stringValue);
@@ -5879,6 +5888,9 @@ var spine;
 		Utils.toFloatArray = function (array) {
 			return Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array;
 		};
+		Utils.toSinglePrecision = function (value) {
+			return Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value;
+		};
 		return Utils;
 	}());
 	Utils.SUPPORTS_TYPED_ARRAYS = typeof (Float32Array) !== "undefined";

ファイルの差分が大きいため隠しています
+ 0 - 0
spine-ts/build/spine-webgl.js.map


+ 4 - 0
spine-ts/build/spine-widget.d.ts

@@ -585,6 +585,9 @@ declare module spine {
 		ChainScale = 2,
 	}
 }
+interface Math {
+	fround(n: number): number;
+}
 declare module spine {
 	class SharedAssetManager implements Disposable {
 		private pathPrefix;
@@ -987,6 +990,7 @@ declare module spine {
 		static newFloatArray(size: number): ArrayLike<number>;
 		static newShortArray(size: number): ArrayLike<number>;
 		static toFloatArray(array: Array<number>): number[] | Float32Array;
+		static toSinglePrecision(value: number): number;
 	}
 	class DebugUtils {
 		static logBones(skeleton: Skeleton): void;

+ 14 - 2
spine-ts/build/spine-widget.js

@@ -1216,7 +1216,7 @@ var spine;
 				return true;
 			var finished = this.updateMixingFrom(from, delta);
 			if (to.mixTime > 0 && (to.mixTime >= to.mixDuration || to.timeScale == 0)) {
-				if (from.totalAlpha == 0) {
+				if (from.totalAlpha == 0 || to.mixDuration == 0) {
 					to.mixingFrom = from.mixingFrom;
 					to.interruptAlpha = from.interruptAlpha;
 					this.queue.end(from);
@@ -2974,6 +2974,15 @@ var spine;
 		RotateMode[RotateMode["ChainScale"] = 2] = "ChainScale";
 	})(RotateMode = spine.RotateMode || (spine.RotateMode = {}));
 })(spine || (spine = {}));
+(function () {
+	if (!Math.fround) {
+		Math.fround = (function (array) {
+			return function (x) {
+				return array[0] = x, array[0];
+			};
+		})(new Float32Array(1));
+	}
+})();
 var spine;
 (function (spine) {
 	var Assets = (function () {
@@ -4745,7 +4754,7 @@ var spine;
 					var eventData = skeletonData.findEvent(eventMap.name);
 					if (eventData == null)
 						throw new Error("Event not found: " + eventMap.name);
-					var event_5 = new spine.Event(eventMap.time, eventData);
+					var event_5 = new spine.Event(spine.Utils.toSinglePrecision(eventMap.time), eventData);
 					event_5.intValue = this.getValue(eventMap, "int", eventData.intValue);
 					event_5.floatValue = this.getValue(eventMap, "float", eventData.floatValue);
 					event_5.stringValue = this.getValue(eventMap, "string", eventData.stringValue);
@@ -5879,6 +5888,9 @@ var spine;
 		Utils.toFloatArray = function (array) {
 			return Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array;
 		};
+		Utils.toSinglePrecision = function (value) {
+			return Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value;
+		};
 		return Utils;
 	}());
 	Utils.SUPPORTS_TYPED_ARRAYS = typeof (Float32Array) !== "undefined";

ファイルの差分が大きいため隠しています
+ 0 - 0
spine-ts/build/spine-widget.js.map


+ 2 - 1
spine-ts/core/src/AnimationState.ts

@@ -116,7 +116,8 @@ module spine {
 
 			// Require mixTime > 0 to ensure the mixing from entry was applied at least once.
 			if (to.mixTime > 0 && (to.mixTime >= to.mixDuration || to.timeScale == 0)) {
-				if (from.totalAlpha == 0) {
+				// Require totalAlpha == 0 to ensure mixing is complete, unless mixDuration == 0 (the transition is a single frame).
+				if (from.totalAlpha == 0 || to.mixDuration == 0) {
 					to.mixingFrom = from.mixingFrom;
 					to.interruptAlpha = from.interruptAlpha;
 					this.queue.end(from);

BIN
spine-ue4/Content/GettingStarted/06-cpp.umap


BIN
spine-ue4/Content/Test/Test.umap


+ 1 - 0
spine-ue4/Plugins/RuntimeMeshComponentPlugin/Source/RuntimeMeshComponent/Public/RuntimeMeshCore.h

@@ -11,6 +11,7 @@
 
 class FRuntimeMeshVertexFactory;
 
+#pragma warning( disable : 4265 )
 
 template<typename T>
 struct FRuntimeMeshVertexTraits

+ 1 - 1
spine-ue4/Plugins/RuntimeMeshComponentPlugin/Source/RuntimeMeshComponent/RuntimeMeshComponent.Build.cs

@@ -4,7 +4,7 @@ using UnrealBuildTool;
 
 public class RuntimeMeshComponent : ModuleRules
 {
-	public RuntimeMeshComponent(TargetInfo Target)
+	public RuntimeMeshComponent(ReadOnlyTargetRules Target) : base(Target)
 	{
         PrivateIncludePaths.Add("RuntimeMeshComponent/Private");
         PublicIncludePaths.Add("RuntimeMeshComponent/Public");

+ 1 - 1
spine-ue4/Plugins/RuntimeMeshComponentPlugin/Source/RuntimeMeshComponentEditor/RuntimeMeshComponentEditor.Build.cs

@@ -4,7 +4,7 @@ namespace UnrealBuildTool.Rules
 {
 	public class RuntimeMeshComponentEditor : ModuleRules
 	{
-        public RuntimeMeshComponentEditor(TargetInfo Target)
+        public RuntimeMeshComponentEditor(ReadOnlyTargetRules Target) : base(Target)
 		{
 			PrivateIncludePaths.Add("RuntimeMeshComponentEditor/Private");
             PublicIncludePaths.Add("RuntimeMeshComponentEditor/Public");

+ 0 - 1
spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineBoneDriverComponent.cpp

@@ -31,7 +31,6 @@
 #include "SpinePluginPrivatePCH.h"
 
 USpineBoneDriverComponent::USpineBoneDriverComponent () {
-	bWantsBeginPlay = true;
 	PrimaryComponentTick.bCanEverTick = true;
 	bTickInEditor = true;
 	bAutoActivate = true;

+ 0 - 1
spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineBoneFollowerComponent.cpp

@@ -31,7 +31,6 @@
 #include "SpinePluginPrivatePCH.h"
 
 USpineBoneFollowerComponent::USpineBoneFollowerComponent () {	
-	bWantsBeginPlay = true;
 	PrimaryComponentTick.bCanEverTick = true;
 	bTickInEditor = true;
 	bAutoActivate = true;

+ 0 - 1
spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonAnimationComponent.cpp

@@ -73,7 +73,6 @@ void callback(spAnimationState* state, spEventType type, spTrackEntry* entry, sp
 }
 
 USpineSkeletonAnimationComponent::USpineSkeletonAnimationComponent () {
-	bWantsBeginPlay = true;
 	PrimaryComponentTick.bCanEverTick = true;
 	bTickInEditor = true;
 	bAutoActivate = true;

+ 0 - 1
spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonComponent.cpp

@@ -33,7 +33,6 @@
 #define LOCTEXT_NAMESPACE "Spine"
 
 USpineSkeletonComponent::USpineSkeletonComponent () {
-	bWantsBeginPlay = true;
 	PrimaryComponentTick.bCanEverTick = true;
 	bTickInEditor = true;
 	bAutoActivate = true;

+ 0 - 1
spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonRendererComponent.cpp

@@ -37,7 +37,6 @@
 
 USpineSkeletonRendererComponent::USpineSkeletonRendererComponent (const FObjectInitializer& ObjectInitializer) 
 : URuntimeMeshComponent(ObjectInitializer) {
-	bWantsBeginPlay = true;
 	PrimaryComponentTick.bCanEverTick = true;
 	bTickInEditor = true;
 	bAutoActivate = true;

+ 21 - 12
spine-ue4/Plugins/SpinePlugin/SpinePlugin.uplugin

@@ -14,16 +14,25 @@
 	"CanContainContent" : true,
 	"IsBetaVersion" : false,
 	"Installed" : false,
-	"Modules" :
-	[
-		{
-			"Name" : "SpinePlugin",
-			"Type" : "Runtime",
-			"LoadingPhase" : "PreDefault"			
-		},
-		{
-			"Name" : "SpineEditorPlugin",
-			"Type" : "Editor"
-		}
-	]
+  "Modules": [
+    {
+      "Name": "SpinePlugin",
+      "Type": "Runtime",
+      "LoadingPhase": "PreDefault"
+    },
+    {
+      "Name": "SpineEditorPlugin",
+      "Type": "Editor"
+    }
+  ],
+  "Plugins": [
+    {
+      "Name": "ProceduralMeshComponent",
+      "Enabled": true
+    },
+    {
+      "Name": "RuntimeMeshComponent",
+      "Enabled":  true
+    }
+  ]
 }

+ 3 - 15
spine-ue4/Source/SpineUE4.Target.cs

@@ -5,21 +5,9 @@ using System.Collections.Generic;
 
 public class SpineUE4Target : TargetRules
 {
-	public SpineUE4Target(TargetInfo Target)
+	public SpineUE4Target(TargetInfo Target) : base(Target)
 	{
-		Type = TargetType.Game;		
-	}
-
-	//
-	// TargetRules interface.
-	//
-
-	public override void SetupBinaries(
-		TargetInfo Target,
-		ref List<UEBuildBinaryConfiguration> OutBuildBinaryConfigurations,
-		ref List<string> OutExtraModuleNames
-		)
-	{
-		OutExtraModuleNames.AddRange( new string[] { "SpineUE4" } );		
+		Type = TargetType.Game;
+		ExtraModuleNames.AddRange(new string[] { "SpineUE4" });
 	}
 }

+ 37 - 0
spine-ue4/Source/SpineUE4/MySceneComponent.cpp

@@ -0,0 +1,37 @@
+// Fill out your copyright notice in the Description page of Project Settings.
+
+#include "SpineUE4.h"
+#include "MySceneComponent.h"
+#include "spine/spine.h"
+
+
+// Sets default values for this component's properties
+UMySceneComponent::UMySceneComponent(const FObjectInitializer& ObjectInitializer) : USpineSkeletonRendererComponent(ObjectInitializer)
+{
+	// Set this component to be initialized when the game starts, and to be ticked every frame.  You can turn these features
+	// off to improve performance if you don't need them.
+	PrimaryComponentTick.bCanEverTick = true;
+
+	// ...
+	spColor_create();
+}
+
+
+// Called when the game starts
+void UMySceneComponent::BeginPlay()
+{
+	Super::BeginPlay();
+
+	// ...
+	
+}
+
+
+// Called every frame
+void UMySceneComponent::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction)
+{
+	Super::TickComponent(DeltaTime, TickType, ThisTickFunction);
+
+	// ...
+}
+

+ 30 - 0
spine-ue4/Source/SpineUE4/MySceneComponent.h

@@ -0,0 +1,30 @@
+// Fill out your copyright notice in the Description page of Project Settings.
+
+#pragma once
+
+#include "CoreMinimal.h"
+#include "Components/SceneComponent.h"
+#include "SpineSkeletonRendererComponent.h"
+#include "MySceneComponent.generated.h"
+
+
+UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
+class SPINEUE4_API UMySceneComponent : public USpineSkeletonRendererComponent
+{
+	GENERATED_BODY()
+
+public:	
+	// Sets default values for this component's properties
+	UMySceneComponent(const FObjectInitializer& ObjectInitializer);
+
+protected:
+	// Called when the game starts
+	virtual void BeginPlay() override;
+
+public:	
+	// Called every frame
+	virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;
+
+		
+	
+};

+ 1 - 1
spine-ue4/Source/SpineUE4/SpineUE4.Build.cs

@@ -6,7 +6,7 @@ public class SpineUE4 : ModuleRules
 {
 	public SpineUE4(ReadOnlyTargetRules Target) : base(Target)
 	{
-		PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "SpinePlugin" });
+		PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "SpinePlugin", "RuntimeMeshComponent" });
 		PublicIncludePaths.AddRange(new string[] { "SpinePlugin/Public", "SpinePlugin/Classes" });
 
 		PrivateDependencyModuleNames.AddRange(new string[] {  });

+ 2 - 14
spine-ue4/Source/SpineUE4Editor.Target.cs

@@ -5,21 +5,9 @@ using System.Collections.Generic;
 
 public class SpineUE4EditorTarget : TargetRules
 {
-	public SpineUE4EditorTarget(TargetInfo Target)
+	public SpineUE4EditorTarget(TargetInfo Target) : base(Target)
 	{
 		Type = TargetType.Editor;
-	}
-
-	//
-	// TargetRules interface.
-	//
-
-	public override void SetupBinaries(
-		TargetInfo Target,
-		ref List<UEBuildBinaryConfiguration> OutBuildBinaryConfigurations,
-		ref List<string> OutExtraModuleNames
-		)
-	{
-		OutExtraModuleNames.AddRange( new string[] { "SpineUE4" } );
+		ExtraModuleNames.AddRange(new string[] { "SpineUE4" });
 	}
 }

+ 1 - 1
spine-ue4/SpineUE4.uproject

@@ -1,6 +1,6 @@
 {
 	"FileVersion": 3,
-	"EngineAssociation": "4.16",
+	"EngineAssociation": "4.17",
 	"Category": "",
 	"Description": "",
 	"Modules": [

+ 2 - 2
spine-unity/Assets/spine-unity/Editor/SkeletonRendererInspector.cs

@@ -170,7 +170,7 @@ namespace Spine.Unity.Editor {
 					#if NO_PREFAB_MESH
 					if (isInspectingPrefab) {
 						MeshFilter meshFilter = component.GetComponent<MeshFilter>();
-						if (meshFilter != null)
+						if (meshFilter != null && meshFilter.sharedMesh != null)
 							meshFilter.sharedMesh = null;
 					}
 					#endif
@@ -211,7 +211,7 @@ namespace Spine.Unity.Editor {
 				#if NO_PREFAB_MESH
 				if (isInspectingPrefab) {
 					MeshFilter meshFilter = component.GetComponent<MeshFilter>();
-					if (meshFilter != null)
+					if (meshFilter != null && meshFilter.sharedMesh != null)
 						meshFilter.sharedMesh = null;
 				}
 				#endif

+ 4 - 2
spine-unity/Assets/spine-unity/Modules/Ghost/SkeletonGhost.cs

@@ -155,8 +155,10 @@ namespace Spine.Unity.Modules {
 		}
 
 		void OnDestroy () {
-			for (int i = 0; i < maximumGhosts; i++)
-				if (pool[i] != null) pool[i].Cleanup();
+			if (pool != null) {
+				for (int i = 0; i < maximumGhosts; i++)
+					if (pool[i] != null) pool[i].Cleanup();
+			}
 
 			foreach (var mat in materialTable.Values)
 				Destroy(mat);

+ 30 - 3
spine-unity/Assets/spine-unity/Modules/SkeletonRenderSeparator/SkeletonRenderSeparator.cs

@@ -72,6 +72,14 @@ namespace Spine.Unity.Modules {
 		#endregion
 
 		#region Runtime Instantiation
+		/// <summary>Adds a SkeletonRenderSeparator and child SkeletonPartsRenderer GameObjects to a given SkeletonRenderer.</summary>
+		/// <returns>The to skeleton renderer.</returns>
+		/// <param name="skeletonRenderer">The target SkeletonRenderer or SkeletonAnimation.</param>
+		/// <param name="sortingLayerID">Sorting layer to be used for the parts renderers.</param>
+		/// <param name="extraPartsRenderers">Number of additional SkeletonPartsRenderers on top of the ones determined by counting the number of separator slots.</param>
+		/// <param name="sortingOrderIncrement">The integer to increment the sorting order per SkeletonPartsRenderer to separate them.</param>
+		/// <param name="baseSortingOrder">The sorting order value of the first SkeletonPartsRenderer.</param>
+		/// <param name="addMinimumPartsRenderers">If set to <c>true</c>, a minimum number of SkeletonPartsRenderer GameObjects (determined by separatorSlots.Count + 1) will be added.</param>
 		public static SkeletonRenderSeparator AddToSkeletonRenderer (SkeletonRenderer skeletonRenderer, int sortingLayerID = 0, int extraPartsRenderers = 0, int sortingOrderIncrement = DefaultSortingOrderIncrement, int baseSortingOrder = 0, bool addMinimumPartsRenderers = true) {
 			if (skeletonRenderer == null) {
 				Debug.Log("Tried to add SkeletonRenderSeparator to a null SkeletonRenderer reference.");
@@ -90,15 +98,34 @@ namespace Spine.Unity.Modules {
 			var componentRenderers = srs.partsRenderers;
 
 			for (int i = 0; i < count; i++) {
-				var smr = SkeletonPartsRenderer.NewPartsRendererGameObject(skeletonRendererTransform, i.ToString());
-				var mr = smr.MeshRenderer;
+				var spr = SkeletonPartsRenderer.NewPartsRendererGameObject(skeletonRendererTransform, i.ToString());
+				var mr = spr.MeshRenderer;
 				mr.sortingLayerID = sortingLayerID;
 				mr.sortingOrder = baseSortingOrder + (i * sortingOrderIncrement);
-				componentRenderers.Add(smr);
+				componentRenderers.Add(spr);
 			}
 
 			return srs;
 		}
+
+		/// <summary>Add a child SkeletonPartsRenderer GameObject to this SkeletonRenderSeparator.</summary>
+		public void AddPartsRenderer (int sortingOrderIncrement = DefaultSortingOrderIncrement) {
+			int sortingLayerID = 0;
+			int sortingOrder = 0;
+			if (partsRenderers.Count > 0) {
+				var previous = partsRenderers[partsRenderers.Count - 1];
+				var previousMeshRenderer = previous.MeshRenderer;
+				sortingLayerID = previousMeshRenderer.sortingLayerID;
+				sortingOrder = previousMeshRenderer.sortingOrder + sortingOrderIncrement;
+			}
+				
+			var spr = SkeletonPartsRenderer.NewPartsRendererGameObject(skeletonRenderer.transform, partsRenderers.Count.ToString());
+			partsRenderers.Add(spr);
+
+			var mr = spr.MeshRenderer;
+			mr.sortingLayerID = sortingLayerID;
+			mr.sortingOrder = sortingOrder;
+		}
 		#endregion
 
 		void OnEnable () {

+ 67 - 19
spine-unity/Assets/spine-unity/SkeletonAnimator.cs

@@ -36,7 +36,7 @@ using System.Collections.Generic;
 namespace Spine.Unity {
 	[RequireComponent(typeof(Animator))]
 	public class SkeletonAnimator : SkeletonRenderer, ISkeletonAnimation {
-		
+
 		[SerializeField] protected MecanimTranslator translator;
 		public MecanimTranslator Translator { get { return translator; } }
 
@@ -108,9 +108,13 @@ namespace Spine.Unity {
 
 			public enum MixMode { AlwaysMix, MixNext, SpineStyle }
 
-			readonly Dictionary<int, Spine.Animation> animationTable = new Dictionary<int, Spine.Animation>();
-			readonly Dictionary<AnimationClip, int> clipNameHashCodeTable = new Dictionary<AnimationClip, int>();
+			readonly Dictionary<int, Spine.Animation> animationTable = new Dictionary<int, Spine.Animation>(IntEqualityComparer.Instance);
+			readonly Dictionary<AnimationClip, int> clipNameHashCodeTable = new Dictionary<AnimationClip, int>(AnimationClipEqualityComparer.Instance);
 			readonly List<Animation> previousAnimations = new List<Animation>();
+			#if UNITY_2017_1_OR_NEWER
+			readonly List<AnimatorClipInfo> clipInfoCache = new List<AnimatorClipInfo>();
+			readonly List<AnimatorClipInfo> nextClipInfoCache = new List<AnimatorClipInfo>();
+			#endif
 			Animator animator;
 
 			public Animator Animator { get { return this.animator; } }
@@ -144,16 +148,19 @@ namespace Spine.Unity {
 						AnimatorStateInfo nextStateInfo = animator.GetNextAnimatorStateInfo(layer);
 
 						bool hasNext = nextStateInfo.fullPathHash != 0;
-						AnimatorClipInfo[] clipInfo = animator.GetCurrentAnimatorClipInfo(layer);
-						AnimatorClipInfo[] nextClipInfo = animator.GetNextAnimatorClipInfo(layer);
 
-						for (int c = 0; c < clipInfo.Length; c++) {
+						int clipInfoCount, nextClipInfoCount;
+						IList<AnimatorClipInfo> clipInfo, nextClipInfo;
+						GetAnimatorClipInfos(layer, out clipInfoCount, out nextClipInfoCount, out clipInfo, out nextClipInfo);
+
+						for (int c = 0; c < clipInfoCount; c++) {
 							var info = clipInfo[c];
 							float weight = info.weight * layerWeight; if (weight == 0) continue;
 							previousAnimations.Add(animationTable[NameHashCode(info.clip)]);
 						}
+
 						if (hasNext) {
-							for (int c = 0; c < nextClipInfo.Length; c++) {
+							for (int c = 0; c < nextClipInfoCount; c++) {
 								var info = nextClipInfo[c];
 								float weight = info.weight * layerWeight; if (weight == 0) continue;
 								previousAnimations.Add(animationTable[NameHashCode(info.clip)]);
@@ -169,22 +176,20 @@ namespace Spine.Unity {
 					AnimatorStateInfo nextStateInfo = animator.GetNextAnimatorStateInfo(layer);
 
 					bool hasNext = nextStateInfo.fullPathHash != 0;
-					AnimatorClipInfo[] clipInfo = animator.GetCurrentAnimatorClipInfo(layer);
-					AnimatorClipInfo[] nextClipInfo = animator.GetNextAnimatorClipInfo(layer);
-					//UNITY 4
-					//bool hasNext = nextStateInfo.nameHash != 0;
-					//var clipInfo = animator.GetCurrentAnimationClipState(i);
-					//var nextClipInfo = animator.GetNextAnimationClipState(i);
+
+					int clipInfoCount, nextClipInfoCount;
+					IList<AnimatorClipInfo> clipInfo, nextClipInfo;
+					GetAnimatorClipInfos(layer, out clipInfoCount, out nextClipInfoCount, out clipInfo, out nextClipInfo);
 
 					MixMode mode = layerMixModes[layer];
 					if (mode == MixMode.AlwaysMix) {
 						// Always use Mix instead of Applying the first non-zero weighted clip.
-						for (int c = 0; c < clipInfo.Length; c++) {
+						for (int c = 0; c < clipInfoCount; c++) {
 							var info = clipInfo[c];	float weight = info.weight * layerWeight; if (weight == 0) continue;
 							animationTable[NameHashCode(info.clip)].Apply(skeleton, 0, AnimationTime(stateInfo.normalizedTime, info.clip.length, stateInfo.loop, stateInfo.speed < 0), stateInfo.loop, null, weight, MixPose.Current, MixDirection.In);
 						}
 						if (hasNext) {
-							for (int c = 0; c < nextClipInfo.Length; c++) {
+							for (int c = 0; c < nextClipInfoCount; c++) {
 								var info = nextClipInfo[c]; float weight = info.weight * layerWeight; if (weight == 0) continue;
 								animationTable[NameHashCode(info.clip)].Apply(skeleton, 0, AnimationTime(nextStateInfo.normalizedTime , info.clip.length,nextStateInfo.speed < 0), nextStateInfo.loop, null, weight, MixPose.Current, MixDirection.In);
 							}
@@ -192,13 +197,13 @@ namespace Spine.Unity {
 					} else { // case MixNext || SpineStyle
 						// Apply first non-zero weighted clip
 						int c = 0;
-						for (; c < clipInfo.Length; c++) {
+						for (; c < clipInfoCount; c++) {
 							var info = clipInfo[c]; float weight = info.weight * layerWeight; if (weight == 0) continue;
 							animationTable[NameHashCode(info.clip)].Apply(skeleton, 0, AnimationTime(stateInfo.normalizedTime, info.clip.length, stateInfo.loop, stateInfo.speed < 0), stateInfo.loop, null, 1f, MixPose.Current, MixDirection.In);
 							break;
 						}
 						// Mix the rest
-						for (; c < clipInfo.Length; c++) {
+						for (; c < clipInfoCount; c++) {
 							var info = clipInfo[c]; float weight = info.weight * layerWeight; if (weight == 0) continue;
 							animationTable[NameHashCode(info.clip)].Apply(skeleton, 0, AnimationTime(stateInfo.normalizedTime, info.clip.length, stateInfo.loop, stateInfo.speed < 0), stateInfo.loop, null, weight, MixPose.Current, MixDirection.In);
 						}
@@ -207,14 +212,14 @@ namespace Spine.Unity {
 						if (hasNext) {
 							// Apply next clip directly instead of mixing (ie: no crossfade, ignores mecanim transition weights)
 							if (mode == MixMode.SpineStyle) {
-								for (; c < nextClipInfo.Length; c++) {
+								for (; c < nextClipInfoCount; c++) {
 									var info = nextClipInfo[c]; float weight = info.weight * layerWeight; if (weight == 0) continue;
 									animationTable[NameHashCode(info.clip)].Apply(skeleton, 0, AnimationTime(nextStateInfo.normalizedTime , info.clip.length,nextStateInfo.speed < 0), nextStateInfo.loop, null, 1f, MixPose.Current, MixDirection.In);
 									break;
 								}
 							}
 							// Mix the rest
-							for (; c < nextClipInfo.Length; c++) {
+							for (; c < nextClipInfoCount; c++) {
 								var info = nextClipInfo[c];	float weight = info.weight * layerWeight; if (weight == 0) continue;
 								animationTable[NameHashCode(info.clip)].Apply(skeleton, 0, AnimationTime(nextStateInfo.normalizedTime , info.clip.length,nextStateInfo.speed < 0), nextStateInfo.loop, null, weight, MixPose.Current, MixDirection.In);
 							}
@@ -239,6 +244,31 @@ namespace Spine.Unity {
 				return normalizedTime * clipLength;
 			}
 
+			void GetAnimatorClipInfos (
+				int layer,
+				out int clipInfoCount,
+				out int nextClipInfoCount,
+				out IList<AnimatorClipInfo> clipInfo,
+				out IList<AnimatorClipInfo> nextClipInfo) {
+				#if UNITY_2017_1_OR_NEWER
+				clipInfoCount = animator.GetCurrentAnimatorClipInfoCount(layer);
+				nextClipInfoCount = animator.GetNextAnimatorClipInfoCount(layer);
+				if (clipInfoCache.Capacity < clipInfoCount) clipInfoCache.Capacity = clipInfoCount;
+				if (nextClipInfoCache.Capacity < nextClipInfoCount) nextClipInfoCache.Capacity = nextClipInfoCount;
+				animator.GetCurrentAnimatorClipInfo(layer, clipInfoCache);
+				animator.GetNextAnimatorClipInfo(layer, nextClipInfoCache);
+
+				clipInfo = clipInfoCache;
+				nextClipInfo = nextClipInfoCache;
+				#else
+				clipInfo = animator.GetCurrentAnimatorClipInfo(layer);
+				nextClipInfo = animator.GetNextAnimatorClipInfo(layer);
+
+				clipInfoCount = clipInfo.Count;
+				nextClipInfoCount = nextClipInfo.Count;
+				#endif
+			}
+
 			int NameHashCode (AnimationClip clip) {
 				int clipNameHashCode;
 				if (!clipNameHashCodeTable.TryGetValue(clip, out clipNameHashCode)) {
@@ -247,6 +277,24 @@ namespace Spine.Unity {
 				}
 				return clipNameHashCode;
 			}
+
+			class AnimationClipEqualityComparer : IEqualityComparer<AnimationClip> {
+				internal static readonly IEqualityComparer<AnimationClip> Instance = new AnimationClipEqualityComparer();
+
+				public bool Equals (AnimationClip x, AnimationClip y) {
+					return x.GetInstanceID() == y.GetInstanceID();
+				}
+
+				public int GetHashCode (AnimationClip o) {
+					return o.GetInstanceID();
+				}
+			}
+
+			class IntEqualityComparer : IEqualityComparer<int> {
+				internal static readonly IEqualityComparer<int> Instance = new IntEqualityComparer();
+				public bool Equals (int x, int y) { return x == y; }
+				public int GetHashCode(int o) { return o; }
+			}
 		}
 
 	}

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません