From 6441bd93b6aff1f2c48c570c1447840c3e7d295b Mon Sep 17 00:00:00 2001 From: NathanSweet Date: Wed, 25 Sep 2013 12:17:53 +0200 Subject: [PATCH] Wasn't using drawOrder. --- spine-cocos2d-iphone/src/spine/CCSkeleton.m | 4 ++-- spine-cocos2dx/src/spine/CCSkeleton.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spine-cocos2d-iphone/src/spine/CCSkeleton.m b/spine-cocos2d-iphone/src/spine/CCSkeleton.m index 97a370a5a..ceb2731f8 100644 --- a/spine-cocos2d-iphone/src/spine/CCSkeleton.m +++ b/spine-cocos2d-iphone/src/spine/CCSkeleton.m @@ -154,7 +154,7 @@ quad.bl.vertices.z = 0; quad.br.vertices.z = 0; for (int i = 0, n = _skeleton->slotCount; i < n; i++) { - Slot* slot = _skeleton->slots[i]; + Slot* slot = _skeleton->drawOrder[i]; if (!slot->attachment || slot->attachment->type != ATTACHMENT_REGION) continue; RegionAttachment* attachment = (RegionAttachment*)slot->attachment; CCTextureAtlas* regionTextureAtlas = [self getTextureAtlas:attachment]; @@ -182,7 +182,7 @@ CGPoint points[4]; ccV3F_C4B_T2F_Quad quad; for (int i = 0, n = _skeleton->slotCount; i < n; i++) { - Slot* slot = _skeleton->slots[i]; + Slot* slot = _skeleton->drawOrder[i]; if (!slot->attachment || slot->attachment->type != ATTACHMENT_REGION) continue; RegionAttachment* attachment = (RegionAttachment*)slot->attachment; RegionAttachment_updateQuad(attachment, slot, &quad, _premultipliedAlpha); diff --git a/spine-cocos2dx/src/spine/CCSkeleton.cpp b/spine-cocos2dx/src/spine/CCSkeleton.cpp index fa15bae97..b3b2f5130 100644 --- a/spine-cocos2dx/src/spine/CCSkeleton.cpp +++ b/spine-cocos2dx/src/spine/CCSkeleton.cpp @@ -147,7 +147,7 @@ void CCSkeleton::draw () { quad.bl.vertices.z = 0; quad.br.vertices.z = 0; for (int i = 0, n = skeleton->slotCount; i < n; i++) { - Slot* slot = skeleton->slots[i]; + Slot* slot = skeleton->drawOrder[i]; if (!slot->attachment || slot->attachment->type != ATTACHMENT_REGION) continue; RegionAttachment* attachment = (RegionAttachment*)slot->attachment; CCTextureAtlas* regionTextureAtlas = getTextureAtlas(attachment); @@ -175,7 +175,7 @@ void CCSkeleton::draw () { CCPoint points[4]; ccV3F_C4B_T2F_Quad quad; for (int i = 0, n = skeleton->slotCount; i < n; i++) { - Slot* slot = skeleton->slots[i]; + Slot* slot = skeleton->drawOrder[i]; if (!slot->attachment || slot->attachment->type != ATTACHMENT_REGION) continue; RegionAttachment* attachment = (RegionAttachment*)slot->attachment; RegionAttachment_updateQuad(attachment, slot, &quad);