Refactored C++ runtime, added cocos2d-x cpp runtime.

This commit is contained in:
badlogic 2018-05-30 17:31:11 +02:00
parent 89f116ae82
commit 878a6e6435
165 changed files with 1276 additions and 1229 deletions

View File

@ -37,15 +37,19 @@
#include "BatchingExample.h" #include "BatchingExample.h"
#include "CoinExample.h" #include "CoinExample.h"
#include "SkeletonRendererSeparatorExample.h" #include "SkeletonRendererSeparatorExample.h"
#include <spine/Debug.h>
#include "AppMacros.h" #include "AppMacros.h"
USING_NS_CC; USING_NS_CC;
using namespace std; using namespace std;
DebugExtension debugExtension(SpineExtension::getInstance());
AppDelegate::AppDelegate () { AppDelegate::AppDelegate () {
} }
AppDelegate::~AppDelegate () { AppDelegate::~AppDelegate () {
debugExtension.reportLeaks();
} }
bool AppDelegate::applicationDidFinishLaunching () { bool AppDelegate::applicationDidFinishLaunching () {
@ -98,6 +102,9 @@ bool AppDelegate::applicationDidFinishLaunching () {
// set FPS. the default value is 1.0/60 if you don't call this // set FPS. the default value is 1.0/60 if you don't call this
director->setAnimationInterval(1.0f / 60); director->setAnimationInterval(1.0f / 60);
// Set the Debug wrapper extension so we know about memory leaks.
SpineExtension::setInstance(&debugExtension);
// create a scene. it's an autorelease object // create a scene. it's an autorelease object
//auto scene = RaptorExample::scene(); //auto scene = RaptorExample::scene();
auto scene = SkeletonRendererSeparatorExample::scene(); auto scene = SkeletonRendererSeparatorExample::scene();

View File

@ -46,24 +46,25 @@ bool BatchingExample::init () {
if (!LayerColor::initWithColor(Color4B(128, 128, 128, 255))) return false; if (!LayerColor::initWithColor(Color4B(128, 128, 128, 255))) return false;
// Load the texture atlas. // Load the texture atlas.
_atlas = spAtlas_createFromFile("spineboy.atlas", 0); Cocos2dTextureLoader textureLoader;
_atlas = new (__FILE__, __LINE__) Atlas("spineboy.atlas", &textureLoader);
CCASSERT(_atlas, "Error reading atlas file."); CCASSERT(_atlas, "Error reading atlas file.");
// This attachment loader configures attachments with data needed for cocos2d-x rendering. // This attachment loader configures attachments with data needed for cocos2d-x rendering.
// Do not dispose the attachment loader until the skeleton data is disposed! // Do not dispose the attachment loader until the skeleton data is disposed!
_attachmentLoader = (spAttachmentLoader*)Cocos2dAttachmentLoader_create(_atlas); _attachmentLoader = new (__FILE__, __LINE__) AtlasAttachmentLoader(_atlas);
// Load the skeleton data. // Load the skeleton data.
spSkeletonJson* json = spSkeletonJson_createWithLoader(_attachmentLoader); SkeletonJson* json = new (__FILE__, __LINE__) SkeletonJson(_attachmentLoader);
json->scale = 0.6f; // Resizes skeleton data to 60% of the size it was in Spine. json->setScale(0.6f); // Resizes skeleton data to 60% of the size it was in Spine.
_skeletonData = spSkeletonJson_readSkeletonDataFile(json, "spineboy-ess.json"); _skeletonData = json->readSkeletonDataFile("spineboy-ess.json");
CCASSERT(_skeletonData, json->error ? json->error : "Error reading skeleton data file."); CCASSERT(_skeletonData, json->getError().isEmpty() ? json->getError().buffer() : "Error reading skeleton data file.");
spSkeletonJson_dispose(json); delete json;
// Setup mix times. // Setup mix times.
_stateData = spAnimationStateData_create(_skeletonData); _stateData = new (__FILE__, __LINE__) AnimationStateData(_skeletonData);
spAnimationStateData_setMixByName(_stateData, "walk", "jump", 0.2f); _stateData->setMix("walk", "jump", 0.2f);
spAnimationStateData_setMixByName(_stateData, "jump", "run", 0.2f); _stateData->setMix("jump", "run", 0.2f);
int xMin = _contentSize.width * 0.10f, xMax = _contentSize.width * 0.90f; int xMin = _contentSize.width * 0.10f, xMax = _contentSize.width * 0.90f;
int yMin = 0, yMax = _contentSize.height * 0.7f; int yMin = 0, yMax = _contentSize.height * 0.7f;
@ -93,7 +94,7 @@ bool BatchingExample::init () {
scheduleUpdate(); scheduleUpdate();
EventListenerTouchOneByOne* listener = EventListenerTouchOneByOne::create(); EventListenerTouchOneByOne* listener = EventListenerTouchOneByOne::create();
listener->onTouchBegan = [this] (Touch* touch, Event* event) -> bool { listener->onTouchBegan = [this] (Touch* touch, cocos2d::Event* event) -> bool {
Director::getInstance()->replaceScene(SpineboyExample::scene()); Director::getInstance()->replaceScene(SpineboyExample::scene());
return true; return true;
}; };
@ -105,8 +106,9 @@ bool BatchingExample::init () {
BatchingExample::~BatchingExample () { BatchingExample::~BatchingExample () {
// SkeletonAnimation instances are cocos2d-x nodes and are disposed of automatically as normal, but the data created // SkeletonAnimation instances are cocos2d-x nodes and are disposed of automatically as normal, but the data created
// manually to be shared across multiple SkeletonAnimations needs to be disposed of manually. // manually to be shared across multiple SkeletonAnimations needs to be disposed of manually.
spSkeletonData_dispose(_skeletonData);
spAnimationStateData_dispose(_stateData); delete _skeletonData;
spAttachmentLoader_dispose(_attachmentLoader); delete _stateData;
spAtlas_dispose(_atlas); delete _attachmentLoader;
delete _atlas;
} }

View File

@ -34,6 +34,8 @@
#include "cocos2d.h" #include "cocos2d.h"
#include <spine/spine-cocos2dx.h> #include <spine/spine-cocos2dx.h>
using namespace spine;
class BatchingExample : public cocos2d::LayerColor { class BatchingExample : public cocos2d::LayerColor {
public: public:
static cocos2d::Scene* scene (); static cocos2d::Scene* scene ();
@ -44,10 +46,10 @@ public:
virtual bool init (); virtual bool init ();
protected: protected:
spAtlas* _atlas; Atlas* _atlas;
spAttachmentLoader* _attachmentLoader; AttachmentLoader* _attachmentLoader;
spSkeletonData* _skeletonData; SkeletonData* _skeletonData;
spAnimationStateData* _stateData; AnimationStateData* _stateData;
}; };
#endif // _BATCHINGEXAMPLE_H_ #endif // _BATCHINGEXAMPLE_H_

View File

@ -52,7 +52,7 @@ bool CoinExample::init () {
scheduleUpdate(); scheduleUpdate();
EventListenerTouchOneByOne* listener = EventListenerTouchOneByOne::create(); EventListenerTouchOneByOne* listener = EventListenerTouchOneByOne::create();
listener->onTouchBegan = [this] (Touch* touch, Event* event) -> bool { listener->onTouchBegan = [this] (Touch* touch, cocos2d::Event* event) -> bool {
if (!skeletonNode->getDebugBonesEnabled()) if (!skeletonNode->getDebugBonesEnabled())
skeletonNode->setDebugBonesEnabled(true); skeletonNode->setDebugBonesEnabled(true);
else if (skeletonNode->getTimeScale() == 1) else if (skeletonNode->getTimeScale() == 1)

View File

@ -53,7 +53,7 @@ bool GoblinsExample::init () {
scheduleUpdate(); scheduleUpdate();
EventListenerTouchOneByOne* listener = EventListenerTouchOneByOne::create(); EventListenerTouchOneByOne* listener = EventListenerTouchOneByOne::create();
listener->onTouchBegan = [this] (Touch* touch, Event* event) -> bool { listener->onTouchBegan = [this] (Touch* touch, cocos2d::Event* event) -> bool {
if (!skeletonNode->getDebugBonesEnabled()) if (!skeletonNode->getDebugBonesEnabled())
skeletonNode->setDebugBonesEnabled(true); skeletonNode->setDebugBonesEnabled(true);
else if (skeletonNode->getTimeScale() == 1) else if (skeletonNode->getTimeScale() == 1)

View File

@ -30,12 +30,14 @@
#include "RaptorExample.h" #include "RaptorExample.h"
#include "TankExample.h" #include "TankExample.h"
#include <spine/extension.h> #include <spine/Extension.h>
USING_NS_CC; USING_NS_CC;
using namespace spine; using namespace spine;
spSwirlVertexEffect* effect = spSwirlVertexEffect_create(400); PowInterpolation pow2(2);
PowOutInterpolation powOut2(2);
SwirlVertexEffect effect(400, powOut2);
Scene* RaptorExample::scene () { Scene* RaptorExample::scene () {
Scene *scene = Scene::create(); Scene *scene = Scene::create();
@ -48,14 +50,13 @@ bool RaptorExample::init () {
skeletonNode = SkeletonAnimation::createWithJsonFile("raptor-pro.json", "raptor.atlas", 0.5f); skeletonNode = SkeletonAnimation::createWithJsonFile("raptor-pro.json", "raptor.atlas", 0.5f);
skeletonNode->setAnimation(0, "walk", true); skeletonNode->setAnimation(0, "walk", true);
skeletonNode->setAnimation(1, "empty", false); skeletonNode->addAnimation(1, "gun-grab", false, 2);
skeletonNode->addAnimation(1, "gungrab", false, 2);
skeletonNode->setTwoColorTint(true); skeletonNode->setTwoColorTint(true);
effect->centerY = 200; effect.setCenterY(200);
swirlTime = 0; swirlTime = 0;
skeletonNode->setVertexEffect(&effect->super); skeletonNode->setVertexEffect(&effect);
skeletonNode->setPosition(Vec2(_contentSize.width / 2, 20)); skeletonNode->setPosition(Vec2(_contentSize.width / 2, 20));
addChild(skeletonNode); addChild(skeletonNode);
@ -63,7 +64,7 @@ bool RaptorExample::init () {
scheduleUpdate(); scheduleUpdate();
EventListenerTouchOneByOne* listener = EventListenerTouchOneByOne::create(); EventListenerTouchOneByOne* listener = EventListenerTouchOneByOne::create();
listener->onTouchBegan = [this] (Touch* touch, Event* event) -> bool { listener->onTouchBegan = [this] (Touch* touch, cocos2d::Event* event) -> bool {
if (!skeletonNode->getDebugBonesEnabled()) { if (!skeletonNode->getDebugBonesEnabled()) {
skeletonNode->setDebugBonesEnabled(true); skeletonNode->setDebugBonesEnabled(true);
skeletonNode->setDebugMeshesEnabled(true); skeletonNode->setDebugMeshesEnabled(true);
@ -80,7 +81,7 @@ bool RaptorExample::init () {
void RaptorExample::update(float fDelta) { void RaptorExample::update(float fDelta) {
swirlTime += fDelta; swirlTime += fDelta;
float percent = fmod(swirlTime, 2); float percent = spine::MathUtil::fmod(swirlTime, 2);
if (percent > 1) percent = 1 - (percent - 1); if (percent > 1) percent = 1 - (percent - 1);
effect->angle = _spMath_interpolate(_spMath_pow2_apply, -60, 60, percent); effect.setAngle(pow2.interpolate(-60.0f, 60.0f, percent));
} }

View File

@ -48,7 +48,7 @@ bool SkeletonRendererSeparatorExample::init () {
backNode = SkeletonAnimation::createWithJsonFile("spineboy-ess.json", "spineboy.atlas", 0.6f); backNode = SkeletonAnimation::createWithJsonFile("spineboy-ess.json", "spineboy.atlas", 0.6f);
backNode->setMix("walk", "jump", 0.4); backNode->setMix("walk", "jump", 0.4);
backNode->setAnimation(0, "walk", true); backNode->setAnimation(0, "walk", true);
backNode->setSlotsRange(backNode->findSlot("rear-upper-arm")->data->index, backNode->findSlot("rear-shin")->data->index); backNode->setSlotsRange(backNode->findSlot("rear-upper-arm")->getData().getIndex(), backNode->findSlot("rear-shin")->getData().getIndex());
backNode->setPosition(Vec2(_contentSize.width / 2, 20)); backNode->setPosition(Vec2(_contentSize.width / 2, 20));
// A simple rectangle to go between the front and back slots of Spineboy // A simple rectangle to go between the front and back slots of Spineboy
@ -65,7 +65,7 @@ bool SkeletonRendererSeparatorExample::init () {
// renders the back slots of Spineboy. The skeleton, animatio state and GPU resources // renders the back slots of Spineboy. The skeleton, animatio state and GPU resources
// are shared with the front node! // are shared with the front node!
frontNode = SkeletonRenderer::createWithSkeleton(backNode->getSkeleton()); frontNode = SkeletonRenderer::createWithSkeleton(backNode->getSkeleton());
frontNode->setSlotsRange(frontNode->findSlot("neck")->data->index, -1); frontNode->setSlotsRange(frontNode->findSlot("neck")->getData().getIndex(), -1);
frontNode->setPosition(Vec2(_contentSize.width / 2, 20)); frontNode->setPosition(Vec2(_contentSize.width / 2, 20));
// Add the front, between and back node in the correct order to this scene // Add the front, between and back node in the correct order to this scene
@ -76,7 +76,7 @@ bool SkeletonRendererSeparatorExample::init () {
scheduleUpdate(); scheduleUpdate();
EventListenerTouchOneByOne* listener = EventListenerTouchOneByOne::create(); EventListenerTouchOneByOne* listener = EventListenerTouchOneByOne::create();
listener->onTouchBegan = [this] (Touch* touch, Event* event) -> bool { listener->onTouchBegan = [this] (Touch* touch, cocos2d::Event* event) -> bool {
if (!backNode->getDebugBonesEnabled()) if (!backNode->getDebugBonesEnabled())
backNode->setDebugBonesEnabled(true); backNode->setDebugBonesEnabled(true);
else if (backNode->getTimeScale() == 1) else if (backNode->getTimeScale() == 1)

View File

@ -45,32 +45,32 @@ bool SpineboyExample::init () {
skeletonNode = SkeletonAnimation::createWithJsonFile("spineboy-ess.json", "spineboy.atlas", 0.6f); skeletonNode = SkeletonAnimation::createWithJsonFile("spineboy-ess.json", "spineboy.atlas", 0.6f);
skeletonNode->setStartListener( [] (spTrackEntry* entry) { skeletonNode->setStartListener( [] (TrackEntry* entry) {
log("%d start: %s", entry->trackIndex, entry->animation->name); log("%d start: %s", entry->getTrackIndex(), entry->getAnimation()->getName().buffer());
}); });
skeletonNode->setInterruptListener( [] (spTrackEntry* entry) { skeletonNode->setInterruptListener( [] (TrackEntry* entry) {
log("%d interrupt", entry->trackIndex); log("%d interrupt", entry->getTrackIndex());
}); });
skeletonNode->setEndListener( [] (spTrackEntry* entry) { skeletonNode->setEndListener( [] (TrackEntry* entry) {
log("%d end", entry->trackIndex); log("%d end", entry->getTrackIndex());
}); });
skeletonNode->setCompleteListener( [] (spTrackEntry* entry) { skeletonNode->setCompleteListener( [] (TrackEntry* entry) {
log("%d complete", entry->trackIndex); log("%d complete", entry->getTrackIndex());
}); });
skeletonNode->setDisposeListener( [] (spTrackEntry* entry) { skeletonNode->setDisposeListener( [] (TrackEntry* entry) {
log("%d dispose", entry->trackIndex); log("%d dispose", entry->getTrackIndex());
}); });
skeletonNode->setEventListener( [] (spTrackEntry* entry, spEvent* event) { skeletonNode->setEventListener( [] (TrackEntry* entry, spine::Event* event) {
log("%d event: %s, %d, %f, %s", entry->trackIndex, event->data->name, event->intValue, event->floatValue, event->stringValue); log("%d event: %s, %d, %f, %s", entry->getTrackIndex(), event->getData().getName().buffer(), event->getIntValue(), event->getFloatValue(), event->getStringValue().buffer());
}); });
skeletonNode->setMix("walk", "jump", 0.4); skeletonNode->setMix("walk", "jump", 0.4);
skeletonNode->setMix("jump", "run", 0.4); skeletonNode->setMix("jump", "run", 0.4);
skeletonNode->setAnimation(0, "walk", true); skeletonNode->setAnimation(0, "walk", true);
spTrackEntry* jumpEntry = skeletonNode->addAnimation(0, "jump", false, 1); TrackEntry* jumpEntry = skeletonNode->addAnimation(0, "jump", false, 1);
skeletonNode->addAnimation(0, "run", true); skeletonNode->addAnimation(0, "run", true);
skeletonNode->setTrackStartListener(jumpEntry, [] (spTrackEntry* entry) { skeletonNode->setTrackStartListener(jumpEntry, [] (TrackEntry* entry) {
log("jumped!"); log("jumped!");
}); });
@ -83,7 +83,7 @@ bool SpineboyExample::init () {
scheduleUpdate(); scheduleUpdate();
EventListenerTouchOneByOne* listener = EventListenerTouchOneByOne::create(); EventListenerTouchOneByOne* listener = EventListenerTouchOneByOne::create();
listener->onTouchBegan = [this] (Touch* touch, Event* event) -> bool { listener->onTouchBegan = [this] (Touch* touch, cocos2d::Event* event) -> bool {
if (!skeletonNode->getDebugBonesEnabled()) if (!skeletonNode->getDebugBonesEnabled())
skeletonNode->setDebugBonesEnabled(true); skeletonNode->setDebugBonesEnabled(true);
else if (skeletonNode->getTimeScale() == 1) else if (skeletonNode->getTimeScale() == 1)

View File

@ -52,7 +52,7 @@ bool TankExample::init () {
scheduleUpdate(); scheduleUpdate();
EventListenerTouchOneByOne* listener = EventListenerTouchOneByOne::create(); EventListenerTouchOneByOne* listener = EventListenerTouchOneByOne::create();
listener->onTouchBegan = [this] (Touch* touch, Event* event) -> bool { listener->onTouchBegan = [this] (Touch* touch, cocos2d::Event* event) -> bool {
if (!skeletonNode->getDebugBonesEnabled()) if (!skeletonNode->getDebugBonesEnabled())
skeletonNode->setDebugBonesEnabled(true); skeletonNode->setDebugBonesEnabled(true);
else if (skeletonNode->getTimeScale() == 1) else if (skeletonNode->getTimeScale() == 1)

View File

@ -46,6 +46,128 @@
521A8E6519F0C34300D177D7 /* Default-736h@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 521A8E6319F0C34300D177D7 /* Default-736h@3x.png */; }; 521A8E6519F0C34300D177D7 /* Default-736h@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 521A8E6319F0C34300D177D7 /* Default-736h@3x.png */; };
52B47A471A53D09C004E4C60 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52B47A461A53D09B004E4C60 /* Security.framework */; }; 52B47A471A53D09C004E4C60 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52B47A461A53D09B004E4C60 /* Security.framework */; };
7602C5551D7DAA1300C7C674 /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7602C5541D7DAA1300C7C674 /* CoreText.framework */; }; 7602C5551D7DAA1300C7C674 /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7602C5541D7DAA1300C7C674 /* CoreText.framework */; };
763104C320BC1B5E00927A1E /* Event.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631048620BC1B5400927A1E /* Event.cpp */; };
763104C420BC1B5E00927A1E /* PathConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631048720BC1B5400927A1E /* PathConstraint.cpp */; };
763104C520BC1B5E00927A1E /* ScaleTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631048820BC1B5400927A1E /* ScaleTimeline.cpp */; };
763104C620BC1B5E00927A1E /* CurveTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631048920BC1B5400927A1E /* CurveTimeline.cpp */; };
763104C720BC1B5E00927A1E /* DrawOrderTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631048A20BC1B5400927A1E /* DrawOrderTimeline.cpp */; };
763104C820BC1B5E00927A1E /* PathConstraintMixTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631048B20BC1B5400927A1E /* PathConstraintMixTimeline.cpp */; };
763104C920BC1B5E00927A1E /* EventTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631048C20BC1B5400927A1E /* EventTimeline.cpp */; };
763104CA20BC1B5E00927A1E /* PathConstraintSpacingTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631048D20BC1B5500927A1E /* PathConstraintSpacingTimeline.cpp */; };
763104CB20BC1B5E00927A1E /* SkeletonBinary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631048E20BC1B5500927A1E /* SkeletonBinary.cpp */; };
763104CC20BC1B5E00927A1E /* RTTI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631048F20BC1B5500927A1E /* RTTI.cpp */; };
763104CD20BC1B5E00927A1E /* Slot.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631049020BC1B5500927A1E /* Slot.cpp */; };
763104CE20BC1B5E00927A1E /* PointAttachment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631049120BC1B5500927A1E /* PointAttachment.cpp */; };
763104CF20BC1B5E00927A1E /* VertexAttachment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631049220BC1B5500927A1E /* VertexAttachment.cpp */; };
763104D020BC1B5E00927A1E /* PathConstraintPositionTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631049320BC1B5500927A1E /* PathConstraintPositionTimeline.cpp */; };
763104D120BC1B5E00927A1E /* MathUtil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631049420BC1B5500927A1E /* MathUtil.cpp */; };
763104D220BC1B5E00927A1E /* RotateTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631049520BC1B5500927A1E /* RotateTimeline.cpp */; };
763104D320BC1B5E00927A1E /* ColorTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631049620BC1B5500927A1E /* ColorTimeline.cpp */; };
763104D420BC1B5E00927A1E /* IkConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631049720BC1B5500927A1E /* IkConstraint.cpp */; };
763104D520BC1B5E00927A1E /* SkeletonData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631049820BC1B5500927A1E /* SkeletonData.cpp */; };
763104D620BC1B5E00927A1E /* Extension.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631049920BC1B5500927A1E /* Extension.cpp */; };
763104D720BC1B5E00927A1E /* SpineObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631049A20BC1B5500927A1E /* SpineObject.cpp */; };
763104D820BC1B5E00927A1E /* AnimationState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631049B20BC1B5600927A1E /* AnimationState.cpp */; };
763104D920BC1B5E00927A1E /* TransformConstraintTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631049C20BC1B5600927A1E /* TransformConstraintTimeline.cpp */; };
763104DA20BC1B5E00927A1E /* TextureLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631049D20BC1B5600927A1E /* TextureLoader.cpp */; };
763104DB20BC1B5E00927A1E /* BoneData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631049E20BC1B5600927A1E /* BoneData.cpp */; };
763104DC20BC1B5E00927A1E /* Atlas.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631049F20BC1B5600927A1E /* Atlas.cpp */; };
763104DD20BC1B5E00927A1E /* Triangulator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104A020BC1B5600927A1E /* Triangulator.cpp */; };
763104DE20BC1B5E00927A1E /* Skeleton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104A120BC1B5600927A1E /* Skeleton.cpp */; };
763104DF20BC1B5E00927A1E /* AttachmentLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104A220BC1B5600927A1E /* AttachmentLoader.cpp */; };
763104E020BC1B5E00927A1E /* Constraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104A320BC1B5600927A1E /* Constraint.cpp */; };
763104E120BC1B5E00927A1E /* AttachmentTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104A420BC1B5600927A1E /* AttachmentTimeline.cpp */; };
763104E220BC1B5E00927A1E /* Updatable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104A520BC1B5600927A1E /* Updatable.cpp */; };
763104E320BC1B5E00927A1E /* RegionAttachment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104A620BC1B5700927A1E /* RegionAttachment.cpp */; };
763104E420BC1B5E00927A1E /* ClippingAttachment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104A720BC1B5700927A1E /* ClippingAttachment.cpp */; };
763104E520BC1B5E00927A1E /* TwoColorTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104A820BC1B5700927A1E /* TwoColorTimeline.cpp */; };
763104E620BC1B5E00927A1E /* TransformConstraintData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104A920BC1B5700927A1E /* TransformConstraintData.cpp */; };
763104E720BC1B5E00927A1E /* PathAttachment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104AA20BC1B5700927A1E /* PathAttachment.cpp */; };
763104E820BC1B5E00927A1E /* BoundingBoxAttachment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104AB20BC1B5700927A1E /* BoundingBoxAttachment.cpp */; };
763104E920BC1B5E00927A1E /* Skin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104AC20BC1B5700927A1E /* Skin.cpp */; };
763104EA20BC1B5E00927A1E /* IkConstraintData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104AD20BC1B5700927A1E /* IkConstraintData.cpp */; };
763104EB20BC1B5E00927A1E /* VertexEffect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104AE20BC1B5800927A1E /* VertexEffect.cpp */; };
763104EC20BC1B5E00927A1E /* AnimationStateData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104AF20BC1B5800927A1E /* AnimationStateData.cpp */; };
763104ED20BC1B5E00927A1E /* EventData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104B020BC1B5800927A1E /* EventData.cpp */; };
763104EE20BC1B5E00927A1E /* SkeletonClipping.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104B120BC1B5800927A1E /* SkeletonClipping.cpp */; };
763104EF20BC1B5E00927A1E /* IkConstraintTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104B220BC1B5800927A1E /* IkConstraintTimeline.cpp */; };
763104F020BC1B5E00927A1E /* Timeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104B320BC1B5C00927A1E /* Timeline.cpp */; };
763104F120BC1B5E00927A1E /* AtlasAttachmentLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104B420BC1B5C00927A1E /* AtlasAttachmentLoader.cpp */; };
763104F220BC1B5E00927A1E /* LinkedMesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104B520BC1B5C00927A1E /* LinkedMesh.cpp */; };
763104F320BC1B5E00927A1E /* Animation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104B620BC1B5C00927A1E /* Animation.cpp */; };
763104F420BC1B5E00927A1E /* Attachment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104B720BC1B5C00927A1E /* Attachment.cpp */; };
763104F520BC1B5E00927A1E /* MeshAttachment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104B820BC1B5C00927A1E /* MeshAttachment.cpp */; };
763104F620BC1B5E00927A1E /* SlotData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104B920BC1B5C00927A1E /* SlotData.cpp */; };
763104F720BC1B5E00927A1E /* Bone.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104BA20BC1B5D00927A1E /* Bone.cpp */; };
763104F820BC1B5E00927A1E /* Json.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104BB20BC1B5D00927A1E /* Json.cpp */; };
763104F920BC1B5E00927A1E /* SkeletonJson.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104BC20BC1B5D00927A1E /* SkeletonJson.cpp */; };
763104FA20BC1B5E00927A1E /* TransformConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104BD20BC1B5D00927A1E /* TransformConstraint.cpp */; };
763104FB20BC1B5E00927A1E /* DeformTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104BE20BC1B5D00927A1E /* DeformTimeline.cpp */; };
763104FC20BC1B5E00927A1E /* PathConstraintData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104BF20BC1B5E00927A1E /* PathConstraintData.cpp */; };
763104FD20BC1B5E00927A1E /* SkeletonBounds.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104C020BC1B5E00927A1E /* SkeletonBounds.cpp */; };
763104FE20BC1B5E00927A1E /* ShearTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104C120BC1B5E00927A1E /* ShearTimeline.cpp */; };
763104FF20BC1B5E00927A1E /* TranslateTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104C220BC1B5E00927A1E /* TranslateTimeline.cpp */; };
7631059E20BC1B9700927A1E /* Animation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104B620BC1B5C00927A1E /* Animation.cpp */; };
7631059F20BC1B9700927A1E /* AnimationState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631049B20BC1B5600927A1E /* AnimationState.cpp */; };
763105A020BC1B9700927A1E /* AnimationStateData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104AF20BC1B5800927A1E /* AnimationStateData.cpp */; };
763105A120BC1B9700927A1E /* Atlas.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631049F20BC1B5600927A1E /* Atlas.cpp */; };
763105A220BC1B9700927A1E /* AtlasAttachmentLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104B420BC1B5C00927A1E /* AtlasAttachmentLoader.cpp */; };
763105A320BC1B9700927A1E /* Attachment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104B720BC1B5C00927A1E /* Attachment.cpp */; };
763105A420BC1B9700927A1E /* AttachmentLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104A220BC1B5600927A1E /* AttachmentLoader.cpp */; };
763105A520BC1B9700927A1E /* AttachmentTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104A420BC1B5600927A1E /* AttachmentTimeline.cpp */; };
763105A620BC1B9700927A1E /* Bone.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104BA20BC1B5D00927A1E /* Bone.cpp */; };
763105A720BC1B9700927A1E /* BoneData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631049E20BC1B5600927A1E /* BoneData.cpp */; };
763105A820BC1B9700927A1E /* BoundingBoxAttachment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104AB20BC1B5700927A1E /* BoundingBoxAttachment.cpp */; };
763105A920BC1B9700927A1E /* ClippingAttachment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104A720BC1B5700927A1E /* ClippingAttachment.cpp */; };
763105AA20BC1B9700927A1E /* ColorTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631049620BC1B5500927A1E /* ColorTimeline.cpp */; };
763105AB20BC1B9700927A1E /* Constraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104A320BC1B5600927A1E /* Constraint.cpp */; };
763105AC20BC1B9700927A1E /* CurveTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631048920BC1B5400927A1E /* CurveTimeline.cpp */; };
763105AD20BC1B9700927A1E /* DeformTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104BE20BC1B5D00927A1E /* DeformTimeline.cpp */; };
763105AE20BC1B9700927A1E /* DrawOrderTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631048A20BC1B5400927A1E /* DrawOrderTimeline.cpp */; };
763105AF20BC1B9700927A1E /* Event.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631048620BC1B5400927A1E /* Event.cpp */; };
763105B020BC1B9700927A1E /* EventData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104B020BC1B5800927A1E /* EventData.cpp */; };
763105B120BC1B9700927A1E /* EventTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631048C20BC1B5400927A1E /* EventTimeline.cpp */; };
763105B220BC1B9700927A1E /* Extension.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631049920BC1B5500927A1E /* Extension.cpp */; };
763105B320BC1B9700927A1E /* IkConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631049720BC1B5500927A1E /* IkConstraint.cpp */; };
763105B420BC1B9700927A1E /* IkConstraintData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104AD20BC1B5700927A1E /* IkConstraintData.cpp */; };
763105B520BC1B9700927A1E /* IkConstraintTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104B220BC1B5800927A1E /* IkConstraintTimeline.cpp */; };
763105B620BC1B9700927A1E /* Json.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104BB20BC1B5D00927A1E /* Json.cpp */; };
763105B720BC1B9700927A1E /* LinkedMesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104B520BC1B5C00927A1E /* LinkedMesh.cpp */; };
763105B820BC1B9700927A1E /* MathUtil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631049420BC1B5500927A1E /* MathUtil.cpp */; };
763105B920BC1B9700927A1E /* MeshAttachment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104B820BC1B5C00927A1E /* MeshAttachment.cpp */; };
763105BA20BC1B9700927A1E /* PathAttachment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104AA20BC1B5700927A1E /* PathAttachment.cpp */; };
763105BB20BC1B9700927A1E /* PathConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631048720BC1B5400927A1E /* PathConstraint.cpp */; };
763105BC20BC1B9700927A1E /* PathConstraintData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104BF20BC1B5E00927A1E /* PathConstraintData.cpp */; };
763105BD20BC1B9700927A1E /* PathConstraintMixTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631048B20BC1B5400927A1E /* PathConstraintMixTimeline.cpp */; };
763105BE20BC1B9700927A1E /* PathConstraintPositionTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631049320BC1B5500927A1E /* PathConstraintPositionTimeline.cpp */; };
763105BF20BC1B9700927A1E /* PathConstraintSpacingTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631048D20BC1B5500927A1E /* PathConstraintSpacingTimeline.cpp */; };
763105C020BC1B9700927A1E /* PointAttachment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631049120BC1B5500927A1E /* PointAttachment.cpp */; };
763105C120BC1B9700927A1E /* RegionAttachment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104A620BC1B5700927A1E /* RegionAttachment.cpp */; };
763105C220BC1B9700927A1E /* RotateTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631049520BC1B5500927A1E /* RotateTimeline.cpp */; };
763105C320BC1B9700927A1E /* RTTI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631048F20BC1B5500927A1E /* RTTI.cpp */; };
763105C420BC1B9700927A1E /* ScaleTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631048820BC1B5400927A1E /* ScaleTimeline.cpp */; };
763105C520BC1B9700927A1E /* ShearTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104C120BC1B5E00927A1E /* ShearTimeline.cpp */; };
763105C620BC1B9700927A1E /* Skeleton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104A120BC1B5600927A1E /* Skeleton.cpp */; };
763105C720BC1B9700927A1E /* SkeletonBinary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631048E20BC1B5500927A1E /* SkeletonBinary.cpp */; };
763105C820BC1B9700927A1E /* SkeletonBounds.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104C020BC1B5E00927A1E /* SkeletonBounds.cpp */; };
763105C920BC1B9700927A1E /* SkeletonClipping.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104B120BC1B5800927A1E /* SkeletonClipping.cpp */; };
763105CA20BC1B9700927A1E /* SkeletonData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631049820BC1B5500927A1E /* SkeletonData.cpp */; };
763105CB20BC1B9700927A1E /* SkeletonJson.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104BC20BC1B5D00927A1E /* SkeletonJson.cpp */; };
763105CC20BC1B9700927A1E /* Skin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104AC20BC1B5700927A1E /* Skin.cpp */; };
763105CD20BC1B9700927A1E /* Slot.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631049020BC1B5500927A1E /* Slot.cpp */; };
763105CE20BC1B9700927A1E /* SlotData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104B920BC1B5C00927A1E /* SlotData.cpp */; };
763105CF20BC1B9700927A1E /* SpineObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631049A20BC1B5500927A1E /* SpineObject.cpp */; };
763105D020BC1B9700927A1E /* TextureLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631049D20BC1B5600927A1E /* TextureLoader.cpp */; };
763105D120BC1B9700927A1E /* Timeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104B320BC1B5C00927A1E /* Timeline.cpp */; };
763105D220BC1B9700927A1E /* TransformConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104BD20BC1B5D00927A1E /* TransformConstraint.cpp */; };
763105D320BC1B9700927A1E /* TransformConstraintData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104A920BC1B5700927A1E /* TransformConstraintData.cpp */; };
763105D420BC1B9700927A1E /* TransformConstraintTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631049C20BC1B5600927A1E /* TransformConstraintTimeline.cpp */; };
763105D520BC1B9700927A1E /* TranslateTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104C220BC1B5E00927A1E /* TranslateTimeline.cpp */; };
763105D620BC1B9700927A1E /* Triangulator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104A020BC1B5600927A1E /* Triangulator.cpp */; };
763105D720BC1B9700927A1E /* TwoColorTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104A820BC1B5700927A1E /* TwoColorTimeline.cpp */; };
763105D820BC1B9700927A1E /* Updatable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104A520BC1B5600927A1E /* Updatable.cpp */; };
763105D920BC1B9700927A1E /* VertexAttachment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631049220BC1B5500927A1E /* VertexAttachment.cpp */; };
763105DA20BC1B9700927A1E /* VertexEffect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104AE20BC1B5800927A1E /* VertexEffect.cpp */; };
76A45BDE1E64396800745AA1 /* SkeletonTwoColorBatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76A45BDC1E64396800745AA1 /* SkeletonTwoColorBatch.cpp */; }; 76A45BDE1E64396800745AA1 /* SkeletonTwoColorBatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76A45BDC1E64396800745AA1 /* SkeletonTwoColorBatch.cpp */; };
76A45BDF1E64396800745AA1 /* SkeletonTwoColorBatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76A45BDC1E64396800745AA1 /* SkeletonTwoColorBatch.cpp */; }; 76A45BDF1E64396800745AA1 /* SkeletonTwoColorBatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76A45BDC1E64396800745AA1 /* SkeletonTwoColorBatch.cpp */; };
76AAA3C01D180F7C00C54FCB /* AppDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA3B31D180F7C00C54FCB /* AppDelegate.cpp */; }; 76AAA3C01D180F7C00C54FCB /* AppDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA3B31D180F7C00C54FCB /* AppDelegate.cpp */; };
@ -54,15 +176,12 @@
76AAA3C31D180F7C00C54FCB /* RaptorExample.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA3BA1D180F7C00C54FCB /* RaptorExample.cpp */; }; 76AAA3C31D180F7C00C54FCB /* RaptorExample.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA3BA1D180F7C00C54FCB /* RaptorExample.cpp */; };
76AAA3C51D180F7C00C54FCB /* SpineboyExample.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA3BE1D180F7C00C54FCB /* SpineboyExample.cpp */; }; 76AAA3C51D180F7C00C54FCB /* SpineboyExample.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA3BE1D180F7C00C54FCB /* SpineboyExample.cpp */; };
76AAA40C1D18106000C54FCB /* AttachmentVertices.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA4001D18106000C54FCB /* AttachmentVertices.cpp */; }; 76AAA40C1D18106000C54FCB /* AttachmentVertices.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA4001D18106000C54FCB /* AttachmentVertices.cpp */; };
76AAA40D1D18106000C54FCB /* Cocos2dAttachmentLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA4021D18106000C54FCB /* Cocos2dAttachmentLoader.cpp */; };
76AAA40E1D18106000C54FCB /* SkeletonAnimation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA4041D18106000C54FCB /* SkeletonAnimation.cpp */; }; 76AAA40E1D18106000C54FCB /* SkeletonAnimation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA4041D18106000C54FCB /* SkeletonAnimation.cpp */; };
76AAA40F1D18106000C54FCB /* SkeletonBatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA4061D18106000C54FCB /* SkeletonBatch.cpp */; }; 76AAA40F1D18106000C54FCB /* SkeletonBatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA4061D18106000C54FCB /* SkeletonBatch.cpp */; };
76AAA4101D18106000C54FCB /* SkeletonRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA4081D18106000C54FCB /* SkeletonRenderer.cpp */; }; 76AAA4101D18106000C54FCB /* SkeletonRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA4081D18106000C54FCB /* SkeletonRenderer.cpp */; };
76AAA4111D18106000C54FCB /* spine-cocos2dx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA40A1D18106000C54FCB /* spine-cocos2dx.cpp */; }; 76AAA4111D18106000C54FCB /* spine-cocos2dx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA40A1D18106000C54FCB /* spine-cocos2dx.cpp */; };
76AAA4121D18119F00C54FCB /* AttachmentVertices.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA4001D18106000C54FCB /* AttachmentVertices.cpp */; }; 76AAA4121D18119F00C54FCB /* AttachmentVertices.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA4001D18106000C54FCB /* AttachmentVertices.cpp */; };
76AAA4131D18119F00C54FCB /* AttachmentVertices.h in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA4011D18106000C54FCB /* AttachmentVertices.h */; }; 76AAA4131D18119F00C54FCB /* AttachmentVertices.h in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA4011D18106000C54FCB /* AttachmentVertices.h */; };
76AAA4141D18119F00C54FCB /* Cocos2dAttachmentLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA4021D18106000C54FCB /* Cocos2dAttachmentLoader.cpp */; };
76AAA4151D18119F00C54FCB /* Cocos2dAttachmentLoader.h in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA4031D18106000C54FCB /* Cocos2dAttachmentLoader.h */; };
76AAA4161D18119F00C54FCB /* SkeletonAnimation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA4041D18106000C54FCB /* SkeletonAnimation.cpp */; }; 76AAA4161D18119F00C54FCB /* SkeletonAnimation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA4041D18106000C54FCB /* SkeletonAnimation.cpp */; };
76AAA4171D18119F00C54FCB /* SkeletonAnimation.h in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA4051D18106000C54FCB /* SkeletonAnimation.h */; }; 76AAA4171D18119F00C54FCB /* SkeletonAnimation.h in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA4051D18106000C54FCB /* SkeletonAnimation.h */; };
76AAA4181D18119F00C54FCB /* SkeletonBatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA4061D18106000C54FCB /* SkeletonBatch.cpp */; }; 76AAA4181D18119F00C54FCB /* SkeletonBatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA4061D18106000C54FCB /* SkeletonBatch.cpp */; };
@ -86,91 +205,11 @@
76AAA4581D18132D00C54FCB /* common in Resources */ = {isa = PBXBuildFile; fileRef = 76AAA4521D18132D00C54FCB /* common */; }; 76AAA4581D18132D00C54FCB /* common in Resources */ = {isa = PBXBuildFile; fileRef = 76AAA4521D18132D00C54FCB /* common */; };
76D1BFE02029E35200A0272D /* SkeletonRendererSeparatorExample.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76D1BFDF2029E35200A0272D /* SkeletonRendererSeparatorExample.cpp */; }; 76D1BFE02029E35200A0272D /* SkeletonRendererSeparatorExample.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76D1BFDF2029E35200A0272D /* SkeletonRendererSeparatorExample.cpp */; };
76D1BFE12029E37700A0272D /* SkeletonRendererSeparatorExample.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76D1BFDF2029E35200A0272D /* SkeletonRendererSeparatorExample.cpp */; }; 76D1BFE12029E37700A0272D /* SkeletonRendererSeparatorExample.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76D1BFDF2029E35200A0272D /* SkeletonRendererSeparatorExample.cpp */; };
76D520DA1EB3611300572471 /* ClippingAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 76D520D71EB3611300572471 /* ClippingAttachment.c */; };
76D520DB1EB3611300572471 /* SkeletonClipping.c in Sources */ = {isa = PBXBuildFile; fileRef = 76D520D81EB3611300572471 /* SkeletonClipping.c */; };
76D520DC1EB3611300572471 /* Triangulator.c in Sources */ = {isa = PBXBuildFile; fileRef = 76D520D91EB3611300572471 /* Triangulator.c */; };
76D520DE1EB3619800572471 /* ClippingAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 76D520D71EB3611300572471 /* ClippingAttachment.c */; };
76D520DF1EB3619800572471 /* SkeletonClipping.c in Sources */ = {isa = PBXBuildFile; fileRef = 76D520D81EB3611300572471 /* SkeletonClipping.c */; };
76D520E01EB3619800572471 /* Triangulator.c in Sources */ = {isa = PBXBuildFile; fileRef = 76D520D91EB3611300572471 /* Triangulator.c */; };
76D520E21EB3625700572471 /* Array.c in Sources */ = {isa = PBXBuildFile; fileRef = 76D520E11EB3625700572471 /* Array.c */; };
76D520E31EB3625B00572471 /* Array.c in Sources */ = {isa = PBXBuildFile; fileRef = 76D520E11EB3625700572471 /* Array.c */; };
76D520E61EB362DD00572471 /* CoinExample.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76D520E41EB362DD00572471 /* CoinExample.cpp */; }; 76D520E61EB362DD00572471 /* CoinExample.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76D520E41EB362DD00572471 /* CoinExample.cpp */; };
76D520E71EB3634600572471 /* CoinExample.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76D520E41EB362DD00572471 /* CoinExample.cpp */; }; 76D520E71EB3634600572471 /* CoinExample.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76D520E41EB362DD00572471 /* CoinExample.cpp */; };
76F28CB11DEC7EBB00CDE54D /* Animation.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28C8F1DEC7EBA00CDE54D /* Animation.c */; };
76F28CB21DEC7EBB00CDE54D /* AnimationState.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28C901DEC7EBA00CDE54D /* AnimationState.c */; };
76F28CB31DEC7EBB00CDE54D /* AnimationStateData.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28C911DEC7EBA00CDE54D /* AnimationStateData.c */; };
76F28CB41DEC7EBB00CDE54D /* Atlas.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28C921DEC7EBA00CDE54D /* Atlas.c */; };
76F28CB51DEC7EBB00CDE54D /* AtlasAttachmentLoader.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28C931DEC7EBA00CDE54D /* AtlasAttachmentLoader.c */; };
76F28CB61DEC7EBB00CDE54D /* Attachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28C941DEC7EBA00CDE54D /* Attachment.c */; };
76F28CB71DEC7EBB00CDE54D /* AttachmentLoader.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28C951DEC7EBA00CDE54D /* AttachmentLoader.c */; };
76F28CB81DEC7EBB00CDE54D /* Bone.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28C961DEC7EBA00CDE54D /* Bone.c */; };
76F28CB91DEC7EBB00CDE54D /* BoneData.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28C971DEC7EBA00CDE54D /* BoneData.c */; };
76F28CBA1DEC7EBB00CDE54D /* BoundingBoxAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28C981DEC7EBA00CDE54D /* BoundingBoxAttachment.c */; };
76F28CBB1DEC7EBB00CDE54D /* Event.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28C991DEC7EBA00CDE54D /* Event.c */; };
76F28CBC1DEC7EBB00CDE54D /* EventData.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28C9A1DEC7EBA00CDE54D /* EventData.c */; };
76F28CBD1DEC7EBB00CDE54D /* extension.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28C9B1DEC7EBA00CDE54D /* extension.c */; };
76F28CBE1DEC7EBB00CDE54D /* IkConstraint.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28C9C1DEC7EBA00CDE54D /* IkConstraint.c */; };
76F28CBF1DEC7EBB00CDE54D /* IkConstraintData.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28C9D1DEC7EBA00CDE54D /* IkConstraintData.c */; };
76F28CC01DEC7EBB00CDE54D /* Json.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28C9E1DEC7EBA00CDE54D /* Json.c */; };
76F28CC11DEC7EBB00CDE54D /* MeshAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28CA11DEC7EBB00CDE54D /* MeshAttachment.c */; };
76F28CC21DEC7EBB00CDE54D /* PathAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28CA21DEC7EBB00CDE54D /* PathAttachment.c */; };
76F28CC31DEC7EBB00CDE54D /* PathConstraint.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28CA31DEC7EBB00CDE54D /* PathConstraint.c */; };
76F28CC41DEC7EBB00CDE54D /* PathConstraintData.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28CA41DEC7EBB00CDE54D /* PathConstraintData.c */; };
76F28CC51DEC7EBB00CDE54D /* RegionAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28CA51DEC7EBB00CDE54D /* RegionAttachment.c */; };
76F28CC61DEC7EBB00CDE54D /* Skeleton.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28CA61DEC7EBB00CDE54D /* Skeleton.c */; };
76F28CC71DEC7EBB00CDE54D /* SkeletonBinary.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28CA71DEC7EBB00CDE54D /* SkeletonBinary.c */; };
76F28CC81DEC7EBB00CDE54D /* SkeletonBounds.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28CA81DEC7EBB00CDE54D /* SkeletonBounds.c */; };
76F28CC91DEC7EBB00CDE54D /* SkeletonData.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28CA91DEC7EBB00CDE54D /* SkeletonData.c */; };
76F28CCA1DEC7EBB00CDE54D /* SkeletonJson.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28CAA1DEC7EBB00CDE54D /* SkeletonJson.c */; };
76F28CCB1DEC7EBB00CDE54D /* Skin.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28CAB1DEC7EBB00CDE54D /* Skin.c */; };
76F28CCC1DEC7EBB00CDE54D /* Slot.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28CAC1DEC7EBB00CDE54D /* Slot.c */; };
76F28CCD1DEC7EBB00CDE54D /* SlotData.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28CAD1DEC7EBB00CDE54D /* SlotData.c */; };
76F28CCE1DEC7EBB00CDE54D /* TransformConstraint.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28CAE1DEC7EBB00CDE54D /* TransformConstraint.c */; };
76F28CCF1DEC7EBB00CDE54D /* TransformConstraintData.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28CAF1DEC7EBB00CDE54D /* TransformConstraintData.c */; };
76F28CD01DEC7EBB00CDE54D /* VertexAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28CB01DEC7EBB00CDE54D /* VertexAttachment.c */; };
76F28CD11DEC7FFA00CDE54D /* Animation.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28C8F1DEC7EBA00CDE54D /* Animation.c */; };
76F28CD21DEC7FFA00CDE54D /* AnimationState.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28C901DEC7EBA00CDE54D /* AnimationState.c */; };
76F28CD31DEC7FFA00CDE54D /* AnimationStateData.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28C911DEC7EBA00CDE54D /* AnimationStateData.c */; };
76F28CD41DEC7FFA00CDE54D /* Atlas.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28C921DEC7EBA00CDE54D /* Atlas.c */; };
76F28CD51DEC7FFA00CDE54D /* AtlasAttachmentLoader.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28C931DEC7EBA00CDE54D /* AtlasAttachmentLoader.c */; };
76F28CD61DEC7FFA00CDE54D /* Attachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28C941DEC7EBA00CDE54D /* Attachment.c */; };
76F28CD71DEC7FFA00CDE54D /* AttachmentLoader.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28C951DEC7EBA00CDE54D /* AttachmentLoader.c */; };
76F28CD81DEC7FFA00CDE54D /* Bone.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28C961DEC7EBA00CDE54D /* Bone.c */; };
76F28CD91DEC7FFA00CDE54D /* BoneData.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28C971DEC7EBA00CDE54D /* BoneData.c */; };
76F28CDA1DEC7FFA00CDE54D /* BoundingBoxAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28C981DEC7EBA00CDE54D /* BoundingBoxAttachment.c */; };
76F28CDB1DEC7FFA00CDE54D /* Event.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28C991DEC7EBA00CDE54D /* Event.c */; };
76F28CDC1DEC7FFA00CDE54D /* EventData.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28C9A1DEC7EBA00CDE54D /* EventData.c */; };
76F28CDD1DEC7FFA00CDE54D /* extension.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28C9B1DEC7EBA00CDE54D /* extension.c */; };
76F28CDE1DEC7FFA00CDE54D /* IkConstraint.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28C9C1DEC7EBA00CDE54D /* IkConstraint.c */; };
76F28CDF1DEC7FFA00CDE54D /* IkConstraintData.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28C9D1DEC7EBA00CDE54D /* IkConstraintData.c */; };
76F28CE01DEC7FFA00CDE54D /* Json.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28C9E1DEC7EBA00CDE54D /* Json.c */; };
76F28CE11DEC7FFA00CDE54D /* Json.h in Sources */ = {isa = PBXBuildFile; fileRef = 76F28C9F1DEC7EBA00CDE54D /* Json.h */; };
76F28CE21DEC7FFA00CDE54D /* kvec.h in Sources */ = {isa = PBXBuildFile; fileRef = 76F28CA01DEC7EBB00CDE54D /* kvec.h */; };
76F28CE31DEC7FFA00CDE54D /* MeshAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28CA11DEC7EBB00CDE54D /* MeshAttachment.c */; };
76F28CE41DEC7FFA00CDE54D /* PathAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28CA21DEC7EBB00CDE54D /* PathAttachment.c */; };
76F28CE51DEC7FFA00CDE54D /* PathConstraint.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28CA31DEC7EBB00CDE54D /* PathConstraint.c */; };
76F28CE61DEC7FFA00CDE54D /* PathConstraintData.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28CA41DEC7EBB00CDE54D /* PathConstraintData.c */; };
76F28CE71DEC7FFA00CDE54D /* RegionAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28CA51DEC7EBB00CDE54D /* RegionAttachment.c */; };
76F28CE81DEC7FFA00CDE54D /* Skeleton.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28CA61DEC7EBB00CDE54D /* Skeleton.c */; };
76F28CE91DEC7FFA00CDE54D /* SkeletonBinary.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28CA71DEC7EBB00CDE54D /* SkeletonBinary.c */; };
76F28CEA1DEC7FFA00CDE54D /* SkeletonBounds.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28CA81DEC7EBB00CDE54D /* SkeletonBounds.c */; };
76F28CEB1DEC7FFA00CDE54D /* SkeletonData.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28CA91DEC7EBB00CDE54D /* SkeletonData.c */; };
76F28CEC1DEC7FFA00CDE54D /* SkeletonJson.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28CAA1DEC7EBB00CDE54D /* SkeletonJson.c */; };
76F28CED1DEC7FFA00CDE54D /* Skin.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28CAB1DEC7EBB00CDE54D /* Skin.c */; };
76F28CEE1DEC7FFA00CDE54D /* Slot.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28CAC1DEC7EBB00CDE54D /* Slot.c */; };
76F28CEF1DEC7FFA00CDE54D /* SlotData.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28CAD1DEC7EBB00CDE54D /* SlotData.c */; };
76F28CF01DEC7FFA00CDE54D /* TransformConstraint.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28CAE1DEC7EBB00CDE54D /* TransformConstraint.c */; };
76F28CF11DEC7FFA00CDE54D /* TransformConstraintData.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28CAF1DEC7EBB00CDE54D /* TransformConstraintData.c */; };
76F28CF21DEC7FFA00CDE54D /* VertexAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 76F28CB01DEC7EBB00CDE54D /* VertexAttachment.c */; };
76F5BD551D2BD7D3005917E5 /* TankExample.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76F5BD531D2BD7D3005917E5 /* TankExample.cpp */; }; 76F5BD551D2BD7D3005917E5 /* TankExample.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76F5BD531D2BD7D3005917E5 /* TankExample.cpp */; };
76F5BD561D2BD7EF005917E5 /* TankExample.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76F5BD531D2BD7D3005917E5 /* TankExample.cpp */; }; 76F5BD561D2BD7EF005917E5 /* TankExample.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76F5BD531D2BD7D3005917E5 /* TankExample.cpp */; };
76F5BD571D2BD7EF005917E5 /* TankExample.h in Sources */ = {isa = PBXBuildFile; fileRef = 76F5BD541D2BD7D3005917E5 /* TankExample.h */; }; 76F5BD571D2BD7EF005917E5 /* TankExample.h in Sources */ = {isa = PBXBuildFile; fileRef = 76F5BD541D2BD7D3005917E5 /* TankExample.h */; };
76FAC18C1E3F97D2001CCC8C /* Color.c in Sources */ = {isa = PBXBuildFile; fileRef = 76FAC18A1E3F97D2001CCC8C /* Color.c */; };
76FAC18D1E3F97D2001CCC8C /* PointAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 76FAC18B1E3F97D2001CCC8C /* PointAttachment.c */; };
76FAC18F1E3F98A0001CCC8C /* Color.c in Sources */ = {isa = PBXBuildFile; fileRef = 76FAC18A1E3F97D2001CCC8C /* Color.c */; };
76FAC1901E3F98A0001CCC8C /* PointAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 76FAC18B1E3F97D2001CCC8C /* PointAttachment.c */; };
76FB150F1F01377200C5377F /* VertexEffect.c in Sources */ = {isa = PBXBuildFile; fileRef = 76FB150E1F01377200C5377F /* VertexEffect.c */; };
76FB15111F0139B400C5377F /* VertexEffect.c in Sources */ = {isa = PBXBuildFile; fileRef = 76FB150E1F01377200C5377F /* VertexEffect.c */; };
8262943E1AAF051F00CB7CF7 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8262943D1AAF051F00CB7CF7 /* Security.framework */; }; 8262943E1AAF051F00CB7CF7 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8262943D1AAF051F00CB7CF7 /* Security.framework */; };
BF171245129291EC00B8313A /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF170DB012928DE900B8313A /* OpenGLES.framework */; }; BF171245129291EC00B8313A /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF170DB012928DE900B8313A /* OpenGLES.framework */; };
BF1712471292920000B8313A /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = BF170DB412928DE900B8313A /* libz.dylib */; }; BF1712471292920000B8313A /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = BF170DB412928DE900B8313A /* libz.dylib */; };
@ -264,6 +303,67 @@
521A8E6319F0C34300D177D7 /* Default-736h@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-736h@3x.png"; sourceTree = "<group>"; }; 521A8E6319F0C34300D177D7 /* Default-736h@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-736h@3x.png"; sourceTree = "<group>"; };
52B47A461A53D09B004E4C60 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/Security.framework; sourceTree = DEVELOPER_DIR; }; 52B47A461A53D09B004E4C60 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/Security.framework; sourceTree = DEVELOPER_DIR; };
7602C5541D7DAA1300C7C674 /* CoreText.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/System/Library/Frameworks/CoreText.framework; sourceTree = DEVELOPER_DIR; }; 7602C5541D7DAA1300C7C674 /* CoreText.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/System/Library/Frameworks/CoreText.framework; sourceTree = DEVELOPER_DIR; };
7631048620BC1B5400927A1E /* Event.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Event.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/Event.cpp"; sourceTree = "<group>"; };
7631048720BC1B5400927A1E /* PathConstraint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PathConstraint.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/PathConstraint.cpp"; sourceTree = "<group>"; };
7631048820BC1B5400927A1E /* ScaleTimeline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ScaleTimeline.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/ScaleTimeline.cpp"; sourceTree = "<group>"; };
7631048920BC1B5400927A1E /* CurveTimeline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CurveTimeline.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/CurveTimeline.cpp"; sourceTree = "<group>"; };
7631048A20BC1B5400927A1E /* DrawOrderTimeline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DrawOrderTimeline.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/DrawOrderTimeline.cpp"; sourceTree = "<group>"; };
7631048B20BC1B5400927A1E /* PathConstraintMixTimeline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PathConstraintMixTimeline.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/PathConstraintMixTimeline.cpp"; sourceTree = "<group>"; };
7631048C20BC1B5400927A1E /* EventTimeline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EventTimeline.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/EventTimeline.cpp"; sourceTree = "<group>"; };
7631048D20BC1B5500927A1E /* PathConstraintSpacingTimeline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PathConstraintSpacingTimeline.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/PathConstraintSpacingTimeline.cpp"; sourceTree = "<group>"; };
7631048E20BC1B5500927A1E /* SkeletonBinary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SkeletonBinary.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/SkeletonBinary.cpp"; sourceTree = "<group>"; };
7631048F20BC1B5500927A1E /* RTTI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RTTI.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/RTTI.cpp"; sourceTree = "<group>"; };
7631049020BC1B5500927A1E /* Slot.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Slot.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/Slot.cpp"; sourceTree = "<group>"; };
7631049120BC1B5500927A1E /* PointAttachment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PointAttachment.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/PointAttachment.cpp"; sourceTree = "<group>"; };
7631049220BC1B5500927A1E /* VertexAttachment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VertexAttachment.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/VertexAttachment.cpp"; sourceTree = "<group>"; };
7631049320BC1B5500927A1E /* PathConstraintPositionTimeline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PathConstraintPositionTimeline.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/PathConstraintPositionTimeline.cpp"; sourceTree = "<group>"; };
7631049420BC1B5500927A1E /* MathUtil.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MathUtil.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/MathUtil.cpp"; sourceTree = "<group>"; };
7631049520BC1B5500927A1E /* RotateTimeline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RotateTimeline.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/RotateTimeline.cpp"; sourceTree = "<group>"; };
7631049620BC1B5500927A1E /* ColorTimeline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ColorTimeline.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/ColorTimeline.cpp"; sourceTree = "<group>"; };
7631049720BC1B5500927A1E /* IkConstraint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IkConstraint.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/IkConstraint.cpp"; sourceTree = "<group>"; };
7631049820BC1B5500927A1E /* SkeletonData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SkeletonData.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/SkeletonData.cpp"; sourceTree = "<group>"; };
7631049920BC1B5500927A1E /* Extension.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Extension.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/Extension.cpp"; sourceTree = "<group>"; };
7631049A20BC1B5500927A1E /* SpineObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SpineObject.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/SpineObject.cpp"; sourceTree = "<group>"; };
7631049B20BC1B5600927A1E /* AnimationState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AnimationState.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/AnimationState.cpp"; sourceTree = "<group>"; };
7631049C20BC1B5600927A1E /* TransformConstraintTimeline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TransformConstraintTimeline.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/TransformConstraintTimeline.cpp"; sourceTree = "<group>"; };
7631049D20BC1B5600927A1E /* TextureLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TextureLoader.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/TextureLoader.cpp"; sourceTree = "<group>"; };
7631049E20BC1B5600927A1E /* BoneData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BoneData.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/BoneData.cpp"; sourceTree = "<group>"; };
7631049F20BC1B5600927A1E /* Atlas.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Atlas.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/Atlas.cpp"; sourceTree = "<group>"; };
763104A020BC1B5600927A1E /* Triangulator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Triangulator.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/Triangulator.cpp"; sourceTree = "<group>"; };
763104A120BC1B5600927A1E /* Skeleton.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Skeleton.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/Skeleton.cpp"; sourceTree = "<group>"; };
763104A220BC1B5600927A1E /* AttachmentLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AttachmentLoader.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/AttachmentLoader.cpp"; sourceTree = "<group>"; };
763104A320BC1B5600927A1E /* Constraint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Constraint.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/Constraint.cpp"; sourceTree = "<group>"; };
763104A420BC1B5600927A1E /* AttachmentTimeline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AttachmentTimeline.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/AttachmentTimeline.cpp"; sourceTree = "<group>"; };
763104A520BC1B5600927A1E /* Updatable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Updatable.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/Updatable.cpp"; sourceTree = "<group>"; };
763104A620BC1B5700927A1E /* RegionAttachment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegionAttachment.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/RegionAttachment.cpp"; sourceTree = "<group>"; };
763104A720BC1B5700927A1E /* ClippingAttachment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClippingAttachment.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/ClippingAttachment.cpp"; sourceTree = "<group>"; };
763104A820BC1B5700927A1E /* TwoColorTimeline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TwoColorTimeline.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/TwoColorTimeline.cpp"; sourceTree = "<group>"; };
763104A920BC1B5700927A1E /* TransformConstraintData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TransformConstraintData.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/TransformConstraintData.cpp"; sourceTree = "<group>"; };
763104AA20BC1B5700927A1E /* PathAttachment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PathAttachment.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/PathAttachment.cpp"; sourceTree = "<group>"; };
763104AB20BC1B5700927A1E /* BoundingBoxAttachment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BoundingBoxAttachment.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/BoundingBoxAttachment.cpp"; sourceTree = "<group>"; };
763104AC20BC1B5700927A1E /* Skin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Skin.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/Skin.cpp"; sourceTree = "<group>"; };
763104AD20BC1B5700927A1E /* IkConstraintData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IkConstraintData.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/IkConstraintData.cpp"; sourceTree = "<group>"; };
763104AE20BC1B5800927A1E /* VertexEffect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VertexEffect.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/VertexEffect.cpp"; sourceTree = "<group>"; };
763104AF20BC1B5800927A1E /* AnimationStateData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AnimationStateData.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/AnimationStateData.cpp"; sourceTree = "<group>"; };
763104B020BC1B5800927A1E /* EventData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EventData.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/EventData.cpp"; sourceTree = "<group>"; };
763104B120BC1B5800927A1E /* SkeletonClipping.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SkeletonClipping.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/SkeletonClipping.cpp"; sourceTree = "<group>"; };
763104B220BC1B5800927A1E /* IkConstraintTimeline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IkConstraintTimeline.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/IkConstraintTimeline.cpp"; sourceTree = "<group>"; };
763104B320BC1B5C00927A1E /* Timeline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Timeline.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/Timeline.cpp"; sourceTree = "<group>"; };
763104B420BC1B5C00927A1E /* AtlasAttachmentLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AtlasAttachmentLoader.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/AtlasAttachmentLoader.cpp"; sourceTree = "<group>"; };
763104B520BC1B5C00927A1E /* LinkedMesh.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LinkedMesh.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/LinkedMesh.cpp"; sourceTree = "<group>"; };
763104B620BC1B5C00927A1E /* Animation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Animation.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/Animation.cpp"; sourceTree = "<group>"; };
763104B720BC1B5C00927A1E /* Attachment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Attachment.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/Attachment.cpp"; sourceTree = "<group>"; };
763104B820BC1B5C00927A1E /* MeshAttachment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MeshAttachment.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/MeshAttachment.cpp"; sourceTree = "<group>"; };
763104B920BC1B5C00927A1E /* SlotData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SlotData.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/SlotData.cpp"; sourceTree = "<group>"; };
763104BA20BC1B5D00927A1E /* Bone.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Bone.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/Bone.cpp"; sourceTree = "<group>"; };
763104BB20BC1B5D00927A1E /* Json.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Json.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/Json.cpp"; sourceTree = "<group>"; };
763104BC20BC1B5D00927A1E /* SkeletonJson.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SkeletonJson.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/SkeletonJson.cpp"; sourceTree = "<group>"; };
763104BD20BC1B5D00927A1E /* TransformConstraint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TransformConstraint.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/TransformConstraint.cpp"; sourceTree = "<group>"; };
763104BE20BC1B5D00927A1E /* DeformTimeline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DeformTimeline.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/DeformTimeline.cpp"; sourceTree = "<group>"; };
763104BF20BC1B5E00927A1E /* PathConstraintData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PathConstraintData.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/PathConstraintData.cpp"; sourceTree = "<group>"; };
763104C020BC1B5E00927A1E /* SkeletonBounds.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SkeletonBounds.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/SkeletonBounds.cpp"; sourceTree = "<group>"; };
763104C120BC1B5E00927A1E /* ShearTimeline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ShearTimeline.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/ShearTimeline.cpp"; sourceTree = "<group>"; };
763104C220BC1B5E00927A1E /* TranslateTimeline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TranslateTimeline.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/TranslateTimeline.cpp"; sourceTree = "<group>"; };
76A45BDC1E64396800745AA1 /* SkeletonTwoColorBatch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SkeletonTwoColorBatch.cpp; path = ../../src/spine/SkeletonTwoColorBatch.cpp; sourceTree = "<group>"; }; 76A45BDC1E64396800745AA1 /* SkeletonTwoColorBatch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SkeletonTwoColorBatch.cpp; path = ../../src/spine/SkeletonTwoColorBatch.cpp; sourceTree = "<group>"; };
76A45BDD1E64396800745AA1 /* SkeletonTwoColorBatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkeletonTwoColorBatch.h; path = ../../src/spine/SkeletonTwoColorBatch.h; sourceTree = "<group>"; }; 76A45BDD1E64396800745AA1 /* SkeletonTwoColorBatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkeletonTwoColorBatch.h; path = ../../src/spine/SkeletonTwoColorBatch.h; sourceTree = "<group>"; };
76AAA3B31D180F7C00C54FCB /* AppDelegate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AppDelegate.cpp; sourceTree = "<group>"; }; 76AAA3B31D180F7C00C54FCB /* AppDelegate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AppDelegate.cpp; sourceTree = "<group>"; };
@ -279,8 +379,6 @@
76AAA3BF1D180F7C00C54FCB /* SpineboyExample.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpineboyExample.h; sourceTree = "<group>"; }; 76AAA3BF1D180F7C00C54FCB /* SpineboyExample.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpineboyExample.h; sourceTree = "<group>"; };
76AAA4001D18106000C54FCB /* AttachmentVertices.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AttachmentVertices.cpp; path = ../../src/spine/AttachmentVertices.cpp; sourceTree = "<group>"; }; 76AAA4001D18106000C54FCB /* AttachmentVertices.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AttachmentVertices.cpp; path = ../../src/spine/AttachmentVertices.cpp; sourceTree = "<group>"; };
76AAA4011D18106000C54FCB /* AttachmentVertices.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AttachmentVertices.h; path = ../../src/spine/AttachmentVertices.h; sourceTree = "<group>"; }; 76AAA4011D18106000C54FCB /* AttachmentVertices.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AttachmentVertices.h; path = ../../src/spine/AttachmentVertices.h; sourceTree = "<group>"; };
76AAA4021D18106000C54FCB /* Cocos2dAttachmentLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Cocos2dAttachmentLoader.cpp; path = ../../src/spine/Cocos2dAttachmentLoader.cpp; sourceTree = "<group>"; };
76AAA4031D18106000C54FCB /* Cocos2dAttachmentLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Cocos2dAttachmentLoader.h; path = ../../src/spine/Cocos2dAttachmentLoader.h; sourceTree = "<group>"; };
76AAA4041D18106000C54FCB /* SkeletonAnimation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SkeletonAnimation.cpp; path = ../../src/spine/SkeletonAnimation.cpp; sourceTree = "<group>"; }; 76AAA4041D18106000C54FCB /* SkeletonAnimation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SkeletonAnimation.cpp; path = ../../src/spine/SkeletonAnimation.cpp; sourceTree = "<group>"; };
76AAA4051D18106000C54FCB /* SkeletonAnimation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkeletonAnimation.h; path = ../../src/spine/SkeletonAnimation.h; sourceTree = "<group>"; }; 76AAA4051D18106000C54FCB /* SkeletonAnimation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkeletonAnimation.h; path = ../../src/spine/SkeletonAnimation.h; sourceTree = "<group>"; };
76AAA4061D18106000C54FCB /* SkeletonBatch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SkeletonBatch.cpp; path = ../../src/spine/SkeletonBatch.cpp; sourceTree = "<group>"; }; 76AAA4061D18106000C54FCB /* SkeletonBatch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SkeletonBatch.cpp; path = ../../src/spine/SkeletonBatch.cpp; sourceTree = "<group>"; };
@ -292,51 +390,10 @@
76AAA4521D18132D00C54FCB /* common */ = {isa = PBXFileReference; lastKnownFileType = folder; path = common; sourceTree = "<group>"; }; 76AAA4521D18132D00C54FCB /* common */ = {isa = PBXFileReference; lastKnownFileType = folder; path = common; sourceTree = "<group>"; };
76D1BFDE2029E35100A0272D /* SkeletonRendererSeparatorExample.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkeletonRendererSeparatorExample.h; sourceTree = "<group>"; }; 76D1BFDE2029E35100A0272D /* SkeletonRendererSeparatorExample.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkeletonRendererSeparatorExample.h; sourceTree = "<group>"; };
76D1BFDF2029E35200A0272D /* SkeletonRendererSeparatorExample.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SkeletonRendererSeparatorExample.cpp; sourceTree = "<group>"; }; 76D1BFDF2029E35200A0272D /* SkeletonRendererSeparatorExample.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SkeletonRendererSeparatorExample.cpp; sourceTree = "<group>"; };
76D520D71EB3611300572471 /* ClippingAttachment.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ClippingAttachment.c; path = "../../../spine-c/spine-c/src/spine/ClippingAttachment.c"; sourceTree = "<group>"; };
76D520D81EB3611300572471 /* SkeletonClipping.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SkeletonClipping.c; path = "../../../spine-c/spine-c/src/spine/SkeletonClipping.c"; sourceTree = "<group>"; };
76D520D91EB3611300572471 /* Triangulator.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Triangulator.c; path = "../../../spine-c/spine-c/src/spine/Triangulator.c"; sourceTree = "<group>"; };
76D520E11EB3625700572471 /* Array.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Array.c; path = "../../../spine-c/spine-c/src/spine/Array.c"; sourceTree = "<group>"; };
76D520E41EB362DD00572471 /* CoinExample.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CoinExample.cpp; sourceTree = "<group>"; }; 76D520E41EB362DD00572471 /* CoinExample.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CoinExample.cpp; sourceTree = "<group>"; };
76D520E51EB362DD00572471 /* CoinExample.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoinExample.h; sourceTree = "<group>"; }; 76D520E51EB362DD00572471 /* CoinExample.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoinExample.h; sourceTree = "<group>"; };
76F28C8F1DEC7EBA00CDE54D /* Animation.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Animation.c; path = "../../../spine-c/spine-c/src/spine/Animation.c"; sourceTree = "<group>"; };
76F28C901DEC7EBA00CDE54D /* AnimationState.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = AnimationState.c; path = "../../../spine-c/spine-c/src/spine/AnimationState.c"; sourceTree = "<group>"; };
76F28C911DEC7EBA00CDE54D /* AnimationStateData.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = AnimationStateData.c; path = "../../../spine-c/spine-c/src/spine/AnimationStateData.c"; sourceTree = "<group>"; };
76F28C921DEC7EBA00CDE54D /* Atlas.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Atlas.c; path = "../../../spine-c/spine-c/src/spine/Atlas.c"; sourceTree = "<group>"; };
76F28C931DEC7EBA00CDE54D /* AtlasAttachmentLoader.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = AtlasAttachmentLoader.c; path = "../../../spine-c/spine-c/src/spine/AtlasAttachmentLoader.c"; sourceTree = "<group>"; };
76F28C941DEC7EBA00CDE54D /* Attachment.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Attachment.c; path = "../../../spine-c/spine-c/src/spine/Attachment.c"; sourceTree = "<group>"; };
76F28C951DEC7EBA00CDE54D /* AttachmentLoader.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = AttachmentLoader.c; path = "../../../spine-c/spine-c/src/spine/AttachmentLoader.c"; sourceTree = "<group>"; };
76F28C961DEC7EBA00CDE54D /* Bone.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Bone.c; path = "../../../spine-c/spine-c/src/spine/Bone.c"; sourceTree = "<group>"; };
76F28C971DEC7EBA00CDE54D /* BoneData.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = BoneData.c; path = "../../../spine-c/spine-c/src/spine/BoneData.c"; sourceTree = "<group>"; };
76F28C981DEC7EBA00CDE54D /* BoundingBoxAttachment.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = BoundingBoxAttachment.c; path = "../../../spine-c/spine-c/src/spine/BoundingBoxAttachment.c"; sourceTree = "<group>"; };
76F28C991DEC7EBA00CDE54D /* Event.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Event.c; path = "../../../spine-c/spine-c/src/spine/Event.c"; sourceTree = "<group>"; };
76F28C9A1DEC7EBA00CDE54D /* EventData.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = EventData.c; path = "../../../spine-c/spine-c/src/spine/EventData.c"; sourceTree = "<group>"; };
76F28C9B1DEC7EBA00CDE54D /* extension.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = extension.c; path = "../../../spine-c/spine-c/src/spine/extension.c"; sourceTree = "<group>"; };
76F28C9C1DEC7EBA00CDE54D /* IkConstraint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = IkConstraint.c; path = "../../../spine-c/spine-c/src/spine/IkConstraint.c"; sourceTree = "<group>"; };
76F28C9D1DEC7EBA00CDE54D /* IkConstraintData.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = IkConstraintData.c; path = "../../../spine-c/spine-c/src/spine/IkConstraintData.c"; sourceTree = "<group>"; };
76F28C9E1DEC7EBA00CDE54D /* Json.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Json.c; path = "../../../spine-c/spine-c/src/spine/Json.c"; sourceTree = "<group>"; };
76F28C9F1DEC7EBA00CDE54D /* Json.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Json.h; path = "../../../spine-c/spine-c/src/spine/Json.h"; sourceTree = "<group>"; };
76F28CA01DEC7EBB00CDE54D /* kvec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = kvec.h; path = "../../../spine-c/spine-c/src/spine/kvec.h"; sourceTree = "<group>"; };
76F28CA11DEC7EBB00CDE54D /* MeshAttachment.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = MeshAttachment.c; path = "../../../spine-c/spine-c/src/spine/MeshAttachment.c"; sourceTree = "<group>"; };
76F28CA21DEC7EBB00CDE54D /* PathAttachment.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = PathAttachment.c; path = "../../../spine-c/spine-c/src/spine/PathAttachment.c"; sourceTree = "<group>"; };
76F28CA31DEC7EBB00CDE54D /* PathConstraint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = PathConstraint.c; path = "../../../spine-c/spine-c/src/spine/PathConstraint.c"; sourceTree = "<group>"; };
76F28CA41DEC7EBB00CDE54D /* PathConstraintData.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = PathConstraintData.c; path = "../../../spine-c/spine-c/src/spine/PathConstraintData.c"; sourceTree = "<group>"; };
76F28CA51DEC7EBB00CDE54D /* RegionAttachment.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = RegionAttachment.c; path = "../../../spine-c/spine-c/src/spine/RegionAttachment.c"; sourceTree = "<group>"; };
76F28CA61DEC7EBB00CDE54D /* Skeleton.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Skeleton.c; path = "../../../spine-c/spine-c/src/spine/Skeleton.c"; sourceTree = "<group>"; };
76F28CA71DEC7EBB00CDE54D /* SkeletonBinary.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SkeletonBinary.c; path = "../../../spine-c/spine-c/src/spine/SkeletonBinary.c"; sourceTree = "<group>"; };
76F28CA81DEC7EBB00CDE54D /* SkeletonBounds.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SkeletonBounds.c; path = "../../../spine-c/spine-c/src/spine/SkeletonBounds.c"; sourceTree = "<group>"; };
76F28CA91DEC7EBB00CDE54D /* SkeletonData.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SkeletonData.c; path = "../../../spine-c/spine-c/src/spine/SkeletonData.c"; sourceTree = "<group>"; };
76F28CAA1DEC7EBB00CDE54D /* SkeletonJson.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SkeletonJson.c; path = "../../../spine-c/spine-c/src/spine/SkeletonJson.c"; sourceTree = "<group>"; };
76F28CAB1DEC7EBB00CDE54D /* Skin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Skin.c; path = "../../../spine-c/spine-c/src/spine/Skin.c"; sourceTree = "<group>"; };
76F28CAC1DEC7EBB00CDE54D /* Slot.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Slot.c; path = "../../../spine-c/spine-c/src/spine/Slot.c"; sourceTree = "<group>"; };
76F28CAD1DEC7EBB00CDE54D /* SlotData.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SlotData.c; path = "../../../spine-c/spine-c/src/spine/SlotData.c"; sourceTree = "<group>"; };
76F28CAE1DEC7EBB00CDE54D /* TransformConstraint.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = TransformConstraint.c; path = "../../../spine-c/spine-c/src/spine/TransformConstraint.c"; sourceTree = "<group>"; };
76F28CAF1DEC7EBB00CDE54D /* TransformConstraintData.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = TransformConstraintData.c; path = "../../../spine-c/spine-c/src/spine/TransformConstraintData.c"; sourceTree = "<group>"; };
76F28CB01DEC7EBB00CDE54D /* VertexAttachment.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = VertexAttachment.c; path = "../../../spine-c/spine-c/src/spine/VertexAttachment.c"; sourceTree = "<group>"; };
76F5BD531D2BD7D3005917E5 /* TankExample.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TankExample.cpp; sourceTree = "<group>"; }; 76F5BD531D2BD7D3005917E5 /* TankExample.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TankExample.cpp; sourceTree = "<group>"; };
76F5BD541D2BD7D3005917E5 /* TankExample.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TankExample.h; sourceTree = "<group>"; }; 76F5BD541D2BD7D3005917E5 /* TankExample.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TankExample.h; sourceTree = "<group>"; };
76FAC18A1E3F97D2001CCC8C /* Color.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Color.c; path = "../../../spine-c/spine-c/src/spine/Color.c"; sourceTree = "<group>"; };
76FAC18B1E3F97D2001CCC8C /* PointAttachment.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = PointAttachment.c; path = "../../../spine-c/spine-c/src/spine/PointAttachment.c"; sourceTree = "<group>"; };
76FB150E1F01377200C5377F /* VertexEffect.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = VertexEffect.c; sourceTree = "<group>"; };
8262943D1AAF051F00CB7CF7 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; 8262943D1AAF051F00CB7CF7 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
BF170DB012928DE900B8313A /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; BF170DB012928DE900B8313A /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
BF170DB412928DE900B8313A /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; BF170DB412928DE900B8313A /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
@ -554,47 +611,67 @@
76AAA3B21D180F7300C54FCB /* spine */ = { 76AAA3B21D180F7300C54FCB /* spine */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
76FB150E1F01377200C5377F /* VertexEffect.c */, 763104B620BC1B5C00927A1E /* Animation.cpp */,
76D520E11EB3625700572471 /* Array.c */, 7631049B20BC1B5600927A1E /* AnimationState.cpp */,
76D520D71EB3611300572471 /* ClippingAttachment.c */, 763104AF20BC1B5800927A1E /* AnimationStateData.cpp */,
76D520D81EB3611300572471 /* SkeletonClipping.c */, 7631049F20BC1B5600927A1E /* Atlas.cpp */,
76D520D91EB3611300572471 /* Triangulator.c */, 763104B420BC1B5C00927A1E /* AtlasAttachmentLoader.cpp */,
76FAC18A1E3F97D2001CCC8C /* Color.c */, 763104B720BC1B5C00927A1E /* Attachment.cpp */,
76FAC18B1E3F97D2001CCC8C /* PointAttachment.c */, 763104A220BC1B5600927A1E /* AttachmentLoader.cpp */,
76F28C8F1DEC7EBA00CDE54D /* Animation.c */, 763104A420BC1B5600927A1E /* AttachmentTimeline.cpp */,
76F28C901DEC7EBA00CDE54D /* AnimationState.c */, 763104BA20BC1B5D00927A1E /* Bone.cpp */,
76F28C911DEC7EBA00CDE54D /* AnimationStateData.c */, 7631049E20BC1B5600927A1E /* BoneData.cpp */,
76F28C921DEC7EBA00CDE54D /* Atlas.c */, 763104AB20BC1B5700927A1E /* BoundingBoxAttachment.cpp */,
76F28C931DEC7EBA00CDE54D /* AtlasAttachmentLoader.c */, 763104A720BC1B5700927A1E /* ClippingAttachment.cpp */,
76F28C941DEC7EBA00CDE54D /* Attachment.c */, 7631049620BC1B5500927A1E /* ColorTimeline.cpp */,
76F28C951DEC7EBA00CDE54D /* AttachmentLoader.c */, 763104A320BC1B5600927A1E /* Constraint.cpp */,
76F28C961DEC7EBA00CDE54D /* Bone.c */, 7631048920BC1B5400927A1E /* CurveTimeline.cpp */,
76F28C971DEC7EBA00CDE54D /* BoneData.c */, 763104BE20BC1B5D00927A1E /* DeformTimeline.cpp */,
76F28C981DEC7EBA00CDE54D /* BoundingBoxAttachment.c */, 7631048A20BC1B5400927A1E /* DrawOrderTimeline.cpp */,
76F28C991DEC7EBA00CDE54D /* Event.c */, 7631048620BC1B5400927A1E /* Event.cpp */,
76F28C9A1DEC7EBA00CDE54D /* EventData.c */, 763104B020BC1B5800927A1E /* EventData.cpp */,
76F28C9B1DEC7EBA00CDE54D /* extension.c */, 7631048C20BC1B5400927A1E /* EventTimeline.cpp */,
76F28C9C1DEC7EBA00CDE54D /* IkConstraint.c */, 7631049920BC1B5500927A1E /* Extension.cpp */,
76F28C9D1DEC7EBA00CDE54D /* IkConstraintData.c */, 7631049720BC1B5500927A1E /* IkConstraint.cpp */,
76F28C9E1DEC7EBA00CDE54D /* Json.c */, 763104AD20BC1B5700927A1E /* IkConstraintData.cpp */,
76F28C9F1DEC7EBA00CDE54D /* Json.h */, 763104B220BC1B5800927A1E /* IkConstraintTimeline.cpp */,
76F28CA01DEC7EBB00CDE54D /* kvec.h */, 763104BB20BC1B5D00927A1E /* Json.cpp */,
76F28CA11DEC7EBB00CDE54D /* MeshAttachment.c */, 763104B520BC1B5C00927A1E /* LinkedMesh.cpp */,
76F28CA21DEC7EBB00CDE54D /* PathAttachment.c */, 7631049420BC1B5500927A1E /* MathUtil.cpp */,
76F28CA31DEC7EBB00CDE54D /* PathConstraint.c */, 763104B820BC1B5C00927A1E /* MeshAttachment.cpp */,
76F28CA41DEC7EBB00CDE54D /* PathConstraintData.c */, 763104AA20BC1B5700927A1E /* PathAttachment.cpp */,
76F28CA51DEC7EBB00CDE54D /* RegionAttachment.c */, 7631048720BC1B5400927A1E /* PathConstraint.cpp */,
76F28CA61DEC7EBB00CDE54D /* Skeleton.c */, 763104BF20BC1B5E00927A1E /* PathConstraintData.cpp */,
76F28CA71DEC7EBB00CDE54D /* SkeletonBinary.c */, 7631048B20BC1B5400927A1E /* PathConstraintMixTimeline.cpp */,
76F28CA81DEC7EBB00CDE54D /* SkeletonBounds.c */, 7631049320BC1B5500927A1E /* PathConstraintPositionTimeline.cpp */,
76F28CA91DEC7EBB00CDE54D /* SkeletonData.c */, 7631048D20BC1B5500927A1E /* PathConstraintSpacingTimeline.cpp */,
76F28CAA1DEC7EBB00CDE54D /* SkeletonJson.c */, 7631049120BC1B5500927A1E /* PointAttachment.cpp */,
76F28CAB1DEC7EBB00CDE54D /* Skin.c */, 763104A620BC1B5700927A1E /* RegionAttachment.cpp */,
76F28CAC1DEC7EBB00CDE54D /* Slot.c */, 7631049520BC1B5500927A1E /* RotateTimeline.cpp */,
76F28CAD1DEC7EBB00CDE54D /* SlotData.c */, 7631048F20BC1B5500927A1E /* RTTI.cpp */,
76F28CAE1DEC7EBB00CDE54D /* TransformConstraint.c */, 7631048820BC1B5400927A1E /* ScaleTimeline.cpp */,
76F28CAF1DEC7EBB00CDE54D /* TransformConstraintData.c */, 763104C120BC1B5E00927A1E /* ShearTimeline.cpp */,
76F28CB01DEC7EBB00CDE54D /* VertexAttachment.c */, 763104A120BC1B5600927A1E /* Skeleton.cpp */,
7631048E20BC1B5500927A1E /* SkeletonBinary.cpp */,
763104C020BC1B5E00927A1E /* SkeletonBounds.cpp */,
763104B120BC1B5800927A1E /* SkeletonClipping.cpp */,
7631049820BC1B5500927A1E /* SkeletonData.cpp */,
763104BC20BC1B5D00927A1E /* SkeletonJson.cpp */,
763104AC20BC1B5700927A1E /* Skin.cpp */,
7631049020BC1B5500927A1E /* Slot.cpp */,
763104B920BC1B5C00927A1E /* SlotData.cpp */,
7631049A20BC1B5500927A1E /* SpineObject.cpp */,
7631049D20BC1B5600927A1E /* TextureLoader.cpp */,
763104B320BC1B5C00927A1E /* Timeline.cpp */,
763104BD20BC1B5D00927A1E /* TransformConstraint.cpp */,
763104A920BC1B5700927A1E /* TransformConstraintData.cpp */,
7631049C20BC1B5600927A1E /* TransformConstraintTimeline.cpp */,
763104C220BC1B5E00927A1E /* TranslateTimeline.cpp */,
763104A020BC1B5600927A1E /* Triangulator.cpp */,
763104A820BC1B5700927A1E /* TwoColorTimeline.cpp */,
763104A520BC1B5600927A1E /* Updatable.cpp */,
7631049220BC1B5500927A1E /* VertexAttachment.cpp */,
763104AE20BC1B5800927A1E /* VertexEffect.cpp */,
); );
name = spine; name = spine;
sourceTree = "<group>"; sourceTree = "<group>";
@ -606,8 +683,6 @@
76A45BDD1E64396800745AA1 /* SkeletonTwoColorBatch.h */, 76A45BDD1E64396800745AA1 /* SkeletonTwoColorBatch.h */,
76AAA4001D18106000C54FCB /* AttachmentVertices.cpp */, 76AAA4001D18106000C54FCB /* AttachmentVertices.cpp */,
76AAA4011D18106000C54FCB /* AttachmentVertices.h */, 76AAA4011D18106000C54FCB /* AttachmentVertices.h */,
76AAA4021D18106000C54FCB /* Cocos2dAttachmentLoader.cpp */,
76AAA4031D18106000C54FCB /* Cocos2dAttachmentLoader.h */,
76AAA4041D18106000C54FCB /* SkeletonAnimation.cpp */, 76AAA4041D18106000C54FCB /* SkeletonAnimation.cpp */,
76AAA4051D18106000C54FCB /* SkeletonAnimation.h */, 76AAA4051D18106000C54FCB /* SkeletonAnimation.h */,
76AAA4061D18106000C54FCB /* SkeletonBatch.cpp */, 76AAA4061D18106000C54FCB /* SkeletonBatch.cpp */,
@ -760,63 +835,84 @@
isa = PBXSourcesBuildPhase; isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
76F28CCA1DEC7EBB00CDE54D /* SkeletonJson.c in Sources */, 763104D320BC1B5E00927A1E /* ColorTimeline.cpp in Sources */,
763104FA20BC1B5E00927A1E /* TransformConstraint.cpp in Sources */,
763104CB20BC1B5E00927A1E /* SkeletonBinary.cpp in Sources */,
76AAA40C1D18106000C54FCB /* AttachmentVertices.cpp in Sources */, 76AAA40C1D18106000C54FCB /* AttachmentVertices.cpp in Sources */,
76D1BFE02029E35200A0272D /* SkeletonRendererSeparatorExample.cpp in Sources */, 76D1BFE02029E35200A0272D /* SkeletonRendererSeparatorExample.cpp in Sources */,
76F28CC81DEC7EBB00CDE54D /* SkeletonBounds.c in Sources */, 763104EF20BC1B5E00927A1E /* IkConstraintTimeline.cpp in Sources */,
76F28CB71DEC7EBB00CDE54D /* AttachmentLoader.c in Sources */, 763104E020BC1B5E00927A1E /* Constraint.cpp in Sources */,
763104D820BC1B5E00927A1E /* AnimationState.cpp in Sources */,
763104EE20BC1B5E00927A1E /* SkeletonClipping.cpp in Sources */,
763104E420BC1B5E00927A1E /* ClippingAttachment.cpp in Sources */,
763104C620BC1B5E00927A1E /* CurveTimeline.cpp in Sources */,
763104E120BC1B5E00927A1E /* AttachmentTimeline.cpp in Sources */,
763104ED20BC1B5E00927A1E /* EventData.cpp in Sources */,
763104FD20BC1B5E00927A1E /* SkeletonBounds.cpp in Sources */,
76F5BD551D2BD7D3005917E5 /* TankExample.cpp in Sources */, 76F5BD551D2BD7D3005917E5 /* TankExample.cpp in Sources */,
76F28CCC1DEC7EBB00CDE54D /* Slot.c in Sources */, 763104CD20BC1B5E00927A1E /* Slot.cpp in Sources */,
76F28CB31DEC7EBB00CDE54D /* AnimationStateData.c in Sources */,
76D520E21EB3625700572471 /* Array.c in Sources */,
76F28CBE1DEC7EBB00CDE54D /* IkConstraint.c in Sources */,
76AAA3C51D180F7C00C54FCB /* SpineboyExample.cpp in Sources */, 76AAA3C51D180F7C00C54FCB /* SpineboyExample.cpp in Sources */,
763104F220BC1B5E00927A1E /* LinkedMesh.cpp in Sources */,
76AAA3C11D180F7C00C54FCB /* BatchingExample.cpp in Sources */, 76AAA3C11D180F7C00C54FCB /* BatchingExample.cpp in Sources */,
76F28CD01DEC7EBB00CDE54D /* VertexAttachment.c in Sources */, 763104D520BC1B5E00927A1E /* SkeletonData.cpp in Sources */,
76F28CBD1DEC7EBB00CDE54D /* extension.c in Sources */, 763104D620BC1B5E00927A1E /* Extension.cpp in Sources */,
76F28CB11DEC7EBB00CDE54D /* Animation.c in Sources */,
76F28CC71DEC7EBB00CDE54D /* SkeletonBinary.c in Sources */,
76AAA40D1D18106000C54FCB /* Cocos2dAttachmentLoader.cpp in Sources */,
76F28CC51DEC7EBB00CDE54D /* RegionAttachment.c in Sources */,
76AAA40F1D18106000C54FCB /* SkeletonBatch.cpp in Sources */, 76AAA40F1D18106000C54FCB /* SkeletonBatch.cpp in Sources */,
76F28CBB1DEC7EBB00CDE54D /* Event.c in Sources */, 763104C920BC1B5E00927A1E /* EventTimeline.cpp in Sources */,
763104EB20BC1B5E00927A1E /* VertexEffect.cpp in Sources */,
76AAA3C31D180F7C00C54FCB /* RaptorExample.cpp in Sources */, 76AAA3C31D180F7C00C54FCB /* RaptorExample.cpp in Sources */,
76F28CB51DEC7EBB00CDE54D /* AtlasAttachmentLoader.c in Sources */, 763104D920BC1B5E00927A1E /* TransformConstraintTimeline.cpp in Sources */,
763104CF20BC1B5E00927A1E /* VertexAttachment.cpp in Sources */,
763104E720BC1B5E00927A1E /* PathAttachment.cpp in Sources */,
763104F820BC1B5E00927A1E /* Json.cpp in Sources */,
763104F620BC1B5E00927A1E /* SlotData.cpp in Sources */,
763104DF20BC1B5E00927A1E /* AttachmentLoader.cpp in Sources */,
76AAA3C01D180F7C00C54FCB /* AppDelegate.cpp in Sources */, 76AAA3C01D180F7C00C54FCB /* AppDelegate.cpp in Sources */,
76FAC18D1E3F97D2001CCC8C /* PointAttachment.c in Sources */, 763104C420BC1B5E00927A1E /* PathConstraint.cpp in Sources */,
76F28CC31DEC7EBB00CDE54D /* PathConstraint.c in Sources */, 763104F920BC1B5E00927A1E /* SkeletonJson.cpp in Sources */,
503AE10017EB989F00D1A890 /* AppController.mm in Sources */, 503AE10017EB989F00D1A890 /* AppController.mm in Sources */,
76F28CC11DEC7EBB00CDE54D /* MeshAttachment.c in Sources */, 763104E820BC1B5E00927A1E /* BoundingBoxAttachment.cpp in Sources */,
76F28CC01DEC7EBB00CDE54D /* Json.c in Sources */, 763104C720BC1B5E00927A1E /* DrawOrderTimeline.cpp in Sources */,
76F28CC21DEC7EBB00CDE54D /* PathAttachment.c in Sources */, 763104F520BC1B5E00927A1E /* MeshAttachment.cpp in Sources */,
76F28CBA1DEC7EBB00CDE54D /* BoundingBoxAttachment.c in Sources */, 763104E520BC1B5E00927A1E /* TwoColorTimeline.cpp in Sources */,
76F28CBC1DEC7EBB00CDE54D /* EventData.c in Sources */, 763104D420BC1B5E00927A1E /* IkConstraint.cpp in Sources */,
76F28CCD1DEC7EBB00CDE54D /* SlotData.c in Sources */, 763104E920BC1B5E00927A1E /* Skin.cpp in Sources */,
763104C820BC1B5E00927A1E /* PathConstraintMixTimeline.cpp in Sources */,
763104D120BC1B5E00927A1E /* MathUtil.cpp in Sources */,
763104DD20BC1B5E00927A1E /* Triangulator.cpp in Sources */,
763104F320BC1B5E00927A1E /* Animation.cpp in Sources */,
76AAA40E1D18106000C54FCB /* SkeletonAnimation.cpp in Sources */, 76AAA40E1D18106000C54FCB /* SkeletonAnimation.cpp in Sources */,
76F28CB41DEC7EBB00CDE54D /* Atlas.c in Sources */,
76F28CB21DEC7EBB00CDE54D /* AnimationState.c in Sources */,
76AAA4111D18106000C54FCB /* spine-cocos2dx.cpp in Sources */, 76AAA4111D18106000C54FCB /* spine-cocos2dx.cpp in Sources */,
76F28CCF1DEC7EBB00CDE54D /* TransformConstraintData.c in Sources */, 763104FC20BC1B5E00927A1E /* PathConstraintData.cpp in Sources */,
76F28CCE1DEC7EBB00CDE54D /* TransformConstraint.c in Sources */, 763104DC20BC1B5E00927A1E /* Atlas.cpp in Sources */,
76F28CB91DEC7EBB00CDE54D /* BoneData.c in Sources */, 763104FF20BC1B5E00927A1E /* TranslateTimeline.cpp in Sources */,
763104C320BC1B5E00927A1E /* Event.cpp in Sources */,
763104DA20BC1B5E00927A1E /* TextureLoader.cpp in Sources */,
763104F720BC1B5E00927A1E /* Bone.cpp in Sources */,
763104DB20BC1B5E00927A1E /* BoneData.cpp in Sources */,
763104D020BC1B5E00927A1E /* PathConstraintPositionTimeline.cpp in Sources */,
763104C520BC1B5E00927A1E /* ScaleTimeline.cpp in Sources */,
763104DE20BC1B5E00927A1E /* Skeleton.cpp in Sources */,
76AAA3C21D180F7C00C54FCB /* GoblinsExample.cpp in Sources */, 76AAA3C21D180F7C00C54FCB /* GoblinsExample.cpp in Sources */,
76F28CC91DEC7EBB00CDE54D /* SkeletonData.c in Sources */, 763104FB20BC1B5E00927A1E /* DeformTimeline.cpp in Sources */,
76D520DA1EB3611300572471 /* ClippingAttachment.c in Sources */,
76F28CC41DEC7EBB00CDE54D /* PathConstraintData.c in Sources */,
76F28CB81DEC7EBB00CDE54D /* Bone.c in Sources */,
76F28CB61DEC7EBB00CDE54D /* Attachment.c in Sources */,
503AE10217EB989F00D1A890 /* RootViewController.mm in Sources */, 503AE10217EB989F00D1A890 /* RootViewController.mm in Sources */,
76FB150F1F01377200C5377F /* VertexEffect.c in Sources */,
503AE10117EB989F00D1A890 /* main.m in Sources */, 503AE10117EB989F00D1A890 /* main.m in Sources */,
76D520DB1EB3611300572471 /* SkeletonClipping.c in Sources */,
76F28CCB1DEC7EBB00CDE54D /* Skin.c in Sources */,
76A45BDE1E64396800745AA1 /* SkeletonTwoColorBatch.cpp in Sources */, 76A45BDE1E64396800745AA1 /* SkeletonTwoColorBatch.cpp in Sources */,
76F28CBF1DEC7EBB00CDE54D /* IkConstraintData.c in Sources */, 763104CC20BC1B5E00927A1E /* RTTI.cpp in Sources */,
76F28CC61DEC7EBB00CDE54D /* Skeleton.c in Sources */, 763104F020BC1B5E00927A1E /* Timeline.cpp in Sources */,
763104FE20BC1B5E00927A1E /* ShearTimeline.cpp in Sources */,
76AAA4101D18106000C54FCB /* SkeletonRenderer.cpp in Sources */, 76AAA4101D18106000C54FCB /* SkeletonRenderer.cpp in Sources */,
763104F120BC1B5E00927A1E /* AtlasAttachmentLoader.cpp in Sources */,
763104EC20BC1B5E00927A1E /* AnimationStateData.cpp in Sources */,
763104CE20BC1B5E00927A1E /* PointAttachment.cpp in Sources */,
763104EA20BC1B5E00927A1E /* IkConstraintData.cpp in Sources */,
763104F420BC1B5E00927A1E /* Attachment.cpp in Sources */,
763104E620BC1B5E00927A1E /* TransformConstraintData.cpp in Sources */,
763104D720BC1B5E00927A1E /* SpineObject.cpp in Sources */,
763104CA20BC1B5E00927A1E /* PathConstraintSpacingTimeline.cpp in Sources */,
76D520E61EB362DD00572471 /* CoinExample.cpp in Sources */, 76D520E61EB362DD00572471 /* CoinExample.cpp in Sources */,
76FAC18C1E3F97D2001CCC8C /* Color.c in Sources */, 763104E220BC1B5E00927A1E /* Updatable.cpp in Sources */,
76D520DC1EB3611300572471 /* Triangulator.c in Sources */, 763104D220BC1B5E00927A1E /* RotateTimeline.cpp in Sources */,
763104E320BC1B5E00927A1E /* RegionAttachment.cpp in Sources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@ -824,49 +920,69 @@
isa = PBXSourcesBuildPhase; isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
7631059E20BC1B9700927A1E /* Animation.cpp in Sources */,
7631059F20BC1B9700927A1E /* AnimationState.cpp in Sources */,
763105A020BC1B9700927A1E /* AnimationStateData.cpp in Sources */,
763105A120BC1B9700927A1E /* Atlas.cpp in Sources */,
763105A220BC1B9700927A1E /* AtlasAttachmentLoader.cpp in Sources */,
763105A320BC1B9700927A1E /* Attachment.cpp in Sources */,
763105A420BC1B9700927A1E /* AttachmentLoader.cpp in Sources */,
763105A520BC1B9700927A1E /* AttachmentTimeline.cpp in Sources */,
763105A620BC1B9700927A1E /* Bone.cpp in Sources */,
763105A720BC1B9700927A1E /* BoneData.cpp in Sources */,
763105A820BC1B9700927A1E /* BoundingBoxAttachment.cpp in Sources */,
763105A920BC1B9700927A1E /* ClippingAttachment.cpp in Sources */,
763105AA20BC1B9700927A1E /* ColorTimeline.cpp in Sources */,
763105AB20BC1B9700927A1E /* Constraint.cpp in Sources */,
763105AC20BC1B9700927A1E /* CurveTimeline.cpp in Sources */,
763105AD20BC1B9700927A1E /* DeformTimeline.cpp in Sources */,
763105AE20BC1B9700927A1E /* DrawOrderTimeline.cpp in Sources */,
763105AF20BC1B9700927A1E /* Event.cpp in Sources */,
763105B020BC1B9700927A1E /* EventData.cpp in Sources */,
763105B120BC1B9700927A1E /* EventTimeline.cpp in Sources */,
763105B220BC1B9700927A1E /* Extension.cpp in Sources */,
763105B320BC1B9700927A1E /* IkConstraint.cpp in Sources */,
763105B420BC1B9700927A1E /* IkConstraintData.cpp in Sources */,
763105B520BC1B9700927A1E /* IkConstraintTimeline.cpp in Sources */,
763105B620BC1B9700927A1E /* Json.cpp in Sources */,
763105B720BC1B9700927A1E /* LinkedMesh.cpp in Sources */,
763105B820BC1B9700927A1E /* MathUtil.cpp in Sources */,
763105B920BC1B9700927A1E /* MeshAttachment.cpp in Sources */,
763105BA20BC1B9700927A1E /* PathAttachment.cpp in Sources */,
763105BB20BC1B9700927A1E /* PathConstraint.cpp in Sources */,
763105BC20BC1B9700927A1E /* PathConstraintData.cpp in Sources */,
763105BD20BC1B9700927A1E /* PathConstraintMixTimeline.cpp in Sources */,
763105BE20BC1B9700927A1E /* PathConstraintPositionTimeline.cpp in Sources */,
763105BF20BC1B9700927A1E /* PathConstraintSpacingTimeline.cpp in Sources */,
763105C020BC1B9700927A1E /* PointAttachment.cpp in Sources */,
763105C120BC1B9700927A1E /* RegionAttachment.cpp in Sources */,
763105C220BC1B9700927A1E /* RotateTimeline.cpp in Sources */,
763105C320BC1B9700927A1E /* RTTI.cpp in Sources */,
763105C420BC1B9700927A1E /* ScaleTimeline.cpp in Sources */,
763105C520BC1B9700927A1E /* ShearTimeline.cpp in Sources */,
763105C620BC1B9700927A1E /* Skeleton.cpp in Sources */,
763105C720BC1B9700927A1E /* SkeletonBinary.cpp in Sources */,
763105C820BC1B9700927A1E /* SkeletonBounds.cpp in Sources */,
763105C920BC1B9700927A1E /* SkeletonClipping.cpp in Sources */,
763105CA20BC1B9700927A1E /* SkeletonData.cpp in Sources */,
763105CB20BC1B9700927A1E /* SkeletonJson.cpp in Sources */,
763105CC20BC1B9700927A1E /* Skin.cpp in Sources */,
763105CD20BC1B9700927A1E /* Slot.cpp in Sources */,
763105CE20BC1B9700927A1E /* SlotData.cpp in Sources */,
763105CF20BC1B9700927A1E /* SpineObject.cpp in Sources */,
763105D020BC1B9700927A1E /* TextureLoader.cpp in Sources */,
763105D120BC1B9700927A1E /* Timeline.cpp in Sources */,
763105D220BC1B9700927A1E /* TransformConstraint.cpp in Sources */,
763105D320BC1B9700927A1E /* TransformConstraintData.cpp in Sources */,
763105D420BC1B9700927A1E /* TransformConstraintTimeline.cpp in Sources */,
763105D520BC1B9700927A1E /* TranslateTimeline.cpp in Sources */,
763105D620BC1B9700927A1E /* Triangulator.cpp in Sources */,
763105D720BC1B9700927A1E /* TwoColorTimeline.cpp in Sources */,
763105D820BC1B9700927A1E /* Updatable.cpp in Sources */,
763105D920BC1B9700927A1E /* VertexAttachment.cpp in Sources */,
763105DA20BC1B9700927A1E /* VertexEffect.cpp in Sources */,
76D1BFE12029E37700A0272D /* SkeletonRendererSeparatorExample.cpp in Sources */, 76D1BFE12029E37700A0272D /* SkeletonRendererSeparatorExample.cpp in Sources */,
76FB15111F0139B400C5377F /* VertexEffect.c in Sources */,
76D520E71EB3634600572471 /* CoinExample.cpp in Sources */, 76D520E71EB3634600572471 /* CoinExample.cpp in Sources */,
76D520E31EB3625B00572471 /* Array.c in Sources */,
76D520DE1EB3619800572471 /* ClippingAttachment.c in Sources */,
76D520DF1EB3619800572471 /* SkeletonClipping.c in Sources */,
76D520E01EB3619800572471 /* Triangulator.c in Sources */,
76FAC18F1E3F98A0001CCC8C /* Color.c in Sources */,
76FAC1901E3F98A0001CCC8C /* PointAttachment.c in Sources */,
76F28CD11DEC7FFA00CDE54D /* Animation.c in Sources */,
76F28CD21DEC7FFA00CDE54D /* AnimationState.c in Sources */,
76F28CD31DEC7FFA00CDE54D /* AnimationStateData.c in Sources */,
76F28CD41DEC7FFA00CDE54D /* Atlas.c in Sources */,
76F28CD51DEC7FFA00CDE54D /* AtlasAttachmentLoader.c in Sources */,
76F28CD61DEC7FFA00CDE54D /* Attachment.c in Sources */,
76F28CD71DEC7FFA00CDE54D /* AttachmentLoader.c in Sources */,
76F28CD81DEC7FFA00CDE54D /* Bone.c in Sources */,
76F28CD91DEC7FFA00CDE54D /* BoneData.c in Sources */,
76F28CDA1DEC7FFA00CDE54D /* BoundingBoxAttachment.c in Sources */,
76F28CDB1DEC7FFA00CDE54D /* Event.c in Sources */,
76F28CDC1DEC7FFA00CDE54D /* EventData.c in Sources */,
76F28CDD1DEC7FFA00CDE54D /* extension.c in Sources */,
76F28CDE1DEC7FFA00CDE54D /* IkConstraint.c in Sources */,
76F28CDF1DEC7FFA00CDE54D /* IkConstraintData.c in Sources */,
76F28CE01DEC7FFA00CDE54D /* Json.c in Sources */,
76F28CE11DEC7FFA00CDE54D /* Json.h in Sources */,
76F28CE21DEC7FFA00CDE54D /* kvec.h in Sources */,
76F28CE31DEC7FFA00CDE54D /* MeshAttachment.c in Sources */,
76F28CE41DEC7FFA00CDE54D /* PathAttachment.c in Sources */,
76F28CE51DEC7FFA00CDE54D /* PathConstraint.c in Sources */,
76F28CE61DEC7FFA00CDE54D /* PathConstraintData.c in Sources */,
76F28CE71DEC7FFA00CDE54D /* RegionAttachment.c in Sources */,
76F28CE81DEC7FFA00CDE54D /* Skeleton.c in Sources */,
76F28CE91DEC7FFA00CDE54D /* SkeletonBinary.c in Sources */,
76F28CEA1DEC7FFA00CDE54D /* SkeletonBounds.c in Sources */,
76F28CEB1DEC7FFA00CDE54D /* SkeletonData.c in Sources */,
76F28CEC1DEC7FFA00CDE54D /* SkeletonJson.c in Sources */,
76F28CED1DEC7FFA00CDE54D /* Skin.c in Sources */,
76F28CEE1DEC7FFA00CDE54D /* Slot.c in Sources */,
76F28CEF1DEC7FFA00CDE54D /* SlotData.c in Sources */,
76F28CF01DEC7FFA00CDE54D /* TransformConstraint.c in Sources */,
76F28CF11DEC7FFA00CDE54D /* TransformConstraintData.c in Sources */,
76F28CF21DEC7FFA00CDE54D /* VertexAttachment.c in Sources */,
76F5BD561D2BD7EF005917E5 /* TankExample.cpp in Sources */, 76F5BD561D2BD7EF005917E5 /* TankExample.cpp in Sources */,
76F5BD571D2BD7EF005917E5 /* TankExample.h in Sources */, 76F5BD571D2BD7EF005917E5 /* TankExample.h in Sources */,
76AAA43B1D1811B000C54FCB /* AppDelegate.cpp in Sources */, 76AAA43B1D1811B000C54FCB /* AppDelegate.cpp in Sources */,
@ -882,9 +998,7 @@
76AAA4471D1811B000C54FCB /* SpineboyExample.h in Sources */, 76AAA4471D1811B000C54FCB /* SpineboyExample.h in Sources */,
76AAA4121D18119F00C54FCB /* AttachmentVertices.cpp in Sources */, 76AAA4121D18119F00C54FCB /* AttachmentVertices.cpp in Sources */,
76AAA4131D18119F00C54FCB /* AttachmentVertices.h in Sources */, 76AAA4131D18119F00C54FCB /* AttachmentVertices.h in Sources */,
76AAA4141D18119F00C54FCB /* Cocos2dAttachmentLoader.cpp in Sources */,
76A45BDF1E64396800745AA1 /* SkeletonTwoColorBatch.cpp in Sources */, 76A45BDF1E64396800745AA1 /* SkeletonTwoColorBatch.cpp in Sources */,
76AAA4151D18119F00C54FCB /* Cocos2dAttachmentLoader.h in Sources */,
76AAA4161D18119F00C54FCB /* SkeletonAnimation.cpp in Sources */, 76AAA4161D18119F00C54FCB /* SkeletonAnimation.cpp in Sources */,
76AAA4171D18119F00C54FCB /* SkeletonAnimation.h in Sources */, 76AAA4171D18119F00C54FCB /* SkeletonAnimation.h in Sources */,
76AAA4181D18119F00C54FCB /* SkeletonBatch.cpp in Sources */, 76AAA4181D18119F00C54FCB /* SkeletonBatch.cpp in Sources */,
@ -1051,7 +1165,7 @@
"$(SRCROOT)/../cocos2d/extensions", "$(SRCROOT)/../cocos2d/extensions",
"$(SRCROOT)/../cocos2d/external", "$(SRCROOT)/../cocos2d/external",
"$(SRCROOT)/../cocos2d/external/chipmunk/include/chipmunk", "$(SRCROOT)/../cocos2d/external/chipmunk/include/chipmunk",
"$(SRCROOT)/../../../spine-c/spine-c/include", "$(SRCROOT)/../../../spine-cpp/spine-cpp/include",
"$(SRCROOT)/../../src", "$(SRCROOT)/../../src",
); );
IPHONEOS_DEPLOYMENT_TARGET = 6.0; IPHONEOS_DEPLOYMENT_TARGET = 6.0;
@ -1076,7 +1190,7 @@
"$(SRCROOT)/../cocos2d/extensions", "$(SRCROOT)/../cocos2d/extensions",
"$(SRCROOT)/../cocos2d/external", "$(SRCROOT)/../cocos2d/external",
"$(SRCROOT)/../cocos2d/external/chipmunk/include/chipmunk", "$(SRCROOT)/../cocos2d/external/chipmunk/include/chipmunk",
"$(SRCROOT)/../../../spine-c/spine-c/include", "$(SRCROOT)/../../../spine-cpp/spine-cpp/include",
"$(SRCROOT)/../../src", "$(SRCROOT)/../../src",
); );
IPHONEOS_DEPLOYMENT_TARGET = 6.0; IPHONEOS_DEPLOYMENT_TARGET = 6.0;

View File

@ -1,107 +0,0 @@
/******************************************************************************
* 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.
*****************************************************************************/
#include <spine/Cocos2dAttachmentLoader.h>
#include <spine/extension.h>
#include <spine/AttachmentVertices.h>
USING_NS_CC;
using namespace spine;
static unsigned short quadTriangles[6] = {0, 1, 2, 2, 3, 0};
spAttachment* _Cocos2dAttachmentLoader_createAttachment (spAttachmentLoader* loader, spSkin* skin, spAttachmentType type,
const char* name, const char* path) {
Cocos2dAttachmentLoader* self = SUB_CAST(Cocos2dAttachmentLoader, loader);
return spAttachmentLoader_createAttachment(SUPER(self->atlasAttachmentLoader), skin, type, name, path);
}
void _Cocos2dAttachmentLoader_configureAttachment (spAttachmentLoader* loader, spAttachment* attachment) {
attachment->attachmentLoader = loader;
switch (attachment->type) {
case SP_ATTACHMENT_REGION: {
spRegionAttachment* regionAttachment = SUB_CAST(spRegionAttachment, attachment);
spAtlasRegion* region = (spAtlasRegion*)regionAttachment->rendererObject;
AttachmentVertices* attachmentVertices = new AttachmentVertices((Texture2D*)region->page->rendererObject, 4, quadTriangles, 6);
V3F_C4B_T2F* vertices = attachmentVertices->_triangles->verts;
for (int i = 0, ii = 0; i < 4; ++i, ii += 2) {
vertices[i].texCoords.u = regionAttachment->uvs[ii];
vertices[i].texCoords.v = regionAttachment->uvs[ii + 1];
}
regionAttachment->rendererObject = attachmentVertices;
break;
}
case SP_ATTACHMENT_MESH: {
spMeshAttachment* meshAttachment = SUB_CAST(spMeshAttachment, attachment);
spAtlasRegion* region = (spAtlasRegion*)meshAttachment->rendererObject;
AttachmentVertices* attachmentVertices = new AttachmentVertices((Texture2D*)region->page->rendererObject,
meshAttachment->super.worldVerticesLength >> 1, meshAttachment->triangles, meshAttachment->trianglesCount);
V3F_C4B_T2F* vertices = attachmentVertices->_triangles->verts;
for (int i = 0, ii = 0, nn = meshAttachment->super.worldVerticesLength; ii < nn; ++i, ii += 2) {
vertices[i].texCoords.u = meshAttachment->uvs[ii];
vertices[i].texCoords.v = meshAttachment->uvs[ii + 1];
}
meshAttachment->rendererObject = attachmentVertices;
break;
}
default: ;
}
}
void _Cocos2dAttachmentLoader_disposeAttachment (spAttachmentLoader* loader, spAttachment* attachment) {
switch (attachment->type) {
case SP_ATTACHMENT_REGION: {
spRegionAttachment* regionAttachment = SUB_CAST(spRegionAttachment, attachment);
delete (AttachmentVertices*)regionAttachment->rendererObject;
break;
}
case SP_ATTACHMENT_MESH: {
spMeshAttachment* meshAttachment = SUB_CAST(spMeshAttachment, attachment);
delete (AttachmentVertices*)meshAttachment->rendererObject;
break;
}
default: ;
}
}
void _Cocos2dAttachmentLoader_dispose (spAttachmentLoader* loader) {
Cocos2dAttachmentLoader* self = SUB_CAST(Cocos2dAttachmentLoader, loader);
spAttachmentLoader_dispose(SUPER_CAST(spAttachmentLoader, self->atlasAttachmentLoader));
_spAttachmentLoader_deinit(loader);
}
Cocos2dAttachmentLoader* Cocos2dAttachmentLoader_create (spAtlas* atlas) {
Cocos2dAttachmentLoader* self = NEW(Cocos2dAttachmentLoader);
_spAttachmentLoader_init(SUPER(self), _Cocos2dAttachmentLoader_dispose, _Cocos2dAttachmentLoader_createAttachment,
_Cocos2dAttachmentLoader_configureAttachment, _Cocos2dAttachmentLoader_disposeAttachment);
self->atlasAttachmentLoader = spAtlasAttachmentLoader_create(atlas);
return self;
}

View File

@ -30,7 +30,7 @@
#include <spine/SkeletonAnimation.h> #include <spine/SkeletonAnimation.h>
#include <spine/spine-cocos2dx.h> #include <spine/spine-cocos2dx.h>
#include <spine/extension.h> #include <spine/Extension.h>
#include <algorithm> #include <algorithm>
USING_NS_CC; USING_NS_CC;
@ -49,34 +49,34 @@ typedef struct _TrackEntryListeners {
EventListener eventListener; EventListener eventListener;
} _TrackEntryListeners; } _TrackEntryListeners;
void animationCallback (spAnimationState* state, spEventType type, spTrackEntry* entry, spEvent* event) { void animationCallback (AnimationState* state, EventType type, TrackEntry* entry, Event* event) {
((SkeletonAnimation*)state->rendererObject)->onAnimationStateEvent(entry, type, event); ((SkeletonAnimation*)state->getRendererObject())->onAnimationStateEvent(entry, type, event);
} }
void trackEntryCallback (spAnimationState* state, spEventType type, spTrackEntry* entry, spEvent* event) { void trackEntryCallback (AnimationState* state, EventType type, TrackEntry* entry, Event* event) {
((SkeletonAnimation*)state->rendererObject)->onTrackEntryEvent(entry, type, event); ((SkeletonAnimation*)state->getRendererObject())->onTrackEntryEvent(entry, type, event);
if (type == SP_ANIMATION_DISPOSE) if (type == EventType_Dispose)
if (entry->rendererObject) delete (spine::_TrackEntryListeners*)entry->rendererObject; if (entry->getRendererObject()) delete (spine::_TrackEntryListeners*)entry->getRendererObject();
} }
static _TrackEntryListeners* getListeners (spTrackEntry* entry) { static _TrackEntryListeners* getListeners (TrackEntry* entry) {
if (!entry->rendererObject) { if (!entry->getRendererObject()) {
entry->rendererObject = new spine::_TrackEntryListeners(); entry->setRendererObject(new spine::_TrackEntryListeners());
entry->listener = trackEntryCallback; entry->setListener(trackEntryCallback);
} }
return (_TrackEntryListeners*)entry->rendererObject; return (_TrackEntryListeners*)entry->getRendererObject();
} }
// //
SkeletonAnimation* SkeletonAnimation::createWithData (spSkeletonData* skeletonData, bool ownsSkeletonData) { SkeletonAnimation* SkeletonAnimation::createWithData (SkeletonData* skeletonData, bool ownsSkeletonData) {
SkeletonAnimation* node = new SkeletonAnimation(); SkeletonAnimation* node = new SkeletonAnimation();
node->initWithData(skeletonData, ownsSkeletonData); node->initWithData(skeletonData, ownsSkeletonData);
node->autorelease(); node->autorelease();
return node; return node;
} }
SkeletonAnimation* SkeletonAnimation::createWithJsonFile (const std::string& skeletonJsonFile, spAtlas* atlas, float scale) { SkeletonAnimation* SkeletonAnimation::createWithJsonFile (const std::string& skeletonJsonFile, Atlas* atlas, float scale) {
SkeletonAnimation* node = new SkeletonAnimation(); SkeletonAnimation* node = new SkeletonAnimation();
node->initWithJsonFile(skeletonJsonFile, atlas, scale); node->initWithJsonFile(skeletonJsonFile, atlas, scale);
node->autorelease(); node->autorelease();
@ -85,13 +85,12 @@ SkeletonAnimation* SkeletonAnimation::createWithJsonFile (const std::string& ske
SkeletonAnimation* SkeletonAnimation::createWithJsonFile (const std::string& skeletonJsonFile, const std::string& atlasFile, float scale) { SkeletonAnimation* SkeletonAnimation::createWithJsonFile (const std::string& skeletonJsonFile, const std::string& atlasFile, float scale) {
SkeletonAnimation* node = new SkeletonAnimation(); SkeletonAnimation* node = new SkeletonAnimation();
spAtlas* atlas = spAtlas_createFromFile(atlasFile.c_str(), 0); node->initWithJsonFile(skeletonJsonFile, atlasFile, scale);
node->initWithJsonFile(skeletonJsonFile, atlas, scale);
node->autorelease(); node->autorelease();
return node; return node;
} }
SkeletonAnimation* SkeletonAnimation::createWithBinaryFile (const std::string& skeletonBinaryFile, spAtlas* atlas, float scale) { SkeletonAnimation* SkeletonAnimation::createWithBinaryFile (const std::string& skeletonBinaryFile, Atlas* atlas, float scale) {
SkeletonAnimation* node = new SkeletonAnimation(); SkeletonAnimation* node = new SkeletonAnimation();
node->initWithBinaryFile(skeletonBinaryFile, atlas, scale); node->initWithBinaryFile(skeletonBinaryFile, atlas, scale);
node->autorelease(); node->autorelease();
@ -100,8 +99,7 @@ SkeletonAnimation* SkeletonAnimation::createWithBinaryFile (const std::string& s
SkeletonAnimation* SkeletonAnimation::createWithBinaryFile (const std::string& skeletonBinaryFile, const std::string& atlasFile, float scale) { SkeletonAnimation* SkeletonAnimation::createWithBinaryFile (const std::string& skeletonBinaryFile, const std::string& atlasFile, float scale) {
SkeletonAnimation* node = new SkeletonAnimation(); SkeletonAnimation* node = new SkeletonAnimation();
spAtlas* atlas = spAtlas_createFromFile(atlasFile.c_str(), 0); node->initWithBinaryFile(skeletonBinaryFile, atlasFile, scale);
node->initWithBinaryFile(skeletonBinaryFile, atlas, scale);
node->autorelease(); node->autorelease();
return node; return node;
} }
@ -111,11 +109,9 @@ void SkeletonAnimation::initialize () {
super::initialize(); super::initialize();
_ownsAnimationStateData = true; _ownsAnimationStateData = true;
_state = spAnimationState_create(spAnimationStateData_create(_skeleton->data)); _state = new (__FILE__, __LINE__) AnimationState(new (__FILE__, __LINE__) AnimationStateData(_skeleton->getData()));
_state->rendererObject = this; _state->setRendererObject(this);
_state->listener = animationCallback; _state->setListener(animationCallback);
_spAnimationState* stateInternal = (_spAnimationState*)_state;
} }
SkeletonAnimation::SkeletonAnimation () SkeletonAnimation::SkeletonAnimation ()
@ -123,124 +119,124 @@ SkeletonAnimation::SkeletonAnimation ()
} }
SkeletonAnimation::~SkeletonAnimation () { SkeletonAnimation::~SkeletonAnimation () {
if (_ownsAnimationStateData) spAnimationStateData_dispose(_state->data); if (_ownsAnimationStateData) delete _state->getData();
spAnimationState_dispose(_state); delete _state;
} }
void SkeletonAnimation::update (float deltaTime) { void SkeletonAnimation::update (float deltaTime) {
super::update(deltaTime); super::update(deltaTime);
deltaTime *= _timeScale; deltaTime *= _timeScale;
spAnimationState_update(_state, deltaTime); _state->update(deltaTime);
spAnimationState_apply(_state, _skeleton); _state->apply(*_skeleton);
spSkeleton_updateWorldTransform(_skeleton); _skeleton->updateWorldTransform();
} }
void SkeletonAnimation::setAnimationStateData (spAnimationStateData* stateData) { void SkeletonAnimation::setAnimationStateData (AnimationStateData* stateData) {
CCASSERT(stateData, "stateData cannot be null."); CCASSERT(stateData, "stateData cannot be null.");
if (_ownsAnimationStateData) spAnimationStateData_dispose(_state->data); if (_ownsAnimationStateData) delete _state->getData();
spAnimationState_dispose(_state); delete _state;
_ownsAnimationStateData = false; _ownsAnimationStateData = false;
_state = spAnimationState_create(stateData); _state = new (__FILE__, __LINE__) AnimationState(stateData);
_state->rendererObject = this; _state->setRendererObject(this);
_state->listener = animationCallback; _state->setListener(animationCallback);
} }
void SkeletonAnimation::setMix (const std::string& fromAnimation, const std::string& toAnimation, float duration) { void SkeletonAnimation::setMix (const std::string& fromAnimation, const std::string& toAnimation, float duration) {
spAnimationStateData_setMixByName(_state->data, fromAnimation.c_str(), toAnimation.c_str(), duration); _state->getData()->setMix(fromAnimation.c_str(), toAnimation.c_str(), duration);
} }
spTrackEntry* SkeletonAnimation::setAnimation (int trackIndex, const std::string& name, bool loop) { TrackEntry* SkeletonAnimation::setAnimation (int trackIndex, const std::string& name, bool loop) {
spAnimation* animation = spSkeletonData_findAnimation(_skeleton->data, name.c_str()); Animation* animation = _skeleton->getData()->findAnimation(name.c_str());
if (!animation) { if (!animation) {
log("Spine: Animation not found: %s", name.c_str()); log("Spine: Animation not found: %s", name.c_str());
return 0; return 0;
} }
return spAnimationState_setAnimation(_state, trackIndex, animation, loop); return _state->setAnimation(trackIndex, animation, loop);
} }
spTrackEntry* SkeletonAnimation::addAnimation (int trackIndex, const std::string& name, bool loop, float delay) { TrackEntry* SkeletonAnimation::addAnimation (int trackIndex, const std::string& name, bool loop, float delay) {
spAnimation* animation = spSkeletonData_findAnimation(_skeleton->data, name.c_str()); Animation* animation = _skeleton->getData()->findAnimation(name.c_str());
if (!animation) { if (!animation) {
log("Spine: Animation not found: %s", name.c_str()); log("Spine: Animation not found: %s", name.c_str());
return 0; return 0;
} }
return spAnimationState_addAnimation(_state, trackIndex, animation, loop, delay); return _state->addAnimation(trackIndex, animation, loop, delay);
} }
spTrackEntry* SkeletonAnimation::setEmptyAnimation (int trackIndex, float mixDuration) { TrackEntry* SkeletonAnimation::setEmptyAnimation (int trackIndex, float mixDuration) {
return spAnimationState_setEmptyAnimation(_state, trackIndex, mixDuration); return _state->setEmptyAnimation(trackIndex, mixDuration);
} }
void SkeletonAnimation::setEmptyAnimations (float mixDuration) { void SkeletonAnimation::setEmptyAnimations (float mixDuration) {
spAnimationState_setEmptyAnimations(_state, mixDuration); _state->setEmptyAnimations(mixDuration);
} }
spTrackEntry* SkeletonAnimation::addEmptyAnimation (int trackIndex, float mixDuration, float delay) { TrackEntry* SkeletonAnimation::addEmptyAnimation (int trackIndex, float mixDuration, float delay) {
return spAnimationState_addEmptyAnimation(_state, trackIndex, mixDuration, delay); return _state->addEmptyAnimation(trackIndex, mixDuration, delay);
} }
spAnimation* SkeletonAnimation::findAnimation(const std::string& name) const { Animation* SkeletonAnimation::findAnimation(const std::string& name) const {
return spSkeletonData_findAnimation(_skeleton->data, name.c_str()); return _skeleton->getData()->findAnimation(name.c_str());
} }
spTrackEntry* SkeletonAnimation::getCurrent (int trackIndex) { TrackEntry* SkeletonAnimation::getCurrent (int trackIndex) {
return spAnimationState_getCurrent(_state, trackIndex); return _state->getCurrent(trackIndex);
} }
void SkeletonAnimation::clearTracks () { void SkeletonAnimation::clearTracks () {
spAnimationState_clearTracks(_state); _state->clearTracks();
} }
void SkeletonAnimation::clearTrack (int trackIndex) { void SkeletonAnimation::clearTrack (int trackIndex) {
spAnimationState_clearTrack(_state, trackIndex); _state->clearTrack(trackIndex);
} }
void SkeletonAnimation::onAnimationStateEvent (spTrackEntry* entry, spEventType type, spEvent* event) { void SkeletonAnimation::onAnimationStateEvent (TrackEntry* entry, EventType type, Event* event) {
switch (type) { switch (type) {
case SP_ANIMATION_START: case EventType_Start:
if (_startListener) _startListener(entry); if (_startListener) _startListener(entry);
break; break;
case SP_ANIMATION_INTERRUPT: case EventType_Interrupt:
if (_interruptListener) _interruptListener(entry); if (_interruptListener) _interruptListener(entry);
break; break;
case SP_ANIMATION_END: case EventType_End:
if (_endListener) _endListener(entry); if (_endListener) _endListener(entry);
break; break;
case SP_ANIMATION_DISPOSE: case EventType_Dispose:
if (_disposeListener) _disposeListener(entry); if (_disposeListener) _disposeListener(entry);
break; break;
case SP_ANIMATION_COMPLETE: case EventType_Complete:
if (_completeListener) _completeListener(entry); if (_completeListener) _completeListener(entry);
break; break;
case SP_ANIMATION_EVENT: case EventType_Event:
if (_eventListener) _eventListener(entry, event); if (_eventListener) _eventListener(entry, event);
break; break;
} }
} }
void SkeletonAnimation::onTrackEntryEvent (spTrackEntry* entry, spEventType type, spEvent* event) { void SkeletonAnimation::onTrackEntryEvent (TrackEntry* entry, EventType type, Event* event) {
if (!entry->rendererObject) return; if (!entry->getRendererObject()) return;
_TrackEntryListeners* listeners = (_TrackEntryListeners*)entry->rendererObject; _TrackEntryListeners* listeners = (_TrackEntryListeners*)entry->getRendererObject();
switch (type) { switch (type) {
case SP_ANIMATION_START: case EventType_Start:
if (listeners->startListener) listeners->startListener(entry); if (listeners->startListener) listeners->startListener(entry);
break; break;
case SP_ANIMATION_INTERRUPT: case EventType_Interrupt:
if (listeners->interruptListener) listeners->interruptListener(entry); if (listeners->interruptListener) listeners->interruptListener(entry);
break; break;
case SP_ANIMATION_END: case EventType_End:
if (listeners->endListener) listeners->endListener(entry); if (listeners->endListener) listeners->endListener(entry);
break; break;
case SP_ANIMATION_DISPOSE: case EventType_Dispose:
if (listeners->disposeListener) listeners->disposeListener(entry); if (listeners->disposeListener) listeners->disposeListener(entry);
break; break;
case SP_ANIMATION_COMPLETE: case EventType_Complete:
if (listeners->completeListener) listeners->completeListener(entry); if (listeners->completeListener) listeners->completeListener(entry);
break; break;
case SP_ANIMATION_EVENT: case EventType_Event:
if (listeners->eventListener) listeners->eventListener(entry, event); if (listeners->eventListener) listeners->eventListener(entry, event);
break; break;
} }
@ -270,31 +266,31 @@ void SkeletonAnimation::setEventListener (const EventListener& listener) {
_eventListener = listener; _eventListener = listener;
} }
void SkeletonAnimation::setTrackStartListener (spTrackEntry* entry, const StartListener& listener) { void SkeletonAnimation::setTrackStartListener (TrackEntry* entry, const StartListener& listener) {
getListeners(entry)->startListener = listener; getListeners(entry)->startListener = listener;
} }
void SkeletonAnimation::setTrackInterruptListener (spTrackEntry* entry, const InterruptListener& listener) { void SkeletonAnimation::setTrackInterruptListener (TrackEntry* entry, const InterruptListener& listener) {
getListeners(entry)->interruptListener = listener; getListeners(entry)->interruptListener = listener;
} }
void SkeletonAnimation::setTrackEndListener (spTrackEntry* entry, const EndListener& listener) { void SkeletonAnimation::setTrackEndListener (TrackEntry* entry, const EndListener& listener) {
getListeners(entry)->endListener = listener; getListeners(entry)->endListener = listener;
} }
void SkeletonAnimation::setTrackDisposeListener (spTrackEntry* entry, const DisposeListener& listener) { void SkeletonAnimation::setTrackDisposeListener (TrackEntry* entry, const DisposeListener& listener) {
getListeners(entry)->disposeListener = listener; getListeners(entry)->disposeListener = listener;
} }
void SkeletonAnimation::setTrackCompleteListener (spTrackEntry* entry, const CompleteListener& listener) { void SkeletonAnimation::setTrackCompleteListener (TrackEntry* entry, const CompleteListener& listener) {
getListeners(entry)->completeListener = listener; getListeners(entry)->completeListener = listener;
} }
void SkeletonAnimation::setTrackEventListener (spTrackEntry* entry, const EventListener& listener) { void SkeletonAnimation::setTrackEventListener (TrackEntry* entry, const EventListener& listener) {
getListeners(entry)->eventListener = listener; getListeners(entry)->eventListener = listener;
} }
spAnimationState* SkeletonAnimation::getState() const { AnimationState* SkeletonAnimation::getState() const {
return _state; return _state;
} }

View File

@ -37,26 +37,26 @@
namespace spine { namespace spine {
typedef std::function<void(spTrackEntry* entry)> StartListener; typedef std::function<void(TrackEntry* entry)> StartListener;
typedef std::function<void(spTrackEntry* entry)> InterruptListener; typedef std::function<void(TrackEntry* entry)> InterruptListener;
typedef std::function<void(spTrackEntry* entry)> EndListener; typedef std::function<void(TrackEntry* entry)> EndListener;
typedef std::function<void(spTrackEntry* entry)> DisposeListener; typedef std::function<void(TrackEntry* entry)> DisposeListener;
typedef std::function<void(spTrackEntry* entry)> CompleteListener; typedef std::function<void(TrackEntry* entry)> CompleteListener;
typedef std::function<void(spTrackEntry* entry, spEvent* event)> EventListener; typedef std::function<void(TrackEntry* entry, Event* event)> EventListener;
/** Draws an animated skeleton, providing an AnimationState for applying one or more animations and queuing animations to be /** Draws an animated skeleton, providing an AnimationState for applying one or more animations and queuing animations to be
* played later. */ * played later. */
class SkeletonAnimation: public SkeletonRenderer { class SkeletonAnimation: public SkeletonRenderer {
public: public:
CREATE_FUNC(SkeletonAnimation); CREATE_FUNC(SkeletonAnimation);
static SkeletonAnimation* createWithData (spSkeletonData* skeletonData, bool ownsSkeletonData = false); static SkeletonAnimation* createWithData (SkeletonData* skeletonData, bool ownsSkeletonData = false);
static SkeletonAnimation* createWithJsonFile (const std::string& skeletonJsonFile, spAtlas* atlas, float scale = 1); static SkeletonAnimation* createWithJsonFile (const std::string& skeletonJsonFile, Atlas* atlas, float scale = 1);
static SkeletonAnimation* createWithJsonFile (const std::string& skeletonJsonFile, const std::string& atlasFile, float scale = 1); static SkeletonAnimation* createWithJsonFile (const std::string& skeletonJsonFile, const std::string& atlasFile, float scale = 1);
static SkeletonAnimation* createWithBinaryFile (const std::string& skeletonBinaryFile, spAtlas* atlas, float scale = 1); static SkeletonAnimation* createWithBinaryFile (const std::string& skeletonBinaryFile, Atlas* atlas, float scale = 1);
static SkeletonAnimation* createWithBinaryFile (const std::string& skeletonBinaryFile, const std::string& atlasFile, float scale = 1); static SkeletonAnimation* createWithBinaryFile (const std::string& skeletonBinaryFile, const std::string& atlasFile, float scale = 1);
// Use createWithJsonFile instead // Use createWithJsonFile instead
CC_DEPRECATED_ATTRIBUTE static SkeletonAnimation* createWithFile (const std::string& skeletonJsonFile, spAtlas* atlas, float scale = 1) CC_DEPRECATED_ATTRIBUTE static SkeletonAnimation* createWithFile (const std::string& skeletonJsonFile, Atlas* atlas, float scale = 1)
{ {
return SkeletonAnimation::createWithJsonFile(skeletonJsonFile, atlas, scale); return SkeletonAnimation::createWithJsonFile(skeletonJsonFile, atlas, scale);
} }
@ -68,16 +68,16 @@ public:
virtual void update (float deltaTime) override; virtual void update (float deltaTime) override;
void setAnimationStateData (spAnimationStateData* stateData); void setAnimationStateData (AnimationStateData* stateData);
void setMix (const std::string& fromAnimation, const std::string& toAnimation, float duration); void setMix (const std::string& fromAnimation, const std::string& toAnimation, float duration);
spTrackEntry* setAnimation (int trackIndex, const std::string& name, bool loop); TrackEntry* setAnimation (int trackIndex, const std::string& name, bool loop);
spTrackEntry* addAnimation (int trackIndex, const std::string& name, bool loop, float delay = 0); TrackEntry* addAnimation (int trackIndex, const std::string& name, bool loop, float delay = 0);
spTrackEntry* setEmptyAnimation (int trackIndex, float mixDuration); TrackEntry* setEmptyAnimation (int trackIndex, float mixDuration);
void setEmptyAnimations (float mixDuration); void setEmptyAnimations (float mixDuration);
spTrackEntry* addEmptyAnimation (int trackIndex, float mixDuration, float delay = 0); TrackEntry* addEmptyAnimation (int trackIndex, float mixDuration, float delay = 0);
spAnimation* findAnimation(const std::string& name) const; Animation* findAnimation(const std::string& name) const;
spTrackEntry* getCurrent (int trackIndex = 0); TrackEntry* getCurrent (int trackIndex = 0);
void clearTracks (); void clearTracks ();
void clearTrack (int trackIndex = 0); void clearTrack (int trackIndex = 0);
@ -88,17 +88,17 @@ public:
void setCompleteListener (const CompleteListener& listener); void setCompleteListener (const CompleteListener& listener);
void setEventListener (const EventListener& listener); void setEventListener (const EventListener& listener);
void setTrackStartListener (spTrackEntry* entry, const StartListener& listener); void setTrackStartListener (TrackEntry* entry, const StartListener& listener);
void setTrackInterruptListener (spTrackEntry* entry, const InterruptListener& listener); void setTrackInterruptListener (TrackEntry* entry, const InterruptListener& listener);
void setTrackEndListener (spTrackEntry* entry, const EndListener& listener); void setTrackEndListener (TrackEntry* entry, const EndListener& listener);
void setTrackDisposeListener (spTrackEntry* entry, const DisposeListener& listener); void setTrackDisposeListener (TrackEntry* entry, const DisposeListener& listener);
void setTrackCompleteListener (spTrackEntry* entry, const CompleteListener& listener); void setTrackCompleteListener (TrackEntry* entry, const CompleteListener& listener);
void setTrackEventListener (spTrackEntry* entry, const EventListener& listener); void setTrackEventListener (TrackEntry* entry, const EventListener& listener);
virtual void onAnimationStateEvent (spTrackEntry* entry, spEventType type, spEvent* event); virtual void onAnimationStateEvent (TrackEntry* entry, EventType type, Event* event);
virtual void onTrackEntryEvent (spTrackEntry* entry, spEventType type, spEvent* event); virtual void onTrackEntryEvent (TrackEntry* entry, EventType type, Event* event);
spAnimationState* getState() const; AnimationState* getState() const;
CC_CONSTRUCTOR_ACCESS: CC_CONSTRUCTOR_ACCESS:
SkeletonAnimation (); SkeletonAnimation ();
@ -106,7 +106,7 @@ CC_CONSTRUCTOR_ACCESS:
virtual void initialize () override; virtual void initialize () override;
protected: protected:
spAnimationState* _state; AnimationState* _state;
bool _ownsAnimationStateData; bool _ownsAnimationStateData;

View File

@ -29,7 +29,7 @@
*****************************************************************************/ *****************************************************************************/
#include <spine/SkeletonBatch.h> #include <spine/SkeletonBatch.h>
#include <spine/extension.h> #include <spine/Extension.h>
#include <algorithm> #include <algorithm>
USING_NS_CC; USING_NS_CC;
@ -58,8 +58,6 @@ SkeletonBatch::SkeletonBatch () {
_commandsPool.push_back(new TrianglesCommand()); _commandsPool.push_back(new TrianglesCommand());
} }
_indices = spUnsignedShortArray_create(8);
reset (); reset ();
// callback after drawing is finished so we can clear out the batch state // callback after drawing is finished so we can clear out the batch state
@ -72,8 +70,6 @@ SkeletonBatch::SkeletonBatch () {
SkeletonBatch::~SkeletonBatch () { SkeletonBatch::~SkeletonBatch () {
Director::getInstance()->getEventDispatcher()->removeCustomEventListeners(EVENT_AFTER_DRAW_RESET_POSITION); Director::getInstance()->getEventDispatcher()->removeCustomEventListeners(EVENT_AFTER_DRAW_RESET_POSITION);
spUnsignedShortArray_dispose(_indices);
for (unsigned int i = 0; i < _commandsPool.size(); i++) { for (unsigned int i = 0; i < _commandsPool.size(); i++) {
delete _commandsPool[i]; delete _commandsPool[i];
_commandsPool[i] = nullptr; _commandsPool[i] = nullptr;
@ -107,11 +103,11 @@ void SkeletonBatch::deallocateVertices(uint32_t numVertices) {
unsigned short* SkeletonBatch::allocateIndices(uint32_t numIndices) { unsigned short* SkeletonBatch::allocateIndices(uint32_t numIndices) {
if (_indices->capacity - _indices->size < numIndices) { if (_indices.getCapacity() - _indices.size() < numIndices) {
unsigned short* oldData = _indices->items; unsigned short* oldData = _indices.buffer();
int oldSize = _indices->size; int oldSize = _indices.size();
spUnsignedShortArray_ensureCapacity(_indices, _indices->size + numIndices); _indices.setSize(_indices.size() + numIndices, 0);
unsigned short* newData = _indices->items; unsigned short* newData = _indices.buffer();
for (uint32_t i = 0; i < this->_nextFreeCommand; i++) { for (uint32_t i = 0; i < this->_nextFreeCommand; i++) {
TrianglesCommand* command = _commandsPool[i]; TrianglesCommand* command = _commandsPool[i];
cocos2d::TrianglesCommand::Triangles& triangles = (cocos2d::TrianglesCommand::Triangles&)command->getTriangles(); cocos2d::TrianglesCommand::Triangles& triangles = (cocos2d::TrianglesCommand::Triangles&)command->getTriangles();
@ -121,13 +117,12 @@ unsigned short* SkeletonBatch::allocateIndices(uint32_t numIndices) {
} }
} }
unsigned short* indices = _indices->items + _indices->size; unsigned short* indices = _indices.buffer() + _indices.size() - numIndices;
_indices->size += numIndices;
return indices; return indices;
} }
void SkeletonBatch::deallocateIndices(uint32_t numIndices) { void SkeletonBatch::deallocateIndices(uint32_t numIndices) {
_indices->size -= numIndices; _indices.setSize(_indices.size() - numIndices, 0);
} }
@ -141,7 +136,7 @@ cocos2d::TrianglesCommand* SkeletonBatch::addCommand(cocos2d::Renderer* renderer
void SkeletonBatch::reset() { void SkeletonBatch::reset() {
_nextFreeCommand = 0; _nextFreeCommand = 0;
_numVertices = 0; _numVertices = 0;
_indices->size = 0; _indices.setSize(0, 0);
} }
cocos2d::TrianglesCommand* SkeletonBatch::nextFreeCommand() { cocos2d::TrianglesCommand* SkeletonBatch::nextFreeCommand() {

View File

@ -68,7 +68,7 @@ namespace spine {
uint32_t _numVertices; uint32_t _numVertices;
// pool of indices // pool of indices
spUnsignedShortArray* _indices; Vector<unsigned short> _indices;
}; };
} }

View File

@ -28,12 +28,12 @@
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/ *****************************************************************************/
#include <spine/spine-cocos2dx.h>
#include <spine/SkeletonRenderer.h> #include <spine/SkeletonRenderer.h>
#include <spine/extension.h> #include <spine/Extension.h>
#include <spine/SkeletonBatch.h> #include <spine/SkeletonBatch.h>
#include <spine/SkeletonTwoColorBatch.h> #include <spine/SkeletonTwoColorBatch.h>
#include <spine/AttachmentVertices.h> #include <spine/AttachmentVertices.h>
#include <spine/Cocos2dAttachmentLoader.h>
#include <algorithm> #include <algorithm>
#define INITIAL_WORLD_VERTICES_LENGTH 1000 #define INITIAL_WORLD_VERTICES_LENGTH 1000
@ -57,6 +57,8 @@ using std::max;
namespace spine { namespace spine {
static Cocos2dTextureLoader textureLoader;
void SkeletonRenderer::destroyScratchBuffers() { void SkeletonRenderer::destroyScratchBuffers() {
if (worldVertices) { if (worldVertices) {
delete[] worldVertices; delete[] worldVertices;
@ -65,19 +67,19 @@ void SkeletonRenderer::destroyScratchBuffers() {
} }
} }
SkeletonRenderer* SkeletonRenderer::createWithSkeleton(spSkeleton* skeleton, bool ownsSkeleton, bool ownsSkeletonData) { SkeletonRenderer* SkeletonRenderer::createWithSkeleton(Skeleton* skeleton, bool ownsSkeleton, bool ownsSkeletonData) {
SkeletonRenderer* node = new SkeletonRenderer(skeleton, ownsSkeleton, ownsSkeletonData); SkeletonRenderer* node = new SkeletonRenderer(skeleton, ownsSkeleton, ownsSkeletonData);
node->autorelease(); node->autorelease();
return node; return node;
} }
SkeletonRenderer* SkeletonRenderer::createWithData (spSkeletonData* skeletonData, bool ownsSkeletonData) { SkeletonRenderer* SkeletonRenderer::createWithData (SkeletonData* skeletonData, bool ownsSkeletonData) {
SkeletonRenderer* node = new SkeletonRenderer(skeletonData, ownsSkeletonData); SkeletonRenderer* node = new SkeletonRenderer(skeletonData, ownsSkeletonData);
node->autorelease(); node->autorelease();
return node; return node;
} }
SkeletonRenderer* SkeletonRenderer::createWithFile (const std::string& skeletonDataFile, spAtlas* atlas, float scale) { SkeletonRenderer* SkeletonRenderer::createWithFile (const std::string& skeletonDataFile, Atlas* atlas, float scale) {
SkeletonRenderer* node = new SkeletonRenderer(skeletonDataFile, atlas, scale); SkeletonRenderer* node = new SkeletonRenderer(skeletonDataFile, atlas, scale);
node->autorelease(); node->autorelease();
return node; return node;
@ -95,15 +97,15 @@ void SkeletonRenderer::initialize () {
worldVerticesLength = INITIAL_WORLD_VERTICES_LENGTH; worldVerticesLength = INITIAL_WORLD_VERTICES_LENGTH;
} }
_clipper = spSkeletonClipping_create(); _clipper = new (__FILE__, __LINE__) SkeletonClipping();
_blendFunc = BlendFunc::ALPHA_PREMULTIPLIED; _blendFunc = BlendFunc::ALPHA_PREMULTIPLIED;
setOpacityModifyRGB(true); setOpacityModifyRGB(true);
setupGLProgramState(false); setupGLProgramState(false);
spSkeleton_setToSetupPose(_skeleton); _skeleton->setToSetupPose();
spSkeleton_updateWorldTransform(_skeleton); _skeleton->updateWorldTransform();
} }
void SkeletonRenderer::setupGLProgramState (bool twoColorTintEnabled) { void SkeletonRenderer::setupGLProgramState (bool twoColorTintEnabled) {
@ -113,22 +115,17 @@ void SkeletonRenderer::setupGLProgramState (bool twoColorTintEnabled) {
} }
Texture2D *texture = nullptr; Texture2D *texture = nullptr;
for (int i = 0, n = _skeleton->slotsCount; i < n; i++) { for (int i = 0, n = _skeleton->getSlots().size(); i < n; i++) {
spSlot* slot = _skeleton->drawOrder[i]; Slot* slot = _skeleton->getDrawOrder()[i];
if (!slot->attachment) continue; if (!slot->getAttachment()) continue;
switch (slot->attachment->type) { if (slot->getAttachment()->getRTTI().isExactly(RegionAttachment::rtti)) {
case SP_ATTACHMENT_REGION: { RegionAttachment* attachment = (RegionAttachment*)slot->getAttachment();
spRegionAttachment* attachment = (spRegionAttachment*)slot->attachment; texture = static_cast<AttachmentVertices*>(attachment->getRendererObject())->_texture;
texture = static_cast<AttachmentVertices*>(attachment->rendererObject)->_texture; } else if (slot->getAttachment()->getRTTI().isExactly(RegionAttachment::rtti)) {
break; MeshAttachment* attachment = (MeshAttachment*)slot->getAttachment();
} texture = static_cast<AttachmentVertices*>(attachment->getRendererObject())->_texture;
case SP_ATTACHMENT_MESH: { } else {
spMeshAttachment* attachment = (spMeshAttachment*)slot->attachment; continue;
texture = static_cast<AttachmentVertices*>(attachment->rendererObject)->_texture;
break;
}
default:
continue;
} }
if (texture != nullptr) { if (texture != nullptr) {
@ -138,8 +135,8 @@ void SkeletonRenderer::setupGLProgramState (bool twoColorTintEnabled) {
setGLProgramState(GLProgramState::getOrCreateWithGLProgramName(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR_NO_MVP, texture)); setGLProgramState(GLProgramState::getOrCreateWithGLProgramName(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR_NO_MVP, texture));
} }
void SkeletonRenderer::setSkeletonData (spSkeletonData *skeletonData, bool ownsSkeletonData) { void SkeletonRenderer::setSkeletonData (SkeletonData *skeletonData, bool ownsSkeletonData) {
_skeleton = spSkeleton_create(skeletonData); _skeleton = new (__FILE__, __LINE__) Skeleton(skeletonData);
_ownsSkeletonData = ownsSkeletonData; _ownsSkeletonData = ownsSkeletonData;
} }
@ -147,17 +144,17 @@ SkeletonRenderer::SkeletonRenderer ()
: _atlas(nullptr), _attachmentLoader(nullptr), _debugSlots(false), _debugBones(false), _debugMeshes(false), _timeScale(1), _effect(nullptr), _startSlotIndex(-1), _endSlotIndex(-1) { : _atlas(nullptr), _attachmentLoader(nullptr), _debugSlots(false), _debugBones(false), _debugMeshes(false), _timeScale(1), _effect(nullptr), _startSlotIndex(-1), _endSlotIndex(-1) {
} }
SkeletonRenderer::SkeletonRenderer(spSkeleton* skeleton, bool ownsSkeleton, bool ownsSkeletonData) SkeletonRenderer::SkeletonRenderer(Skeleton* skeleton, bool ownsSkeleton, bool ownsSkeletonData, bool ownsAtlas)
: _atlas(nullptr), _attachmentLoader(nullptr), _debugSlots(false), _debugBones(false), _debugMeshes(false), _timeScale(1), _effect(nullptr), _startSlotIndex(-1), _endSlotIndex(-1) { : _atlas(nullptr), _attachmentLoader(nullptr), _debugSlots(false), _debugBones(false), _debugMeshes(false), _timeScale(1), _effect(nullptr), _startSlotIndex(-1), _endSlotIndex(-1) {
initWithSkeleton(skeleton, ownsSkeleton, ownsSkeletonData); initWithSkeleton(skeleton, ownsSkeleton, ownsSkeletonData, ownsAtlas);
} }
SkeletonRenderer::SkeletonRenderer (spSkeletonData *skeletonData, bool ownsSkeletonData) SkeletonRenderer::SkeletonRenderer (SkeletonData *skeletonData, bool ownsSkeletonData)
: _atlas(nullptr), _attachmentLoader(nullptr), _debugSlots(false), _debugBones(false), _debugMeshes(false), _timeScale(1), _effect(nullptr), _startSlotIndex(-1), _endSlotIndex(-1) { : _atlas(nullptr), _attachmentLoader(nullptr), _debugSlots(false), _debugBones(false), _debugMeshes(false), _timeScale(1), _effect(nullptr), _startSlotIndex(-1), _endSlotIndex(-1) {
initWithData(skeletonData, ownsSkeletonData); initWithData(skeletonData, ownsSkeletonData);
} }
SkeletonRenderer::SkeletonRenderer (const std::string& skeletonDataFile, spAtlas* atlas, float scale) SkeletonRenderer::SkeletonRenderer (const std::string& skeletonDataFile, Atlas* atlas, float scale)
: _atlas(nullptr), _attachmentLoader(nullptr), _debugSlots(false), _debugBones(false), _debugMeshes(false), _timeScale(1), _effect(nullptr), _startSlotIndex(-1), _endSlotIndex(-1) { : _atlas(nullptr), _attachmentLoader(nullptr), _debugSlots(false), _debugBones(false), _debugMeshes(false), _timeScale(1), _effect(nullptr), _startSlotIndex(-1), _endSlotIndex(-1) {
initWithJsonFile(skeletonDataFile, atlas, scale); initWithJsonFile(skeletonDataFile, atlas, scale);
} }
@ -168,36 +165,37 @@ SkeletonRenderer::SkeletonRenderer (const std::string& skeletonDataFile, const s
} }
SkeletonRenderer::~SkeletonRenderer () { SkeletonRenderer::~SkeletonRenderer () {
if (_ownsSkeletonData) spSkeletonData_dispose(_skeleton->data); if (_ownsSkeletonData) delete _skeleton->getData();
if (_ownsSkeleton) spSkeleton_dispose(_skeleton); if (_ownsSkeleton) delete _skeleton;
if (_atlas) spAtlas_dispose(_atlas); if (_ownsAtlas && _atlas) delete _atlas;
if (_attachmentLoader) spAttachmentLoader_dispose(_attachmentLoader); if (_attachmentLoader) delete _attachmentLoader;
spSkeletonClipping_dispose(_clipper); delete _clipper;
} }
void SkeletonRenderer::initWithSkeleton(spSkeleton* skeleton, bool ownsSkeleton, bool ownsSkeletonData) { void SkeletonRenderer::initWithSkeleton(Skeleton* skeleton, bool ownsSkeleton, bool ownsSkeletonData, bool ownsAtlas) {
_skeleton = skeleton; _skeleton = skeleton;
_ownsSkeleton = ownsSkeleton; _ownsSkeleton = ownsSkeleton;
_ownsSkeletonData = ownsSkeletonData; _ownsSkeletonData = ownsSkeletonData;
_ownsAtlas = ownsAtlas;
initialize(); initialize();
} }
void SkeletonRenderer::initWithData (spSkeletonData* skeletonData, bool ownsSkeletonData) { void SkeletonRenderer::initWithData (SkeletonData* skeletonData, bool ownsSkeletonData) {
_ownsSkeleton = true; _ownsSkeleton = true;
setSkeletonData(skeletonData, ownsSkeletonData); setSkeletonData(skeletonData, ownsSkeletonData);
initialize(); initialize();
} }
void SkeletonRenderer::initWithJsonFile (const std::string& skeletonDataFile, spAtlas* atlas, float scale) { void SkeletonRenderer::initWithJsonFile (const std::string& skeletonDataFile, Atlas* atlas, float scale) {
_atlas = atlas; _atlas = atlas;
_attachmentLoader = SUPER(Cocos2dAttachmentLoader_create(_atlas)); _attachmentLoader = new (__FILE__, __LINE__) AtlasAttachmentLoader(_atlas);
spSkeletonJson* json = spSkeletonJson_createWithLoader(_attachmentLoader); SkeletonJson* json = new (__FILE__, __LINE__) SkeletonJson(_attachmentLoader);
json->scale = scale; json->setScale(scale);
spSkeletonData* skeletonData = spSkeletonJson_readSkeletonDataFile(json, skeletonDataFile.c_str()); SkeletonData* skeletonData = json->readSkeletonDataFile(skeletonDataFile.c_str());
CCASSERT(skeletonData, json->error ? json->error : "Error reading skeleton data."); CCASSERT(skeletonData, !json->getError().isEmpty() ? json->getError().buffer() : "Error reading skeleton data.");
spSkeletonJson_dispose(json); delete json;
_ownsSkeleton = true; _ownsSkeleton = true;
setSkeletonData(skeletonData, true); setSkeletonData(skeletonData, true);
@ -206,32 +204,33 @@ void SkeletonRenderer::initWithJsonFile (const std::string& skeletonDataFile, sp
} }
void SkeletonRenderer::initWithJsonFile (const std::string& skeletonDataFile, const std::string& atlasFile, float scale) { void SkeletonRenderer::initWithJsonFile (const std::string& skeletonDataFile, const std::string& atlasFile, float scale) {
_atlas = spAtlas_createFromFile(atlasFile.c_str(), 0); _atlas = new (__FILE__, __LINE__) Atlas(atlasFile.c_str(), &textureLoader);
CCASSERT(_atlas, "Error reading atlas file."); CCASSERT(_atlas, "Error reading atlas file.");
_attachmentLoader = SUPER(Cocos2dAttachmentLoader_create(_atlas)); _attachmentLoader = new (__FILE__, __LINE__) AtlasAttachmentLoader(_atlas);
spSkeletonJson* json = spSkeletonJson_createWithLoader(_attachmentLoader); SkeletonJson* json = new (__FILE__, __LINE__) SkeletonJson(_attachmentLoader);
json->scale = scale; json->setScale(scale);
spSkeletonData* skeletonData = spSkeletonJson_readSkeletonDataFile(json, skeletonDataFile.c_str()); SkeletonData* skeletonData = json->readSkeletonDataFile(skeletonDataFile.c_str());
CCASSERT(skeletonData, json->error ? json->error : "Error reading skeleton data file."); CCASSERT(skeletonData, !json->getError().isEmpty() ? json->getError().buffer() : "Error reading skeleton data.");
spSkeletonJson_dispose(json); delete json;
_ownsSkeleton = true; _ownsSkeleton = true;
_ownsAtlas = true;
setSkeletonData(skeletonData, true); setSkeletonData(skeletonData, true);
initialize(); initialize();
} }
void SkeletonRenderer::initWithBinaryFile (const std::string& skeletonDataFile, spAtlas* atlas, float scale) { void SkeletonRenderer::initWithBinaryFile (const std::string& skeletonDataFile, Atlas* atlas, float scale) {
_atlas = atlas; _atlas = atlas;
_attachmentLoader = SUPER(Cocos2dAttachmentLoader_create(_atlas)); _attachmentLoader = new (__FILE__, __LINE__) AtlasAttachmentLoader(_atlas);
spSkeletonBinary* binary = spSkeletonBinary_createWithLoader(_attachmentLoader); SkeletonBinary* binary = new (__FILE__, __LINE__) SkeletonBinary(_attachmentLoader);
binary->scale = scale; binary->setScale(scale);
spSkeletonData* skeletonData = spSkeletonBinary_readSkeletonDataFile(binary, skeletonDataFile.c_str()); SkeletonData* skeletonData = binary->readSkeletonDataFile(skeletonDataFile.c_str());
CCASSERT(skeletonData, binary->error ? binary->error : "Error reading skeleton data file."); CCASSERT(skeletonData, !binary->getError().isEmpty() ? binary->getError().buffer() : "Error reading skeleton data.");
spSkeletonBinary_dispose(binary); delete binary;
_ownsSkeleton = true; _ownsSkeleton = true;
setSkeletonData(skeletonData, true); setSkeletonData(skeletonData, true);
@ -239,26 +238,57 @@ void SkeletonRenderer::initWithBinaryFile (const std::string& skeletonDataFile,
} }
void SkeletonRenderer::initWithBinaryFile (const std::string& skeletonDataFile, const std::string& atlasFile, float scale) { void SkeletonRenderer::initWithBinaryFile (const std::string& skeletonDataFile, const std::string& atlasFile, float scale) {
_atlas = spAtlas_createFromFile(atlasFile.c_str(), 0); _atlas = new (__FILE__, __LINE__) Atlas(atlasFile.c_str(), &textureLoader);
CCASSERT(_atlas, "Error reading atlas file."); CCASSERT(_atlas, "Error reading atlas file.");
_attachmentLoader = SUPER(Cocos2dAttachmentLoader_create(_atlas)); _attachmentLoader = new (__FILE__, __LINE__) AtlasAttachmentLoader(_atlas);
spSkeletonBinary* binary = spSkeletonBinary_createWithLoader(_attachmentLoader); SkeletonBinary* binary = new (__FILE__, __LINE__) SkeletonBinary(_attachmentLoader);
binary->scale = scale; binary->setScale(scale);
spSkeletonData* skeletonData = spSkeletonBinary_readSkeletonDataFile(binary, skeletonDataFile.c_str()); SkeletonData* skeletonData = binary->readSkeletonDataFile(skeletonDataFile.c_str());
CCASSERT(skeletonData, binary->error ? binary->error : "Error reading skeleton data file."); CCASSERT(skeletonData, !binary->getError().isEmpty() ? binary->getError().buffer() : "Error reading skeleton data.");
spSkeletonBinary_dispose(binary); delete binary;
_ownsSkeleton = true; _ownsSkeleton = true;
_ownsAtlas = true;
setSkeletonData(skeletonData, true); setSkeletonData(skeletonData, true);
initialize(); initialize();
} }
void SkeletonRenderer::update (float deltaTime) { void SkeletonRenderer::update (float deltaTime) {
Node::update(deltaTime); Node::update(deltaTime);
if (_ownsSkeleton) spSkeleton_update(_skeleton, deltaTime * _timeScale); if (_ownsSkeleton) _skeleton->update(deltaTime * _timeScale);
}
static void deleteAttachmentVertices (void* vertices) {
delete (AttachmentVertices *) vertices;
}
static unsigned short quadTriangles[6] = {0, 1, 2, 2, 3, 0};
static void setAttachmentVertices(RegionAttachment* attachment) {
if (!attachment->getRendererObject()) {
AtlasRegion* region = (AtlasRegion*)attachment->getRendererObject();
AttachmentVertices* attachmentVertices = new AttachmentVertices((Texture2D*)region->page->getRendererObject(), 4, quadTriangles, 6);
V3F_C4B_T2F* vertices = attachmentVertices->_triangles->verts;
for (int i = 0, ii = 0; i < 4; ++i, ii += 2) {
vertices[i].texCoords.u = attachment->getUVs()[ii];
vertices[i].texCoords.v = attachment->getUVs()[ii + 1];
}
attachment->setRendererObject(attachmentVertices, deleteAttachmentVertices);
}
}
static void setAttachmentVertices(MeshAttachment* attachment) {
AtlasRegion* region = (AtlasRegion*)attachment->getRendererObject();
AttachmentVertices* attachmentVertices = new AttachmentVertices((Texture2D*)region->page->getRendererObject(),
attachment->getWorldVerticesLength() >> 1, attachment->getTriangles().buffer(), attachment->getTriangles().size());
V3F_C4B_T2F* vertices = attachmentVertices->_triangles->verts;
for (int i = 0, ii = 0, nn = attachment->getWorldVerticesLength(); ii < nn; ++i, ii += 2) {
vertices[i].texCoords.u = attachment->getUVs()[ii];
vertices[i].texCoords.v = attachment->getUVs()[ii + 1];
}
attachment->setRendererObject(attachmentVertices, deleteAttachmentVertices);
} }
void SkeletonRenderer::draw (Renderer* renderer, const Mat4& transform, uint32_t transformFlags) { void SkeletonRenderer::draw (Renderer* renderer, const Mat4& transform, uint32_t transformFlags) {
@ -266,7 +296,7 @@ void SkeletonRenderer::draw (Renderer* renderer, const Mat4& transform, uint32_t
SkeletonTwoColorBatch* twoColorBatch = SkeletonTwoColorBatch::getInstance(); SkeletonTwoColorBatch* twoColorBatch = SkeletonTwoColorBatch::getInstance();
bool isTwoColorTint = this->isTwoColorTint(); bool isTwoColorTint = this->isTwoColorTint();
if (_effect) _effect->begin(_effect, _skeleton); if (_effect) _effect->begin(*_skeleton);
Color4F nodeColor; Color4F nodeColor;
nodeColor.r = getDisplayedColor().r / (float)255; nodeColor.r = getDisplayedColor().r / (float)255;
@ -280,34 +310,34 @@ void SkeletonRenderer::draw (Renderer* renderer, const Mat4& transform, uint32_t
AttachmentVertices* attachmentVertices = nullptr; AttachmentVertices* attachmentVertices = nullptr;
TwoColorTrianglesCommand* lastTwoColorTrianglesCommand = nullptr; TwoColorTrianglesCommand* lastTwoColorTrianglesCommand = nullptr;
bool inRange = _startSlotIndex != -1 || _endSlotIndex != -1 ? false : true; bool inRange = _startSlotIndex != -1 || _endSlotIndex != -1 ? false : true;
for (int i = 0, n = _skeleton->slotsCount; i < n; ++i) { for (int i = 0, n = _skeleton->getSlots().size(); i < n; ++i) {
spSlot* slot = _skeleton->drawOrder[i]; Slot* slot = _skeleton->getDrawOrder()[i];
if (_startSlotIndex >= 0 && _startSlotIndex == slot->data->index) { if (_startSlotIndex >= 0 && _startSlotIndex == slot->getData().getIndex()) {
inRange = true; inRange = true;
} }
if (!inRange) { if (!inRange) {
spSkeletonClipping_clipEnd(_clipper, slot); _clipper->clipEnd(*slot);
continue; continue;
} }
if (_endSlotIndex >= 0 && _endSlotIndex == slot->data->index) { if (_endSlotIndex >= 0 && _endSlotIndex == slot->getData().getIndex()) {
inRange = false; inRange = false;
} }
if (!slot->attachment) { if (!slot->getAttachment()) {
spSkeletonClipping_clipEnd(_clipper, slot); _clipper->clipEnd(*slot);
continue; continue;
} }
cocos2d::TrianglesCommand::Triangles triangles; cocos2d::TrianglesCommand::Triangles triangles;
TwoColorTriangles trianglesTwoColor; TwoColorTriangles trianglesTwoColor;
switch (slot->attachment->type) { if (slot->getAttachment()->getRTTI().isExactly(RegionAttachment::rtti)) {
case SP_ATTACHMENT_REGION: { RegionAttachment* attachment = (RegionAttachment*)slot->getAttachment();
spRegionAttachment* attachment = (spRegionAttachment*)slot->attachment; setAttachmentVertices(attachment);
attachmentVertices = getAttachmentVertices(attachment); attachmentVertices = (AttachmentVertices*)attachment->getRendererObject();
if (!isTwoColorTint) { if (!isTwoColorTint) {
triangles.indices = attachmentVertices->_triangles->indices; triangles.indices = attachmentVertices->_triangles->indices;
@ -315,7 +345,7 @@ void SkeletonRenderer::draw (Renderer* renderer, const Mat4& transform, uint32_t
triangles.verts = batch->allocateVertices(attachmentVertices->_triangles->vertCount); triangles.verts = batch->allocateVertices(attachmentVertices->_triangles->vertCount);
triangles.vertCount = attachmentVertices->_triangles->vertCount; triangles.vertCount = attachmentVertices->_triangles->vertCount;
memcpy(triangles.verts, attachmentVertices->_triangles->verts, sizeof(cocos2d::V3F_C4B_T2F) * attachmentVertices->_triangles->vertCount); memcpy(triangles.verts, attachmentVertices->_triangles->verts, sizeof(cocos2d::V3F_C4B_T2F) * attachmentVertices->_triangles->vertCount);
spRegionAttachment_computeWorldVertices(attachment, slot->bone, (float*)triangles.verts, 0, 6); attachment->computeWorldVertices(slot->getBone(), (float*)triangles.verts, 0, 6);
} else { } else {
trianglesTwoColor.indices = attachmentVertices->_triangles->indices; trianglesTwoColor.indices = attachmentVertices->_triangles->indices;
trianglesTwoColor.indexCount = attachmentVertices->_triangles->indexCount; trianglesTwoColor.indexCount = attachmentVertices->_triangles->indexCount;
@ -324,19 +354,18 @@ void SkeletonRenderer::draw (Renderer* renderer, const Mat4& transform, uint32_t
for (int i = 0; i < trianglesTwoColor.vertCount; i++) { for (int i = 0; i < trianglesTwoColor.vertCount; i++) {
trianglesTwoColor.verts[i].texCoords = attachmentVertices->_triangles->verts[i].texCoords; trianglesTwoColor.verts[i].texCoords = attachmentVertices->_triangles->verts[i].texCoords;
} }
spRegionAttachment_computeWorldVertices(attachment, slot->bone, (float*)trianglesTwoColor.verts, 0, 7); attachment->computeWorldVertices(slot->getBone(), (float*)trianglesTwoColor.verts, 0, 7);
} }
color.r = attachment->color.r; color.r = attachment->getColor().r;
color.g = attachment->color.g; color.g = attachment->getColor().g;
color.b = attachment->color.b; color.b = attachment->getColor().b;
color.a = attachment->color.a; color.a = attachment->getColor().a;
break;
} }
case SP_ATTACHMENT_MESH: { else if (slot->getAttachment()->getRTTI().isExactly(MeshAttachment::rtti)) {
spMeshAttachment* attachment = (spMeshAttachment*)slot->attachment; MeshAttachment* attachment = (MeshAttachment*)slot->getAttachment();
attachmentVertices = getAttachmentVertices(attachment); setAttachmentVertices(attachment);
attachmentVertices = (AttachmentVertices*)attachment->getRendererObject();
if (!isTwoColorTint) { if (!isTwoColorTint) {
triangles.indices = attachmentVertices->_triangles->indices; triangles.indices = attachmentVertices->_triangles->indices;
@ -344,7 +373,7 @@ void SkeletonRenderer::draw (Renderer* renderer, const Mat4& transform, uint32_t
triangles.verts = batch->allocateVertices(attachmentVertices->_triangles->vertCount); triangles.verts = batch->allocateVertices(attachmentVertices->_triangles->vertCount);
triangles.vertCount = attachmentVertices->_triangles->vertCount; triangles.vertCount = attachmentVertices->_triangles->vertCount;
memcpy(triangles.verts, attachmentVertices->_triangles->verts, sizeof(cocos2d::V3F_C4B_T2F) * attachmentVertices->_triangles->vertCount); memcpy(triangles.verts, attachmentVertices->_triangles->verts, sizeof(cocos2d::V3F_C4B_T2F) * attachmentVertices->_triangles->vertCount);
spVertexAttachment_computeWorldVertices(SUPER(attachment), slot, 0, triangles.vertCount * sizeof(cocos2d::V3F_C4B_T2F) / 4, (float*)triangles.verts, 0, 6); attachment->computeWorldVertices(*slot, 0, triangles.vertCount * sizeof(cocos2d::V3F_C4B_T2F) / 4, (float*)triangles.verts, 0, 6);
} else { } else {
trianglesTwoColor.indices = attachmentVertices->_triangles->indices; trianglesTwoColor.indices = attachmentVertices->_triangles->indices;
trianglesTwoColor.indexCount = attachmentVertices->_triangles->indexCount; trianglesTwoColor.indexCount = attachmentVertices->_triangles->indexCount;
@ -353,30 +382,27 @@ void SkeletonRenderer::draw (Renderer* renderer, const Mat4& transform, uint32_t
for (int i = 0; i < trianglesTwoColor.vertCount; i++) { for (int i = 0; i < trianglesTwoColor.vertCount; i++) {
trianglesTwoColor.verts[i].texCoords = attachmentVertices->_triangles->verts[i].texCoords; trianglesTwoColor.verts[i].texCoords = attachmentVertices->_triangles->verts[i].texCoords;
} }
spVertexAttachment_computeWorldVertices(SUPER(attachment), slot, 0, trianglesTwoColor.vertCount * sizeof(V3F_C4B_C4B_T2F) / 4, (float*)trianglesTwoColor.verts, 0, 7); attachment->computeWorldVertices(*slot, 0, trianglesTwoColor.vertCount * sizeof(V3F_C4B_C4B_T2F) / 4, (float*)trianglesTwoColor.verts, 0, 7);
} }
color.r = attachment->color.r; color.r = attachment->getColor().r;
color.g = attachment->color.g; color.g = attachment->getColor().g;
color.b = attachment->color.b; color.b = attachment->getColor().b;
color.a = attachment->color.a; color.a = attachment->getColor().a;
break;
} }
case SP_ATTACHMENT_CLIPPING: { else if (slot->getAttachment()->getRTTI().isExactly(ClippingAttachment::rtti)) {
spClippingAttachment* clip = (spClippingAttachment*)slot->attachment; ClippingAttachment* clip = (ClippingAttachment*)slot->getAttachment();
spSkeletonClipping_clipStart(_clipper, slot, clip); _clipper->clipStart(*slot, clip);
continue; continue;
} } else {
default: _clipper->clipEnd(*slot);
spSkeletonClipping_clipEnd(_clipper, slot);
continue; continue;
} }
if (slot->darkColor) { if (slot->hasDarkColor()) {
darkColor.r = slot->darkColor->r * 255; darkColor.r = slot->getDarkColor().r * 255;
darkColor.g = slot->darkColor->g * 255; darkColor.g = slot->getDarkColor().g * 255;
darkColor.b = slot->darkColor->b * 255; darkColor.b = slot->getDarkColor().b * 255;
} else { } else {
darkColor.r = 0; darkColor.r = 0;
darkColor.g = 0; darkColor.g = 0;
@ -384,28 +410,28 @@ void SkeletonRenderer::draw (Renderer* renderer, const Mat4& transform, uint32_t
} }
darkColor.a = darkPremultipliedAlpha; darkColor.a = darkPremultipliedAlpha;
color.a *= nodeColor.a * _skeleton->color.a * slot->color.a * 255; color.a *= nodeColor.a * _skeleton->getColor().a * slot->getColor().a * 255;
// skip rendering if the color of this attachment is 0 // skip rendering if the color of this attachment is 0
if (color.a == 0){ if (color.a == 0){
spSkeletonClipping_clipEnd(_clipper, slot); _clipper->clipEnd(*slot);
continue; continue;
} }
float multiplier = _premultipliedAlpha ? color.a : 255; float multiplier = _premultipliedAlpha ? color.a : 255;
color.r *= nodeColor.r * _skeleton->color.r * slot->color.r * multiplier; color.r *= nodeColor.r * _skeleton->getColor().r * slot->getColor().r * multiplier;
color.g *= nodeColor.g * _skeleton->color.g * slot->color.g * multiplier; color.g *= nodeColor.g * _skeleton->getColor().g * slot->getColor().g * multiplier;
color.b *= nodeColor.b * _skeleton->color.b * slot->color.b * multiplier; color.b *= nodeColor.b * _skeleton->getColor().b * slot->getColor().b * multiplier;
BlendFunc blendFunc; BlendFunc blendFunc;
switch (slot->data->blendMode) { switch (slot->getData().getBlendMode()) {
case SP_BLEND_MODE_ADDITIVE: case BlendMode_Additive:
blendFunc.src = _premultipliedAlpha ? GL_ONE : GL_SRC_ALPHA; blendFunc.src = _premultipliedAlpha ? GL_ONE : GL_SRC_ALPHA;
blendFunc.dst = GL_ONE; blendFunc.dst = GL_ONE;
break; break;
case SP_BLEND_MODE_MULTIPLY: case BlendMode_Multiply:
blendFunc.src = GL_DST_COLOR; blendFunc.src = GL_DST_COLOR;
blendFunc.dst = GL_ONE_MINUS_SRC_ALPHA; blendFunc.dst = GL_ONE_MINUS_SRC_ALPHA;
break; break;
case SP_BLEND_MODE_SCREEN: case BlendMode_Screen:
blendFunc.src = GL_ONE; blendFunc.src = GL_ONE;
blendFunc.dst = GL_ONE_MINUS_SRC_COLOR; blendFunc.dst = GL_ONE_MINUS_SRC_COLOR;
break; break;
@ -415,28 +441,28 @@ void SkeletonRenderer::draw (Renderer* renderer, const Mat4& transform, uint32_t
} }
if (!isTwoColorTint) { if (!isTwoColorTint) {
if (spSkeletonClipping_isClipping(_clipper)) { if (_clipper->isClipping()) {
spSkeletonClipping_clipTriangles(_clipper, (float*)&triangles.verts[0].vertices, triangles.vertCount * sizeof(cocos2d::V3F_C4B_T2F) / 4, triangles.indices, triangles.indexCount, (float*)&triangles.verts[0].texCoords, 6); _clipper->clipTriangles((float*)&triangles.verts[0].vertices, triangles.indices, triangles.indexCount, (float*)&triangles.verts[0].texCoords, triangles.vertCount * sizeof(cocos2d::V3F_C4B_T2F) / 4);
batch->deallocateVertices(triangles.vertCount); batch->deallocateVertices(triangles.vertCount);
if (_clipper->clippedTriangles->size == 0){ if (_clipper->getClippedTriangles().size() == 0){
spSkeletonClipping_clipEnd(_clipper, slot); _clipper->clipEnd(*slot);
continue; continue;
} }
triangles.vertCount = _clipper->clippedVertices->size >> 1; triangles.vertCount = _clipper->getClippedVertices().size() >> 1;
triangles.verts = batch->allocateVertices(triangles.vertCount); triangles.verts = batch->allocateVertices(triangles.vertCount);
triangles.indexCount = _clipper->clippedTriangles->size; triangles.indexCount = _clipper->getClippedTriangles().size();
triangles.indices = batch->allocateIndices(triangles.indexCount); triangles.indices = batch->allocateIndices(triangles.indexCount);
memcpy(triangles.indices, _clipper->clippedTriangles->items, sizeof(unsigned short) * _clipper->clippedTriangles->size); memcpy(triangles.indices, _clipper->getClippedTriangles().buffer(), sizeof(unsigned short) * _clipper->getClippedTriangles().size());
cocos2d::TrianglesCommand* batchedTriangles = batch->addCommand(renderer, _globalZOrder, attachmentVertices->_texture, _glProgramState, blendFunc, triangles, transform, transformFlags); cocos2d::TrianglesCommand* batchedTriangles = batch->addCommand(renderer, _globalZOrder, attachmentVertices->_texture, _glProgramState, blendFunc, triangles, transform, transformFlags);
float* verts = _clipper->clippedVertices->items; float* verts = _clipper->getClippedVertices().buffer();
float* uvs = _clipper->clippedUVs->items; float* uvs = _clipper->getClippedUVs().buffer();
if (_effect) { if (_effect) {
spColor light; Color light;
spColor dark; Color dark;
light.r = color.r / 255.0f; light.r = color.r / 255.0f;
light.g = color.g / 255.0f; light.g = color.g / 255.0f;
light.b = color.b / 255.0f; light.b = color.b / 255.0f;
@ -444,13 +470,13 @@ void SkeletonRenderer::draw (Renderer* renderer, const Mat4& transform, uint32_t
dark.r = dark.g = dark.b = dark.a = 0; dark.r = dark.g = dark.b = dark.a = 0;
for (int v = 0, vn = batchedTriangles->getTriangles().vertCount, vv = 0; v < vn; ++v, vv+=2) { for (int v = 0, vn = batchedTriangles->getTriangles().vertCount, vv = 0; v < vn; ++v, vv+=2) {
V3F_C4B_T2F* vertex = batchedTriangles->getTriangles().verts + v; V3F_C4B_T2F* vertex = batchedTriangles->getTriangles().verts + v;
spColor lightCopy = light; Color lightCopy = light;
spColor darkCopy = dark; Color darkCopy = dark;
vertex->vertices.x = verts[vv]; vertex->vertices.x = verts[vv];
vertex->vertices.y = verts[vv + 1]; vertex->vertices.y = verts[vv + 1];
vertex->texCoords.u = uvs[vv]; vertex->texCoords.u = uvs[vv];
vertex->texCoords.v = uvs[vv + 1]; vertex->texCoords.v = uvs[vv + 1];
_effect->transform(_effect, &vertex->vertices.x, &vertex->vertices.y, &vertex->texCoords.u, &vertex->texCoords.v, &lightCopy, &darkCopy); _effect->transform(vertex->vertices.x, vertex->vertices.y, vertex->texCoords.u, vertex->texCoords.v, lightCopy, darkCopy);
vertex->colors.r = (GLubyte)(lightCopy.r * 255); vertex->colors.r = (GLubyte)(lightCopy.r * 255);
vertex->colors.g = (GLubyte)(lightCopy.g * 255); vertex->colors.g = (GLubyte)(lightCopy.g * 255);
vertex->colors.b = (GLubyte)(lightCopy.b * 255); vertex->colors.b = (GLubyte)(lightCopy.b * 255);
@ -473,8 +499,8 @@ void SkeletonRenderer::draw (Renderer* renderer, const Mat4& transform, uint32_t
cocos2d::TrianglesCommand* batchedTriangles = batch->addCommand(renderer, _globalZOrder, attachmentVertices->_texture, _glProgramState, blendFunc, triangles, transform, transformFlags); cocos2d::TrianglesCommand* batchedTriangles = batch->addCommand(renderer, _globalZOrder, attachmentVertices->_texture, _glProgramState, blendFunc, triangles, transform, transformFlags);
if (_effect) { if (_effect) {
spColor light; Color light;
spColor dark; Color dark;
light.r = color.r / 255.0f; light.r = color.r / 255.0f;
light.g = color.g / 255.0f; light.g = color.g / 255.0f;
light.b = color.b / 255.0f; light.b = color.b / 255.0f;
@ -482,9 +508,9 @@ void SkeletonRenderer::draw (Renderer* renderer, const Mat4& transform, uint32_t
dark.r = dark.g = dark.b = dark.a = 0; dark.r = dark.g = dark.b = dark.a = 0;
for (int v = 0, vn = batchedTriangles->getTriangles().vertCount; v < vn; ++v) { for (int v = 0, vn = batchedTriangles->getTriangles().vertCount; v < vn; ++v) {
V3F_C4B_T2F* vertex = batchedTriangles->getTriangles().verts + v; V3F_C4B_T2F* vertex = batchedTriangles->getTriangles().verts + v;
spColor lightCopy = light; Color lightCopy = light;
spColor darkCopy = dark; Color darkCopy = dark;
_effect->transform(_effect, &vertex->vertices.x, &vertex->vertices.y, &vertex->texCoords.u, &vertex->texCoords.v, &lightCopy, &darkCopy); _effect->transform(vertex->vertices.x, vertex->vertices.y, vertex->texCoords.u, vertex->texCoords.v, lightCopy, darkCopy);
vertex->colors.r = (GLubyte)(lightCopy.r * 255); vertex->colors.r = (GLubyte)(lightCopy.r * 255);
vertex->colors.g = (GLubyte)(lightCopy.g * 255); vertex->colors.g = (GLubyte)(lightCopy.g * 255);
vertex->colors.b = (GLubyte)(lightCopy.b * 255); vertex->colors.b = (GLubyte)(lightCopy.b * 255);
@ -501,29 +527,29 @@ void SkeletonRenderer::draw (Renderer* renderer, const Mat4& transform, uint32_t
} }
} }
} else { } else {
if (spSkeletonClipping_isClipping(_clipper)) { if (_clipper->isClipping()) {
spSkeletonClipping_clipTriangles(_clipper, (float*)&trianglesTwoColor.verts[0].position, trianglesTwoColor.vertCount * sizeof(V3F_C4B_C4B_T2F) / 4, trianglesTwoColor.indices, trianglesTwoColor.indexCount, (float*)&trianglesTwoColor.verts[0].texCoords, 7); _clipper->clipTriangles((float*)&trianglesTwoColor.verts[0].position, trianglesTwoColor.indices, trianglesTwoColor.indexCount, (float*)&trianglesTwoColor.verts[0].texCoords, trianglesTwoColor.vertCount * sizeof(V3F_C4B_C4B_T2F) / 4);
twoColorBatch->deallocateVertices(trianglesTwoColor.vertCount); twoColorBatch->deallocateVertices(trianglesTwoColor.vertCount);
if (_clipper->clippedTriangles->size == 0){ if (_clipper->getClippedTriangles().size() == 0){
spSkeletonClipping_clipEnd(_clipper, slot); _clipper->clipEnd(*slot);
continue; continue;
} }
trianglesTwoColor.vertCount = _clipper->clippedVertices->size >> 1; trianglesTwoColor.vertCount = _clipper->getClippedVertices().size() >> 1;
trianglesTwoColor.verts = twoColorBatch->allocateVertices(trianglesTwoColor.vertCount); trianglesTwoColor.verts = twoColorBatch->allocateVertices(trianglesTwoColor.vertCount);
trianglesTwoColor.indexCount = _clipper->clippedTriangles->size; trianglesTwoColor.indexCount = _clipper->getClippedTriangles().size();
trianglesTwoColor.indices = twoColorBatch->allocateIndices(trianglesTwoColor.indexCount); trianglesTwoColor.indices = twoColorBatch->allocateIndices(trianglesTwoColor.indexCount);
memcpy(trianglesTwoColor.indices, _clipper->clippedTriangles->items, sizeof(unsigned short) * _clipper->clippedTriangles->size); memcpy(trianglesTwoColor.indices, _clipper->getClippedTriangles().buffer(), sizeof(unsigned short) * _clipper->getClippedTriangles().size());
TwoColorTrianglesCommand* batchedTriangles = lastTwoColorTrianglesCommand = twoColorBatch->addCommand(renderer, _globalZOrder, attachmentVertices->_texture->getName(), _glProgramState, blendFunc, trianglesTwoColor, transform, transformFlags); TwoColorTrianglesCommand* batchedTriangles = lastTwoColorTrianglesCommand = twoColorBatch->addCommand(renderer, _globalZOrder, attachmentVertices->_texture->getName(), _glProgramState, blendFunc, trianglesTwoColor, transform, transformFlags);
float* verts = _clipper->clippedVertices->items; float* verts = _clipper->getClippedVertices().buffer();
float* uvs = _clipper->clippedUVs->items; float* uvs = _clipper->getClippedUVs().buffer();
if (_effect) { if (_effect) {
spColor light; Color light;
spColor dark; Color dark;
light.r = color.r / 255.0f; light.r = color.r / 255.0f;
light.g = color.g / 255.0f; light.g = color.g / 255.0f;
light.b = color.b / 255.0f; light.b = color.b / 255.0f;
@ -534,13 +560,13 @@ void SkeletonRenderer::draw (Renderer* renderer, const Mat4& transform, uint32_t
dark.a = darkColor.a / 255.0f; dark.a = darkColor.a / 255.0f;
for (int v = 0, vn = batchedTriangles->getTriangles().vertCount, vv = 0; v < vn; ++v, vv += 2) { for (int v = 0, vn = batchedTriangles->getTriangles().vertCount, vv = 0; v < vn; ++v, vv += 2) {
V3F_C4B_C4B_T2F* vertex = batchedTriangles->getTriangles().verts + v; V3F_C4B_C4B_T2F* vertex = batchedTriangles->getTriangles().verts + v;
spColor lightCopy = light; Color lightCopy = light;
spColor darkCopy = dark; Color darkCopy = dark;
vertex->position.x = verts[vv]; vertex->position.x = verts[vv];
vertex->position.y = verts[vv + 1]; vertex->position.y = verts[vv + 1];
vertex->texCoords.u = uvs[vv]; vertex->texCoords.u = uvs[vv];
vertex->texCoords.v = uvs[vv + 1]; vertex->texCoords.v = uvs[vv + 1];
_effect->transform(_effect, &vertex->position.x, &vertex->position.y, &vertex->texCoords.u, &vertex->texCoords.v, &lightCopy, &darkCopy); _effect->transform(vertex->position.x, vertex->position.y, vertex->texCoords.u, vertex->texCoords.v, lightCopy, darkCopy);
vertex->color.r = (GLubyte)(lightCopy.r * 255); vertex->color.r = (GLubyte)(lightCopy.r * 255);
vertex->color.g = (GLubyte)(lightCopy.g * 255); vertex->color.g = (GLubyte)(lightCopy.g * 255);
vertex->color.b = (GLubyte)(lightCopy.b * 255); vertex->color.b = (GLubyte)(lightCopy.b * 255);
@ -571,8 +597,8 @@ void SkeletonRenderer::draw (Renderer* renderer, const Mat4& transform, uint32_t
TwoColorTrianglesCommand* batchedTriangles = lastTwoColorTrianglesCommand = twoColorBatch->addCommand(renderer, _globalZOrder, attachmentVertices->_texture->getName(), _glProgramState, blendFunc, trianglesTwoColor, transform, transformFlags); TwoColorTrianglesCommand* batchedTriangles = lastTwoColorTrianglesCommand = twoColorBatch->addCommand(renderer, _globalZOrder, attachmentVertices->_texture->getName(), _glProgramState, blendFunc, trianglesTwoColor, transform, transformFlags);
if (_effect) { if (_effect) {
spColor light; Color light;
spColor dark; Color dark;
light.r = color.r / 255.0f; light.r = color.r / 255.0f;
light.g = color.g / 255.0f; light.g = color.g / 255.0f;
light.b = color.b / 255.0f; light.b = color.b / 255.0f;
@ -584,9 +610,9 @@ void SkeletonRenderer::draw (Renderer* renderer, const Mat4& transform, uint32_t
for (int v = 0, vn = batchedTriangles->getTriangles().vertCount; v < vn; ++v) { for (int v = 0, vn = batchedTriangles->getTriangles().vertCount; v < vn; ++v) {
V3F_C4B_C4B_T2F* vertex = batchedTriangles->getTriangles().verts + v; V3F_C4B_C4B_T2F* vertex = batchedTriangles->getTriangles().verts + v;
spColor lightCopy = light; Color lightCopy = light;
spColor darkCopy = dark; Color darkCopy = dark;
_effect->transform(_effect, &vertex->position.x, &vertex->position.y, &vertex->texCoords.u, &vertex->texCoords.v, &lightCopy, &darkCopy); _effect->transform(vertex->position.x, vertex->position.y, vertex->texCoords.u, vertex->texCoords.v, lightCopy, darkCopy);
vertex->color.r = (GLubyte)(lightCopy.r * 255); vertex->color.r = (GLubyte)(lightCopy.r * 255);
vertex->color.g = (GLubyte)(lightCopy.g * 255); vertex->color.g = (GLubyte)(lightCopy.g * 255);
vertex->color.b = (GLubyte)(lightCopy.b * 255); vertex->color.b = (GLubyte)(lightCopy.b * 255);
@ -611,9 +637,9 @@ void SkeletonRenderer::draw (Renderer* renderer, const Mat4& transform, uint32_t
} }
} }
} }
spSkeletonClipping_clipEnd(_clipper, slot); _clipper->clipEnd(*slot);
} }
spSkeletonClipping_clipEnd2(_clipper); _clipper->clipEnd();
if (lastTwoColorTrianglesCommand) { if (lastTwoColorTrianglesCommand) {
Node* parent = this->getParent(); Node* parent = this->getParent();
@ -628,7 +654,7 @@ void SkeletonRenderer::draw (Renderer* renderer, const Mat4& transform, uint32_t
if (!parent || parent->getChildrenCount() > 100 || getChildrenCount() != 0) { if (!parent || parent->getChildrenCount() > 100 || getChildrenCount() != 0) {
lastTwoColorTrianglesCommand->setForceFlush(true); lastTwoColorTrianglesCommand->setForceFlush(true);
} else { } else {
Vector<Node*>& children = parent->getChildren(); cocos2d::Vector<Node*>& children = parent->getChildren();
Node* sibling = nullptr; Node* sibling = nullptr;
for (ssize_t i = 0; i < children.size(); i++) { for (ssize_t i = 0; i < children.size(); i++) {
if (children.at(i) == this) { if (children.at(i) == this) {
@ -652,7 +678,7 @@ void SkeletonRenderer::draw (Renderer* renderer, const Mat4& transform, uint32_t
} }
} }
if (_effect) _effect->end(_effect); if (_effect) _effect->end();
if (_debugSlots || _debugBones || _debugMeshes) { if (_debugSlots || _debugBones || _debugMeshes) {
drawDebug(renderer, transform, transformFlags); drawDebug(renderer, transform, transformFlags);
@ -673,11 +699,11 @@ void SkeletonRenderer::drawDebug (Renderer* renderer, const Mat4 &transform, uin
glLineWidth(1); glLineWidth(1);
Vec2 points[4]; Vec2 points[4];
V3F_C4B_T2F_Quad quad; V3F_C4B_T2F_Quad quad;
for (int i = 0, n = _skeleton->slotsCount; i < n; i++) { for (int i = 0, n = _skeleton->getSlots().size(); i < n; i++) {
spSlot* slot = _skeleton->drawOrder[i]; Slot* slot = _skeleton->getDrawOrder()[i];
if (!slot->attachment || slot->attachment->type != SP_ATTACHMENT_REGION) continue; if (!slot->getAttachment() || !slot->getAttachment()->getRTTI().isExactly(RegionAttachment::rtti)) continue;
spRegionAttachment* attachment = (spRegionAttachment*)slot->attachment; RegionAttachment* attachment = (RegionAttachment*)slot->getAttachment();
spRegionAttachment_computeWorldVertices(attachment, slot->bone, worldVertices, 0, 2); attachment->computeWorldVertices(slot->getBone(), worldVertices, 0, 2);
points[0] = Vec2(worldVertices[0], worldVertices[1]); points[0] = Vec2(worldVertices[0], worldVertices[1]);
points[1] = Vec2(worldVertices[2], worldVertices[3]); points[1] = Vec2(worldVertices[2], worldVertices[3]);
points[2] = Vec2(worldVertices[4], worldVertices[5]); points[2] = Vec2(worldVertices[4], worldVertices[5]);
@ -688,17 +714,17 @@ void SkeletonRenderer::drawDebug (Renderer* renderer, const Mat4 &transform, uin
if (_debugBones) { if (_debugBones) {
// Bone lengths. // Bone lengths.
glLineWidth(2); glLineWidth(2);
for (int i = 0, n = _skeleton->bonesCount; i < n; i++) { for (int i = 0, n = _skeleton->getBones().size(); i < n; i++) {
spBone *bone = _skeleton->bones[i]; Bone *bone = _skeleton->getBones()[i];
float x = bone->data->length * bone->a + bone->worldX; float x = bone->getData().getLength() * bone->getA() + bone->getWorldX();
float y = bone->data->length * bone->c + bone->worldY; float y = bone->getData().getLength() * bone->getC() + bone->getWorldY();
drawNode->drawLine(Vec2(bone->worldX, bone->worldY), Vec2(x, y), Color4F::RED); drawNode->drawLine(Vec2(bone->getWorldX(), bone->getWorldY()), Vec2(x, y), Color4F::RED);
} }
// Bone origins. // Bone origins.
auto color = Color4F::BLUE; // Root bone is blue. auto color = Color4F::BLUE; // Root bone is blue.
for (int i = 0, n = _skeleton->bonesCount; i < n; i++) { for (int i = 0, n = _skeleton->getBones().size(); i < n; i++) {
spBone *bone = _skeleton->bones[i]; Bone *bone = _skeleton->getBones()[i];
drawNode->drawPoint(Vec2(bone->worldX, bone->worldY), 4, color); drawNode->drawPoint(Vec2(bone->getWorldX(), bone->getWorldY()), 4, color);
if (i == 0) color = Color4F::GREEN; if (i == 0) color = Color4F::GREEN;
} }
} }
@ -706,16 +732,16 @@ void SkeletonRenderer::drawDebug (Renderer* renderer, const Mat4 &transform, uin
if (_debugMeshes) { if (_debugMeshes) {
// Meshes. // Meshes.
glLineWidth(1); glLineWidth(1);
for (int i = 0, n = _skeleton->slotsCount; i < n; ++i) { for (int i = 0, n = _skeleton->getSlots().size(); i < n; ++i) {
spSlot* slot = _skeleton->drawOrder[i]; Slot* slot = _skeleton->getDrawOrder()[i];
if (!slot->attachment || slot->attachment->type != SP_ATTACHMENT_MESH) continue; if (!slot->getAttachment() || !slot->getAttachment()->getRTTI().isExactly(MeshAttachment::rtti)) continue;
spMeshAttachment* attachment = (spMeshAttachment*)slot->attachment; MeshAttachment* attachment = (MeshAttachment*)slot->getAttachment();
ensureWorldVerticesCapacity(attachment->super.worldVerticesLength); ensureWorldVerticesCapacity(attachment->getWorldVerticesLength());
spVertexAttachment_computeWorldVertices(SUPER(attachment), slot, 0, attachment->super.worldVerticesLength, worldVertices, 0, 2); attachment->computeWorldVertices(*slot, 0, attachment->getWorldVerticesLength(), worldVertices, 0, 2);
for (int ii = 0; ii < attachment->trianglesCount;) { for (int ii = 0; ii < attachment->getTriangles().size();) {
Vec2 v1(worldVertices + (attachment->triangles[ii++] * 2)); Vec2 v1(worldVertices + (attachment->getTriangles()[ii++] * 2));
Vec2 v2(worldVertices + (attachment->triangles[ii++] * 2)); Vec2 v2(worldVertices + (attachment->getTriangles()[ii++] * 2));
Vec2 v3(worldVertices + (attachment->triangles[ii++] * 2)); Vec2 v3(worldVertices + (attachment->getTriangles()[ii++] * 2));
drawNode->drawLine(v1, v2, Color4F::YELLOW); drawNode->drawLine(v1, v2, Color4F::YELLOW);
drawNode->drawLine(v2, v3, Color4F::YELLOW); drawNode->drawLine(v2, v3, Color4F::YELLOW);
drawNode->drawLine(v3, v1, Color4F::YELLOW); drawNode->drawLine(v3, v1, Color4F::YELLOW);
@ -728,30 +754,22 @@ void SkeletonRenderer::drawDebug (Renderer* renderer, const Mat4 &transform, uin
director->popMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW); director->popMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW);
} }
AttachmentVertices* SkeletonRenderer::getAttachmentVertices (spRegionAttachment* attachment) const {
return (AttachmentVertices*)attachment->rendererObject;
}
AttachmentVertices* SkeletonRenderer::getAttachmentVertices (spMeshAttachment* attachment) const {
return (AttachmentVertices*)attachment->rendererObject;
}
Rect SkeletonRenderer::getBoundingBox () const { Rect SkeletonRenderer::getBoundingBox () const {
float minX = FLT_MAX, minY = FLT_MAX, maxX = -FLT_MAX, maxY = -FLT_MAX; float minX = FLT_MAX, minY = FLT_MAX, maxX = -FLT_MAX, maxY = -FLT_MAX;
float scaleX = getScaleX(), scaleY = getScaleY(); float scaleX = getScaleX(), scaleY = getScaleY();
for (int i = 0; i < _skeleton->slotsCount; ++i) { for (int i = 0; i < _skeleton->getSlots().size(); ++i) {
spSlot* slot = _skeleton->slots[i]; Slot* slot = _skeleton->getSlots()[i];
if (!slot->attachment) continue; if (!slot->getAttachment()) continue;
int verticesCount; int verticesCount;
if (slot->attachment->type == SP_ATTACHMENT_REGION) { if (slot->getAttachment()->getRTTI().isExactly(RegionAttachment::rtti)) {
spRegionAttachment* attachment = (spRegionAttachment*)slot->attachment; RegionAttachment* attachment = (RegionAttachment*)slot->getAttachment();
spRegionAttachment_computeWorldVertices(attachment, slot->bone, worldVertices, 0, 2); attachment->computeWorldVertices(slot->getBone(), worldVertices, 0, 2);
verticesCount = 8; verticesCount = 8;
} else if (slot->attachment->type == SP_ATTACHMENT_MESH) { } else if (slot->getAttachment()->getRTTI().isExactly(MeshAttachment::rtti)) {
spMeshAttachment* mesh = (spMeshAttachment*)slot->attachment; MeshAttachment* mesh = (MeshAttachment*)slot->getAttachment();
ensureWorldVerticesCapacity(mesh->super.worldVerticesLength); ensureWorldVerticesCapacity(mesh->getWorldVerticesLength());
spVertexAttachment_computeWorldVertices(SUPER(mesh), slot, 0, mesh->super.worldVerticesLength, worldVertices, 0, 2); mesh->computeWorldVertices(*slot, 0, mesh->getWorldVerticesLength(), worldVertices, 0, 2);
verticesCount = mesh->super.worldVerticesLength; verticesCount = mesh->getWorldVerticesLength();
} else } else
continue; continue;
for (int ii = 0; ii < verticesCount; ii += 2) { for (int ii = 0; ii < verticesCount; ii += 2) {
@ -770,42 +788,42 @@ Rect SkeletonRenderer::getBoundingBox () const {
// --- Convenience methods for Skeleton_* functions. // --- Convenience methods for Skeleton_* functions.
void SkeletonRenderer::updateWorldTransform () { void SkeletonRenderer::updateWorldTransform () {
spSkeleton_updateWorldTransform(_skeleton); _skeleton->updateWorldTransform();
} }
void SkeletonRenderer::setToSetupPose () { void SkeletonRenderer::setToSetupPose () {
spSkeleton_setToSetupPose(_skeleton); _skeleton->setToSetupPose();
} }
void SkeletonRenderer::setBonesToSetupPose () { void SkeletonRenderer::setBonesToSetupPose () {
spSkeleton_setBonesToSetupPose(_skeleton); _skeleton->setBonesToSetupPose();
} }
void SkeletonRenderer::setSlotsToSetupPose () { void SkeletonRenderer::setSlotsToSetupPose () {
spSkeleton_setSlotsToSetupPose(_skeleton); _skeleton->setSlotsToSetupPose();
} }
spBone* SkeletonRenderer::findBone (const std::string& boneName) const { Bone* SkeletonRenderer::findBone (const std::string& boneName) const {
return spSkeleton_findBone(_skeleton, boneName.c_str()); return _skeleton->findBone(boneName.c_str());
} }
spSlot* SkeletonRenderer::findSlot (const std::string& slotName) const { Slot* SkeletonRenderer::findSlot (const std::string& slotName) const {
return spSkeleton_findSlot(_skeleton, slotName.c_str()); return _skeleton->findSlot(slotName.c_str());
} }
bool SkeletonRenderer::setSkin (const std::string& skinName) { void SkeletonRenderer::setSkin (const std::string& skinName) {
return spSkeleton_setSkinByName(_skeleton, skinName.empty() ? 0 : skinName.c_str()) ? true : false; _skeleton->setSkin(skinName.empty() ? 0 : skinName.c_str());
} }
bool SkeletonRenderer::setSkin (const char* skinName) { void SkeletonRenderer::setSkin (const char* skinName) {
return spSkeleton_setSkinByName(_skeleton, skinName) ? true : false; _skeleton->setSkin(skinName);
} }
spAttachment* SkeletonRenderer::getAttachment (const std::string& slotName, const std::string& attachmentName) const { Attachment* SkeletonRenderer::getAttachment (const std::string& slotName, const std::string& attachmentName) const {
return spSkeleton_getAttachmentForSlotName(_skeleton, slotName.c_str(), attachmentName.c_str()); return _skeleton->getAttachment(slotName.c_str(), attachmentName.c_str());
} }
bool SkeletonRenderer::setAttachment (const std::string& slotName, const std::string& attachmentName) { bool SkeletonRenderer::setAttachment (const std::string& slotName, const std::string& attachmentName) {
return spSkeleton_setAttachment(_skeleton, slotName.c_str(), attachmentName.empty() ? 0 : attachmentName.c_str()) ? true : false; return _skeleton->getAttachment(slotName.c_str(), attachmentName.empty() ? 0 : attachmentName.c_str()) ? true : false;
} }
bool SkeletonRenderer::setAttachment (const std::string& slotName, const char* attachmentName) { bool SkeletonRenderer::setAttachment (const std::string& slotName, const char* attachmentName) {
return spSkeleton_setAttachment(_skeleton, slotName.c_str(), attachmentName) ? true : false; return _skeleton->getAttachment(slotName.c_str(), attachmentName) ? true : false;
} }
void SkeletonRenderer::setTwoColorTint(bool enabled) { void SkeletonRenderer::setTwoColorTint(bool enabled) {
@ -816,7 +834,7 @@ bool SkeletonRenderer::isTwoColorTint() {
return getGLProgramState() == SkeletonTwoColorBatch::getInstance()->getTwoColorTintProgramState(); return getGLProgramState() == SkeletonTwoColorBatch::getInstance()->getTwoColorTintProgramState();
} }
void SkeletonRenderer::setVertexEffect(spVertexEffect *effect) { void SkeletonRenderer::setVertexEffect(VertexEffect *effect) {
this->_effect = effect; this->_effect = effect;
} }
@ -825,7 +843,7 @@ void SkeletonRenderer::setSlotsRange(int startSlotIndex, int endSlotIndex) {
this->_endSlotIndex = endSlotIndex; this->_endSlotIndex = endSlotIndex;
} }
spSkeleton* SkeletonRenderer::getSkeleton () { Skeleton* SkeletonRenderer::getSkeleton () {
return _skeleton; return _skeleton;
} }

View File

@ -42,9 +42,9 @@ class AttachmentVertices;
class SkeletonRenderer: public cocos2d::Node, public cocos2d::BlendProtocol { class SkeletonRenderer: public cocos2d::Node, public cocos2d::BlendProtocol {
public: public:
CREATE_FUNC(SkeletonRenderer); CREATE_FUNC(SkeletonRenderer);
static SkeletonRenderer* createWithSkeleton(spSkeleton* skeleton, bool ownsSkeleton = false, bool ownsSkeletonData = false); static SkeletonRenderer* createWithSkeleton(Skeleton* skeleton, bool ownsSkeleton = false, bool ownsSkeletonData = false);
static SkeletonRenderer* createWithData (spSkeletonData* skeletonData, bool ownsSkeletonData = false); static SkeletonRenderer* createWithData (SkeletonData* skeletonData, bool ownsSkeletonData = false);
static SkeletonRenderer* createWithFile (const std::string& skeletonDataFile, spAtlas* atlas, float scale = 1); static SkeletonRenderer* createWithFile (const std::string& skeletonDataFile, Atlas* atlas, float scale = 1);
static SkeletonRenderer* createWithFile (const std::string& skeletonDataFile, const std::string& atlasFile, float scale = 1); static SkeletonRenderer* createWithFile (const std::string& skeletonDataFile, const std::string& atlasFile, float scale = 1);
virtual void update (float deltaTime) override; virtual void update (float deltaTime) override;
@ -54,7 +54,7 @@ public:
virtual void onEnter () override; virtual void onEnter () override;
virtual void onExit () override; virtual void onExit () override;
spSkeleton* getSkeleton(); Skeleton* getSkeleton();
void setTimeScale(float scale); void setTimeScale(float scale);
float getTimeScale() const; float getTimeScale() const;
@ -77,19 +77,19 @@ public:
void setSlotsToSetupPose (); void setSlotsToSetupPose ();
/* Returns 0 if the bone was not found. */ /* Returns 0 if the bone was not found. */
spBone* findBone (const std::string& boneName) const; Bone* findBone (const std::string& boneName) const;
/* Returns 0 if the slot was not found. */ /* Returns 0 if the slot was not found. */
spSlot* findSlot (const std::string& slotName) const; Slot* findSlot (const std::string& slotName) const;
/* Sets the skin used to look up attachments not found in the SkeletonData defaultSkin. Attachments from the new skin are /* Sets the skin used to look up attachments not found in the SkeletonData defaultSkin. Attachments from the new skin are
* attached if the corresponding attachment from the old skin was attached. Returns false if the skin was not found. * attached if the corresponding attachment from the old skin was attached.
* @param skin May be empty string ("") for no skin.*/ * @param skin May be empty string ("") for no skin.*/
bool setSkin (const std::string& skinName); void setSkin (const std::string& skinName);
/** @param skin May be 0 for no skin.*/ /** @param skin May be 0 for no skin.*/
bool setSkin (const char* skinName); void setSkin (const char* skinName);
/* Returns 0 if the slot or attachment was not found. */ /* Returns 0 if the slot or attachment was not found. */
spAttachment* getAttachment (const std::string& slotName, const std::string& attachmentName) const; Attachment* getAttachment (const std::string& slotName, const std::string& attachmentName) const;
/* Returns false if the slot or attachment was not found. /* Returns false if the slot or attachment was not found.
* @param attachmentName May be empty string ("") for no attachment. */ * @param attachmentName May be empty string ("") for no attachment. */
bool setAttachment (const std::string& slotName, const std::string& attachmentName); bool setAttachment (const std::string& slotName, const std::string& attachmentName);
@ -102,7 +102,7 @@ public:
bool isTwoColorTint(); bool isTwoColorTint();
/* Sets the vertex effect to be used, set to 0 to disable vertex effects */ /* Sets the vertex effect to be used, set to 0 to disable vertex effects */
void setVertexEffect(spVertexEffect* effect); void setVertexEffect(VertexEffect* effect);
/* Sets the range of slots that should be rendered. Use -1, -1 to clear the range */ /* Sets the range of slots that should be rendered. Use -1, -1 to clear the range */
void setSlotsRange(int startSlotIndex, int endSlotIndex); void setSlotsRange(int startSlotIndex, int endSlotIndex);
@ -118,42 +118,41 @@ public:
CC_CONSTRUCTOR_ACCESS: CC_CONSTRUCTOR_ACCESS:
SkeletonRenderer (); SkeletonRenderer ();
SkeletonRenderer(spSkeleton* skeleton, bool ownsSkeleton = false, bool ownsSkeletonData = false); SkeletonRenderer(Skeleton* skeleton, bool ownsSkeleton = false, bool ownsSkeletonData = false, bool ownsAtlas = false);
SkeletonRenderer (spSkeletonData* skeletonData, bool ownsSkeletonData = false); SkeletonRenderer (SkeletonData* skeletonData, bool ownsSkeletonData = false);
SkeletonRenderer (const std::string& skeletonDataFile, spAtlas* atlas, float scale = 1); SkeletonRenderer (const std::string& skeletonDataFile, Atlas* atlas, float scale = 1);
SkeletonRenderer (const std::string& skeletonDataFile, const std::string& atlasFile, float scale = 1); SkeletonRenderer (const std::string& skeletonDataFile, const std::string& atlasFile, float scale = 1);
virtual ~SkeletonRenderer (); virtual ~SkeletonRenderer ();
void initWithSkeleton(spSkeleton* skeleton, bool ownsSkeleton = false, bool ownsSkeletonData = false); void initWithSkeleton(Skeleton* skeleton, bool ownsSkeleton = false, bool ownsSkeletonData = false, bool ownsAtlas = false);
void initWithData (spSkeletonData* skeletonData, bool ownsSkeletonData = false); void initWithData (SkeletonData* skeletonData, bool ownsSkeletonData = false);
void initWithJsonFile (const std::string& skeletonDataFile, spAtlas* atlas, float scale = 1); void initWithJsonFile (const std::string& skeletonDataFile, Atlas* atlas, float scale = 1);
void initWithJsonFile (const std::string& skeletonDataFile, const std::string& atlasFile, float scale = 1); void initWithJsonFile (const std::string& skeletonDataFile, const std::string& atlasFile, float scale = 1);
void initWithBinaryFile (const std::string& skeletonDataFile, spAtlas* atlas, float scale = 1); void initWithBinaryFile (const std::string& skeletonDataFile, Atlas* atlas, float scale = 1);
void initWithBinaryFile (const std::string& skeletonDataFile, const std::string& atlasFile, float scale = 1); void initWithBinaryFile (const std::string& skeletonDataFile, const std::string& atlasFile, float scale = 1);
virtual void initialize (); virtual void initialize ();
protected: protected:
void setSkeletonData (spSkeletonData* skeletonData, bool ownsSkeletonData); void setSkeletonData (SkeletonData* skeletonData, bool ownsSkeletonData);
virtual AttachmentVertices* getAttachmentVertices (spRegionAttachment* attachment) const;
virtual AttachmentVertices* getAttachmentVertices (spMeshAttachment* attachment) const;
void setupGLProgramState(bool twoColorTintEnabled); void setupGLProgramState(bool twoColorTintEnabled);
bool _ownsSkeletonData; bool _ownsSkeletonData;
bool _ownsSkeleton; bool _ownsSkeleton;
spAtlas* _atlas; bool _ownsAtlas;
spAttachmentLoader* _attachmentLoader; Atlas* _atlas;
AttachmentLoader* _attachmentLoader;
cocos2d::CustomCommand _debugCommand; cocos2d::CustomCommand _debugCommand;
cocos2d::BlendFunc _blendFunc; cocos2d::BlendFunc _blendFunc;
bool _premultipliedAlpha; bool _premultipliedAlpha;
spSkeleton* _skeleton; Skeleton* _skeleton;
float _timeScale; float _timeScale;
bool _debugSlots; bool _debugSlots;
bool _debugBones; bool _debugBones;
bool _debugMeshes; bool _debugMeshes;
spSkeletonClipping* _clipper; SkeletonClipping* _clipper;
spVertexEffect* _effect; VertexEffect* _effect;
int _startSlotIndex; int _startSlotIndex;
int _endSlotIndex; int _endSlotIndex;

View File

@ -28,7 +28,7 @@
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/ *****************************************************************************/
#include <spine/SkeletonTwoColorBatch.h> #include <spine/SkeletonTwoColorBatch.h>
#include <spine/extension.h> #include <spine/Extension.h>
#include <algorithm> #include <algorithm>
USING_NS_CC; USING_NS_CC;
@ -168,15 +168,13 @@ SkeletonTwoColorBatch::SkeletonTwoColorBatch () {
_commandsPool.push_back(new TwoColorTrianglesCommand()); _commandsPool.push_back(new TwoColorTrianglesCommand());
} }
_indices = spUnsignedShortArray_create(8);
reset (); reset ();
// callback after drawing is finished so we can clear out the batch state // callback after drawing is finished so we can clear out the batch state
// for the next frame // for the next frame
Director::getInstance()->getEventDispatcher()->addCustomEventListener(EVENT_AFTER_DRAW_RESET_POSITION, [this](EventCustom* eventCustom){ Director::getInstance()->getEventDispatcher()->addCustomEventListener(EVENT_AFTER_DRAW_RESET_POSITION, [this](EventCustom* eventCustom){
this->update(0); this->update(0);
});; });
_twoColorTintShader = cocos2d::GLProgram::createWithByteArrays(TWO_COLOR_TINT_VERTEX_SHADER, TWO_COLOR_TINT_FRAGMENT_SHADER); _twoColorTintShader = cocos2d::GLProgram::createWithByteArrays(TWO_COLOR_TINT_VERTEX_SHADER, TWO_COLOR_TINT_FRAGMENT_SHADER);
_twoColorTintShaderState = GLProgramState::getOrCreateWithGLProgram(_twoColorTintShader); _twoColorTintShaderState = GLProgramState::getOrCreateWithGLProgram(_twoColorTintShader);
@ -195,8 +193,6 @@ SkeletonTwoColorBatch::SkeletonTwoColorBatch () {
SkeletonTwoColorBatch::~SkeletonTwoColorBatch () { SkeletonTwoColorBatch::~SkeletonTwoColorBatch () {
Director::getInstance()->getEventDispatcher()->removeCustomEventListeners(EVENT_AFTER_DRAW_RESET_POSITION); Director::getInstance()->getEventDispatcher()->removeCustomEventListeners(EVENT_AFTER_DRAW_RESET_POSITION);
spUnsignedShortArray_dispose(_indices);
for (unsigned int i = 0; i < _commandsPool.size(); i++) { for (unsigned int i = 0; i < _commandsPool.size(); i++) {
delete _commandsPool[i]; delete _commandsPool[i];
_commandsPool[i] = nullptr; _commandsPool[i] = nullptr;
@ -234,11 +230,11 @@ void SkeletonTwoColorBatch::deallocateVertices(uint32_t numVertices) {
unsigned short* SkeletonTwoColorBatch::allocateIndices(uint32_t numIndices) { unsigned short* SkeletonTwoColorBatch::allocateIndices(uint32_t numIndices) {
if (_indices->capacity - _indices->size < numIndices) { if (_indices.getCapacity() - _indices.size() < numIndices) {
unsigned short* oldData = _indices->items; unsigned short* oldData = _indices.buffer();
int oldSize =_indices->size; int oldSize =_indices.size();
spUnsignedShortArray_ensureCapacity(_indices, _indices->size + numIndices); _indices.setSize(_indices.size() + numIndices, 0);
unsigned short* newData = _indices->items; unsigned short* newData = _indices.buffer();
for (uint32_t i = 0; i < this->_nextFreeCommand; i++) { for (uint32_t i = 0; i < this->_nextFreeCommand; i++) {
TwoColorTrianglesCommand* command = _commandsPool[i]; TwoColorTrianglesCommand* command = _commandsPool[i];
TwoColorTriangles& triangles = (TwoColorTriangles&)command->getTriangles(); TwoColorTriangles& triangles = (TwoColorTriangles&)command->getTriangles();
@ -248,13 +244,12 @@ unsigned short* SkeletonTwoColorBatch::allocateIndices(uint32_t numIndices) {
} }
} }
unsigned short* indices = _indices->items + _indices->size; unsigned short* indices = _indices.buffer() + _indices.size() - numIndices;
_indices->size += numIndices;
return indices; return indices;
} }
void SkeletonTwoColorBatch::deallocateIndices(uint32_t numIndices) { void SkeletonTwoColorBatch::deallocateIndices(uint32_t numIndices) {
_indices->size -= numIndices; _indices.setSize(_indices.size() - numIndices, 0);
} }
TwoColorTrianglesCommand* SkeletonTwoColorBatch::addCommand(cocos2d::Renderer* renderer, float globalOrder, GLuint textureID, cocos2d::GLProgramState* glProgramState, cocos2d::BlendFunc blendType, const TwoColorTriangles& triangles, const cocos2d::Mat4& mv, uint32_t flags) { TwoColorTrianglesCommand* SkeletonTwoColorBatch::addCommand(cocos2d::Renderer* renderer, float globalOrder, GLuint textureID, cocos2d::GLProgramState* glProgramState, cocos2d::BlendFunc blendType, const TwoColorTriangles& triangles, const cocos2d::Mat4& mv, uint32_t flags) {
@ -330,7 +325,7 @@ void SkeletonTwoColorBatch::flush (TwoColorTrianglesCommand* materialCommand) {
void SkeletonTwoColorBatch::reset() { void SkeletonTwoColorBatch::reset() {
_nextFreeCommand = 0; _nextFreeCommand = 0;
_numVertices = 0; _numVertices = 0;
_indices->size = 0; _indices.setSize(0, 0);
_numVerticesBuffer = 0; _numVerticesBuffer = 0;
_numIndicesBuffer = 0; _numIndicesBuffer = 0;
_lastCommand = nullptr; _lastCommand = nullptr;

View File

@ -140,7 +140,7 @@ namespace spine {
uint32_t _numVertices; uint32_t _numVertices;
// pool of indices // pool of indices
spUnsignedShortArray* _indices; Vector<unsigned short> _indices;
// two color tint shader and state // two color tint shader and state
cocos2d::GLProgram* _twoColorTintShader; cocos2d::GLProgram* _twoColorTintShader;

View File

@ -29,68 +29,69 @@
*****************************************************************************/ *****************************************************************************/
#include <spine/spine-cocos2dx.h> #include <spine/spine-cocos2dx.h>
#include <spine/extension.h> #include <spine/Extension.h>
#include <spine/AttachmentVertices.h>
namespace spine {
static CustomTextureLoader _customTextureLoader = nullptr;
void spAtlasPage_setCustomTextureLoader (CustomTextureLoader texLoader) {
_customTextureLoader = texLoader;
}
}
USING_NS_CC; USING_NS_CC;
using namespace spine;
GLuint wrap (spAtlasWrap wrap) { GLuint wrap (TextureWrap wrap) {
return wrap == SP_ATLAS_CLAMPTOEDGE ? GL_CLAMP_TO_EDGE : GL_REPEAT; return wrap == TextureWrap_ClampToEdge ? GL_CLAMP_TO_EDGE : GL_REPEAT;
} }
GLuint filter (spAtlasFilter filter) { GLuint filter (TextureFilter filter) {
switch (filter) { switch (filter) {
case SP_ATLAS_UNKNOWN_FILTER: case TextureFilter_Unknown:
break; break;
case SP_ATLAS_NEAREST: case TextureFilter_Nearest:
return GL_NEAREST; return GL_NEAREST;
case SP_ATLAS_LINEAR: case TextureFilter_Linear:
return GL_LINEAR; return GL_LINEAR;
case SP_ATLAS_MIPMAP: case TextureFilter_MipMap:
return GL_LINEAR_MIPMAP_LINEAR; return GL_LINEAR_MIPMAP_LINEAR;
case SP_ATLAS_MIPMAP_NEAREST_NEAREST: case TextureFilter_MipMapNearestNearest:
return GL_NEAREST_MIPMAP_NEAREST; return GL_NEAREST_MIPMAP_NEAREST;
case SP_ATLAS_MIPMAP_LINEAR_NEAREST: case TextureFilter_MipMapLinearNearest:
return GL_LINEAR_MIPMAP_NEAREST; return GL_LINEAR_MIPMAP_NEAREST;
case SP_ATLAS_MIPMAP_NEAREST_LINEAR: case TextureFilter_MipMapNearestLinear:
return GL_NEAREST_MIPMAP_LINEAR; return GL_NEAREST_MIPMAP_LINEAR;
case SP_ATLAS_MIPMAP_LINEAR_LINEAR: case TextureFilter_MipMapLinearLinear:
return GL_LINEAR_MIPMAP_LINEAR; return GL_LINEAR_MIPMAP_LINEAR;
} }
return GL_LINEAR; return GL_LINEAR;
} }
void _spAtlasPage_createTexture (spAtlasPage* self, const char* path) { Cocos2dTextureLoader::Cocos2dTextureLoader() : TextureLoader() { }
Texture2D* texture = nullptr; Cocos2dTextureLoader::~Cocos2dTextureLoader() { }
if (spine::_customTextureLoader) {
texture = spine::_customTextureLoader(path); static void unloadTexture (void* texture) {
} ((Texture2D*)texture)->release();
if (!texture) { }
texture = Director::getInstance()->getTextureCache()->addImage(path);
} void Cocos2dTextureLoader::load(AtlasPage& page, const String& path) {
Texture2D* texture = Director::getInstance()->getTextureCache()->addImage(path.buffer());
CCASSERT(texture != nullptr, "Invalid image"); CCASSERT(texture != nullptr, "Invalid image");
texture->retain(); texture->retain();
Texture2D::TexParams textureParams = {filter(self->minFilter), filter(self->magFilter), wrap(self->uWrap), wrap(self->vWrap)}; Texture2D::TexParams textureParams = {filter(page.minFilter), filter(page.magFilter), wrap(page.uWrap), wrap(page.vWrap)};
texture->setTexParameters(textureParams); texture->setTexParameters(textureParams);
self->rendererObject = texture; page.setRendererObject(texture, unloadTexture);
self->width = texture->getPixelsWide(); page.width = texture->getPixelsWide();
self->height = texture->getPixelsHigh(); page.height = texture->getPixelsHigh();
} }
void _spAtlasPage_disposeTexture (spAtlasPage* self) { void Cocos2dTextureLoader::unload(void* texture) {
((Texture2D*)self->rendererObject)->release(); unloadTexture(texture);
} }
char* _spUtil_readFile (const char* path, int* length) {
Data data = FileUtils::getInstance()->getDataFromFile(FileUtils::getInstance()->fullPathForFilename(path)); Cocos2dExtension::Cocos2dExtension() : DefaultSpineExtension() { }
Cocos2dExtension::~Cocos2dExtension() { }
char *Cocos2dExtension::_readFile(const String &path, int *length) {
Data data = FileUtils::getInstance()->getDataFromFile(FileUtils::getInstance()->fullPathForFilename(path.buffer()));
if (data.isNull()) return 0; if (data.isNull()) return 0;
// avoid buffer overflow (int is shorter than ssize_t in certain platforms) // avoid buffer overflow (int is shorter than ssize_t in certain platforms)
@ -100,9 +101,14 @@ char* _spUtil_readFile (const char* path, int* length) {
*length = static_cast<int>(tmpLen); *length = static_cast<int>(tmpLen);
return ret; return ret;
#else #else
*length = static_cast<int>(data.getSize()); *length = static_cast<int>(data.getSize());
char* bytes = MALLOC(char, *length); char* bytes = MALLOC(char, *length);
memcpy(bytes, data.getBytes(), *length); memcpy(bytes, data.getBytes(), *length);
return bytes; return bytes;
#endif #endif
} }
SpineExtension *spine::getDefaultExtension () {
return new Cocos2dExtension();
}

View File

@ -33,15 +33,32 @@
#include <spine/spine.h> #include <spine/spine.h>
#include "cocos2d.h" #include "cocos2d.h"
#include <spine/Cocos2dAttachmentLoader.h>
#include <spine/SkeletonRenderer.h> #include <spine/SkeletonRenderer.h>
#include <spine/SkeletonAnimation.h> #include <spine/SkeletonAnimation.h>
#include <spine/SkeletonBatch.h> #include <spine/SkeletonBatch.h>
namespace spine { namespace spine {
typedef cocos2d::Texture2D* (*CustomTextureLoader)(const char* path); class Cocos2dTextureLoader: public TextureLoader {
// set custom texture loader for _spAtlasPage_createTexture public:
void spAtlasPage_setCustomTextureLoader(CustomTextureLoader texLoader); Cocos2dTextureLoader();
virtual ~Cocos2dTextureLoader();
virtual void load(AtlasPage& page, const String& path);
virtual void unload(void* texture);
};
class Cocos2dExtension: public DefaultSpineExtension {
public:
Cocos2dExtension();
virtual ~Cocos2dExtension();
protected:
virtual char *_readFile(const String &path, int *length);
};
} }
#endif /* SPINE_COCOS2DX_H_ */ #endif /* SPINE_COCOS2DX_H_ */

View File

@ -1,15 +1,15 @@
Spine Runtimes Software License v2.5 spine Runtimes Software License v2.5
Copyright (c) 2013-2016, Esoteric Software Copyright (c) 2013-2016, Esoteric Software
All rights reserved. All rights reserved.
You are granted a perpetual, non-exclusive, non-sublicensable, and You are granted a perpetual, non-exclusive, non-sublicensable, and
non-transferable license to use, install, execute, and perform the Spine non-transferable license to use, install, execute, and perform the spine
Runtimes software and derivative works solely for personal or internal Runtimes software and derivative works solely for personal or internal
use. Without the written permission of Esoteric Software (see Section 2 of use. Without the written permission of Esoteric Software (see Section 2 of
the Spine Software License Agreement), you may not (a) modify, translate, the spine Software License Agreement), you may not (a) modify, translate,
adapt, or develop new applications using the Spine Runtimes or otherwise adapt, or develop new applications using the spine Runtimes or otherwise
create derivative works or improvements of the Spine Runtimes or (b) remove, create derivative works or improvements of the spine Runtimes or (b) remove,
delete, alter, or obscure any trademarks or any copyright, trademark, patent, delete, alter, or obscure any trademarks or any copyright, trademark, patent,
or other intellectual property or proprietary rights notices on or in the or other intellectual property or proprietary rights notices on or in the
Software, including any copy thereof. Redistributions in binary or source Software, including any copy thereof. Redistributions in binary or source

View File

@ -1,22 +1,22 @@
# spine-cpp # spine-cpp
The spine-cpp runtime provides basic functionality to load and manipulate [Spine](http://esotericsoftware.com) skeletal animation data using C++. It does not perform rendering but can be extended to enable Spine animations for other projects that utilize C++. Note, this library uses C++03 for maximum portability and therefore does not take advantage of any C++11 or newer features such as std::unique_ptr. The spine-cpp runtime provides basic functionality to load and manipulate [spine](http://esotericsoftware.com) skeletal animation data using C++. It does not perform rendering but can be extended to enable spine animations for other projects that utilize C++. Note, this library uses C++03 for maximum portability and therefore does not take advantage of any C++11 or newer features such as std::unique_ptr.
## Licensing ## Licensing
This Spine Runtime may only be used for personal or internal use, typically to evaluate Spine before purchasing. If you would like to incorporate a Spine Runtime into your applications, distribute software containing a Spine Runtime, or modify a Spine Runtime, then you will need a valid [Spine license](https://esotericsoftware.com/spine-purchase). Please see the [Spine Runtimes Software License](http://esotericsoftware.com/git/spine-runtimes/blob/LICENSE) for detailed information. This spine Runtime may only be used for personal or internal use, typically to evaluate spine before purchasing. If you would like to incorporate a spine Runtime into your applications, distribute software containing a spine Runtime, or modify a spine Runtime, then you will need a valid [spine license](https://esotericsoftware.com/spine-purchase). Please see the [spine Runtimes Software License](http://esotericsoftware.com/git/spine-runtimes/blob/LICENSE) for detailed information.
The Spine Runtimes are developed with the intent to be used with data exported from Spine. By purchasing Spine, `Section 2` of the [Spine Software License](https://esotericsoftware.com/files/license.txt) grants the right to create and distribute derivative works of the Spine Runtimes. The spine Runtimes are developed with the intent to be used with data exported from spine. By purchasing spine, `Section 2` of the [spine Software License](https://esotericsoftware.com/files/license.txt) grants the right to create and distribute derivative works of the spine Runtimes.
## Spine version ## spine version
spine-cpp works with data exported from Spine 3.6.xx. spine-cpp works with data exported from spine 3.6.xx.
spine-cpp supports all Spine features. spine-cpp supports all spine features.
## Setup ## Setup
1. Download the Spine Runtimes source using [git](https://help.github.com/articles/set-up-git) or by downloading it as a zip via the download button above. 1. Download the spine Runtimes source using [git](https://help.github.com/articles/set-up-git) or by downloading it as a zip via the download button above.
2. Create a new project and import the source. 2. Create a new project and import the source.
Alternatively, the contents of the `spine-cpp/spine-cpp/src` and `spine-cpp/spine-cpp/include` directories can be copied into your project. Be sure your header search is configured to find the contents of the `spine-cpp/spine-cpp/include` directory. 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-cpp/spine-cpp/src` and `spine-cpp/spine-cpp/include` directories can be copied into your project. Be sure your header search is configured to find the contents of the `spine-cpp/spine-cpp/include` directory. Note that the includes use `spine/Xxx.h`, so the `spine` directory cannot be omitted when copying the files.
@ -25,7 +25,7 @@ Alternatively, the contents of the `spine-cpp/spine-cpp/src` and `spine-cpp/spin
Extending spine-cpp requires implementing both the SpineExtension class (which has a handy default instance) and the TextureLoader class: Extending spine-cpp requires implementing both the SpineExtension class (which has a handy default instance) and the TextureLoader class:
Spine::SpineExtension::setInstance(Spine::DefaultSpineExtension::getInstance()); spine::SpineExtension::setInstance(spine::DefaultSpineExtension::getInstance());
class MyTextureLoader : public TextureLoader class MyTextureLoader : public TextureLoader
{ {

View File

@ -1,6 +1,6 @@
# spine-cpp-unit-tests # spine-cpp-unit-tests
The spine-cpp-unit-tests project is to test the [Spine](http://esotericsoftware.com) skeletal animation system. It does not perform rendering. It is primarily used for regression testing and leak detection. It is designed to be run from a Continuous Integration server and to passively verify changes automatically on check-in. The spine-cpp-unit-tests project is to test the [spine](http://esotericsoftware.com) skeletal animation system. It does not perform rendering. It is primarily used for regression testing and leak detection. It is designed to be run from a Continuous Integration server and to passively verify changes automatically on check-in.
## Mini CPP Unit Testing ## Mini CPP Unit Testing
[MiniCppUnit](https://sourceforge.net/p/minicppunit/wiki/Home/) is a minimal unit testing framework similar to JUnit. It is used here to avoid large dependancies. [MiniCppUnit](https://sourceforge.net/p/minicppunit/wiki/Home/) is a minimal unit testing framework similar to JUnit. It is used here to avoid large dependancies.
@ -42,9 +42,9 @@ msbuild spine_unit_test.sln /t:spine_unit_test /p:Configuration="Debug" /p:Platf
## Licensing ## Licensing
This Spine Runtime may only be used for personal or internal use, typically to evaluate Spine before purchasing. If you would like to incorporate a Spine Runtime into your applications, distribute software containing a Spine Runtime, or modify a Spine Runtime, then you will need a valid [Spine license](https://esotericsoftware.com/spine-purchase). Please see the [Spine Runtimes Software License](https://github.com/EsotericSoftware/spine-runtimes/blob/master/LICENSE) for detailed information. This spine Runtime may only be used for personal or internal use, typically to evaluate spine before purchasing. If you would like to incorporate a spine Runtime into your applications, distribute software containing a spine Runtime, or modify a spine Runtime, then you will need a valid [spine license](https://esotericsoftware.com/spine-purchase). Please see the [spine Runtimes Software License](https://github.com/EsotericSoftware/spine-runtimes/blob/master/LICENSE) for detailed information.
The Spine Runtimes are developed with the intent to be used with data exported from Spine. By purchasing Spine, `Section 2` of the [Spine Software License](https://esotericsoftware.com/files/license.txt) grants the right to create and distribute derivative works of the Spine Runtimes. The spine Runtimes are developed with the intent to be used with data exported from spine. By purchasing spine, `Section 2` of the [spine Software License](https://esotericsoftware.com/files/license.txt) grants the right to create and distribute derivative works of the spine Runtimes.
original "walk"": 330 original "walk"": 330
second "walk": 0d0 second "walk": 0d0

View File

@ -34,7 +34,7 @@
#pragma warning ( disable : 4710 ) #pragma warning ( disable : 4710 )
using namespace Spine; using namespace spine;
void loadBinary(const String &binaryFile, const String &atlasFile, Atlas *&atlas, SkeletonData *&skeletonData, void loadBinary(const String &binaryFile, const String &atlasFile, Atlas *&atlas, SkeletonData *&skeletonData,
AnimationStateData *&stateData, Skeleton *&skeleton, AnimationState *&state) { AnimationStateData *&stateData, Skeleton *&skeleton, AnimationState *&state) {
@ -123,11 +123,17 @@ void testLoading() {
} }
} }
namespace spine {
SpineExtension* getDefaultExtension() {
return new DefaultSpineExtension();
}
}
int main(int argc, char **argv) { int main(int argc, char **argv) {
DebugExtension *ext = new DebugExtension(); DebugExtension debug(SpineExtension::getInstance());
SpineExtension::setInstance(ext); SpineExtension::setInstance(&debug);
testLoading(); testLoading();
ext->reportLeaks(); debug.reportLeaks();
} }

View File

@ -37,7 +37,7 @@
#include <spine/SpineObject.h> #include <spine/SpineObject.h>
#include <spine/String.h> #include <spine/String.h>
namespace Spine { namespace spine {
class Timeline; class Timeline;
class Skeleton; class Skeleton;

View File

@ -36,8 +36,9 @@
#include <spine/MixBlend.h> #include <spine/MixBlend.h>
#include <spine/SpineObject.h> #include <spine/SpineObject.h>
#include <spine/String.h> #include <spine/String.h>
#include <spine/HasRendererObject.h>
namespace Spine { namespace spine {
enum EventType { enum EventType {
EventType_Start, EventType_Start,
EventType_Interrupt, EventType_Interrupt,
@ -56,16 +57,18 @@ namespace Spine {
class Skeleton; class Skeleton;
class RotateTimeline; class RotateTimeline;
typedef void (*OnAnimationEventFunc) (AnimationState* state, EventType type, TrackEntry* entry, Event* event); typedef void (*AnimationStateListener) (AnimationState* state, EventType type, TrackEntry* entry, Event* event);
/// State for the playback of an animation /// State for the playback of an animation
class TrackEntry : public SpineObject { class TrackEntry : public SpineObject, public HasRendererObject {
friend class EventQueue; friend class EventQueue;
friend class AnimationState; friend class AnimationState;
public: public:
TrackEntry(); TrackEntry();
virtual ~TrackEntry();
/// The index of the track where this entry is either current or queued. /// The index of the track where this entry is either current or queued.
int getTrackIndex(); int getTrackIndex();
@ -216,8 +219,7 @@ namespace Spine {
/// TrackEntry chooses the short way the first time it is applied and remembers that direction. /// TrackEntry chooses the short way the first time it is applied and remembers that direction.
void resetRotationDirections(); void resetRotationDirections();
void setOnAnimationEventFunc(OnAnimationEventFunc inValue); void setListener(AnimationStateListener listener);
private: private:
Animation* _animation; Animation* _animation;
@ -235,7 +237,7 @@ namespace Spine {
Vector<int> _timelineData; Vector<int> _timelineData;
Vector<TrackEntry*> _timelineDipMix; Vector<TrackEntry*> _timelineDipMix;
Vector<float> _timelinesRotation; Vector<float> _timelinesRotation;
OnAnimationEventFunc _onAnimationEventFunc; AnimationStateListener _listener;
/// Sets the timeline data. /// Sets the timeline data.
/// @param to May be NULL. /// @param to May be NULL.
@ -290,7 +292,7 @@ namespace Spine {
void drain(); void drain();
}; };
class AnimationState : public SpineObject { class AnimationState : public SpineObject, public HasRendererObject {
friend class TrackEntry; friend class TrackEntry;
friend class EventQueue; friend class EventQueue;
@ -378,10 +380,7 @@ namespace Spine {
float getTimeScale(); float getTimeScale();
void setTimeScale(float inValue); void setTimeScale(float inValue);
void setOnAnimationEventFunc(OnAnimationEventFunc inValue); void setListener(AnimationStateListener listener);
void setRendererObject(void* inValue);
void* getRendererObject();
private: private:
static const int Subsequent, First, Dip, DipMix; static const int Subsequent, First, Dip, DipMix;
@ -397,9 +396,7 @@ namespace Spine {
Vector<TrackEntry*> _mixingTo; Vector<TrackEntry*> _mixingTo;
bool _animationsChanged; bool _animationsChanged;
void* _rendererObject; AnimationStateListener _listener;
OnAnimationEventFunc _onAnimationEventFunc;
float _timeScale; float _timeScale;

View File

@ -37,7 +37,7 @@
#include <assert.h> #include <assert.h>
namespace Spine { namespace spine {
class SkeletonData; class SkeletonData;
class Animation; class Animation;
@ -46,6 +46,8 @@ namespace Spine {
friend class AnimationState; friend class AnimationState;
public: public:
explicit AnimationStateData(SkeletonData* skeletonData);
/// The SkeletonData to look up animations when they are specified by name. /// The SkeletonData to look up animations when they are specified by name.
SkeletonData* getSkeletonData(); SkeletonData* getSkeletonData();
@ -53,8 +55,6 @@ namespace Spine {
float getDefaultMix(); float getDefaultMix();
void setDefaultMix(float inValue); void setDefaultMix(float inValue);
explicit AnimationStateData(SkeletonData* skeletonData);
/// Sets a mix duration by animation names. /// Sets a mix duration by animation names.
void setMix(const String& fromName, const String& toName, float duration); void setMix(const String& fromName, const String& toName, float duration);

View File

@ -35,8 +35,9 @@
#include <spine/Extension.h> #include <spine/Extension.h>
#include <spine/SpineObject.h> #include <spine/SpineObject.h>
#include <spine/String.h> #include <spine/String.h>
#include <spine/HasRendererObject.h>
namespace Spine { namespace spine {
enum Format { enum Format {
Format_Alpha, Format_Alpha,
Format_Intensity, Format_Intensity,
@ -64,7 +65,7 @@ enum TextureWrap {
TextureWrap_Repeat TextureWrap_Repeat
}; };
class AtlasPage : public SpineObject { class AtlasPage : public SpineObject, public HasRendererObject {
public: public:
String name; String name;
Format format; Format format;
@ -72,13 +73,14 @@ public:
TextureFilter magFilter; TextureFilter magFilter;
TextureWrap uWrap; TextureWrap uWrap;
TextureWrap vWrap; TextureWrap vWrap;
void *rendererObject;
int width, height; int width, height;
explicit AtlasPage(const String &inName) : name(inName), format(Format_RGBA8888), minFilter(TextureFilter_Nearest), explicit AtlasPage(const String &inName) : name(inName), format(Format_RGBA8888), minFilter(TextureFilter_Nearest),
magFilter(TextureFilter_Nearest), uWrap(TextureWrap_ClampToEdge), magFilter(TextureFilter_Nearest), uWrap(TextureWrap_ClampToEdge),
vWrap(TextureWrap_ClampToEdge) { vWrap(TextureWrap_ClampToEdge) {
} }
virtual ~AtlasPage() { }
}; };
class AtlasRegion : public SpineObject { class AtlasRegion : public SpineObject {
@ -112,10 +114,6 @@ public:
/// @return The region, or NULL. /// @return The region, or NULL.
AtlasRegion *findRegion(const String &name); AtlasRegion *findRegion(const String &name);
void dispose();
private: private:
Vector<AtlasPage *> _pages; Vector<AtlasPage *> _pages;
Vector<AtlasRegion *> _regions; Vector<AtlasRegion *> _regions;

View File

@ -36,7 +36,7 @@
#include <spine/String.h> #include <spine/String.h>
namespace Spine { namespace spine {
class Atlas; class Atlas;
class AtlasRegion; class AtlasRegion;
@ -44,10 +44,10 @@ namespace Spine {
/// An AttachmentLoader that configures attachments using texture regions from an Atlas. /// An AttachmentLoader that configures attachments using texture regions from an Atlas.
/// See http://esotericsoftware.com/spine-loading-skeleton-data#JSON-and-binary-data about Loading Skeleton Data in the Spine Runtimes Guide. /// See http://esotericsoftware.com/spine-loading-skeleton-data#JSON-and-binary-data about Loading Skeleton Data in the Spine Runtimes Guide.
/// ///
class AtlasAttachmentLoader : public AttachmentLoader { class AtlasAttachmentLoader : public AttachmentLoader {
RTTI_DECL
public: public:
RTTI_DECL
explicit AtlasAttachmentLoader(Atlas* atlas); explicit AtlasAttachmentLoader(Atlas* atlas);
virtual RegionAttachment* newRegionAttachment(Skin& skin, const String& name, const String& path); virtual RegionAttachment* newRegionAttachment(Skin& skin, const String& name, const String& path);

View File

@ -35,7 +35,7 @@
#include <spine/SpineObject.h> #include <spine/SpineObject.h>
#include <spine/String.h> #include <spine/String.h>
namespace Spine { namespace spine {
class Attachment : public SpineObject { class Attachment : public SpineObject {
RTTI_DECL RTTI_DECL

View File

@ -35,7 +35,7 @@
#include <spine/SpineObject.h> #include <spine/SpineObject.h>
#include <spine/String.h> #include <spine/String.h>
namespace Spine { namespace spine {
class Skin; class Skin;
class RegionAttachment; class RegionAttachment;
class MeshAttachment; class MeshAttachment;
@ -45,6 +45,7 @@ namespace Spine {
class ClippingAttachment; class ClippingAttachment;
class AttachmentLoader : public SpineObject { class AttachmentLoader : public SpineObject {
public:
RTTI_DECL RTTI_DECL
AttachmentLoader(); AttachmentLoader();

View File

@ -38,7 +38,7 @@
#include <spine/MixDirection.h> #include <spine/MixDirection.h>
#include <spine/String.h> #include <spine/String.h>
namespace Spine { namespace spine {
class Skeleton; class Skeleton;
class Event; class Event;

View File

@ -31,7 +31,7 @@
#ifndef Spine_AttachmentType_h #ifndef Spine_AttachmentType_h
#define Spine_AttachmentType_h #define Spine_AttachmentType_h
namespace Spine { namespace spine {
enum AttachmentType { enum AttachmentType {
AttachmentType_Region, AttachmentType_Region,
AttachmentType_Boundingbox, AttachmentType_Boundingbox,

View File

@ -31,7 +31,7 @@
#ifndef Spine_BlendMode_h #ifndef Spine_BlendMode_h
#define Spine_BlendMode_h #define Spine_BlendMode_h
namespace Spine { namespace spine {
enum BlendMode { enum BlendMode {
BlendMode_Normal = 0, BlendMode_Normal = 0,
BlendMode_Additive, BlendMode_Additive,

View File

@ -35,7 +35,7 @@
#include <spine/SpineObject.h> #include <spine/SpineObject.h>
#include <spine/Vector.h> #include <spine/Vector.h>
namespace Spine { namespace spine {
class BoneData; class BoneData;
class Skeleton; class Skeleton;

View File

@ -35,7 +35,7 @@
#include <spine/SpineObject.h> #include <spine/SpineObject.h>
#include <spine/String.h> #include <spine/String.h>
namespace Spine { namespace spine {
class BoneData : public SpineObject { class BoneData : public SpineObject {
friend class SkeletonBinary; friend class SkeletonBinary;

View File

@ -34,7 +34,7 @@
#include <spine/VertexAttachment.h> #include <spine/VertexAttachment.h>
#include <spine/SpineObject.h> #include <spine/SpineObject.h>
namespace Spine { namespace spine {
/// Attachment that has a polygon for bounds checking. /// Attachment that has a polygon for bounds checking.
class BoundingBoxAttachment : public VertexAttachment { class BoundingBoxAttachment : public VertexAttachment {
RTTI_DECL RTTI_DECL

View File

@ -33,7 +33,7 @@
#include <spine/VertexAttachment.h> #include <spine/VertexAttachment.h>
namespace Spine { namespace spine {
class SlotData; class SlotData;
class ClippingAttachment : public VertexAttachment { class ClippingAttachment : public VertexAttachment {

View File

@ -32,7 +32,7 @@
#include <spine/MathUtil.h> #include <spine/MathUtil.h>
namespace Spine { namespace spine {
class Color : public SpineObject { class Color : public SpineObject {
public: public:
Color() : r(0), g(0), b(0), a(0) { Color() : r(0), g(0), b(0), a(0) {

View File

@ -33,7 +33,7 @@
#include <spine/CurveTimeline.h> #include <spine/CurveTimeline.h>
namespace Spine { namespace spine {
class ColorTimeline : public CurveTimeline { class ColorTimeline : public CurveTimeline {
friend class SkeletonBinary; friend class SkeletonBinary;

View File

@ -33,7 +33,7 @@
#include <spine/Updatable.h> #include <spine/Updatable.h>
namespace Spine { namespace spine {
/// The interface for all constraints. /// The interface for all constraints.
class Constraint : public Updatable { class Constraint : public Updatable {
RTTI_DECL RTTI_DECL

View File

@ -39,7 +39,7 @@
#include <assert.h> #include <assert.h>
namespace Spine { namespace spine {
class ContainerUtil : public SpineObject { class ContainerUtil : public SpineObject {
public: public:
/// Finds an item by comparing each item's name. /// Finds an item by comparing each item's name.

View File

@ -34,7 +34,7 @@
#include <spine/Timeline.h> #include <spine/Timeline.h>
#include <spine/Vector.h> #include <spine/Vector.h>
namespace Spine { namespace spine {
/// Base class for frames that use an interpolation bezier curve. /// Base class for frames that use an interpolation bezier curve.
class CurveTimeline : public Timeline { class CurveTimeline : public Timeline {
RTTI_DECL RTTI_DECL

View File

@ -35,8 +35,8 @@
#include <map> #include <map>
namespace Spine { namespace spine {
class DebugExtension : public DefaultSpineExtension { class DebugExtension : public SpineExtension {
struct Allocation { struct Allocation {
void *address; void *address;
size_t size; size_t size;
@ -51,7 +51,7 @@ class DebugExtension : public DefaultSpineExtension {
}; };
public: public:
DebugExtension(): _allocations(0), _reallocations(0), _frees(0) { DebugExtension(SpineExtension* extension): _extension(extension), _allocations(0), _reallocations(0), _frees(0) {
} }
void reportLeaks() { void reportLeaks() {
@ -66,16 +66,15 @@ public:
_allocated.clear(); _allocated.clear();
} }
protected:
virtual void *_alloc(size_t size, const char *file, int line) { virtual void *_alloc(size_t size, const char *file, int line) {
void *result = DefaultSpineExtension::_alloc(size, file, line); void *result = _extension->_alloc(size, file, line);
_allocated[result] = Allocation(result, size, file, line); _allocated[result] = Allocation(result, size, file, line);
_allocations++; _allocations++;
return result; return result;
} }
virtual void *_calloc(size_t size, const char *file, int line) { virtual void *_calloc(size_t size, const char *file, int line) {
void *result = DefaultSpineExtension::_calloc(size, file, line); void *result = _extension->_calloc(size, file, line);
_allocated[result] = Allocation(result, size, file, line); _allocated[result] = Allocation(result, size, file, line);
_allocations++; _allocations++;
return result; return result;
@ -83,7 +82,7 @@ protected:
virtual void *_realloc(void *ptr, size_t size, const char *file, int line) { virtual void *_realloc(void *ptr, size_t size, const char *file, int line) {
_allocated.erase(ptr); _allocated.erase(ptr);
void *result = DefaultSpineExtension::_realloc(ptr, size, file, line); void *result = _extension->_realloc(ptr, size, file, line);
_reallocations++; _reallocations++;
_allocated[result] = Allocation(result, size, file, line); _allocated[result] = Allocation(result, size, file, line);
return result; return result;
@ -91,17 +90,22 @@ protected:
virtual void _free(void *mem, const char *file, int line) { virtual void _free(void *mem, const char *file, int line) {
if (_allocated.count(mem)) { if (_allocated.count(mem)) {
DefaultSpineExtension::_free(mem, file, line); _extension->_free(mem, file, line);
_frees++; _frees++;
_allocated.erase(mem); _allocated.erase(mem);
return; return;
} }
printf("%s:%i (address %p): Double free or not allocated through SpineExtension\n", file, line, mem); printf("%s:%i (address %p): Double free or not allocated through SpineExtension\n", file, line, mem);
DefaultSpineExtension::_free(mem, file, line); _extension->_free(mem, file, line);
}
virtual char *_readFile(const String &path, int *length) {
return _extension->_readFile(path, length);
} }
private: private:
SpineExtension* _extension;
std::map<void*, Allocation> _allocated; std::map<void*, Allocation> _allocated;
size_t _allocations; size_t _allocations;
size_t _reallocations; size_t _reallocations;

View File

@ -33,7 +33,7 @@
#include <spine/CurveTimeline.h> #include <spine/CurveTimeline.h>
namespace Spine { namespace spine {
class VertexAttachment; class VertexAttachment;
class DeformTimeline : public CurveTimeline { class DeformTimeline : public CurveTimeline {

View File

@ -33,7 +33,7 @@
#include <spine/Timeline.h> #include <spine/Timeline.h>
namespace Spine { namespace spine {
class DrawOrderTimeline : public Timeline { class DrawOrderTimeline : public Timeline {
friend class SkeletonBinary; friend class SkeletonBinary;
friend class SkeletonJson; friend class SkeletonJson;

View File

@ -34,7 +34,7 @@
#include <spine/SpineObject.h> #include <spine/SpineObject.h>
#include <spine/String.h> #include <spine/String.h>
namespace Spine { namespace spine {
class EventData; class EventData;
/// Stores the current pose values for an Event. /// Stores the current pose values for an Event.

View File

@ -34,7 +34,7 @@
#include <spine/SpineObject.h> #include <spine/SpineObject.h>
#include <spine/String.h> #include <spine/String.h>
namespace Spine { namespace spine {
/// Stores the setup pose values for an Event. /// Stores the setup pose values for an Event.
class EventData : public SpineObject { class EventData : public SpineObject {
friend class SkeletonBinary; friend class SkeletonBinary;

View File

@ -33,7 +33,7 @@
#include <spine/Timeline.h> #include <spine/Timeline.h>
namespace Spine { namespace spine {
class EventTimeline : public Timeline { class EventTimeline : public Timeline {
friend class SkeletonBinary; friend class SkeletonBinary;
friend class SkeletonJson; friend class SkeletonJson;

View File

@ -35,7 +35,7 @@
#define SP_UNUSED(x) (void)(x) #define SP_UNUSED(x) (void)(x)
namespace Spine { namespace spine {
class String; class String;
class SpineExtension { class SpineExtension {
@ -70,7 +70,6 @@ public:
virtual ~SpineExtension(); virtual ~SpineExtension();
protected:
/// Implement this function to use your own memory allocator /// Implement this function to use your own memory allocator
virtual void *_alloc(size_t size, const char *file, int line) = 0; virtual void *_alloc(size_t size, const char *file, int line) = 0;
@ -83,6 +82,7 @@ protected:
virtual char *_readFile(const String &path, int *length) = 0; virtual char *_readFile(const String &path, int *length) = 0;
protected:
SpineExtension(); SpineExtension();
private: private:
@ -107,18 +107,11 @@ protected:
virtual char *_readFile(const String &path, int *length); virtual char *_readFile(const String &path, int *length);
}; };
struct Allocation { // This function is to be implemented by engine specific runtimes to provide
void *address; // the default extension for that engine. It is called the first time
size_t size; // SpineExtension::getInstance() is called, when no instance has been set
const char *fileName; // yet.
int line; extern SpineExtension *getDefaultExtension();
Allocation() : address(NULL), size(0), fileName(NULL), line(0) {
}
Allocation(void *a, size_t s, const char *f, int l) : address(a), size(s), fileName(f), line(l) {
}
};
} }
#endif /* Spine_Extension_h */ #endif /* Spine_Extension_h */

View File

@ -28,21 +28,32 @@
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/ *****************************************************************************/
#ifndef SPINE_COCOS2DATTACHMENTLOADER_H_ #ifndef Spine_HasRendererObject_h
#define SPINE_COCOS2DATTACHMENTLOADER_H_ #define Spine_HasRendererObject_h
#include <spine/AtlasAttachmentLoader.h> namespace spine {
extern "C" { typedef void (*DisposeRendererObject) (void* rendererObject);
typedef struct Cocos2dAttachmentLoader { class HasRendererObject {
spAttachmentLoader super; public:
spAtlasAttachmentLoader* atlasAttachmentLoader; explicit HasRendererObject() : _rendererObject(NULL) {};
} Cocos2dAttachmentLoader;
/* The Cocos2dAttachmentLoader must not be disposed until after the skeleton data has been disposed. */ virtual ~HasRendererObject() {
Cocos2dAttachmentLoader* Cocos2dAttachmentLoader_create (spAtlas* atlas); if (_dispose)
_dispose(_rendererObject);
}
void* getRendererObject() { return _rendererObject; }
void setRendererObject(void* rendererObject, DisposeRendererObject dispose = NULL) {
_rendererObject = rendererObject;
_dispose = dispose;
}
private:
void *_rendererObject;
DisposeRendererObject _dispose;
};
} }
#endif /* SPINE_COCOS2DATTACHMENTLOADER_H_ */ #endif

View File

@ -40,7 +40,7 @@
#pragma warning(disable:4291) #pragma warning(disable:4291)
#endif #endif
namespace Spine { namespace spine {
template<typename K, typename V> template<typename K, typename V>
class HashMap : public SpineObject { class HashMap : public SpineObject {
private: private:

View File

@ -35,7 +35,7 @@
#include <spine/Vector.h> #include <spine/Vector.h>
namespace Spine { namespace spine {
class IkConstraintData; class IkConstraintData;
class Skeleton; class Skeleton;

View File

@ -35,7 +35,7 @@
#include <spine/SpineObject.h> #include <spine/SpineObject.h>
#include <spine/String.h> #include <spine/String.h>
namespace Spine { namespace spine {
class BoneData; class BoneData;
class IkConstraintData : public SpineObject { class IkConstraintData : public SpineObject {

View File

@ -33,7 +33,7 @@
#include <spine/CurveTimeline.h> #include <spine/CurveTimeline.h>
namespace Spine { namespace spine {
class IkConstraintTimeline : public CurveTimeline { class IkConstraintTimeline : public CurveTimeline {
friend class SkeletonBinary; friend class SkeletonBinary;
friend class SkeletonJson; friend class SkeletonJson;

View File

@ -34,11 +34,11 @@
#include <spine/SpineObject.h> #include <spine/SpineObject.h>
#ifndef SPINE_JSON_HAVE_PREV #ifndef SPINE_JSON_HAVE_PREV
/* Spine doesn't use the "prev" link in the Json sibling lists. */ /* spine doesn't use the "prev" link in the Json sibling lists. */
#define SPINE_JSON_HAVE_PREV 0 #define SPINE_JSON_HAVE_PREV 0
#endif #endif
namespace Spine { namespace spine {
class Json : public SpineObject { class Json : public SpineObject {
friend class SkeletonJson; friend class SkeletonJson;

View File

@ -34,7 +34,7 @@
#include <spine/SpineObject.h> #include <spine/SpineObject.h>
#include <spine/String.h> #include <spine/String.h>
namespace Spine { namespace spine {
class MeshAttachment; class MeshAttachment;
class LinkedMesh : public SpineObject { class LinkedMesh : public SpineObject {

View File

@ -36,7 +36,7 @@
#include <float.h> #include <float.h>
#include <string.h> #include <string.h>
namespace Spine { namespace spine {
static const float PI = 3.1415926535897932385f; static const float PI = 3.1415926535897932385f;
static const float PI_2 = PI * 2; static const float PI_2 = PI * 2;
static const float DEG_RAD = (PI / 180.0f); static const float DEG_RAD = (PI / 180.0f);

View File

@ -34,10 +34,11 @@
#include <spine/VertexAttachment.h> #include <spine/VertexAttachment.h>
#include <spine/Vector.h> #include <spine/Vector.h>
#include <spine/Color.h> #include <spine/Color.h>
#include <spine/HasRendererObject.h>
namespace Spine { namespace spine {
/// Attachment that displays a texture region using a mesh. /// Attachment that displays a texture region using a mesh.
class MeshAttachment : public VertexAttachment { class MeshAttachment : public VertexAttachment, public HasRendererObject {
friend class SkeletonBinary; friend class SkeletonBinary;
friend class SkeletonJson; friend class SkeletonJson;
friend class AtlasAttachmentLoader; friend class AtlasAttachmentLoader;
@ -47,6 +48,8 @@ namespace Spine {
public: public:
explicit MeshAttachment(const String& name); explicit MeshAttachment(const String& name);
virtual ~MeshAttachment();
void updateUVs(); void updateUVs();
virtual bool applyDeform(VertexAttachment* sourceAttachment); virtual bool applyDeform(VertexAttachment* sourceAttachment);
@ -65,8 +68,6 @@ namespace Spine {
const String& getPath(); const String& getPath();
void setPath(const String& inValue); void setPath(const String& inValue);
void* getRendererObject();
void setRendererObject(void* inValue);
float getRegionU(); float getRegionU();
void setRegionU(float inValue); void setRegionU(float inValue);
@ -124,7 +125,6 @@ namespace Spine {
Vector<float> _regionUVs; Vector<float> _regionUVs;
Vector<unsigned short> _triangles; Vector<unsigned short> _triangles;
Vector<unsigned short> _edges; Vector<unsigned short> _edges;
void* _rendererObject;
String _path; String _path;
float _regionU; float _regionU;
float _regionV; float _regionV;

View File

@ -31,7 +31,7 @@
#ifndef Spine_MixPose_h #ifndef Spine_MixPose_h
#define Spine_MixPose_h #define Spine_MixPose_h
namespace Spine { namespace spine {
/// ///
/// Controls how a timeline is mixed with the setup or current pose. /// Controls how a timeline is mixed with the setup or current pose.
/// See also Timeline::apply(Skeleton&, float, float, Vector&, float, Blend, MixDirection) /// See also Timeline::apply(Skeleton&, float, float, Vector&, float, Blend, MixDirection)

View File

@ -31,7 +31,7 @@
#ifndef Spine_MixDirection_h #ifndef Spine_MixDirection_h
#define Spine_MixDirection_h #define Spine_MixDirection_h
namespace Spine { namespace spine {
/// ///
/// Indicates whether a timeline's alpha is mixing out over time toward 0 (the setup or current pose) or mixing in toward 1 (the timeline's pose). /// Indicates whether a timeline's alpha is mixing out over time toward 0 (the setup or current pose) or mixing in toward 1 (the timeline's pose).
/// See also Timeline::apply(Skeleton&, float, float, Vector&, float, MixPose, MixDirection) /// See also Timeline::apply(Skeleton&, float, float, Vector&, float, MixPose, MixDirection)

View File

@ -33,7 +33,7 @@
#include <spine/VertexAttachment.h> #include <spine/VertexAttachment.h>
namespace Spine { namespace spine {
class PathAttachment : public VertexAttachment { class PathAttachment : public VertexAttachment {
friend class SkeletonBinary; friend class SkeletonBinary;
friend class SkeletonJson; friend class SkeletonJson;

View File

@ -35,7 +35,7 @@
#include <spine/Vector.h> #include <spine/Vector.h>
namespace Spine { namespace spine {
class PathConstraintData; class PathConstraintData;
class Skeleton; class Skeleton;
class PathAttachment; class PathAttachment;

View File

@ -38,7 +38,7 @@
#include <spine/SpineObject.h> #include <spine/SpineObject.h>
#include <spine/String.h> #include <spine/String.h>
namespace Spine { namespace spine {
class BoneData; class BoneData;
class SlotData; class SlotData;

View File

@ -33,7 +33,7 @@
#include <spine/CurveTimeline.h> #include <spine/CurveTimeline.h>
namespace Spine { namespace spine {
class PathConstraintMixTimeline : public CurveTimeline { class PathConstraintMixTimeline : public CurveTimeline {
friend class SkeletonBinary; friend class SkeletonBinary;
friend class SkeletonJson; friend class SkeletonJson;

View File

@ -33,7 +33,7 @@
#include <spine/CurveTimeline.h> #include <spine/CurveTimeline.h>
namespace Spine { namespace spine {
class PathConstraintPositionTimeline : public CurveTimeline { class PathConstraintPositionTimeline : public CurveTimeline {
friend class SkeletonBinary; friend class SkeletonBinary;
friend class SkeletonJson; friend class SkeletonJson;

View File

@ -33,7 +33,7 @@
#include <spine/PathConstraintPositionTimeline.h> #include <spine/PathConstraintPositionTimeline.h>
namespace Spine { namespace spine {
class PathConstraintSpacingTimeline : public PathConstraintPositionTimeline { class PathConstraintSpacingTimeline : public PathConstraintPositionTimeline {
friend class SkeletonBinary; friend class SkeletonBinary;
friend class SkeletonJson; friend class SkeletonJson;

View File

@ -33,7 +33,7 @@
#include <spine/Attachment.h> #include <spine/Attachment.h>
namespace Spine { namespace spine {
class Bone; class Bone;
/// ///

View File

@ -36,7 +36,7 @@
#include <spine/ContainerUtil.h> #include <spine/ContainerUtil.h>
#include <spine/SpineObject.h> #include <spine/SpineObject.h>
namespace Spine { namespace spine {
template<typename T> template<typename T>
class Pool : public SpineObject { class Pool : public SpineObject {
public: public:

View File

@ -31,7 +31,7 @@
#ifndef Spine_PositionMode_h #ifndef Spine_PositionMode_h
#define Spine_PositionMode_h #define Spine_PositionMode_h
namespace Spine { namespace spine {
enum PositionMode { enum PositionMode {
PositionMode_Fixed = 0, PositionMode_Fixed = 0,
PositionMode_Percent PositionMode_Percent

View File

@ -35,7 +35,7 @@
#include <string> #include <string>
namespace Spine { namespace spine {
class RTTI : public SpineObject { class RTTI : public SpineObject {
public: public:
explicit RTTI(const std::string &className); explicit RTTI(const std::string &className);
@ -61,16 +61,16 @@ private:
#define RTTI_DECL \ #define RTTI_DECL \
public: \ public: \
static const Spine::RTTI rtti; \ static const spine::RTTI rtti; \
virtual const Spine::RTTI& getRTTI() const; virtual const spine::RTTI& getRTTI() const;
#define RTTI_IMPL_NOPARENT(name) \ #define RTTI_IMPL_NOPARENT(name) \
const Spine::RTTI name::rtti(#name); \ const spine::RTTI name::rtti(#name); \
const Spine::RTTI& name::getRTTI() const { return rtti; } const spine::RTTI& name::getRTTI() const { return rtti; }
#define RTTI_IMPL(name, parent) \ #define RTTI_IMPL(name, parent) \
const Spine::RTTI name::rtti(#name, parent::rtti); \ const spine::RTTI name::rtti(#name, parent::rtti); \
const Spine::RTTI& name::getRTTI() const { return rtti; } const spine::RTTI& name::getRTTI() const { return rtti; }
#endif /* Spine_RTTI_h */ #endif /* Spine_RTTI_h */

View File

@ -36,14 +36,15 @@
#include <spine/Color.h> #include <spine/Color.h>
#include <string> #include <string>
#include <spine/HasRendererObject.h>
#define NUM_UVS 8 #define NUM_UVS 8
namespace Spine { namespace spine {
class Bone; class Bone;
/// Attachment that displays a texture region. /// Attachment that displays a texture region.
class RegionAttachment : public Attachment { class RegionAttachment : public Attachment, public HasRendererObject {
friend class SkeletonBinary; friend class SkeletonBinary;
friend class SkeletonJson; friend class SkeletonJson;
friend class AtlasAttachmentLoader; friend class AtlasAttachmentLoader;
@ -62,6 +63,7 @@ namespace Spine {
/// @param worldVertices The output world vertices. Must have a length greater than or equal to offset + 8. /// @param worldVertices The output world vertices. Must have a length greater than or equal to offset + 8.
/// @param offset The worldVertices index to begin writing values. /// @param offset The worldVertices index to begin writing values.
/// @param stride The number of worldVertices entries between the value pairs written. /// @param stride The number of worldVertices entries between the value pairs written.
void computeWorldVertices(Bone& bone, float *worldVertices, size_t offset, size_t stride = 2);
void computeWorldVertices(Bone& bone, Vector<float>& worldVertices, size_t offset, size_t stride = 2); void computeWorldVertices(Bone& bone, Vector<float>& worldVertices, size_t offset, size_t stride = 2);
float getX(); float getX();
@ -83,24 +85,22 @@ namespace Spine {
const String& getPath(); const String& getPath();
void setPath(const String& inValue); void setPath(const String& inValue);
void* getRendererObject();
void setRendererObject(void* inValue);
float getRegionOffsetX(); float getRegionOffsetX();
void setRegionOffsetX(float inValue); void setRegionOffsetX(float inValue);
// Pixels stripped from the bottom left, unrotated.
float getRegionOffsetY(); float getRegionOffsetY();
void setRegionOffsetY(float inValue); void setRegionOffsetY(float inValue);
float getRegionWidth(); float getRegionWidth();
void setRegionWidth(float inValue); void setRegionWidth(float inValue);
// Unrotated, stripped size.
float getRegionHeight(); float getRegionHeight();
void setRegionHeight(float inValue); void setRegionHeight(float inValue);
float getRegionOriginalWidth(); float getRegionOriginalWidth();
void setRegionOriginalWidth(float inValue); void setRegionOriginalWidth(float inValue);
// Unrotated, unstripped size.
float getRegionOriginalHeight(); float getRegionOriginalHeight();
void setRegionOriginalHeight(float inValue); void setRegionOriginalHeight(float inValue);
@ -121,7 +121,6 @@ namespace Spine {
float _regionOffsetX, _regionOffsetY, _regionWidth, _regionHeight, _regionOriginalWidth, _regionOriginalHeight; float _regionOffsetX, _regionOffsetY, _regionWidth, _regionHeight, _regionOriginalWidth, _regionOriginalHeight;
Vector<float> _vertexOffset; Vector<float> _vertexOffset;
Vector<float> _uvs; Vector<float> _uvs;
void* _rendererObject;
String _path; String _path;
float _regionU; float _regionU;
float _regionV; float _regionV;

View File

@ -31,7 +31,7 @@
#ifndef Spine_RotateMode_h #ifndef Spine_RotateMode_h
#define Spine_RotateMode_h #define Spine_RotateMode_h
namespace Spine { namespace spine {
enum RotateMode { enum RotateMode {
RotateMode_Tangent = 0, RotateMode_Tangent = 0,
RotateMode_Chain, RotateMode_Chain,

View File

@ -33,7 +33,7 @@
#include <spine/CurveTimeline.h> #include <spine/CurveTimeline.h>
namespace Spine { namespace spine {
class RotateTimeline : public CurveTimeline { class RotateTimeline : public CurveTimeline {
friend class SkeletonBinary; friend class SkeletonBinary;
friend class SkeletonJson; friend class SkeletonJson;

View File

@ -33,7 +33,7 @@
#include <spine/TranslateTimeline.h> #include <spine/TranslateTimeline.h>
namespace Spine { namespace spine {
class ScaleTimeline : public TranslateTimeline { class ScaleTimeline : public TranslateTimeline {
friend class SkeletonBinary; friend class SkeletonBinary;
friend class SkeletonJson; friend class SkeletonJson;

View File

@ -33,7 +33,7 @@
#include <spine/TranslateTimeline.h> #include <spine/TranslateTimeline.h>
namespace Spine { namespace spine {
class ShearTimeline : public TranslateTimeline { class ShearTimeline : public TranslateTimeline {
friend class SkeletonBinary; friend class SkeletonBinary;
friend class SkeletonJson; friend class SkeletonJson;

View File

@ -39,7 +39,7 @@
#include <limits> // std::numeric_limits #include <limits> // std::numeric_limits
namespace Spine { namespace spine {
class SkeletonData; class SkeletonData;
class Bone; class Bone;
@ -170,7 +170,7 @@ public:
Bone *getRootBone(); Bone *getRootBone();
const SkeletonData *getData(); SkeletonData *getData();
Vector<Bone *> &getBones(); Vector<Bone *> &getBones();

View File

@ -37,7 +37,7 @@
#include <spine/String.h> #include <spine/String.h>
#include <spine/Color.h> #include <spine/Color.h>
namespace Spine { namespace spine {
class SkeletonData; class SkeletonData;
class Atlas; class Atlas;
class AttachmentLoader; class AttachmentLoader;

View File

@ -34,7 +34,7 @@
#include <spine/Vector.h> #include <spine/Vector.h>
#include <spine/SpineObject.h> #include <spine/SpineObject.h>
namespace Spine { namespace spine {
class Skeleton; class Skeleton;
class BoundingBoxAttachment; class BoundingBoxAttachment;
class Polygon; class Polygon;

View File

@ -34,7 +34,7 @@
#include <spine/Vector.h> #include <spine/Vector.h>
#include <spine/Triangulator.h> #include <spine/Triangulator.h>
namespace Spine { namespace spine {
class Slot; class Slot;
class ClippingAttachment; class ClippingAttachment;
@ -48,7 +48,9 @@ namespace Spine {
void clipEnd(); void clipEnd();
void clipTriangles(Vector<float>& vertices, size_t verticesLength, Vector<unsigned short>& triangles, size_t trianglesLength, Vector<float>& uvs); void clipTriangles(float* vertices, unsigned short* triangles, size_t trianglesLength, float* uvs, size_t stride);
void clipTriangles(Vector<float>& vertices, Vector<unsigned short>& triangles, Vector<float>& uvs, size_t stride);
bool isClipping(); bool isClipping();

View File

@ -34,7 +34,7 @@
#include <spine/Vector.h> #include <spine/Vector.h>
#include <spine/String.h> #include <spine/String.h>
namespace Spine { namespace spine {
class BoneData; class BoneData;
class SlotData; class SlotData;

View File

@ -35,7 +35,7 @@
#include <spine/SpineObject.h> #include <spine/SpineObject.h>
#include <spine/String.h> #include <spine/String.h>
namespace Spine { namespace spine {
class CurveTimeline; class CurveTimeline;
class VertexAttachment; class VertexAttachment;

View File

@ -34,7 +34,7 @@
#include <spine/Vector.h> #include <spine/Vector.h>
#include <spine/String.h> #include <spine/String.h>
namespace Spine { namespace spine {
class Attachment; class Attachment;
class Skeleton; class Skeleton;

View File

@ -37,7 +37,7 @@
#include <string> #include <string>
namespace Spine { namespace spine {
class SlotData; class SlotData;
class Bone; class Bone;

View File

@ -36,7 +36,7 @@
#include <spine/String.h> #include <spine/String.h>
#include <spine/Color.h> #include <spine/Color.h>
namespace Spine { namespace spine {
class BoneData; class BoneData;
class SlotData : public SpineObject { class SlotData : public SpineObject {

View File

@ -31,7 +31,7 @@
#ifndef Spine_SpacingMode_h #ifndef Spine_SpacingMode_h
#define Spine_SpacingMode_h #define Spine_SpacingMode_h
namespace Spine { namespace spine {
enum SpacingMode { enum SpacingMode {
SpacingMode_Length = 0, SpacingMode_Length = 0,
SpacingMode_Fixed, SpacingMode_Fixed,

View File

@ -33,7 +33,7 @@
#include <new> #include <new>
namespace Spine { namespace spine {
class String; class String;
class SpineObject { class SpineObject {

View File

@ -42,7 +42,7 @@
#pragma warning(disable:4996) #pragma warning(disable:4996)
#endif #endif
namespace Spine { namespace spine {
class String : public SpineObject { class String : public SpineObject {
public: public:
String() : _length(0), _buffer(NULL) { String() : _length(0), _buffer(NULL) {

View File

@ -34,7 +34,7 @@
#include <spine/SpineObject.h> #include <spine/SpineObject.h>
#include <spine/String.h> #include <spine/String.h>
namespace Spine { namespace spine {
class AtlasPage; class AtlasPage;
class TextureLoader : public SpineObject { class TextureLoader : public SpineObject {

View File

@ -37,7 +37,7 @@
#include <spine/MixDirection.h> #include <spine/MixDirection.h>
#include <spine/SpineObject.h> #include <spine/SpineObject.h>
namespace Spine { namespace spine {
class Skeleton; class Skeleton;
class Event; class Event;

View File

@ -31,7 +31,7 @@
#ifndef Spine_TimelineType_h #ifndef Spine_TimelineType_h
#define Spine_TimelineType_h #define Spine_TimelineType_h
namespace Spine { namespace spine {
enum TimelineType { enum TimelineType {
TimelineType_Rotate = 0, TimelineType_Rotate = 0,
TimelineType_Translate, TimelineType_Translate,

View File

@ -35,7 +35,7 @@
#include <spine/Vector.h> #include <spine/Vector.h>
namespace Spine { namespace spine {
class TransformConstraintData; class TransformConstraintData;
class Skeleton; class Skeleton;
class Bone; class Bone;

View File

@ -35,7 +35,7 @@
#include <spine/SpineObject.h> #include <spine/SpineObject.h>
#include <spine/String.h> #include <spine/String.h>
namespace Spine { namespace spine {
class BoneData; class BoneData;
class TransformConstraintData : public SpineObject { class TransformConstraintData : public SpineObject {

View File

@ -33,7 +33,7 @@
#include <spine/CurveTimeline.h> #include <spine/CurveTimeline.h>
namespace Spine { namespace spine {
class TransformConstraintTimeline : public CurveTimeline { class TransformConstraintTimeline : public CurveTimeline {
friend class SkeletonBinary; friend class SkeletonBinary;
friend class SkeletonJson; friend class SkeletonJson;

View File

@ -31,7 +31,7 @@
#ifndef Spine_TransformMode_h #ifndef Spine_TransformMode_h
#define Spine_TransformMode_h #define Spine_TransformMode_h
namespace Spine { namespace spine {
enum TransformMode { enum TransformMode {
TransformMode_Normal = 0, TransformMode_Normal = 0,
TransformMode_OnlyTranslation, TransformMode_OnlyTranslation,

View File

@ -36,7 +36,7 @@
#include <spine/Animation.h> #include <spine/Animation.h>
#include <spine/TimelineType.h> #include <spine/TimelineType.h>
namespace Spine { namespace spine {
class TranslateTimeline : public CurveTimeline { class TranslateTimeline : public CurveTimeline {
friend class SkeletonBinary; friend class SkeletonBinary;
friend class SkeletonJson; friend class SkeletonJson;

View File

@ -34,7 +34,7 @@
#include <spine/Vector.h> #include <spine/Vector.h>
#include <spine/Pool.h> #include <spine/Pool.h>
namespace Spine { namespace spine {
class Triangulator : public SpineObject { class Triangulator : public SpineObject {
public: public:
~Triangulator(); ~Triangulator();

View File

@ -33,7 +33,7 @@
#include <spine/CurveTimeline.h> #include <spine/CurveTimeline.h>
namespace Spine { namespace spine {
class TwoColorTimeline : public CurveTimeline { class TwoColorTimeline : public CurveTimeline {
friend class SkeletonBinary; friend class SkeletonBinary;
friend class SkeletonJson; friend class SkeletonJson;

View File

@ -34,7 +34,7 @@
#include <spine/RTTI.h> #include <spine/RTTI.h>
#include <spine/SpineObject.h> #include <spine/SpineObject.h>
namespace Spine { namespace spine {
class Updatable : public SpineObject { class Updatable : public SpineObject {
RTTI_DECL RTTI_DECL

Some files were not shown because too many files have changed in this diff Show More