diff --git a/extensions/Android.mk b/extensions/Android.mk index e45aaa2630..86da0a3fee 100644 --- a/extensions/Android.mk +++ b/extensions/Android.mk @@ -55,7 +55,7 @@ physics_nodes/CCPhysicsSprite.cpp \ LocalStorage/LocalStorageAndroid.cpp \ CCArmature/CCArmature.cpp \ CCArmature/CCBone.cpp \ -CCArmature/animation/CCAnimation.cpp \ +CCArmature/animation/CCArmatureAnimation.cpp \ CCArmature/animation/CCProcessBase.cpp \ CCArmature/animation/CCTween.cpp \ CCArmature/datas/CCDatas.cpp \ diff --git a/extensions/CCArmature/CCArmature.cpp b/extensions/CCArmature/CCArmature.cpp index 843f754c3c..bae5cf61a7 100644 --- a/extensions/CCArmature/CCArmature.cpp +++ b/extensions/CCArmature/CCArmature.cpp @@ -112,7 +112,7 @@ bool CCArmature::init(const char *name) removeAllChildren(); CC_SAFE_DELETE(m_pAnimation); - m_pAnimation = new CCAnimation(); + m_pAnimation = new CCArmatureAnimation(); m_pAnimation->init(this); CC_SAFE_DELETE(m_pBoneDic); diff --git a/extensions/CCArmature/CCArmature.h b/extensions/CCArmature/CCArmature.h index 9187465c35..1d661a21fb 100644 --- a/extensions/CCArmature/CCArmature.h +++ b/extensions/CCArmature/CCArmature.h @@ -28,7 +28,7 @@ THE SOFTWARE. #include "utils/CCArmatureDefine.h" #include "CCBone.h" #include "display/CCBatchNode.h" -#include "animation/CCAnimation.h" +#include "animation/CCArmatureAnimation.h" NS_CC_EXT_BEGIN @@ -131,7 +131,7 @@ protected: CCBone *createBone(const char *boneName ); - CC_SYNTHESIZE_RETAIN(CCAnimation *, m_pAnimation, Animation); + CC_SYNTHESIZE_RETAIN(CCArmatureAnimation *, m_pAnimation, Animation); CC_SYNTHESIZE(CCArmatureData *, m_pArmatureData, CCArmatureData); diff --git a/extensions/CCArmature/animation/CCAnimation.cpp b/extensions/CCArmature/animation/CCArmatureAnimation.cpp similarity index 87% rename from extensions/CCArmature/animation/CCAnimation.cpp rename to extensions/CCArmature/animation/CCArmatureAnimation.cpp index ef4792ad89..5f04151da1 100644 --- a/extensions/CCArmature/animation/CCAnimation.cpp +++ b/extensions/CCArmature/animation/CCArmatureAnimation.cpp @@ -22,7 +22,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "CCAnimation.h" +#include "CCArmatureAnimation.h" #include "../CCArmature.h" #include "../CCBone.h" #include "../utils/CCArmatureDefine.h" @@ -33,20 +33,20 @@ THE SOFTWARE. NS_CC_EXT_BEGIN -CCAnimation *CCAnimation::create(CCArmature *armature) +CCArmatureAnimation *CCArmatureAnimation::create(CCArmature *armature) { - CCAnimation *pARmatureAnimation = new CCAnimation(); - if (pARmatureAnimation && pARmatureAnimation->init(armature)) + CCArmatureAnimation *pArmatureAnimation = new CCArmatureAnimation(); + if (pArmatureAnimation && pArmatureAnimation->init(armature)) { - pARmatureAnimation->autorelease(); - return pARmatureAnimation; + pArmatureAnimation->autorelease(); + return pArmatureAnimation; } - CC_SAFE_DELETE(pARmatureAnimation); + CC_SAFE_DELETE(pArmatureAnimation); return NULL; } -CCAnimation::CCAnimation() +CCArmatureAnimation::CCArmatureAnimation() : m_pAnimationData(NULL) , m_pArmature(NULL) , m_strMovementID("") @@ -55,13 +55,13 @@ CCAnimation::CCAnimation() } -CCAnimation::~CCAnimation(void) +CCArmatureAnimation::~CCArmatureAnimation(void) { CC_SAFE_RELEASE_NULL(m_pTweenList); CC_SAFE_RELEASE_NULL(m_pAnimationData); } -bool CCAnimation::init(CCArmature *armature) +bool CCArmatureAnimation::init(CCArmature *armature) { bool bRet = false; do @@ -79,7 +79,7 @@ bool CCAnimation::init(CCArmature *armature) } -void CCAnimation:: pause() +void CCArmatureAnimation:: pause() { CCObject *object = NULL; CCARRAY_FOREACH(m_pTweenList, object) @@ -89,7 +89,7 @@ void CCAnimation:: pause() CCProcessBase::pause(); } -void CCAnimation::resume() +void CCArmatureAnimation::resume() { CCObject *object = NULL; CCARRAY_FOREACH(m_pTweenList, object) @@ -99,7 +99,7 @@ void CCAnimation::resume() CCProcessBase::resume(); } -void CCAnimation::stop() +void CCArmatureAnimation::stop() { CCObject *object = NULL; CCARRAY_FOREACH(m_pTweenList, object) @@ -110,7 +110,7 @@ void CCAnimation::stop() CCProcessBase::stop(); } -void CCAnimation::setAnimationScale(float animationScale ) +void CCArmatureAnimation::setAnimationScale(float animationScale ) { if(animationScale == m_fAnimationScale) { @@ -133,7 +133,7 @@ void CCAnimation::setAnimationScale(float animationScale ) } -void CCAnimation::play(const char *animationName, int durationTo, int durationTween, int loop, int tweenEasing) +void CCArmatureAnimation::play(const char *animationName, int durationTo, int durationTween, int loop, int tweenEasing) { CCAssert(m_pAnimationData, "m_pAnimationData can not be null"); @@ -215,7 +215,7 @@ void CCAnimation::play(const char *animationName, int durationTo, int durationTw } -void CCAnimation::playByIndex(int animationIndex, int durationTo, int durationTween, int loop, int tweenEasing) +void CCArmatureAnimation::playByIndex(int animationIndex, int durationTo, int durationTween, int loop, int tweenEasing) { std::vector &movName = m_pAnimationData->movementNames; CC_ASSERT((animationIndex > -1) && ((unsigned int)animationIndex < movName.size())); @@ -226,12 +226,12 @@ void CCAnimation::playByIndex(int animationIndex, int durationTo, int durationTw -int CCAnimation::getMovementCount() +int CCArmatureAnimation::getMovementCount() { return m_pAnimationData->getMovementCount(); } -void CCAnimation::update(float dt) +void CCArmatureAnimation::update(float dt) { CCProcessBase::update(dt); CCObject *object = NULL; @@ -241,7 +241,7 @@ void CCAnimation::update(float dt) } } -void CCAnimation::updateHandler() +void CCArmatureAnimation::updateHandler() { if (m_fCurrentPercent >= 1) { @@ -304,7 +304,7 @@ void CCAnimation::updateHandler() } -void CCAnimation::updateFrameData(float currentPercent) +void CCArmatureAnimation::updateFrameData(float currentPercent) { m_iPrevFrameIndex = m_iCurFrameIndex; m_iCurFrameIndex = m_iRawDuration * currentPercent; diff --git a/extensions/CCArmature/animation/CCAnimation.h b/extensions/CCArmature/animation/CCArmatureAnimation.h similarity index 94% rename from extensions/CCArmature/animation/CCAnimation.h rename to extensions/CCArmature/animation/CCArmatureAnimation.h index 6eff008177..75ae62950f 100644 --- a/extensions/CCArmature/animation/CCAnimation.h +++ b/extensions/CCArmature/animation/CCArmatureAnimation.h @@ -43,21 +43,21 @@ enum MovementEventType class CCArmature; class CCBone; -class CCAnimation : public CCProcessBase +class CCArmatureAnimation : public CCProcessBase { public: /** * Create with a CCArmature - * @param armature The CCArmature CCAnimation will bind to + * @param armature The CCArmature CCArmatureAnimation will bind to */ - static CCAnimation *create(CCArmature *armature); + static CCArmatureAnimation *create(CCArmature *armature); public: - CCAnimation(); - virtual ~CCAnimation(void); + CCArmatureAnimation(); + virtual ~CCArmatureAnimation(void); /** * Init with a CCArmature - * @param armature The CCArmature CCAnimation will bind to + * @param armature The CCArmature CCArmatureAnimation will bind to */ virtual bool init(CCArmature *armature); diff --git a/extensions/CCArmature/animation/CCTween.cpp b/extensions/CCArmature/animation/CCTween.cpp index ccd7f2f70c..6dde0248b9 100644 --- a/extensions/CCArmature/animation/CCTween.cpp +++ b/extensions/CCArmature/animation/CCTween.cpp @@ -24,7 +24,7 @@ THE SOFTWARE. #include "CCTween.h" -#include "CCAnimation.h" +#include "CCArmatureAnimation.h" #include "../CCBone.h" #include "../CCArmature.h" #include "../utils/CCUtilMath.h" diff --git a/extensions/CCArmature/animation/CCTween.h b/extensions/CCArmature/animation/CCTween.h index af64ee4e10..67315f941e 100644 --- a/extensions/CCArmature/animation/CCTween.h +++ b/extensions/CCArmature/animation/CCTween.h @@ -32,7 +32,7 @@ THE SOFTWARE. NS_CC_EXT_BEGIN class CCBone; -class CCAnimation; +class CCArmatureAnimation; class CCTween : public CCProcessBase { @@ -132,7 +132,7 @@ protected: 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 - CCAnimation *m_pAnimation; + CCArmatureAnimation *m_pAnimation; }; NS_CC_EXT_END diff --git a/extensions/CCArmature/utils/CCDataReaderHelper.h b/extensions/CCArmature/utils/CCDataReaderHelper.h index c4425df72c..a01622780c 100644 --- a/extensions/CCArmature/utils/CCDataReaderHelper.h +++ b/extensions/CCArmature/utils/CCDataReaderHelper.h @@ -87,7 +87,7 @@ public: /** - * Decode CCAnimation Datas from xml export from Dragon CCBone flash tool + * Decode CCArmatureAnimation Datas from xml export from Dragon CCBone flash tool */ static CCAnimationData *decodeAnimation(tinyxml2::XMLElement *animationXML); static CCMovementData *decodeMovement(tinyxml2::XMLElement *movementXML, CCArmatureData *armatureData); diff --git a/extensions/cocos-ext.h b/extensions/cocos-ext.h index 37b1e4cc4c..8d6171d9c9 100644 --- a/extensions/cocos-ext.h +++ b/extensions/cocos-ext.h @@ -43,7 +43,7 @@ #include "CCArmature/CCArmature.h" #include "CCArmature/CCBone.h" -#include "CCArmature/animation/CCAnimation.h" +#include "CCArmature/animation/CCArmatureAnimation.h" #include "CCArmature/datas/CCDatas.h" #include "CCArmature/display/CCBatchNode.h" #include "CCArmature/display/CCDecorativeDisplay.h" diff --git a/extensions/proj.emscripten/Makefile b/extensions/proj.emscripten/Makefile index 4a4bbb04a4..84038c3d84 100644 --- a/extensions/proj.emscripten/Makefile +++ b/extensions/proj.emscripten/Makefile @@ -66,7 +66,7 @@ SOURCES = ../CCBReader/CCBFileLoader.cpp \ ../Components/CCInputDelegate.cpp \ ../CCArmature/CCArmature.cpp \ ../CCArmature/CCBone.cpp \ -../CCArmature/animation/CCAnimation.cpp \ +../CCArmature/animation/CCArmatureAnimation.cpp \ ../CCArmature/animation/CCProcessBase.cpp \ ../CCArmature/animation/CCTween.cpp \ ../CCArmature/datas/CCDatas.cpp \ diff --git a/extensions/proj.linux/Makefile b/extensions/proj.linux/Makefile index 694af792a2..dcdee17470 100644 --- a/extensions/proj.linux/Makefile +++ b/extensions/proj.linux/Makefile @@ -85,7 +85,7 @@ SOURCES = ../CCBReader/CCBFileLoader.cpp \ ../Components/CCInputDelegate.cpp \ ../CCArmature/CCArmature.cpp \ ../CCArmature/CCBone.cpp \ -../CCArmature/animation/CCAnimation.cpp \ +../CCArmature/animation/CCArmatureAnimation.cpp \ ../CCArmature/animation/CCProcessBase.cpp \ ../CCArmature/animation/CCTween.cpp \ ../CCArmature/datas/CCDatas.cpp \ diff --git a/extensions/proj.nacl/Makefile b/extensions/proj.nacl/Makefile index 432895b436..bedfa1ccf3 100644 --- a/extensions/proj.nacl/Makefile +++ b/extensions/proj.nacl/Makefile @@ -69,7 +69,7 @@ EXTENSIONS_SOURCES = ../CCBReader/CCBFileLoader.cpp \ ../Components/CCInputDelegate.cpp \ ../CCArmature/CCArmature.cpp \ ../CCArmature/CCBone.cpp \ -../CCArmature/animation/CCAnimation.cpp \ +../CCArmature/animation/CCArmatureAnimation.cpp \ ../CCArmature/animation/CCProcessBase.cpp \ ../CCArmature/animation/CCTween.cpp \ ../CCArmature/datas/CCDatas.cpp \ diff --git a/extensions/proj.win32/libExtensions.vcxproj b/extensions/proj.win32/libExtensions.vcxproj index 7c996d06a3..611280aa6a 100644 --- a/extensions/proj.win32/libExtensions.vcxproj +++ b/extensions/proj.win32/libExtensions.vcxproj @@ -92,7 +92,7 @@ - + @@ -194,7 +194,7 @@ - + diff --git a/extensions/proj.win32/libExtensions.vcxproj.filters b/extensions/proj.win32/libExtensions.vcxproj.filters index 6b43e709df..14544b6d15 100644 --- a/extensions/proj.win32/libExtensions.vcxproj.filters +++ b/extensions/proj.win32/libExtensions.vcxproj.filters @@ -24,7 +24,7 @@ {49487dbe-5758-436a-b014-8e2edc6b33ae} - + {0f60f39f-9b10-4467-a225-185f3f415178} @@ -50,15 +50,16 @@ {fac95429-e767-428f-ad2e-61b02693c747} - {d04cf376-7450-4b6a-a055-1db18f8d65de} - + {d04cf376-7450-4b6a-a055-1db18f8d65de} + + {ff4b5934-99d4-4ea7-9f50-a774192d9ca9} {2a7741ff-87a5-41c8-8e51-d7a1cf0c8e4d} - {e82b14bf-eb08-4a40-a9a2-cc92a154d9b9} + {e82b14bf-eb08-4a40-a9a2-cc92a154d9b9} @@ -205,9 +206,6 @@ AssetsManager - - - CCArmature\animation CCArmature\animation @@ -283,7 +281,7 @@ CCArmature\external_tool\Json\lib_json - + spine @@ -360,7 +358,10 @@ Components - Components + Components + + + CCArmature\animation @@ -533,9 +534,6 @@ AssetsManager - - - CCArmature\animation CCArmature\animation @@ -642,6 +640,9 @@ CCArmature\external_tool\Json\lib_json + + CCArmature\animation + @@ -655,7 +656,7 @@ CCArmature\external_tool\Json\lib_json - + spine @@ -736,6 +737,6 @@ Components - + \ No newline at end of file