merge newest version

This commit is contained in:
yinkaile 2013-06-06 16:22:58 +08:00
parent 3cfba7bc9a
commit 10ed7ebdf4
34 changed files with 467 additions and 482 deletions

View File

@ -53,7 +53,6 @@ network/WebSocket.cpp \
physics_nodes/CCPhysicsDebugNode.cpp \
physics_nodes/CCPhysicsSprite.cpp \
LocalStorage/LocalStorageAndroid.cpp \
<<<<<<< HEAD
CCArmature/CCArmature.cpp \
CCArmature/CCBone.cpp \
CCArmature/animation/CCAnimation.cpp \
@ -78,8 +77,7 @@ CCArmature/utils/CCDataReaderHelper.cpp \
CCArmature/utils/CCSpriteFrameCacheHelper.cpp \
CCArmature/utils/CCTransformHelp.cpp \
CCArmature/utils/CCTweenFunction.cpp \
CCArmature/utils/CCUtilMath.cpp
=======
CCArmature/utils/CCUtilMath.cpp \
spine/Animation.cpp \
spine/AnimationState.cpp \
spine/AnimationStateData.cpp \
@ -105,7 +103,6 @@ Components/CCComAttribute.cpp \
Components/CCComAudio.cpp \
Components/CCComController.cpp \
Components/CCInputDelegate.cpp
>>>>>>> 150b91074a57ae0345c03541b533c46a017b0d13
LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dx_static
LOCAL_WHOLE_STATIC_LIBRARIES += cocosdenshion_static

View File

@ -139,13 +139,13 @@ bool CCArmature::init(const char *name)
{
m_strName = name;
AnimationData* animationData = armatureDataManager->getAnimationData(name);
CCAssert(animationData, "AnimationData not exist! ");
CCAnimationData* animationData = armatureDataManager->getAnimationData(name);
CCAssert(animationData, "CCAnimationData not exist! ");
m_pAnimation->setAnimationData(animationData);
ArmatureData *armatureData = armatureDataManager->getArmatureData(name);
CCArmatureData *armatureData = armatureDataManager->getArmatureData(name);
CCAssert(armatureData, "");
m_pArmatureData = armatureData;
@ -160,13 +160,13 @@ bool CCArmature::init(const char *name)
//! init bone's CCTween to 1st movement's 1st frame
do {
MovementData *movData = animationData->getMovement(animationData->movementNames.at(0).c_str());
CCMovementData *movData = animationData->getMovement(animationData->movementNames.at(0).c_str());
CC_BREAK_IF(!movData);
MovementBoneData *movBoneData = movData->getMovementBoneData(bone->getName().c_str());
CCMovementBoneData *movBoneData = movData->getMovementBoneData(bone->getName().c_str());
CC_BREAK_IF(!movBoneData || movBoneData->frameList.count() <= 0);
FrameData *frameData = movBoneData->getFrameData(0);
CCFrameData *frameData = movBoneData->getFrameData(0);
CC_BREAK_IF(!frameData);
bone->getTweenData()->copy(frameData);
@ -180,10 +180,10 @@ bool CCArmature::init(const char *name)
else
{
m_strName = "new_armature";
m_pArmatureData = ArmatureData::create();
m_pArmatureData = CCArmatureData::create();
m_pArmatureData->name = m_strName;
AnimationData *animationData = AnimationData::create();
CCAnimationData *animationData = CCAnimationData::create();
animationData->name = m_strName;
armatureDataManager->addArmatureData(m_strName.c_str(), m_pArmatureData);
@ -221,7 +221,7 @@ CCBone *CCArmature::createBone(const char *boneName)
if(existedBone != NULL)
return existedBone;
BoneData *boneData = (BoneData*)m_pArmatureData->getBoneData(boneName);
CCBoneData *boneData = (CCBoneData*)m_pArmatureData->getBoneData(boneName);
std::string parentName = boneData->parentName;
CCBone *bone = NULL;

View File

@ -43,9 +43,9 @@ public:
static CCArmature *create();
/**
* Allocates a armature, and use the ArmatureData named name in CCArmatureDataManager to initializes the armature.
* Allocates a armature, and use the CCArmatureData named name in CCArmatureDataManager to initializes the armature.
*
* @param name CCArmature will use the name to find to the ArmatureData to initializes it.
* @param name CCArmature will use the name to find to the CCArmatureData to initializes it.
* @return A initialized armature which is marked as "autorelease".
*/
static CCArmature *create(const char *name);
@ -133,7 +133,7 @@ protected:
CC_SYNTHESIZE_RETAIN(CCAnimation *, m_pAnimation, Animation);
CC_SYNTHESIZE(ArmatureData *, m_pArmatureData, ArmatureData);
CC_SYNTHESIZE(CCArmatureData *, m_pArmatureData, CCArmatureData);
CC_SYNTHESIZE(CCBatchNode*, m_pBatchNode, BatchNode);

View File

@ -109,7 +109,7 @@ bool CCBone::init(const char *name)
}
CC_SAFE_DELETE(m_pTweenData);
m_pTweenData = new FrameData();
m_pTweenData = new CCFrameData();
CC_SAFE_DELETE(m_pTween);
m_pTween = new CCTween();
@ -127,7 +127,7 @@ bool CCBone::init(const char *name)
return bRet;
}
void CCBone::setBoneData(BoneData *boneData)
void CCBone::setBoneData(CCBoneData *boneData)
{
CCAssert(NULL != boneData, "_boneData must not be NULL");
@ -140,7 +140,7 @@ void CCBone::setBoneData(BoneData *boneData)
m_pDisplayManager->initDisplayList(boneData);
}
BoneData *CCBone::getBoneData()
CCBoneData *CCBone::getBoneData()
{
return m_pBoneData;
}
@ -307,7 +307,7 @@ void CCBone::setZOrder(int zOrder)
CCNode::setZOrder(zOrder);
}
void CCBone::addDisplay(DisplayData *_displayData, int _index)
void CCBone::addDisplay(CCDisplayData *_displayData, int _index)
{
m_pDisplayManager->addDisplay(_displayData, _index);
}

View File

@ -73,12 +73,12 @@ public:
* If index is current display index, then also change display to _index
*
* @param displayData it include the display information, like DisplayType.
* If you want to create a sprite display, then create a SpriteDisplayData param
* If you want to create a sprite display, then create a CCSpriteDisplayData param
*
* @param _index the index of the display you want to replace or add to
* -1 : append display from back
*/
void addDisplay(DisplayData *displayData, int index);
void addDisplay(CCDisplayData *displayData, int index);
void changeDisplayByIndex(int index, bool force);
@ -140,9 +140,9 @@ public:
public:
/*
* The origin state of the CCBone. Display's state is effected by m_pBoneData, m_pNode, m_pTweenData
* when call setData function, it will copy from the BoneData.
* when call setData function, it will copy from the CCBoneData.
*/
CC_PROPERTY(BoneData *, m_pBoneData, BoneData);
CC_PROPERTY(CCBoneData *, m_pBoneData, BoneData);
//! A weak reference to the CCArmature
CC_SYNTHESIZE(CCArmature *, m_pArmature, Armature);
@ -153,7 +153,7 @@ public:
CC_SYNTHESIZE(CCDisplayManager*, m_pDisplayManager, DisplayManager)
/*
* When CCArmature play a animation, if there is not a MovementBoneData of this bone in this MovementData, this bone will hide.
* When CCArmature play a animation, if there is not a CCMovementBoneData of this bone in this CCMovementData, this bone will hide.
* Set IgnoreMovementBoneData to true, then this bone will also show.
*/
CC_SYNTHESIZE_PASS_BY_REF(bool, m_bIgnoreMovementBoneData, IgnoreMovementBoneData)
@ -162,7 +162,7 @@ protected:
CCTween *m_pTween; //! Calculate tween effect
//! Used for make tween effect between every frame
CC_SYNTHESIZE_READONLY(FrameData*, m_pTweenData, TweenData);
CC_SYNTHESIZE_READONLY(CCFrameData*, m_pTweenData, TweenData);
CC_SYNTHESIZE_PASS_BY_REF(std::string, m_strName, Name);

View File

@ -177,7 +177,7 @@ void CCAnimation::play(const char *animationName, int durationTo, int durationTw
m_iDurationTween = durationTween;
}
MovementBoneData *movementBoneData = NULL;
CCMovementBoneData *movementBoneData = NULL;
m_pTweenList->removeAllObjects();
CCDictElement *element = NULL;
@ -186,7 +186,7 @@ void CCAnimation::play(const char *animationName, int durationTo, int durationTw
CCDICT_FOREACH(dict, element)
{
CCBone *bone = (CCBone*)element->getObject();
movementBoneData = (MovementBoneData*)m_pMovementData->movBoneDataDic.objectForKey(bone->getName());
movementBoneData = (CCMovementBoneData*)m_pMovementData->movBoneDataDic.objectForKey(bone->getName());
CCTween *tween = bone->getTween();
if(movementBoneData && movementBoneData->frameList.count()>0)

View File

@ -65,21 +65,21 @@ public:
* @param durationTo The frames between two animation changing-over.
* It's meaning is changing to this animation need how many frames
*
* -1 : use the value from MovementData get from flash design panel
* -1 : use the value from CCMovementData get from flash design panel
* @param durationTween The frame count you want to play in the game.
* if _durationTween is 80, then the animation will played 80 frames in a loop
*
* -1 : use the value from MovementData get from flash design panel
* -1 : use the value from CCMovementData get from flash design panel
*
* @param loop Whether the animation is loop
*
* loop < 0 : use the value from MovementData get from flash design panel
* loop < 0 : use the value from CCMovementData get from flash design panel
* loop = 0 : this animation is not loop
* loop > 0 : this animation is loop
*
* @param tweenEasing CCTween easing is used for calculate easing effect
*
* TWEEN_EASING_MAX : use the value from MovementData get from flash design panel
* TWEEN_EASING_MAX : use the value from CCMovementData get from flash design panel
* -1 : fade out
* 0 : line
* 1 : fade in
@ -131,18 +131,18 @@ protected:
*/
void updateMovementFrameData(float _currentPercent);
protected:
//! AnimationData save all MovementDatas this animation used.
CC_SYNTHESIZE_RETAIN(AnimationData*, m_pAnimationData, AnimationData);
//! CCAnimationData save all MovementDatas this animation used.
CC_SYNTHESIZE_RETAIN(CCAnimationData*, m_pAnimationData, AnimationData);
MovementData *m_pMovementData; //! MovementData save all MovementFrameDatas this animation used.
CCMovementData *m_pMovementData; //! CCMovementData save all MovementFrameDatas this animation used.
CCArmature *m_pArmature; //! A weak reference of armature
std::string m_strMovementID; //! Current movment's name
int m_iPrevFrameIndex; //! Prev key frame index
int m_iToIndex; //! The frame index in MovementData->m_pMovFrameDataArr, it's different from m_iFrameIndex.
int m_iToIndex; //! The frame index in CCMovementData->m_pMovFrameDataArr, it's different from m_iFrameIndex.
CCArray *m_pTweenList;
public:

View File

@ -60,21 +60,21 @@ public:
* @param durationTo The frames between two animation changing-over.
* It's meaning is changing to this animation need how many frames
*
* -1 : use the value from MovementData get from flash design panel
* -1 : use the value from CCMovementData get from flash design panel
* @param durationTween The frame count you want to play in the game.
* if _durationTween is 80, then the animation will played 80 frames in a loop
*
* -1 : use the value from MovementData get from flash design panel
* -1 : use the value from CCMovementData get from flash design panel
*
* @param loop Whether the animation is loop
*
* loop < 0 : use the value from MovementData get from flash design panel
* loop < 0 : use the value from CCMovementData get from flash design panel
* loop = 0 : this animation is not loop
* loop > 0 : this animation is loop
*
* @param tweenEasing CCTween easing is used for calculate easing effect
*
* TWEEN_EASING_MAX : use the value from MovementData get from flash design panel
* TWEEN_EASING_MAX : use the value from CCMovementData get from flash design panel
* -1 : fade out
* 0 : line
* 1 : fade in

View File

@ -77,8 +77,8 @@ bool CCTween::init(CCBone *bone)
bool bRet = false;
do
{
m_pFrom = new FrameData();
m_pBetween = new FrameData();
m_pFrom = new CCFrameData();
m_pBetween = new CCFrameData();
m_pBone = bone;
m_pTweenData = m_pBone->getTweenData();
@ -93,7 +93,7 @@ bool CCTween::init(CCBone *bone)
}
void CCTween::play(MovementBoneData *_movementBoneData, int _durationTo, int _durationTween, int _loop, int _tweenEasing)
void CCTween::play(CCMovementBoneData *_movementBoneData, int _durationTo, int _durationTween, int _loop, int _tweenEasing)
{
CCProcessBase::play(NULL, _durationTo, _durationTween, _loop, _tweenEasing);
@ -113,7 +113,7 @@ void CCTween::play(MovementBoneData *_movementBoneData, int _durationTo, int _du
if (m_pMovementBoneData->frameList.count() == 1)
{
m_eLoopType = SINGLE_FRAME;
FrameData *_nextKeyFrame = m_pMovementBoneData->getFrameData(0);
CCFrameData *_nextKeyFrame = m_pMovementBoneData->getFrameData(0);
if(_durationTo == 0)
{
setBetween(_nextKeyFrame, _nextKeyFrame);
@ -148,7 +148,7 @@ void CCTween::play(MovementBoneData *_movementBoneData, int _durationTo, int _du
}
else
{
FrameData *_nextKeyFrame = m_pMovementBoneData->getFrameData(0);
CCFrameData *_nextKeyFrame = m_pMovementBoneData->getFrameData(0);
setBetween(m_pTweenData, _nextKeyFrame);
m_bIsTweenKeyFrame = true;
}
@ -257,7 +257,7 @@ void CCTween::updateHandler()
}
}
void CCTween::setBetween(FrameData *from, FrameData *to)
void CCTween::setBetween(CCFrameData *from, CCFrameData *to)
{
do
{
@ -282,7 +282,7 @@ void CCTween::setBetween(FrameData *from, FrameData *to)
}
void CCTween::arriveKeyFrame(FrameData *keyFrameData)
void CCTween::arriveKeyFrame(CCFrameData *keyFrameData)
{
if(keyFrameData)
{
@ -318,7 +318,7 @@ void CCTween::arriveKeyFrame(FrameData *keyFrameData)
}
FrameData *CCTween::tweenNodeTo(float percent, FrameData *node)
CCFrameData *CCTween::tweenNodeTo(float percent, CCFrameData *node)
{
node = node == NULL ? m_pTweenData : node;
@ -358,8 +358,8 @@ float CCTween::updateFrameData(float currentPrecent, bool activeFrame)
float playedTime = (float)rawDuration * currentPrecent;
FrameData *from;
FrameData *to;
CCFrameData *from;
CCFrameData *to;
bool isListEnd;
//! If play to current frame's front or back, then find current frame again

View File

@ -55,32 +55,32 @@ public:
/**
* Start the Process
*
* @param movementBoneData the MovementBoneData include all frame datas
* @param movementBoneData the CCMovementBoneData include all frame datas
* @param durationTo the frames between two animation changing-over.
* It's meaning is changing to this animation need how many frames
*
* -1 : use the value from MovementData get from flash design panel
* -1 : use the value from CCMovementData get from flash design panel
* @param durationTween the frame count you want to play in the game.
* if _durationTween is 80, then the animation will played 80 frames in a loop
*
* -1 : use the value from MovementData get from flash design panel
* -1 : use the value from CCMovementData get from flash design panel
*
* @param loop whether the animation is loop
*
* loop < 0 : use the value from MovementData get from flash design panel
* loop < 0 : use the value from CCMovementData get from flash design panel
* loop = 0 : this animation is not loop
* loop > 0 : this animation is loop
*
* @param tweenEasing tween easing is used for calculate easing effect
*
* TWEEN_EASING_MAX : use the value from MovementData get from flash design panel
* TWEEN_EASING_MAX : use the value from CCMovementData get from flash design panel
* -1 : fade out
* 0 : line
* 1 : fade in
* 2 : fade in and out
*
*/
virtual void play(MovementBoneData *movementBoneData, int durationTo, int durationTween, int loop, int tweenEasing);
virtual void play(CCMovementBoneData *movementBoneData, int durationTo, int durationTween, int loop, int tweenEasing);
protected:
@ -97,27 +97,27 @@ protected:
/**
* Calculate the between value of _from and _to, and give it to between frame data
*/
virtual void setBetween(FrameData *from, FrameData *to);
virtual void setBetween(CCFrameData *from, CCFrameData *to);
/**
* According to the percent to calculate current FrameData with tween effect
* According to the percent to calculate current CCFrameData with tween effect
*/
virtual FrameData *tweenNodeTo(float percent, FrameData *node = NULL);
virtual CCFrameData *tweenNodeTo(float percent, CCFrameData *node = NULL);
/**
* Update display index and process the key frame event when arrived a key frame
*/
virtual void arriveKeyFrame(FrameData *keyFrameData);
virtual void arriveKeyFrame(CCFrameData *keyFrameData);
protected:
//! A weak reference to the current MovementBoneData. The data is in the data pool
CC_SYNTHESIZE(MovementBoneData*, m_pMovementBoneData, MovementBoneData)
//! A weak reference to the current CCMovementBoneData. The data is in the data pool
CC_SYNTHESIZE(CCMovementBoneData*, m_pMovementBoneData, MovementBoneData)
FrameData *m_pTweenData; //! The computational tween frame data, //! A weak reference to the CCBone's tweenData
FrameData *m_pFrom; //! From frame data, used for calculate between value
FrameData *m_pTo; //! To frame data, used for calculate between value
FrameData *m_pBetween; //! Between frame data, used for calculate current FrameData(m_pNode) value
CCFrameData *m_pTweenData; //! The computational tween frame data, //! A weak reference to the CCBone's tweenData
CCFrameData *m_pFrom; //! From frame data, used for calculate between value
CCFrameData *m_pTo; //! To frame data, used for calculate between value
CCFrameData *m_pBetween; //! Between frame data, used for calculate current CCFrameData(m_pNode) value
FrameData *m_pCurrentKeyFrame; //! A weak reference to the current FrameData. The data is in the data pool
CCFrameData *m_pCurrentKeyFrame; //! A weak reference to the current CCFrameData. The data is in the data pool
CCBone *m_pBone; //! A weak reference to the CCBone
@ -130,11 +130,11 @@ protected:
int m_iTotalDuration;
int m_iFromIndex; //! The current frame index in FrameList of MovementBoneData, it's different from m_iFrameIndex
int m_iToIndex; //! The next frame index in FrameList of MovementBoneData, it's different from m_iFrameIndex
int m_iFromIndex; //! The current frame index in FrameList of CCMovementBoneData, it's different from m_iFrameIndex
int m_iToIndex; //! The next frame index in FrameList of CCMovementBoneData, it's different from m_iFrameIndex
FrameData *m_pEditKeyFrame;
CCFrameData *m_pEditKeyFrame;
CCAnimation *m_pAnimation;
};

View File

@ -27,8 +27,8 @@ THE SOFTWARE.
NS_CC_EXT_BEGIN
#pragma region DisplayData
const char *DisplayData::changeDisplayToTexture(const char *displayName)
#pragma region CCDisplayData
const char *CCDisplayData::changeDisplayToTexture(const char *displayName)
{
// remove .xxx
std::string textureName = displayName;
@ -42,75 +42,75 @@ const char *DisplayData::changeDisplayToTexture(const char *displayName)
return textureName.c_str();
}
DisplayData::DisplayData(void)
CCDisplayData::CCDisplayData(void)
:displayType(CS_DISPLAY_SPRITE)
{
}
DisplayData::~DisplayData(void)
CCDisplayData::~CCDisplayData(void)
{
}
#pragma endregion
#pragma region SpriteDisplayData
SpriteDisplayData::SpriteDisplayData(void)
#pragma region CCSpriteDisplayData
CCSpriteDisplayData::CCSpriteDisplayData(void)
:displayName("")
{
displayType = CS_DISPLAY_SPRITE;
}
SpriteDisplayData::~SpriteDisplayData()
CCSpriteDisplayData::~CCSpriteDisplayData()
{
}
void SpriteDisplayData::copy(SpriteDisplayData *displayData)
void CCSpriteDisplayData::copy(CCSpriteDisplayData *displayData)
{
displayName = displayData->displayName;
displayType = displayData->displayType;
}
#pragma endregion
#pragma region ArmatureDisplayData
ArmatureDisplayData::ArmatureDisplayData(void)
#pragma region CCArmatureDisplayData
CCArmatureDisplayData::CCArmatureDisplayData(void)
:displayName("")
{
displayType = CS_DISPLAY_ARMATURE;
}
ArmatureDisplayData::~ArmatureDisplayData()
CCArmatureDisplayData::~CCArmatureDisplayData()
{
}
void ArmatureDisplayData::copy(ArmatureDisplayData *displayData)
void CCArmatureDisplayData::copy(CCArmatureDisplayData *displayData)
{
displayName = displayData->displayName;
displayType = displayData->displayType;
}
#pragma endregion
#pragma region ParticleDisplayData
ParticleDisplayData::ParticleDisplayData(void)
#pragma region CCParticleDisplayData
CCParticleDisplayData::CCParticleDisplayData(void)
:plist("")
{
displayType = CS_DISPLAY_PARTICLE;
}
void ParticleDisplayData::copy(ParticleDisplayData *displayData)
void CCParticleDisplayData::copy(CCParticleDisplayData *displayData)
{
plist = displayData->plist;
displayType = displayData->displayType;
}
#pragma endregion
#pragma region ShaderDisplayData
ShaderDisplayData::ShaderDisplayData(void)
#pragma region CCShaderDisplayData
CCShaderDisplayData::CCShaderDisplayData(void)
:vert("")
,frag("")
{
displayType = CS_DISPLAY_SHADER;
}
void ShaderDisplayData::copy(ShaderDisplayData *displayData)
void CCShaderDisplayData::copy(CCShaderDisplayData *displayData)
{
vert = displayData->vert;
frag = displayData->frag;
@ -118,8 +118,8 @@ void ShaderDisplayData::copy(ShaderDisplayData *displayData)
}
#pragma endregion
#pragma region Node
Node::Node()
#pragma region CCBaseData
CCBaseData::CCBaseData()
:x(0.0f)
,y(0.0f)
,zOrder(0)
@ -139,12 +139,12 @@ Node::Node()
{
}
Node::~Node()
CCBaseData::~CCBaseData()
{
}
void Node::copy(const Node* node )
void CCBaseData::copy(const CCBaseData* node )
{
x = node->x;
y = node->y;
@ -165,7 +165,7 @@ void Node::copy(const Node* node )
}
void Node::subtract(Node *from, Node *to)
void CCBaseData::subtract(CCBaseData *from, CCBaseData *to)
{
x = to->x - from->x;
y = to->y - from->y;
@ -211,62 +211,62 @@ void Node::subtract(Node *from, Node *to)
}
#pragma endregion
#pragma region BoneData
BoneData::BoneData(void)
#pragma region CCBoneData
CCBoneData::CCBoneData(void)
:name("")
,parentName("")
{
}
BoneData::~BoneData(void)
CCBoneData::~CCBoneData(void)
{
}
bool BoneData::init()
bool CCBoneData::init()
{
displayDataList.init();
return true;
}
void BoneData::addDisplayData(DisplayData *displayData)
void CCBoneData::addDisplayData(CCDisplayData *displayData)
{
displayDataList.addObject(displayData);
}
DisplayData *BoneData::getDisplayData(int index)
CCDisplayData *CCBoneData::getDisplayData(int index)
{
return (DisplayData*)displayDataList.objectAtIndex(index);
return (CCDisplayData*)displayDataList.objectAtIndex(index);
}
#pragma endregion
#pragma region ArmatureData
ArmatureData::ArmatureData()
#pragma region CCArmatureData
CCArmatureData::CCArmatureData()
{
}
ArmatureData::~ArmatureData()
CCArmatureData::~CCArmatureData()
{
}
bool ArmatureData::init()
bool CCArmatureData::init()
{
return boneList.init();
}
void ArmatureData::addBoneData(BoneData *boneData)
void CCArmatureData::addBoneData(CCBoneData *boneData)
{
boneDataDic.setObject(boneData, boneData->name);
boneList.addObject(boneData);
}
BoneData *ArmatureData::getBoneData(const char *boneName)
CCBoneData *CCArmatureData::getBoneData(const char *boneName)
{
return (BoneData*)boneDataDic.objectForKey(boneName);
return (CCBoneData*)boneDataDic.objectForKey(boneName);
}
#pragma endregion
#pragma region FrameData
FrameData::FrameData(void)
#pragma region CCFrameData
CCFrameData::CCFrameData(void)
:duration(1)
,tweenEasing(Linear)
,displayIndex(0)
@ -278,13 +278,13 @@ FrameData::FrameData(void)
{
}
FrameData::~FrameData(void)
CCFrameData::~CCFrameData(void)
{
}
void FrameData::copy(FrameData *frameData)
void CCFrameData::copy(CCFrameData *frameData)
{
Node::copy(frameData);
CCBaseData::copy(frameData);
duration = frameData->duration;
displayIndex = frameData->displayIndex;
@ -292,8 +292,8 @@ void FrameData::copy(FrameData *frameData)
}
#pragma endregion
#pragma region MovementBoneData
MovementBoneData::MovementBoneData()
#pragma region CCMovementBoneData
CCMovementBoneData::CCMovementBoneData()
:delay(0.0f)
,scale(1.0f)
,duration(0)
@ -301,31 +301,31 @@ MovementBoneData::MovementBoneData()
{
}
MovementBoneData::~MovementBoneData(void)
CCMovementBoneData::~CCMovementBoneData(void)
{
}
bool MovementBoneData::init()
bool CCMovementBoneData::init()
{
return frameList.init();
}
void MovementBoneData::addFrameData(FrameData *frameData)
void CCMovementBoneData::addFrameData(CCFrameData *frameData)
{
frameList.addObject(frameData);
duration += frameData->duration;
}
FrameData *MovementBoneData::getFrameData(int index)
CCFrameData *CCMovementBoneData::getFrameData(int index)
{
return (FrameData*)frameList.objectAtIndex(index);
return (CCFrameData*)frameList.objectAtIndex(index);
}
#pragma endregion
#pragma region MovementData
MovementData::MovementData(void)
#pragma region CCMovementData
CCMovementData::CCMovementData(void)
:name("")
,duration(0)
,durationTo(0)
@ -335,54 +335,54 @@ MovementData::MovementData(void)
{
}
MovementData::~MovementData(void)
CCMovementData::~CCMovementData(void)
{
}
void MovementData::addMovementBoneData(MovementBoneData *movBoneData)
void CCMovementData::addMovementBoneData(CCMovementBoneData *movBoneData)
{
movBoneDataDic.setObject(movBoneData, movBoneData->name);
}
MovementBoneData *MovementData::getMovementBoneData(const char *boneName)
CCMovementBoneData *CCMovementData::getMovementBoneData(const char *boneName)
{
return (MovementBoneData*)movBoneDataDic.objectForKey(boneName);
return (CCMovementBoneData*)movBoneDataDic.objectForKey(boneName);
}
#pragma endregion
#pragma region AnimationData
AnimationData::AnimationData(void)
#pragma region CCAnimationData
CCAnimationData::CCAnimationData(void)
{
}
AnimationData::~AnimationData(void)
CCAnimationData::~CCAnimationData(void)
{
}
void AnimationData::release()
void CCAnimationData::release()
{
CCObject::release();
}
void AnimationData::retain()
void CCAnimationData::retain()
{
CCObject::retain();
}
void AnimationData::addMovement(MovementData *movData)
void CCAnimationData::addMovement(CCMovementData *movData)
{
movementDataDic.setObject(movData, movData->name);
movementNames.push_back(movData->name);
}
MovementData *AnimationData::getMovement(const char *movementName)
CCMovementData *CCAnimationData::getMovement(const char *movementName)
{
return (MovementData*)movementDataDic.objectForKey(movementName);
return (CCMovementData*)movementDataDic.objectForKey(movementName);
}
int AnimationData::getMovementCount()
int CCAnimationData::getMovementCount()
{
return movementDataDic.count();
}
@ -390,23 +390,23 @@ int AnimationData::getMovementCount()
#pragma region ContourData
ContourData::ContourData()
#pragma region CCContourData
CCContourData::CCContourData()
{
}
ContourData::~ContourData()
CCContourData::~CCContourData()
{
}
bool ContourData::init()
bool CCContourData::init()
{
return vertexList.init();
}
#pragma endregion
#pragma region TextureData
TextureData::TextureData()
#pragma region CCTextureData
CCTextureData::CCTextureData()
:height(0.0f)
,width(0.0f)
,pivotX(0.5f)
@ -415,23 +415,23 @@ TextureData::TextureData()
{
}
TextureData::~TextureData()
CCTextureData::~CCTextureData()
{
}
bool TextureData::init()
bool CCTextureData::init()
{
return contourDataList.init();
}
void TextureData::addContourData(ContourData *contourData)
void CCTextureData::addContourData(CCContourData *contourData)
{
contourDataList.addObject(contourData);
}
ContourData *TextureData::getContourData(int index)
CCContourData *CCTextureData::getContourData(int index)
{
return (ContourData*)contourDataList.objectAtIndex(index);
return (CCContourData*)contourDataList.objectAtIndex(index);
}
#pragma endregion

View File

@ -57,31 +57,31 @@ public: \
NS_CC_EXT_BEGIN
#pragma region Node
#pragma region CCBaseData
/**
* the base node include a lot of attribute.
*/
class Node : public cocos2d::CCObject
class CCBaseData : public CCObject
{
public:
CS_CREATE_NO_PARAM_NO_INIT(Node)
CS_CREATE_NO_PARAM_NO_INIT(CCBaseData)
public:
Node();
~Node(void);
CCBaseData();
~CCBaseData(void);
/*
* Copy datas from node
* @param node A Node to copy datas
* @param node A CCBaseData to copy datas
*/
virtual void copy(const Node *_node);
virtual void copy(const CCBaseData *_node);
/*
* Calculate two Node's between value(_to - _from) and set to self
* Calculate two CCBaseData's between value(_to - _from) and set to self
*
* @param from from Node
* @param to to Node
* @param from from CCBaseData
* @param to to CCBaseData
*/
virtual void subtract(Node *_from, Node *_to);
virtual void subtract(CCBaseData *_from, CCBaseData *_to);
public:
/**
* x y skewX skewY scaleX scaleY used to calculate transform matrix
@ -104,7 +104,7 @@ public:
};
#pragma endregion
#pragma region DisplayData
#pragma region CCDisplayData
/**
* DisplayType distinguish which type you display is.
*/
@ -117,15 +117,15 @@ enum DisplayType{
CS_DISPLAY_MAX
};
class DisplayData : public cocos2d::CCObject
class CCDisplayData : public CCObject
{
public:
CS_CREATE_NO_PARAM_NO_INIT(DisplayData)
CS_CREATE_NO_PARAM_NO_INIT(CCDisplayData)
static const char *changeDisplayToTexture(const char *);
public:
DisplayData();
virtual ~DisplayData(void);
CCDisplayData();
virtual ~CCDisplayData(void);
DisplayType displayType; //! mark which type your display is
};
@ -133,17 +133,17 @@ public:
#pragma region SpriteDisplayData
class SpriteDisplayData : public DisplayData
#pragma region CCSpriteDisplayData
class CCSpriteDisplayData : public CCDisplayData
{
public:
CS_CREATE_NO_PARAM_NO_INIT(SpriteDisplayData)
CS_CREATE_NO_PARAM_NO_INIT(CCSpriteDisplayData)
public:
SpriteDisplayData();
virtual ~SpriteDisplayData();
CCSpriteDisplayData();
virtual ~CCSpriteDisplayData();
inline void setParam(const char *displayName){ this->displayName = displayName; }
void copy(SpriteDisplayData *displayData);
void copy(CCSpriteDisplayData *displayData);
public:
/**
* If DisplayType is CS_DISPLAY_SPRITE, then CCBone will use this image name to create a CCSprite from CCSpriteFrameCache.
@ -158,17 +158,17 @@ public:
#pragma endregion
#pragma region ArmatureDisplayData
class ArmatureDisplayData : public DisplayData
#pragma region CCArmatureDisplayData
class CCArmatureDisplayData : public CCDisplayData
{
public:
CS_CREATE_NO_PARAM_NO_INIT(ArmatureDisplayData)
CS_CREATE_NO_PARAM_NO_INIT(CCArmatureDisplayData)
public:
ArmatureDisplayData();
virtual ~ArmatureDisplayData();
CCArmatureDisplayData();
virtual ~CCArmatureDisplayData();
inline void setParam(const char *displayName){ this->displayName = displayName; }
void copy(ArmatureDisplayData *displayData);
void copy(CCArmatureDisplayData *displayData);
public:
/**
* If DisplayType is CS_DISPLAY_SPRITE, then CCBone will use this image name to create a CCSprite from CCSpriteFrameCache.
@ -183,36 +183,36 @@ public:
#pragma endregion
#pragma region ParticleDisplayData
class ParticleDisplayData : public DisplayData
#pragma region CCParticleDisplayData
class CCParticleDisplayData : public CCDisplayData
{
public:
CS_CREATE_NO_PARAM_NO_INIT(ParticleDisplayData)
CS_CREATE_NO_PARAM_NO_INIT(CCParticleDisplayData)
public:
ParticleDisplayData();
virtual ~ParticleDisplayData(){};
CCParticleDisplayData();
virtual ~CCParticleDisplayData(){};
void setParam(const char *plist){ this->plist = plist; }
void copy(ParticleDisplayData *displayData);
void copy(CCParticleDisplayData *displayData);
public:
std::string plist;
};
#pragma endregion
#pragma region ShaderDisplayData
class ShaderDisplayData : public DisplayData
#pragma region CCShaderDisplayData
class CCShaderDisplayData : public CCDisplayData
{
public:
CS_CREATE_NO_PARAM_NO_INIT(ShaderDisplayData)
CS_CREATE_NO_PARAM_NO_INIT(CCShaderDisplayData)
public:
ShaderDisplayData();
virtual ~ShaderDisplayData(){};
CCShaderDisplayData();
virtual ~CCShaderDisplayData(){};
inline void setParam(const char *vert, const char *frag){ this->vert = vert; this->frag = frag;}
void copy(ShaderDisplayData *displayData);
void copy(CCShaderDisplayData *displayData);
public:
std::string vert;
std::string frag;
@ -220,65 +220,65 @@ public:
#pragma endregion
#pragma region BoneData
#pragma region CCBoneData
/**
* BoneData used to init a CCBone.
* BoneData keeps a DisplayData list, a CCBone can have many display to change.
* The display information saved in the DisplayData
* CCBoneData used to init a CCBone.
* CCBoneData keeps a CCDisplayData list, a CCBone can have many display to change.
* The display information saved in the CCDisplayData
*/
class BoneData : public Node
class CCBoneData : public CCBaseData
{
public:
CS_CREATE_NO_PARAM(BoneData)
CS_CREATE_NO_PARAM(CCBoneData)
public:
BoneData(void);
~BoneData(void);
CCBoneData(void);
~CCBoneData(void);
virtual bool init();
void addDisplayData(DisplayData *displayData);
DisplayData *getDisplayData(int index);
void addDisplayData(CCDisplayData *displayData);
CCDisplayData *getDisplayData(int index);
public:
std::string name; //! the bone's name
std::string parentName; //! the bone parent's name
cocos2d::CCArray displayDataList; //! save DisplayData informations for the CCBone
CCArray displayDataList; //! save CCDisplayData informations for the CCBone
};
#pragma endregion
#pragma region ArmatureData
#pragma region CCArmatureData
/**
* ArmatureData saved the CCArmature name and Bonedatas needed for the Bones in this CCArmature
* When we create a CCArmature, we need to get each CCBone's BoneData as it's init information.
* So we can get a BoneData from the cocos2d::CCDictionary saved in the ArmatureData.
* CCArmatureData saved the CCArmature name and Bonedatas needed for the Bones in this CCArmature
* When we create a CCArmature, we need to get each CCBone's CCBoneData as it's init information.
* So we can get a CCBoneData from the CCDictionary saved in the CCArmatureData.
*/
class ArmatureData : public cocos2d::CCObject
class CCArmatureData : public CCObject
{
public:
CS_CREATE_NO_PARAM(ArmatureData)
CS_CREATE_NO_PARAM(CCArmatureData)
public:
ArmatureData();
~ArmatureData();
CCArmatureData();
~CCArmatureData();
bool init();
void addBoneData(BoneData *boneData);
BoneData *getBoneData(const char *boneName);
void addBoneData(CCBoneData *boneData);
CCBoneData *getBoneData(const char *boneName);
public:
std::string name;
cocos2d::CCDictionary boneDataDic;
cocos2d::CCArray boneList;
CCDictionary boneDataDic;
CCArray boneList;
};
#pragma endregion
#pragma region FrameData
class FrameData : public Node
#pragma region CCFrameData
class CCFrameData : public CCBaseData
{
public:
CS_CREATE_NO_PARAM_NO_INIT(FrameData)
CS_CREATE_NO_PARAM_NO_INIT(CCFrameData)
public:
FrameData();
~FrameData();
CCFrameData();
~CCFrameData();
virtual void copy(FrameData *frameData);
virtual void copy(CCFrameData *frameData);
public:
int duration; //! The frame will last m_iDuration frames
CCTweenType tweenEasing; //! Every frame's tween easing effect
@ -299,40 +299,40 @@ public:
};
#pragma endregion
#pragma region MovementBoneData
class MovementBoneData : public cocos2d::CCObject
#pragma region CCMovementBoneData
class CCMovementBoneData : public CCObject
{
public:
CS_CREATE_NO_PARAM(MovementBoneData)
CS_CREATE_NO_PARAM(CCMovementBoneData)
public:
MovementBoneData();
~MovementBoneData(void);
CCMovementBoneData();
~CCMovementBoneData(void);
virtual bool init();
void addFrameData(FrameData *frameData);
FrameData *getFrameData(int index);
void addFrameData(CCFrameData *frameData);
CCFrameData *getFrameData(int index);
public:
float delay; //! movement delay percent, this value can produce a delay effect
float scale; //! scale this movement
float duration; //! this CCBone in this movement will last m_iDuration frames
std::string name; //! bone name
cocos2d::CCArray frameList;
CCArray frameList;
};
#pragma endregion
#pragma region MovementData
class MovementData : public cocos2d::CCObject
#pragma region CCMovementData
class CCMovementData : public CCObject
{
public:
CS_CREATE_NO_PARAM_NO_INIT(MovementData)
CS_CREATE_NO_PARAM_NO_INIT(CCMovementData)
public:
MovementData(void);
~MovementData(void);
CCMovementData(void);
~CCMovementData(void);
void addMovementBoneData(MovementBoneData *movBoneData);
MovementBoneData *getMovementBoneData(const char *boneName);
void addMovementBoneData(CCMovementBoneData *movBoneData);
CCMovementBoneData *getMovementBoneData(const char *boneName);
public:
std::string name;
int duration; //! the frames this movement will last
@ -355,50 +355,50 @@ public:
/**
* Which tween easing effect the movement use
* TWEEN_EASING_MAX : use the value from MovementData get from flash design panel
* TWEEN_EASING_MAX : use the value from CCMovementData get from flash design panel
*/
CCTweenType tweenEasing;
/**
* @brief save movment bone datas
* @key std::string
* @value MovementBoneData *
* @value CCMovementBoneData *
*/
cocos2d::CCDictionary movBoneDataDic;
CCDictionary movBoneDataDic;
};
#pragma endregion
#pragma region AnimationData
#pragma region CCAnimationData
/**
* AnimationData include all movement infomation for the CCArmature
* The struct is AnimationData -> MovementData -> MovementBoneData -> FrameData
* CCAnimationData include all movement infomation for the CCArmature
* The struct is CCAnimationData -> CCMovementData -> CCMovementBoneData -> CCFrameData
* -> MovementFrameData
*/
class AnimationData : public cocos2d::CCObject
class CCAnimationData : public CCObject
{
public:
CS_CREATE_NO_PARAM_NO_INIT(AnimationData)
CS_CREATE_NO_PARAM_NO_INIT(CCAnimationData)
public:
AnimationData(void);
~AnimationData(void);
CCAnimationData(void);
~CCAnimationData(void);
void release();
void retain();
void addMovement(MovementData* movData);
MovementData *getMovement(const char *movementName);
void addMovement(CCMovementData* movData);
CCMovementData *getMovement(const char *movementName);
int getMovementCount();
public:
std::string name;
cocos2d::CCDictionary movementDataDic;
CCDictionary movementDataDic;
std::vector<std::string> movementNames;
};
#pragma endregion
#pragma region ContourData
struct ContourVertex2 : public cocos2d::CCObject
#pragma region CCContourData
struct CCContourVertex2 : public CCObject
{
ContourVertex2(float x, float y)
CCContourVertex2(float x, float y)
{
this->x = x;
this->y = y;
@ -409,41 +409,41 @@ struct ContourVertex2 : public cocos2d::CCObject
};
/*
* ContourData include a contour vertex information
* CCContourData include a contour vertex information
*/
class ContourData : public cocos2d::CCObject
class CCContourData : public CCObject
{
public:
CS_CREATE_NO_PARAM(ContourData)
CS_CREATE_NO_PARAM(CCContourData)
public:
ContourData();
~ContourData(void);
CCContourData();
~CCContourData(void);
virtual bool init();
public:
cocos2d::CCArray vertexList; //! Save contour vertex info, vertex saved in a CCPoint
CCArray vertexList; //! Save contour vertex info, vertex saved in a CCPoint
};
#pragma endregion
#pragma region TextureData
#pragma region CCTextureData
/*
* TextureData include a texture's information
* CCTextureData include a texture's information
*/
class TextureData : public cocos2d::CCObject
class CCTextureData : public CCObject
{
public:
CS_CREATE_NO_PARAM(TextureData)
CS_CREATE_NO_PARAM(CCTextureData)
public:
TextureData();
~TextureData(void);
CCTextureData();
~CCTextureData(void);
virtual bool init();
void addContourData(ContourData *contourData);
ContourData *getContourData(int index);
void addContourData(CCContourData *contourData);
CCContourData *getContourData(int index);
public:
std::string name; //! The texture's name
@ -453,7 +453,7 @@ public:
float width; //! The texture's width, height
float height;
cocos2d::CCArray contourDataList;
CCArray contourDataList;
};
#pragma endregion

View File

@ -50,7 +50,7 @@ public:
protected:
CC_SYNTHESIZE_RETAIN(CCNode*, m_pDisplay, Display);
CC_SYNTHESIZE_RETAIN(DisplayData*, m_pDisplayData, DisplayData);
CC_SYNTHESIZE_RETAIN(CCDisplayData*, m_pDisplayData, DisplayData);
#if ENABLE_PHYSICS_DETECT
CC_SYNTHESIZE_RETAIN(CCColliderDetector*, m_pColliderDetector, ColliderDetector);

View File

@ -33,7 +33,7 @@ THE SOFTWARE.
NS_CC_EXT_BEGIN
void CS_DISPLAY_ADD(CCBone *bone, CCDecorativeDisplay *decoDisplay, DisplayData *displayData)
void CS_DISPLAY_ADD(CCBone *bone, CCDecorativeDisplay *decoDisplay, CCDisplayData *displayData)
{
switch(displayData->displayType)
{
@ -95,10 +95,10 @@ void CS_DISPLAY_UPDATE(CCBone *bone, CCDecorativeDisplay *decoDisplay, float dt,
void CS_DISPLAY_SPRITE_ADD(CCBone *bone, CCDecorativeDisplay *decoDisplay, DisplayData *displayData)
void CS_DISPLAY_SPRITE_ADD(CCBone *bone, CCDecorativeDisplay *decoDisplay, CCDisplayData *displayData)
{
SpriteDisplayData *sdp = SpriteDisplayData::create();
sdp->copy((SpriteDisplayData*)displayData);
CCSpriteDisplayData *sdp = CCSpriteDisplayData::create();
sdp->copy((CCSpriteDisplayData*)displayData);
decoDisplay->setDisplayData(sdp);
CS_DISPLAY_SPRITE_CREATE(bone, decoDisplay);
}
@ -107,7 +107,7 @@ void CS_DISPLAY_SPRITE_CREATE(CCBone *bone, CCDecorativeDisplay *decoDisplay)
{
CCSkin *skin = NULL;
SpriteDisplayData *displayData = (SpriteDisplayData*)decoDisplay->getDisplayData();
CCSpriteDisplayData *displayData = (CCSpriteDisplayData*)decoDisplay->getDisplayData();
//! remove .xxx
std::string textureName = displayData->displayName;
@ -131,7 +131,7 @@ void CS_DISPLAY_SPRITE_CREATE(CCBone *bone, CCDecorativeDisplay *decoDisplay)
CCTextureAtlas *atlas = CCSpriteFrameCacheHelper::sharedSpriteFrameCacheHelper()->getTextureAtlas((textureName + ".png").c_str());
skin->setTextureAtlas(atlas);
TextureData *textureData = CCArmatureDataManager::sharedArmatureDataManager()->getTextureData(textureName.c_str());
CCTextureData *textureData = CCArmatureDataManager::sharedArmatureDataManager()->getTextureData(textureName.c_str());
if(textureData)
{
//! Init display anchorPointŁŹ every Texture have a anchor point
@ -163,17 +163,17 @@ void CS_DISPLAY_SPRITE_UPDATE(CCBone *bone, CCDecorativeDisplay *decoDisplay, fl
}
void CS_DISPLAY_ARMATURE_ADD(CCBone *bone, CCDecorativeDisplay *decoDisplay, DisplayData *displayData)
void CS_DISPLAY_ARMATURE_ADD(CCBone *bone, CCDecorativeDisplay *decoDisplay, CCDisplayData *displayData)
{
ArmatureDisplayData *adp = ArmatureDisplayData::create(); ;
adp->copy((ArmatureDisplayData*)displayData);
CCArmatureDisplayData *adp = CCArmatureDisplayData::create(); ;
adp->copy((CCArmatureDisplayData*)displayData);
decoDisplay->setDisplayData(adp);
CS_DISPLAY_ARMATURE_CREATE(bone, decoDisplay);
}
void CS_DISPLAY_ARMATURE_CREATE(CCBone *bone, CCDecorativeDisplay *decoDisplay)
{
ArmatureDisplayData *displayData = (ArmatureDisplayData*)decoDisplay->getDisplayData();
CCArmatureDisplayData *displayData = (CCArmatureDisplayData*)decoDisplay->getDisplayData();
CCArmature *armature = CCArmature::create(displayData->displayName.c_str(), bone);
@ -199,24 +199,24 @@ void CS_DISPLAY_ARMATURE_UPDATE(CCBone *bone, CCDecorativeDisplay *decoDisplay,
void CS_DISPLAY_PARTICLE_ADD(CCBone *bone, CCDecorativeDisplay *decoDisplay, DisplayData *displayData)
void CS_DISPLAY_PARTICLE_ADD(CCBone *bone, CCDecorativeDisplay *decoDisplay, CCDisplayData *displayData)
{
ParticleDisplayData *adp = ParticleDisplayData::create(); ;
adp->copy((ParticleDisplayData*)displayData);
CCParticleDisplayData *adp = CCParticleDisplayData::create(); ;
adp->copy((CCParticleDisplayData*)displayData);
decoDisplay->setDisplayData(adp);
CS_DISPLAY_PARTICLE_CREATE(bone, decoDisplay);
}
void CS_DISPLAY_PARTICLE_CREATE(CCBone *bone, CCDecorativeDisplay *decoDisplay)
{
ParticleDisplayData *displayData = (ParticleDisplayData*)decoDisplay->getDisplayData();
CCParticleDisplayData *displayData = (CCParticleDisplayData*)decoDisplay->getDisplayData();
CCParticleSystem *system = CCParticleSystemQuad::create(displayData->plist.c_str());
decoDisplay->setDisplay(system);
}
void CS_DISPLAY_PARTICLE_UPDATE(CCBone *bone, CCDecorativeDisplay *decoDisplay, float dt, bool dirty)
{
CCParticleSystem *system = (CCParticleSystem*)decoDisplay->getDisplay();
Node node;
CCBaseData node;
CCTransformHelp::matrixToNode(bone->nodeToArmatureTransform(), node);
system->setPosition(node.x, node.y);
system->setScaleX(node.scaleX);
@ -226,17 +226,17 @@ void CS_DISPLAY_PARTICLE_UPDATE(CCBone *bone, CCDecorativeDisplay *decoDisplay,
void CS_DISPLAY_SHADER_ADD(CCBone *bone, CCDecorativeDisplay *decoDisplay, DisplayData *displayData)
void CS_DISPLAY_SHADER_ADD(CCBone *bone, CCDecorativeDisplay *decoDisplay, CCDisplayData *displayData)
{
ShaderDisplayData *sdp = ShaderDisplayData::create();
sdp->copy((ShaderDisplayData*)displayData);
CCShaderDisplayData *sdp = CCShaderDisplayData::create();
sdp->copy((CCShaderDisplayData*)displayData);
decoDisplay->setDisplayData(sdp);
CS_DISPLAY_SHADER_CREATE(bone, decoDisplay);
}
void CS_DISPLAY_SHADER_CREATE(CCBone *bone, CCDecorativeDisplay *decoDisplay)
{
ShaderDisplayData *displayData = (ShaderDisplayData*)decoDisplay->getDisplayData();
CCShaderDisplayData *displayData = (CCShaderDisplayData*)decoDisplay->getDisplayData();
CCShaderNode *sn = CCShaderNode::shaderNodeWithVertex(displayData->vert.c_str(), displayData->frag.c_str());
decoDisplay->setDisplay(sn);
}

View File

@ -33,26 +33,26 @@ NS_CC_EXT_BEGIN
class CCSkin;
class CCBone;
class CCDecorativeDisplay;
class DisplayData;
class CCDisplayData;
void CS_DISPLAY_ADD(CCBone *bone, CCDecorativeDisplay *decoDisplay, DisplayData *displayData);
void CS_DISPLAY_ADD(CCBone *bone, CCDecorativeDisplay *decoDisplay, CCDisplayData *displayData);
void CS_DISPLAY_CREATE(CCBone *bone, CCDecorativeDisplay *decoDisplay);
void CS_DISPLAY_UPDATE(CCBone *bone, CCDecorativeDisplay *decoDisplay, float dt, bool dirty);
void CS_DISPLAY_SPRITE_ADD(CCBone *bone, CCDecorativeDisplay *decoDisplay, DisplayData *displayData);
void CS_DISPLAY_SPRITE_ADD(CCBone *bone, CCDecorativeDisplay *decoDisplay, CCDisplayData *displayData);
void CS_DISPLAY_SPRITE_CREATE(CCBone *bone, CCDecorativeDisplay *decoDisplay);
void CS_DISPLAY_SPRITE_UPDATE(CCBone *bone, CCDecorativeDisplay *decoDisplay, float dt, bool dirty);
void CS_DISPLAY_ARMATURE_ADD(CCBone *bone, CCDecorativeDisplay *decoDisplay, DisplayData *displayData);
void CS_DISPLAY_ARMATURE_ADD(CCBone *bone, CCDecorativeDisplay *decoDisplay, CCDisplayData *displayData);
void CS_DISPLAY_ARMATURE_CREATE(CCBone *bone, CCDecorativeDisplay *decoDisplay);
void CS_DISPLAY_ARMATURE_UPDATE(CCBone *bone, CCDecorativeDisplay *decoDisplay, float dt, bool dirty);
void CS_DISPLAY_PARTICLE_ADD(CCBone *bone, CCDecorativeDisplay *decoDisplay, DisplayData *displayData);
void CS_DISPLAY_PARTICLE_ADD(CCBone *bone, CCDecorativeDisplay *decoDisplay, CCDisplayData *displayData);
void CS_DISPLAY_PARTICLE_CREATE(CCBone *bone, CCDecorativeDisplay *decoDisplay);
void CS_DISPLAY_PARTICLE_UPDATE(CCBone *bone, CCDecorativeDisplay *decoDisplay, float dt, bool dirty);
void CS_DISPLAY_SHADER_ADD(CCBone *bone, CCDecorativeDisplay *decoDisplay, DisplayData *displayData);
void CS_DISPLAY_SHADER_ADD(CCBone *bone, CCDecorativeDisplay *decoDisplay, CCDisplayData *displayData);
void CS_DISPLAY_SHADER_CREATE(CCBone *bone, CCDecorativeDisplay *decoDisplay);

View File

@ -84,7 +84,7 @@ bool CCDisplayManager::init(CCBone *bone)
}
void CCDisplayManager::addDisplay(DisplayData *_displayData, int _index)
void CCDisplayManager::addDisplay(CCDisplayData *_displayData, int _index)
{
CCDecorativeDisplay *decoDisplay = NULL;
@ -211,7 +211,7 @@ CCDecorativeDisplay *CCDisplayManager::getDecorativeDisplayByIndex( int index)
return (CCDecorativeDisplay*)m_pDecoDisplayList->objectAtIndex(index);
}
void CCDisplayManager::initDisplayList(BoneData *boneData)
void CCDisplayManager::initDisplayList(CCBoneData *boneData)
{
CC_SAFE_DELETE(m_pDecoDisplayList);
m_pDecoDisplayList = CCArray::create();
@ -223,7 +223,7 @@ void CCDisplayManager::initDisplayList(BoneData *boneData)
CCArray *displayDataList = &boneData->displayDataList;
CCARRAY_FOREACH(displayDataList, object)
{
DisplayData *displayData = (DisplayData*)object;
CCDisplayData *displayData = (CCDisplayData*)object;
CCDecorativeDisplay *decoDisplay = CCDecorativeDisplay::create();
decoDisplay->setDisplayData(displayData);

View File

@ -46,11 +46,11 @@ public:
bool init(CCBone *bone);
/**
* Use BoneData to init the display list.
* Use CCBoneData to init the display list.
* If display is a sprite, and it have texture info in the TexutreData, then use TexutreData to init the display's anchor point
* If the display is a CCArmature, then create a new CCArmature
*/
void initDisplayList(BoneData *_boneData);
void initDisplayList(CCBoneData *_boneData);
/**
* Add display and use _DisplayData init the display.
@ -58,12 +58,12 @@ public:
* If _index is current display index, then also change display to _index
*
* @param displayData it include the display information, like DisplayType.
* If you want to create a sprite display, then create a SpriteDisplayData param
* If you want to create a sprite display, then create a CCSpriteDisplayData param
*
* @param index the index of the display you want to replace or add to
* -1 : append display from back
*/
void addDisplay(DisplayData *displayData, int index);
void addDisplay(CCDisplayData *displayData, int index);
void removeDisplay(int index);

View File

@ -62,7 +62,7 @@ CCSkin::CCSkin()
{
}
void CCSkin::setSkinData(const Node& var)
void CCSkin::setSkinData(const CCBaseData& var)
{
m_sSkinData = var;
@ -74,7 +74,7 @@ void CCSkin::setSkinData(const Node& var)
m_tSkinTransform = nodeToParentTransform();
}
const Node &CCSkin::getSkinData()
const CCBaseData &CCSkin::getSkinData()
{
return m_sSkinData;
}

View File

@ -41,7 +41,7 @@ public:
void updateTransform();
void draw();
CC_PROPERTY_PASS_BY_REF(Node, m_sSkinData, SkinData);
CC_PROPERTY_PASS_BY_REF(CCBaseData, m_sSkinData, SkinData);
CC_SYNTHESIZE(CCBone*, m_pBone, Bone);
protected:

View File

@ -64,7 +64,7 @@ CCColliderDetector::~CCColliderDetector()
{
ColliderBody *colliderBody = (ColliderBody*)object;
ContourData *contourData = colliderBody->getContourData();
CCContourData *contourData = colliderBody->getContourData();
b2Body *body = colliderBody->getB2Body();
CCPhysicsWorld::sharedPhysicsWorld()->getNoGravityWorld()->DestroyBody(body);
}
@ -91,7 +91,7 @@ bool CCColliderDetector::init(CCBone *bone)
return true;
}
void CCColliderDetector::addContourData(ContourData *contourData)
void CCColliderDetector::addContourData(CCContourData *contourData)
{
const CCArray *array = &contourData->vertexList;
CCObject *object = NULL;
@ -101,7 +101,7 @@ void CCColliderDetector::addContourData(ContourData *contourData)
int i = 0;
CCARRAY_FOREACH(array, object)
{
ContourVertex2 *v = (ContourVertex2*)object;
CCContourVertex2 *v = (CCContourVertex2*)object;
b2bv[i].Set(v->x/PT_RATIO, v->y/PT_RATIO);
i++;
}
@ -134,11 +134,11 @@ void CCColliderDetector::addContourDataList(CCArray *contourDataList)
CCObject *object = NULL;
CCARRAY_FOREACH(contourDataList,object)
{
addContourData((ContourData*)object);
addContourData((CCContourData*)object);
}
}
void CCColliderDetector::removeContourData(ContourData *_contourData)
void CCColliderDetector::removeContourData(CCContourData *_contourData)
{
m_pColliderBodyList->removeObject(_contourData);
}
@ -177,7 +177,7 @@ void CCColliderDetector::updateTransform(CCAffineTransform &t)
{
ColliderBody *colliderBody = (ColliderBody*)object;
ContourData *contourData = colliderBody->getContourData();
CCContourData *contourData = colliderBody->getContourData();
b2Body *body = colliderBody->getB2Body();
b2PolygonShape *shape = (b2PolygonShape *)body->GetFixtureList()->GetShape();
@ -188,7 +188,7 @@ void CCColliderDetector::updateTransform(CCAffineTransform &t)
int i = 0;
CCARRAY_FOREACH(array, object)
{
ContourVertex2 *cv = (ContourVertex2*)object;
CCContourVertex2 *cv = (CCContourVertex2*)object;
b2Vec2 &bv = shape->m_vertices[i];
helpPoint.setPoint(cv->x, cv->y);

View File

@ -36,7 +36,7 @@ class CCBone;
class ColliderBody : public CCObject
{
public:
ColliderBody(b2Body *b2b, ContourData *contourData)
ColliderBody(b2Body *b2b, CCContourData *contourData)
:m_pB2b(NULL)
,m_pContourData(NULL)
{
@ -55,14 +55,14 @@ public:
return m_pB2b;
}
inline ContourData *getContourData()
inline CCContourData *getContourData()
{
return m_pContourData;
}
private:
b2Body *m_pB2b;
ContourData *m_pContourData;
CCContourData *m_pContourData;
};
/*
@ -80,10 +80,10 @@ public:
virtual bool init();
virtual bool init(CCBone *bone);
void addContourData(ContourData *contourData);
void addContourData(CCContourData *contourData);
void addContourDataList(CCArray *contourDataList);
void removeContourData(ContourData *contourData);
void removeContourData(CCContourData *contourData);
void removeAll();
void updateTransform(CCAffineTransform &t);

View File

@ -96,7 +96,7 @@ bool CCArmatureDataManager::init()
return bRet;
}
void CCArmatureDataManager::addArmatureData(const char *id, ArmatureData *armatureData)
void CCArmatureDataManager::addArmatureData(const char *id, CCArmatureData *armatureData)
{
if(m_pArmarureDatas)
{
@ -104,17 +104,17 @@ void CCArmatureDataManager::addArmatureData(const char *id, ArmatureData *armatu
}
}
ArmatureData *CCArmatureDataManager::getArmatureData(const char* id)
CCArmatureData *CCArmatureDataManager::getArmatureData(const char* id)
{
ArmatureData * armatureData = NULL;
CCArmatureData * armatureData = NULL;
if (m_pArmarureDatas)
{
armatureData = (ArmatureData*)m_pArmarureDatas->objectForKey(id);
armatureData = (CCArmatureData*)m_pArmarureDatas->objectForKey(id);
}
return armatureData;
}
void CCArmatureDataManager::addAnimationData(const char *id, AnimationData *animationData)
void CCArmatureDataManager::addAnimationData(const char *id, CCAnimationData *animationData)
{
if(m_pAnimationDatas)
{
@ -122,7 +122,7 @@ void CCArmatureDataManager::addAnimationData(const char *id, AnimationData *anim
}
}
void CCArmatureDataManager::addTextureData(const char *id, TextureData *textureData)
void CCArmatureDataManager::addTextureData(const char *id, CCTextureData *textureData)
{
if(m_pTextureDatas)
{
@ -130,22 +130,22 @@ void CCArmatureDataManager::addTextureData(const char *id, TextureData *textureD
}
}
AnimationData* CCArmatureDataManager::getAnimationData(const char* id)
CCAnimationData* CCArmatureDataManager::getAnimationData(const char* id)
{
AnimationData *animationData = NULL;
CCAnimationData *animationData = NULL;
if (m_pAnimationDatas)
{
animationData = (AnimationData*)m_pAnimationDatas->objectForKey(id);
animationData = (CCAnimationData*)m_pAnimationDatas->objectForKey(id);
}
return animationData;
}
TextureData *CCArmatureDataManager::getTextureData(const char* id)
CCTextureData *CCArmatureDataManager::getTextureData(const char* id)
{
TextureData *textureData = NULL;
CCTextureData *textureData = NULL;
if (m_pTextureDatas)
{
textureData = (TextureData*)m_pTextureDatas->objectForKey(id);
textureData = (CCTextureData*)m_pTextureDatas->objectForKey(id);
}
return textureData;
}

View File

@ -54,54 +54,54 @@ public:
/**
* Add armature data
* @param id The id of the armature data
* @param armatureData ArmatureData *
* @param armatureData CCArmatureData *
*/
void addArmatureData(const char *id, ArmatureData *armatureData);
void addArmatureData(const char *id, CCArmatureData *armatureData);
/**
* @brief get armature data
*
* @param id the id of the armature data you want to get
*
* @return ArmatureData *
* @return CCArmatureData *
*/
ArmatureData *getArmatureData(const char *id);
CCArmatureData *getArmatureData(const char *id);
/**
* @brief add animation data
*
* @param id the id of the animation data
*
* @return AnimationData *
* @return CCAnimationData *
*/
void addAnimationData(const char *id, AnimationData *animationData);
void addAnimationData(const char *id, CCAnimationData *animationData);
/**
* @brief get animation data from m_pAnimationDatas(CCDictionary)
*
* @param id the id of the animation data you want to get
*
* @return AnimationData *
* @return CCAnimationData *
*/
AnimationData *getAnimationData(const char *id);
CCAnimationData *getAnimationData(const char *id);
/**
* @brief add texture data
*
* @param id the id of the texture data
*
* @return TextureData *
* @return CCTextureData *
*/
void addTextureData(const char *id, TextureData *textureData);
void addTextureData(const char *id, CCTextureData *textureData);
/**
* @brief get texture data
*
* @param _id the id of the texture data you want to get
*
* @return TextureData *
* @return CCTextureData *
*/
TextureData *getTextureData(const char *id);
CCTextureData *getTextureData(const char *id);
/**
* @brief Add ArmatureFileInfo, it is managed by CCArmatureDataManager.
@ -128,21 +128,21 @@ private:
/**
* @brief save amature datas
* @key std::string
* @value ArmatureData *
* @value CCArmatureData *
*/
CC_SYNTHESIZE_READONLY(CCDictionary *, m_pArmarureDatas, ArmarureDatas);
/**
* @brief save animation datas
* @key std::string
* @value AnimationData *
* @value CCAnimationData *
*/
CC_SYNTHESIZE_READONLY(CCDictionary *, m_pAnimationDatas, AnimationDatas);
/**
* @brief save texture datas
* @key std::string
* @value TextureData *
* @value CCTextureData *
*/
CC_SYNTHESIZE_READONLY(CCDictionary *, m_pTextureDatas, TextureDatas);

View File

@ -134,7 +134,7 @@ void CCDataReaderHelper::addDataFromCache(const char *_pFileContent)
tinyxml2::XMLElement *armatureXML = armaturesXML->FirstChildElement(ARMATURE);
while(armatureXML)
{
ArmatureData *armatureData = CCDataReaderHelper::decodeArmature(armatureXML);
CCArmatureData *armatureData = CCDataReaderHelper::decodeArmature(armatureXML);
CCArmatureDataManager::sharedArmatureDataManager()->addArmatureData(armatureData->name.c_str(), armatureData);
armatureXML = armatureXML->NextSiblingElement(ARMATURE);
@ -147,7 +147,7 @@ void CCDataReaderHelper::addDataFromCache(const char *_pFileContent)
tinyxml2::XMLElement *animationXML = animationsXML->FirstChildElement(ANIMATION);
while(animationXML)
{
AnimationData *animationData = CCDataReaderHelper::decodeAnimation(animationXML);
CCAnimationData *animationData = CCDataReaderHelper::decodeAnimation(animationXML);
CCArmatureDataManager::sharedArmatureDataManager()->addAnimationData(animationData->name.c_str(), animationData);
animationXML = animationXML->NextSiblingElement(ANIMATION);
@ -160,7 +160,7 @@ void CCDataReaderHelper::addDataFromCache(const char *_pFileContent)
tinyxml2::XMLElement *textureXML = texturesXML->FirstChildElement(SUB_TEXTURE);
while(textureXML)
{
TextureData *textureData = CCDataReaderHelper::decodeTexture(textureXML);
CCTextureData *textureData = CCDataReaderHelper::decodeTexture(textureXML);
CCArmatureDataManager::sharedArmatureDataManager()->addTextureData(textureData->name.c_str(), textureData);
textureXML = textureXML->NextSiblingElement(SUB_TEXTURE);
@ -168,12 +168,12 @@ void CCDataReaderHelper::addDataFromCache(const char *_pFileContent)
}
ArmatureData *CCDataReaderHelper::decodeArmature(tinyxml2::XMLElement *armatureXML)
CCArmatureData *CCDataReaderHelper::decodeArmature(tinyxml2::XMLElement *armatureXML)
{
const char* name = armatureXML->Attribute(A_NAME);
ArmatureData *armatureData = ArmatureData::create();
CCArmatureData *armatureData = CCArmatureData::create();
armatureData->name = name;
@ -200,7 +200,7 @@ ArmatureData *CCDataReaderHelper::decodeArmature(tinyxml2::XMLElement *armatureX
}
}
BoneData *boneData = decodeBone(boneXML, parentXML);
CCBoneData *boneData = decodeBone(boneXML, parentXML);
armatureData->addBoneData(boneData);
boneXML = boneXML->NextSiblingElement(BONE);
@ -209,7 +209,7 @@ ArmatureData *CCDataReaderHelper::decodeArmature(tinyxml2::XMLElement *armatureX
return armatureData;
}
BoneData *CCDataReaderHelper::decodeBone(tinyxml2::XMLElement *boneXML, tinyxml2::XMLElement *parentXml)
CCBoneData *CCDataReaderHelper::decodeBone(tinyxml2::XMLElement *boneXML, tinyxml2::XMLElement *parentXml)
{
std::string name = boneXML->Attribute(A_NAME);
@ -217,7 +217,7 @@ BoneData *CCDataReaderHelper::decodeBone(tinyxml2::XMLElement *boneXML, tinyxml2
CCAssert(name.compare("") != 0, "");
BoneData *boneData = BoneData::create();
CCBoneData *boneData = CCBoneData::create();
boneData->name = name;
@ -262,7 +262,7 @@ BoneData *CCDataReaderHelper::decodeBone(tinyxml2::XMLElement *boneXML, tinyxml2
// /*
// * recalculate bone data from parent bone data, use for translate matrix
// */
// Node _helpNode;
// CCBaseData _helpNode;
// parentXml->QueryFloatAttribute(A_X, &_helpNode.x);
// parentXml->QueryFloatAttribute(A_Y, &_helpNode.y);
// parentXml->QueryFloatAttribute(A_SKEW_X, &_helpNode.skewX);
@ -279,7 +279,7 @@ BoneData *CCDataReaderHelper::decodeBone(tinyxml2::XMLElement *boneXML, tinyxml2
tinyxml2::XMLElement *displayXML = boneXML->FirstChildElement(DISPLAY);
while(displayXML)
{
DisplayData *displayData = decodeBoneDisplay(displayXML);
CCDisplayData *displayData = decodeBoneDisplay(displayXML);
boneData->addDisplayData(displayData);
displayXML = displayXML->NextSiblingElement(DISPLAY);
@ -289,28 +289,28 @@ BoneData *CCDataReaderHelper::decodeBone(tinyxml2::XMLElement *boneXML, tinyxml2
return boneData;
}
DisplayData *CCDataReaderHelper::decodeBoneDisplay(tinyxml2::XMLElement *displayXML)
CCDisplayData *CCDataReaderHelper::decodeBoneDisplay(tinyxml2::XMLElement *displayXML)
{
int _isArmature = 0;
DisplayData *displayData;
CCDisplayData *displayData;
if( displayXML->QueryIntAttribute(A_IS_ARMATURE, &(_isArmature)) == tinyxml2::XML_SUCCESS )
{
if(!_isArmature)
{
displayData = SpriteDisplayData::create();
displayData = CCSpriteDisplayData::create();
displayData->displayType = CS_DISPLAY_SPRITE;
}
else
{
displayData = ArmatureDisplayData::create();
displayData = CCArmatureDisplayData::create();
displayData->displayType = CS_DISPLAY_ARMATURE;
}
}else{
displayData = SpriteDisplayData::create();
displayData = CCSpriteDisplayData::create();
displayData->displayType = CS_DISPLAY_SPRITE;
}
@ -318,11 +318,11 @@ DisplayData *CCDataReaderHelper::decodeBoneDisplay(tinyxml2::XMLElement *display
{
if(!_isArmature)
{
((SpriteDisplayData*)displayData)->displayName = displayXML->Attribute(A_NAME);
((CCSpriteDisplayData*)displayData)->displayName = displayXML->Attribute(A_NAME);
}
else
{
((ArmatureDisplayData*)displayData)->displayName = displayXML->Attribute(A_NAME);
((CCArmatureDisplayData*)displayData)->displayName = displayXML->Attribute(A_NAME);
}
}
@ -331,14 +331,14 @@ DisplayData *CCDataReaderHelper::decodeBoneDisplay(tinyxml2::XMLElement *display
return displayData;
}
AnimationData *CCDataReaderHelper::decodeAnimation(tinyxml2::XMLElement *animationXML)
CCAnimationData *CCDataReaderHelper::decodeAnimation(tinyxml2::XMLElement *animationXML)
{
const char* name = animationXML->Attribute(A_NAME);
AnimationData *aniData = AnimationData::create();
CCAnimationData *aniData = CCAnimationData::create();
ArmatureData *armatureData = CCArmatureDataManager::sharedArmatureDataManager()->getArmatureData(name);
CCArmatureData *armatureData = CCArmatureDataManager::sharedArmatureDataManager()->getArmatureData(name);
aniData->name = name;
@ -346,7 +346,7 @@ AnimationData *CCDataReaderHelper::decodeAnimation(tinyxml2::XMLElement *animati
while( movementXML )
{
MovementData *movementData = decodeMovement(movementXML, armatureData);
CCMovementData *movementData = decodeMovement(movementXML, armatureData);
aniData->addMovement(movementData);
movementXML = movementXML->NextSiblingElement(MOVEMENT);
@ -356,11 +356,11 @@ AnimationData *CCDataReaderHelper::decodeAnimation(tinyxml2::XMLElement *animati
return aniData;
}
MovementData *CCDataReaderHelper::decodeMovement(tinyxml2::XMLElement *movementXML, ArmatureData *armatureData)
CCMovementData *CCDataReaderHelper::decodeMovement(tinyxml2::XMLElement *movementXML, CCArmatureData *armatureData)
{
const char* _movName = movementXML->Attribute(A_NAME);
MovementData *movementData = MovementData::create();
CCMovementData *movementData = CCMovementData::create();
movementData->name = _movName;
@ -411,7 +411,7 @@ MovementData *CCDataReaderHelper::decodeMovement(tinyxml2::XMLElement *movementX
}
BoneData *boneData = (BoneData*)armatureData->getBoneData(_boneName);
CCBoneData *boneData = (CCBoneData*)armatureData->getBoneData(_boneName);
std::string _parentName = boneData->parentName;
@ -431,7 +431,7 @@ MovementData *CCDataReaderHelper::decodeMovement(tinyxml2::XMLElement *movementX
}
}
MovementBoneData *_moveBoneData = decodeMovementBone(movBoneXml, parentXml, boneData);
CCMovementBoneData *_moveBoneData = decodeMovementBone(movBoneXml, parentXml, boneData);
movementData->addMovementBoneData(_moveBoneData);
movBoneXml = movBoneXml->NextSiblingElement(BONE);
@ -441,9 +441,9 @@ MovementData *CCDataReaderHelper::decodeMovement(tinyxml2::XMLElement *movementX
}
MovementBoneData *CCDataReaderHelper::decodeMovementBone(tinyxml2::XMLElement* movBoneXml, tinyxml2::XMLElement* parentXml, BoneData *boneData)
CCMovementBoneData *CCDataReaderHelper::decodeMovementBone(tinyxml2::XMLElement* movBoneXml, tinyxml2::XMLElement* parentXml, CCBoneData *boneData)
{
MovementBoneData* movBoneData = MovementBoneData::create();
CCMovementBoneData* movBoneData = CCMovementBoneData::create();
float _scale, _delay;
if( movBoneXml )
@ -514,7 +514,7 @@ MovementBoneData *CCDataReaderHelper::decodeMovementBone(tinyxml2::XMLElement* m
}
}
FrameData * _frameData = decodeFrame( frameXML, parentFrameXML, boneData);
CCFrameData * _frameData = decodeFrame( frameXML, parentFrameXML, boneData);
movBoneData->addFrameData(_frameData);
_totalDuration += _frameData->duration;
@ -526,12 +526,12 @@ MovementBoneData *CCDataReaderHelper::decodeMovementBone(tinyxml2::XMLElement* m
return movBoneData;
}
FrameData * CCDataReaderHelper::decodeFrame(tinyxml2::XMLElement* frameXML, tinyxml2::XMLElement* parentFrameXml, BoneData *boneData)
CCFrameData * CCDataReaderHelper::decodeFrame(tinyxml2::XMLElement* frameXML, tinyxml2::XMLElement* parentFrameXml, CCBoneData *boneData)
{
float _x, _y, _scale_x, _scale_y, _skew_x, _skew_y = 0;
int _duration, _displayIndex, _zOrder, _tweenEasing = 0;
FrameData* frameData = FrameData::create();
CCFrameData* frameData = CCFrameData::create();
if(frameXML->Attribute(A_MOVEMENT) != NULL)
@ -655,7 +655,7 @@ FrameData * CCDataReaderHelper::decodeFrame(tinyxml2::XMLElement* frameXML, tin
/*
* recalculate frame data from parent frame data, use for translate matrix
*/
Node _helpNode;
CCBaseData _helpNode;
if (s_FlashToolVersion >= VERSION_2_0)
{
parentFrameXml->QueryFloatAttribute(A_COCOS2DX_X, &_helpNode.x);
@ -687,9 +687,9 @@ FrameData * CCDataReaderHelper::decodeFrame(tinyxml2::XMLElement* frameXML, tin
return frameData;
}
TextureData *CCDataReaderHelper::decodeTexture(tinyxml2::XMLElement *textureXML)
CCTextureData *CCDataReaderHelper::decodeTexture(tinyxml2::XMLElement *textureXML)
{
TextureData *textureData = TextureData::create();
CCTextureData *textureData = CCTextureData::create();
if( textureXML->Attribute(A_NAME) != NULL)
{
@ -723,7 +723,7 @@ TextureData *CCDataReaderHelper::decodeTexture(tinyxml2::XMLElement *textureXML)
while (contourXML) {
ContourData *contourData = decodeContour(contourXML);
CCContourData *contourData = decodeContour(contourXML);
textureData->addContourData(contourData);
contourXML = contourXML->NextSiblingElement(CONTOUR);
@ -733,15 +733,15 @@ TextureData *CCDataReaderHelper::decodeTexture(tinyxml2::XMLElement *textureXML)
return textureData;
}
ContourData *CCDataReaderHelper::decodeContour(tinyxml2::XMLElement *contourXML)
CCContourData *CCDataReaderHelper::decodeContour(tinyxml2::XMLElement *contourXML)
{
ContourData *contourData = ContourData::create();
CCContourData *contourData = CCContourData::create();
tinyxml2::XMLElement *vertexDataXML = contourXML->FirstChildElement(CONTOUR_VERTEX);
while (vertexDataXML) {
ContourVertex2 *vertex = new ContourVertex2(0, 0);
CCContourVertex2 *vertex = new CCContourVertex2(0, 0);
vertex->autorelease();
vertexDataXML->QueryFloatAttribute(A_X, &vertex->x);
@ -782,7 +782,7 @@ void CCDataReaderHelper::addDataFromJsonCache(const char *fileContent)
for (int i = 0; i<length; i++)
{
cs::CSJsonDictionary *armatureDic = json.getSubItemFromArray(ARMATURE_DATA, i);
ArmatureData *armatureData = decodeArmature(*armatureDic);
CCArmatureData *armatureData = decodeArmature(*armatureDic);
CCArmatureDataManager::sharedArmatureDataManager()->addArmatureData(armatureData->name.c_str(), armatureData);
delete armatureDic;
@ -793,7 +793,7 @@ void CCDataReaderHelper::addDataFromJsonCache(const char *fileContent)
for (int i = 0; i<length; i++)
{
cs::CSJsonDictionary *animationDic = json.getSubItemFromArray(ANIMATION_DATA, i);
AnimationData *animationData = decodeAnimation(*animationDic);
CCAnimationData *animationData = decodeAnimation(*animationDic);
CCArmatureDataManager::sharedArmatureDataManager()->addAnimationData(animationData->name.c_str(), animationData);
delete animationDic;
@ -804,16 +804,16 @@ void CCDataReaderHelper::addDataFromJsonCache(const char *fileContent)
for (int i = 0; i<length; i++)
{
cs::CSJsonDictionary *textureDic = json.getSubItemFromArray(TEXTURE_DATA, i);
TextureData *textureData = decodeTexture(*textureDic);
CCTextureData *textureData = decodeTexture(*textureDic);
CCArmatureDataManager::sharedArmatureDataManager()->addTextureData(textureData->name.c_str(), textureData);
delete textureDic;
}
}
ArmatureData *CCDataReaderHelper::decodeArmature(cs::CSJsonDictionary &json)
CCArmatureData *CCDataReaderHelper::decodeArmature(cs::CSJsonDictionary &json)
{
ArmatureData *armatureData = ArmatureData::create();
CCArmatureData *armatureData = CCArmatureData::create();
const char * name = json.getItemStringValue(A_NAME);
if(name != NULL)
@ -833,9 +833,9 @@ ArmatureData *CCDataReaderHelper::decodeArmature(cs::CSJsonDictionary &json)
return armatureData;
}
BoneData *CCDataReaderHelper::decodeBone(cs::CSJsonDictionary &json)
CCBoneData *CCDataReaderHelper::decodeBone(cs::CSJsonDictionary &json)
{
BoneData *boneData = BoneData::create();
CCBoneData *boneData = CCBoneData::create();
DecodeNode(boneData, json);
@ -864,63 +864,63 @@ BoneData *CCDataReaderHelper::decodeBone(cs::CSJsonDictionary &json)
return boneData;
}
DisplayData *CCDataReaderHelper::decodeBoneDisplay(cs::CSJsonDictionary &json)
CCDisplayData *CCDataReaderHelper::decodeBoneDisplay(cs::CSJsonDictionary &json)
{
DisplayType displayType = (DisplayType)json.getItemIntValue(A_DISPLAY_TYPE, CS_DISPLAY_SPRITE);
DisplayData *displayData = NULL;
CCDisplayData *displayData = NULL;
switch (displayType) {
case CS_DISPLAY_SPRITE:
{
displayData = SpriteDisplayData::create();
displayData = CCSpriteDisplayData::create();
const char *name = json.getItemStringValue(A_NAME);
if(name != NULL)
{
((SpriteDisplayData*)displayData)->displayName = name;
((CCSpriteDisplayData*)displayData)->displayName = name;
}
}
break;
case CS_DISPLAY_ARMATURE:
{
displayData = ArmatureDisplayData::create();
displayData = CCArmatureDisplayData::create();
const char *name = json.getItemStringValue(A_NAME);
if(name != NULL)
{
((ArmatureDisplayData*)displayData)->displayName = name;
((CCArmatureDisplayData*)displayData)->displayName = name;
}
}
break;
case CS_DISPLAY_PARTICLE:
{
displayData = ParticleDisplayData::create();
displayData = CCParticleDisplayData::create();
const char *plist = json.getItemStringValue(A_PLIST);
if(plist != NULL)
{
((ParticleDisplayData*)displayData)->plist = plist;
((CCParticleDisplayData*)displayData)->plist = plist;
}
}
break;
case CS_DISPLAY_SHADER:
{
displayData = ShaderDisplayData::create();
displayData = CCShaderDisplayData::create();
const char *vert = json.getItemStringValue(A_VERT);
if(vert != NULL)
{
((ShaderDisplayData*)displayData)->vert = vert;
((CCShaderDisplayData*)displayData)->vert = vert;
}
const char *frag = json.getItemStringValue(A_FRAG);
if(frag != NULL)
{
((ShaderDisplayData*)displayData)->frag = vert;
((CCShaderDisplayData*)displayData)->frag = vert;
}
}
break;
default:
displayData = SpriteDisplayData::create();
displayData = CCSpriteDisplayData::create();
break;
}
@ -929,9 +929,9 @@ DisplayData *CCDataReaderHelper::decodeBoneDisplay(cs::CSJsonDictionary &json)
return displayData;
}
AnimationData *CCDataReaderHelper::decodeAnimation(cs::CSJsonDictionary &json)
CCAnimationData *CCDataReaderHelper::decodeAnimation(cs::CSJsonDictionary &json)
{
AnimationData *aniData = AnimationData::create();
CCAnimationData *aniData = CCAnimationData::create();
const char * name = json.getItemStringValue(A_NAME);
if(name != NULL)
@ -952,9 +952,9 @@ AnimationData *CCDataReaderHelper::decodeAnimation(cs::CSJsonDictionary &json)
return aniData;
}
MovementData *CCDataReaderHelper::decodeMovement(cs::CSJsonDictionary &json)
CCMovementData *CCDataReaderHelper::decodeMovement(cs::CSJsonDictionary &json)
{
MovementData *movementData = MovementData::create();
CCMovementData *movementData = CCMovementData::create();
movementData->loop = json.getItemBoolvalue(A_LOOP, true);
movementData->durationTween = json.getItemIntValue(A_DURATION_TWEEN, 0);
@ -980,9 +980,9 @@ MovementData *CCDataReaderHelper::decodeMovement(cs::CSJsonDictionary &json)
return movementData;
}
MovementBoneData *CCDataReaderHelper::decodeMovementBone(cs::CSJsonDictionary &json)
CCMovementBoneData *CCDataReaderHelper::decodeMovementBone(cs::CSJsonDictionary &json)
{
MovementBoneData *movementBoneData = MovementBoneData::create();
CCMovementBoneData *movementBoneData = CCMovementBoneData::create();
movementBoneData->delay = json.getItemFloatValue(A_MOVEMENT_DELAY, 0);
movementBoneData->scale = json.getItemFloatValue(A_MOVEMENT_SCALE, 1);
@ -997,7 +997,7 @@ MovementBoneData *CCDataReaderHelper::decodeMovementBone(cs::CSJsonDictionary &j
for (int i = 0; i<length; i++)
{
cs::CSJsonDictionary *dic = json.getSubItemFromArray(FRAME_DATA, i);
FrameData *frameData = decodeFrame(*dic);
CCFrameData *frameData = decodeFrame(*dic);
movementBoneData->addFrameData(frameData);
//movementBoneData->duration += frameData->duration;
@ -1007,9 +1007,9 @@ MovementBoneData *CCDataReaderHelper::decodeMovementBone(cs::CSJsonDictionary &j
return movementBoneData;
}
FrameData *CCDataReaderHelper::decodeFrame(cs::CSJsonDictionary &json)
CCFrameData *CCDataReaderHelper::decodeFrame(cs::CSJsonDictionary &json)
{
FrameData *frameData = FrameData::create();
CCFrameData *frameData = CCFrameData::create();
DecodeNode(frameData, json);
@ -1026,9 +1026,9 @@ FrameData *CCDataReaderHelper::decodeFrame(cs::CSJsonDictionary &json)
return frameData;
}
TextureData *CCDataReaderHelper::decodeTexture(cs::CSJsonDictionary &json)
CCTextureData *CCDataReaderHelper::decodeTexture(cs::CSJsonDictionary &json)
{
TextureData *textureData = TextureData::create();
CCTextureData *textureData = CCTextureData::create();
const char *name = json.getItemStringValue(A_NAME);
if(name != NULL)
@ -1053,16 +1053,16 @@ TextureData *CCDataReaderHelper::decodeTexture(cs::CSJsonDictionary &json)
return textureData;
}
ContourData *CCDataReaderHelper::decodeContour(cs::CSJsonDictionary &json)
CCContourData *CCDataReaderHelper::decodeContour(cs::CSJsonDictionary &json)
{
ContourData *contourData = ContourData::create();
CCContourData *contourData = CCContourData::create();
int length = json.getArrayItemCount(VERTEX_POINT);
for (int i = length - 1; i>=0; i--)
{
cs::CSJsonDictionary *dic = json.getSubItemFromArray(VERTEX_POINT, i);
ContourVertex2 *vertex = new ContourVertex2(0, 0);
CCContourVertex2 *vertex = new CCContourVertex2(0, 0);
vertex->x = dic->getItemFloatValue(A_X, 0);
vertex->y = dic->getItemFloatValue(A_Y, 0);
@ -1076,7 +1076,7 @@ ContourData *CCDataReaderHelper::decodeContour(cs::CSJsonDictionary &json)
return contourData;
}
void CCDataReaderHelper::DecodeNode(Node *node, cs::CSJsonDictionary &json)
void CCDataReaderHelper::DecodeNode(CCBaseData *node, cs::CSJsonDictionary &json)
{
node->x = json.getItemFloatValue(A_X, 0) * s_PositionReadScale;
node->y = json.getItemFloatValue(A_Y, 0) * s_PositionReadScale;

View File

@ -82,29 +82,29 @@ public:
/**
* Decode CCArmature Datas from xml export from Dragon CCBone flash tool
*/
static ArmatureData *decodeArmature(tinyxml2::XMLElement *armatureXML);
static BoneData *decodeBone(tinyxml2::XMLElement *boneXML, tinyxml2::XMLElement *parentXML);
static DisplayData *decodeBoneDisplay(tinyxml2::XMLElement *displayXML);
static CCArmatureData *decodeArmature(tinyxml2::XMLElement *armatureXML);
static CCBoneData *decodeBone(tinyxml2::XMLElement *boneXML, tinyxml2::XMLElement *parentXML);
static CCDisplayData *decodeBoneDisplay(tinyxml2::XMLElement *displayXML);
/**
* Decode CCAnimation Datas from xml export from Dragon CCBone flash tool
*/
static AnimationData *decodeAnimation(tinyxml2::XMLElement *animationXML);
static MovementData *decodeMovement(tinyxml2::XMLElement *movementXML, ArmatureData *armatureData);
static MovementBoneData *decodeMovementBone(tinyxml2::XMLElement* movBoneXml, tinyxml2::XMLElement* parentXml, BoneData *boneData);
static FrameData *decodeFrame(tinyxml2::XMLElement* frameXML, tinyxml2::XMLElement* parentFrameXml, BoneData *boneData);
static CCAnimationData *decodeAnimation(tinyxml2::XMLElement *animationXML);
static CCMovementData *decodeMovement(tinyxml2::XMLElement *movementXML, CCArmatureData *armatureData);
static CCMovementBoneData *decodeMovementBone(tinyxml2::XMLElement* movBoneXml, tinyxml2::XMLElement* parentXml, CCBoneData *boneData);
static CCFrameData *decodeFrame(tinyxml2::XMLElement* frameXML, tinyxml2::XMLElement* parentFrameXml, CCBoneData *boneData);
/**
* Decode Texture Datas from xml export from Dragon CCBone flash tool
*/
static TextureData *decodeTexture(tinyxml2::XMLElement *textureXML);
static CCTextureData *decodeTexture(tinyxml2::XMLElement *textureXML);
/**
* Decode Contour Datas from xml export from Dragon CCBone flash tool
*/
static ContourData *decodeContour(tinyxml2::XMLElement *contourXML);
static CCContourData *decodeContour(tinyxml2::XMLElement *contourXML);
#pragma endregion
#pragma region Decode Data From JSON
@ -112,20 +112,20 @@ public:
static void addDataFromJson(const char *filePath);
static void addDataFromJsonCache(const char *fileContent);
static ArmatureData *decodeArmature(cs::CSJsonDictionary &json);
static BoneData *decodeBone(cs::CSJsonDictionary &json);
static DisplayData *decodeBoneDisplay(cs::CSJsonDictionary &json);
static CCArmatureData *decodeArmature(cs::CSJsonDictionary &json);
static CCBoneData *decodeBone(cs::CSJsonDictionary &json);
static CCDisplayData *decodeBoneDisplay(cs::CSJsonDictionary &json);
static AnimationData *decodeAnimation(cs::CSJsonDictionary &json);
static MovementData *decodeMovement(cs::CSJsonDictionary &json);
static MovementBoneData *decodeMovementBone(cs::CSJsonDictionary &json);
static FrameData *decodeFrame(cs::CSJsonDictionary &json);
static CCAnimationData *decodeAnimation(cs::CSJsonDictionary &json);
static CCMovementData *decodeMovement(cs::CSJsonDictionary &json);
static CCMovementBoneData *decodeMovementBone(cs::CSJsonDictionary &json);
static CCFrameData *decodeFrame(cs::CSJsonDictionary &json);
static TextureData *decodeTexture(cs::CSJsonDictionary &json);
static CCTextureData *decodeTexture(cs::CSJsonDictionary &json);
static ContourData *decodeContour(cs::CSJsonDictionary &json);
static CCContourData *decodeContour(cs::CSJsonDictionary &json);
static void DecodeNode(Node *node, cs::CSJsonDictionary &json);
static void DecodeNode(CCBaseData *node, cs::CSJsonDictionary &json);
//static std::string convertFlashToSP(const char *fileName);
#pragma endregion

View File

@ -33,13 +33,13 @@ CCAffineTransform CCTransformHelp::helpMatrix2;
CCPoint CCTransformHelp::helpPoint1;
CCPoint CCTransformHelp::helpPoint2;
Node helpParentNode;
CCBaseData helpParentNode;
CCTransformHelp::CCTransformHelp()
{
}
void CCTransformHelp::transformFromParent(Node &node, const Node &parentNode)
void CCTransformHelp::transformFromParent(CCBaseData &node, const CCBaseData &parentNode)
{
nodeToMatrix(node, helpMatrix1);
nodeToMatrix(parentNode, helpMatrix2);
@ -50,7 +50,7 @@ void CCTransformHelp::transformFromParent(Node &node, const Node &parentNode)
matrixToNode(helpMatrix1, node);
}
void CCTransformHelp::transformToParent(Node &node, const Node &parentNode)
void CCTransformHelp::transformToParent(CCBaseData &node, const CCBaseData &parentNode)
{
nodeToMatrix(node, helpMatrix1);
@ -61,7 +61,7 @@ void CCTransformHelp::transformToParent(Node &node, const Node &parentNode)
matrixToNode(helpMatrix1, node);
}
void CCTransformHelp::transformFromParentWithoutScale(Node &node, const Node &parentNode)
void CCTransformHelp::transformFromParentWithoutScale(CCBaseData &node, const CCBaseData &parentNode)
{
helpParentNode.copy(&parentNode);
@ -77,7 +77,7 @@ void CCTransformHelp::transformFromParentWithoutScale(Node &node, const Node &pa
matrixToNode(helpMatrix1, node);
}
void CCTransformHelp::transformToParentWithoutScale(Node &node, const Node &parentNode)
void CCTransformHelp::transformToParentWithoutScale(CCBaseData &node, const CCBaseData &parentNode)
{
helpParentNode.copy(&parentNode);
@ -92,7 +92,7 @@ void CCTransformHelp::transformToParentWithoutScale(Node &node, const Node &pare
matrixToNode(helpMatrix1, node);
}
void CCTransformHelp::nodeToMatrix(const Node &node, CCAffineTransform &matrix)
void CCTransformHelp::nodeToMatrix(const CCBaseData &node, CCAffineTransform &matrix)
{
matrix.a = node.scaleX * cos(node.skewY);
matrix.b = node.scaleX * sin(node.skewY);
@ -103,7 +103,7 @@ void CCTransformHelp::nodeToMatrix(const Node &node, CCAffineTransform &matrix)
matrix.ty = node.y;
}
void CCTransformHelp::matrixToNode(const CCAffineTransform &matrix, Node &node)
void CCTransformHelp::matrixToNode(const CCAffineTransform &matrix, CCBaseData &node)
{
/*
* In as3 language, there is a function called "deltaTransformPoint", it calculate a point used give Transform
@ -129,7 +129,7 @@ void CCTransformHelp::matrixToNode(const CCAffineTransform &matrix, Node &node)
node.y = matrix.ty;
}
void CCTransformHelp::nodeConcat(Node &target, Node &source)
void CCTransformHelp::nodeConcat(CCBaseData &target, CCBaseData &source)
{
target.x += source.x;
target.y += source.y;

View File

@ -38,16 +38,16 @@ class CCTransformHelp
public:
CCTransformHelp();
static void transformFromParent(Node &node, const Node &parentNode);
static void transformToParent(Node &node, const Node &parentNode);
static void transformFromParent(CCBaseData &node, const CCBaseData &parentNode);
static void transformToParent(CCBaseData &node, const CCBaseData &parentNode);
static void transformFromParentWithoutScale(Node &node, const Node &parentNode);
static void transformToParentWithoutScale(Node &node, const Node &parentNode);
static void transformFromParentWithoutScale(CCBaseData &node, const CCBaseData &parentNode);
static void transformToParentWithoutScale(CCBaseData &node, const CCBaseData &parentNode);
static void nodeToMatrix(const Node &_node, CCAffineTransform &_matrix);
static void matrixToNode(const CCAffineTransform &_matrix, Node &_node);
static void nodeToMatrix(const CCBaseData &_node, CCAffineTransform &_matrix);
static void matrixToNode(const CCAffineTransform &_matrix, CCBaseData &_node);
static void nodeConcat(Node &target, Node &source);
static void nodeConcat(CCBaseData &target, CCBaseData &source);
public:
static CCAffineTransform helpMatrix1;
static CCAffineTransform helpMatrix2;

View File

@ -33,7 +33,7 @@
NS_CC_EXT_BEGIN
/**
A Node that draws the components of a physics engine.
A CCBaseData that draws the components of a physics engine.
Supported physics engines:
- Chipmunk

View File

@ -24,8 +24,7 @@
</Filter>
<Filter Include="AssetsManager">
<UniqueIdentifier>{49487dbe-5758-436a-b014-8e2edc6b33ae}</UniqueIdentifier>
</Filter>
<<<<<<< HEAD
</Filter>
<Filter Include="CCArmature">
<UniqueIdentifier>{0f60f39f-9b10-4467-a225-185f3f415178}</UniqueIdentifier>
</Filter>
@ -51,17 +50,15 @@
<UniqueIdentifier>{fac95429-e767-428f-ad2e-61b02693c747}</UniqueIdentifier>
</Filter>
<Filter Include="CCArmature\external_tool\Json\lib_json">
<UniqueIdentifier>{d04cf376-7450-4b6a-a055-1db18f8d65de}</UniqueIdentifier>
=======
<Filter Include="spine">
<UniqueIdentifier>{d04cf376-7450-4b6a-a055-1db18f8d65de}</UniqueIdentifier>
</Filter> <Filter Include="spine">
<UniqueIdentifier>{ff4b5934-99d4-4ea7-9f50-a774192d9ca9}</UniqueIdentifier>
</Filter>
<Filter Include="network">
<UniqueIdentifier>{2a7741ff-87a5-41c8-8e51-d7a1cf0c8e4d}</UniqueIdentifier>
</Filter>
<Filter Include="Components">
<UniqueIdentifier>{e82b14bf-eb08-4a40-a9a2-cc92a154d9b9}</UniqueIdentifier>
>>>>>>> 150b91074a57ae0345c03541b533c46a017b0d13
<UniqueIdentifier>{e82b14bf-eb08-4a40-a9a2-cc92a154d9b9}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
@ -208,8 +205,7 @@
</ClCompile>
<ClCompile Include="..\AssetsManager\AssetsManager.cpp">
<Filter>AssetsManager</Filter>
</ClCompile>
<<<<<<< HEAD
</ClCompile>
<ClCompile Include="..\CCArmature\animation\CCAnimation.cpp">
<Filter>CCArmature\animation</Filter>
</ClCompile>
@ -287,7 +283,7 @@
</ClCompile>
<ClCompile Include="..\CCArmature\external_tool\Json\lib_json\json_writer.cpp">
<Filter>CCArmature\external_tool\Json\lib_json</Filter>
=======
</ClCompile>
<ClCompile Include="..\spine\Animation.cpp">
<Filter>spine</Filter>
</ClCompile>
@ -364,8 +360,7 @@
<Filter>Components</Filter>
</ClCompile>
<ClCompile Include="..\Components\CCInputDelegate.cpp">
<Filter>Components</Filter>
>>>>>>> 150b91074a57ae0345c03541b533c46a017b0d13
<Filter>Components</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
@ -538,8 +533,7 @@
</ClInclude>
<ClInclude Include="..\AssetsManager\AssetsManager.h">
<Filter>AssetsManager</Filter>
</ClInclude>
<<<<<<< HEAD
</ClInclude>
<ClInclude Include="..\CCArmature\animation\CCAnimation.h">
<Filter>CCArmature\animation</Filter>
</ClInclude>
@ -661,8 +655,7 @@
</None>
<None Include="..\CCArmature\external_tool\Json\lib_json\sconscript">
<Filter>CCArmature\external_tool\Json\lib_json</Filter>
</None>
=======
</None>
<ClInclude Include="..\spine\Animation.h">
<Filter>spine</Filter>
</ClInclude>
@ -743,7 +736,6 @@
</ClInclude>
<ClInclude Include="..\Components\CCInputDelegate.h">
<Filter>Components</Filter>
</ClInclude>
>>>>>>> 150b91074a57ae0345c03541b533c46a017b0d13
</ClInclude>
</ItemGroup>
</Project>

View File

@ -59,9 +59,7 @@ Classes/ExtensionsTest/NetworkTest/WebSocketTest.cpp \
Classes/ExtensionsTest/EditBoxTest/EditBoxTest.cpp \
Classes/ExtensionsTest/TableViewTest/TableViewTestScene.cpp \
Classes/ExtensionsTest/TableViewTest/CustomTableViewCell.cpp \
<<<<<<< HEAD
Classes/ExtensionsTest/ArmatureTest/ArmatureScene.cpp \
=======
\
Classes/ExtensionsTest/ComponentsTest/ComponentsTestScene.cpp \
Classes/ExtensionsTest/ComponentsTest/EnemyController.cpp \
@ -70,7 +68,6 @@ Classes/ExtensionsTest/ComponentsTest/PlayerController.cpp \
Classes/ExtensionsTest/ComponentsTest/ProjectileController.cpp \
Classes/ExtensionsTest/ComponentsTest/SceneController.cpp \
\
>>>>>>> 150b91074a57ae0345c03541b533c46a017b0d13
Classes/FontTest/FontTest.cpp \
Classes/IntervalTest/IntervalTest.cpp \
Classes/KeypadTest/KeypadTest.cpp \

View File

@ -448,7 +448,7 @@ void TestParticleDisplay::onEnter()
armature->setScale(0.6f);
addChild(armature);
ParticleDisplayData displayData;
CCParticleDisplayData displayData;
displayData.setParam("Particles/SmallSun.plist");
cocos2d::extension::CCBone *bone = cocos2d::extension::CCBone::create("p1");
@ -505,7 +505,7 @@ void TestUseMutiplePicture::onEnter()
char* weapon[] = {"weapon_f-sword.png", "weapon_f-sword2.png", "weapon_f-sword3.png", "weapon_f-sword4.png", "weapon_f-sword5.png", "weapon_f-knife.png", "weapon_f-hammer.png"};
SpriteDisplayData displayData;
CCSpriteDisplayData displayData;
for (int i = 0; i < 7; i++)
{
displayData.setParam(weapon[i]);

View File

@ -7,15 +7,12 @@
#include "NetworkTest/HttpClientTest.h"
#endif
#include "TableViewTest/TableViewTestScene.h"
<<<<<<< HEAD
#include "ArmatureTest/ArmatureScene.h"
=======
#include "ComponentsTest/ComponentsTestScene.h"
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) || (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
#include "NetworkTest/WebSocketTest.h"
#endif
>>>>>>> 150b91074a57ae0345c03541b533c46a017b0d13
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) || (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN)
#include "EditBoxTest/EditBoxTest.h"
@ -40,11 +37,8 @@ enum
TEST_EDITBOX,
#endif
TEST_TABLEVIEW,
<<<<<<< HEAD
TEST_COMPONENTS,
TEST_ARMATURE,
=======
TEST_COMPONENTS,
>>>>>>> 150b91074a57ae0345c03541b533c46a017b0d13
TEST_MAX_COUNT,
};
@ -63,11 +57,8 @@ static const std::string testsName[TEST_MAX_COUNT] =
"EditBoxTest",
#endif
"TableViewTest",
<<<<<<< HEAD
"ComponentsTest",
"ArmatureTest"
=======
"ComponentsTest"
>>>>>>> 150b91074a57ae0345c03541b533c46a017b0d13
};
////////////////////////////////////////////////////////
@ -156,7 +147,10 @@ void ExtensionsMainLayer::menuCallback(CCObject* pSender)
runTableViewTest();
}
break;
<<<<<<< HEAD
case TEST_COMPONENTS:
{
runComponentsTestLayerTest();
}
case TEST_ARMATURE:
{
ArmatureTestScene *pScene = new ArmatureTestScene();
@ -167,12 +161,6 @@ void ExtensionsMainLayer::menuCallback(CCObject* pSender)
}
}
break;
=======
case TEST_COMPONENTS:
{
runComponentsTestLayerTest();
}
>>>>>>> 150b91074a57ae0345c03541b533c46a017b0d13
default:
break;
}

View File

@ -133,6 +133,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\..\..\external\libwebsockets\win32\lib\*.*" "$(O
<ClCompile Include="..\Classes\ClippingNodeTest\ClippingNodeTest.cpp" />
<ClCompile Include="..\Classes\ConfigurationTest\ConfigurationTest.cpp" />
<ClCompile Include="..\Classes\DataVisitorTest\DataVisitorTest.cpp" />
<ClCompile Include="..\Classes\ExtensionsTest\ArmatureTest\ArmatureScene.cpp" />
<ClCompile Include="..\Classes\ExtensionsTest\CocosBuilderTest\AnimationsTest\AnimationsTestLayer.cpp" />
<ClCompile Include="..\Classes\ExtensionsTest\CocosBuilderTest\TimelineCallbackTest\TimelineCallbackTestLayer.cpp" />
<ClCompile Include="..\Classes\ExtensionsTest\ComponentsTest\ComponentsTestScene.cpp" />
@ -236,6 +237,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\..\..\external\libwebsockets\win32\lib\*.*" "$(O
<ClInclude Include="..\Classes\ClippingNodeTest\ClippingNodeTest.h" />
<ClInclude Include="..\Classes\ConfigurationTest\ConfigurationTest.h" />
<ClInclude Include="..\Classes\DataVisitorTest\DataVisitorTest.h" />
<ClInclude Include="..\Classes\ExtensionsTest\ArmatureTest\ArmatureScene.h" />
<ClInclude Include="..\Classes\ExtensionsTest\CocosBuilderTest\AnimationsTest\AnimationsLayerLoader.h" />
<ClInclude Include="..\Classes\ExtensionsTest\CocosBuilderTest\AnimationsTest\AnimationsTestLayer.h" />
<ClInclude Include="..\Classes\ExtensionsTest\CocosBuilderTest\TimelineCallbackTest\TimelineCallbackLayerLoader.h" />

View File

@ -229,6 +229,9 @@
<Filter Include="Classes\ExtensionsTest\ComponentsTest">
<UniqueIdentifier>{90142ee3-1b3c-4bc6-a353-986231a58a17}</UniqueIdentifier>
</Filter>
<Filter Include="Classes\ExtensionsTest\ArmatureTest">
<UniqueIdentifier>{710d484c-0bf8-4024-a1e7-43258671b4cd}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="main.cpp">
@ -534,6 +537,9 @@
<ClCompile Include="..\Classes\ExtensionsTest\ComponentsTest\SceneController.cpp">
<Filter>Classes\ExtensionsTest\ComponentsTest</Filter>
</ClCompile>
<ClCompile Include="..\Classes\ExtensionsTest\ArmatureTest\ArmatureScene.cpp">
<Filter>Classes\ExtensionsTest\ArmatureTest</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="main.h">
@ -1019,5 +1025,8 @@
<ClInclude Include="..\Classes\ExtensionsTest\ComponentsTest\SceneController.h">
<Filter>Classes\ExtensionsTest\ComponentsTest</Filter>
</ClInclude>
<ClInclude Include="..\Classes\ExtensionsTest\ArmatureTest\ArmatureScene.h">
<Filter>Classes\ExtensionsTest\ArmatureTest</Filter>
</ClInclude>
</ItemGroup>
</Project>