Pārlūkot izejas kodu

Merge branch '3.7-beta' into 3.7-beta-cpp

badlogic 7 gadi atpakaļ
vecāks
revīzija
e724231c5f
100 mainītis faili ar 96 papildinājumiem un 32620 dzēšanām
  1. 0 1676
      examples/alien/export/alien-ess.json
  2. BIN
      examples/alien/export/alien-ess.skel
  3. BIN
      examples/alien/export/alien-pma.png
  4. 0 298
      examples/alien/export/alien-pro.json
  5. BIN
      examples/alien/export/alien-pro.skel
  6. BIN
      examples/alien/export/alien.png
  7. BIN
      examples/coin/export/coin-pma.png
  8. 0 171
      examples/coin/export/coin-pro.json
  9. BIN
      examples/coin/export/coin-pro.skel
  10. BIN
      examples/coin/export/coin.png
  11. 0 771
      examples/dragon/export/dragon-ess.json
  12. BIN
      examples/dragon/export/dragon-ess.skel
  13. BIN
      examples/dragon/export/dragon-pma.png
  14. BIN
      examples/dragon/export/dragon-pma2.png
  15. BIN
      examples/dragon/export/dragon.png
  16. BIN
      examples/dragon/export/dragon2.png
  17. 0 618
      examples/goblins/export/goblins-ess.json
  18. BIN
      examples/goblins/export/goblins-ess.skel
  19. BIN
      examples/goblins/export/goblins-pma.png
  20. 0 1212
      examples/goblins/export/goblins-pro.json
  21. BIN
      examples/goblins/export/goblins-pro.skel
  22. BIN
      examples/goblins/export/goblins.png
  23. 0 2063
      examples/hero/export/hero-ess.json
  24. BIN
      examples/hero/export/hero-ess.skel
  25. BIN
      examples/hero/export/hero-pma.png
  26. 0 116
      examples/hero/export/hero-pro.json
  27. BIN
      examples/hero/export/hero-pro.skel
  28. BIN
      examples/hero/export/hero.png
  29. BIN
      examples/owl/export/owl-pma.png
  30. 0 289
      examples/owl/export/owl-pro.json
  31. BIN
      examples/owl/export/owl-pro.skel
  32. BIN
      examples/owl/export/owl.png
  33. 0 542
      examples/powerup/export/powerup-ess.json
  34. BIN
      examples/powerup/export/powerup-ess.skel
  35. BIN
      examples/powerup/export/powerup-pma.png
  36. 0 48
      examples/powerup/export/powerup-pro.json
  37. BIN
      examples/powerup/export/powerup-pro.skel
  38. BIN
      examples/powerup/export/powerup.png
  39. BIN
      examples/raptor/export/raptor-pma.png
  40. 0 694
      examples/raptor/export/raptor-pro.json
  41. BIN
      examples/raptor/export/raptor-pro.skel
  42. BIN
      examples/raptor/export/raptor.png
  43. 0 1077
      examples/speedy/export/speedy-ess.json
  44. BIN
      examples/speedy/export/speedy-ess.skel
  45. BIN
      examples/speedy/export/speedy-pma.png
  46. BIN
      examples/speedy/export/speedy.png
  47. 0 1880
      examples/spineboy/export/spineboy-ess.json
  48. BIN
      examples/spineboy/export/spineboy-ess.skel
  49. BIN
      examples/spineboy/export/spineboy-pma.png
  50. 0 545
      examples/spineboy/export/spineboy-pro.json
  51. BIN
      examples/spineboy/export/spineboy-pro.skel
  52. BIN
      examples/spineboy/export/spineboy.png
  53. 0 277
      examples/spinosaurus/export/spinosaurus-ess.json
  54. BIN
      examples/spinosaurus/export/spinosaurus-ess.skel
  55. BIN
      examples/stretchyman/export/stretchyman-pma.png
  56. 0 500
      examples/stretchyman/export/stretchyman-pro.json
  57. BIN
      examples/stretchyman/export/stretchyman-pro.skel
  58. BIN
      examples/stretchyman/export/stretchyman.png
  59. BIN
      examples/tank/export/tank-pma.png
  60. 0 5022
      examples/tank/export/tank-pro.json
  61. BIN
      examples/tank/export/tank-pro.skel
  62. BIN
      examples/tank/export/tank.png
  63. BIN
      examples/vine/export/vine-pma.png
  64. 0 146
      examples/vine/export/vine-pro.json
  65. BIN
      examples/vine/export/vine-pro.skel
  66. BIN
      examples/vine/export/vine.png
  67. 0 1880
      spine-as3/spine-as3-example/src/spineboy-ess.json
  68. BIN
      spine-as3/spine-as3-example/src/spineboy.png
  69. 2 2
      spine-c/spine-c/include/spine/Animation.h
  70. 4 2
      spine-c/spine-c/include/spine/IkConstraint.h
  71. 2 0
      spine-c/spine-c/include/spine/IkConstraintData.h
  72. 1 1
      spine-c/spine-c/include/spine/extension.h
  73. 41 9
      spine-c/spine-c/src/spine/Animation.c
  74. 1 0
      spine-c/spine-c/src/spine/AnimationState.c
  75. 23 13
      spine-c/spine-c/src/spine/IkConstraint.c
  76. 1 0
      spine-c/spine-c/src/spine/IkConstraintData.c
  77. 2 1
      spine-c/spine-c/src/spine/PathConstraint.c
  78. 1 0
      spine-c/spine-c/src/spine/Skeleton.c
  79. 3 1
      spine-c/spine-c/src/spine/SkeletonBinary.c
  80. 1 0
      spine-c/spine-c/src/spine/SkeletonClipping.c
  81. 2 1
      spine-c/spine-c/src/spine/SkeletonJson.c
  82. 12 0
      spine-c/spine-c/src/spine/VertexEffect.c
  83. 0 171
      spine-cocos2d-objc/Resources/coin-pro.json
  84. BIN
      spine-cocos2d-objc/Resources/coin.png
  85. 0 1212
      spine-cocos2d-objc/Resources/goblins-pro.json
  86. BIN
      spine-cocos2d-objc/Resources/goblins.png
  87. 0 694
      spine-cocos2d-objc/Resources/raptor-pro.json
  88. BIN
      spine-cocos2d-objc/Resources/raptor.png
  89. 0 1880
      spine-cocos2d-objc/Resources/spineboy-ess.json
  90. BIN
      spine-cocos2d-objc/Resources/spineboy.png
  91. 0 5022
      spine-cocos2d-objc/Resources/tank-pro.json
  92. BIN
      spine-cocos2d-objc/Resources/tank.png
  93. BIN
      spine-cocos2dx/example/Resources/common/coin-pro.skel
  94. BIN
      spine-cocos2dx/example/Resources/common/coin.png
  95. 0 1212
      spine-cocos2dx/example/Resources/common/goblins-pro.json
  96. BIN
      spine-cocos2dx/example/Resources/common/goblins.png
  97. 0 694
      spine-cocos2dx/example/Resources/common/raptor-pro.json
  98. BIN
      spine-cocos2dx/example/Resources/common/raptor.png
  99. 0 1880
      spine-cocos2dx/example/Resources/common/spineboy-ess.json
  100. BIN
      spine-cocos2dx/example/Resources/common/spineboy.png

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 1676
examples/alien/export/alien-ess.json


BIN
examples/alien/export/alien-ess.skel


BIN
examples/alien/export/alien-pma.png


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 298
examples/alien/export/alien-pro.json


BIN
examples/alien/export/alien-pro.skel


BIN
examples/alien/export/alien.png


BIN
examples/coin/export/coin-pma.png


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 171
examples/coin/export/coin-pro.json


BIN
examples/coin/export/coin-pro.skel


BIN
examples/coin/export/coin.png


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 771
examples/dragon/export/dragon-ess.json


BIN
examples/dragon/export/dragon-ess.skel


BIN
examples/dragon/export/dragon-pma.png


BIN
examples/dragon/export/dragon-pma2.png


BIN
examples/dragon/export/dragon.png


BIN
examples/dragon/export/dragon2.png


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 618
examples/goblins/export/goblins-ess.json


BIN
examples/goblins/export/goblins-ess.skel


BIN
examples/goblins/export/goblins-pma.png


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 1212
examples/goblins/export/goblins-pro.json


BIN
examples/goblins/export/goblins-pro.skel


BIN
examples/goblins/export/goblins.png


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 2063
examples/hero/export/hero-ess.json


BIN
examples/hero/export/hero-ess.skel


BIN
examples/hero/export/hero-pma.png


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 116
examples/hero/export/hero-pro.json


BIN
examples/hero/export/hero-pro.skel


BIN
examples/hero/export/hero.png


BIN
examples/owl/export/owl-pma.png


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 289
examples/owl/export/owl-pro.json


BIN
examples/owl/export/owl-pro.skel


BIN
examples/owl/export/owl.png


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 542
examples/powerup/export/powerup-ess.json


BIN
examples/powerup/export/powerup-ess.skel


BIN
examples/powerup/export/powerup-pma.png


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 48
examples/powerup/export/powerup-pro.json


BIN
examples/powerup/export/powerup-pro.skel


BIN
examples/powerup/export/powerup.png


BIN
examples/raptor/export/raptor-pma.png


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 694
examples/raptor/export/raptor-pro.json


BIN
examples/raptor/export/raptor-pro.skel


BIN
examples/raptor/export/raptor.png


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 1077
examples/speedy/export/speedy-ess.json


BIN
examples/speedy/export/speedy-ess.skel


BIN
examples/speedy/export/speedy-pma.png


BIN
examples/speedy/export/speedy.png


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 1880
examples/spineboy/export/spineboy-ess.json


BIN
examples/spineboy/export/spineboy-ess.skel


BIN
examples/spineboy/export/spineboy-pma.png


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 545
examples/spineboy/export/spineboy-pro.json


BIN
examples/spineboy/export/spineboy-pro.skel


BIN
examples/spineboy/export/spineboy.png


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 277
examples/spinosaurus/export/spinosaurus-ess.json


BIN
examples/spinosaurus/export/spinosaurus-ess.skel


BIN
examples/stretchyman/export/stretchyman-pma.png


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 500
examples/stretchyman/export/stretchyman-pro.json


BIN
examples/stretchyman/export/stretchyman-pro.skel


BIN
examples/stretchyman/export/stretchyman.png


BIN
examples/tank/export/tank-pma.png


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 5022
examples/tank/export/tank-pro.json


BIN
examples/tank/export/tank-pro.skel


BIN
examples/tank/export/tank.png


BIN
examples/vine/export/vine-pma.png


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 146
examples/vine/export/vine-pro.json


BIN
examples/vine/export/vine-pro.skel


BIN
examples/vine/export/vine.png


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 1880
spine-as3/spine-as3-example/src/spineboy-ess.json


BIN
spine-as3/spine-as3-example/src/spineboy.png


+ 2 - 2
spine-c/spine-c/include/spine/Animation.h

@@ -432,7 +432,7 @@ typedef spDeformTimeline DeformTimeline;
 
 /**/
 
-static const int IKCONSTRAINT_ENTRIES = 3;
+static const int IKCONSTRAINT_ENTRIES = 4;
 
 typedef struct spIkConstraintTimeline {
 	spCurveTimeline super;
@@ -452,7 +452,7 @@ typedef struct spIkConstraintTimeline {
 
 SP_API spIkConstraintTimeline* spIkConstraintTimeline_create (int framesCount);
 
-SP_API 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, int /**boolean**/ stretch);
 
 #ifdef SPINE_SHORT_NAMES
 typedef spIkConstraintTimeline IkConstraintTimeline;

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

@@ -49,6 +49,7 @@ typedef struct spIkConstraint {
 
 	spBone* target;
 	int bendDirection;
+	int /*boolean*/ stretch;
 	float mix;
 
 #ifdef __cplusplus
@@ -58,6 +59,7 @@ typedef struct spIkConstraint {
 		bones(0),
 		target(0),
 		bendDirection(0),
+		stretch(0),
 		mix(0) {
 	}
 #endif
@@ -68,8 +70,8 @@ SP_API void spIkConstraint_dispose (spIkConstraint* self);
 
 SP_API void spIkConstraint_apply (spIkConstraint* self);
 
-SP_API void spIkConstraint_apply1 (spBone* bone, float targetX, float targetY, float alpha);
-SP_API 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, int /*boolean*/ stretch, float alpha);
+SP_API void spIkConstraint_apply2 (spBone* parent, spBone* child, float targetX, float targetY, int bendDirection, int /*boolean*/ stretch, float alpha);
 
 #ifdef SPINE_SHORT_NAMES
 typedef spIkConstraint IkConstraint;

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

@@ -46,6 +46,7 @@ typedef struct spIkConstraintData {
 
 	spBoneData* target;
 	int bendDirection;
+	int /*boolean*/ stretch;
 	float mix;
 
 #ifdef __cplusplus
@@ -55,6 +56,7 @@ typedef struct spIkConstraintData {
 		bones(0),
 		target(0),
 		bendDirection(0),
+		stretch(0),
 		mix(0) {
 	}
 #endif

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

@@ -63,7 +63,7 @@
 
 #include <spine/dll.h>
 
-// Required for sprintf and consorts on MSVC
+/* Required for sprintf and consorts on MSVC */
 #ifdef _MSC_VER
 #pragma warning(disable:4996)
 #endif

+ 41 - 9
spine-c/spine-c/src/spine/Animation.c

@@ -243,7 +243,6 @@ void _spRotateTimeline_apply (const spTimeline* timeline, spSkeleton* skeleton,
 	spBone *bone;
 	int frame;
 	float prevRotation, frameTime, percent, r;
-
 	spRotateTimeline* self = SUB_CAST(spRotateTimeline, timeline);
 
 	bone = skeleton->bones[self->boneIndex];
@@ -301,6 +300,7 @@ void _spRotateTimeline_apply (const spTimeline* timeline, spSkeleton* skeleton,
 	UNUSED(lastTime);
 	UNUSED(firedEvents);
 	UNUSED(eventsCount);
+	UNUSED(direction);
 }
 
 int _spRotateTimeline_getPropertyId (const spTimeline* timeline) {
@@ -385,6 +385,7 @@ void _spTranslateTimeline_apply (const spTimeline* timeline, spSkeleton* skeleto
 	UNUSED(lastTime);
 	UNUSED(firedEvents);
 	UNUSED(eventsCount);
+	UNUSED(direction);
 }
 
 int _spTranslateTimeline_getPropertyId (const spTimeline* self) {
@@ -584,6 +585,7 @@ void _spShearTimeline_apply (const spTimeline* timeline, spSkeleton* skeleton, f
 	UNUSED(lastTime);
 	UNUSED(firedEvents);
 	UNUSED(eventsCount);
+	UNUSED(direction);
 }
 
 int _spShearTimeline_getPropertyId (const spTimeline* timeline) {
@@ -667,6 +669,7 @@ void _spColorTimeline_apply (const spTimeline* timeline, spSkeleton* skeleton, f
 	UNUSED(lastTime);
 	UNUSED(firedEvents);
 	UNUSED(eventsCount);
+	UNUSED(direction);
 }
 
 int _spColorTimeline_getPropertyId (const spTimeline* timeline) {
@@ -776,6 +779,7 @@ void _spTwoColorTimeline_apply (const spTimeline* timeline, spSkeleton* skeleton
 	UNUSED(lastTime);
 	UNUSED(firedEvents);
 	UNUSED(eventsCount);
+	UNUSED(direction);
 }
 
 int _spTwoColorTimeline_getPropertyId (const spTimeline* timeline) {
@@ -1083,6 +1087,7 @@ void _spDeformTimeline_apply (const spTimeline* timeline, spSkeleton* skeleton,
 	UNUSED(lastTime);
 	UNUSED(firedEvents);
 	UNUSED(eventsCount);
+	UNUSED(direction);
 }
 
 int _spDeformTimeline_getPropertyId (const spTimeline* timeline) {
@@ -1156,10 +1161,12 @@ void _spEventTimeline_apply (const spTimeline* timeline, spSkeleton* skeleton, f
 		firedEvents[*eventsCount] = self->events[frame];
 		(*eventsCount)++;
 	}
+	UNUSED(direction);
 }
 
 int _spEventTimeline_getPropertyId (const spTimeline* timeline) {
 	return SP_TIMELINE_EVENT << 24;
+	UNUSED(timeline);
 }
 
 void _spEventTimeline_dispose (spTimeline* timeline) {
@@ -1233,6 +1240,7 @@ void _spDrawOrderTimeline_apply (const spTimeline* timeline, spSkeleton* skeleto
 
 int _spDrawOrderTimeline_getPropertyId (const spTimeline* timeline) {
 	return SP_TIMELINE_DRAWORDER << 24;
+	UNUSED(timeline);
 }
 
 void _spDrawOrderTimeline_dispose (spTimeline* timeline) {
@@ -1274,8 +1282,8 @@ void spDrawOrderTimeline_setFrame (spDrawOrderTimeline* self, int frameIndex, fl
 
 /**/
 
-static const int IKCONSTRAINT_PREV_TIME = -3, IKCONSTRAINT_PREV_MIX = -2, IKCONSTRAINT_PREV_BEND_DIRECTION = -1;
-static const int IKCONSTRAINT_MIX = 1, IKCONSTRAINT_BEND_DIRECTION = 2;
+static const int IKCONSTRAINT_PREV_TIME = -4, IKCONSTRAINT_PREV_MIX = -3, IKCONSTRAINT_PREV_BEND_DIRECTION = -2, IKCONSTRAINT_PREV_STRETCH = -1;
+static const int IKCONSTRAINT_MIX = 1, IKCONSTRAINT_BEND_DIRECTION = 2, IKCONSTRAINT_STRETCH = 3;
 
 void _spIkConstraintTimeline_apply (const spTimeline* timeline, spSkeleton* skeleton, float lastTime, float time,
 		spEvent** firedEvents, int* eventsCount, float alpha, spMixBlend blend, spMixDirection direction) {
@@ -1293,10 +1301,12 @@ void _spIkConstraintTimeline_apply (const spTimeline* timeline, spSkeleton* skel
 			case SP_MIX_BLEND_SETUP:
 				constraint->mix = constraint->data->mix;
 				constraint->bendDirection = constraint->data->bendDirection;
+				constraint->stretch = constraint->data->stretch;
 				return;
 			case SP_MIX_BLEND_FIRST:
 				constraint->mix += (constraint->data->mix - constraint->mix) * alpha;
 				constraint->bendDirection = constraint->data->bendDirection;
+				constraint->stretch = constraint->data->stretch;
 			case SP_MIX_BLEND_REPLACE:
 			case SP_MIX_BLEND_ADD:
 				; /* to appease compiler */
@@ -1309,11 +1319,19 @@ void _spIkConstraintTimeline_apply (const spTimeline* timeline, spSkeleton* skel
 	if (time >= frames[framesCount - IKCONSTRAINT_ENTRIES]) { /* Time is after last frame. */
 		if (blend == SP_MIX_BLEND_SETUP) {
 			constraint->mix = constraint->data->mix + (frames[framesCount + IKCONSTRAINT_PREV_MIX] - constraint->data->mix) * alpha;
-			constraint->bendDirection = direction == SP_MIX_DIRECTION_OUT ? constraint->data->bendDirection
-												 : (int)frames[framesCount + IKCONSTRAINT_PREV_BEND_DIRECTION];
+			if (direction == SP_MIX_DIRECTION_OUT) {
+				constraint->bendDirection = constraint->data->bendDirection;
+				constraint->stretch = constraint->data->stretch;
+			} else {
+				constraint->bendDirection = (int)frames[framesCount + IKCONSTRAINT_PREV_BEND_DIRECTION];
+				constraint->stretch = frames[framesCount + IKCONSTRAINT_PREV_STRETCH] ? 1 : 0;
+			}
 		} else {
 			constraint->mix += (frames[framesCount + IKCONSTRAINT_PREV_MIX] - constraint->mix) * alpha;
-			if (direction == SP_MIX_DIRECTION_IN) constraint->bendDirection = (int)frames[framesCount + IKCONSTRAINT_PREV_BEND_DIRECTION];
+			if (direction == SP_MIX_DIRECTION_IN) {
+				constraint->bendDirection = (int)frames[framesCount + IKCONSTRAINT_PREV_BEND_DIRECTION];
+				constraint->stretch = frames[framesCount + IKCONSTRAINT_PREV_STRETCH] ? 1 : 0;
+			}
 		}
 		return;
 	}
@@ -1326,10 +1344,19 @@ void _spIkConstraintTimeline_apply (const spTimeline* timeline, spSkeleton* skel
 
 	if (blend == SP_MIX_BLEND_SETUP) {
 		constraint->mix = constraint->data->mix + (mix + (frames[frame + IKCONSTRAINT_MIX] - mix) * percent - constraint->data->mix) * alpha;
-		constraint->bendDirection = direction == SP_MIX_DIRECTION_OUT ? constraint->data->bendDirection : (int)frames[frame + IKCONSTRAINT_PREV_BEND_DIRECTION];
+		if (direction == SP_MIX_DIRECTION_OUT) {
+			constraint->bendDirection = constraint->data->bendDirection;
+			constraint->stretch = constraint->data->stretch;
+		} else {
+			constraint->bendDirection = (int)frames[frame + IKCONSTRAINT_PREV_BEND_DIRECTION];
+			constraint->stretch = frames[frame + IKCONSTRAINT_PREV_STRETCH] ? 1 : 0;
+		}
 	} else {
 		constraint->mix += (mix + (frames[frame + IKCONSTRAINT_MIX] - mix) * percent - constraint->mix) * alpha;
-		if (direction == SP_MIX_DIRECTION_IN) constraint->bendDirection = (int)frames[frame + IKCONSTRAINT_PREV_BEND_DIRECTION];
+		if (direction == SP_MIX_DIRECTION_IN) {
+			constraint->bendDirection = (int)frames[frame + IKCONSTRAINT_PREV_BEND_DIRECTION];
+			constraint->stretch = frames[frame + IKCONSTRAINT_PREV_STRETCH] ? 1 : 0;
+		}
 	}
 
 	UNUSED(lastTime);
@@ -1345,11 +1372,12 @@ spIkConstraintTimeline* spIkConstraintTimeline_create (int framesCount) {
 	return (spIkConstraintTimeline*)_spBaseTimeline_create(framesCount, SP_TIMELINE_IKCONSTRAINT, IKCONSTRAINT_ENTRIES, _spIkConstraintTimeline_apply, _spIkConstraintTimeline_getPropertyId);
 }
 
-void spIkConstraintTimeline_setFrame (spIkConstraintTimeline* self, int frameIndex, float time, float mix, int bendDirection) {
+void spIkConstraintTimeline_setFrame (spIkConstraintTimeline* self, int frameIndex, float time, float mix, int bendDirection, int /*boolean*/ stretch) {
 	frameIndex *= IKCONSTRAINT_ENTRIES;
 	self->frames[frameIndex] = time;
 	self->frames[frameIndex + IKCONSTRAINT_MIX] = mix;
 	self->frames[frameIndex + IKCONSTRAINT_BEND_DIRECTION] = (float)bendDirection;
+	self->frames[frameIndex + IKCONSTRAINT_STRETCH] = stretch ? 1 : 0;
 }
 
 /**/
@@ -1435,6 +1463,7 @@ void _spTransformConstraintTimeline_apply (const spTimeline* timeline, spSkeleto
 	UNUSED(lastTime);
 	UNUSED(firedEvents);
 	UNUSED(eventsCount);
+	UNUSED(direction);
 }
 
 int _spTransformConstraintTimeline_getPropertyId (const spTimeline* timeline) {
@@ -1506,6 +1535,7 @@ void _spPathConstraintPositionTimeline_apply(const spTimeline* timeline, spSkele
 	UNUSED(lastTime);
 	UNUSED(firedEvents);
 	UNUSED(eventsCount);
+	UNUSED(direction);
 }
 
 int _spPathConstraintPositionTimeline_getPropertyId (const spTimeline* timeline) {
@@ -1574,6 +1604,7 @@ void _spPathConstraintSpacingTimeline_apply(const spTimeline* timeline, spSkelet
 	UNUSED(lastTime);
 	UNUSED(firedEvents);
 	UNUSED(eventsCount);
+	UNUSED(direction);
 }
 
 int _spPathConstraintSpacingTimeline_getPropertyId (const spTimeline* timeline) {
@@ -1653,6 +1684,7 @@ void _spPathConstraintMixTimeline_apply(const spTimeline* timeline, spSkeleton*
 	UNUSED(lastTime);
 	UNUSED(firedEvents);
 	UNUSED(eventsCount);
+	UNUSED(direction);
 }
 
 int _spPathConstraintMixTimeline_getPropertyId (const spTimeline* timeline) {

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

@@ -516,6 +516,7 @@ void _spAnimationState_applyRotateTimeline (spAnimationState* self, spTimeline*
 	float percent;
 	float total, diff;
 	int /*boolean*/ current, dir;
+	UNUSED(self);
 
 	if (firstFrame) timelinesRotation[i] = 0;
 

+ 23 - 13
spine-c/spine-c/src/spine/IkConstraint.c

@@ -39,6 +39,7 @@ spIkConstraint *spIkConstraint_create(spIkConstraintData *data, const spSkeleton
 	spIkConstraint *self = NEW(spIkConstraint);
 	CONST_CAST(spIkConstraintData*, self->data) = data;
 	self->bendDirection = data->bendDirection;
+	self->stretch = data->stretch;
 	self->mix = data->mix;
 
 	self->bonesCount = self->data->bonesCount;
@@ -58,17 +59,17 @@ void spIkConstraint_dispose(spIkConstraint *self) {
 void spIkConstraint_apply(spIkConstraint *self) {
 	switch (self->bonesCount) {
 		case 1:
-			spIkConstraint_apply1(self->bones[0], self->target->worldX, self->target->worldY, self->mix);
+			spIkConstraint_apply1(self->bones[0], self->target->worldX, self->target->worldY, self->stretch, self->mix);
 			break;
 		case 2:
-			spIkConstraint_apply2(self->bones[0], self->bones[1], self->target->worldX, self->target->worldY, self->bendDirection, self->mix);
+			spIkConstraint_apply2(self->bones[0], self->bones[1], self->target->worldX, self->target->worldY, self->bendDirection, self->stretch, self->mix);
 			break;
 	}
 }
 
-void spIkConstraint_apply1 (spBone* bone, float targetX, float targetY, float alpha) {
+void spIkConstraint_apply1 (spBone* bone, float targetX, float targetY, int /*boolean*/ stretch, float alpha) {
 	spBone* p = bone->parent;
-	float id, x, y, tx, ty, rotationIK;
+	float id, x, y, tx, ty, rotationIK, sx;
 	if (!bone->appliedValid) spBone_updateAppliedTransform(bone);
 	id = 1 / (p->a * p->d - p->b * p->c);
 	x = targetX - p->worldX, y = targetY - p->worldY;
@@ -77,16 +78,21 @@ void spIkConstraint_apply1 (spBone* bone, float targetX, float targetY, float al
 	if (bone->ascaleX < 0) rotationIK += 180;
 	if (rotationIK > 180) rotationIK -= 360;
 	else if (rotationIK < -180) rotationIK += 360;
-	spBone_updateWorldTransformWith(bone, bone->ax, bone->ay, bone->arotation + rotationIK * alpha, bone->ascaleX,
+	sx = bone->ascaleX;
+	if (stretch) {
+		float b = bone->data->length * sx, dd = SQRT(tx * tx + ty * ty);
+		if (dd > b && b > 0.0001f) sx *= (dd / b - 1) * alpha - 1;
+	}
+	spBone_updateWorldTransformWith(bone, bone->ax, bone->ay, bone->arotation + rotationIK * alpha, sx,
 		bone->ascaleY, bone->ashearX, bone->ashearY);
 }
 
-void spIkConstraint_apply2 (spBone* parent, spBone* child, float targetX, float targetY, int bendDir, float alpha) {
-	float px, py, psx, psy;
+void spIkConstraint_apply2 (spBone* parent, spBone* child, float targetX, float targetY, int bendDir, int /*boolean*/ stretch, float alpha) {
+	float px, py, psx, sx, psy;
 	float cx, cy, csx, cwx, cwy;
 	int o1, o2, s2, u;
 	spBone* pp = parent->parent;
-	float tx, ty, dx, dy, l1, l2, a1, a2, r;
+	float tx, ty, dd, dx, dy, l1, l2, a1, a2, r;
 	float id, x, y;
 	if (alpha == 0) {
 		spBone_updateWorldTransform(child);
@@ -94,7 +100,7 @@ void spIkConstraint_apply2 (spBone* parent, spBone* child, float targetX, float
 	}
 	if (!parent->appliedValid) spBone_updateAppliedTransform(parent);
 	if (!child->appliedValid) spBone_updateAppliedTransform(child);
-	px = parent->ax; py = parent->ay; psx = parent->ascaleX; psy = parent->ascaleY; csx = child->ascaleX;
+	px = parent->ax; py = parent->ay; psx = parent->ascaleX; sx = psx; psy = parent->ascaleY; csx = child->ascaleX;
 	if (psx < 0) {
 		psx = -psx;
 		o1 = 180;
@@ -129,6 +135,7 @@ void spIkConstraint_apply2 (spBone* parent, spBone* child, float targetX, float
 	y = targetY - pp->worldY;
 	tx = (x * pp->d - y * pp->b) * id - px;
 	ty = (y * pp->a - x * pp->c) * id - py;
+	dd = tx * tx + ty * ty;
 	x = cwx - pp->worldX;
 	y = cwy - pp->worldY;
 	dx = (x * pp->d - y * pp->b) * id - px;
@@ -138,16 +145,19 @@ void spIkConstraint_apply2 (spBone* parent, spBone* child, float targetX, float
 	if (u) {
 		float cosine, a, b;
 		l2 *= psx;
-		cosine = (tx * tx + ty * ty - l1 * l1 - l2 * l2) / (2 * l1 * l2);
+		cosine = (dd - l1 * l1 - l2 * l2) / (2 * l1 * l2);
 		if (cosine < -1) cosine = -1;
-		else if (cosine > 1) cosine = 1;
+		else if (cosine > 1) {
+			cosine = 1;
+			if (stretch && l1 + l2 > 0.0001f) sx *= (SQRT(dd) / (l1 + l2) - 1) * alpha + 1;
+		}
 		a2 = ACOS(cosine) * bendDir;
 		a = l1 + l2 * cosine;
 		b = l2 * SIN(a2);
 		a1 = ATAN2(ty * a - tx * b, tx * a + ty * b);
 	} else {
 		float a = psx * l2, b = psy * l2;
-		float aa = a * a, bb = b * b, ll = l1 * l1, dd = tx * tx + ty * ty, ta = ATAN2(ty, tx);
+		float aa = a * a, bb = b * b, ll = l1 * l1, ta = ATAN2(ty, tx);
 		float c0 = bb * ll + aa * dd - aa * bb, c1 = -2 * bb * l1, c2 = bb - aa;
 		float d = c1 * c1 - 4 * c2 * c0;
 		if (d >= 0) {
@@ -199,7 +209,7 @@ void spIkConstraint_apply2 (spBone* parent, spBone* child, float targetX, float
 		a1 = (a1 - os) * RAD_DEG + o1 - parent->arotation;
 		if (a1 > 180) a1 -= 360;
 		else if (a1 < -180) a1 += 360;
-		spBone_updateWorldTransformWith(parent, px, py, parent->rotation + a1 * alpha, parent->ascaleX, parent->ascaleY, 0, 0);
+		spBone_updateWorldTransformWith(parent, px, py, parent->rotation + a1 * alpha, sx, parent->ascaleY, 0, 0);
 		a2 = ((a2 + os) * RAD_DEG - child->ashearX) * s2 + o2 - child->arotation;
 		if (a2 > 180) a2 -= 360;
 		else if (a2 < -180) a2 += 360;

+ 1 - 0
spine-c/spine-c/src/spine/IkConstraintData.c

@@ -35,6 +35,7 @@ spIkConstraintData* spIkConstraintData_create (const char* name) {
 	spIkConstraintData* self = NEW(spIkConstraintData);
 	MALLOC_STR(self->name, name);
 	self->bendDirection = 1;
+	self->stretch = 0;
 	self->mix = 1;
 	return self;
 }

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

@@ -82,6 +82,7 @@ void spPathConstraint_apply (spPathConstraint* self) {
 	int/*bool*/tip;
 	float rotateMix = self->rotateMix, translateMix = self->translateMix;
 	int/*bool*/ translate = translateMix > 0, rotate = rotateMix > 0;
+	int lengthSpacing;
 	spPathAttachment* attachment = (spPathAttachment*)self->target->attachment;
 	spPathConstraintData* data = self->data;
 	int percentSpacing = data->spacingMode == SP_SPACING_MODE_PERCENT;
@@ -112,7 +113,7 @@ void spPathConstraint_apply (spPathConstraint* self) {
 			}
 			lengths = self->lengths;
 		}
-		int lengthSpacing = data->spacingMode == SP_SPACING_MODE_LENGTH;
+		lengthSpacing = data->spacingMode == SP_SPACING_MODE_LENGTH;
 		for (i = 0, n = spacesCount - 1; i < n;) {
 			spBone *bone = bones[i];
 			setupLength = bone->data->length;

+ 1 - 0
spine-c/spine-c/src/spine/Skeleton.c

@@ -436,6 +436,7 @@ void spSkeleton_setBonesToSetupPose (const spSkeleton* self) {
 	for (i = 0; i < self->ikConstraintsCount; ++i) {
 		spIkConstraint* ikConstraint = self->ikConstraints[i];
 		ikConstraint->bendDirection = ikConstraint->data->bendDirection;
+		ikConstraint->stretch = ikConstraint->data->stretch;
 		ikConstraint->mix = ikConstraint->data->mix;
 	}
 

+ 3 - 1
spine-c/spine-c/src/spine/SkeletonBinary.c

@@ -392,7 +392,8 @@ static spAnimation* _spSkeletonBinary_readAnimation (spSkeletonBinary* self, con
 			float time = readFloat(input);
 			float mix = readFloat(input);
 			signed char bendDirection = readSByte(input);
-			spIkConstraintTimeline_setFrame(timeline, frameIndex, time, mix, bendDirection);
+			int stretch = readBoolean(input);
+			spIkConstraintTimeline_setFrame(timeline, frameIndex, time, mix, bendDirection, stretch);
 			if (frameIndex < frameCount - 1) readCurve(input, SUPER(timeline), frameIndex);
 		}
 		spTimelineArray_add(timelines, (spTimeline*)timeline);
@@ -957,6 +958,7 @@ spSkeletonData* spSkeletonBinary_readSkeletonData (spSkeletonBinary* self, const
 		data->target = skeletonData->bones[readVarint(input, 1)];
 		data->mix = readFloat(input);
 		data->bendDirection = readSByte(input);
+		data->stretch = readBoolean(input);
 		skeletonData->ikConstraints[i] = data;
 	}
 

+ 1 - 0
spine-c/spine-c/src/spine/SkeletonClipping.c

@@ -310,4 +310,5 @@ void spSkeletonClipping_clipTriangles(spSkeletonClipping* self, float* vertices,
 			}
 		}
 	}
+	UNUSED(verticesLength);
 }

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

@@ -299,7 +299,7 @@ static spAnimation* _spSkeletonJson_readAnimation (spSkeletonJson* self, Json* r
 		}
 		for (valueMap = constraintMap->child, frameIndex = 0; valueMap; valueMap = valueMap->next, ++frameIndex) {
 			spIkConstraintTimeline_setFrame(timeline, frameIndex, Json_getFloat(valueMap, "time", 0), Json_getFloat(valueMap, "mix", 1),
-					Json_getInt(valueMap, "bendPositive", 1) ? 1 : -1);
+					Json_getInt(valueMap, "bendPositive", 1) ? 1 : -1, Json_getInt(valueMap, "stretch", 0) ? 1 : 0);
 			readCurve(valueMap, SUPER(timeline), frameIndex);
 		}
 		animation->timelines[animation->timelinesCount++] = SUPER_CAST(spTimeline, timeline);
@@ -737,6 +737,7 @@ spSkeletonData* spSkeletonJson_readSkeletonData (spSkeletonJson* self, const cha
 			}
 
 			data->bendDirection = Json_getInt(constraintMap, "bendPositive", 1) ? 1 : -1;
+			data->stretch = Json_getInt(constraintMap, "stretch", 0) ? 1 : 0;
 			data->mix = Json_getFloat(constraintMap, "mix", 1);
 
 			skeletonData->ikConstraints[i] = data;

+ 12 - 0
spine-c/spine-c/src/spine/VertexEffect.c

@@ -32,6 +32,8 @@
 #include <spine/extension.h>
 
 void _spJitterVertexEffect_begin(spVertexEffect* self, spSkeleton* skeleton) {
+	UNUSED(self);
+	UNUSED(skeleton);
 }
 
 void _spJitterVertexEffect_transform(spVertexEffect* self, float* x, float* y, float* u, float* v, spColor* light, spColor* dark) {
@@ -40,9 +42,14 @@ void _spJitterVertexEffect_transform(spVertexEffect* self, float* x, float* y, f
 	float jitterY = internal->jitterY;
 	(*x) += _spMath_randomTriangular(-jitterX, jitterY);
 	(*y) += _spMath_randomTriangular(-jitterX, jitterY);
+	UNUSED(u);
+	UNUSED(v);
+	UNUSED(light);
+	UNUSED(dark);
 }
 
 void _spJitterVertexEffect_end(spVertexEffect* self) {
+	UNUSED(self);
 }
 
 spJitterVertexEffect* spJitterVertexEffect_create(float jitterX, float jitterY) {
@@ -78,6 +85,11 @@ void _spSwirlVertexEffect_transform(spVertexEffect* self, float* positionX, floa
 		(*positionX) = cosine * x - sine * y + internal->worldX;
 		(*positionY) = sine * x + cosine * y + internal->worldY;
 	}
+	UNUSED(self);
+	UNUSED(u);
+	UNUSED(v);
+	UNUSED(light);
+	UNUSED(dark);
 }
 
 void _spSwirlVertexEffect_end(spVertexEffect* self) {

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 171
spine-cocos2d-objc/Resources/coin-pro.json


BIN
spine-cocos2d-objc/Resources/coin.png


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 1212
spine-cocos2d-objc/Resources/goblins-pro.json


BIN
spine-cocos2d-objc/Resources/goblins.png


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 694
spine-cocos2d-objc/Resources/raptor-pro.json


BIN
spine-cocos2d-objc/Resources/raptor.png


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 1880
spine-cocos2d-objc/Resources/spineboy-ess.json


BIN
spine-cocos2d-objc/Resources/spineboy.png


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 5022
spine-cocos2d-objc/Resources/tank-pro.json


BIN
spine-cocos2d-objc/Resources/tank.png


BIN
spine-cocos2dx/example/Resources/common/coin-pro.skel


BIN
spine-cocos2dx/example/Resources/common/coin.png


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 1212
spine-cocos2dx/example/Resources/common/goblins-pro.json


BIN
spine-cocos2dx/example/Resources/common/goblins.png


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 694
spine-cocos2dx/example/Resources/common/raptor-pro.json


BIN
spine-cocos2dx/example/Resources/common/raptor.png


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 1880
spine-cocos2dx/example/Resources/common/spineboy-ess.json


BIN
spine-cocos2dx/example/Resources/common/spineboy.png


Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels