From 8bb8416c26c0b2080f1000492c77a195497b6f46 Mon Sep 17 00:00:00 2001 From: Ricardo Quesada Date: Tue, 29 Apr 2014 17:37:36 -0700 Subject: [PATCH] Improved directory structure --- CMakeLists.txt | 5 +- .../project.pbxproj.REMOVED.git-id | 2 +- cocos/2d/Android.mk | 106 +++++++-------- cocos/2d/CCAction.cpp | 2 +- cocos/2d/CCAction.h | 2 +- cocos/2d/CCActionCatmullRom.cpp | 2 +- cocos/2d/CCActionCatmullRom.h | 2 +- cocos/2d/CCActionGrid.cpp | 2 +- cocos/2d/CCActionGrid3D.cpp | 2 +- cocos/2d/CCActionManager.cpp | 4 +- cocos/2d/CCActionTiledGrid.cpp | 4 +- cocos/2d/CCAnimation.cpp | 4 +- cocos/2d/CCAnimation.h | 2 +- cocos/2d/CCAnimationCache.cpp | 2 +- cocos/2d/CCAtlasNode.cpp | 6 +- cocos/2d/CCAtlasNode.h | 4 +- cocos/2d/CCClippingNode.cpp | 8 +- cocos/2d/CCClippingNode.h | 4 +- cocos/2d/CCComponentContainer.cpp | 2 +- cocos/2d/CCDrawNode.cpp | 12 +- cocos/2d/CCDrawNode.h | 4 +- cocos/2d/CCDrawingPrimitives.cpp | 8 +- cocos/2d/CCDrawingPrimitives.h | 4 +- cocos/2d/CCFontAtlas.cpp | 8 +- cocos/2d/CCFontAtlasCache.cpp | 2 +- cocos/2d/CCFontCharMap.cpp | 2 +- cocos/2d/CCFontFNT.cpp | 2 +- cocos/2d/CCGLProgram.cpp | 4 +- cocos/2d/CCGLProgram.h | 2 +- cocos/2d/CCGrabber.cpp | 2 +- cocos/2d/CCGrabber.h | 2 +- cocos/2d/CCGrid.cpp | 6 +- cocos/2d/CCGrid.h | 4 +- cocos/2d/CCIMEDelegate.h | 2 +- cocos/2d/CCLabel.cpp | 12 +- cocos/2d/CCLabel.h | 4 +- cocos/2d/CCLabelAtlas.cpp | 8 +- cocos/2d/CCLabelAtlas.h | 2 +- cocos/2d/CCLabelBMFont.cpp | 4 +- cocos/2d/CCLabelBMFont.h | 2 +- cocos/2d/CCLabelTextFormatter.cpp | 2 +- cocos/2d/CCLayer.cpp | 20 +-- cocos/2d/CCLayer.h | 6 +- cocos/2d/CCMenu.cpp | 6 +- cocos/2d/CCMenu.h | 2 +- cocos/2d/CCMotionStreak.cpp | 8 +- cocos/2d/CCMotionStreak.h | 4 +- cocos/2d/CCNode.cpp | 14 +- cocos/2d/CCNode.h | 6 +- cocos/2d/CCNodeGrid.cpp | 6 +- cocos/2d/CCNodeGrid.h | 4 +- cocos/2d/CCParticleBatchNode.cpp | 12 +- cocos/2d/CCParticleBatchNode.h | 2 +- cocos/2d/CCParticleExamples.cpp | 2 +- cocos/2d/CCParticleSystem.cpp | 8 +- cocos/2d/CCParticleSystemQuad.cpp | 14 +- cocos/2d/CCParticleSystemQuad.h | 2 +- cocos/2d/CCProgressTimer.cpp | 8 +- cocos/2d/CCProgressTimer.h | 2 +- cocos/2d/CCProtocols.h | 2 +- cocos/2d/CCRenderTexture.cpp | 14 +- cocos/2d/CCRenderTexture.h | 4 +- cocos/2d/CCScene.cpp | 2 +- cocos/2d/CCScriptSupport.cpp | 2 +- cocos/2d/CCScriptSupport.h | 8 +- cocos/2d/CCShaderCache.cpp | 2 +- cocos/2d/CCSprite.cpp | 37 ++--- cocos/2d/CCSprite.h | 6 +- cocos/2d/CCSpriteBatchNode.cpp | 8 +- cocos/2d/CCSpriteBatchNode.h | 4 +- cocos/2d/CCSpriteFrame.cpp | 2 +- cocos/2d/CCSpriteFrame.h | 2 +- cocos/2d/CCSpriteFrameCache.cpp | 4 +- cocos/2d/CCTMXLayer.cpp | 2 +- cocos/2d/CCTMXObjectGroup.cpp | 2 +- cocos/2d/CCTMXObjectGroup.h | 2 +- cocos/2d/CCTMXXMLParser.cpp | 8 +- cocos/2d/CCTMXXMLParser.h | 2 +- cocos/2d/CCTextFieldTTF.cpp | 2 +- cocos/2d/CCTexture2D.cpp | 10 +- cocos/2d/CCTexture2D.h | 6 +- cocos/2d/CCTextureAtlas.cpp | 12 +- cocos/2d/CCTextureAtlas.h | 4 +- cocos/2d/CCTextureCache.cpp | 6 +- cocos/2d/CCTileMapAtlas.cpp | 4 +- cocos/2d/CCTransition.cpp | 2 +- cocos/2d/CCTransition.h | 2 +- cocos/2d/CCTransitionPageTurn.cpp | 4 +- cocos/2d/CCTransitionPageTurn.h | 2 +- cocos/2d/CCTransitionProgress.cpp | 2 +- cocos/2d/CCTweenFunction.h | 2 +- cocos/2d/CCUserDefault.cpp | 2 +- cocos/2d/CCUserDefaultAndroid.cpp | 2 +- cocos/2d/CCVertex.cpp | 2 +- cocos/2d/CCVertex.h | 2 +- cocos/2d/CMakeLists.txt | 102 ++++++-------- cocos/2d/ccCArray.cpp | 2 +- cocos/2d/ccCArray.h | 2 +- cocos/2d/ccFPSImages.h | 5 + cocos/2d/ccGLStateCache.cpp | 4 +- cocos/2d/platform/CCDevice.h | 2 +- cocos/2d/platform/CCFileUtils.cpp | 4 +- cocos/2d/platform/CCFileUtils.h | 2 +- cocos/2d/platform/CCGLViewProtocol.cpp | 6 +- cocos/2d/platform/CCGLViewProtocol.h | 4 +- cocos/2d/platform/CCImage.cpp | 4 +- cocos/2d/platform/CCThread.h | 2 +- cocos/2d/platform/android/CCApplication.cpp | 2 +- cocos/2d/platform/android/CCDevice.cpp | 2 +- .../2d/platform/android/CCFileUtilsAndroid.h | 2 +- cocos/2d/platform/android/CCGLView.cpp | 4 +- cocos/2d/platform/android/CCGLView.h | 2 +- cocos/2d/platform/android/java/.classpath | 2 +- .../platform/android/java/project.properties | 2 +- cocos/2d/platform/apple/CCFileUtilsApple.h | 2 +- cocos/2d/platform/apple/CCFileUtilsApple.mm | 2 +- cocos/2d/platform/desktop/CCGLView.cpp | 10 +- cocos/2d/platform/ios/CCCommon.mm | 2 +- cocos/2d/platform/ios/CCDevice.mm | 8 +- cocos/2d/platform/ios/CCGLView.mm | 2 +- cocos/2d/platform/linux/CCApplication.cpp | 2 +- cocos/2d/platform/linux/CCFileUtilsLinux.cpp | 2 +- cocos/2d/platform/linux/CCFileUtilsLinux.h | 2 +- cocos/2d/platform/mac/CCApplication.mm | 4 +- cocos/2d/platform/mac/CCCommon.mm | 2 +- cocos/2d/platform/mac/CCDevice.mm | 2 +- cocos/2d/platform/win32/CCApplication.cpp | 2 +- cocos/2d/platform/win32/CCFileUtilsWin32.h | 2 +- cocos/2d/renderer/CCMaterialManager.cpp | 107 --------------- cocos/2d/renderer/CCMaterialManager.h | 68 ---------- cocos/2d/renderer/CCRenderMaterial.cpp | 26 ---- cocos/2d/renderer/CCRenderMaterial.h | 36 ----- cocos/base/CCAutoreleasePool.cpp | 2 +- cocos/{2d => base}/CCConfiguration.cpp | 4 +- cocos/{2d => base}/CCConfiguration.h | 0 cocos/base/CCConsole.cpp | 6 +- cocos/base/CCConsole.h | 2 +- cocos/base/CCData.cpp | 2 +- cocos/{2d => base}/CCDirector.cpp | 16 +-- cocos/{2d => base}/CCDirector.h | 6 +- cocos/{2d => base}/CCEvent.cpp | 2 +- cocos/{2d => base}/CCEvent.h | 0 cocos/{2d => base}/CCEventAcceleration.cpp | 2 +- cocos/{2d => base}/CCEventAcceleration.h | 4 +- cocos/{2d => base}/CCEventCustom.cpp | 4 +- cocos/{2d => base}/CCEventCustom.h | 2 +- cocos/{2d => base}/CCEventDispatcher.cpp | 22 +-- cocos/{2d => base}/CCEventDispatcher.h | 4 +- cocos/{2d => base}/CCEventKeyboard.cpp | 2 +- cocos/{2d => base}/CCEventKeyboard.h | 2 +- cocos/{2d => base}/CCEventListener.cpp | 2 +- cocos/{2d => base}/CCEventListener.h | 0 .../CCEventListenerAcceleration.cpp | 4 +- .../CCEventListenerAcceleration.h | 4 +- cocos/{2d => base}/CCEventListenerCustom.cpp | 4 +- cocos/{2d => base}/CCEventListenerCustom.h | 2 +- .../{2d => base}/CCEventListenerKeyboard.cpp | 6 +- cocos/{2d => base}/CCEventListenerKeyboard.h | 4 +- cocos/{2d => base}/CCEventListenerMouse.cpp | 2 +- cocos/{2d => base}/CCEventListenerMouse.h | 4 +- cocos/{2d => base}/CCEventListenerTouch.cpp | 6 +- cocos/{2d => base}/CCEventListenerTouch.h | 4 +- cocos/{2d => base}/CCEventMouse.cpp | 2 +- cocos/{2d => base}/CCEventMouse.h | 2 +- cocos/{2d => base}/CCEventTouch.cpp | 2 +- cocos/{2d => base}/CCEventTouch.h | 4 +- cocos/{2d => base}/CCEventType.h | 0 cocos/base/CCMap.h | 2 +- cocos/base/CCNS.h | 2 +- cocos/base/CCPlatformMacros.h | 2 +- cocos/{2d => base}/CCProfiling.cpp | 0 cocos/{2d => base}/CCProfiling.h | 2 +- cocos/base/CCRef.cpp | 2 +- cocos/base/CCRef.h | 2 +- cocos/base/CCRefPtr.h | 1 + cocos/{2d => base}/CCScheduler.cpp | 6 +- cocos/{2d => base}/CCScheduler.h | 0 cocos/{2d => base}/CCTouch.cpp | 4 +- cocos/{2d => base}/CCTouch.h | 2 +- cocos/base/CCValue.h | 2 +- cocos/base/CCVector.h | 2 +- cocos/base/CMakeLists.txt | 41 +++++- cocos/{2d => base}/ZipUtils.cpp | 4 +- cocos/{2d => base}/ZipUtils.h | 0 cocos/{2d => base}/base64.cpp | 2 +- cocos/{2d => base}/base64.h | 0 cocos/{2d => base}/ccConfig.h | 0 cocos/{2d => base}/ccMacros.h | 2 +- cocos/{2d => base}/ccTypes.cpp | 2 +- cocos/{2d => base}/ccTypes.h | 4 +- cocos/cocos2d.h | 128 ++++++++---------- cocos/deprecated/CCArray.h | 2 +- cocos/deprecated/CCDeprecated.h | 4 +- cocos/deprecated/CCNotificationCenter.h | 2 +- cocos/deprecated/CCString.cpp | 2 +- .../editor-support/cocosbuilder/CCBReader.cpp | 2 +- .../editor-support/cocostudio/CCActionFrame.h | 2 +- .../cocostudio/CCActionObject.cpp | 4 +- .../editor-support/cocostudio/CCArmature.cpp | 6 +- .../editor-support/cocostudio/CCBatchNode.cpp | 6 +- .../cocostudio/CCDataReaderHelper.cpp | 4 +- cocos/editor-support/cocostudio/CCDatas.h | 4 +- .../cocostudio/CCInputDelegate.cpp | 8 +- .../cocostudio/CCInputDelegate.h | 10 +- cocos/editor-support/cocostudio/CCSkin.cpp | 4 +- cocos/editor-support/cocostudio/CCSkin.h | 2 +- cocos/editor-support/spine/CCSkeleton.h | 2 +- cocos/{base => math}/CCAffineTransform.cpp | 4 +- cocos/{base => math}/CCAffineTransform.h | 9 +- cocos/{base => math}/CCGeometry.cpp | 5 +- cocos/{base => math}/CCGeometry.h | 8 +- cocos/math/CCMathBase.h | 2 +- cocos/math/CMakeLists.txt | 5 + cocos/math/MathUtil.cpp | 2 +- cocos/math/Matrix.cpp | 2 +- cocos/math/Quaternion.cpp | 2 +- cocos/{2d => math}/TransformUtils.cpp | 2 +- cocos/{2d => math}/TransformUtils.h | 0 cocos/math/Vector2.cpp | 2 +- cocos/math/Vector2.h | 2 +- cocos/math/Vector3.cpp | 2 +- cocos/math/Vector4.cpp | 2 +- cocos/network/HttpClient.cpp | 4 +- cocos/network/HttpRequest.h | 2 +- cocos/network/SocketIO.cpp | 4 +- cocos/network/WebSocket.cpp | 4 +- cocos/physics/CCPhysicsBody.cpp | 2 +- cocos/physics/CCPhysicsBody.h | 4 +- cocos/physics/CCPhysicsContact.cpp | 2 +- cocos/physics/CCPhysicsContact.h | 10 +- cocos/physics/CCPhysicsJoint.h | 4 +- cocos/physics/CCPhysicsShape.h | 4 +- cocos/physics/CCPhysicsWorld.cpp | 6 +- cocos/physics/CCPhysicsWorld.h | 4 +- .../chipmunk/CCPhysicsBodyInfo_chipmunk.h | 2 +- .../chipmunk/CCPhysicsContactInfo_chipmunk.h | 2 +- .../chipmunk/CCPhysicsHelper_chipmunk.h | 4 +- .../chipmunk/CCPhysicsJointInfo_chipmunk.h | 2 +- .../chipmunk/CCPhysicsShapeInfo_chipmunk.h | 2 +- .../chipmunk/CCPhysicsWorldInfo_chipmunk.h | 4 +- cocos/{2d => }/renderer/CCBatchCommand.cpp | 2 +- cocos/{2d => }/renderer/CCBatchCommand.h | 0 cocos/{2d => }/renderer/CCCustomCommand.cpp | 2 +- cocos/{2d => }/renderer/CCCustomCommand.h | 0 cocos/{2d => }/renderer/CCGroupCommand.cpp | 6 +- cocos/{2d => }/renderer/CCGroupCommand.h | 0 cocos/{2d => }/renderer/CCQuadCommand.cpp | 2 +- cocos/{2d => }/renderer/CCQuadCommand.h | 0 cocos/{2d => }/renderer/CCRenderCommand.cpp | 0 cocos/{2d => }/renderer/CCRenderCommand.h | 2 +- cocos/{2d => }/renderer/CCRenderCommandPool.h | 0 cocos/{2d => }/renderer/CCRenderer.cpp | 18 +-- cocos/{2d => }/renderer/CCRenderer.h | 0 cocos/renderer/CMakeLists.txt | 19 +++ .../lua-bindings/manual/CCLuaValue.h | 2 +- .../scripting/lua-bindings/manual/LuaOpengl.h | 2 +- .../lua-bindings/manual/LuaScriptHandlerMgr.h | 2 +- cocos/ui/CCProtectedNode.cpp | 2 +- cocos/ui/UILayout.cpp | 8 +- .../GUI/CCControlExtension/CCControl.cpp | 8 +- .../CCControlExtension/CCControlSlider.cpp | 4 +- extensions/GUI/CCEditBox/CCEditBoxImplMac.mm | 2 +- extensions/GUI/CCScrollView/CCScrollView.cpp | 4 +- extensions/GUI/CCScrollView/CCScrollView.h | 2 +- .../physics-nodes/CCPhysicsDebugNode.cpp | 4 +- templates/cocos2dx_files.json.REMOVED.git-id | 2 +- tests/cpp-empty-test/proj.android/.classpath | 2 +- .../proj.android/project.properties | 2 +- .../Classes/ActionsTest/ActionsTest.cpp | 6 +- .../cpp-tests/Classes/Box2DTest/Box2dTest.cpp | 4 +- .../Classes/Box2DTestBed/Box2dView.cpp | 2 +- .../Classes/Box2DTestBed/Box2dView.h | 2 +- .../ClippingNodeTest/ClippingNodeTest.cpp | 2 +- .../ClippingNodeTest/ClippingNodeTest.h | 2 +- .../DrawPrimitivesTest/DrawPrimitivesTest.cpp | 4 +- .../cpp-tests/Classes/LabelTest/LabelTest.cpp | 4 +- .../Classes/LabelTest/LabelTestNew.cpp | 2 +- .../Classes/LabelTest/LabelTestNew.h | 2 +- .../PerformanceCallbackTest.cpp | 4 +- .../Classes/PhysicsTest/PhysicsTest.cpp | 28 ++-- .../RenderTextureTest/RenderTextureTest.h | 1 - .../Classes/ShaderTest/ShaderTest.cpp | 2 - .../Classes/ShaderTest/ShaderTest2.cpp | 8 +- .../Classes/Texture2dTest/Texture2dTest.cpp | 1 - .../Classes/Texture2dTest/Texture2dTest.h | 1 - .../Classes/TileMapTest/TileMapTest.cpp | 2 - .../Classes/TileMapTest/TileMapTest.h | 1 - tests/cpp-tests/proj.android/.classpath | 2 +- .../cpp-tests/proj.android/project.properties | 2 +- .../project/proj.android/.classpath | 4 +- .../project/proj.android/project.properties | 2 +- .../lua-tests/project/proj.android/.classpath | 4 +- .../project/proj.android/project.properties | 2 +- 293 files changed, 750 insertions(+), 970 deletions(-) delete mode 100644 cocos/2d/renderer/CCMaterialManager.cpp delete mode 100644 cocos/2d/renderer/CCMaterialManager.h delete mode 100644 cocos/2d/renderer/CCRenderMaterial.cpp delete mode 100644 cocos/2d/renderer/CCRenderMaterial.h rename cocos/{2d => base}/CCConfiguration.cpp (99%) rename cocos/{2d => base}/CCConfiguration.h (100%) rename cocos/{2d => base}/CCDirector.cpp (99%) rename cocos/{2d => base}/CCDirector.h (99%) rename cocos/{2d => base}/CCEvent.cpp (98%) rename cocos/{2d => base}/CCEvent.h (100%) rename cocos/{2d => base}/CCEventAcceleration.cpp (97%) rename cocos/{2d => base}/CCEventAcceleration.h (96%) rename cocos/{2d => base}/CCEventCustom.cpp (96%) rename cocos/{2d => base}/CCEventCustom.h (98%) rename cocos/{2d => base}/CCEventDispatcher.cpp (99%) rename cocos/{2d => base}/CCEventDispatcher.h (99%) rename cocos/{2d => base}/CCEventKeyboard.cpp (97%) rename cocos/{2d => base}/CCEventKeyboard.h (99%) rename cocos/{2d => base}/CCEventListener.cpp (98%) rename cocos/{2d => base}/CCEventListener.h (100%) rename cocos/{2d => base}/CCEventListenerAcceleration.cpp (97%) rename cocos/{2d => base}/CCEventListenerAcceleration.h (97%) rename cocos/{2d => base}/CCEventListenerCustom.cpp (97%) rename cocos/{2d => base}/CCEventListenerCustom.h (98%) rename cocos/{2d => base}/CCEventListenerKeyboard.cpp (96%) rename cocos/{2d => base}/CCEventListenerKeyboard.h (96%) rename cocos/{2d => base}/CCEventListenerMouse.cpp (98%) rename cocos/{2d => base}/CCEventListenerMouse.h (96%) rename cocos/{2d => base}/CCEventListenerTouch.cpp (97%) rename cocos/{2d => base}/CCEventListenerTouch.h (98%) rename cocos/{2d => base}/CCEventMouse.cpp (97%) rename cocos/{2d => base}/CCEventMouse.h (99%) rename cocos/{2d => base}/CCEventTouch.cpp (97%) rename cocos/{2d => base}/CCEventTouch.h (97%) rename cocos/{2d => base}/CCEventType.h (100%) rename cocos/{2d => base}/CCProfiling.cpp (100%) rename cocos/{2d => base}/CCProfiling.h (99%) rename cocos/{2d => base}/CCScheduler.cpp (99%) rename cocos/{2d => base}/CCScheduler.h (100%) rename cocos/{2d => base}/CCTouch.cpp (97%) rename cocos/{2d => base}/CCTouch.h (99%) rename cocos/{2d => base}/ZipUtils.cpp (99%) rename cocos/{2d => base}/ZipUtils.h (100%) rename cocos/{2d => base}/base64.cpp (99%) rename cocos/{2d => base}/base64.h (100%) rename cocos/{2d => base}/ccConfig.h (100%) rename cocos/{2d => base}/ccMacros.h (99%) rename cocos/{2d => base}/ccTypes.cpp (99%) rename cocos/{2d => base}/ccTypes.h (99%) rename cocos/{base => math}/CCAffineTransform.cpp (99%) rename cocos/{base => math}/CCAffineTransform.h (95%) rename cocos/{base => math}/CCGeometry.cpp (99%) rename cocos/{base => math}/CCGeometry.h (97%) rename cocos/{2d => math}/TransformUtils.cpp (98%) rename cocos/{2d => math}/TransformUtils.h (100%) rename cocos/{2d => }/renderer/CCBatchCommand.cpp (97%) rename cocos/{2d => }/renderer/CCBatchCommand.h (100%) rename cocos/{2d => }/renderer/CCCustomCommand.cpp (96%) rename cocos/{2d => }/renderer/CCCustomCommand.h (100%) rename cocos/{2d => }/renderer/CCGroupCommand.cpp (96%) rename cocos/{2d => }/renderer/CCGroupCommand.h (100%) rename cocos/{2d => }/renderer/CCQuadCommand.cpp (98%) rename cocos/{2d => }/renderer/CCQuadCommand.h (100%) rename cocos/{2d => }/renderer/CCRenderCommand.cpp (100%) rename cocos/{2d => }/renderer/CCRenderCommand.h (98%) rename cocos/{2d => }/renderer/CCRenderCommandPool.h (100%) rename cocos/{2d => }/renderer/CCRenderer.cpp (97%) rename cocos/{2d => }/renderer/CCRenderer.h (100%) create mode 100644 cocos/renderer/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index b50e46d22e..918a2890e8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -138,10 +138,8 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/cocos ${CMAKE_CURRENT_SOURCE_DIR}/cocos/audio/include ${CMAKE_CURRENT_SOURCE_DIR}/cocos/2d - ${CMAKE_CURRENT_SOURCE_DIR}/cocos/2d/renderer ${CMAKE_CURRENT_SOURCE_DIR}/cocos/2d/platform ${CMAKE_CURRENT_SOURCE_DIR}/cocos/base - ${CMAKE_CURRENT_SOURCE_DIR}/cocos/math ${CMAKE_CURRENT_SOURCE_DIR}/cocos/deprecated ${CMAKE_CURRENT_SOURCE_DIR}/cocos/physics ${CMAKE_CURRENT_SOURCE_DIR}/cocos/editor-support @@ -238,6 +236,9 @@ add_subdirectory(cocos/audio) # cocos base library add_subdirectory(cocos/base) +# cocos renderer library +add_subdirectory(cocos/renderer) + # cocos math library add_subdirectory(cocos/math) diff --git a/build/cocos2d_libs.xcodeproj/project.pbxproj.REMOVED.git-id b/build/cocos2d_libs.xcodeproj/project.pbxproj.REMOVED.git-id index 505c1ae1d0..b689d929c1 100644 --- a/build/cocos2d_libs.xcodeproj/project.pbxproj.REMOVED.git-id +++ b/build/cocos2d_libs.xcodeproj/project.pbxproj.REMOVED.git-id @@ -1 +1 @@ -086c0c076d472cd5dd97cc03cfe600085e508d41 \ No newline at end of file +a4eda8c14ebd8738b7d9bc665cfb588c2948cd50 \ No newline at end of file diff --git a/cocos/2d/Android.mk b/cocos/2d/Android.mk index cda8fe92bc..da4448b189 100644 --- a/cocos/2d/Android.mk +++ b/cocos/2d/Android.mk @@ -7,12 +7,10 @@ LOCAL_MODULE := cocos2dx_static LOCAL_MODULE_FILENAME := libcocos2d LOCAL_SRC_FILES := \ -base64.cpp \ CCAction.cpp \ CCActionCamera.cpp \ CCActionCatmullRom.cpp \ CCActionEase.cpp \ -CCTweenFunction.cpp \ CCActionGrid.cpp \ CCActionGrid3D.cpp \ CCActionInstant.cpp \ @@ -25,128 +23,128 @@ CCActionTween.cpp \ CCAnimation.cpp \ CCAnimationCache.cpp \ CCAtlasNode.cpp \ -ccCArray.cpp \ CCClippingNode.cpp \ CCComponent.cpp \ CCComponentContainer.cpp \ -CCConfiguration.cpp \ -CCDirector.cpp \ -CCDrawingPrimitives.cpp \ CCDrawNode.cpp \ -CCEvent.cpp \ -CCEventAcceleration.cpp \ -CCEventCustom.cpp \ -CCEventDispatcher.cpp \ -CCEventKeyboard.cpp \ -CCEventListener.cpp \ -CCEventListenerAcceleration.cpp \ -CCEventListenerCustom.cpp \ -CCEventListenerKeyboard.cpp \ -CCEventListenerMouse.cpp \ -CCEventListenerTouch.cpp \ -CCEventMouse.cpp \ -CCEventTouch.cpp \ +CCDrawingPrimitives.cpp \ CCFont.cpp \ -CCFontCharMap.cpp \ CCFontAtlas.cpp \ CCFontAtlasCache.cpp \ +CCFontCharMap.cpp \ CCFontFNT.cpp \ CCFontFreeType.cpp \ -ccFPSImages.c \ CCGLBufferedNode.cpp \ CCGLProgram.cpp \ -ccGLStateCache.cpp \ CCGrabber.cpp \ CCGrid.cpp \ -CCNodeGrid.cpp \ CCIMEDispatcher.cpp \ CCLabel.cpp \ CCLabelAtlas.cpp \ CCLabelBMFont.cpp \ -CCLabelTextFormatter.cpp \ CCLabelTTF.cpp \ +CCLabelTextFormatter.cpp \ CCLayer.cpp \ CCMenu.cpp \ CCMenuItem.cpp \ CCMotionStreak.cpp \ CCNode.cpp \ +CCNodeGrid.cpp \ CCParallaxNode.cpp \ CCParticleBatchNode.cpp \ CCParticleExamples.cpp \ CCParticleSystem.cpp \ CCParticleSystemQuad.cpp \ -CCProfiling.cpp \ CCProgressTimer.cpp \ CCRenderTexture.cpp \ CCScene.cpp \ -CCScheduler.cpp \ CCScriptSupport.cpp \ CCShaderCache.cpp \ -ccShaders.cpp \ CCSprite.cpp \ CCSpriteBatchNode.cpp \ CCSpriteFrame.cpp \ CCSpriteFrameCache.cpp \ +CCTMXLayer.cpp \ +CCTMXObjectGroup.cpp \ +CCTMXTiledMap.cpp \ +CCTMXXMLParser.cpp \ CCTextFieldTTF.cpp \ CCTexture2D.cpp \ CCTextureAtlas.cpp \ CCTextureCache.cpp \ CCTileMapAtlas.cpp \ -CCTMXLayer.cpp \ -CCTMXObjectGroup.cpp \ -CCTMXTiledMap.cpp \ -CCTMXXMLParser.cpp \ -CCTouch.cpp \ CCTransition.cpp \ CCTransitionPageTurn.cpp \ CCTransitionProgress.cpp \ -ccTypes.cpp \ +CCTweenFunction.cpp \ CCUserDefault.cpp \ CCUserDefaultAndroid.cpp \ +CCVertex.cpp \ +TGAlib.cpp \ +ccCArray.cpp \ +ccGLStateCache.cpp \ +ccShaders.cpp \ ccUTF8.cpp \ ccUtils.cpp \ -CCVertex.cpp \ +ccFPSImages.c \ ../cocos2d.cpp \ -TGAlib.cpp \ -TransformUtils.cpp \ -ZipUtils.cpp \ platform/CCGLViewProtocol.cpp \ platform/CCFileUtils.cpp \ platform/CCSAXParser.cpp \ platform/CCThread.cpp \ platform/CCImage.cpp \ -renderer/CCCustomCommand.cpp \ -renderer/CCGroupCommand.cpp \ -renderer/CCMaterialManager.cpp \ -renderer/CCQuadCommand.cpp \ -renderer/CCBatchCommand.cpp \ -renderer/CCRenderCommand.cpp \ -renderer/CCRenderer.cpp \ -renderer/CCRenderMaterial.cpp \ -../base/atitc.cpp \ -../base/CCAffineTransform.cpp \ +../math/CCAffineTransform.cpp \ +../math/CCGeometry.cpp \ +../math/MathUtil.cpp \ +../math/Matrix.cpp \ +../math/Quaternion.cpp \ +../math/TransformUtils.cpp \ +../math/Vector2.cpp \ +../math/Vector3.cpp \ +../math/Vector4.cpp \ ../base/CCAutoreleasePool.cpp \ +../base/CCConfiguration.cpp \ ../base/CCConsole.cpp \ ../base/CCData.cpp \ ../base/CCDataVisitor.cpp \ -../base/CCGeometry.cpp \ +../base/CCDirector.cpp \ +../base/CCEvent.cpp \ +../base/CCEventAcceleration.cpp \ +../base/CCEventCustom.cpp \ +../base/CCEventDispatcher.cpp \ +../base/CCEventKeyboard.cpp \ +../base/CCEventListener.cpp \ +../base/CCEventListenerAcceleration.cpp \ +../base/CCEventListenerCustom.cpp \ +../base/CCEventListenerKeyboard.cpp \ +../base/CCEventListenerMouse.cpp \ +../base/CCEventListenerTouch.cpp \ +../base/CCEventMouse.cpp \ +../base/CCEventTouch.cpp \ ../base/CCNS.cpp \ +../base/CCProfiling.cpp \ ../base/CCRef.cpp \ +../base/CCScheduler.cpp \ +../base/CCTouch.cpp \ ../base/CCValue.cpp \ +../base/ZipUtils.cpp \ +../base/atitc.cpp \ +../base/base64.cpp \ +../base/ccTypes.cpp \ ../base/etc1.cpp \ ../base/s3tc.cpp \ +../renderer/CCCustomCommand.cpp \ +../renderer/CCGroupCommand.cpp \ +../renderer/CCQuadCommand.cpp \ +../renderer/CCBatchCommand.cpp \ +../renderer/CCRenderCommand.cpp \ +../renderer/CCRenderer.cpp \ ../deprecated/CCArray.cpp \ ../deprecated/CCSet.cpp \ ../deprecated/CCString.cpp \ ../deprecated/CCDictionary.cpp \ ../deprecated/CCDeprecated.cpp \ ../deprecated/CCNotificationCenter.cpp \ -../math/MathUtil.cpp \ -../math/Matrix.cpp \ -../math/Quaternion.cpp \ -../math/Vector2.cpp \ -../math/Vector3.cpp \ -../math/Vector4.cpp \ ../physics/CCPhysicsBody.cpp \ ../physics/CCPhysicsContact.cpp \ ../physics/CCPhysicsJoint.cpp \ diff --git a/cocos/2d/CCAction.cpp b/cocos/2d/CCAction.cpp index 33af63cb6d..7d2e8c8220 100644 --- a/cocos/2d/CCAction.cpp +++ b/cocos/2d/CCAction.cpp @@ -28,7 +28,7 @@ THE SOFTWARE. #include "2d/CCAction.h" #include "2d/CCActionInterval.h" #include "2d/CCNode.h" -#include "2d/CCDirector.h" +#include "base/CCDirector.h" #include "deprecated/CCString.h" NS_CC_BEGIN diff --git a/cocos/2d/CCAction.h b/cocos/2d/CCAction.h index a6133fa372..c315fad3b1 100644 --- a/cocos/2d/CCAction.h +++ b/cocos/2d/CCAction.h @@ -29,7 +29,7 @@ THE SOFTWARE. #define __ACTIONS_CCACTION_H__ #include "base/CCRef.h" -#include "base/CCGeometry.h" +#include "math/CCGeometry.h" NS_CC_BEGIN diff --git a/cocos/2d/CCActionCatmullRom.cpp b/cocos/2d/CCActionCatmullRom.cpp index 20acae2915..8a8cccffaf 100644 --- a/cocos/2d/CCActionCatmullRom.cpp +++ b/cocos/2d/CCActionCatmullRom.cpp @@ -29,7 +29,7 @@ * * Adapted from cocos2d-x to cocos2d-iphone by Ricardo Quesada */ -#include "2d/ccMacros.h" +#include "base/ccMacros.h" #include "2d/CCActionCatmullRom.h" using namespace std; diff --git a/cocos/2d/CCActionCatmullRom.h b/cocos/2d/CCActionCatmullRom.h index 14d259ac15..ec77670cac 100644 --- a/cocos/2d/CCActionCatmullRom.h +++ b/cocos/2d/CCActionCatmullRom.h @@ -39,7 +39,7 @@ #include "2d/CCActionInterval.h" #include "2d/CCNode.h" -#include "base/CCGeometry.h" +#include "math/CCGeometry.h" NS_CC_BEGIN; diff --git a/cocos/2d/CCActionGrid.cpp b/cocos/2d/CCActionGrid.cpp index 9575abfd1c..68155178dc 100644 --- a/cocos/2d/CCActionGrid.cpp +++ b/cocos/2d/CCActionGrid.cpp @@ -24,7 +24,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ #include "2d/CCActionGrid.h" -#include "2d/CCDirector.h" +#include "base/CCDirector.h" #include "CCGrid.h" #include "CCNodeGrid.h" diff --git a/cocos/2d/CCActionGrid3D.cpp b/cocos/2d/CCActionGrid3D.cpp index 398829f71d..152ceeb68d 100644 --- a/cocos/2d/CCActionGrid3D.cpp +++ b/cocos/2d/CCActionGrid3D.cpp @@ -24,7 +24,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ #include "2d/CCActionGrid3D.h" -#include "2d/CCDirector.h" +#include "base/CCDirector.h" #include NS_CC_BEGIN diff --git a/cocos/2d/CCActionManager.cpp b/cocos/2d/CCActionManager.cpp index fb9a86c04e..98be24d3ee 100644 --- a/cocos/2d/CCActionManager.cpp +++ b/cocos/2d/CCActionManager.cpp @@ -28,8 +28,8 @@ THE SOFTWARE. #include "2d/CCActionManager.h" #include "2d/CCNode.h" -#include "CCScheduler.h" -#include "2d/ccMacros.h" +#include "base/CCScheduler.h" +#include "base/ccMacros.h" #include "2d/ccCArray.h" #include "2d/uthash.h" diff --git a/cocos/2d/CCActionTiledGrid.cpp b/cocos/2d/CCActionTiledGrid.cpp index d12c0bfcce..0a3faf5547 100644 --- a/cocos/2d/CCActionTiledGrid.cpp +++ b/cocos/2d/CCActionTiledGrid.cpp @@ -24,8 +24,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ #include "2d/CCActionTiledGrid.h" -#include "2d/CCDirector.h" -#include "2d/ccMacros.h" +#include "base/CCDirector.h" +#include "base/ccMacros.h" #include "CCGrid.h" #include "CCNodeGrid.h" #include diff --git a/cocos/2d/CCAnimation.cpp b/cocos/2d/CCAnimation.cpp index 8a98414d1d..a0f6aed205 100644 --- a/cocos/2d/CCAnimation.cpp +++ b/cocos/2d/CCAnimation.cpp @@ -27,9 +27,9 @@ THE SOFTWARE. #include "CCAnimation.h" #include "CCTextureCache.h" #include "2d/CCTexture2D.h" -#include "2d/ccMacros.h" +#include "base/ccMacros.h" #include "2d/CCSpriteFrame.h" -#include "2d/CCDirector.h" +#include "base/CCDirector.h" NS_CC_BEGIN diff --git a/cocos/2d/CCAnimation.h b/cocos/2d/CCAnimation.h index d058d54858..6c08f837e5 100644 --- a/cocos/2d/CCAnimation.h +++ b/cocos/2d/CCAnimation.h @@ -30,7 +30,7 @@ THE SOFTWARE. #include "base/CCPlatformConfig.h" #include "base/CCRef.h" #include "base/CCValue.h" -#include "base/CCGeometry.h" +#include "math/CCGeometry.h" #include "2d/CCSpriteFrame.h" #include "base/CCVector.h" diff --git a/cocos/2d/CCAnimationCache.cpp b/cocos/2d/CCAnimationCache.cpp index 48c336e3ba..06616e0f14 100644 --- a/cocos/2d/CCAnimationCache.cpp +++ b/cocos/2d/CCAnimationCache.cpp @@ -25,7 +25,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ #include "CCAnimationCache.h" -#include "2d/ccMacros.h" +#include "base/ccMacros.h" #include "CCAnimation.h" #include "2d/CCSpriteFrame.h" #include "2d/CCSpriteFrameCache.h" diff --git a/cocos/2d/CCAtlasNode.cpp b/cocos/2d/CCAtlasNode.cpp index d93e7bdc5b..013423f70a 100644 --- a/cocos/2d/CCAtlasNode.cpp +++ b/cocos/2d/CCAtlasNode.cpp @@ -28,13 +28,13 @@ THE SOFTWARE. #include "CCAtlasNode.h" #include "2d/CCTextureAtlas.h" #include "CCTextureCache.h" -#include "2d/CCDirector.h" +#include "base/CCDirector.h" #include "2d/CCGLProgram.h" #include "CCShaderCache.h" #include "2d/ccGLStateCache.h" -#include "2d/CCDirector.h" +#include "base/CCDirector.h" #include "TransformUtils.h" -#include "2d/renderer/CCRenderer.h" +#include "renderer/CCRenderer.h" NS_CC_BEGIN diff --git a/cocos/2d/CCAtlasNode.h b/cocos/2d/CCAtlasNode.h index 2454d99110..f5273cb72a 100644 --- a/cocos/2d/CCAtlasNode.h +++ b/cocos/2d/CCAtlasNode.h @@ -30,8 +30,8 @@ THE SOFTWARE. #include "2d/CCNode.h" #include "2d/CCProtocols.h" -#include "2d/ccTypes.h" -#include "2d/renderer/CCQuadCommand.h" +#include "base/ccTypes.h" +#include "renderer/CCQuadCommand.h" NS_CC_BEGIN diff --git a/cocos/2d/CCClippingNode.cpp b/cocos/2d/CCClippingNode.cpp index 2baf58f3cf..74dc327c86 100644 --- a/cocos/2d/CCClippingNode.cpp +++ b/cocos/2d/CCClippingNode.cpp @@ -28,12 +28,12 @@ #include "CCClippingNode.h" #include "2d/CCGLProgram.h" #include "CCShaderCache.h" -#include "2d/CCDirector.h" +#include "base/CCDirector.h" #include "CCDrawingPrimitives.h" -#include "2d/renderer/CCRenderer.h" -#include "2d/renderer/CCGroupCommand.h" -#include "2d/renderer/CCCustomCommand.h" +#include "renderer/CCRenderer.h" +#include "renderer/CCGroupCommand.h" +#include "renderer/CCCustomCommand.h" NS_CC_BEGIN diff --git a/cocos/2d/CCClippingNode.h b/cocos/2d/CCClippingNode.h index 9f9193473c..a8d603e709 100644 --- a/cocos/2d/CCClippingNode.h +++ b/cocos/2d/CCClippingNode.h @@ -30,8 +30,8 @@ #include "2d/CCNode.h" #include "CCGL.h" -#include "2d/renderer/CCGroupCommand.h" -#include "2d/renderer/CCCustomCommand.h" +#include "renderer/CCGroupCommand.h" +#include "renderer/CCCustomCommand.h" NS_CC_BEGIN diff --git a/cocos/2d/CCComponentContainer.cpp b/cocos/2d/CCComponentContainer.cpp index 01fc99794a..598b91152c 100644 --- a/cocos/2d/CCComponentContainer.cpp +++ b/cocos/2d/CCComponentContainer.cpp @@ -25,7 +25,7 @@ THE SOFTWARE. #include "CCComponentContainer.h" #include "CCComponent.h" -#include "2d/CCDirector.h" +#include "base/CCDirector.h" NS_CC_BEGIN diff --git a/cocos/2d/CCDrawNode.cpp b/cocos/2d/CCDrawNode.cpp index 8986fbd43f..fe7fce43ae 100644 --- a/cocos/2d/CCDrawNode.cpp +++ b/cocos/2d/CCDrawNode.cpp @@ -24,13 +24,13 @@ #include "2d/CCDrawNode.h" #include "CCShaderCache.h" #include "CCGL.h" -#include "2d/CCEventType.h" +#include "base/CCEventType.h" #include "CCConfiguration.h" -#include "2d/renderer/CCCustomCommand.h" -#include "2d/renderer/CCRenderer.h" -#include "2d/CCDirector.h" -#include "2d/CCEventListenerCustom.h" -#include "2d/CCEventDispatcher.h" +#include "renderer/CCCustomCommand.h" +#include "renderer/CCRenderer.h" +#include "base/CCDirector.h" +#include "base/CCEventListenerCustom.h" +#include "base/CCEventDispatcher.h" NS_CC_BEGIN diff --git a/cocos/2d/CCDrawNode.h b/cocos/2d/CCDrawNode.h index 2cca8755f3..38381053b6 100644 --- a/cocos/2d/CCDrawNode.h +++ b/cocos/2d/CCDrawNode.h @@ -32,8 +32,8 @@ #define __CCDRAWNODES_CCDRAW_NODE_H__ #include "2d/CCNode.h" -#include "2d/ccTypes.h" -#include "2d/renderer/CCCustomCommand.h" +#include "base/ccTypes.h" +#include "renderer/CCCustomCommand.h" NS_CC_BEGIN diff --git a/cocos/2d/CCDrawingPrimitives.cpp b/cocos/2d/CCDrawingPrimitives.cpp index 460c0bbba3..954cc264ab 100644 --- a/cocos/2d/CCDrawingPrimitives.cpp +++ b/cocos/2d/CCDrawingPrimitives.cpp @@ -41,15 +41,15 @@ THE SOFTWARE. #include #include -#include "2d/ccTypes.h" -#include "2d/ccMacros.h" +#include "base/ccTypes.h" +#include "base/ccMacros.h" #include "CCGL.h" -#include "2d/CCDirector.h" +#include "base/CCDirector.h" #include "2d/ccGLStateCache.h" #include "CCShaderCache.h" #include "2d/CCGLProgram.h" #include "2d/CCActionCatmullRom.h" -#include "2d/renderer/CCRenderer.h" +#include "renderer/CCRenderer.h" NS_CC_BEGIN #ifndef M_PI diff --git a/cocos/2d/CCDrawingPrimitives.h b/cocos/2d/CCDrawingPrimitives.h index a4047acf30..05f8265b1e 100644 --- a/cocos/2d/CCDrawingPrimitives.h +++ b/cocos/2d/CCDrawingPrimitives.h @@ -41,8 +41,8 @@ THE SOFTWARE. #define __CCDRAWING_PRIMITIVES__ -#include "2d/ccTypes.h" -#include "2d/ccMacros.h" +#include "base/ccTypes.h" +#include "base/ccMacros.h" #include "math/CCMath.h" /** diff --git a/cocos/2d/CCFontAtlas.cpp b/cocos/2d/CCFontAtlas.cpp index 5740444d38..5e9ba0ad89 100644 --- a/cocos/2d/CCFontAtlas.cpp +++ b/cocos/2d/CCFontAtlas.cpp @@ -26,10 +26,10 @@ #include "CCFontAtlas.h" #include "CCFontFreeType.h" #include "ccUTF8.h" -#include "2d/CCDirector.h" -#include "2d/CCEventListenerCustom.h" -#include "2d/CCEventDispatcher.h" -#include "2d/CCEventType.h" +#include "base/CCDirector.h" +#include "base/CCEventListenerCustom.h" +#include "base/CCEventDispatcher.h" +#include "base/CCEventType.h" NS_CC_BEGIN diff --git a/cocos/2d/CCFontAtlasCache.cpp b/cocos/2d/CCFontAtlasCache.cpp index b0c3a1ec6e..c3616b607e 100644 --- a/cocos/2d/CCFontAtlasCache.cpp +++ b/cocos/2d/CCFontAtlasCache.cpp @@ -30,7 +30,7 @@ #include "CCFontFNT.h" #include "CCFontFreeType.h" #include "CCFontCharMap.h" -#include "2d/CCDirector.h" +#include "base/CCDirector.h" NS_CC_BEGIN diff --git a/cocos/2d/CCFontCharMap.cpp b/cocos/2d/CCFontCharMap.cpp index 1a568a1469..f0f3e1dcbb 100644 --- a/cocos/2d/CCFontCharMap.cpp +++ b/cocos/2d/CCFontCharMap.cpp @@ -26,7 +26,7 @@ #include "CCFontCharMap.h" #include "CCFontAtlas.h" #include "2d/platform/CCFileUtils.h" -#include "2d/CCDirector.h" +#include "base/CCDirector.h" #include "CCTextureCache.h" #include "ccUTF8.h" diff --git a/cocos/2d/CCFontFNT.cpp b/cocos/2d/CCFontFNT.cpp index a504dc4c44..3e8b3c3c47 100644 --- a/cocos/2d/CCFontFNT.cpp +++ b/cocos/2d/CCFontFNT.cpp @@ -26,7 +26,7 @@ #include "CCFontFNT.h" #include "2d/uthash.h" #include "CCConfiguration.h" -#include "2d/CCDirector.h" +#include "base/CCDirector.h" #include "CCFontAtlas.h" #include "base/CCMap.h" #include "deprecated/CCString.h" diff --git a/cocos/2d/CCGLProgram.cpp b/cocos/2d/CCGLProgram.cpp index e46023c18f..fd8a5a91fe 100644 --- a/cocos/2d/CCGLProgram.cpp +++ b/cocos/2d/CCGLProgram.cpp @@ -26,10 +26,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "2d/CCDirector.h" +#include "base/CCDirector.h" #include "2d/CCGLProgram.h" #include "2d/ccGLStateCache.h" -#include "2d/ccMacros.h" +#include "base/ccMacros.h" #include "2d/platform/CCFileUtils.h" #include "2d/uthash.h" #include "deprecated/CCString.h" diff --git a/cocos/2d/CCGLProgram.h b/cocos/2d/CCGLProgram.h index f7a2372261..5cd493cfdd 100644 --- a/cocos/2d/CCGLProgram.h +++ b/cocos/2d/CCGLProgram.h @@ -30,7 +30,7 @@ THE SOFTWARE. #ifndef __CCGLPROGRAM_H__ #define __CCGLPROGRAM_H__ -#include "2d/ccMacros.h" +#include "base/ccMacros.h" #include "base/CCRef.h" #include "CCGL.h" #include "math/CCMath.h" diff --git a/cocos/2d/CCGrabber.cpp b/cocos/2d/CCGrabber.cpp index a9b68b702a..f6a633c411 100644 --- a/cocos/2d/CCGrabber.cpp +++ b/cocos/2d/CCGrabber.cpp @@ -24,7 +24,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ #include "CCGrabber.h" -#include "2d/ccMacros.h" +#include "base/ccMacros.h" #include "2d/CCTexture2D.h" NS_CC_BEGIN diff --git a/cocos/2d/CCGrabber.h b/cocos/2d/CCGrabber.h index 9f4326d484..acf7595673 100644 --- a/cocos/2d/CCGrabber.h +++ b/cocos/2d/CCGrabber.h @@ -26,7 +26,7 @@ THE SOFTWARE. #ifndef __EFFECTS_CCGRABBER_H__ #define __EFFECTS_CCGRABBER_H__ -#include "CCConfiguration.h" +#include "base/CCConfiguration.h" #include "base/CCRef.h" #include "CCGL.h" diff --git a/cocos/2d/CCGrid.cpp b/cocos/2d/CCGrid.cpp index ba46bcce94..c74f7c564a 100644 --- a/cocos/2d/CCGrid.cpp +++ b/cocos/2d/CCGrid.cpp @@ -23,16 +23,16 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "2d/ccMacros.h" +#include "base/ccMacros.h" #include "CCGrid.h" -#include "2d/CCDirector.h" +#include "base/CCDirector.h" #include "CCGrabber.h" #include "ccUtils.h" #include "2d/CCGLProgram.h" #include "CCShaderCache.h" #include "2d/ccGLStateCache.h" #include "CCGL.h" -#include "2d/renderer/CCRenderer.h" +#include "renderer/CCRenderer.h" #include "TransformUtils.h" NS_CC_BEGIN diff --git a/cocos/2d/CCGrid.h b/cocos/2d/CCGrid.h index a31b3e09dd..41648d5156 100644 --- a/cocos/2d/CCGrid.h +++ b/cocos/2d/CCGrid.h @@ -28,9 +28,9 @@ THE SOFTWARE. #include "base/CCRef.h" #include "2d/CCNode.h" -#include "2d/ccTypes.h" +#include "base/ccTypes.h" #include "2d/CCTexture2D.h" -#include "2d/CCDirector.h" +#include "base/CCDirector.h" #ifdef EMSCRIPTEN #include "CCGLBufferedNode.h" #endif // EMSCRIPTEN diff --git a/cocos/2d/CCIMEDelegate.h b/cocos/2d/CCIMEDelegate.h index 8e463a9eaf..a4f0f65740 100644 --- a/cocos/2d/CCIMEDelegate.h +++ b/cocos/2d/CCIMEDelegate.h @@ -27,7 +27,7 @@ THE SOFTWARE. #define __CC_IME_DELEGATE_H__ #include -#include "base/CCGeometry.h" +#include "math/CCGeometry.h" NS_CC_BEGIN extern const std::string STD_STRING_EMPTY; diff --git a/cocos/2d/CCLabel.cpp b/cocos/2d/CCLabel.cpp index 5b54bf703d..838890d964 100644 --- a/cocos/2d/CCLabel.cpp +++ b/cocos/2d/CCLabel.cpp @@ -30,13 +30,13 @@ #include "CCShaderCache.h" #include "ccUTF8.h" #include "2d/CCSpriteFrame.h" -#include "2d/CCDirector.h" -#include "2d/renderer/CCRenderer.h" +#include "base/CCDirector.h" +#include "renderer/CCRenderer.h" #include "CCFont.h" -#include "2d/CCEventListenerCustom.h" -#include "2d/CCEventDispatcher.h" -#include "2d/CCEventType.h" -#include "2d/CCEventCustom.h" +#include "base/CCEventListenerCustom.h" +#include "base/CCEventDispatcher.h" +#include "base/CCEventType.h" +#include "base/CCEventCustom.h" #include "2d/platform/CCFileUtils.h" #include "deprecated/CCString.h" #include "CCProfiling.h" diff --git a/cocos/2d/CCLabel.h b/cocos/2d/CCLabel.h index 46fd6b4098..9bb2c04f62 100644 --- a/cocos/2d/CCLabel.h +++ b/cocos/2d/CCLabel.h @@ -28,8 +28,8 @@ #define _COCOS2D_CCLABEL_H_ #include "2d/CCSpriteBatchNode.h" -#include "2d/ccTypes.h" -#include "2d/renderer/CCCustomCommand.h" +#include "base/ccTypes.h" +#include "renderer/CCCustomCommand.h" #include "CCFontAtlas.h" NS_CC_BEGIN diff --git a/cocos/2d/CCLabelAtlas.cpp b/cocos/2d/CCLabelAtlas.cpp index 228a94bc7a..304294d386 100644 --- a/cocos/2d/CCLabelAtlas.cpp +++ b/cocos/2d/CCLabelAtlas.cpp @@ -28,19 +28,19 @@ THE SOFTWARE. #include "2d/CCTextureAtlas.h" #include "CCTextureCache.h" #include "CCDrawingPrimitives.h" -#include "2d/ccConfig.h" +#include "base/ccConfig.h" #include "CCShaderCache.h" #include "2d/CCGLProgram.h" #include "2d/ccGLStateCache.h" -#include "2d/CCDirector.h" +#include "base/CCDirector.h" #include "TransformUtils.h" #include "2d/platform/CCFileUtils.h" // external #include "deprecated/CCString.h" #if CC_LABELATLAS_DEBUG_DRAW -#include "2d/renderer/CCRenderer.h" -#include "2d/CCDirector.h" +#include "renderer/CCRenderer.h" +#include "base/CCDirector.h" #endif NS_CC_BEGIN diff --git a/cocos/2d/CCLabelAtlas.h b/cocos/2d/CCLabelAtlas.h index 467f51371c..c2e11ce0f4 100644 --- a/cocos/2d/CCLabelAtlas.h +++ b/cocos/2d/CCLabelAtlas.h @@ -29,7 +29,7 @@ THE SOFTWARE. #include "CCAtlasNode.h" #if CC_LABELATLAS_DEBUG_DRAW -#include "2d/renderer/CCCustomCommand.h" +#include "renderer/CCCustomCommand.h" #endif NS_CC_BEGIN diff --git a/cocos/2d/CCLabelBMFont.cpp b/cocos/2d/CCLabelBMFont.cpp index 5788586373..038f5ddc4f 100644 --- a/cocos/2d/CCLabelBMFont.cpp +++ b/cocos/2d/CCLabelBMFont.cpp @@ -37,8 +37,8 @@ http://www.angelcode.com/products/bmfont/ (Free, Windows only) #include "2d/CCSprite.h" #if CC_LABELBMFONT_DEBUG_DRAW -#include "2d/renderer/CCRenderer.h" -#include "2d/CCDirector.h" +#include "renderer/CCRenderer.h" +#include "base/CCDirector.h" #endif using namespace std; diff --git a/cocos/2d/CCLabelBMFont.h b/cocos/2d/CCLabelBMFont.h index 48fc10d094..0a9b7bdf04 100644 --- a/cocos/2d/CCLabelBMFont.h +++ b/cocos/2d/CCLabelBMFont.h @@ -36,7 +36,7 @@ Use any of these editors to generate BMFonts: #include "2d/CCLabel.h" #if CC_LABELBMFONT_DEBUG_DRAW -#include "2d/renderer/CCCustomCommand.h" +#include "renderer/CCCustomCommand.h" #endif NS_CC_BEGIN diff --git a/cocos/2d/CCLabelTextFormatter.cpp b/cocos/2d/CCLabelTextFormatter.cpp index 80196d60b7..b88d98212c 100644 --- a/cocos/2d/CCLabelTextFormatter.cpp +++ b/cocos/2d/CCLabelTextFormatter.cpp @@ -27,7 +27,7 @@ #include "ccUTF8.h" #include "CCLabelTextFormatter.h" -#include "2d/CCDirector.h" +#include "base/CCDirector.h" #include "2d/CCLabel.h" using namespace std; diff --git a/cocos/2d/CCLayer.cpp b/cocos/2d/CCLayer.cpp index 34af1f00ef..421ff757d2 100644 --- a/cocos/2d/CCLayer.cpp +++ b/cocos/2d/CCLayer.cpp @@ -27,24 +27,24 @@ THE SOFTWARE. #include #include "2d/CCLayer.h" -#include "2d/CCDirector.h" +#include "base/CCDirector.h" #include "2d/CCScriptSupport.h" #include "CCShaderCache.h" #include "2d/CCGLProgram.h" #include "2d/ccGLStateCache.h" #include "TransformUtils.h" // extern -#include "2d/CCEventDispatcher.h" -#include "2d/CCEventListenerTouch.h" -#include "2d/CCEventTouch.h" -#include "2d/CCEventKeyboard.h" -#include "2d/CCEventListenerKeyboard.h" -#include "2d/CCEventAcceleration.h" -#include "2d/CCEventListenerAcceleration.h" +#include "base/CCEventDispatcher.h" +#include "base/CCEventListenerTouch.h" +#include "base/CCEventTouch.h" +#include "base/CCEventKeyboard.h" +#include "base/CCEventListenerKeyboard.h" +#include "base/CCEventAcceleration.h" +#include "base/CCEventListenerAcceleration.h" #include "2d/platform/CCDevice.h" #include "CCScene.h" -#include "2d/renderer/CCCustomCommand.h" -#include "2d/renderer/CCRenderer.h" +#include "renderer/CCCustomCommand.h" +#include "renderer/CCRenderer.h" #include "deprecated/CCString.h" #if CC_USE_PHYSICS diff --git a/cocos/2d/CCLayer.h b/cocos/2d/CCLayer.h index 8d7eceda35..b9a654be51 100644 --- a/cocos/2d/CCLayer.h +++ b/cocos/2d/CCLayer.h @@ -30,13 +30,13 @@ THE SOFTWARE. #include "2d/CCNode.h" #include "2d/CCProtocols.h" -#include "2d/CCEventTouch.h" +#include "base/CCEventTouch.h" #ifdef EMSCRIPTEN #include "CCGLBufferedNode.h" #endif // EMSCRIPTEN -#include "2d/CCEventKeyboard.h" -#include "2d/renderer/CCCustomCommand.h" +#include "base/CCEventKeyboard.h" +#include "renderer/CCCustomCommand.h" #include "physics/CCPhysicsWorld.h" diff --git a/cocos/2d/CCMenu.cpp b/cocos/2d/CCMenu.cpp index b739b2aa6a..91bdcba688 100644 --- a/cocos/2d/CCMenu.cpp +++ b/cocos/2d/CCMenu.cpp @@ -24,11 +24,11 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ #include "2d/CCMenu.h" -#include "2d/CCDirector.h" +#include "base/CCDirector.h" #include "CCApplication.h" -#include "2d/CCTouch.h" +#include "base/CCTouch.h" #include "CCStdC.h" -#include "2d/CCEventListenerTouch.h" +#include "base/CCEventListenerTouch.h" #include "deprecated/CCString.h" #include diff --git a/cocos/2d/CCMenu.h b/cocos/2d/CCMenu.h index 29b3dd16a1..e4f29e580d 100644 --- a/cocos/2d/CCMenu.h +++ b/cocos/2d/CCMenu.h @@ -29,7 +29,7 @@ THE SOFTWARE. #include "2d/CCMenuItem.h" #include "2d/CCLayer.h" #include "base/CCVector.h" -#include "2d/CCEventTouch.h" +#include "base/CCEventTouch.h" #include "base/CCValue.h" NS_CC_BEGIN diff --git a/cocos/2d/CCMotionStreak.cpp b/cocos/2d/CCMotionStreak.cpp index 48caee3b75..90432d467d 100644 --- a/cocos/2d/CCMotionStreak.cpp +++ b/cocos/2d/CCMotionStreak.cpp @@ -28,11 +28,11 @@ THE SOFTWARE. #include "2d/ccGLStateCache.h" #include "2d/CCGLProgram.h" #include "CCShaderCache.h" -#include "2d/ccMacros.h" -#include "2d/CCDirector.h" +#include "base/ccMacros.h" +#include "base/CCDirector.h" #include "CCVertex.h" -#include "2d/renderer/CCCustomCommand.h" -#include "2d/renderer/CCRenderer.h" +#include "renderer/CCCustomCommand.h" +#include "renderer/CCRenderer.h" NS_CC_BEGIN diff --git a/cocos/2d/CCMotionStreak.h b/cocos/2d/CCMotionStreak.h index 26896d3102..295ca3a9ec 100644 --- a/cocos/2d/CCMotionStreak.h +++ b/cocos/2d/CCMotionStreak.h @@ -28,9 +28,9 @@ THE SOFTWARE. #include "2d/CCProtocols.h" #include "2d/CCTexture2D.h" -#include "2d/ccTypes.h" +#include "base/ccTypes.h" #include "2d/CCNode.h" -#include "2d/renderer/CCCustomCommand.h" +#include "renderer/CCCustomCommand.h" #ifdef EMSCRIPTEN #include "CCGLBufferedNode.h" #endif // EMSCRIPTEN diff --git a/cocos/2d/CCNode.cpp b/cocos/2d/CCNode.cpp index 1a02e61db1..0191bb2e94 100644 --- a/cocos/2d/CCNode.cpp +++ b/cocos/2d/CCNode.cpp @@ -34,15 +34,15 @@ THE SOFTWARE. #include "2d/ccCArray.h" #include "TransformUtils.h" #include "CCGrid.h" -#include "2d/CCDirector.h" -#include "CCScheduler.h" -#include "2d/CCTouch.h" +#include "base/CCDirector.h" +#include "base/CCScheduler.h" +#include "base/CCTouch.h" #include "2d/CCActionManager.h" #include "2d/CCScriptSupport.h" #include "2d/CCGLProgram.h" -#include "2d/CCEventDispatcher.h" -#include "2d/CCEvent.h" -#include "2d/CCEventTouch.h" +#include "base/CCEventDispatcher.h" +#include "base/CCEvent.h" +#include "base/CCEventTouch.h" #include "2d/CCLayer.h" #if CC_USE_PHYSICS @@ -1588,7 +1588,7 @@ void Node::updatePhysicsBodyPosition(Layer* layer) { if (layer != nullptr && layer->getPhysicsWorld() != nullptr) { - Point pos = getParent() == layer ? getPosition() : layer->convertToNodeSpace(_parent->convertToWorldSpace(getPosition())); + Vector2 pos = getParent() == layer ? getPosition() : layer->convertToNodeSpace(_parent->convertToWorldSpace(getPosition())); _physicsBody->setPosition(pos); } else diff --git a/cocos/2d/CCNode.h b/cocos/2d/CCNode.h index 7a1e905f15..e14bde0707 100644 --- a/cocos/2d/CCNode.h +++ b/cocos/2d/CCNode.h @@ -29,14 +29,14 @@ #ifndef __CCNODE_H__ #define __CCNODE_H__ -#include "2d/ccMacros.h" -#include "base/CCAffineTransform.h" +#include "base/ccMacros.h" +#include "math/CCAffineTransform.h" #include "CCGL.h" #include "2d/ccGLStateCache.h" #include "2d/CCGLProgram.h" #include "2d/CCScriptSupport.h" #include "2d/CCProtocols.h" -#include "2d/CCEventDispatcher.h" +#include "base/CCEventDispatcher.h" #include "base/CCVector.h" #include "math/CCMath.h" diff --git a/cocos/2d/CCNodeGrid.cpp b/cocos/2d/CCNodeGrid.cpp index 734f86537d..bc36305932 100644 --- a/cocos/2d/CCNodeGrid.cpp +++ b/cocos/2d/CCNodeGrid.cpp @@ -25,9 +25,9 @@ #include "CCNodeGrid.h" #include "CCGrid.h" -#include "2d/renderer/CCGroupCommand.h" -#include "2d/renderer/CCRenderer.h" -#include "2d/renderer/CCCustomCommand.h" +#include "renderer/CCGroupCommand.h" +#include "renderer/CCRenderer.h" +#include "renderer/CCCustomCommand.h" NS_CC_BEGIN diff --git a/cocos/2d/CCNodeGrid.h b/cocos/2d/CCNodeGrid.h index 1ba1295313..342553bdf1 100644 --- a/cocos/2d/CCNodeGrid.h +++ b/cocos/2d/CCNodeGrid.h @@ -26,8 +26,8 @@ #define __MISCNODE_CCGRID_NODE_H__ #include "2d/CCNode.h" -#include "2d/renderer/CCGroupCommand.h" -#include "2d/renderer/CCCustomCommand.h" +#include "renderer/CCGroupCommand.h" +#include "renderer/CCCustomCommand.h" NS_CC_BEGIN diff --git a/cocos/2d/CCParticleBatchNode.cpp b/cocos/2d/CCParticleBatchNode.cpp index fc1addbd06..3b3f5ce244 100644 --- a/cocos/2d/CCParticleBatchNode.cpp +++ b/cocos/2d/CCParticleBatchNode.cpp @@ -31,19 +31,19 @@ #include "CCParticleBatchNode.h" #include "CCTextureCache.h" #include "2d/CCTextureAtlas.h" -#include "2d/ccConfig.h" -#include "2d/ccMacros.h" +#include "base/ccConfig.h" +#include "base/ccMacros.h" #include "CCGrid.h" #include "CCParticleSystem.h" #include "CCShaderCache.h" #include "2d/CCGLProgram.h" #include "2d/ccGLStateCache.h" -#include "base64.h" -#include "ZipUtils.h" +#include "base/base64.h" +#include "base/ZipUtils.h" #include "2d/platform/CCFileUtils.h" #include "CCProfiling.h" -#include "2d/renderer/CCQuadCommand.h" -#include "2d/renderer/CCRenderer.h" +#include "renderer/CCQuadCommand.h" +#include "renderer/CCRenderer.h" NS_CC_BEGIN diff --git a/cocos/2d/CCParticleBatchNode.h b/cocos/2d/CCParticleBatchNode.h index f718685ef5..530aa483da 100644 --- a/cocos/2d/CCParticleBatchNode.h +++ b/cocos/2d/CCParticleBatchNode.h @@ -32,7 +32,7 @@ #include "2d/CCNode.h" #include "2d/CCProtocols.h" -#include "2d/renderer/CCBatchCommand.h" +#include "renderer/CCBatchCommand.h" NS_CC_BEGIN diff --git a/cocos/2d/CCParticleExamples.cpp b/cocos/2d/CCParticleExamples.cpp index 7386538a8e..c9b39e32f8 100644 --- a/cocos/2d/CCParticleExamples.cpp +++ b/cocos/2d/CCParticleExamples.cpp @@ -25,7 +25,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ #include "CCParticleExamples.h" -#include "2d/CCDirector.h" +#include "base/CCDirector.h" #include "CCTextureCache.h" #include "firePngData.h" #include "2d/platform/CCImage.h" diff --git a/cocos/2d/CCParticleSystem.cpp b/cocos/2d/CCParticleSystem.cpp index 0525a20b33..eed3640364 100644 --- a/cocos/2d/CCParticleSystem.cpp +++ b/cocos/2d/CCParticleSystem.cpp @@ -47,14 +47,14 @@ THE SOFTWARE. #include #include "CCParticleBatchNode.h" -#include "2d/ccTypes.h" +#include "base/ccTypes.h" #include "CCTextureCache.h" #include "2d/CCTextureAtlas.h" -#include "base64.h" +#include "base/base64.h" #include "2d/platform/CCFileUtils.h" #include "2d/platform/CCImage.h" -#include "ZipUtils.h" -#include "2d/CCDirector.h" +#include "base/ZipUtils.h" +#include "base/CCDirector.h" #include "CCProfiling.h" // opengl #include "CCGL.h" diff --git a/cocos/2d/CCParticleSystemQuad.cpp b/cocos/2d/CCParticleSystemQuad.cpp index d2a130fa1b..5b233a7db6 100644 --- a/cocos/2d/CCParticleSystemQuad.cpp +++ b/cocos/2d/CCParticleSystemQuad.cpp @@ -29,22 +29,22 @@ THE SOFTWARE. #include "CCGL.h" #include "2d/CCParticleSystemQuad.h" #include "2d/CCSpriteFrame.h" -#include "2d/CCDirector.h" +#include "base/CCDirector.h" #include "CCParticleBatchNode.h" #include "2d/CCTextureAtlas.h" #include "CCShaderCache.h" #include "2d/ccGLStateCache.h" #include "2d/CCGLProgram.h" #include "TransformUtils.h" -#include "2d/CCEventType.h" +#include "base/CCEventType.h" #include "CCConfiguration.h" -#include "2d/renderer/CCRenderer.h" -#include "2d/renderer/CCQuadCommand.h" -#include "2d/renderer/CCCustomCommand.h" +#include "renderer/CCRenderer.h" +#include "renderer/CCQuadCommand.h" +#include "renderer/CCCustomCommand.h" // extern -#include "2d/CCEventListenerCustom.h" -#include "2d/CCEventDispatcher.h" +#include "base/CCEventListenerCustom.h" +#include "base/CCEventDispatcher.h" NS_CC_BEGIN diff --git a/cocos/2d/CCParticleSystemQuad.h b/cocos/2d/CCParticleSystemQuad.h index 10fd3ac036..c77ccb983a 100644 --- a/cocos/2d/CCParticleSystemQuad.h +++ b/cocos/2d/CCParticleSystemQuad.h @@ -29,7 +29,7 @@ THE SOFTWARE. #define __CC_PARTICLE_SYSTEM_QUAD_H__ #include "CCParticleSystem.h" -#include "2d/renderer/CCQuadCommand.h" +#include "renderer/CCQuadCommand.h" NS_CC_BEGIN diff --git a/cocos/2d/CCProgressTimer.cpp b/cocos/2d/CCProgressTimer.cpp index 7bca645137..0a183a1658 100644 --- a/cocos/2d/CCProgressTimer.cpp +++ b/cocos/2d/CCProgressTimer.cpp @@ -25,16 +25,16 @@ THE SOFTWARE. ****************************************************************************/ #include "2d/CCProgressTimer.h" -#include "2d/ccMacros.h" +#include "base/ccMacros.h" #include "CCTextureCache.h" #include "2d/CCGLProgram.h" #include "CCShaderCache.h" #include "2d/ccGLStateCache.h" -#include "2d/CCDirector.h" +#include "base/CCDirector.h" #include "TransformUtils.h" #include "CCDrawingPrimitives.h" -#include "2d/renderer/CCRenderer.h" -#include "2d/renderer/CCCustomCommand.h" +#include "renderer/CCRenderer.h" +#include "renderer/CCCustomCommand.h" // extern #include diff --git a/cocos/2d/CCProgressTimer.h b/cocos/2d/CCProgressTimer.h index 0e1c75f0eb..2cf8695305 100644 --- a/cocos/2d/CCProgressTimer.h +++ b/cocos/2d/CCProgressTimer.h @@ -27,7 +27,7 @@ THE SOFTWARE. #define __MISC_NODE_CCPROGRESS_TIMER_H__ #include "2d/CCSprite.h" -#include "2d/renderer/CCCustomCommand.h" +#include "renderer/CCCustomCommand.h" #ifdef EMSCRIPTEN #include "CCGLBufferedNode.h" #endif // EMSCRIPTEN diff --git a/cocos/2d/CCProtocols.h b/cocos/2d/CCProtocols.h index daf9bd3cd3..13535409df 100644 --- a/cocos/2d/CCProtocols.h +++ b/cocos/2d/CCProtocols.h @@ -27,7 +27,7 @@ THE SOFTWARE. #ifndef __CCPROTOCOLS_H__ #define __CCPROTOCOLS_H__ -#include "2d/ccTypes.h" +#include "base/ccTypes.h" #include "2d/CCTexture2D.h" #include diff --git a/cocos/2d/CCRenderTexture.cpp b/cocos/2d/CCRenderTexture.cpp index b2d30f348a..13f1279f63 100644 --- a/cocos/2d/CCRenderTexture.cpp +++ b/cocos/2d/CCRenderTexture.cpp @@ -26,7 +26,7 @@ THE SOFTWARE. #include "CCConfiguration.h" #include "CCRenderTexture.h" -#include "2d/CCDirector.h" +#include "base/CCDirector.h" #include "2d/platform/CCImage.h" #include "2d/CCGLProgram.h" #include "2d/ccGLStateCache.h" @@ -35,16 +35,16 @@ THE SOFTWARE. #include "CCTextureCache.h" #include "2d/platform/CCFileUtils.h" #include "CCGL.h" -#include "2d/CCEventType.h" +#include "base/CCEventType.h" #include "CCGrid.h" -#include "2d/renderer/CCRenderer.h" -#include "2d/renderer/CCGroupCommand.h" -#include "2d/renderer/CCCustomCommand.h" +#include "renderer/CCRenderer.h" +#include "renderer/CCGroupCommand.h" +#include "renderer/CCCustomCommand.h" // extern -#include "2d/CCEventListenerCustom.h" -#include "2d/CCEventDispatcher.h" +#include "base/CCEventListenerCustom.h" +#include "base/CCEventDispatcher.h" NS_CC_BEGIN diff --git a/cocos/2d/CCRenderTexture.h b/cocos/2d/CCRenderTexture.h index def3fe1213..f25b243d63 100644 --- a/cocos/2d/CCRenderTexture.h +++ b/cocos/2d/CCRenderTexture.h @@ -29,8 +29,8 @@ THE SOFTWARE. #include "2d/CCNode.h" #include "2d/CCSprite.h" #include "2d/platform/CCImage.h" -#include "2d/renderer/CCGroupCommand.h" -#include "2d/renderer/CCCustomCommand.h" +#include "renderer/CCGroupCommand.h" +#include "renderer/CCCustomCommand.h" NS_CC_BEGIN diff --git a/cocos/2d/CCScene.cpp b/cocos/2d/CCScene.cpp index 87636dfbbc..7100a740fe 100644 --- a/cocos/2d/CCScene.cpp +++ b/cocos/2d/CCScene.cpp @@ -26,7 +26,7 @@ THE SOFTWARE. ****************************************************************************/ #include "CCScene.h" -#include "2d/CCDirector.h" +#include "base/CCDirector.h" #include "2d/CCLayer.h" #include "2d/CCSprite.h" #include "2d/CCSpriteBatchNode.h" diff --git a/cocos/2d/CCScriptSupport.cpp b/cocos/2d/CCScriptSupport.cpp index 5a57a5f543..0bf83ef912 100644 --- a/cocos/2d/CCScriptSupport.cpp +++ b/cocos/2d/CCScriptSupport.cpp @@ -27,7 +27,7 @@ #if CC_ENABLE_SCRIPT_BINDING -#include "CCScheduler.h" +#include "base/CCScheduler.h" bool CC_DLL cc_assert_script_compatible(const char *msg) { diff --git a/cocos/2d/CCScriptSupport.h b/cocos/2d/CCScriptSupport.h index 8a3476da03..8bf06a0dcb 100644 --- a/cocos/2d/CCScriptSupport.h +++ b/cocos/2d/CCScriptSupport.h @@ -26,13 +26,13 @@ #ifndef __SCRIPT_SUPPORT_H__ #define __SCRIPT_SUPPORT_H__ -#include "2d/ccConfig.h" +#include "base/ccConfig.h" #if CC_ENABLE_SCRIPT_BINDING #include "2d/platform/CCCommon.h" -#include "2d/CCTouch.h" -#include "2d/CCEventTouch.h" -#include "2d/CCEventKeyboard.h" +#include "base/CCTouch.h" +#include "base/CCEventTouch.h" +#include "base/CCEventKeyboard.h" #include #include #include diff --git a/cocos/2d/CCShaderCache.cpp b/cocos/2d/CCShaderCache.cpp index 598b787a31..be64fdd123 100644 --- a/cocos/2d/CCShaderCache.cpp +++ b/cocos/2d/CCShaderCache.cpp @@ -27,7 +27,7 @@ THE SOFTWARE. #include "CCShaderCache.h" #include "2d/CCGLProgram.h" -#include "2d/ccMacros.h" +#include "base/ccMacros.h" #include "ccShaders.h" NS_CC_BEGIN diff --git a/cocos/2d/CCSprite.cpp b/cocos/2d/CCSprite.cpp index 0cdf4bc4b1..6c48a27751 100644 --- a/cocos/2d/CCSprite.cpp +++ b/cocos/2d/CCSprite.cpp @@ -24,26 +24,27 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ + #include "2d/CCSprite.h" #include "2d/CCSpriteBatchNode.h" -#include "CCAnimation.h" -#include "CCAnimationCache.h" -#include "2d/ccConfig.h" +#include "2d/CCAnimation.h" +#include "2d/CCAnimationCache.h" #include "2d/CCSpriteFrame.h" #include "2d/CCSpriteFrameCache.h" -#include "CCTextureCache.h" -#include "CCDrawingPrimitives.h" -#include "CCShaderCache.h" +#include "2d/CCTextureCache.h" +#include "2d/CCDrawingPrimitives.h" +#include "2d/CCShaderCache.h" #include "2d/ccGLStateCache.h" #include "2d/CCGLProgram.h" -#include "2d/CCDirector.h" -#include "base/CCGeometry.h" #include "2d/CCTexture2D.h" -#include "base/CCAffineTransform.h" -#include "TransformUtils.h" -#include "CCProfiling.h" -#include "2d/CCDirector.h" -#include "2d/renderer/CCRenderer.h" +#include "base/CCProfiling.h" +#include "base/CCDirector.h" +#include "base/CCDirector.h" +#include "base/ccConfig.h" +#include "math/CCGeometry.h" +#include "math/CCAffineTransform.h" +#include "math/TransformUtils.h" +#include "renderer/CCRenderer.h" #include "deprecated/CCString.h" @@ -61,7 +62,7 @@ NS_CC_BEGIN Sprite* Sprite::createWithTexture(Texture2D *texture) { Sprite *sprite = new Sprite(); - if (sprite && sprite->initWithTexture(texture)) + if (sprite->initWithTexture(texture)) { sprite->autorelease(); return sprite; @@ -73,7 +74,7 @@ Sprite* Sprite::createWithTexture(Texture2D *texture) Sprite* Sprite::createWithTexture(Texture2D *texture, const Rect& rect, bool rotated) { Sprite *sprite = new Sprite(); - if (sprite && sprite->initWithTexture(texture, rect, rotated)) + if (sprite->initWithTexture(texture, rect, rotated)) { sprite->autorelease(); return sprite; @@ -85,7 +86,7 @@ Sprite* Sprite::createWithTexture(Texture2D *texture, const Rect& rect, bool rot Sprite* Sprite::create(const std::string& filename) { Sprite *sprite = new Sprite(); - if (sprite && sprite->initWithFile(filename)) + if (sprite->initWithFile(filename)) { sprite->autorelease(); return sprite; @@ -97,7 +98,7 @@ Sprite* Sprite::create(const std::string& filename) Sprite* Sprite::create(const std::string& filename, const Rect& rect) { Sprite *sprite = new Sprite(); - if (sprite && sprite->initWithFile(filename, rect)) + if (sprite->initWithFile(filename, rect)) { sprite->autorelease(); return sprite; @@ -109,7 +110,7 @@ Sprite* Sprite::create(const std::string& filename, const Rect& rect) Sprite* Sprite::createWithSpriteFrame(SpriteFrame *spriteFrame) { Sprite *sprite = new Sprite(); - if (spriteFrame && sprite && sprite->initWithSpriteFrame(spriteFrame)) + if (spriteFrame && sprite->initWithSpriteFrame(spriteFrame)) { sprite->autorelease(); return sprite; diff --git a/cocos/2d/CCSprite.h b/cocos/2d/CCSprite.h index bc51f03c51..7f401ec5b8 100644 --- a/cocos/2d/CCSprite.h +++ b/cocos/2d/CCSprite.h @@ -31,14 +31,14 @@ THE SOFTWARE. #include "2d/CCNode.h" #include "2d/CCProtocols.h" #include "2d/CCTextureAtlas.h" -#include "2d/ccTypes.h" +#include "base/ccTypes.h" #include #ifdef EMSCRIPTEN #include "CCGLBufferedNode.h" #endif // EMSCRIPTEN #include "physics/CCPhysicsBody.h" -#include "2d/renderer/CCQuadCommand.h" -#include "2d/renderer/CCCustomCommand.h" +#include "renderer/CCQuadCommand.h" +#include "renderer/CCCustomCommand.h" NS_CC_BEGIN diff --git a/cocos/2d/CCSpriteBatchNode.cpp b/cocos/2d/CCSpriteBatchNode.cpp index d11f882c58..b88adabb7e 100644 --- a/cocos/2d/CCSpriteBatchNode.cpp +++ b/cocos/2d/CCSpriteBatchNode.cpp @@ -27,7 +27,7 @@ THE SOFTWARE. ****************************************************************************/ #include "2d/CCSpriteBatchNode.h" -#include "2d/ccConfig.h" +#include "base/ccConfig.h" #include "2d/CCSprite.h" #include "CCGrid.h" #include "CCDrawingPrimitives.h" @@ -35,13 +35,13 @@ THE SOFTWARE. #include "CCShaderCache.h" #include "2d/CCGLProgram.h" #include "2d/ccGLStateCache.h" -#include "2d/CCDirector.h" +#include "base/CCDirector.h" #include "TransformUtils.h" #include "CCProfiling.h" #include "2d/CCLayer.h" #include "CCScene.h" -#include "2d/renderer/CCRenderer.h" -#include "2d/renderer/CCQuadCommand.h" +#include "renderer/CCRenderer.h" +#include "renderer/CCQuadCommand.h" // external #include "deprecated/CCString.h" // For StringUtils::format diff --git a/cocos/2d/CCSpriteBatchNode.h b/cocos/2d/CCSpriteBatchNode.h index 0ca1cc7467..0f3be91dd8 100644 --- a/cocos/2d/CCSpriteBatchNode.h +++ b/cocos/2d/CCSpriteBatchNode.h @@ -34,8 +34,8 @@ THE SOFTWARE. #include "2d/CCNode.h" #include "2d/CCProtocols.h" #include "2d/CCTextureAtlas.h" -#include "2d/ccMacros.h" -#include "2d/renderer/CCBatchCommand.h" +#include "base/ccMacros.h" +#include "renderer/CCBatchCommand.h" NS_CC_BEGIN diff --git a/cocos/2d/CCSpriteFrame.cpp b/cocos/2d/CCSpriteFrame.cpp index 1b5554f77d..3509ae96a8 100644 --- a/cocos/2d/CCSpriteFrame.cpp +++ b/cocos/2d/CCSpriteFrame.cpp @@ -26,7 +26,7 @@ THE SOFTWARE. ****************************************************************************/ #include "CCTextureCache.h" #include "2d/CCSpriteFrame.h" -#include "2d/CCDirector.h" +#include "base/CCDirector.h" NS_CC_BEGIN diff --git a/cocos/2d/CCSpriteFrame.h b/cocos/2d/CCSpriteFrame.h index c315524804..ae64fad5b7 100644 --- a/cocos/2d/CCSpriteFrame.h +++ b/cocos/2d/CCSpriteFrame.h @@ -31,7 +31,7 @@ THE SOFTWARE. #include "2d/CCNode.h" #include "2d/CCProtocols.h" #include "base/CCRef.h" -#include "base/CCGeometry.h" +#include "math/CCGeometry.h" NS_CC_BEGIN diff --git a/cocos/2d/CCSpriteFrameCache.cpp b/cocos/2d/CCSpriteFrameCache.cpp index daffe5a529..aa48875556 100644 --- a/cocos/2d/CCSpriteFrameCache.cpp +++ b/cocos/2d/CCSpriteFrameCache.cpp @@ -28,7 +28,7 @@ THE SOFTWARE. ****************************************************************************/ #include "CCNS.h" -#include "2d/ccMacros.h" +#include "base/ccMacros.h" #include "CCTextureCache.h" #include "2d/CCSpriteFrameCache.h" #include "2d/CCSpriteFrame.h" @@ -36,7 +36,7 @@ THE SOFTWARE. #include "TransformUtils.h" #include "2d/platform/CCFileUtils.h" #include "deprecated/CCString.h" -#include "2d/CCDirector.h" +#include "base/CCDirector.h" #include using namespace std; diff --git a/cocos/2d/CCTMXLayer.cpp b/cocos/2d/CCTMXLayer.cpp index 315174ce7f..cd1a7952c0 100644 --- a/cocos/2d/CCTMXLayer.cpp +++ b/cocos/2d/CCTMXLayer.cpp @@ -32,7 +32,7 @@ THE SOFTWARE. #include "CCShaderCache.h" #include "2d/CCGLProgram.h" #include "2d/ccCArray.h" -#include "2d/CCDirector.h" +#include "base/CCDirector.h" #include "deprecated/CCString.h" // For StringUtils::format diff --git a/cocos/2d/CCTMXObjectGroup.cpp b/cocos/2d/CCTMXObjectGroup.cpp index c039dd9da4..9d014fa459 100644 --- a/cocos/2d/CCTMXObjectGroup.cpp +++ b/cocos/2d/CCTMXObjectGroup.cpp @@ -26,7 +26,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ #include "CCTMXObjectGroup.h" -#include "2d/ccMacros.h" +#include "base/ccMacros.h" NS_CC_BEGIN diff --git a/cocos/2d/CCTMXObjectGroup.h b/cocos/2d/CCTMXObjectGroup.h index bba0e2c654..e31d39ded0 100644 --- a/cocos/2d/CCTMXObjectGroup.h +++ b/cocos/2d/CCTMXObjectGroup.h @@ -28,7 +28,7 @@ THE SOFTWARE. #ifndef __CCTMX_OBJECT_GROUP_H__ #define __CCTMX_OBJECT_GROUP_H__ -#include "base/CCGeometry.h" +#include "math/CCGeometry.h" #include "base/CCValue.h" #include "base/CCRef.h" diff --git a/cocos/2d/CCTMXXMLParser.cpp b/cocos/2d/CCTMXXMLParser.cpp index 94fe28d804..24dcc6fc9e 100644 --- a/cocos/2d/CCTMXXMLParser.cpp +++ b/cocos/2d/CCTMXXMLParser.cpp @@ -30,11 +30,11 @@ THE SOFTWARE. #include #include "CCTMXXMLParser.h" #include "CCTMXTiledMap.h" -#include "2d/ccMacros.h" +#include "base/ccMacros.h" #include "2d/platform/CCFileUtils.h" -#include "ZipUtils.h" -#include "base64.h" -#include "2d/CCDirector.h" +#include "base/ZipUtils.h" +#include "base/base64.h" +#include "base/CCDirector.h" using namespace std; diff --git a/cocos/2d/CCTMXXMLParser.h b/cocos/2d/CCTMXXMLParser.h index 9b23a0d739..f84f7d8ba8 100644 --- a/cocos/2d/CCTMXXMLParser.h +++ b/cocos/2d/CCTMXXMLParser.h @@ -29,7 +29,7 @@ THE SOFTWARE. #ifndef __CC_TM_XML_PARSER__ #define __CC_TM_XML_PARSER__ -#include "base/CCGeometry.h" +#include "math/CCGeometry.h" #include "2d/platform/CCSAXParser.h" #include "base/CCVector.h" #include "base/CCValue.h" diff --git a/cocos/2d/CCTextFieldTTF.cpp b/cocos/2d/CCTextFieldTTF.cpp index b01ffdd12c..44666aab61 100644 --- a/cocos/2d/CCTextFieldTTF.cpp +++ b/cocos/2d/CCTextFieldTTF.cpp @@ -25,7 +25,7 @@ THE SOFTWARE. #include "CCTextFieldTTF.h" -#include "2d/CCDirector.h" +#include "base/CCDirector.h" #include "CCGLView.h" NS_CC_BEGIN diff --git a/cocos/2d/CCTexture2D.cpp b/cocos/2d/CCTexture2D.cpp index c348cbc6d8..c30d319fba 100644 --- a/cocos/2d/CCTexture2D.cpp +++ b/cocos/2d/CCTexture2D.cpp @@ -32,14 +32,14 @@ THE SOFTWARE. */ #include "2d/CCTexture2D.h" -#include "2d/ccConfig.h" -#include "2d/ccMacros.h" +#include "base/ccConfig.h" +#include "base/ccMacros.h" #include "CCConfiguration.h" #include "2d/platform/CCImage.h" #include "CCGL.h" #include "ccUtils.h" #include "base/CCPlatformMacros.h" -#include "2d/CCDirector.h" +#include "base/CCDirector.h" #include "2d/CCGLProgram.h" #include "2d/ccGLStateCache.h" #include "CCShaderCache.h" @@ -1058,7 +1058,7 @@ Texture2D::PixelFormat Texture2D::convertDataToFormat(const unsigned char* data, } // implementation Texture2D (Text) -bool Texture2D::initWithString(const char *text, const char *fontName, float fontSize, const Size& dimensions/* = Size(0, 0)*/, TextHAlignment hAlignment/* = TextHAlignment::CENTER */, TextVAlignment vAlignment/* = TextVAlignment::TOP */) +bool Texture2D::initWithString(const char *text, const std::string& fontName, float fontSize, const Size& dimensions/* = Size(0, 0)*/, TextHAlignment hAlignment/* = TextHAlignment::CENTER */, TextVAlignment vAlignment/* = TextVAlignment::TOP */) { FontDefinition tempDef; @@ -1066,7 +1066,7 @@ bool Texture2D::initWithString(const char *text, const char *fontName, float fon tempDef._stroke._strokeEnabled = false; - tempDef._fontName = std::string(fontName); + tempDef._fontName = fontName; tempDef._fontSize = fontSize; tempDef._dimensions = dimensions; tempDef._alignment = hAlignment; diff --git a/cocos/2d/CCTexture2D.h b/cocos/2d/CCTexture2D.h index 20d92f3b1d..ce06b9e1f0 100644 --- a/cocos/2d/CCTexture2D.h +++ b/cocos/2d/CCTexture2D.h @@ -32,8 +32,8 @@ THE SOFTWARE. #include #include "base/CCRef.h" -#include "base/CCGeometry.h" -#include "2d/ccTypes.h" +#include "math/CCGeometry.h" +#include "base/ccTypes.h" #ifdef EMSCRIPTEN #include "CCGLBufferedNode.h" #endif // EMSCRIPTEN @@ -252,7 +252,7 @@ public: bool initWithImage(Image * image, PixelFormat format); /** Initializes a texture from a string with dimensions, alignment, font name and font size */ - bool initWithString(const char *text, const char *fontName, float fontSize, const Size& dimensions = Size(0, 0), TextHAlignment hAlignment = TextHAlignment::CENTER, TextVAlignment vAlignment = TextVAlignment::TOP); + bool initWithString(const char *text, const std::string &fontName, float fontSize, const Size& dimensions = Size(0, 0), TextHAlignment hAlignment = TextHAlignment::CENTER, TextVAlignment vAlignment = TextVAlignment::TOP); /** Initializes a texture from a string using a text definition*/ bool initWithString(const char *text, const FontDefinition& textDefinition); diff --git a/cocos/2d/CCTextureAtlas.cpp b/cocos/2d/CCTextureAtlas.cpp index 4213e7b98f..968f3141c2 100644 --- a/cocos/2d/CCTextureAtlas.cpp +++ b/cocos/2d/CCTextureAtlas.cpp @@ -28,21 +28,21 @@ THE SOFTWARE. // cocos2d #include "2d/CCTextureAtlas.h" #include "CCTextureCache.h" -#include "2d/ccMacros.h" +#include "base/ccMacros.h" #include "2d/CCGLProgram.h" #include "2d/ccGLStateCache.h" -#include "2d/CCEventType.h" -#include "2d/CCDirector.h" +#include "base/CCEventType.h" +#include "base/CCDirector.h" #include "CCGL.h" #include "CCConfiguration.h" -#include "2d/renderer/CCRenderer.h" +#include "renderer/CCRenderer.h" // support #include "2d/CCTexture2D.h" #include "deprecated/CCString.h" #include -#include "2d/CCEventDispatcher.h" -#include "2d/CCEventListenerCustom.h" +#include "base/CCEventDispatcher.h" +#include "base/CCEventListenerCustom.h" //According to some tests GL_TRIANGLE_STRIP is slower, MUCH slower. Probably I'm doing something very wrong diff --git a/cocos/2d/CCTextureAtlas.h b/cocos/2d/CCTextureAtlas.h index 53ec1a9f5e..1916af4e94 100644 --- a/cocos/2d/CCTextureAtlas.h +++ b/cocos/2d/CCTextureAtlas.h @@ -28,9 +28,9 @@ THE SOFTWARE. #ifndef __CCTEXTURE_ATLAS_H__ #define __CCTEXTURE_ATLAS_H__ -#include "2d/ccTypes.h" +#include "base/ccTypes.h" #include "base/CCRef.h" -#include "2d/ccConfig.h" +#include "base/ccConfig.h" #include NS_CC_BEGIN diff --git a/cocos/2d/CCTextureCache.cpp b/cocos/2d/CCTextureCache.cpp index 9240176903..ea733260bc 100644 --- a/cocos/2d/CCTextureCache.cpp +++ b/cocos/2d/CCTextureCache.cpp @@ -32,11 +32,11 @@ THE SOFTWARE. #include "CCTextureCache.h" #include "2d/CCTexture2D.h" -#include "2d/ccMacros.h" -#include "2d/CCDirector.h" +#include "base/ccMacros.h" +#include "base/CCDirector.h" #include "2d/platform/CCFileUtils.h" #include "ccUtils.h" -#include "CCScheduler.h" +#include "base/CCScheduler.h" #include "deprecated/CCString.h" diff --git a/cocos/2d/CCTileMapAtlas.cpp b/cocos/2d/CCTileMapAtlas.cpp index 502592c7e4..14e93b6ace 100644 --- a/cocos/2d/CCTileMapAtlas.cpp +++ b/cocos/2d/CCTileMapAtlas.cpp @@ -28,8 +28,8 @@ THE SOFTWARE. #include "2d/platform/CCFileUtils.h" #include "2d/CCTextureAtlas.h" #include "TGAlib.h" -#include "2d/ccConfig.h" -#include "2d/CCDirector.h" +#include "base/ccConfig.h" +#include "base/CCDirector.h" #include "deprecated/CCString.h" #include diff --git a/cocos/2d/CCTransition.cpp b/cocos/2d/CCTransition.cpp index 0e61d8f9cf..cbba9a539c 100644 --- a/cocos/2d/CCTransition.cpp +++ b/cocos/2d/CCTransition.cpp @@ -26,7 +26,7 @@ THE SOFTWARE. ****************************************************************************/ #include "CCTransition.h" -#include "2d/CCDirector.h" +#include "base/CCDirector.h" #include "2d/CCActionInterval.h" #include "2d/CCActionInstant.h" #include "2d/CCActionEase.h" diff --git a/cocos/2d/CCTransition.h b/cocos/2d/CCTransition.h index 63d5208405..d5e022670f 100644 --- a/cocos/2d/CCTransition.h +++ b/cocos/2d/CCTransition.h @@ -29,7 +29,7 @@ THE SOFTWARE. #define __CCTRANSITION_H__ #include "CCScene.h" -#include "2d/ccTypes.h" +#include "base/ccTypes.h" NS_CC_BEGIN diff --git a/cocos/2d/CCTransitionPageTurn.cpp b/cocos/2d/CCTransitionPageTurn.cpp index df04c77bc2..c497e07ee6 100644 --- a/cocos/2d/CCTransitionPageTurn.cpp +++ b/cocos/2d/CCTransitionPageTurn.cpp @@ -25,13 +25,13 @@ THE SOFTWARE. ****************************************************************************/ #include "CCTransitionPageTurn.h" -#include "2d/CCDirector.h" +#include "base/CCDirector.h" #include "2d/CCActionInterval.h" #include "2d/CCActionInstant.h" #include "2d/CCActionGrid.h" #include "2d/CCActionPageTurn3D.h" #include "CCNodeGrid.h" -#include "2d/renderer/CCRenderer.h" +#include "renderer/CCRenderer.h" NS_CC_BEGIN diff --git a/cocos/2d/CCTransitionPageTurn.h b/cocos/2d/CCTransitionPageTurn.h index 15b31a23bd..8f85d8d328 100644 --- a/cocos/2d/CCTransitionPageTurn.h +++ b/cocos/2d/CCTransitionPageTurn.h @@ -28,7 +28,7 @@ THE SOFTWARE. #define __CCPAGE_TURN_TRANSITION_H__ #include "CCTransition.h" -#include "2d/renderer/CCCustomCommand.h" +#include "renderer/CCCustomCommand.h" NS_CC_BEGIN diff --git a/cocos/2d/CCTransitionProgress.cpp b/cocos/2d/CCTransitionProgress.cpp index acd6b8da3d..ce9d7bb171 100644 --- a/cocos/2d/CCTransitionProgress.cpp +++ b/cocos/2d/CCTransitionProgress.cpp @@ -27,7 +27,7 @@ THE SOFTWARE. #include "CCTransitionProgress.h" -#include "2d/CCDirector.h" +#include "base/CCDirector.h" #include "CCRenderTexture.h" #include "2d/CCProgressTimer.h" #include "2d/CCLayer.h" diff --git a/cocos/2d/CCTweenFunction.h b/cocos/2d/CCTweenFunction.h index b4b97a0c56..acf8e17afb 100644 --- a/cocos/2d/CCTweenFunction.h +++ b/cocos/2d/CCTweenFunction.h @@ -26,7 +26,7 @@ THE SOFTWARE. #define __CCTWEENFUNCTION_H__ #include "base/CCPlatformMacros.h" -#include "2d/ccMacros.h" +#include "base/ccMacros.h" #include NS_CC_BEGIN diff --git a/cocos/2d/CCUserDefault.cpp b/cocos/2d/CCUserDefault.cpp index 4dc184a50f..2699e0a555 100644 --- a/cocos/2d/CCUserDefault.cpp +++ b/cocos/2d/CCUserDefault.cpp @@ -26,7 +26,7 @@ THE SOFTWARE. #include "2d/platform/CCCommon.h" #include "2d/platform/CCFileUtils.h" #include "tinyxml2.h" -#include "base64.h" +#include "base/base64.h" #if (CC_TARGET_PLATFORM != CC_PLATFORM_IOS && CC_TARGET_PLATFORM != CC_PLATFORM_ANDROID) diff --git a/cocos/2d/CCUserDefaultAndroid.cpp b/cocos/2d/CCUserDefaultAndroid.cpp index bcd269535f..1ec69d220b 100644 --- a/cocos/2d/CCUserDefaultAndroid.cpp +++ b/cocos/2d/CCUserDefaultAndroid.cpp @@ -25,7 +25,7 @@ THE SOFTWARE. #include "CCUserDefault.h" #include "base/CCPlatformConfig.h" #include "2d/platform/CCCommon.h" -#include "base64.h" +#include "base/base64.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) #include "2d/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxHelper.h" diff --git a/cocos/2d/CCVertex.cpp b/cocos/2d/CCVertex.cpp index da9b584218..f35564dc32 100644 --- a/cocos/2d/CCVertex.cpp +++ b/cocos/2d/CCVertex.cpp @@ -25,7 +25,7 @@ ****************************************************************************/ #include "CCVertex.h" -#include "2d/ccMacros.h" +#include "base/ccMacros.h" NS_CC_BEGIN diff --git a/cocos/2d/CCVertex.h b/cocos/2d/CCVertex.h index 9178cfaba8..fca1ab3b44 100644 --- a/cocos/2d/CCVertex.h +++ b/cocos/2d/CCVertex.h @@ -26,7 +26,7 @@ #ifndef __CCVERTEX_H__ #define __CCVERTEX_H__ -#include "2d/ccTypes.h" +#include "base/ccTypes.h" NS_CC_BEGIN diff --git a/cocos/2d/CMakeLists.txt b/cocos/2d/CMakeLists.txt index 6e6dd77130..8149da31a6 100644 --- a/cocos/2d/CMakeLists.txt +++ b/cocos/2d/CMakeLists.txt @@ -30,7 +30,7 @@ endif() set(COCOS2D_SRC CCAction.cpp CCActionCamera.cpp - CCTweenFunction.cpp + CCActionCatmullRom.cpp CCActionEase.cpp CCActionGrid.cpp CCActionGrid3D.cpp @@ -40,108 +40,81 @@ set(COCOS2D_SRC CCActionPageTurn3D.cpp CCActionProgressTimer.cpp CCActionTiledGrid.cpp - CCActionCatmullRom.cpp CCActionTween.cpp + CCAnimation.cpp + CCAnimationCache.cpp CCAtlasNode.cpp - CCNode.cpp - CCEventAcceleration.cpp - CCEventListenerAcceleration.cpp - CCEvent.cpp - CCEventDispatcher.cpp - CCEventListener.cpp - CCEventKeyboard.cpp - CCEventListenerKeyboard.cpp - CCEventMouse.cpp - CCEventListenerMouse.cpp - CCTouch.cpp - CCEventTouch.cpp - CCEventListenerTouch.cpp - CCEventCustom.cpp - CCEventListenerCustom.cpp - CCDrawingPrimitives.cpp + CCClippingNode.cpp + CCComponent.cpp + CCComponentContainer.cpp CCDrawNode.cpp - CCGrabber.cpp - CCGrid.cpp - CCNodeGrid.cpp + CCDrawingPrimitives.cpp CCFont.cpp CCFontAtlas.cpp CCFontAtlasCache.cpp + CCFontCharMap.cpp CCFontFNT.cpp CCFontFreeType.cpp - CCFontCharMap.cpp + CCGLBufferedNode.cpp + CCGLProgram.cpp + CCGrabber.cpp + CCGrid.cpp + CCIMEDispatcher.cpp CCLabel.cpp CCLabelAtlas.cpp CCLabelBMFont.cpp CCLabelTTF.cpp CCLabelTextFormatter.cpp CCLayer.cpp - CCScene.cpp - CCTransition.cpp - CCTransitionPageTurn.cpp - CCTransitionProgress.cpp CCMenu.cpp CCMenuItem.cpp CCMotionStreak.cpp - CCProgressTimer.cpp - CCClippingNode.cpp - CCRenderTexture.cpp + CCNode.cpp + CCNodeGrid.cpp + CCParallaxNode.cpp + CCParticleBatchNode.cpp CCParticleExamples.cpp CCParticleSystem.cpp CCParticleSystemQuad.cpp - CCParticleBatchNode.cpp + CCProgressTimer.cpp + CCRenderTexture.cpp + CCScene.cpp CCScriptSupport.cpp - CCAnimation.cpp - CCAnimationCache.cpp + CCShaderCache.cpp CCSprite.cpp CCSpriteBatchNode.cpp CCSpriteFrame.cpp CCSpriteFrameCache.cpp - ccUTF8.cpp - CCProfiling.cpp - CCUserDefault.cpp - TransformUtils.cpp - base64.cpp - ccUtils.cpp - CCVertex.cpp - TGAlib.cpp - ZipUtils.cpp - ccCArray.cpp - CCComponent.cpp - CCComponentContainer.cpp - CCIMEDispatcher.cpp - CCTextFieldTTF.cpp - CCTexture2D.cpp - CCTextureAtlas.cpp - CCTextureCache.cpp - CCParallaxNode.cpp CCTMXLayer.cpp CCTMXObjectGroup.cpp CCTMXTiledMap.cpp CCTMXXMLParser.cpp + CCTextFieldTTF.cpp + CCTexture2D.cpp + CCTextureAtlas.cpp + CCTextureCache.cpp CCTileMapAtlas.cpp - CCGLProgram.cpp + CCTransition.cpp + CCTransitionPageTurn.cpp + CCTransitionProgress.cpp + CCTweenFunction.cpp + CCUserDefault.cpp + CCUserDefaultAndroid.cpp + CCVertex.cpp + TGAlib.cpp + TransformUtils.cpp + ccCArray.cpp ccGLStateCache.cpp - CCShaderCache.cpp ccShaders.cpp - CCConfiguration.cpp - CCDirector.cpp - CCScheduler.cpp + ccUTF8.cpp + ccUtils.cpp ccFPSImages.c - ccTypes.cpp ../cocos2d.cpp platform/CCSAXParser.cpp platform/CCThread.cpp platform/CCGLViewProtocol.cpp platform/CCFileUtils.cpp platform/CCImage.cpp - renderer/CCCustomCommand.cpp - renderer/CCGroupCommand.cpp - renderer/CCMaterialManager.cpp - renderer/CCQuadCommand.cpp - renderer/CCBatchCommand.cpp - renderer/CCRenderCommand.cpp - renderer/CCRenderer.cpp - renderer/CCRenderMaterial.cpp ../deprecated/CCDeprecated.cpp ../deprecated/CCNotificationCenter.cpp ../../external/edtaa3func/edtaa3func.cpp @@ -212,6 +185,7 @@ set(COCOS_LINK endif() target_link_libraries(cocos2d + cocosrenderer cocosbase cocosmath chipmunk_static diff --git a/cocos/2d/ccCArray.cpp b/cocos/2d/ccCArray.cpp index faa80e60c1..78e7c2cfc7 100644 --- a/cocos/2d/ccCArray.cpp +++ b/cocos/2d/ccCArray.cpp @@ -26,7 +26,7 @@ THE SOFTWARE. #include "2d/ccCArray.h" #include "base/CCRef.h" -#include "2d/ccTypes.h" +#include "base/ccTypes.h" NS_CC_BEGIN diff --git a/cocos/2d/ccCArray.h b/cocos/2d/ccCArray.h index b64a39e309..4d0dddaf08 100644 --- a/cocos/2d/ccCArray.h +++ b/cocos/2d/ccCArray.h @@ -43,7 +43,7 @@ THE SOFTWARE. #ifndef CC_ARRAY_H #define CC_ARRAY_H -#include "2d/ccMacros.h" +#include "base/ccMacros.h" #include "base/CCRef.h" #include diff --git a/cocos/2d/ccFPSImages.h b/cocos/2d/ccFPSImages.h index 0b2cc75518..ad9f012692 100644 --- a/cocos/2d/ccFPSImages.h +++ b/cocos/2d/ccFPSImages.h @@ -22,6 +22,9 @@ * THE SOFTWARE. */ +#ifndef __CCFPSIMAGES__H +#define __CCFPSIMAGES__H + #ifdef __cplusplus extern "C" { #endif @@ -32,3 +35,5 @@ unsigned int cc_fps_images_len(void); #ifdef __cplusplus } #endif + +#endif // __CCFPSIMAGES__H diff --git a/cocos/2d/ccGLStateCache.cpp b/cocos/2d/ccGLStateCache.cpp index a08ce097c2..3ca3460e9b 100644 --- a/cocos/2d/ccGLStateCache.cpp +++ b/cocos/2d/ccGLStateCache.cpp @@ -27,8 +27,8 @@ THE SOFTWARE. #include "2d/ccGLStateCache.h" #include "2d/CCGLProgram.h" -#include "2d/CCDirector.h" -#include "2d/ccConfig.h" +#include "base/CCDirector.h" +#include "base/ccConfig.h" #include "CCConfiguration.h" NS_CC_BEGIN diff --git a/cocos/2d/platform/CCDevice.h b/cocos/2d/platform/CCDevice.h index 24f368016a..dfa696d076 100644 --- a/cocos/2d/platform/CCDevice.h +++ b/cocos/2d/platform/CCDevice.h @@ -27,7 +27,7 @@ THE SOFTWARE. #define __CCDEVICE_H__ #include "base/CCPlatformMacros.h" -#include "2d/ccMacros.h" +#include "base/ccMacros.h" #include "base/CCData.h" NS_CC_BEGIN diff --git a/cocos/2d/platform/CCFileUtils.cpp b/cocos/2d/platform/CCFileUtils.cpp index a19a88f0dc..e615f70e21 100644 --- a/cocos/2d/platform/CCFileUtils.cpp +++ b/cocos/2d/platform/CCFileUtils.cpp @@ -25,8 +25,8 @@ THE SOFTWARE. #include "CCFileUtils.h" #include "base/CCData.h" -#include "2d/ccMacros.h" -#include "2d/CCDirector.h" +#include "base/ccMacros.h" +#include "base/CCDirector.h" #include "CCSAXParser.h" #include "tinyxml2.h" #include "unzip.h" diff --git a/cocos/2d/platform/CCFileUtils.h b/cocos/2d/platform/CCFileUtils.h index b4530d5e05..567f17249c 100644 --- a/cocos/2d/platform/CCFileUtils.h +++ b/cocos/2d/platform/CCFileUtils.h @@ -26,7 +26,7 @@ THE SOFTWARE. #define __CC_FILEUTILS_H__ #include "base/CCPlatformMacros.h" -#include "2d/ccTypes.h" +#include "base/ccTypes.h" #include "base/CCValue.h" #include "base/CCData.h" diff --git a/cocos/2d/platform/CCGLViewProtocol.cpp b/cocos/2d/platform/CCGLViewProtocol.cpp index 2021b3fda3..6090772309 100644 --- a/cocos/2d/platform/CCGLViewProtocol.cpp +++ b/cocos/2d/platform/CCGLViewProtocol.cpp @@ -24,9 +24,9 @@ THE SOFTWARE. ****************************************************************************/ #include "CCGLViewProtocol.h" -#include "2d/CCTouch.h" -#include "2d/CCDirector.h" -#include "2d/CCEventDispatcher.h" +#include "base/CCTouch.h" +#include "base/CCDirector.h" +#include "base/CCEventDispatcher.h" NS_CC_BEGIN diff --git a/cocos/2d/platform/CCGLViewProtocol.h b/cocos/2d/platform/CCGLViewProtocol.h index 217f568f77..aaa795a9e5 100644 --- a/cocos/2d/platform/CCGLViewProtocol.h +++ b/cocos/2d/platform/CCGLViewProtocol.h @@ -26,8 +26,8 @@ THE SOFTWARE. #ifndef __CCGLVIEWPROTOCOL_H__ #define __CCGLVIEWPROTOCOL_H__ -#include "2d/ccTypes.h" -#include "2d/CCEventTouch.h" +#include "base/ccTypes.h" +#include "base/CCEventTouch.h" #include diff --git a/cocos/2d/platform/CCImage.cpp b/cocos/2d/platform/CCImage.cpp index 3cc700ec62..9f2759e683 100644 --- a/cocos/2d/platform/CCImage.cpp +++ b/cocos/2d/platform/CCImage.cpp @@ -50,13 +50,13 @@ extern "C" #include "decode.h" #endif -#include "2d/ccMacros.h" +#include "base/ccMacros.h" #include "CCCommon.h" #include "CCStdC.h" #include "CCFileUtils.h" #include "CCConfiguration.h" #include "ccUtils.h" -#include "ZipUtils.h" +#include "base/ZipUtils.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) #include "android/CCFileUtilsAndroid.h" #endif diff --git a/cocos/2d/platform/CCThread.h b/cocos/2d/platform/CCThread.h index 76c788c8ce..8783b82413 100644 --- a/cocos/2d/platform/CCThread.h +++ b/cocos/2d/platform/CCThread.h @@ -31,7 +31,7 @@ THE SOFTWARE. #include #include "2d/platform/CCCommon.h" #include "base/CCPlatformMacros.h" -#include "2d/CCDirector.h" +#include "base/CCDirector.h" NS_CC_BEGIN diff --git a/cocos/2d/platform/android/CCApplication.cpp b/cocos/2d/platform/android/CCApplication.cpp index 646284af78..9cfaf5d8a8 100644 --- a/cocos/2d/platform/android/CCApplication.cpp +++ b/cocos/2d/platform/android/CCApplication.cpp @@ -29,7 +29,7 @@ THE SOFTWARE. #include "jni/JniHelper.h" #include "jni/Java_org_cocos2dx_lib_Cocos2dxHelper.h" #include "CCApplication.h" -#include "2d/CCDirector.h" +#include "base/CCDirector.h" #include "CCGLView.h" #include #include diff --git a/cocos/2d/platform/android/CCDevice.cpp b/cocos/2d/platform/android/CCDevice.cpp index a5076939f7..2d3510b394 100644 --- a/cocos/2d/platform/android/CCDevice.cpp +++ b/cocos/2d/platform/android/CCDevice.cpp @@ -30,7 +30,7 @@ THE SOFTWARE. #include #include #include -#include "2d/ccTypes.h" +#include "base/ccTypes.h" #include "jni/DPIJni.h" #include "jni/Java_org_cocos2dx_lib_Cocos2dxHelper.h" #include "jni/JniHelper.h" diff --git a/cocos/2d/platform/android/CCFileUtilsAndroid.h b/cocos/2d/platform/android/CCFileUtilsAndroid.h index 718f0156b0..cad3d13a29 100644 --- a/cocos/2d/platform/android/CCFileUtilsAndroid.h +++ b/cocos/2d/platform/android/CCFileUtilsAndroid.h @@ -30,7 +30,7 @@ Copyright (c) 2013-2014 Chukong Technologies Inc. #include "2d/platform/CCFileUtils.h" #include "base/CCPlatformMacros.h" -#include "2d/ccTypes.h" +#include "base/ccTypes.h" #include #include #include "jni.h" diff --git a/cocos/2d/platform/android/CCGLView.cpp b/cocos/2d/platform/android/CCGLView.cpp index 97e715999f..35e88bfa4d 100644 --- a/cocos/2d/platform/android/CCGLView.cpp +++ b/cocos/2d/platform/android/CCGLView.cpp @@ -27,8 +27,8 @@ THE SOFTWARE. #if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID #include "CCGLView.h" -#include "2d/CCDirector.h" -#include "2d/ccMacros.h" +#include "base/CCDirector.h" +#include "base/ccMacros.h" #include "jni/IMEJni.h" #include "jni/Java_org_cocos2dx_lib_Cocos2dxHelper.h" #include "CCGL.h" diff --git a/cocos/2d/platform/android/CCGLView.h b/cocos/2d/platform/android/CCGLView.h index 81cbd7f02c..d8ea2b93de 100644 --- a/cocos/2d/platform/android/CCGLView.h +++ b/cocos/2d/platform/android/CCGLView.h @@ -30,7 +30,7 @@ THE SOFTWARE. #if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID #include "base/CCRef.h" -#include "base/CCGeometry.h" +#include "math/CCGeometry.h" #include "2d/platform/CCGLViewProtocol.h" NS_CC_BEGIN diff --git a/cocos/2d/platform/android/java/.classpath b/cocos/2d/platform/android/java/.classpath index 5cc5eb909c..51769745b2 100644 --- a/cocos/2d/platform/android/java/.classpath +++ b/cocos/2d/platform/android/java/.classpath @@ -2,7 +2,7 @@ - + diff --git a/cocos/2d/platform/android/java/project.properties b/cocos/2d/platform/android/java/project.properties index 88ca83f9d0..61afc8fe54 100644 --- a/cocos/2d/platform/android/java/project.properties +++ b/cocos/2d/platform/android/java/project.properties @@ -12,4 +12,4 @@ android.library=true # Project target. -target=android-10 +target=android-19 diff --git a/cocos/2d/platform/apple/CCFileUtilsApple.h b/cocos/2d/platform/apple/CCFileUtilsApple.h index f94ae04b5f..57519eed9c 100644 --- a/cocos/2d/platform/apple/CCFileUtilsApple.h +++ b/cocos/2d/platform/apple/CCFileUtilsApple.h @@ -30,7 +30,7 @@ #include #include #include "base/CCPlatformMacros.h" -#include "2d/ccTypes.h" +#include "base/ccTypes.h" NS_CC_BEGIN diff --git a/cocos/2d/platform/apple/CCFileUtilsApple.mm b/cocos/2d/platform/apple/CCFileUtilsApple.mm index 23c19825c5..1a10ace233 100644 --- a/cocos/2d/platform/apple/CCFileUtilsApple.mm +++ b/cocos/2d/platform/apple/CCFileUtilsApple.mm @@ -29,7 +29,7 @@ THE SOFTWARE. #include #include "deprecated/CCString.h" #include "CCFileUtils.h" -#include "2d/CCDirector.h" +#include "base/CCDirector.h" #include "CCSAXParser.h" #include "CCDictionary.h" #include "unzip.h" diff --git a/cocos/2d/platform/desktop/CCGLView.cpp b/cocos/2d/platform/desktop/CCGLView.cpp index ac9ba351a4..8ecc788a67 100644 --- a/cocos/2d/platform/desktop/CCGLView.cpp +++ b/cocos/2d/platform/desktop/CCGLView.cpp @@ -24,11 +24,11 @@ THE SOFTWARE. ****************************************************************************/ #include "CCGLView.h" -#include "2d/CCDirector.h" -#include "2d/CCTouch.h" -#include "2d/CCEventDispatcher.h" -#include "2d/CCEventKeyboard.h" -#include "2d/CCEventMouse.h" +#include "base/CCDirector.h" +#include "base/CCTouch.h" +#include "base/CCEventDispatcher.h" +#include "base/CCEventKeyboard.h" +#include "base/CCEventMouse.h" #include "CCIMEDispatcher.h" #include diff --git a/cocos/2d/platform/ios/CCCommon.mm b/cocos/2d/platform/ios/CCCommon.mm index bae6827bf2..4607ba6e9f 100644 --- a/cocos/2d/platform/ios/CCCommon.mm +++ b/cocos/2d/platform/ios/CCCommon.mm @@ -32,7 +32,7 @@ #include #import -#include "2d/CCDirector.h" +#include "base/CCDirector.h" #include "base/CCConsole.h" NS_CC_BEGIN diff --git a/cocos/2d/platform/ios/CCDevice.mm b/cocos/2d/platform/ios/CCDevice.mm index f250750218..a90ffcceb9 100644 --- a/cocos/2d/platform/ios/CCDevice.mm +++ b/cocos/2d/platform/ios/CCDevice.mm @@ -28,10 +28,10 @@ #if CC_TARGET_PLATFORM == CC_PLATFORM_IOS #include "CCDevice.h" -#include "2d/ccTypes.h" -#include "2d/CCEventDispatcher.h" -#include "2d/CCEventAcceleration.h" -#include "2d/CCDirector.h" +#include "base/ccTypes.h" +#include "base/CCEventDispatcher.h" +#include "base/CCEventAcceleration.h" +#include "base/CCDirector.h" #import // Accelerometer diff --git a/cocos/2d/platform/ios/CCGLView.mm b/cocos/2d/platform/ios/CCGLView.mm index 2c78ca6124..c5490ebf08 100644 --- a/cocos/2d/platform/ios/CCGLView.mm +++ b/cocos/2d/platform/ios/CCGLView.mm @@ -33,7 +33,7 @@ #include "CCDirectorCaller.h" #include "CCGLView.h" #include "CCSet.h" -#include "2d/CCTouch.h" +#include "base/CCTouch.h" NS_CC_BEGIN diff --git a/cocos/2d/platform/linux/CCApplication.cpp b/cocos/2d/platform/linux/CCApplication.cpp index af54efd7c1..89529c8553 100644 --- a/cocos/2d/platform/linux/CCApplication.cpp +++ b/cocos/2d/platform/linux/CCApplication.cpp @@ -30,7 +30,7 @@ THE SOFTWARE. #include #include #include -#include "2d/CCDirector.h" +#include "base/CCDirector.h" #include "2d/platform/CCFileUtils.h" #include "CCGLView.h" diff --git a/cocos/2d/platform/linux/CCFileUtilsLinux.cpp b/cocos/2d/platform/linux/CCFileUtilsLinux.cpp index 47fded18a4..12133cbca9 100644 --- a/cocos/2d/platform/linux/CCFileUtilsLinux.cpp +++ b/cocos/2d/platform/linux/CCFileUtilsLinux.cpp @@ -28,7 +28,7 @@ THE SOFTWARE. #include "CCFileUtilsLinux.h" #include "2d/platform/CCCommon.h" -#include "2d/ccMacros.h" +#include "base/ccMacros.h" #include "CCApplication.h" #include "deprecated/CCString.h" #include diff --git a/cocos/2d/platform/linux/CCFileUtilsLinux.h b/cocos/2d/platform/linux/CCFileUtilsLinux.h index 2a62043d2b..a1b45e8e29 100644 --- a/cocos/2d/platform/linux/CCFileUtilsLinux.h +++ b/cocos/2d/platform/linux/CCFileUtilsLinux.h @@ -30,7 +30,7 @@ THE SOFTWARE. #include "2d/platform/CCFileUtils.h" #include "base/CCPlatformMacros.h" -#include "2d/ccTypes.h" +#include "base/ccTypes.h" #include #include diff --git a/cocos/2d/platform/mac/CCApplication.mm b/cocos/2d/platform/mac/CCApplication.mm index a53a15c770..d311c1d1b4 100644 --- a/cocos/2d/platform/mac/CCApplication.mm +++ b/cocos/2d/platform/mac/CCApplication.mm @@ -30,8 +30,8 @@ THE SOFTWARE. #import #include #include "2d/platform/CCFileUtils.h" -#include "base/CCGeometry.h" -#include "2d/CCDirector.h" +#include "math/CCGeometry.h" +#include "base/CCDirector.h" #import "CCDirectorCaller.h" #include "CCGLView.h" diff --git a/cocos/2d/platform/mac/CCCommon.mm b/cocos/2d/platform/mac/CCCommon.mm index ca0194c73f..be3c7b3cad 100644 --- a/cocos/2d/platform/mac/CCCommon.mm +++ b/cocos/2d/platform/mac/CCCommon.mm @@ -28,7 +28,7 @@ THE SOFTWARE. #include "2d/platform/CCCommon.h" -#include "2d/CCDirector.h" +#include "base/CCDirector.h" #include "CCGLView.h" #define GLFW_EXPOSE_NATIVE_NSGL diff --git a/cocos/2d/platform/mac/CCDevice.mm b/cocos/2d/platform/mac/CCDevice.mm index eb0bfa1130..faa82f1f9e 100644 --- a/cocos/2d/platform/mac/CCDevice.mm +++ b/cocos/2d/platform/mac/CCDevice.mm @@ -30,7 +30,7 @@ THE SOFTWARE. #include #include #include -#include "2d/ccTypes.h" +#include "base/ccTypes.h" NS_CC_BEGIN diff --git a/cocos/2d/platform/win32/CCApplication.cpp b/cocos/2d/platform/win32/CCApplication.cpp index b9cb550d81..a67ba66439 100644 --- a/cocos/2d/platform/win32/CCApplication.cpp +++ b/cocos/2d/platform/win32/CCApplication.cpp @@ -28,7 +28,7 @@ THE SOFTWARE. #include "CCApplication.h" #include "CCGLView.h" -#include "2d/CCDirector.h" +#include "base/CCDirector.h" #include #include "2d/platform/CCFileUtils.h" /** diff --git a/cocos/2d/platform/win32/CCFileUtilsWin32.h b/cocos/2d/platform/win32/CCFileUtilsWin32.h index 36568061b4..d075aa94e9 100644 --- a/cocos/2d/platform/win32/CCFileUtilsWin32.h +++ b/cocos/2d/platform/win32/CCFileUtilsWin32.h @@ -30,7 +30,7 @@ THE SOFTWARE. #include "2d/platform/CCFileUtils.h" #include "base/CCPlatformMacros.h" -#include "2d/ccTypes.h" +#include "base/ccTypes.h" #include #include diff --git a/cocos/2d/renderer/CCMaterialManager.cpp b/cocos/2d/renderer/CCMaterialManager.cpp deleted file mode 100644 index 04db21ec76..0000000000 --- a/cocos/2d/renderer/CCMaterialManager.cpp +++ /dev/null @@ -1,107 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013-2014 Chukong Technologies Inc. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - - -#include "CCMaterialManager.h" - -NS_CC_BEGIN - -using namespace std; - -static MaterialManager* s_instance = nullptr; - -MaterialManager *MaterialManager::getInstance() -{ - if(!s_instance) - { - s_instance = new MaterialManager(); - if(!s_instance->init()) - { - CC_SAFE_DELETE(s_instance); - } - } - return s_instance; -} - -void MaterialManager::destroyInstance() -{ - CC_SAFE_RELEASE_NULL(s_instance); -} - -void MaterialManager::getMaterialID(GLuint textureID, GLuint shaderID, BlendFunc blendFunc) -{ - -} - -void MaterialManager::registerTexture(GLuint textureID) -{ - -} - -void MaterialManager::unregisterTexture(GLuint textureID) -{ - -} - -void MaterialManager::registerShader(GLuint shaderID) -{ - -} - -void MaterialManager::unregisterShader(GLuint shaderID) -{ - -} - -MaterialManager::MaterialManager() -{ - -} - -MaterialManager::~MaterialManager() -{ - -} - -bool MaterialManager::init() -{ - return false; -} - -int MaterialManager::getTextureID(GLuint textureID) -{ - return 0; -} - -int MaterialManager::getShaderID(GLuint shaderID) -{ - return 0; -} - -int MaterialManager::getBlendFuncID(GLint blendFunc) -{ - return 0; -} - -NS_CC_END \ No newline at end of file diff --git a/cocos/2d/renderer/CCMaterialManager.h b/cocos/2d/renderer/CCMaterialManager.h deleted file mode 100644 index 0c2b82180f..0000000000 --- a/cocos/2d/renderer/CCMaterialManager.h +++ /dev/null @@ -1,68 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013-2014 Chukong Technologies Inc. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - - -#ifndef _CC_MATERIALMANAGER_H_ -#define _CC_MATERIALMANAGER_H_ - -#include "base/CCPlatformMacros.h" -#include "base/CCRef.h" -#include "2d/ccTypes.h" -#include - -NS_CC_BEGIN - -class MaterialManager : public Ref -{ -public: - static MaterialManager* getInstance(); - static void destroyInstance(); - - - void getMaterialID(GLuint textureID, GLuint shaderID, BlendFunc blendFunc); - - void registerTexture(GLuint textureID); - void unregisterTexture(GLuint textureID); - - void registerShader(GLuint shaderID); - void unregisterShader(GLuint shaderID); - -protected: - MaterialManager(); - virtual ~MaterialManager(); - - bool init(); - - int getTextureID(GLuint textureID); - int getShaderID(GLuint shaderID); - int getBlendFuncID(GLint blendFunc); - - std::map _textureIDMapping; - std::map _shaderIDMapping; - std::map _blendFuncMapping; -}; - -NS_CC_END - -#endif //_CC_MATERIALMANAGER_H_ diff --git a/cocos/2d/renderer/CCRenderMaterial.cpp b/cocos/2d/renderer/CCRenderMaterial.cpp deleted file mode 100644 index 4b85023d49..0000000000 --- a/cocos/2d/renderer/CCRenderMaterial.cpp +++ /dev/null @@ -1,26 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013-2014 Chukong Technologies Inc. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - - -#include "CCRenderMaterial.h" diff --git a/cocos/2d/renderer/CCRenderMaterial.h b/cocos/2d/renderer/CCRenderMaterial.h deleted file mode 100644 index 9a51225ba0..0000000000 --- a/cocos/2d/renderer/CCRenderMaterial.h +++ /dev/null @@ -1,36 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013-2014 Chukong Technologies Inc. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - - -#ifndef __RenderMaterial_H_ -#define __RenderMaterial_H_ - - -class RenderMaterial -{ - -}; - - -#endif //__RenderMaterial_H_ diff --git a/cocos/base/CCAutoreleasePool.cpp b/cocos/base/CCAutoreleasePool.cpp index fbadd4f3ba..466d91f944 100644 --- a/cocos/base/CCAutoreleasePool.cpp +++ b/cocos/base/CCAutoreleasePool.cpp @@ -23,7 +23,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ #include "CCAutoreleasePool.h" -#include "2d/ccMacros.h" +#include "base/ccMacros.h" NS_CC_BEGIN diff --git a/cocos/2d/CCConfiguration.cpp b/cocos/base/CCConfiguration.cpp similarity index 99% rename from cocos/2d/CCConfiguration.cpp rename to cocos/base/CCConfiguration.cpp index 99eac09a78..ef464c5843 100644 --- a/cocos/2d/CCConfiguration.cpp +++ b/cocos/base/CCConfiguration.cpp @@ -26,8 +26,8 @@ THE SOFTWARE. #include "CCConfiguration.h" #include -#include "2d/ccMacros.h" -#include "2d/ccConfig.h" +#include "base/ccMacros.h" +#include "base/ccConfig.h" #include "2d/platform/CCFileUtils.h" NS_CC_BEGIN diff --git a/cocos/2d/CCConfiguration.h b/cocos/base/CCConfiguration.h similarity index 100% rename from cocos/2d/CCConfiguration.h rename to cocos/base/CCConfiguration.h diff --git a/cocos/base/CCConsole.cpp b/cocos/base/CCConsole.cpp index 927647b710..5dfcd7cc7d 100644 --- a/cocos/base/CCConsole.cpp +++ b/cocos/base/CCConsole.cpp @@ -54,15 +54,15 @@ #include #endif -#include "2d/CCDirector.h" -#include "CCScheduler.h" +#include "base/CCDirector.h" +#include "base/CCScheduler.h" #include "CCScene.h" #include "base/CCPlatformConfig.h" #include "2d/platform/CCFileUtils.h" #include "CCConfiguration.h" #include "CCTextureCache.h" #include "CCGLView.h" -#include "base64.h" +#include "base/base64.h" NS_CC_BEGIN //TODO: these general utils should be in a seperate class diff --git a/cocos/base/CCConsole.h b/cocos/base/CCConsole.h index 1528f24c0d..7db9d397b3 100644 --- a/cocos/base/CCConsole.h +++ b/cocos/base/CCConsole.h @@ -47,7 +47,7 @@ typedef SSIZE_T ssize_t; #include #include -#include "2d/ccMacros.h" +#include "base/ccMacros.h" #include "base/CCPlatformMacros.h" diff --git a/cocos/base/CCData.cpp b/cocos/base/CCData.cpp index 0023f453ab..9cff6809e8 100644 --- a/cocos/base/CCData.cpp +++ b/cocos/base/CCData.cpp @@ -25,7 +25,7 @@ #include "base/CCData.h" #include "2d/platform/CCCommon.h" -#include "2d/ccMacros.h" +#include "base/ccMacros.h" #include diff --git a/cocos/2d/CCDirector.cpp b/cocos/base/CCDirector.cpp similarity index 99% rename from cocos/2d/CCDirector.cpp rename to cocos/base/CCDirector.cpp index 3e8c87577f..5f771f8f64 100644 --- a/cocos/2d/CCDirector.cpp +++ b/cocos/base/CCDirector.cpp @@ -26,17 +26,17 @@ THE SOFTWARE. ****************************************************************************/ // cocos2d includes -#include "2d/CCDirector.h" +#include "base/CCDirector.h" // standard includes #include -#include "ccFPSImages.h" +#include "2d/ccFPSImages.h" #include "CCDrawingPrimitives.h" #include "CCNS.h" #include "CCScene.h" -#include "CCScheduler.h" -#include "2d/ccMacros.h" +#include "base/CCScheduler.h" +#include "base/ccMacros.h" #include "CCTransition.h" #include "CCTextureCache.h" #include "2d/CCSpriteFrameCache.h" @@ -47,7 +47,7 @@ THE SOFTWARE. #include "CCFontAtlasCache.h" #include "2d/CCActionManager.h" #include "CCAnimationCache.h" -#include "2d/CCTouch.h" +#include "base/CCTouch.h" #include "CCUserDefault.h" #include "2d/ccGLStateCache.h" #include "CCShaderCache.h" @@ -55,10 +55,10 @@ THE SOFTWARE. #include "2d/platform/CCImage.h" #include "CCGLView.h" #include "CCConfiguration.h" -#include "2d/CCEventDispatcher.h" -#include "2d/CCEventCustom.h" +#include "base/CCEventDispatcher.h" +#include "base/CCEventCustom.h" #include "CCFontFreeType.h" -#include "2d/renderer/CCRenderer.h" +#include "renderer/CCRenderer.h" #include "base/CCConsole.h" #include "math/CCMath.h" diff --git a/cocos/2d/CCDirector.h b/cocos/base/CCDirector.h similarity index 99% rename from cocos/2d/CCDirector.h rename to cocos/base/CCDirector.h index 9015564eec..14c7a4e6d7 100644 --- a/cocos/2d/CCDirector.h +++ b/cocos/base/CCDirector.h @@ -31,11 +31,11 @@ THE SOFTWARE. #include "base/CCPlatformMacros.h" #include "base/CCRef.h" -#include "2d/ccTypes.h" -#include "base/CCGeometry.h" +#include "base/ccTypes.h" +#include "math/CCGeometry.h" #include "base/CCVector.h" #include "CCGL.h" -#include "CCLabelAtlas.h" +#include "2d/CCLabelAtlas.h" #include #include "math/CCMath.h" diff --git a/cocos/2d/CCEvent.cpp b/cocos/base/CCEvent.cpp similarity index 98% rename from cocos/2d/CCEvent.cpp rename to cocos/base/CCEvent.cpp index 4525ee97e4..cb670123cd 100644 --- a/cocos/2d/CCEvent.cpp +++ b/cocos/base/CCEvent.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. ****************************************************************************/ -#include "2d/CCEvent.h" +#include "base/CCEvent.h" NS_CC_BEGIN diff --git a/cocos/2d/CCEvent.h b/cocos/base/CCEvent.h similarity index 100% rename from cocos/2d/CCEvent.h rename to cocos/base/CCEvent.h diff --git a/cocos/2d/CCEventAcceleration.cpp b/cocos/base/CCEventAcceleration.cpp similarity index 97% rename from cocos/2d/CCEventAcceleration.cpp rename to cocos/base/CCEventAcceleration.cpp index d1e1d6b091..628eb4af7e 100644 --- a/cocos/2d/CCEventAcceleration.cpp +++ b/cocos/base/CCEventAcceleration.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. ****************************************************************************/ -#include "2d/CCEventAcceleration.h" +#include "base/CCEventAcceleration.h" NS_CC_BEGIN diff --git a/cocos/2d/CCEventAcceleration.h b/cocos/base/CCEventAcceleration.h similarity index 96% rename from cocos/2d/CCEventAcceleration.h rename to cocos/base/CCEventAcceleration.h index 5be7bd4bda..d03c3cae72 100644 --- a/cocos/2d/CCEventAcceleration.h +++ b/cocos/base/CCEventAcceleration.h @@ -25,8 +25,8 @@ #ifndef __cocos2d_libs__CCAccelerometerEvent__ #define __cocos2d_libs__CCAccelerometerEvent__ -#include "2d/CCEvent.h" -#include "2d/ccTypes.h" +#include "base/CCEvent.h" +#include "base/ccTypes.h" NS_CC_BEGIN diff --git a/cocos/2d/CCEventCustom.cpp b/cocos/base/CCEventCustom.cpp similarity index 96% rename from cocos/2d/CCEventCustom.cpp rename to cocos/base/CCEventCustom.cpp index beaa6b671a..8c0e7b5e8b 100644 --- a/cocos/2d/CCEventCustom.cpp +++ b/cocos/base/CCEventCustom.cpp @@ -22,8 +22,8 @@ THE SOFTWARE. ****************************************************************************/ -#include "2d/CCEventCustom.h" -#include "2d/ccMacros.h" +#include "base/CCEventCustom.h" +#include "base/ccMacros.h" #include NS_CC_BEGIN diff --git a/cocos/2d/CCEventCustom.h b/cocos/base/CCEventCustom.h similarity index 98% rename from cocos/2d/CCEventCustom.h rename to cocos/base/CCEventCustom.h index 8304d49e34..fce6a315c3 100644 --- a/cocos/2d/CCEventCustom.h +++ b/cocos/base/CCEventCustom.h @@ -25,7 +25,7 @@ #ifndef __cocos2d_libs__CCCustomEvent__ #define __cocos2d_libs__CCCustomEvent__ -#include "2d/CCEvent.h" +#include "base/CCEvent.h" NS_CC_BEGIN diff --git a/cocos/2d/CCEventDispatcher.cpp b/cocos/base/CCEventDispatcher.cpp similarity index 99% rename from cocos/2d/CCEventDispatcher.cpp rename to cocos/base/CCEventDispatcher.cpp index 7a4832e221..533c6903d7 100644 --- a/cocos/2d/CCEventDispatcher.cpp +++ b/cocos/base/CCEventDispatcher.cpp @@ -21,19 +21,19 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "2d/CCEventDispatcher.h" -#include "2d/CCEvent.h" -#include "2d/CCEventTouch.h" -#include "2d/CCEventCustom.h" -#include "2d/CCEventListenerTouch.h" -#include "2d/CCEventListenerAcceleration.h" -#include "2d/CCEventListenerMouse.h" -#include "2d/CCEventListenerKeyboard.h" -#include "2d/CCEventListenerCustom.h" +#include "base/CCEventDispatcher.h" +#include "base/CCEvent.h" +#include "base/CCEventTouch.h" +#include "base/CCEventCustom.h" +#include "base/CCEventListenerTouch.h" +#include "base/CCEventListenerAcceleration.h" +#include "base/CCEventListenerMouse.h" +#include "base/CCEventListenerKeyboard.h" +#include "base/CCEventListenerCustom.h" #include "CCScene.h" -#include "2d/CCDirector.h" -#include "2d/CCEventType.h" +#include "base/CCDirector.h" +#include "base/CCEventType.h" #include diff --git a/cocos/2d/CCEventDispatcher.h b/cocos/base/CCEventDispatcher.h similarity index 99% rename from cocos/2d/CCEventDispatcher.h rename to cocos/base/CCEventDispatcher.h index 696e4a4565..5fd9f80877 100644 --- a/cocos/2d/CCEventDispatcher.h +++ b/cocos/base/CCEventDispatcher.h @@ -26,8 +26,8 @@ #define __CC_EVENT_DISPATCHER_H__ #include "base/CCPlatformMacros.h" -#include "2d/CCEventListener.h" -#include "2d/CCEvent.h" +#include "base/CCEventListener.h" +#include "base/CCEvent.h" #include "CCStdC.h" #include diff --git a/cocos/2d/CCEventKeyboard.cpp b/cocos/base/CCEventKeyboard.cpp similarity index 97% rename from cocos/2d/CCEventKeyboard.cpp rename to cocos/base/CCEventKeyboard.cpp index a8eb9b76c7..fbbbbce536 100644 --- a/cocos/2d/CCEventKeyboard.cpp +++ b/cocos/base/CCEventKeyboard.cpp @@ -23,7 +23,7 @@ ****************************************************************************/ -#include "2d/CCEventKeyboard.h" +#include "base/CCEventKeyboard.h" NS_CC_BEGIN diff --git a/cocos/2d/CCEventKeyboard.h b/cocos/base/CCEventKeyboard.h similarity index 99% rename from cocos/2d/CCEventKeyboard.h rename to cocos/base/CCEventKeyboard.h index a465c2ed2d..9d077d5140 100644 --- a/cocos/2d/CCEventKeyboard.h +++ b/cocos/base/CCEventKeyboard.h @@ -26,7 +26,7 @@ #ifndef __cocos2d_libs__CCKeyboardEvent__ #define __cocos2d_libs__CCKeyboardEvent__ -#include "2d/CCEvent.h" +#include "base/CCEvent.h" NS_CC_BEGIN diff --git a/cocos/2d/CCEventListener.cpp b/cocos/base/CCEventListener.cpp similarity index 98% rename from cocos/2d/CCEventListener.cpp rename to cocos/base/CCEventListener.cpp index 7feb57cdd3..2c0985b6fd 100644 --- a/cocos/2d/CCEventListener.cpp +++ b/cocos/base/CCEventListener.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. ****************************************************************************/ -#include "2d/CCEventListener.h" +#include "base/CCEventListener.h" #include "2d/platform/CCCommon.h" NS_CC_BEGIN diff --git a/cocos/2d/CCEventListener.h b/cocos/base/CCEventListener.h similarity index 100% rename from cocos/2d/CCEventListener.h rename to cocos/base/CCEventListener.h diff --git a/cocos/2d/CCEventListenerAcceleration.cpp b/cocos/base/CCEventListenerAcceleration.cpp similarity index 97% rename from cocos/2d/CCEventListenerAcceleration.cpp rename to cocos/base/CCEventListenerAcceleration.cpp index 8f39fa5cac..dd404805aa 100644 --- a/cocos/2d/CCEventListenerAcceleration.cpp +++ b/cocos/base/CCEventListenerAcceleration.cpp @@ -22,8 +22,8 @@ THE SOFTWARE. ****************************************************************************/ -#include "2d/CCEventListenerAcceleration.h" -#include "2d/CCEventAcceleration.h" +#include "base/CCEventListenerAcceleration.h" +#include "base/CCEventAcceleration.h" NS_CC_BEGIN diff --git a/cocos/2d/CCEventListenerAcceleration.h b/cocos/base/CCEventListenerAcceleration.h similarity index 97% rename from cocos/2d/CCEventListenerAcceleration.h rename to cocos/base/CCEventListenerAcceleration.h index 5cfe310b26..78e145c87a 100644 --- a/cocos/2d/CCEventListenerAcceleration.h +++ b/cocos/base/CCEventListenerAcceleration.h @@ -25,8 +25,8 @@ #ifndef __cocos2d_libs__CCAccelerometerListener__ #define __cocos2d_libs__CCAccelerometerListener__ -#include "2d/CCEventListener.h" -#include "2d/ccTypes.h" +#include "base/CCEventListener.h" +#include "base/ccTypes.h" NS_CC_BEGIN diff --git a/cocos/2d/CCEventListenerCustom.cpp b/cocos/base/CCEventListenerCustom.cpp similarity index 97% rename from cocos/2d/CCEventListenerCustom.cpp rename to cocos/base/CCEventListenerCustom.cpp index c50629d880..f92578e5c5 100644 --- a/cocos/2d/CCEventListenerCustom.cpp +++ b/cocos/base/CCEventListenerCustom.cpp @@ -22,8 +22,8 @@ THE SOFTWARE. ****************************************************************************/ -#include "2d/CCEventListenerCustom.h" -#include "2d/CCEventCustom.h" +#include "base/CCEventListenerCustom.h" +#include "base/CCEventCustom.h" NS_CC_BEGIN diff --git a/cocos/2d/CCEventListenerCustom.h b/cocos/base/CCEventListenerCustom.h similarity index 98% rename from cocos/2d/CCEventListenerCustom.h rename to cocos/base/CCEventListenerCustom.h index 000609655b..10e9643790 100644 --- a/cocos/2d/CCEventListenerCustom.h +++ b/cocos/base/CCEventListenerCustom.h @@ -25,7 +25,7 @@ #ifndef __cocos2d_libs__CCCustomEventListener__ #define __cocos2d_libs__CCCustomEventListener__ -#include "2d/CCEventListener.h" +#include "base/CCEventListener.h" NS_CC_BEGIN diff --git a/cocos/2d/CCEventListenerKeyboard.cpp b/cocos/base/CCEventListenerKeyboard.cpp similarity index 96% rename from cocos/2d/CCEventListenerKeyboard.cpp rename to cocos/base/CCEventListenerKeyboard.cpp index 84d6d69bdb..c063ccdc4a 100644 --- a/cocos/2d/CCEventListenerKeyboard.cpp +++ b/cocos/base/CCEventListenerKeyboard.cpp @@ -23,9 +23,9 @@ ****************************************************************************/ -#include "2d/CCEventListenerKeyboard.h" -#include "2d/CCEventKeyboard.h" -#include "2d/ccMacros.h" +#include "base/CCEventListenerKeyboard.h" +#include "base/CCEventKeyboard.h" +#include "base/ccMacros.h" NS_CC_BEGIN diff --git a/cocos/2d/CCEventListenerKeyboard.h b/cocos/base/CCEventListenerKeyboard.h similarity index 96% rename from cocos/2d/CCEventListenerKeyboard.h rename to cocos/base/CCEventListenerKeyboard.h index 53c8c284cf..5f14abc2e9 100644 --- a/cocos/2d/CCEventListenerKeyboard.h +++ b/cocos/base/CCEventListenerKeyboard.h @@ -26,8 +26,8 @@ #ifndef __cocos2d_libs__CCKeyboardEventListener__ #define __cocos2d_libs__CCKeyboardEventListener__ -#include "2d/CCEventListener.h" -#include "2d/CCEventKeyboard.h" +#include "base/CCEventListener.h" +#include "base/CCEventKeyboard.h" NS_CC_BEGIN diff --git a/cocos/2d/CCEventListenerMouse.cpp b/cocos/base/CCEventListenerMouse.cpp similarity index 98% rename from cocos/2d/CCEventListenerMouse.cpp rename to cocos/base/CCEventListenerMouse.cpp index 87f7efc1bd..635fcfdd6b 100644 --- a/cocos/2d/CCEventListenerMouse.cpp +++ b/cocos/base/CCEventListenerMouse.cpp @@ -23,7 +23,7 @@ ****************************************************************************/ -#include "2d/CCEventListenerMouse.h" +#include "base/CCEventListenerMouse.h" NS_CC_BEGIN diff --git a/cocos/2d/CCEventListenerMouse.h b/cocos/base/CCEventListenerMouse.h similarity index 96% rename from cocos/2d/CCEventListenerMouse.h rename to cocos/base/CCEventListenerMouse.h index 13349da3c4..22708e137b 100644 --- a/cocos/2d/CCEventListenerMouse.h +++ b/cocos/base/CCEventListenerMouse.h @@ -23,8 +23,8 @@ ****************************************************************************/ -#include "2d/CCEventListener.h" -#include "2d/CCEventMouse.h" +#include "base/CCEventListener.h" +#include "base/CCEventMouse.h" #ifndef __cocos2d_libs__CCMouseEventListener__ #define __cocos2d_libs__CCMouseEventListener__ diff --git a/cocos/2d/CCEventListenerTouch.cpp b/cocos/base/CCEventListenerTouch.cpp similarity index 97% rename from cocos/2d/CCEventListenerTouch.cpp rename to cocos/base/CCEventListenerTouch.cpp index a922ce13fb..95e4df684a 100644 --- a/cocos/2d/CCEventListenerTouch.cpp +++ b/cocos/base/CCEventListenerTouch.cpp @@ -22,9 +22,9 @@ THE SOFTWARE. ****************************************************************************/ -#include "2d/CCEventListenerTouch.h" -#include "2d/CCEventDispatcher.h" -#include "2d/CCEventTouch.h" +#include "base/CCEventListenerTouch.h" +#include "base/CCEventDispatcher.h" +#include "base/CCEventTouch.h" #include diff --git a/cocos/2d/CCEventListenerTouch.h b/cocos/base/CCEventListenerTouch.h similarity index 98% rename from cocos/2d/CCEventListenerTouch.h rename to cocos/base/CCEventListenerTouch.h index 70534449ed..c2fbace749 100644 --- a/cocos/2d/CCEventListenerTouch.h +++ b/cocos/base/CCEventListenerTouch.h @@ -26,8 +26,8 @@ #ifndef __cocos2d_libs__CCTouchEventListener__ #define __cocos2d_libs__CCTouchEventListener__ -#include "2d/CCEventListener.h" -#include "2d/CCTouch.h" +#include "base/CCEventListener.h" +#include "base/CCTouch.h" #include diff --git a/cocos/2d/CCEventMouse.cpp b/cocos/base/CCEventMouse.cpp similarity index 97% rename from cocos/2d/CCEventMouse.cpp rename to cocos/base/CCEventMouse.cpp index 440d686e13..5bd662f1eb 100644 --- a/cocos/2d/CCEventMouse.cpp +++ b/cocos/base/CCEventMouse.cpp @@ -23,7 +23,7 @@ ****************************************************************************/ -#include "2d/CCEventMouse.h" +#include "base/CCEventMouse.h" NS_CC_BEGIN diff --git a/cocos/2d/CCEventMouse.h b/cocos/base/CCEventMouse.h similarity index 99% rename from cocos/2d/CCEventMouse.h rename to cocos/base/CCEventMouse.h index 392762c765..f1cfc19a90 100644 --- a/cocos/2d/CCEventMouse.h +++ b/cocos/base/CCEventMouse.h @@ -26,7 +26,7 @@ #ifndef __cocos2d_libs__CCMouseEvent__ #define __cocos2d_libs__CCMouseEvent__ -#include "2d/CCEvent.h" +#include "base/CCEvent.h" #define MOUSE_BUTTON_LEFT 0 #define MOUSE_BUTTON_RIGHT 1 diff --git a/cocos/2d/CCEventTouch.cpp b/cocos/base/CCEventTouch.cpp similarity index 97% rename from cocos/2d/CCEventTouch.cpp rename to cocos/base/CCEventTouch.cpp index 6ee817df6b..3c78fb89aa 100644 --- a/cocos/2d/CCEventTouch.cpp +++ b/cocos/base/CCEventTouch.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. ****************************************************************************/ -#include "2d/CCEventTouch.h" +#include "base/CCEventTouch.h" NS_CC_BEGIN diff --git a/cocos/2d/CCEventTouch.h b/cocos/base/CCEventTouch.h similarity index 97% rename from cocos/2d/CCEventTouch.h rename to cocos/base/CCEventTouch.h index ee08e3675a..60b0c96f0c 100644 --- a/cocos/2d/CCEventTouch.h +++ b/cocos/base/CCEventTouch.h @@ -25,8 +25,8 @@ #ifndef __cocos2d_libs__TouchEvent__ #define __cocos2d_libs__TouchEvent__ -#include "2d/CCEvent.h" -#include "2d/CCTouch.h" +#include "base/CCEvent.h" +#include "base/CCTouch.h" #include NS_CC_BEGIN diff --git a/cocos/2d/CCEventType.h b/cocos/base/CCEventType.h similarity index 100% rename from cocos/2d/CCEventType.h rename to cocos/base/CCEventType.h diff --git a/cocos/base/CCMap.h b/cocos/base/CCMap.h index a579d8f07e..11c0f02f27 100644 --- a/cocos/base/CCMap.h +++ b/cocos/base/CCMap.h @@ -27,7 +27,7 @@ #define USE_STD_UNORDERED_MAP 1 -#include "2d/ccMacros.h" +#include "base/ccMacros.h" #include "base/CCRef.h" #include diff --git a/cocos/base/CCNS.h b/cocos/base/CCNS.h index bf2aaf3693..7fff7245db 100644 --- a/cocos/base/CCNS.h +++ b/cocos/base/CCNS.h @@ -26,7 +26,7 @@ THE SOFTWARE. #ifndef __PLATFOMR_CCNS_H__ #define __PLATFOMR_CCNS_H__ -#include "base/CCGeometry.h" +#include "math/CCGeometry.h" NS_CC_BEGIN diff --git a/cocos/base/CCPlatformMacros.h b/cocos/base/CCPlatformMacros.h index fe2eee634b..4d7c837ff2 100644 --- a/cocos/base/CCPlatformMacros.h +++ b/cocos/base/CCPlatformMacros.h @@ -28,7 +28,7 @@ Copyright (c) 2013-2014 Chukong Technologies /** * define some platform specific macros */ -#include "2d/ccConfig.h" +#include "base/ccConfig.h" #include "base/CCPlatformConfig.h" #include "CCPlatformDefine.h" diff --git a/cocos/2d/CCProfiling.cpp b/cocos/base/CCProfiling.cpp similarity index 100% rename from cocos/2d/CCProfiling.cpp rename to cocos/base/CCProfiling.cpp diff --git a/cocos/2d/CCProfiling.h b/cocos/base/CCProfiling.h similarity index 99% rename from cocos/2d/CCProfiling.h rename to cocos/base/CCProfiling.h index 3d868faece..41f0d463be 100644 --- a/cocos/2d/CCProfiling.h +++ b/cocos/base/CCProfiling.h @@ -28,7 +28,7 @@ THE SOFTWARE. #include #include -#include "2d/ccConfig.h" +#include "base/ccConfig.h" #include "base/CCRef.h" #include "base/CCMap.h" diff --git a/cocos/base/CCRef.cpp b/cocos/base/CCRef.cpp index 56f632c884..7e41ecc6eb 100644 --- a/cocos/base/CCRef.cpp +++ b/cocos/base/CCRef.cpp @@ -25,7 +25,7 @@ THE SOFTWARE. #include "base/CCRef.h" #include "CCAutoreleasePool.h" -#include "2d/ccMacros.h" +#include "base/ccMacros.h" #include "2d/CCScriptSupport.h" NS_CC_BEGIN diff --git a/cocos/base/CCRef.h b/cocos/base/CCRef.h index 5462a18e8a..2459e51ba6 100644 --- a/cocos/base/CCRef.h +++ b/cocos/base/CCRef.h @@ -27,7 +27,7 @@ THE SOFTWARE. #define __CCREF_H__ #include "base/CCPlatformMacros.h" -#include "2d/ccConfig.h" +#include "base/ccConfig.h" NS_CC_BEGIN diff --git a/cocos/base/CCRefPtr.h b/cocos/base/CCRefPtr.h index 8f0ea957cb..36325ee484 100644 --- a/cocos/base/CCRefPtr.h +++ b/cocos/base/CCRefPtr.h @@ -27,6 +27,7 @@ #define __CC_REF_PTR_H__ #include "base/CCRef.h" +#include "base/ccMacros.h" #include NS_CC_BEGIN diff --git a/cocos/2d/CCScheduler.cpp b/cocos/base/CCScheduler.cpp similarity index 99% rename from cocos/2d/CCScheduler.cpp rename to cocos/base/CCScheduler.cpp index b7d13cd167..0f97e61782 100644 --- a/cocos/2d/CCScheduler.cpp +++ b/cocos/base/CCScheduler.cpp @@ -25,9 +25,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "CCScheduler.h" -#include "2d/ccMacros.h" -#include "2d/CCDirector.h" +#include "base/CCScheduler.h" +#include "base/ccMacros.h" +#include "base/CCDirector.h" #include "utlist.h" #include "2d/ccCArray.h" #include "2d/CCScriptSupport.h" diff --git a/cocos/2d/CCScheduler.h b/cocos/base/CCScheduler.h similarity index 100% rename from cocos/2d/CCScheduler.h rename to cocos/base/CCScheduler.h diff --git a/cocos/2d/CCTouch.cpp b/cocos/base/CCTouch.cpp similarity index 97% rename from cocos/2d/CCTouch.cpp rename to cocos/base/CCTouch.cpp index 774491b925..62798e46d1 100644 --- a/cocos/2d/CCTouch.cpp +++ b/cocos/base/CCTouch.cpp @@ -23,8 +23,8 @@ THE SOFTWARE. ****************************************************************************/ -#include "2d/CCTouch.h" -#include "2d/CCDirector.h" +#include "base/CCTouch.h" +#include "base/CCDirector.h" NS_CC_BEGIN diff --git a/cocos/2d/CCTouch.h b/cocos/base/CCTouch.h similarity index 99% rename from cocos/2d/CCTouch.h rename to cocos/base/CCTouch.h index 9f002008ed..98d37816a8 100644 --- a/cocos/2d/CCTouch.h +++ b/cocos/base/CCTouch.h @@ -27,7 +27,7 @@ THE SOFTWARE. #define __CC_TOUCH_H__ #include "base/CCRef.h" -#include "base/CCGeometry.h" +#include "math/CCGeometry.h" NS_CC_BEGIN diff --git a/cocos/base/CCValue.h b/cocos/base/CCValue.h index 0a171b30ec..fd0615e686 100644 --- a/cocos/base/CCValue.h +++ b/cocos/base/CCValue.h @@ -26,7 +26,7 @@ #define __cocos2d_libs__CCValue__ #include "base/CCPlatformMacros.h" -#include "2d/ccMacros.h" +#include "base/ccMacros.h" #include #include #include diff --git a/cocos/base/CCVector.h b/cocos/base/CCVector.h index dd643fac80..5d4f2eaeec 100644 --- a/cocos/base/CCVector.h +++ b/cocos/base/CCVector.h @@ -26,7 +26,7 @@ THE SOFTWARE. #ifndef __CCVECTOR_H__ #define __CCVECTOR_H__ -#include "2d/ccMacros.h" +#include "base/ccMacros.h" #include "base/CCRef.h" #include #include diff --git a/cocos/base/CMakeLists.txt b/cocos/base/CMakeLists.txt index 14047942b1..a22cec01d2 100644 --- a/cocos/base/CMakeLists.txt +++ b/cocos/base/CMakeLists.txt @@ -3,18 +3,45 @@ set(COCOS_BASE_SRC ../deprecated/CCArray.cpp ../deprecated/CCDictionary.cpp ../deprecated/CCString.cpp - CCAffineTransform.cpp CCAutoreleasePool.cpp - CCGeometry.cpp - CCNS.cpp - CCRef.cpp - CCDataVisitor.cpp + CCAutoreleasePool.h + CCConfiguration.cpp + CCConfiguration.h + CCConsole.cpp + CCConsole.h CCData.cpp + CCData.h + CCDataVisitor.cpp + CCDataVisitor.h + CCDirector.cpp + CCDirector.h + CCEvent.cpp + CCEvent.h + CCEventAcceleration.cpp + CCEventAcceleration.h + CCEventCustom.cpp + CCEventDispatcher.cpp + CCEventKeyboard.cpp + CCEventListener.cpp + CCEventListenerAcceleration.cpp + CCEventListenerCustom.cpp + CCEventListenerKeyboard.cpp + CCEventListenerMouse.cpp + CCEventListenerTouch.cpp + CCEventMouse.cpp + CCEventTouch.cpp + CCNS.cpp + CCProfiling.cpp + CCRef.cpp + CCScheduler.cpp + CCTouch.cpp CCValue.cpp + ZipUtils.cpp + atitc.cpp + base64.cpp + ccTypes.cpp etc1.cpp s3tc.cpp - atitc.cpp - CCConsole.cpp ) add_library(cocosbase STATIC diff --git a/cocos/2d/ZipUtils.cpp b/cocos/base/ZipUtils.cpp similarity index 99% rename from cocos/2d/ZipUtils.cpp rename to cocos/base/ZipUtils.cpp index c0bea24787..ffe6b5941c 100644 --- a/cocos/2d/ZipUtils.cpp +++ b/cocos/base/ZipUtils.cpp @@ -26,9 +26,9 @@ #include #include -#include "ZipUtils.h" +#include "base/ZipUtils.h" #include "base/CCData.h" -#include "2d/ccMacros.h" +#include "base/ccMacros.h" #include "2d/platform/CCFileUtils.h" #include "unzip.h" #include diff --git a/cocos/2d/ZipUtils.h b/cocos/base/ZipUtils.h similarity index 100% rename from cocos/2d/ZipUtils.h rename to cocos/base/ZipUtils.h diff --git a/cocos/2d/base64.cpp b/cocos/base/base64.cpp similarity index 99% rename from cocos/2d/base64.cpp rename to cocos/base/base64.cpp index 04b6a8350d..f697c1cb2f 100644 --- a/cocos/2d/base64.cpp +++ b/cocos/base/base64.cpp @@ -25,7 +25,7 @@ THE SOFTWARE. #include #include -#include "base64.h" +#include "base/base64.h" namespace cocos2d { diff --git a/cocos/2d/base64.h b/cocos/base/base64.h similarity index 100% rename from cocos/2d/base64.h rename to cocos/base/base64.h diff --git a/cocos/2d/ccConfig.h b/cocos/base/ccConfig.h similarity index 100% rename from cocos/2d/ccConfig.h rename to cocos/base/ccConfig.h diff --git a/cocos/2d/ccMacros.h b/cocos/base/ccMacros.h similarity index 99% rename from cocos/2d/ccMacros.h rename to cocos/base/ccMacros.h index a423cad070..422330266b 100644 --- a/cocos/2d/ccMacros.h +++ b/cocos/base/ccMacros.h @@ -59,7 +59,7 @@ THE SOFTWARE. #define CCAssert CCASSERT #endif // CCASSERT -#include "2d/ccConfig.h" +#include "base/ccConfig.h" /** @def CC_SWAP simple macro that swaps 2 variables diff --git a/cocos/2d/ccTypes.cpp b/cocos/base/ccTypes.cpp similarity index 99% rename from cocos/2d/ccTypes.cpp rename to cocos/base/ccTypes.cpp index 85de621d05..c6f13ab632 100644 --- a/cocos/2d/ccTypes.cpp +++ b/cocos/base/ccTypes.cpp @@ -25,7 +25,7 @@ Copyright (c) 2013-2014 Chukong Technologies Inc. THE SOFTWARE. ****************************************************************************/ -#include "2d/ccTypes.h" +#include "base/ccTypes.h" NS_CC_BEGIN diff --git a/cocos/2d/ccTypes.h b/cocos/base/ccTypes.h similarity index 99% rename from cocos/2d/ccTypes.h rename to cocos/base/ccTypes.h index 6580c034d5..b2ce67c65d 100644 --- a/cocos/2d/ccTypes.h +++ b/cocos/base/ccTypes.h @@ -29,9 +29,9 @@ THE SOFTWARE. #define __CCTYPES_H__ #include -#include "base/CCGeometry.h" -#include "CCGL.h" +#include "math/CCGeometry.h" #include "math/CCMath.h" +#include "CCGL.h" NS_CC_BEGIN diff --git a/cocos/cocos2d.h b/cocos/cocos2d.h index ec29761522..065e42ab57 100644 --- a/cocos/cocos2d.h +++ b/cocos/cocos2d.h @@ -35,7 +35,50 @@ THE SOFTWARE. // // all cocos2d include files // -#include "2d/ccConfig.h" +#include "base/ccConfig.h" + +// base +#include "base/CCRef.h" +#include "base/CCRefPtr.h" +#include "base/CCVector.h" +#include "base/CCMap.h" +#include "base/CCAutoreleasePool.h" +#include "base/CCNS.h" +#include "base/CCData.h" +#include "base/CCValue.h" +#include "base/ccConfig.h" +#include "base/ccMacros.h" +#include "base/ccTypes.h" +#include "base/CCConfiguration.h" +#include "base/CCDirector.h" +#include "base/CCScheduler.h" +#include "base/base64.h" +#include "base/ZipUtils.h" +#include "base/CCProfiling.h" +#include "base/CCConsole.h" + +// EventDispatcher +#include "base/CCEventDispatcher.h" +#include "base/CCEventListenerTouch.h" +#include "base/CCEventTouch.h" +#include "base/CCEventListenerKeyboard.h" +#include "base/CCEventKeyboard.h" +#include "base/CCEventListenerMouse.h" +#include "base/CCEventMouse.h" +#include "base/CCEventAcceleration.h" +#include "base/CCEventListenerAcceleration.h" +#include "base/CCEventCustom.h" +#include "base/CCEventListenerCustom.h" + +// math +#include "math/CCAffineTransform.h" +#include "math/CCGeometry.h" +#include "math/Vector2.h" +#include "math/Vector3.h" +#include "math/Vector4.h" +#include "math/Matrix.h" +#include "math/Quaternion.h" +#include "math/MathUtil.h" // actions #include "2d/CCAction.h" @@ -53,77 +96,48 @@ THE SOFTWARE. #include "2d/CCActionCatmullRom.h" #include "2d/CCTweenFunction.h" -// base_nodes +// 2d nodes #include "2d/CCNode.h" #include "2d/CCAtlasNode.h" - -// cocoa -#include "base/CCAffineTransform.h" -#include "base/CCRef.h" -#include "base/CCRefPtr.h" -#include "base/CCVector.h" -#include "base/CCMap.h" -#include "base/CCGeometry.h" -#include "base/CCAutoreleasePool.h" -#include "base/CCNS.h" -#include "base/CCData.h" -#include "base/CCValue.h" - -// draw nodes #include "2d/CCDrawingPrimitives.h" #include "2d/CCDrawNode.h" - -// effects -#include "2d/CCGrabber.h" -#include "2d/CCGrid.h" - -// include -#include "2d/CCEventType.h" -#include "2d/CCProtocols.h" -#include "2d/ccConfig.h" -#include "2d/ccMacros.h" -#include "2d/ccTypes.h" - -// label_nodes #include "2d/CCLabelAtlas.h" #include "2d/CCLabelTTF.h" #include "2d/CCLabelBMFont.h" #include "2d/CCLabel.h" #include "2d/CCFontFNT.h" - -// layers_scenes_transitions_nodes #include "2d/CCLayer.h" #include "2d/CCScene.h" #include "2d/CCTransition.h" #include "2d/CCTransitionPageTurn.h" #include "2d/CCTransitionProgress.h" - -// menu_nodes #include "2d/CCMenu.h" #include "2d/CCMenuItem.h" - -// misc_nodes #include "2d/CCClippingNode.h" #include "2d/CCMotionStreak.h" #include "2d/CCProgressTimer.h" #include "2d/CCRenderTexture.h" #include "2d/CCNodeGrid.h" - -// particle_nodes #include "2d/CCParticleBatchNode.h" #include "2d/CCParticleSystem.h" #include "2d/CCParticleExamples.h" #include "2d/CCParticleSystemQuad.h" +// 2d utils +#include "2d/CCGrabber.h" +#include "2d/CCGrid.h" + +// include +#include "base/CCEventType.h" +#include "2d/CCProtocols.h" + // new renderer -#include "2d/renderer/CCCustomCommand.h" -#include "2d/renderer/CCGroupCommand.h" -#include "2d/renderer/CCMaterialManager.h" -#include "2d/renderer/CCQuadCommand.h" -#include "2d/renderer/CCRenderCommand.h" -#include "2d/renderer/CCRenderCommandPool.h" -#include "2d/renderer/CCRenderMaterial.h" -#include "2d/renderer/CCRenderer.h" +#include "renderer/CCCustomCommand.h" +#include "renderer/CCGroupCommand.h" +#include "renderer/CCQuadCommand.h" +#include "renderer/CCRenderCommand.h" +#include "renderer/CCRenderCommandPool.h" +#include "renderer/CCRenderer.h" // physics #include "physics/CCPhysicsBody.h" @@ -219,8 +233,6 @@ THE SOFTWARE. // support #include "2d/ccUTF8.h" -#include "2d/CCProfiling.h" -#include "base/CCConsole.h" #include "2d/CCUserDefault.h" #include "2d/CCVertex.h" @@ -242,32 +254,10 @@ THE SOFTWARE. #include "2d/CCTMXXMLParser.h" #include "2d/CCTileMapAtlas.h" -// EventDispatcher -#include "2d/CCEventDispatcher.h" -#include "2d/CCEventListenerTouch.h" -#include "2d/CCEventTouch.h" -#include "2d/CCEventListenerKeyboard.h" -#include "2d/CCEventKeyboard.h" -#include "2d/CCEventListenerMouse.h" -#include "2d/CCEventMouse.h" -#include "2d/CCEventAcceleration.h" -#include "2d/CCEventListenerAcceleration.h" -#include "2d/CCEventCustom.h" -#include "2d/CCEventListenerCustom.h" - -// root -#include "2d/CCConfiguration.h" -#include "2d/CCDirector.h" -#include "2d/CCScheduler.h" - // component #include "2d/CCComponent.h" #include "2d/CCComponentContainer.h" -// Extras -#include "2d/base64.h" -#include "2d/ZipUtils.h" - // Audio #include "audio/include/SimpleAudioEngine.h" diff --git a/cocos/deprecated/CCArray.h b/cocos/deprecated/CCArray.h index 45a6eff889..a6361e1b80 100644 --- a/cocos/deprecated/CCArray.h +++ b/cocos/deprecated/CCArray.h @@ -32,7 +32,7 @@ THE SOFTWARE. #include #include #include "base/CCRef.h" -#include "2d/ccMacros.h" +#include "base/ccMacros.h" #else #include "2d/ccCArray.h" #endif diff --git a/cocos/deprecated/CCDeprecated.h b/cocos/deprecated/CCDeprecated.h index 4f9b081354..d3411d7260 100644 --- a/cocos/deprecated/CCDeprecated.h +++ b/cocos/deprecated/CCDeprecated.h @@ -30,8 +30,8 @@ #define __COCOS2D_CCDEPRECATED_H__ #include -#include "base/CCGeometry.h" -#include "2d/ccTypes.h" +#include "math/CCGeometry.h" +#include "base/ccTypes.h" NS_CC_BEGIN diff --git a/cocos/deprecated/CCNotificationCenter.h b/cocos/deprecated/CCNotificationCenter.h index 376a07bcd7..94633d4913 100644 --- a/cocos/deprecated/CCNotificationCenter.h +++ b/cocos/deprecated/CCNotificationCenter.h @@ -28,7 +28,7 @@ THE SOFTWARE. #define __CCNOTIFICATIONCENTER_H__ #include "base/CCRef.h" -#include "2d/ccTypes.h" +#include "base/ccTypes.h" NS_CC_BEGIN diff --git a/cocos/deprecated/CCString.cpp b/cocos/deprecated/CCString.cpp index db836b7609..27218ca1d1 100644 --- a/cocos/deprecated/CCString.cpp +++ b/cocos/deprecated/CCString.cpp @@ -25,7 +25,7 @@ Copyright (c) 2013-2014 Chukong Technologies #include "deprecated/CCString.h" #include "2d/platform/CCFileUtils.h" -#include "2d/ccMacros.h" +#include "base/ccMacros.h" #include #include #include "CCArray.h" diff --git a/cocos/editor-support/cocosbuilder/CCBReader.cpp b/cocos/editor-support/cocosbuilder/CCBReader.cpp index b8c5a41a42..ebe3497ea4 100644 --- a/cocos/editor-support/cocosbuilder/CCBReader.cpp +++ b/cocos/editor-support/cocosbuilder/CCBReader.cpp @@ -1,7 +1,7 @@ #include #include -#include "2d/CCDirector.h" +#include "base/CCDirector.h" #include "2d/platform/CCFileUtils.h" #include "CCScene.h" #include "CCTextureCache.h" diff --git a/cocos/editor-support/cocostudio/CCActionFrame.h b/cocos/editor-support/cocostudio/CCActionFrame.h index 65afc2ca13..dac652843b 100644 --- a/cocos/editor-support/cocostudio/CCActionFrame.h +++ b/cocos/editor-support/cocostudio/CCActionFrame.h @@ -25,7 +25,7 @@ THE SOFTWARE. #ifndef __ActionFRAME_H__ #define __ActionFRAME_H__ -#include "base/CCGeometry.h" +#include "math/CCGeometry.h" #include "2d/CCActionInterval.h" namespace cocostudio { diff --git a/cocos/editor-support/cocostudio/CCActionObject.cpp b/cocos/editor-support/cocostudio/CCActionObject.cpp index bedeebc6d6..0c95b3d128 100644 --- a/cocos/editor-support/cocostudio/CCActionObject.cpp +++ b/cocos/editor-support/cocostudio/CCActionObject.cpp @@ -25,8 +25,8 @@ THE SOFTWARE. #include "cocostudio/CCActionObject.h" #include "cocostudio/DictionaryHelper.h" -#include "2d/CCDirector.h" -#include "CCScheduler.h" +#include "base/CCDirector.h" +#include "base/CCScheduler.h" #include "2d/CCActionInstant.h" using namespace cocos2d; diff --git a/cocos/editor-support/cocostudio/CCArmature.cpp b/cocos/editor-support/cocostudio/CCArmature.cpp index 204fe840c9..f9598185b9 100644 --- a/cocos/editor-support/cocostudio/CCArmature.cpp +++ b/cocos/editor-support/cocostudio/CCArmature.cpp @@ -29,11 +29,11 @@ THE SOFTWARE. #include "cocostudio/CCDatas.h" #include "cocostudio/CCSkin.h" -#include "2d/renderer/CCRenderer.h" -#include "2d/renderer/CCGroupCommand.h" +#include "renderer/CCRenderer.h" +#include "renderer/CCGroupCommand.h" #include "CCShaderCache.h" #include "CCDrawingPrimitives.h" -#include "2d/CCDirector.h" +#include "base/CCDirector.h" #if ENABLE_PHYSICS_BOX2D_DETECT #include "Box2D/Box2D.h" diff --git a/cocos/editor-support/cocostudio/CCBatchNode.cpp b/cocos/editor-support/cocostudio/CCBatchNode.cpp index 94a2160e3f..1c9a3a6a51 100644 --- a/cocos/editor-support/cocostudio/CCBatchNode.cpp +++ b/cocos/editor-support/cocostudio/CCBatchNode.cpp @@ -27,10 +27,10 @@ THE SOFTWARE. #include "cocostudio/CCArmature.h" #include "cocostudio/CCSkin.h" -#include "2d/renderer/CCRenderer.h" -#include "2d/renderer/CCGroupCommand.h" +#include "renderer/CCRenderer.h" +#include "renderer/CCGroupCommand.h" #include "CCShaderCache.h" -#include "2d/CCDirector.h" +#include "base/CCDirector.h" using namespace cocos2d; diff --git a/cocos/editor-support/cocostudio/CCDataReaderHelper.cpp b/cocos/editor-support/cocostudio/CCDataReaderHelper.cpp index 9dde44c7fb..de6add4016 100644 --- a/cocos/editor-support/cocostudio/CCDataReaderHelper.cpp +++ b/cocos/editor-support/cocostudio/CCDataReaderHelper.cpp @@ -23,8 +23,8 @@ THE SOFTWARE. ****************************************************************************/ #include "2d/platform/CCFileUtils.h" -#include "2d/CCDirector.h" -#include "CCScheduler.h" +#include "base/CCDirector.h" +#include "base/CCScheduler.h" #include "tinyxml2.h" diff --git a/cocos/editor-support/cocostudio/CCDatas.h b/cocos/editor-support/cocostudio/CCDatas.h index ed683a37c2..bef2714087 100644 --- a/cocos/editor-support/cocostudio/CCDatas.h +++ b/cocos/editor-support/cocostudio/CCDatas.h @@ -26,10 +26,10 @@ THE SOFTWARE. #define __CCARMATURE_DATAS_H__ #include "base/CCRef.h" -#include "2d/ccTypes.h" +#include "base/ccTypes.h" #include "base/CCVector.h" #include "base/CCMap.h" -#include "base/CCAffineTransform.h" +#include "math/CCAffineTransform.h" #include "cocostudio/CCArmatureDefine.h" #include "2d/CCTweenFunction.h" diff --git a/cocos/editor-support/cocostudio/CCInputDelegate.cpp b/cocos/editor-support/cocostudio/CCInputDelegate.cpp index 5c607a68e7..6f1dc7a5ed 100644 --- a/cocos/editor-support/cocostudio/CCInputDelegate.cpp +++ b/cocos/editor-support/cocostudio/CCInputDelegate.cpp @@ -23,11 +23,11 @@ THE SOFTWARE. ****************************************************************************/ #include "cocostudio/CCInputDelegate.h" -#include "2d/CCDirector.h" +#include "base/CCDirector.h" #include "2d/platform/CCDevice.h" -#include "2d/CCEventListenerTouch.h" -#include "2d/CCEventListenerAcceleration.h" -#include "2d/CCEventListenerKeyboard.h" +#include "base/CCEventListenerTouch.h" +#include "base/CCEventListenerAcceleration.h" +#include "base/CCEventListenerKeyboard.h" using namespace cocos2d; diff --git a/cocos/editor-support/cocostudio/CCInputDelegate.h b/cocos/editor-support/cocostudio/CCInputDelegate.h index 42721b1ccd..89ef95b6c2 100644 --- a/cocos/editor-support/cocostudio/CCInputDelegate.h +++ b/cocos/editor-support/cocostudio/CCInputDelegate.h @@ -26,11 +26,11 @@ THE SOFTWARE. #define __CC_EXTENTIONS_CCINPUTDELEGATE_H__ #include "base/CCPlatformMacros.h" -#include "2d/CCTouch.h" -#include "2d/CCEvent.h" -#include "2d/ccTypes.h" -#include "2d/CCEventKeyboard.h" -#include "2d/CCEventListener.h" +#include "base/CCTouch.h" +#include "base/CCEvent.h" +#include "base/ccTypes.h" +#include "base/CCEventKeyboard.h" +#include "base/CCEventListener.h" namespace cocos2d { class __Set; diff --git a/cocos/editor-support/cocostudio/CCSkin.cpp b/cocos/editor-support/cocostudio/CCSkin.cpp index 655726717c..68213600a9 100644 --- a/cocos/editor-support/cocostudio/CCSkin.cpp +++ b/cocos/editor-support/cocostudio/CCSkin.cpp @@ -24,8 +24,8 @@ THE SOFTWARE. #include "2d/CCSpriteFrame.h" #include "2d/CCSpriteFrameCache.h" -#include "2d/CCDirector.h" -#include "2d/renderer/CCRenderer.h" +#include "base/CCDirector.h" +#include "renderer/CCRenderer.h" #include "cocostudio/CCSkin.h" #include "cocostudio/CCTransformHelp.h" diff --git a/cocos/editor-support/cocostudio/CCSkin.h b/cocos/editor-support/cocostudio/CCSkin.h index aec6ab31e0..5a2f2f70b4 100644 --- a/cocos/editor-support/cocostudio/CCSkin.h +++ b/cocos/editor-support/cocostudio/CCSkin.h @@ -26,7 +26,7 @@ THE SOFTWARE. #define __CCSKIN_H__ #include "2d/CCSprite.h" -#include "2d/renderer/CCQuadCommand.h" +#include "renderer/CCQuadCommand.h" #include "cocostudio/CCArmatureDefine.h" #include "cocostudio/CCBone.h" diff --git a/cocos/editor-support/spine/CCSkeleton.h b/cocos/editor-support/spine/CCSkeleton.h index 7bd38d15ef..b2c4445b10 100644 --- a/cocos/editor-support/spine/CCSkeleton.h +++ b/cocos/editor-support/spine/CCSkeleton.h @@ -39,7 +39,7 @@ #include "2d/CCNode.h" #include "2d/CCProtocols.h" #include "2d/CCTextureAtlas.h" -#include "2d/renderer/CCCustomCommand.h" +#include "renderer/CCCustomCommand.h" namespace spine { diff --git a/cocos/base/CCAffineTransform.cpp b/cocos/math/CCAffineTransform.cpp similarity index 99% rename from cocos/base/CCAffineTransform.cpp rename to cocos/math/CCAffineTransform.cpp index a544e8fc57..f5df4927b1 100644 --- a/cocos/base/CCAffineTransform.cpp +++ b/cocos/math/CCAffineTransform.cpp @@ -22,7 +22,9 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "base/CCAffineTransform.h" + +#include "math/CCAffineTransform.h" + #include #include diff --git a/cocos/base/CCAffineTransform.h b/cocos/math/CCAffineTransform.h similarity index 95% rename from cocos/base/CCAffineTransform.h rename to cocos/math/CCAffineTransform.h index 032577bfcb..211aa6e960 100644 --- a/cocos/base/CCAffineTransform.h +++ b/cocos/math/CCAffineTransform.h @@ -23,11 +23,12 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#ifndef __COCOA_CGAFFINETRANSFORM_H__ -#define __COCOA_CGAFFINETRANSFORM_H__ +#ifndef __MATH_CCAFFINETRANSFORM_H__ +#define __MATH_CCAFFINETRANSFORM_H__ -#include "base/CCGeometry.h" #include "base/CCPlatformMacros.h" + +#include "math/CCGeometry.h" #include "math/CCMath.h" NS_CC_BEGIN @@ -69,4 +70,4 @@ extern CC_DLL const AffineTransform AffineTransformIdentity; NS_CC_END -#endif // __COCOA_CGAFFINETRANSFORM_H__ +#endif // __MATH_CCAFFINETRANSFORM_H__ diff --git a/cocos/base/CCGeometry.cpp b/cocos/math/CCGeometry.cpp similarity index 99% rename from cocos/base/CCGeometry.cpp rename to cocos/math/CCGeometry.cpp index 89a90b5948..6e2c074a6d 100644 --- a/cocos/base/CCGeometry.cpp +++ b/cocos/math/CCGeometry.cpp @@ -23,9 +23,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "base/CCGeometry.h" -#include "2d/ccMacros.h" +#include "math/CCGeometry.h" + #include +#include "base/ccMacros.h" // implementation of Vector2 NS_CC_BEGIN diff --git a/cocos/base/CCGeometry.h b/cocos/math/CCGeometry.h similarity index 97% rename from cocos/base/CCGeometry.h rename to cocos/math/CCGeometry.h index 23cb8725a1..cc1b3e407f 100644 --- a/cocos/base/CCGeometry.h +++ b/cocos/math/CCGeometry.h @@ -23,14 +23,14 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#ifndef __CCGEMETRY_H__ -#define __CCGEMETRY_H__ +#ifndef __MATH_CCGEOMETRY_H__ +#define __MATH_CCGEOMETRY_H__ #include #include #include "base/CCPlatformMacros.h" -#include "2d/ccMacros.h" +#include "base/ccMacros.h" #include "math/CCMath.h" NS_CC_BEGIN @@ -200,4 +200,4 @@ public: NS_CC_END -#endif // __CCGEMETRY_H__ +#endif // __MATH_CCGEOMETRY_H__ diff --git a/cocos/math/CCMathBase.h b/cocos/math/CCMathBase.h index 12467b5796..b1bb0b08a4 100644 --- a/cocos/math/CCMathBase.h +++ b/cocos/math/CCMathBase.h @@ -33,4 +33,4 @@ #endif -#endif \ No newline at end of file +#endif // __CCMATHBASE_H__ \ No newline at end of file diff --git a/cocos/math/CMakeLists.txt b/cocos/math/CMakeLists.txt index 5c7a07b773..990e21c4bd 100644 --- a/cocos/math/CMakeLists.txt +++ b/cocos/math/CMakeLists.txt @@ -1,7 +1,10 @@ set(COCOS_MATH_SRC + CCAffineTransform.cpp + CCGeometry.cpp MathUtil.cpp Matrix.cpp Quaternion.cpp + TransformUtils.cpp Vector2.cpp Vector3.cpp Vector4.cpp @@ -18,3 +21,5 @@ set_target_properties(cocosmath LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" ) + + diff --git a/cocos/math/MathUtil.cpp b/cocos/math/MathUtil.cpp index 98199d3513..5ec9def6cd 100644 --- a/cocos/math/MathUtil.cpp +++ b/cocos/math/MathUtil.cpp @@ -1,5 +1,5 @@ #include "MathUtil.h" -#include "2d/ccMacros.h" +#include "base/ccMacros.h" NS_CC_MATH_BEGIN diff --git a/cocos/math/Matrix.cpp b/cocos/math/Matrix.cpp index 5865789f12..3d028aae94 100644 --- a/cocos/math/Matrix.cpp +++ b/cocos/math/Matrix.cpp @@ -1,7 +1,7 @@ #include "Matrix.h" #include "Quaternion.h" #include "MathUtil.h" -#include "2d/ccMacros.h" +#include "base/ccMacros.h" NS_CC_MATH_BEGIN diff --git a/cocos/math/Quaternion.cpp b/cocos/math/Quaternion.cpp index 5f596c3f05..a25f2b4bb4 100644 --- a/cocos/math/Quaternion.cpp +++ b/cocos/math/Quaternion.cpp @@ -1,5 +1,5 @@ #include "Quaternion.h" -#include "2d/ccMacros.h" +#include "base/ccMacros.h" NS_CC_MATH_BEGIN diff --git a/cocos/2d/TransformUtils.cpp b/cocos/math/TransformUtils.cpp similarity index 98% rename from cocos/2d/TransformUtils.cpp rename to cocos/math/TransformUtils.cpp index febed3b16a..f724609b9c 100644 --- a/cocos/2d/TransformUtils.cpp +++ b/cocos/math/TransformUtils.cpp @@ -25,7 +25,7 @@ THE SOFTWARE. ****************************************************************************/ #include "TransformUtils.h" -#include "base/CCAffineTransform.h" +#include "math/CCAffineTransform.h" namespace cocos2d { diff --git a/cocos/2d/TransformUtils.h b/cocos/math/TransformUtils.h similarity index 100% rename from cocos/2d/TransformUtils.h rename to cocos/math/TransformUtils.h diff --git a/cocos/math/Vector2.cpp b/cocos/math/Vector2.cpp index 2aa199d1f9..5229c5188a 100644 --- a/cocos/math/Vector2.cpp +++ b/cocos/math/Vector2.cpp @@ -1,5 +1,5 @@ #include "Vector2.h" -#include "2d/ccMacros.h" +#include "base/ccMacros.h" #include "MathUtil.h" NS_CC_MATH_BEGIN diff --git a/cocos/math/Vector2.h b/cocos/math/Vector2.h index 10fb3c8b4a..c2536d7d46 100644 --- a/cocos/math/Vector2.h +++ b/cocos/math/Vector2.h @@ -3,7 +3,7 @@ #include "CCMathBase.h" #include "base/CCPlatformMacros.h" -#include "2d/ccMacros.h" +#include "base/ccMacros.h" NS_CC_MATH_BEGIN diff --git a/cocos/math/Vector3.cpp b/cocos/math/Vector3.cpp index c8dfeb0f29..7e5e0e7501 100644 --- a/cocos/math/Vector3.cpp +++ b/cocos/math/Vector3.cpp @@ -1,6 +1,6 @@ #include "Vector3.h" #include "MathUtil.h" -#include "2d/ccMacros.h" +#include "base/ccMacros.h" NS_CC_MATH_BEGIN diff --git a/cocos/math/Vector4.cpp b/cocos/math/Vector4.cpp index 816bb3b0bc..77a80e5c42 100644 --- a/cocos/math/Vector4.cpp +++ b/cocos/math/Vector4.cpp @@ -1,6 +1,6 @@ #include "Vector4.h" #include "MathUtil.h" -#include "2d/ccMacros.h" +#include "base/ccMacros.h" NS_CC_MATH_BEGIN diff --git a/cocos/network/HttpClient.cpp b/cocos/network/HttpClient.cpp index b6ad05d8e4..da18c9f2b9 100644 --- a/cocos/network/HttpClient.cpp +++ b/cocos/network/HttpClient.cpp @@ -33,8 +33,8 @@ #include #include "base/CCVector.h" -#include "2d/CCDirector.h" -#include "CCScheduler.h" +#include "base/CCDirector.h" +#include "base/CCScheduler.h" #include "curl/curl.h" diff --git a/cocos/network/HttpRequest.h b/cocos/network/HttpRequest.h index 9b246bc81a..27d893adf4 100644 --- a/cocos/network/HttpRequest.h +++ b/cocos/network/HttpRequest.h @@ -29,7 +29,7 @@ #include #include #include "base/CCRef.h" -#include "2d/ccMacros.h" +#include "base/ccMacros.h" NS_CC_BEGIN diff --git a/cocos/network/SocketIO.cpp b/cocos/network/SocketIO.cpp index ea15bfafde..0afb564976 100644 --- a/cocos/network/SocketIO.cpp +++ b/cocos/network/SocketIO.cpp @@ -28,8 +28,8 @@ ****************************************************************************/ #include "SocketIO.h" -#include "2d/CCDirector.h" -#include "CCScheduler.h" +#include "base/CCDirector.h" +#include "base/CCScheduler.h" #include "WebSocket.h" #include "HttpClient.h" #include diff --git a/cocos/network/WebSocket.cpp b/cocos/network/WebSocket.cpp index 5d4460ec8c..4035af022d 100644 --- a/cocos/network/WebSocket.cpp +++ b/cocos/network/WebSocket.cpp @@ -28,8 +28,8 @@ ****************************************************************************/ #include "WebSocket.h" -#include "2d/CCDirector.h" -#include "CCScheduler.h" +#include "base/CCDirector.h" +#include "base/CCScheduler.h" #include #include diff --git a/cocos/physics/CCPhysicsBody.cpp b/cocos/physics/CCPhysicsBody.cpp index 9a6a4c5643..565df230da 100644 --- a/cocos/physics/CCPhysicsBody.cpp +++ b/cocos/physics/CCPhysicsBody.cpp @@ -766,7 +766,7 @@ void PhysicsBody::update(float delta) Node* parent = _node->getParent(); Layer* layer = &_world->getLayer(); - Point position = parent != layer ? parent->convertToNodeSpace(layer->convertToWorldSpace(getPosition())) : getPosition(); + Vector2 position = parent != layer ? parent->convertToNodeSpace(layer->convertToWorldSpace(getPosition())) : getPosition(); float rotation = getRotation(); for (; parent != layer; parent = parent->getParent()) { diff --git a/cocos/physics/CCPhysicsBody.h b/cocos/physics/CCPhysicsBody.h index 6af1c54d3f..e23bdd59ad 100644 --- a/cocos/physics/CCPhysicsBody.h +++ b/cocos/physics/CCPhysicsBody.h @@ -25,11 +25,11 @@ #ifndef __CCPHYSICS_BODY_H__ #define __CCPHYSICS_BODY_H__ -#include "2d/ccConfig.h" +#include "base/ccConfig.h" #if CC_USE_PHYSICS #include "base/CCRef.h" -#include "base/CCGeometry.h" +#include "math/CCGeometry.h" #include "physics/CCPhysicsShape.h" #include "base/CCVector.h" diff --git a/cocos/physics/CCPhysicsContact.cpp b/cocos/physics/CCPhysicsContact.cpp index 87782fb6b9..b8b52b9831 100644 --- a/cocos/physics/CCPhysicsContact.cpp +++ b/cocos/physics/CCPhysicsContact.cpp @@ -30,7 +30,7 @@ #include "chipmunk/CCPhysicsContactInfo_chipmunk.h" #include "chipmunk/CCPhysicsHelper_chipmunk.h" -#include "2d/CCEventCustom.h" +#include "base/CCEventCustom.h" NS_CC_BEGIN diff --git a/cocos/physics/CCPhysicsContact.h b/cocos/physics/CCPhysicsContact.h index d6d4e41a33..44f120d034 100644 --- a/cocos/physics/CCPhysicsContact.h +++ b/cocos/physics/CCPhysicsContact.h @@ -25,14 +25,14 @@ #ifndef __CCPHYSICS_CONTACT_H__ #define __CCPHYSICS_CONTACT_H__ -#include "2d/ccConfig.h" +#include "base/ccConfig.h" #if CC_USE_PHYSICS #include "base/CCRef.h" -#include "base/CCGeometry.h" -#include "2d/CCEventListenerCustom.h" -#include "2d/CCEvent.h" -#include "2d/CCEventCustom.h" +#include "math/CCGeometry.h" +#include "base/CCEventListenerCustom.h" +#include "base/CCEvent.h" +#include "base/CCEventCustom.h" NS_CC_BEGIN diff --git a/cocos/physics/CCPhysicsJoint.h b/cocos/physics/CCPhysicsJoint.h index 044c2e4c84..085990c884 100644 --- a/cocos/physics/CCPhysicsJoint.h +++ b/cocos/physics/CCPhysicsJoint.h @@ -25,11 +25,11 @@ #ifndef __CCPHYSICS_JOINT_H__ #define __CCPHYSICS_JOINT_H__ -#include "2d/ccConfig.h" +#include "base/ccConfig.h" #if CC_USE_PHYSICS #include "base/CCRef.h" -#include "base/CCGeometry.h" +#include "math/CCGeometry.h" NS_CC_BEGIN diff --git a/cocos/physics/CCPhysicsShape.h b/cocos/physics/CCPhysicsShape.h index 93e80b2d23..f8a4f4e988 100644 --- a/cocos/physics/CCPhysicsShape.h +++ b/cocos/physics/CCPhysicsShape.h @@ -25,11 +25,11 @@ #ifndef __CCPHYSICS_SHAPE_H__ #define __CCPHYSICS_SHAPE_H__ -#include "2d/ccConfig.h" +#include "base/ccConfig.h" #if CC_USE_PHYSICS #include "base/CCRef.h" -#include "base/CCGeometry.h" +#include "math/CCGeometry.h" NS_CC_BEGIN diff --git a/cocos/physics/CCPhysicsWorld.cpp b/cocos/physics/CCPhysicsWorld.cpp index 673748a71d..c3fef6ac52 100644 --- a/cocos/physics/CCPhysicsWorld.cpp +++ b/cocos/physics/CCPhysicsWorld.cpp @@ -44,9 +44,9 @@ #include "2d/CCDrawNode.h" #include "2d/CCLayer.h" -#include "2d/CCDirector.h" -#include "2d/CCEventDispatcher.h" -#include "2d/CCEventCustom.h" +#include "base/CCDirector.h" +#include "base/CCEventDispatcher.h" +#include "base/CCEventCustom.h" #include diff --git a/cocos/physics/CCPhysicsWorld.h b/cocos/physics/CCPhysicsWorld.h index db69f16c68..eb4fc413df 100644 --- a/cocos/physics/CCPhysicsWorld.h +++ b/cocos/physics/CCPhysicsWorld.h @@ -25,12 +25,12 @@ #ifndef __CCPHYSICS_WORLD_H__ #define __CCPHYSICS_WORLD_H__ -#include "2d/ccConfig.h" +#include "base/ccConfig.h" #if CC_USE_PHYSICS #include "base/CCVector.h" #include "base/CCRef.h" -#include "base/CCGeometry.h" +#include "math/CCGeometry.h" #include diff --git a/cocos/physics/chipmunk/CCPhysicsBodyInfo_chipmunk.h b/cocos/physics/chipmunk/CCPhysicsBodyInfo_chipmunk.h index 33d94fa40f..01e21dcada 100644 --- a/cocos/physics/chipmunk/CCPhysicsBodyInfo_chipmunk.h +++ b/cocos/physics/chipmunk/CCPhysicsBodyInfo_chipmunk.h @@ -25,7 +25,7 @@ #ifndef __CCPHYSICS_BODY_INFO_CHIPMUNK_H__ #define __CCPHYSICS_BODY_INFO_CHIPMUNK_H__ -#include "2d/ccConfig.h" +#include "base/ccConfig.h" #if CC_USE_PHYSICS #include "chipmunk.h" diff --git a/cocos/physics/chipmunk/CCPhysicsContactInfo_chipmunk.h b/cocos/physics/chipmunk/CCPhysicsContactInfo_chipmunk.h index 4cc7970cc4..47900c81ff 100644 --- a/cocos/physics/chipmunk/CCPhysicsContactInfo_chipmunk.h +++ b/cocos/physics/chipmunk/CCPhysicsContactInfo_chipmunk.h @@ -25,7 +25,7 @@ #ifndef __CCPHYSICS_CONTACT_INFO_CHIPMUNK_H__ #define __CCPHYSICS_CONTACT_INFO_CHIPMUNK_H__ -#include "2d/ccConfig.h" +#include "base/ccConfig.h" #if CC_USE_PHYSICS #include "chipmunk.h" diff --git a/cocos/physics/chipmunk/CCPhysicsHelper_chipmunk.h b/cocos/physics/chipmunk/CCPhysicsHelper_chipmunk.h index 8ca47aed64..8a3ffcdef1 100644 --- a/cocos/physics/chipmunk/CCPhysicsHelper_chipmunk.h +++ b/cocos/physics/chipmunk/CCPhysicsHelper_chipmunk.h @@ -25,12 +25,12 @@ #ifndef __CCPHYSICS_HELPER_CHIPMUNK_H__ #define __CCPHYSICS_HELPER_CHIPMUNK_H__ -#include "2d/ccConfig.h" +#include "base/ccConfig.h" #if CC_USE_PHYSICS #include "chipmunk.h" #include "base/CCPlatformMacros.h" -#include "base/CCGeometry.h" +#include "math/CCGeometry.h" NS_CC_BEGIN diff --git a/cocos/physics/chipmunk/CCPhysicsJointInfo_chipmunk.h b/cocos/physics/chipmunk/CCPhysicsJointInfo_chipmunk.h index ab43e9774b..22c62abc5a 100644 --- a/cocos/physics/chipmunk/CCPhysicsJointInfo_chipmunk.h +++ b/cocos/physics/chipmunk/CCPhysicsJointInfo_chipmunk.h @@ -25,7 +25,7 @@ #ifndef __CCPHYSICS_JOINT_INFO_CHIPMUNK_H__ #define __CCPHYSICS_JOINT_INFO_CHIPMUNK_H__ -#include "2d/ccConfig.h" +#include "base/ccConfig.h" #if CC_USE_PHYSICS #include "chipmunk.h" diff --git a/cocos/physics/chipmunk/CCPhysicsShapeInfo_chipmunk.h b/cocos/physics/chipmunk/CCPhysicsShapeInfo_chipmunk.h index aaaaa6a79d..c48acbce60 100644 --- a/cocos/physics/chipmunk/CCPhysicsShapeInfo_chipmunk.h +++ b/cocos/physics/chipmunk/CCPhysicsShapeInfo_chipmunk.h @@ -25,7 +25,7 @@ #ifndef __CCPHYSICS_SHAPE_INFO_CHIPMUNK_H__ #define __CCPHYSICS_SHAPE_INFO_CHIPMUNK_H__ -#include "2d/ccConfig.h" +#include "base/ccConfig.h" #if CC_USE_PHYSICS #include diff --git a/cocos/physics/chipmunk/CCPhysicsWorldInfo_chipmunk.h b/cocos/physics/chipmunk/CCPhysicsWorldInfo_chipmunk.h index fa72749166..87ce0fdacd 100644 --- a/cocos/physics/chipmunk/CCPhysicsWorldInfo_chipmunk.h +++ b/cocos/physics/chipmunk/CCPhysicsWorldInfo_chipmunk.h @@ -25,13 +25,13 @@ #ifndef __CCPHYSICS_WORLD_INFO_CHIPMUNK_H__ #define __CCPHYSICS_WORLD_INFO_CHIPMUNK_H__ -#include "2d/ccConfig.h" +#include "base/ccConfig.h" #if CC_USE_PHYSICS #include #include "chipmunk.h" #include "base/CCPlatformMacros.h" -#include "base/CCGeometry.h" +#include "math/CCGeometry.h" NS_CC_BEGIN typedef Vector2 Vect; class PhysicsBodyInfo; diff --git a/cocos/2d/renderer/CCBatchCommand.cpp b/cocos/renderer/CCBatchCommand.cpp similarity index 97% rename from cocos/2d/renderer/CCBatchCommand.cpp rename to cocos/renderer/CCBatchCommand.cpp index a164b1b6ae..98e945dbb4 100644 --- a/cocos/2d/renderer/CCBatchCommand.cpp +++ b/cocos/renderer/CCBatchCommand.cpp @@ -23,7 +23,7 @@ ****************************************************************************/ -#include "2d/renderer/CCBatchCommand.h" +#include "renderer/CCBatchCommand.h" #include "2d/ccGLStateCache.h" #include "2d/CCTextureAtlas.h" #include "2d/CCTexture2D.h" diff --git a/cocos/2d/renderer/CCBatchCommand.h b/cocos/renderer/CCBatchCommand.h similarity index 100% rename from cocos/2d/renderer/CCBatchCommand.h rename to cocos/renderer/CCBatchCommand.h diff --git a/cocos/2d/renderer/CCCustomCommand.cpp b/cocos/renderer/CCCustomCommand.cpp similarity index 96% rename from cocos/2d/renderer/CCCustomCommand.cpp rename to cocos/renderer/CCCustomCommand.cpp index dcb5bd12ec..c324032116 100644 --- a/cocos/2d/renderer/CCCustomCommand.cpp +++ b/cocos/renderer/CCCustomCommand.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. ****************************************************************************/ -#include "2d/renderer/CCCustomCommand.h" +#include "renderer/CCCustomCommand.h" NS_CC_BEGIN diff --git a/cocos/2d/renderer/CCCustomCommand.h b/cocos/renderer/CCCustomCommand.h similarity index 100% rename from cocos/2d/renderer/CCCustomCommand.h rename to cocos/renderer/CCCustomCommand.h diff --git a/cocos/2d/renderer/CCGroupCommand.cpp b/cocos/renderer/CCGroupCommand.cpp similarity index 96% rename from cocos/2d/renderer/CCGroupCommand.cpp rename to cocos/renderer/CCGroupCommand.cpp index 711bedd41d..576dab111e 100644 --- a/cocos/2d/renderer/CCGroupCommand.cpp +++ b/cocos/renderer/CCGroupCommand.cpp @@ -23,9 +23,9 @@ ****************************************************************************/ -#include "2d/renderer/CCGroupCommand.h" -#include "2d/renderer/CCRenderer.h" -#include "2d/CCDirector.h" +#include "renderer/CCGroupCommand.h" +#include "renderer/CCRenderer.h" +#include "base/CCDirector.h" NS_CC_BEGIN diff --git a/cocos/2d/renderer/CCGroupCommand.h b/cocos/renderer/CCGroupCommand.h similarity index 100% rename from cocos/2d/renderer/CCGroupCommand.h rename to cocos/renderer/CCGroupCommand.h diff --git a/cocos/2d/renderer/CCQuadCommand.cpp b/cocos/renderer/CCQuadCommand.cpp similarity index 98% rename from cocos/2d/renderer/CCQuadCommand.cpp rename to cocos/renderer/CCQuadCommand.cpp index bce395c586..5e8a02ca2f 100644 --- a/cocos/2d/renderer/CCQuadCommand.cpp +++ b/cocos/renderer/CCQuadCommand.cpp @@ -23,7 +23,7 @@ ****************************************************************************/ -#include "2d/renderer/CCQuadCommand.h" +#include "renderer/CCQuadCommand.h" #include "2d/ccGLStateCache.h" #include "xxhash.h" diff --git a/cocos/2d/renderer/CCQuadCommand.h b/cocos/renderer/CCQuadCommand.h similarity index 100% rename from cocos/2d/renderer/CCQuadCommand.h rename to cocos/renderer/CCQuadCommand.h diff --git a/cocos/2d/renderer/CCRenderCommand.cpp b/cocos/renderer/CCRenderCommand.cpp similarity index 100% rename from cocos/2d/renderer/CCRenderCommand.cpp rename to cocos/renderer/CCRenderCommand.cpp diff --git a/cocos/2d/renderer/CCRenderCommand.h b/cocos/renderer/CCRenderCommand.h similarity index 98% rename from cocos/2d/renderer/CCRenderCommand.h rename to cocos/renderer/CCRenderCommand.h index 5c33ec5366..a8eeb5a45a 100644 --- a/cocos/2d/renderer/CCRenderCommand.h +++ b/cocos/renderer/CCRenderCommand.h @@ -28,7 +28,7 @@ #include "base/CCPlatformMacros.h" #include -#include "2d/ccTypes.h" +#include "base/ccTypes.h" NS_CC_BEGIN diff --git a/cocos/2d/renderer/CCRenderCommandPool.h b/cocos/renderer/CCRenderCommandPool.h similarity index 100% rename from cocos/2d/renderer/CCRenderCommandPool.h rename to cocos/renderer/CCRenderCommandPool.h diff --git a/cocos/2d/renderer/CCRenderer.cpp b/cocos/renderer/CCRenderer.cpp similarity index 97% rename from cocos/2d/renderer/CCRenderer.cpp rename to cocos/renderer/CCRenderer.cpp index a3136b387e..c4090052d0 100644 --- a/cocos/2d/renderer/CCRenderer.cpp +++ b/cocos/renderer/CCRenderer.cpp @@ -22,21 +22,21 @@ THE SOFTWARE. ****************************************************************************/ -#include "2d/renderer/CCRenderer.h" +#include "renderer/CCRenderer.h" #include -#include "2d/renderer/CCQuadCommand.h" -#include "2d/renderer/CCBatchCommand.h" -#include "2d/renderer/CCCustomCommand.h" -#include "2d/renderer/CCGroupCommand.h" +#include "renderer/CCQuadCommand.h" +#include "renderer/CCBatchCommand.h" +#include "renderer/CCCustomCommand.h" +#include "renderer/CCGroupCommand.h" #include "CCShaderCache.h" #include "2d/ccGLStateCache.h" #include "CCConfiguration.h" -#include "2d/CCDirector.h" -#include "2d/CCEventDispatcher.h" -#include "2d/CCEventListenerCustom.h" -#include "2d/CCEventType.h" +#include "base/CCDirector.h" +#include "base/CCEventDispatcher.h" +#include "base/CCEventListenerCustom.h" +#include "base/CCEventType.h" NS_CC_BEGIN diff --git a/cocos/2d/renderer/CCRenderer.h b/cocos/renderer/CCRenderer.h similarity index 100% rename from cocos/2d/renderer/CCRenderer.h rename to cocos/renderer/CCRenderer.h diff --git a/cocos/renderer/CMakeLists.txt b/cocos/renderer/CMakeLists.txt new file mode 100644 index 0000000000..03422049d5 --- /dev/null +++ b/cocos/renderer/CMakeLists.txt @@ -0,0 +1,19 @@ +set(COCOS_RENDERER_SRC + CCBatchCommand.cpp + CCCustomCommand.cpp + CCGroupCommand.cpp + CCQuadCommand.cpp + CCRenderCommand.cpp + CCRenderer.cpp +) + +add_library(cocosrenderer STATIC + ${COCOS_RENDERER_SRC} +) + +set_target_properties(cocosrenderer + PROPERTIES + ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" + LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" +) + diff --git a/cocos/scripting/lua-bindings/manual/CCLuaValue.h b/cocos/scripting/lua-bindings/manual/CCLuaValue.h index 3388354511..17e084ed62 100644 --- a/cocos/scripting/lua-bindings/manual/CCLuaValue.h +++ b/cocos/scripting/lua-bindings/manual/CCLuaValue.h @@ -34,7 +34,7 @@ extern "C" { #include "lua.h" } -#include "2d/ccTypes.h" +#include "base/ccTypes.h" #include "base/CCRef.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_BLACKBERRY diff --git a/cocos/scripting/lua-bindings/manual/LuaOpengl.h b/cocos/scripting/lua-bindings/manual/LuaOpengl.h index 729062105b..acb5f4451d 100644 --- a/cocos/scripting/lua-bindings/manual/LuaOpengl.h +++ b/cocos/scripting/lua-bindings/manual/LuaOpengl.h @@ -33,7 +33,7 @@ extern "C" { #endif #include "2d/CCNode.h" -#include "2d/renderer/CCCustomCommand.h" +#include "renderer/CCCustomCommand.h" class GLNode:public cocos2d::Node { diff --git a/cocos/scripting/lua-bindings/manual/LuaScriptHandlerMgr.h b/cocos/scripting/lua-bindings/manual/LuaScriptHandlerMgr.h index 456a855874..df49bf50e0 100644 --- a/cocos/scripting/lua-bindings/manual/LuaScriptHandlerMgr.h +++ b/cocos/scripting/lua-bindings/manual/LuaScriptHandlerMgr.h @@ -31,7 +31,7 @@ extern "C" { #include "base/CCRef.h" -#include "2d/ccMacros.h" +#include "base/ccMacros.h" #include "2d/CCActionInstant.h" #include #include diff --git a/cocos/ui/CCProtectedNode.cpp b/cocos/ui/CCProtectedNode.cpp index 6cd03a9fe2..c9f546bb1b 100644 --- a/cocos/ui/CCProtectedNode.cpp +++ b/cocos/ui/CCProtectedNode.cpp @@ -28,7 +28,7 @@ #include "CCProtectedNode.h" -#include "2d/CCDirector.h" +#include "base/CCDirector.h" #if CC_USE_PHYSICS #include "physics/CCPhysicsBody.h" diff --git a/cocos/ui/UILayout.cpp b/cocos/ui/UILayout.cpp index 781580e7a1..14b60ba31f 100644 --- a/cocos/ui/UILayout.cpp +++ b/cocos/ui/UILayout.cpp @@ -27,11 +27,11 @@ THE SOFTWARE. #include "extensions/GUI/CCControlExtension/CCScale9Sprite.h" #include "2d/CCGLProgram.h" #include "CCShaderCache.h" -#include "2d/CCDirector.h" +#include "base/CCDirector.h" #include "CCDrawingPrimitives.h" -#include "2d/renderer/CCRenderer.h" -#include "2d/renderer/CCGroupCommand.h" -#include "2d/renderer/CCCustomCommand.h" +#include "renderer/CCRenderer.h" +#include "renderer/CCGroupCommand.h" +#include "renderer/CCCustomCommand.h" NS_CC_BEGIN diff --git a/extensions/GUI/CCControlExtension/CCControl.cpp b/extensions/GUI/CCControlExtension/CCControl.cpp index 902a1ed062..e40c11b694 100644 --- a/extensions/GUI/CCControlExtension/CCControl.cpp +++ b/extensions/GUI/CCControlExtension/CCControl.cpp @@ -28,12 +28,12 @@ */ #include "CCControl.h" -#include "2d/CCDirector.h" +#include "base/CCDirector.h" #include "2d/CCMenu.h" -#include "2d/CCTouch.h" +#include "base/CCTouch.h" #include "CCInvocation.h" -#include "2d/CCEventDispatcher.h" -#include "2d/CCEventListenerTouch.h" +#include "base/CCEventDispatcher.h" +#include "base/CCEventListenerTouch.h" NS_CC_EXT_BEGIN diff --git a/extensions/GUI/CCControlExtension/CCControlSlider.cpp b/extensions/GUI/CCControlExtension/CCControlSlider.cpp index ee1a1f4237..9bbe28f8e5 100644 --- a/extensions/GUI/CCControlExtension/CCControlSlider.cpp +++ b/extensions/GUI/CCControlExtension/CCControlSlider.cpp @@ -28,8 +28,8 @@ */ #include "CCControlSlider.h" -#include "2d/CCTouch.h" -#include "2d/CCDirector.h" +#include "base/CCTouch.h" +#include "base/CCDirector.h" NS_CC_EXT_BEGIN diff --git a/extensions/GUI/CCEditBox/CCEditBoxImplMac.mm b/extensions/GUI/CCEditBox/CCEditBoxImplMac.mm index ab95b83ac8..e9502ca908 100644 --- a/extensions/GUI/CCEditBox/CCEditBoxImplMac.mm +++ b/extensions/GUI/CCEditBox/CCEditBoxImplMac.mm @@ -24,7 +24,7 @@ ****************************************************************************/ #include "CCEditBoxImplMac.h" -#include "2d/CCDirector.h" +#include "base/CCDirector.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) diff --git a/extensions/GUI/CCScrollView/CCScrollView.cpp b/extensions/GUI/CCScrollView/CCScrollView.cpp index f87650ddd5..f69031daa8 100644 --- a/extensions/GUI/CCScrollView/CCScrollView.cpp +++ b/extensions/GUI/CCScrollView/CCScrollView.cpp @@ -29,8 +29,8 @@ #include "2d/CCActionInstant.h" #include "2d/CCActionInterval.h" #include "2d/CCActionTween.h" -#include "2d/CCDirector.h" -#include "2d/renderer/CCRenderer.h" +#include "base/CCDirector.h" +#include "renderer/CCRenderer.h" #include diff --git a/extensions/GUI/CCScrollView/CCScrollView.h b/extensions/GUI/CCScrollView/CCScrollView.h index 82964b363d..8bd7a5b092 100644 --- a/extensions/GUI/CCScrollView/CCScrollView.h +++ b/extensions/GUI/CCScrollView/CCScrollView.h @@ -27,7 +27,7 @@ #define __CCSCROLLVIEW_H__ #include "2d/CCLayer.h" -#include "2d/CCEventListenerTouch.h" +#include "base/CCEventListenerTouch.h" #include "2d/CCActionTween.h" #include "extensions/ExtensionMacros.h" diff --git a/extensions/physics-nodes/CCPhysicsDebugNode.cpp b/extensions/physics-nodes/CCPhysicsDebugNode.cpp index 7b2e56c569..e5da44c451 100644 --- a/extensions/physics-nodes/CCPhysicsDebugNode.cpp +++ b/extensions/physics-nodes/CCPhysicsDebugNode.cpp @@ -25,8 +25,8 @@ #include "chipmunk.h" #endif -#include "2d/ccTypes.h" -#include "base/CCGeometry.h" +#include "base/ccTypes.h" +#include "math/CCGeometry.h" #include diff --git a/templates/cocos2dx_files.json.REMOVED.git-id b/templates/cocos2dx_files.json.REMOVED.git-id index 7a67f468c6..3a96b21025 100644 --- a/templates/cocos2dx_files.json.REMOVED.git-id +++ b/templates/cocos2dx_files.json.REMOVED.git-id @@ -1 +1 @@ -ef6267bf4d38c797f059c8ca14eecd90e2c2c981 \ No newline at end of file +15b508bee1d054638b3c80642aca83258fa964a5 \ No newline at end of file diff --git a/tests/cpp-empty-test/proj.android/.classpath b/tests/cpp-empty-test/proj.android/.classpath index c06dfcb8e5..51769745b2 100644 --- a/tests/cpp-empty-test/proj.android/.classpath +++ b/tests/cpp-empty-test/proj.android/.classpath @@ -1,7 +1,7 @@ - + diff --git a/tests/cpp-empty-test/proj.android/project.properties b/tests/cpp-empty-test/proj.android/project.properties index 16f145cfc9..5a1770fd8f 100644 --- a/tests/cpp-empty-test/proj.android/project.properties +++ b/tests/cpp-empty-test/proj.android/project.properties @@ -8,6 +8,6 @@ # project structure. # Project target. -target=android-10 +target=android-19 android.library.reference.1=../../../cocos/2d/platform/android/java diff --git a/tests/cpp-tests/Classes/ActionsTest/ActionsTest.cpp b/tests/cpp-tests/Classes/ActionsTest/ActionsTest.cpp index 8a94c788b2..92fc0405ea 100644 --- a/tests/cpp-tests/Classes/ActionsTest/ActionsTest.cpp +++ b/tests/cpp-tests/Classes/ActionsTest/ActionsTest.cpp @@ -27,9 +27,9 @@ #include "../testResource.h" #include "cocos2d.h" -#include "2d/renderer/CCRenderer.h" -#include "2d/renderer/CCCustomCommand.h" -#include "2d/renderer/CCGroupCommand.h" +#include "renderer/CCRenderer.h" +#include "renderer/CCCustomCommand.h" +#include "renderer/CCGroupCommand.h" static std::function createFunctions[] = { diff --git a/tests/cpp-tests/Classes/Box2DTest/Box2dTest.cpp b/tests/cpp-tests/Classes/Box2DTest/Box2dTest.cpp index b303212cba..44cb115fd5 100644 --- a/tests/cpp-tests/Classes/Box2DTest/Box2dTest.cpp +++ b/tests/cpp-tests/Classes/Box2DTest/Box2dTest.cpp @@ -1,8 +1,8 @@ #include "Box2dTest.h" #include "../testResource.h" #include "extensions/cocos-ext.h" -#include "2d/renderer/CCRenderer.h" -#include "2d/renderer/CCCustomCommand.h" +#include "renderer/CCRenderer.h" +#include "renderer/CCCustomCommand.h" USING_NS_CC_EXT; diff --git a/tests/cpp-tests/Classes/Box2DTestBed/Box2dView.cpp b/tests/cpp-tests/Classes/Box2DTestBed/Box2dView.cpp index a60a571bca..b27a9996d8 100644 --- a/tests/cpp-tests/Classes/Box2DTestBed/Box2dView.cpp +++ b/tests/cpp-tests/Classes/Box2DTestBed/Box2dView.cpp @@ -1,7 +1,7 @@ #include "Box2dView.h" #include "GLES-Render.h" #include "Test.h" -#include "2d/renderer/CCRenderer.h" +#include "renderer/CCRenderer.h" #define kAccelerometerFrequency 30 #define FRAMES_BETWEEN_PRESSES_FOR_DOUBLE_CLICK 10 diff --git a/tests/cpp-tests/Classes/Box2DTestBed/Box2dView.h b/tests/cpp-tests/Classes/Box2DTestBed/Box2dView.h index 32584d9d39..8c1b4470ce 100644 --- a/tests/cpp-tests/Classes/Box2DTestBed/Box2dView.h +++ b/tests/cpp-tests/Classes/Box2DTestBed/Box2dView.h @@ -3,7 +3,7 @@ //#include "cocos2d.h" #include "../testBasic.h" -#include "2d/renderer/CCCustomCommand.h" +#include "renderer/CCCustomCommand.h" class MenuLayer : public Layer { diff --git a/tests/cpp-tests/Classes/ClippingNodeTest/ClippingNodeTest.cpp b/tests/cpp-tests/Classes/ClippingNodeTest/ClippingNodeTest.cpp index fba771400a..a0e09f2e05 100644 --- a/tests/cpp-tests/Classes/ClippingNodeTest/ClippingNodeTest.cpp +++ b/tests/cpp-tests/Classes/ClippingNodeTest/ClippingNodeTest.cpp @@ -7,7 +7,7 @@ #include "ClippingNodeTest.h" #include "../testResource.h" -#include "2d/renderer/CCRenderer.h" +#include "renderer/CCRenderer.h" enum { kTagTitleLabel = 1, diff --git a/tests/cpp-tests/Classes/ClippingNodeTest/ClippingNodeTest.h b/tests/cpp-tests/Classes/ClippingNodeTest/ClippingNodeTest.h index b25847f3ec..f5b7dcbb8a 100644 --- a/tests/cpp-tests/Classes/ClippingNodeTest/ClippingNodeTest.h +++ b/tests/cpp-tests/Classes/ClippingNodeTest/ClippingNodeTest.h @@ -3,7 +3,7 @@ #include "../testBasic.h" #include "../BaseTest.h" -#include "2d/renderer/CCCustomCommand.h" +#include "renderer/CCCustomCommand.h" #include class BaseClippingNodeTest : public BaseTest diff --git a/tests/cpp-tests/Classes/DrawPrimitivesTest/DrawPrimitivesTest.cpp b/tests/cpp-tests/Classes/DrawPrimitivesTest/DrawPrimitivesTest.cpp index 6d6ca1a8d2..4e5e4a100c 100644 --- a/tests/cpp-tests/Classes/DrawPrimitivesTest/DrawPrimitivesTest.cpp +++ b/tests/cpp-tests/Classes/DrawPrimitivesTest/DrawPrimitivesTest.cpp @@ -1,6 +1,6 @@ #include "DrawPrimitivesTest.h" -#include "2d/renderer/CCRenderer.h" -#include "2d/renderer/CCCustomCommand.h" +#include "renderer/CCRenderer.h" +#include "renderer/CCCustomCommand.h" using namespace std; diff --git a/tests/cpp-tests/Classes/LabelTest/LabelTest.cpp b/tests/cpp-tests/Classes/LabelTest/LabelTest.cpp index adc2c1d67d..6bfaeb05a2 100644 --- a/tests/cpp-tests/Classes/LabelTest/LabelTest.cpp +++ b/tests/cpp-tests/Classes/LabelTest/LabelTest.cpp @@ -1,7 +1,7 @@ #include "LabelTest.h" #include "../testResource.h" -#include "2d/renderer/CCRenderer.h" -#include "2d/renderer/CCCustomCommand.h" +#include "renderer/CCRenderer.h" +#include "renderer/CCCustomCommand.h" #if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) #pragma GCC diagnostic ignored "-Wdeprecated-declarations" diff --git a/tests/cpp-tests/Classes/LabelTest/LabelTestNew.cpp b/tests/cpp-tests/Classes/LabelTest/LabelTestNew.cpp index 25522d48b9..9cd87d3db2 100644 --- a/tests/cpp-tests/Classes/LabelTest/LabelTestNew.cpp +++ b/tests/cpp-tests/Classes/LabelTest/LabelTestNew.cpp @@ -1,6 +1,6 @@ #include "LabelTestNew.h" #include "../testResource.h" -#include "2d/renderer/CCRenderer.h" +#include "renderer/CCRenderer.h" using namespace ui; diff --git a/tests/cpp-tests/Classes/LabelTest/LabelTestNew.h b/tests/cpp-tests/Classes/LabelTest/LabelTestNew.h index c76fbd7019..5d19c0e3fe 100644 --- a/tests/cpp-tests/Classes/LabelTest/LabelTestNew.h +++ b/tests/cpp-tests/Classes/LabelTest/LabelTestNew.h @@ -3,7 +3,7 @@ #include "../testBasic.h" #include "../BaseTest.h" -#include "2d/renderer/CCCustomCommand.h" +#include "renderer/CCCustomCommand.h" #include "ui/CocosGUI.h" diff --git a/tests/cpp-tests/Classes/PerformanceTest/PerformanceCallbackTest.cpp b/tests/cpp-tests/Classes/PerformanceTest/PerformanceCallbackTest.cpp index 431cce3cf9..7c10f87806 100644 --- a/tests/cpp-tests/Classes/PerformanceTest/PerformanceCallbackTest.cpp +++ b/tests/cpp-tests/Classes/PerformanceTest/PerformanceCallbackTest.cpp @@ -89,7 +89,7 @@ void PerformanceCallbackScene::onEnter() // Title auto label = Label::createWithTTF(title().c_str(), "fonts/arial.ttf", 32); addChild(label, 1); - label->setPosition(Point(s.width/2, s.height-50)); + label->setPosition(Vector2(s.width/2, s.height-50)); // Subtitle std::string strSubTitle = subtitle(); @@ -97,7 +97,7 @@ void PerformanceCallbackScene::onEnter() { auto l = Label::createWithTTF(strSubTitle.c_str(), "fonts/Thonburi.ttf", 16); addChild(l, 1); - l->setPosition(Point(s.width/2, s.height-80)); + l->setPosition(Vector2(s.width/2, s.height-80)); } getScheduler()->schedule(schedule_selector(PerformanceCallbackScene::onUpdate), this, 0.0f, false); diff --git a/tests/cpp-tests/Classes/PhysicsTest/PhysicsTest.cpp b/tests/cpp-tests/Classes/PhysicsTest/PhysicsTest.cpp index aaaf8aa79c..d7fb1c99b9 100644 --- a/tests/cpp-tests/Classes/PhysicsTest/PhysicsTest.cpp +++ b/tests/cpp-tests/Classes/PhysicsTest/PhysicsTest.cpp @@ -160,7 +160,7 @@ void PhysicsDemo::onEnter() auto item = MenuItemFont::create("Toggle debug", CC_CALLBACK_1(PhysicsDemo::toggleDebugCallback, this)); auto menu = Menu::create(item, nullptr); this->addChild(menu); - menu->setPosition(Point(getContentSize().width-50, getContentSize().height/2)); + menu->setPosition(Vector2(getContentSize().width-50, getContentSize().height/2)); } } @@ -436,7 +436,7 @@ void PhysicsDemo::onTouchEnded(Touch* touch, Event* event) void PhysicsDemoLogoSmash::onEnter() { PhysicsDemo::onEnter(); - getPhysicsWorld()->setGravity(Point(0, 0)); + getPhysicsWorld()->setGravity(Vector2::ZERO); getPhysicsWorld()->setUpdateRate(5.0f); _ball = SpriteBatchNode::create("Images/ball.png", sizeof(logo_image)/sizeof(logo_image[0])); @@ -463,8 +463,8 @@ void PhysicsDemoLogoSmash::onEnter() } } - auto bullet = makeBall(Point(400, 0), 10, PhysicsMaterial(PHYSICS_INFINITY, 0, 0)); - bullet->getPhysicsBody()->setVelocity(Point(200, 0)); + auto bullet = makeBall(Vector2(400, 0), 10, PhysicsMaterial(PHYSICS_INFINITY, 0, 0)); + bullet->getPhysicsBody()->setVelocity(Vector2(200, 0)); bullet->setPosition(Vector2(-500, VisibleRect::getVisibleRect().size.height/2)); @@ -550,7 +550,7 @@ void PhysicsDemoRayCast::onEnter() auto menu = Menu::create(item, NULL); this->addChild(menu); - menu->setPosition(Point(VisibleRect::left().x+100, VisibleRect::top().y-10)); + menu->setPosition(Vector2(VisibleRect::left().x+100, VisibleRect::top().y-10)); } void PhysicsDemoRayCast::changeModeCallback(Ref* sender) @@ -807,7 +807,7 @@ void PhysicsDemoJoints::onEnter() auto sp2 = makeBox(offset + Vector2(30, 0), Size(30, 10)); sp2->getPhysicsBody()->setTag(DRAG_BODYS_TAG); - PhysicsJointGroove* joint = PhysicsJointGroove::construct(sp1->getPhysicsBody(), sp2->getPhysicsBody(), Point(30, 15), Point(30, -15), Point(-30, 0)); + PhysicsJointGroove* joint = PhysicsJointGroove::construct(sp1->getPhysicsBody(), sp2->getPhysicsBody(), Vector2(30, 15), Vector2(30, -15), Vector2(-30, 0)); getPhysicsWorld()->addJoint(joint); this->addChild(sp1); @@ -1566,16 +1566,16 @@ void PhysicsPositionRotationTest::onEnter() auto wall = Node::create(); wall->setPhysicsBody(PhysicsBody::createEdgeBox(layers[i]->getContentSize(), PhysicsMaterial(0.1f, 1, 0.0f))); - wall->setPosition(Point(halfSize/2)); + wall->setPosition(Vector2(halfSize/2)); layers[i]->addChild(wall); this->addChild(layers[i]); } - layers[0]->setPosition(Point(halfSize.width/2, halfSize.height/2 + 60)); - layers[1]->setPosition(Point(halfSize.width/2*3, halfSize.height/2 + 60)); + layers[0]->setPosition(Vector2(halfSize.width/2, halfSize.height/2 + 60)); + layers[1]->setPosition(Vector2(halfSize.width/2*3, halfSize.height/2 + 60)); // anchor test auto anchorNode = Sprite::create("Images/YellowSquare.png"); - anchorNode->setAnchorPoint(Point(0.1f, 0.9f)); + anchorNode->setAnchorPoint(Vector2(0.1f, 0.9f)); anchorNode->setPosition(100, 50); anchorNode->setScale(0.25); anchorNode->setPhysicsBody(PhysicsBody::createBox(anchorNode->getContentSize()*anchorNode->getScale())); @@ -1610,10 +1610,10 @@ void PhysicsPositionRotationTest::onEnter() for (int i = 0; i < 30; ++i) { Size size(10 + CCRANDOM_0_1()*10, 10 + CCRANDOM_0_1()*10); - Point position = Point(halfSize.width, halfSize.height) - Point(size.width, size.height); + Vector2 position = Vector2(halfSize.width, halfSize.height) - Vector2(size.width, size.height); position.x = position.x * CCRANDOM_0_1(); position.y = position.y * CCRANDOM_0_1(); - position = position + Point(size.width/2, size.height/2); + position = position + Vector2(size.width/2, size.height/2); Vect velocity((CCRANDOM_0_1() - 0.5)*200, (CCRANDOM_0_1() - 0.5)*200); auto box = makeBox(position, size, 0, PhysicsMaterial(0.1f, 1, 0.0f)); box->getPhysicsBody()->setVelocity(velocity); @@ -1621,8 +1621,8 @@ void PhysicsPositionRotationTest::onEnter() layers[1]->addChild(box); } - MoveTo* moveTo = MoveTo::create(1.0f, Point(halfSize.width/2, halfSize.height/2 + 60)); - MoveTo* moveBack = MoveTo::create(1.0f, Point(halfSize.width/2*3, halfSize.height/2 + 60)); + MoveTo* moveTo = MoveTo::create(1.0f, Vector2(halfSize.width/2, halfSize.height/2 + 60)); + MoveTo* moveBack = MoveTo::create(1.0f, Vector2(halfSize.width/2*3, halfSize.height/2 + 60)); ScaleTo* thrink = ScaleTo::create(1.0f, 0.5f); ScaleTo* amplify = ScaleTo::create(1.0f, 2.0f); ScaleTo* scaleBack = ScaleTo::create(1.0f, 1.0f); diff --git a/tests/cpp-tests/Classes/RenderTextureTest/RenderTextureTest.h b/tests/cpp-tests/Classes/RenderTextureTest/RenderTextureTest.h index 4c9f689fc2..07e5c8a7ef 100644 --- a/tests/cpp-tests/Classes/RenderTextureTest/RenderTextureTest.h +++ b/tests/cpp-tests/Classes/RenderTextureTest/RenderTextureTest.h @@ -4,7 +4,6 @@ #include "cocos2d.h" #include "../testBasic.h" #include "../BaseTest.h" -#include "2d/renderer/CCCustomCommand.h" class RenderTextureTest : public BaseTest { diff --git a/tests/cpp-tests/Classes/ShaderTest/ShaderTest.cpp b/tests/cpp-tests/Classes/ShaderTest/ShaderTest.cpp index 298d8479a4..84d925e66c 100644 --- a/tests/cpp-tests/Classes/ShaderTest/ShaderTest.cpp +++ b/tests/cpp-tests/Classes/ShaderTest/ShaderTest.cpp @@ -1,8 +1,6 @@ #include "ShaderTest.h" #include "../testResource.h" #include "cocos2d.h" -#include "2d/renderer/CCCustomCommand.h" -#include "2d/renderer/CCRenderer.h" static int sceneIdx = -1; diff --git a/tests/cpp-tests/Classes/ShaderTest/ShaderTest2.cpp b/tests/cpp-tests/Classes/ShaderTest/ShaderTest2.cpp index 8a4f685d41..7c2a4a6fea 100644 --- a/tests/cpp-tests/Classes/ShaderTest/ShaderTest2.cpp +++ b/tests/cpp-tests/Classes/ShaderTest/ShaderTest2.cpp @@ -2,8 +2,8 @@ #include "ShaderTest.h" #include "../testResource.h" #include "cocos2d.h" -#include "2d/renderer/CCRenderCommand.h" -#include "2d/renderer/CCCustomCommand.h" +#include "renderer/CCRenderCommand.h" +#include "renderer/CCCustomCommand.h" namespace ShaderTest2 { @@ -693,9 +693,9 @@ OutlineShadingSpriteTest::OutlineShadingSpriteTest() if (ShaderTestDemo2::init()) { auto s = Director::getInstance()->getWinSize(); OutlineSprite* sprite = OutlineSprite::createSprite("Images/grossini_dance_10.png"); - sprite->setPosition(Point(s.width * 0.75, s.height/2)); + sprite->setPosition(Vector2(s.width * 0.75, s.height/2)); auto sprite2 = Sprite::create("Images/grossini_dance_10.png"); - sprite2->setPosition(Point(s.width * 0.25, s.height/2)); + sprite2->setPosition(Vector2(s.width * 0.25, s.height/2)); addChild(sprite); addChild(sprite2); } diff --git a/tests/cpp-tests/Classes/Texture2dTest/Texture2dTest.cpp b/tests/cpp-tests/Classes/Texture2dTest/Texture2dTest.cpp index d25f5ea704..c1ee3b2d87 100644 --- a/tests/cpp-tests/Classes/Texture2dTest/Texture2dTest.cpp +++ b/tests/cpp-tests/Classes/Texture2dTest/Texture2dTest.cpp @@ -26,7 +26,6 @@ // local import #include "Texture2dTest.h" #include "../testResource.h" -#include "2d/renderer/CCRenderer.h" enum { kTagLabel = 1, diff --git a/tests/cpp-tests/Classes/Texture2dTest/Texture2dTest.h b/tests/cpp-tests/Classes/Texture2dTest/Texture2dTest.h index ed20466a0a..218af02427 100644 --- a/tests/cpp-tests/Classes/Texture2dTest/Texture2dTest.h +++ b/tests/cpp-tests/Classes/Texture2dTest/Texture2dTest.h @@ -28,7 +28,6 @@ #include "../testBasic.h" #include "../BaseTest.h" -#include "2d/renderer/CCCustomCommand.h" class TextureDemo : public BaseTest diff --git a/tests/cpp-tests/Classes/TileMapTest/TileMapTest.cpp b/tests/cpp-tests/Classes/TileMapTest/TileMapTest.cpp index 5e5786b7e7..e079a94206 100644 --- a/tests/cpp-tests/Classes/TileMapTest/TileMapTest.cpp +++ b/tests/cpp-tests/Classes/TileMapTest/TileMapTest.cpp @@ -1,7 +1,5 @@ #include "TileMapTest.h" #include "../testResource.h" -#include "2d/renderer/CCRenderer.h" -#include "2d/renderer/CCCustomCommand.h" enum { diff --git a/tests/cpp-tests/Classes/TileMapTest/TileMapTest.h b/tests/cpp-tests/Classes/TileMapTest/TileMapTest.h index d1c6f87839..6c886af030 100644 --- a/tests/cpp-tests/Classes/TileMapTest/TileMapTest.h +++ b/tests/cpp-tests/Classes/TileMapTest/TileMapTest.h @@ -3,7 +3,6 @@ #include "../testBasic.h" #include "../BaseTest.h" -#include "2d/renderer/CCCustomCommand.h" class TileDemo : public BaseTest { diff --git a/tests/cpp-tests/proj.android/.classpath b/tests/cpp-tests/proj.android/.classpath index c06dfcb8e5..51769745b2 100644 --- a/tests/cpp-tests/proj.android/.classpath +++ b/tests/cpp-tests/proj.android/.classpath @@ -1,7 +1,7 @@ - + diff --git a/tests/cpp-tests/proj.android/project.properties b/tests/cpp-tests/proj.android/project.properties index 16f145cfc9..5a1770fd8f 100644 --- a/tests/cpp-tests/proj.android/project.properties +++ b/tests/cpp-tests/proj.android/project.properties @@ -8,6 +8,6 @@ # project structure. # Project target. -target=android-10 +target=android-19 android.library.reference.1=../../../cocos/2d/platform/android/java diff --git a/tests/lua-empty-test/project/proj.android/.classpath b/tests/lua-empty-test/project/proj.android/.classpath index 0b08408342..51769745b2 100644 --- a/tests/lua-empty-test/project/proj.android/.classpath +++ b/tests/lua-empty-test/project/proj.android/.classpath @@ -1,9 +1,9 @@ - + + - diff --git a/tests/lua-empty-test/project/proj.android/project.properties b/tests/lua-empty-test/project/proj.android/project.properties index 0a6dc6664d..953fcbf4ee 100644 --- a/tests/lua-empty-test/project/proj.android/project.properties +++ b/tests/lua-empty-test/project/proj.android/project.properties @@ -8,6 +8,6 @@ # project structure. # Project target. -target=android-10 +target=Amazon.com:Amazon Fire TV SDK Addon:17 android.library.reference.1=../../../../cocos/2d/platform/android/java diff --git a/tests/lua-tests/project/proj.android/.classpath b/tests/lua-tests/project/proj.android/.classpath index 0b08408342..51769745b2 100644 --- a/tests/lua-tests/project/proj.android/.classpath +++ b/tests/lua-tests/project/proj.android/.classpath @@ -1,9 +1,9 @@ - + + - diff --git a/tests/lua-tests/project/proj.android/project.properties b/tests/lua-tests/project/proj.android/project.properties index 0a6dc6664d..953fcbf4ee 100644 --- a/tests/lua-tests/project/proj.android/project.properties +++ b/tests/lua-tests/project/proj.android/project.properties @@ -8,6 +8,6 @@ # project structure. # Project target. -target=android-10 +target=Amazon.com:Amazon Fire TV SDK Addon:17 android.library.reference.1=../../../../cocos/2d/platform/android/java