Improved directory structure

This commit is contained in:
Ricardo Quesada 2014-04-29 17:37:36 -07:00
parent f3f138368f
commit 8bb8416c26
293 changed files with 750 additions and 970 deletions

View File

@ -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)

View File

@ -1 +1 @@
086c0c076d472cd5dd97cc03cfe600085e508d41
a4eda8c14ebd8738b7d9bc665cfb588c2948cd50

View File

@ -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 \

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -39,7 +39,7 @@
#include "2d/CCActionInterval.h"
#include "2d/CCNode.h"
#include "base/CCGeometry.h"
#include "math/CCGeometry.h"
NS_CC_BEGIN;

View File

@ -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"

View File

@ -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 <stdlib.h>
NS_CC_BEGIN

View File

@ -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"

View File

@ -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 <stdlib.h>

View File

@ -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

View File

@ -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"

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -25,7 +25,7 @@ THE SOFTWARE.
#include "CCComponentContainer.h"
#include "CCComponent.h"
#include "2d/CCDirector.h"
#include "base/CCDirector.h"
NS_CC_BEGIN

View File

@ -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

View File

@ -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

View File

@ -41,15 +41,15 @@ THE SOFTWARE.
#include <string.h>
#include <cmath>
#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

View File

@ -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"
/**

View File

@ -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

View File

@ -30,7 +30,7 @@
#include "CCFontFNT.h"
#include "CCFontFreeType.h"
#include "CCFontCharMap.h"
#include "2d/CCDirector.h"
#include "base/CCDirector.h"
NS_CC_BEGIN

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -27,7 +27,7 @@ THE SOFTWARE.
#define __CC_IME_DELEGATE_H__
#include <string>
#include "base/CCGeometry.h"
#include "math/CCGeometry.h"
NS_CC_BEGIN
extern const std::string STD_STRING_EMPTY;

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -27,24 +27,24 @@ THE SOFTWARE.
#include <stdarg.h>
#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

View File

@ -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"

View File

@ -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 <vector>

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -32,7 +32,7 @@
#include "2d/CCNode.h"
#include "2d/CCProtocols.h"
#include "2d/renderer/CCBatchCommand.h"
#include "renderer/CCBatchCommand.h"
NS_CC_BEGIN

View File

@ -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"

View File

@ -47,14 +47,14 @@ THE SOFTWARE.
#include <string>
#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"

View File

@ -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

View File

@ -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

View File

@ -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 <float.h>

View File

@ -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

View File

@ -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 <string>

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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)
{

View File

@ -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 <map>
#include <string>
#include <list>

View File

@ -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

View File

@ -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;

View File

@ -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 <string>
#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

View File

@ -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

View File

@ -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

View File

@ -26,7 +26,7 @@ THE SOFTWARE.
****************************************************************************/
#include "CCTextureCache.h"
#include "2d/CCSpriteFrame.h"
#include "2d/CCDirector.h"
#include "base/CCDirector.h"
NS_CC_BEGIN

View File

@ -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

View File

@ -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 <vector>
using namespace std;

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -30,11 +30,11 @@ THE SOFTWARE.
#include <sstream>
#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;

View File

@ -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"

View File

@ -25,7 +25,7 @@ THE SOFTWARE.
#include "CCTextFieldTTF.h"
#include "2d/CCDirector.h"
#include "base/CCDirector.h"
#include "CCGLView.h"
NS_CC_BEGIN

View File

@ -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;

View File

@ -32,8 +32,8 @@ THE SOFTWARE.
#include <map>
#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);

View File

@ -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 <stdlib.h>
#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

View File

@ -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 <string>
NS_CC_BEGIN

View File

@ -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"

View File

@ -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 <sstream>

View File

@ -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"

View File

@ -29,7 +29,7 @@ THE SOFTWARE.
#define __CCTRANSITION_H__
#include "CCScene.h"
#include "2d/ccTypes.h"
#include "base/ccTypes.h"
NS_CC_BEGIN

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -26,7 +26,7 @@ THE SOFTWARE.
#define __CCTWEENFUNCTION_H__
#include "base/CCPlatformMacros.h"
#include "2d/ccMacros.h"
#include "base/ccMacros.h"
#include <math.h>
NS_CC_BEGIN

View File

@ -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)

View File

@ -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"

View File

@ -25,7 +25,7 @@
****************************************************************************/
#include "CCVertex.h"
#include "2d/ccMacros.h"
#include "base/ccMacros.h"
NS_CC_BEGIN

View File

@ -26,7 +26,7 @@
#ifndef __CCVERTEX_H__
#define __CCVERTEX_H__
#include "2d/ccTypes.h"
#include "base/ccTypes.h"
NS_CC_BEGIN

View File

@ -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

View File

@ -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

View File

@ -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 <stdlib.h>

View File

@ -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

View File

@ -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

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