From 532230f0fcbd1ac12bef476a50a5fa10e9cf9766 Mon Sep 17 00:00:00 2001 From: pinguin999 Date: Thu, 25 Sep 2014 19:00:38 +0200 Subject: [PATCH 01/13] FIX Memory access after free --- spine-sfml/src/spine/spine-sfml.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spine-sfml/src/spine/spine-sfml.cpp b/spine-sfml/src/spine/spine-sfml.cpp index 4543ebf84..b5b5b06de 100644 --- a/spine-sfml/src/spine/spine-sfml.cpp +++ b/spine-sfml/src/spine/spine-sfml.cpp @@ -81,8 +81,8 @@ SkeletonDrawable::SkeletonDrawable (SkeletonData* skeletonData, AnimationStateDa SkeletonDrawable::~SkeletonDrawable () { delete vertexArray; FREE(worldVertices); + if (ownsAnimationStateData) AnimationStateData_dispose(state->data); AnimationState_dispose(state); - if (ownsAnimationStateData) AnimationStateData_dispose(state->data); Skeleton_dispose(skeleton); } From 92c8dcea132b8583f591cf17a78580c337c84179 Mon Sep 17 00:00:00 2001 From: pinguin999 Date: Thu, 25 Sep 2014 19:00:57 +0200 Subject: [PATCH 02/13] FIX struct definition --- spine-c/include/spine/SkeletonData.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spine-c/include/spine/SkeletonData.h b/spine-c/include/spine/SkeletonData.h index 1c9822fe4..e6c46ec95 100644 --- a/spine-c/include/spine/SkeletonData.h +++ b/spine-c/include/spine/SkeletonData.h @@ -42,7 +42,7 @@ extern "C" { #endif -typedef struct { +typedef struct spSkeletonData{ const char* version; const char* hash; float width, height; From 7f6d91f90a3452469afdd33395b62c1670cd657f Mon Sep 17 00:00:00 2001 From: pinguin999 Date: Mon, 29 Sep 2014 15:11:31 +0200 Subject: [PATCH 03/13] strict compile init the struct before use --- spine-c/src/spine/Atlas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spine-c/src/spine/Atlas.c b/spine-c/src/spine/Atlas.c index d51cc945a..5aa3dcc43 100644 --- a/spine-c/src/spine/Atlas.c +++ b/spine-c/src/spine/Atlas.c @@ -120,7 +120,7 @@ static int readValue (const char* end, Str* str) { /* Returns the number of tuple values read (1, 2, 4, or 0 for failure). */ static int readTuple (const char* end, Str tuple[]) { int i; - Str str; + Str str = {NULL, NULL}; readLine(0, end, &str); if (!beginPast(&str, ':')) return 0; From ecaea3ae12d08f66b428edc33a32e4c3c5857fe6 Mon Sep 17 00:00:00 2001 From: Randolph Burt Date: Tue, 25 Nov 2014 16:54:09 +0000 Subject: [PATCH 04/13] Fix goblin skeleton file references after file rename (Xamarin iOS) --- .../example/spine-monogame-example.csproj | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/spine-monogame/xamarinstudio-ios/example/spine-monogame-example.csproj b/spine-monogame/xamarinstudio-ios/example/spine-monogame-example.csproj index 36a06a50b..cb6a04c2e 100644 --- a/spine-monogame/xamarinstudio-ios/example/spine-monogame-example.csproj +++ b/spine-monogame/xamarinstudio-ios/example/spine-monogame-example.csproj @@ -112,15 +112,6 @@ - - data\goblins-ffd.atlas - - - data\goblins-ffd.json - - - data\goblins-ffd.png - data\raptor.atlas @@ -139,5 +130,14 @@ data\spineboy.png + + data\goblins-mesh.png + + + data\goblins-mesh.json + + + data\goblins-mesh.atlas + \ No newline at end of file From 99c02820477dbb7af8f97a1c884701e91aef918e Mon Sep 17 00:00:00 2001 From: RandolphBurt Date: Tue, 25 Nov 2014 17:07:45 +0000 Subject: [PATCH 05/13] Fix goblin skeleton file references after file rename (Visual Studio Windows) --- .../example/spine-monogame-example.csproj | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/spine-monogame/windows8-store/example/spine-monogame-example.csproj b/spine-monogame/windows8-store/example/spine-monogame-example.csproj index 6f48c20ba..a4ca8f6f5 100644 --- a/spine-monogame/windows8-store/example/spine-monogame-example.csproj +++ b/spine-monogame/windows8-store/example/spine-monogame-example.csproj @@ -139,11 +139,8 @@ Designer - - Assets\goblins-ffd.atlas - - - Assets\goblins-ffd.json + + Assets\goblins-mesh.png Assets\raptor.png @@ -156,9 +153,6 @@ - - Assets\goblins-ffd.png - Assets\spineboy.png @@ -184,6 +178,14 @@ Assets\raptor.json + + + Assets\goblins-mesh.atlas + + + Assets\goblins-mesh.json + + 11.0 From 18584fc4963c9c09902a1390b491387f8e5e78fc Mon Sep 17 00:00:00 2001 From: Dario Segura Date: Mon, 1 Dec 2014 14:58:17 -0500 Subject: [PATCH 06/13] -[JAVASCRIPT] Atlas attachment loader was using the name as the path instead of the path passed to it. It would throw an exception using the path to report the error, making it extremely confusing. --- spine-js/spine.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spine-js/spine.js b/spine-js/spine.js index d17c546a1..24deaad8d 100644 --- a/spine-js/spine.js +++ b/spine-js/spine.js @@ -2425,7 +2425,7 @@ spine.AtlasAttachmentLoader = function (atlas) { }; spine.AtlasAttachmentLoader.prototype = { newRegionAttachment: function (skin, name, path) { - var region = this.atlas.findRegion(name); + var region = this.atlas.findRegion(path); if (!region) throw "Region not found in atlas: " + path + " (region attachment: " + name + ")"; var attachment = new spine.RegionAttachment(name); attachment.rendererObject = region; @@ -2439,7 +2439,7 @@ spine.AtlasAttachmentLoader.prototype = { return attachment; }, newMeshAttachment: function (skin, name, path) { - var region = this.atlas.findRegion(name); + var region = this.atlas.findRegion(path); if (!region) throw "Region not found in atlas: " + path + " (mesh attachment: " + name + ")"; var attachment = new spine.MeshAttachment(name); attachment.rendererObject = region; @@ -2457,7 +2457,7 @@ spine.AtlasAttachmentLoader.prototype = { return attachment; }, newSkinnedMeshAttachment: function (skin, name, path) { - var region = this.atlas.findRegion(name); + var region = this.atlas.findRegion(path); if (!region) throw "Region not found in atlas: " + path + " (skinned mesh attachment: " + name + ")"; var attachment = new spine.SkinnedMeshAttachment(name); attachment.rendererObject = region; From 01ba46ff0e6c1a9d1e8a68b558447aa29d6f2d3b Mon Sep 17 00:00:00 2001 From: Sebastien Flory Date: Tue, 16 Dec 2014 10:02:46 +0100 Subject: [PATCH 07/13] Fix issue with HitTest Hi, I dont think you need to apply the scales here because it will be done automatically by the framework (the localPoint is already transformed in the locales coordinates) Have a nice day! Seb --- .../spine-starling/src/spine/starling/SkeletonSprite.as | 4 ---- 1 file changed, 4 deletions(-) diff --git a/spine-starling/spine-starling/src/spine/starling/SkeletonSprite.as b/spine-starling/spine-starling/src/spine/starling/SkeletonSprite.as index aeec9bde9..9ac1e58fc 100644 --- a/spine-starling/spine-starling/src/spine/starling/SkeletonSprite.as +++ b/spine-starling/spine-starling/src/spine/starling/SkeletonSprite.as @@ -250,10 +250,6 @@ public class SkeletonSprite extends DisplayObject { } } - minX *= scaleX; - maxX *= scaleX; - minY *= scaleY; - maxY *= scaleY; var temp:Number; if (maxX < minX) { temp = maxX; From 4c0321626b8ad359d9947274f7c027ce92915f7f Mon Sep 17 00:00:00 2001 From: Piotr Paczkowski Date: Sat, 17 Jan 2015 00:03:05 +0100 Subject: [PATCH 08/13] Fix buffer overflow when JSON Skeleton produces Error --- spine-c/src/spine/SkeletonJson.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spine-c/src/spine/SkeletonJson.c b/spine-c/src/spine/SkeletonJson.c index 366fe3186..8e2b1280e 100644 --- a/spine-c/src/spine/SkeletonJson.c +++ b/spine-c/src/spine/SkeletonJson.c @@ -65,7 +65,7 @@ void _spSkeletonJson_setError (spSkeletonJson* self, Json* root, const char* val FREE(self->error); strcpy(message, value1); length = (int)strlen(value1); - if (value2) strncat(message + length, value2, 256 - length); + if (value2) strncat(message + length, value2, 255 - length); MALLOC_STR(self->error, message); if (root) Json_dispose(root); } From 4cb8c2b6bb317d1c18f277b63916cf0273d66471 Mon Sep 17 00:00:00 2001 From: Nate Heagy Date: Wed, 21 Jan 2015 14:22:55 -0600 Subject: [PATCH 09/13] Fixing links to examples --- spine-cocos2d-iphone/2/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spine-cocos2d-iphone/2/README.md b/spine-cocos2d-iphone/2/README.md index 86a96c256..16c693f82 100644 --- a/spine-cocos2d-iphone/2/README.md +++ b/spine-cocos2d-iphone/2/README.md @@ -12,8 +12,8 @@ Alternatively, the contents of the `spine-c/src`, `spine-c/include` and `spine-c ## Examples -[Spineboy](https://github.com/EsotericSoftware/spine-runtimes/blob/master/spine-cocos2d-iphone/2/example/SpineboyExample.cpp) -[Golbins](https://github.com/EsotericSoftware/spine-runtimes/blob/master/spine-cocos2d-iphone/2/example/GoblinsExample.cpp) +[Spineboy](https://github.com/EsotericSoftware/spine-runtimes/blob/master/spine-cocos2d-iphone/2/example/SpineboyExample.m) +[Golbins](https://github.com/EsotericSoftware/spine-runtimes/blob/master/spine-cocos2d-iphone/2/example/GoblinsExample.m) ## Links From 01c767bae9cb023dd3af7c3a464e23b7b3640fb6 Mon Sep 17 00:00:00 2001 From: Nate Heagy Date: Thu, 22 Jan 2015 19:53:59 -0600 Subject: [PATCH 10/13] Readme fixes - directory has been changed from 3.0 to just 3 - the example objective-c files end in .m not .cpp - the runtime requires CCRenderer, which I believe is only available in 3.1+ --- spine-cocos2d-iphone/3/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spine-cocos2d-iphone/3/README.md b/spine-cocos2d-iphone/3/README.md index f0f99c7bf..121db8e23 100644 --- a/spine-cocos2d-iphone/3/README.md +++ b/spine-cocos2d-iphone/3/README.md @@ -5,15 +5,15 @@ The spine-cocos2d-iphone runtime provides functionality to load, manipulate and ## Setup 1. Download the Spine Runtimes source using [git](https://help.github.com/articles/set-up-git) or by downloading it [as a zip](https://github.com/EsotericSoftware/spine-runtimes/archive/master.zip). -1. Place the contents of a cocos2d version 3.0.x distribution into the `spine-cocos2d-iphone/3.0/cocos2d` directory. -1. Open the XCode project file for iOS or Mac from the `spine-cocos2d-iphone/3.0` directory. +1. Place the contents of a cocos2d version 3.1 (or higher) distribution into the `spine-cocos2d-iphone/3/cocos2d` directory. +1. Open the Xcode project file for iOS or Mac from the `spine-cocos2d-iphone/3` directory. -Alternatively, the contents of the `spine-c/src`, `spine-c/include` and `spine-cocos2d-iphone/3.0/src` directories can be copied into your project. Be sure your header search path will find the contents of the `spine-c/include` and `spine-cocos2d-iphone/3.0/src` directories. Note that the includes use `spine/Xxx.h`, so the `spine` directory cannot be omitted when copying the files. +Alternatively, the contents of the `spine-c/src`, `spine-c/include` and `spine-cocos2d-iphone/3/src` directories can be copied into your project. Be sure your header search path will find the contents of the `spine-c/include` and `spine-cocos2d-iphone/3/src` directories. Note that the includes use `spine/Xxx.h`, so the `spine` directory cannot be omitted when copying the files. ## Examples -[Spineboy](https://github.com/EsotericSoftware/spine-runtimes/blob/master/spine-cocos2d-iphone/3.0/example/SpineboyExample.cpp) -[Golbins](https://github.com/EsotericSoftware/spine-runtimes/blob/master/spine-cocos2d-iphone/3.0/example/GoblinsExample.cpp) +[Spineboy](https://github.com/EsotericSoftware/spine-runtimes/blob/master/spine-cocos2d-iphone/3/example/SpineboyExample.m) +[Golbins](https://github.com/EsotericSoftware/spine-runtimes/blob/master/spine-cocos2d-iphone/3/example/GoblinsExample.m) ## Links From 6ecf8ef695cd6316a2f1c18de69a68edd4da04d7 Mon Sep 17 00:00:00 2001 From: Tadas Miceika Date: Thu, 5 Feb 2015 11:09:46 +0200 Subject: [PATCH 11/13] fix compiling --- spine-c/src/spine/IkConstraint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spine-c/src/spine/IkConstraint.c b/spine-c/src/spine/IkConstraint.c index f73650598..13d9dda43 100644 --- a/spine-c/src/spine/IkConstraint.c +++ b/spine-c/src/spine/IkConstraint.c @@ -70,7 +70,7 @@ void spIkConstraint_apply1 (spBone* bone, float targetX, float targetY, float al float parentRotation = (!bone->data->inheritRotation || !bone->parent) ? 0 : bone->parent->worldRotation; float rotation = bone->rotation; float rotationIK = ATAN2(targetY - bone->worldY, targetX - bone->worldX) * RAD_DEG; - if (bone->worldFlipX != (bone->worldFlipY != Bone_isYDown())) rotationIK = -rotationIK; + if (bone->worldFlipX != (bone->worldFlipY != spBone_isYDown())) rotationIK = -rotationIK; rotationIK -= parentRotation; bone->rotationIK = rotation + (rotationIK - rotation) * alpha; } From e85c1b49a009b5c267418f9f170ee9d8bff0a9d7 Mon Sep 17 00:00:00 2001 From: John Date: Sat, 7 Feb 2015 03:06:57 +0800 Subject: [PATCH 12/13] Unnoticeably faster frontFacing SkeletonRenderer Cached slot.bone to remove 3 dereferences. --- spine-unity/Assets/spine-unity/SkeletonRenderer.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spine-unity/Assets/spine-unity/SkeletonRenderer.cs b/spine-unity/Assets/spine-unity/SkeletonRenderer.cs index d200de45c..df7b6d15f 100644 --- a/spine-unity/Assets/spine-unity/SkeletonRenderer.cs +++ b/spine-unity/Assets/spine-unity/SkeletonRenderer.cs @@ -417,7 +417,8 @@ public class SkeletonRenderer : MonoBehaviour { for (int i = startSlot, triangleIndex = 0; i < endSlot; i++) { Slot slot = drawOrder[i]; Attachment attachment = slot.attachment; - bool flip = frontFacing && ((slot.Bone.WorldFlipX != slot.Bone.WorldFlipY) != (Mathf.Sign(slot.Bone.WorldScaleX) != Mathf.Sign(slot.bone.WorldScaleY))); + Bone bone = slot.bone; + bool flip = frontFacing && ((bone.WorldFlipX != bone.WorldFlipY) != (Mathf.Sign(bone.WorldScaleX) != Mathf.Sign(bone.WorldScaleY))); if (attachment is RegionAttachment) { if (!flip) { From db0ec554ce1de6c02f18994952ec3e7f8ac6bc9b Mon Sep 17 00:00:00 2001 From: Charilaos Kalogirou Date: Sun, 8 Feb 2015 11:54:37 +0200 Subject: [PATCH 13/13] return the proper local for the module --- spine-lua/SkinnedMeshAttachment.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spine-lua/SkinnedMeshAttachment.lua b/spine-lua/SkinnedMeshAttachment.lua index 1f4163939..e69135781 100644 --- a/spine-lua/SkinnedMeshAttachment.lua +++ b/spine-lua/SkinnedMeshAttachment.lua @@ -128,4 +128,4 @@ function SkinnedMeshAttachment.new (name) return self end -return MeshAttachment +return SkinnedMeshAttachment