diff --git a/spine-cocos2d-iphone/src/spine/CCSkeleton.m b/spine-cocos2d-iphone/src/spine/CCSkeleton.m index bde645800..614faf76b 100644 --- a/spine-cocos2d-iphone/src/spine/CCSkeleton.m +++ b/spine-cocos2d-iphone/src/spine/CCSkeleton.m @@ -136,11 +136,6 @@ _skeleton->g = color.g / (float)255; _skeleton->b = color.b / (float)255; _skeleton->a = self.opacity / (float)255; - if (_premultipliedAlpha) { - _skeleton->r *= _skeleton->a; - _skeleton->g *= _skeleton->a; - _skeleton->b *= _skeleton->a; - } int additive = 0; CCTextureAtlas* textureAtlas = 0; diff --git a/spine-cocos2dx/example/Classes/ExampleLayer.cpp b/spine-cocos2dx/example/Classes/ExampleLayer.cpp index 0f374e936..91ed30a89 100644 --- a/spine-cocos2dx/example/Classes/ExampleLayer.cpp +++ b/spine-cocos2dx/example/Classes/ExampleLayer.cpp @@ -16,7 +16,7 @@ CCScene* ExampleLayer::scene () { } bool ExampleLayer::init () { - if (!CCLayer::init()) return false; + if (!CCLayerColor::initWithColor(ccc4(128,128,128,255))) return false; skeletonNode = CCSkeletonAnimation::createWithFile("spineboy.json", "spineboy.atlas"); skeletonNode->setMix("walk", "jump", 0.2f); diff --git a/spine-cocos2dx/example/Classes/ExampleLayer.h b/spine-cocos2dx/example/Classes/ExampleLayer.h index f1d9e1f6a..19f9c2e3c 100644 --- a/spine-cocos2dx/example/Classes/ExampleLayer.h +++ b/spine-cocos2dx/example/Classes/ExampleLayer.h @@ -6,7 +6,7 @@ #include "cocos2d.h" #include -class ExampleLayer: public cocos2d::CCLayer { +class ExampleLayer: public cocos2d::CCLayerColor { public: static cocos2d::CCScene* scene (); diff --git a/spine-cocos2dx/src/spine/CCSkeleton.cpp b/spine-cocos2dx/src/spine/CCSkeleton.cpp index 8e227d280..0432f0357 100644 --- a/spine-cocos2dx/src/spine/CCSkeleton.cpp +++ b/spine-cocos2dx/src/spine/CCSkeleton.cpp @@ -129,11 +129,6 @@ void CCSkeleton::draw () { skeleton->g = color.g / (float)255; skeleton->b = color.b / (float)255; skeleton->a = getOpacity() / (float)255; - if (premultipliedAlpha) { - skeleton->r *= skeleton->a; - skeleton->g *= skeleton->a; - skeleton->b *= skeleton->a; - } int additive = 0; CCTextureAtlas* textureAtlas = 0;