2014-04-27 01:11:22 +08:00
|
|
|
/****************************************************************************
|
|
|
|
Copyright (c) 2008-2010 Ricardo Quesada
|
|
|
|
Copyright (c) 2010-2012 cocos2d-x.org
|
|
|
|
Copyright (c) 2011 Zynga Inc.
|
2016-08-05 09:42:15 +08:00
|
|
|
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
2014-04-27 01:11:22 +08:00
|
|
|
|
|
|
|
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 __COCOS2D_H__
|
|
|
|
#define __COCOS2D_H__
|
|
|
|
|
|
|
|
// 0x00 HI ME LO
|
2015-09-07 11:45:04 +08:00
|
|
|
// 00 03 08 00
|
2017-01-20 09:59:30 +08:00
|
|
|
#define COCOS2D_VERSION 0x00031401
|
2014-04-27 01:11:22 +08:00
|
|
|
|
|
|
|
//
|
|
|
|
// all cocos2d include files
|
|
|
|
//
|
2014-04-30 08:37:36 +08:00
|
|
|
#include "base/ccConfig.h"
|
|
|
|
|
|
|
|
// base
|
2015-05-12 12:31:33 +08:00
|
|
|
#include "base/CCAsyncTaskPool.h"
|
2014-04-30 08:37:36 +08:00
|
|
|
#include "base/CCAutoreleasePool.h"
|
2015-05-12 12:31:33 +08:00
|
|
|
#include "base/CCConfiguration.h"
|
|
|
|
#include "base/CCConsole.h"
|
2014-04-30 08:37:36 +08:00
|
|
|
#include "base/CCData.h"
|
2015-05-12 12:31:33 +08:00
|
|
|
#include "base/CCDirector.h"
|
|
|
|
#include "base/CCIMEDelegate.h"
|
|
|
|
#include "base/CCIMEDispatcher.h"
|
|
|
|
#include "base/CCMap.h"
|
|
|
|
#include "base/CCNS.h"
|
|
|
|
#include "base/CCProfiling.h"
|
|
|
|
#include "base/CCProperties.h"
|
|
|
|
#include "base/CCRef.h"
|
|
|
|
#include "base/CCRefPtr.h"
|
|
|
|
#include "base/CCScheduler.h"
|
|
|
|
#include "base/CCUserDefault.h"
|
2014-04-30 08:37:36 +08:00
|
|
|
#include "base/CCValue.h"
|
2015-05-12 12:31:33 +08:00
|
|
|
#include "base/CCVector.h"
|
|
|
|
#include "base/ZipUtils.h"
|
|
|
|
#include "base/base64.h"
|
2014-04-30 08:37:36 +08:00
|
|
|
#include "base/ccConfig.h"
|
|
|
|
#include "base/ccMacros.h"
|
|
|
|
#include "base/ccTypes.h"
|
2014-05-17 05:36:00 +08:00
|
|
|
#include "base/ccUTF8.h"
|
2014-05-27 10:44:23 +08:00
|
|
|
#include "base/ccUtils.h"
|
2014-04-30 08:37:36 +08:00
|
|
|
|
|
|
|
// EventDispatcher
|
2015-05-12 12:31:33 +08:00
|
|
|
#include "base/CCEventAcceleration.h"
|
|
|
|
#include "base/CCEventCustom.h"
|
2014-04-30 08:37:36 +08:00
|
|
|
#include "base/CCEventDispatcher.h"
|
2015-05-12 12:31:33 +08:00
|
|
|
#include "base/CCEventFocus.h"
|
2014-04-30 08:37:36 +08:00
|
|
|
#include "base/CCEventKeyboard.h"
|
|
|
|
#include "base/CCEventListenerAcceleration.h"
|
|
|
|
#include "base/CCEventListenerCustom.h"
|
2014-05-04 16:31:24 +08:00
|
|
|
#include "base/CCEventListenerFocus.h"
|
2015-05-12 12:31:33 +08:00
|
|
|
#include "base/CCEventListenerKeyboard.h"
|
|
|
|
#include "base/CCEventListenerMouse.h"
|
|
|
|
#include "base/CCEventListenerTouch.h"
|
|
|
|
#include "base/CCEventMouse.h"
|
|
|
|
#include "base/CCEventTouch.h"
|
|
|
|
#include "base/CCEventType.h"
|
2014-04-30 08:37:36 +08:00
|
|
|
|
|
|
|
// math
|
|
|
|
#include "math/CCAffineTransform.h"
|
|
|
|
#include "math/CCGeometry.h"
|
2015-05-12 12:31:33 +08:00
|
|
|
#include "math/CCVertex.h"
|
|
|
|
#include "math/Mat4.h"
|
|
|
|
#include "math/MathUtil.h"
|
|
|
|
#include "math/Quaternion.h"
|
2014-05-17 05:36:00 +08:00
|
|
|
#include "math/Vec2.h"
|
|
|
|
#include "math/Vec3.h"
|
|
|
|
#include "math/Vec4.h"
|
2014-04-27 01:11:22 +08:00
|
|
|
|
|
|
|
// actions
|
|
|
|
#include "2d/CCAction.h"
|
|
|
|
#include "2d/CCActionCamera.h"
|
2015-05-12 12:31:33 +08:00
|
|
|
#include "2d/CCActionCatmullRom.h"
|
2014-04-27 01:11:22 +08:00
|
|
|
#include "2d/CCActionEase.h"
|
|
|
|
#include "2d/CCActionGrid.h"
|
|
|
|
#include "2d/CCActionGrid3D.h"
|
|
|
|
#include "2d/CCActionInstant.h"
|
2015-05-12 12:31:33 +08:00
|
|
|
#include "2d/CCActionInterval.h"
|
|
|
|
#include "2d/CCActionManager.h"
|
|
|
|
#include "2d/CCActionPageTurn3D.h"
|
|
|
|
#include "2d/CCActionProgressTimer.h"
|
|
|
|
#include "2d/CCActionTiledGrid.h"
|
2014-04-27 01:11:22 +08:00
|
|
|
#include "2d/CCActionTween.h"
|
|
|
|
#include "2d/CCTweenFunction.h"
|
|
|
|
|
2014-04-30 08:37:36 +08:00
|
|
|
// 2d nodes
|
2014-04-27 01:11:22 +08:00
|
|
|
#include "2d/CCAtlasNode.h"
|
2015-05-12 12:31:33 +08:00
|
|
|
#include "2d/CCClippingNode.h"
|
|
|
|
#include "2d/CCClippingRectangleNode.h"
|
2014-04-27 01:11:22 +08:00
|
|
|
#include "2d/CCDrawNode.h"
|
2015-05-12 12:31:33 +08:00
|
|
|
#include "2d/CCDrawingPrimitives.h"
|
|
|
|
#include "2d/CCFontFNT.h"
|
|
|
|
#include "2d/CCLabel.h"
|
2014-04-27 01:11:22 +08:00
|
|
|
#include "2d/CCLabelAtlas.h"
|
|
|
|
#include "2d/CCLabelBMFont.h"
|
2015-05-12 12:31:33 +08:00
|
|
|
#include "2d/CCLabelTTF.h"
|
2014-04-27 01:11:22 +08:00
|
|
|
#include "2d/CCLayer.h"
|
|
|
|
#include "2d/CCMenu.h"
|
|
|
|
#include "2d/CCMenuItem.h"
|
|
|
|
#include "2d/CCMotionStreak.h"
|
2015-05-12 12:31:33 +08:00
|
|
|
#include "2d/CCNode.h"
|
2014-04-27 01:11:22 +08:00
|
|
|
#include "2d/CCNodeGrid.h"
|
|
|
|
#include "2d/CCParticleBatchNode.h"
|
|
|
|
#include "2d/CCParticleExamples.h"
|
2015-05-12 12:31:33 +08:00
|
|
|
#include "2d/CCParticleSystem.h"
|
2014-04-27 01:11:22 +08:00
|
|
|
#include "2d/CCParticleSystemQuad.h"
|
2015-05-12 12:31:33 +08:00
|
|
|
#include "2d/CCProgressTimer.h"
|
|
|
|
#include "2d/CCProtectedNode.h"
|
|
|
|
#include "2d/CCRenderTexture.h"
|
|
|
|
#include "2d/CCScene.h"
|
|
|
|
#include "2d/CCTransition.h"
|
|
|
|
#include "2d/CCTransitionPageTurn.h"
|
|
|
|
#include "2d/CCTransitionProgress.h"
|
2014-04-27 01:11:22 +08:00
|
|
|
|
2014-04-30 08:37:36 +08:00
|
|
|
// 2d utils
|
2015-05-12 12:31:33 +08:00
|
|
|
#include "2d/CCCamera.h"
|
2015-08-21 10:27:19 +08:00
|
|
|
#include "2d/CCCameraBackgroundBrush.h"
|
2014-04-30 08:37:36 +08:00
|
|
|
#include "2d/CCGrabber.h"
|
|
|
|
#include "2d/CCGrid.h"
|
2014-10-20 16:25:24 +08:00
|
|
|
#include "2d/CCLight.h"
|
|
|
|
|
2014-04-30 08:37:36 +08:00
|
|
|
// include
|
2014-05-17 05:36:00 +08:00
|
|
|
#include "base/CCProtocols.h"
|
2014-04-30 08:37:36 +08:00
|
|
|
|
2014-05-17 05:36:00 +08:00
|
|
|
// renderer
|
2014-04-30 08:37:36 +08:00
|
|
|
#include "renderer/CCCustomCommand.h"
|
2015-05-12 12:31:33 +08:00
|
|
|
#include "renderer/CCGLProgram.h"
|
|
|
|
#include "renderer/CCGLProgramCache.h"
|
|
|
|
#include "renderer/CCGLProgramState.h"
|
2014-04-30 08:37:36 +08:00
|
|
|
#include "renderer/CCGroupCommand.h"
|
2015-05-12 12:31:33 +08:00
|
|
|
#include "renderer/CCMaterial.h"
|
|
|
|
#include "renderer/CCPass.h"
|
|
|
|
#include "renderer/CCPrimitive.h"
|
|
|
|
#include "renderer/CCPrimitiveCommand.h"
|
2014-04-30 08:37:36 +08:00
|
|
|
#include "renderer/CCQuadCommand.h"
|
|
|
|
#include "renderer/CCRenderCommand.h"
|
|
|
|
#include "renderer/CCRenderCommandPool.h"
|
2015-05-12 12:31:33 +08:00
|
|
|
#include "renderer/CCRenderState.h"
|
2014-04-30 08:37:36 +08:00
|
|
|
#include "renderer/CCRenderer.h"
|
2015-05-12 12:31:33 +08:00
|
|
|
#include "renderer/CCTechnique.h"
|
2014-05-17 05:36:00 +08:00
|
|
|
#include "renderer/CCTexture2D.h"
|
2015-08-24 10:49:10 +08:00
|
|
|
#include "renderer/CCTextureCube.h"
|
2014-05-17 05:36:00 +08:00
|
|
|
#include "renderer/CCTextureCache.h"
|
2015-05-12 12:31:33 +08:00
|
|
|
#include "renderer/CCTrianglesCommand.h"
|
2015-05-13 10:58:09 +08:00
|
|
|
#include "renderer/CCVertexAttribBinding.h"
|
2014-08-20 14:48:50 +08:00
|
|
|
#include "renderer/CCVertexIndexBuffer.h"
|
|
|
|
#include "renderer/CCVertexIndexData.h"
|
2015-06-09 15:32:12 +08:00
|
|
|
#include "renderer/CCFrameBuffer.h"
|
2015-05-12 12:31:33 +08:00
|
|
|
#include "renderer/ccGLStateCache.h"
|
|
|
|
#include "renderer/ccShaders.h"
|
2014-04-27 01:11:22 +08:00
|
|
|
|
|
|
|
// physics
|
|
|
|
#include "physics/CCPhysicsBody.h"
|
|
|
|
#include "physics/CCPhysicsContact.h"
|
|
|
|
#include "physics/CCPhysicsJoint.h"
|
2015-05-12 12:31:33 +08:00
|
|
|
#include "physics/CCPhysicsShape.h"
|
2014-04-27 01:11:22 +08:00
|
|
|
#include "physics/CCPhysicsWorld.h"
|
|
|
|
|
|
|
|
// platform
|
2014-05-17 05:36:00 +08:00
|
|
|
#include "platform/CCCommon.h"
|
2015-05-12 12:31:33 +08:00
|
|
|
#include "platform/CCDevice.h"
|
2014-05-17 05:36:00 +08:00
|
|
|
#include "platform/CCFileUtils.h"
|
|
|
|
#include "platform/CCImage.h"
|
2014-09-10 08:17:07 +08:00
|
|
|
#include "platform/CCPlatformConfig.h"
|
|
|
|
#include "platform/CCPlatformMacros.h"
|
2015-05-12 12:31:33 +08:00
|
|
|
#include "platform/CCSAXParser.h"
|
|
|
|
#include "platform/CCThread.h"
|
2014-04-27 01:11:22 +08:00
|
|
|
|
|
|
|
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
|
2014-09-10 07:50:02 +08:00
|
|
|
#include "platform/ios/CCApplication-ios.h"
|
|
|
|
#include "platform/ios/CCGLViewImpl-ios.h"
|
|
|
|
#include "platform/ios/CCGL-ios.h"
|
|
|
|
#include "platform/ios/CCStdC-ios.h"
|
2014-04-27 01:11:22 +08:00
|
|
|
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_IOS
|
|
|
|
|
|
|
|
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
|
2014-09-10 07:50:02 +08:00
|
|
|
#include "platform/android/CCApplication-android.h"
|
|
|
|
#include "platform/android/CCGLViewImpl-android.h"
|
|
|
|
#include "platform/android/CCGL-android.h"
|
|
|
|
#include "platform/android/CCStdC-android.h"
|
2015-05-15 14:29:22 +08:00
|
|
|
//Enhance modification begin
|
2015-05-28 11:03:49 +08:00
|
|
|
#include "platform/android/CCEnhanceAPI-android.h"
|
2015-05-15 14:29:22 +08:00
|
|
|
//Enhance modification end
|
2014-04-27 01:11:22 +08:00
|
|
|
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
|
|
|
|
|
|
|
|
#if (CC_TARGET_PLATFORM == CC_PLATFORM_BLACKBERRY)
|
2014-05-17 05:36:00 +08:00
|
|
|
#include "platform/blackberry/CCApplication.h"
|
2014-07-31 00:53:04 +08:00
|
|
|
#include "platform/blackberry/CCGLViewImpl.h"
|
2014-05-17 05:36:00 +08:00
|
|
|
#include "platform/blackberry/CCGL.h"
|
|
|
|
#include "platform/blackberry/CCStdC.h"
|
2014-04-27 01:11:22 +08:00
|
|
|
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_BLACKBERRY
|
|
|
|
|
|
|
|
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
|
2014-09-10 07:50:02 +08:00
|
|
|
#include "platform/win32/CCApplication-win32.h"
|
2014-09-10 09:07:24 +08:00
|
|
|
#include "platform/desktop/CCGLViewImpl-desktop.h"
|
2014-09-10 07:50:02 +08:00
|
|
|
#include "platform/win32/CCGL-win32.h"
|
|
|
|
#include "platform/win32/CCStdC-win32.h"
|
2014-04-27 01:11:22 +08:00
|
|
|
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_WIN32
|
|
|
|
|
|
|
|
#if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC)
|
2014-09-10 07:50:02 +08:00
|
|
|
#include "platform/desktop/CCGLViewImpl-desktop.h"
|
|
|
|
#include "platform/mac/CCApplication-mac.h"
|
|
|
|
#include "platform/mac/CCGL-mac.h"
|
|
|
|
#include "platform/mac/CCStdC-mac.h"
|
2014-04-27 01:11:22 +08:00
|
|
|
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_MAC
|
|
|
|
|
|
|
|
#if (CC_TARGET_PLATFORM == CC_PLATFORM_LINUX)
|
2014-09-10 07:50:02 +08:00
|
|
|
#include "platform/linux/CCApplication-linux.h"
|
|
|
|
#include "platform/desktop/CCGLViewImpl-desktop.h"
|
|
|
|
#include "platform/linux/CCGL-linux.h"
|
|
|
|
#include "platform/linux/CCStdC-linux.h"
|
2014-04-27 01:11:22 +08:00
|
|
|
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_LINUX
|
|
|
|
|
|
|
|
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT)
|
2014-05-17 05:36:00 +08:00
|
|
|
#include "platform/winrt/CCApplication.h"
|
2014-10-15 05:22:41 +08:00
|
|
|
#include "platform/winrt/CCGLViewImpl-winrt.h"
|
2014-05-17 05:36:00 +08:00
|
|
|
#include "platform/winrt/CCGL.h"
|
|
|
|
#include "platform/winrt/CCStdC.h"
|
2014-04-27 01:11:22 +08:00
|
|
|
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_WINRT
|
|
|
|
|
2016-04-28 09:49:55 +08:00
|
|
|
#if (CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN)
|
|
|
|
#include "platform/tizen/CCApplication-tizen.h"
|
|
|
|
#include "platform/tizen/CCGLViewImpl-tizen.h"
|
|
|
|
#include "platform/tizen/CCGL-tizen.h"
|
|
|
|
#include "platform/tizen/CCStdC-tizen.h"
|
|
|
|
#endif
|
|
|
|
|
2014-04-27 01:11:22 +08:00
|
|
|
// script_support
|
2014-05-17 05:36:00 +08:00
|
|
|
#include "base/CCScriptSupport.h"
|
2014-04-27 01:11:22 +08:00
|
|
|
|
|
|
|
// sprite_nodes
|
|
|
|
#include "2d/CCAnimation.h"
|
|
|
|
#include "2d/CCAnimationCache.h"
|
|
|
|
#include "2d/CCSprite.h"
|
2015-06-08 15:40:18 +08:00
|
|
|
#include "2d/CCAutoPolygon.h"
|
2014-04-27 01:11:22 +08:00
|
|
|
#include "2d/CCSpriteBatchNode.h"
|
|
|
|
#include "2d/CCSpriteFrame.h"
|
|
|
|
#include "2d/CCSpriteFrameCache.h"
|
|
|
|
|
|
|
|
// text_input_node
|
|
|
|
#include "2d/CCTextFieldTTF.h"
|
|
|
|
|
|
|
|
// textures
|
2014-05-17 05:36:00 +08:00
|
|
|
#include "renderer/CCTextureAtlas.h"
|
2014-04-27 01:11:22 +08:00
|
|
|
|
|
|
|
// tilemap_parallax_nodes
|
|
|
|
#include "2d/CCParallaxNode.h"
|
|
|
|
#include "2d/CCTMXLayer.h"
|
|
|
|
#include "2d/CCTMXObjectGroup.h"
|
|
|
|
#include "2d/CCTMXTiledMap.h"
|
|
|
|
#include "2d/CCTMXXMLParser.h"
|
|
|
|
#include "2d/CCTileMapAtlas.h"
|
2015-05-13 17:51:30 +08:00
|
|
|
#include "2d/CCFastTMXLayer.h"
|
|
|
|
#include "2d/CCFastTMXTiledMap.h"
|
2014-04-27 01:11:22 +08:00
|
|
|
|
|
|
|
// component
|
|
|
|
#include "2d/CCComponent.h"
|
|
|
|
#include "2d/CCComponentContainer.h"
|
|
|
|
|
2014-09-10 03:18:31 +08:00
|
|
|
//3d
|
|
|
|
#include "3d/CCAABB.h"
|
|
|
|
#include "3d/CCAnimate3D.h"
|
|
|
|
#include "3d/CCAnimation3D.h"
|
|
|
|
#include "3d/CCAttachNode.h"
|
2014-09-10 10:28:59 +08:00
|
|
|
#include "3d/CCBillBoard.h"
|
2014-12-24 15:09:26 +08:00
|
|
|
#include "3d/CCFrustum.h"
|
2015-05-12 12:31:33 +08:00
|
|
|
#include "3d/CCMesh.h"
|
|
|
|
#include "3d/CCMeshSkin.h"
|
2015-09-01 11:34:35 +08:00
|
|
|
#include "3d/CCMotionStreak3D.h"
|
2015-05-12 12:31:33 +08:00
|
|
|
#include "3d/CCMeshVertexIndexData.h"
|
|
|
|
#include "3d/CCOBB.h"
|
2014-12-24 15:09:26 +08:00
|
|
|
#include "3d/CCPlane.h"
|
2015-05-12 12:31:33 +08:00
|
|
|
#include "3d/CCRay.h"
|
|
|
|
#include "3d/CCSkeleton3D.h"
|
2015-03-20 17:53:05 +08:00
|
|
|
#include "3d/CCSkybox.h"
|
2015-05-12 12:31:33 +08:00
|
|
|
#include "3d/CCSprite3D.h"
|
|
|
|
#include "3d/CCSprite3DMaterial.h"
|
2015-04-02 14:29:02 +08:00
|
|
|
#include "3d/CCTerrain.h"
|
2015-08-24 10:49:10 +08:00
|
|
|
|
2016-06-16 02:33:25 +08:00
|
|
|
// vr
|
|
|
|
#include "vr/CCVRGenericRenderer.h"
|
|
|
|
|
2014-09-10 03:18:31 +08:00
|
|
|
|
2016-04-18 15:09:21 +08:00
|
|
|
// Deprecated
|
|
|
|
// All deprecated features are include inside deprecated/CCDeprecated.h.
|
2016-07-22 01:05:19 +08:00
|
|
|
// It is recommended that you just include what is needed.
|
2016-04-18 15:09:21 +08:00
|
|
|
// eg. #include "deprecated/CCString.h" if you only need cocos2d::__String.
|
2014-04-27 01:11:22 +08:00
|
|
|
#include "deprecated/CCDeprecated.h"
|
|
|
|
|
|
|
|
|
|
|
|
NS_CC_BEGIN
|
|
|
|
|
|
|
|
CC_DLL const char* cocos2dVersion();
|
|
|
|
|
|
|
|
NS_CC_END
|
|
|
|
|
|
|
|
#endif // __COCOS2D_H__
|