From 0cc7258580f615cf522c8c66365bb10439290ac4 Mon Sep 17 00:00:00 2001 From: NathanSweet Date: Tue, 24 Sep 2013 16:12:51 +0200 Subject: [PATCH] spine-cocos2dx now compiles with latest spine-c. --- .../example/proj.win32/spine-cocos2dx.vcxproj | 4 ++++ .../proj.win32/spine-cocos2dx.vcxproj.filters | 12 ++++++++++++ spine-cocos2dx/src/spine/CCSkeleton.cpp | 2 +- spine-cocos2dx/src/spine/spine-cocos2dx.cpp | 2 +- 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/spine-cocos2dx/example/proj.win32/spine-cocos2dx.vcxproj b/spine-cocos2dx/example/proj.win32/spine-cocos2dx.vcxproj index 0605836d3..e2dcececc 100644 --- a/spine-cocos2dx/example/proj.win32/spine-cocos2dx.vcxproj +++ b/spine-cocos2dx/example/proj.win32/spine-cocos2dx.vcxproj @@ -133,9 +133,11 @@ + + @@ -161,10 +163,12 @@ + + diff --git a/spine-cocos2dx/example/proj.win32/spine-cocos2dx.vcxproj.filters b/spine-cocos2dx/example/proj.win32/spine-cocos2dx.vcxproj.filters index 697cef5e7..3942d94e5 100644 --- a/spine-cocos2dx/example/proj.win32/spine-cocos2dx.vcxproj.filters +++ b/spine-cocos2dx/example/proj.win32/spine-cocos2dx.vcxproj.filters @@ -93,6 +93,12 @@ Classes\spine-cocos2dx + + Classes\spine-c + + + Classes\spine-c + @@ -167,5 +173,11 @@ Classes\spine-cocos2dx + + Classes\spine-c + + + Classes\spine-c + \ No newline at end of file diff --git a/spine-cocos2dx/src/spine/CCSkeleton.cpp b/spine-cocos2dx/src/spine/CCSkeleton.cpp index 07995f049..fa15bae97 100644 --- a/spine-cocos2dx/src/spine/CCSkeleton.cpp +++ b/spine-cocos2dx/src/spine/CCSkeleton.cpp @@ -220,7 +220,7 @@ CCRect CCSkeleton::boundingBox () { Slot* slot = skeleton->slots[i]; if (!slot->attachment || slot->attachment->type != ATTACHMENT_REGION) continue; RegionAttachment* attachment = (RegionAttachment*)slot->attachment; - RegionAttachment_computeVertices(attachment, slot->skeleton->x, slot->skeleton->y, slot->bone, vertices); + RegionAttachment_computeWorldVertices(attachment, slot->skeleton->x, slot->skeleton->y, slot->bone, vertices); minX = min(minX, vertices[VERTEX_X1] * scaleX); minY = min(minY, vertices[VERTEX_Y1] * scaleY); maxX = max(maxX, vertices[VERTEX_X1] * scaleX); diff --git a/spine-cocos2dx/src/spine/spine-cocos2dx.cpp b/spine-cocos2dx/src/spine/spine-cocos2dx.cpp index ed24fad11..7cbe3886d 100644 --- a/spine-cocos2dx/src/spine/spine-cocos2dx.cpp +++ b/spine-cocos2dx/src/spine/spine-cocos2dx.cpp @@ -61,7 +61,7 @@ char* _Util_readFile (const char* path, int* length) { void RegionAttachment_updateQuad (RegionAttachment* self, Slot* slot, ccV3F_C4B_T2F_Quad* quad, bool premultipliedAlpha) { float vertices[8]; - RegionAttachment_computeVertices(self, slot->skeleton->x, slot->skeleton->y, slot->bone, vertices); + RegionAttachment_computeWorldVertices(self, slot->skeleton->x, slot->skeleton->y, slot->bone, vertices); GLubyte r = slot->skeleton->r * slot->r * 255; GLubyte g = slot->skeleton->g * slot->g * 255;