cocos2d.h 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  1. /****************************************************************************
  2. Copyright (c) 2008-2010 Ricardo Quesada
  3. Copyright (c) 2010-2012 cocos2d-x.org
  4. Copyright (c) 2011 Zynga Inc.
  5. Copyright (c) 2013-2017 Chukong Technologies Inc.
  6. http://www.cocos2d-x.org
  7. Permission is hereby granted, free of charge, to any person obtaining a copy
  8. of this software and associated documentation files (the "Software"), to deal
  9. in the Software without restriction, including without limitation the rights
  10. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  11. copies of the Software, and to permit persons to whom the Software is
  12. furnished to do so, subject to the following conditions:
  13. The above copyright notice and this permission notice shall be included in
  14. all copies or substantial portions of the Software.
  15. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  16. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  17. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  18. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  19. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  20. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  21. THE SOFTWARE.
  22. ****************************************************************************/
  23. #ifndef __COCOS2D_H__
  24. #define __COCOS2D_H__
  25. // 0x00 HI ME LO
  26. // 00 03 08 00
  27. #define COCOS2D_VERSION 0x00031501
  28. //
  29. // all cocos2d include files
  30. //
  31. #include "base/ccConfig.h"
  32. // base
  33. #include "base/CCAsyncTaskPool.h"
  34. #include "base/CCAutoreleasePool.h"
  35. #include "base/CCConfiguration.h"
  36. #include "base/CCConsole.h"
  37. #include "base/CCData.h"
  38. #include "base/CCDirector.h"
  39. #include "base/CCIMEDelegate.h"
  40. #include "base/CCIMEDispatcher.h"
  41. #include "base/CCMap.h"
  42. #include "base/CCNS.h"
  43. #include "base/CCProfiling.h"
  44. #include "base/CCProperties.h"
  45. #include "base/CCRef.h"
  46. #include "base/CCRefPtr.h"
  47. #include "base/CCScheduler.h"
  48. #include "base/CCUserDefault.h"
  49. #include "base/CCValue.h"
  50. #include "base/CCVector.h"
  51. #include "base/ZipUtils.h"
  52. #include "base/base64.h"
  53. #include "base/ccConfig.h"
  54. #include "base/ccMacros.h"
  55. #include "base/ccTypes.h"
  56. #include "base/ccUTF8.h"
  57. #include "base/ccUtils.h"
  58. // EventDispatcher
  59. #include "base/CCEventAcceleration.h"
  60. #include "base/CCEventCustom.h"
  61. #include "base/CCEventDispatcher.h"
  62. #include "base/CCEventFocus.h"
  63. #include "base/CCEventKeyboard.h"
  64. #include "base/CCEventListenerAcceleration.h"
  65. #include "base/CCEventListenerCustom.h"
  66. #include "base/CCEventListenerFocus.h"
  67. #include "base/CCEventListenerKeyboard.h"
  68. #include "base/CCEventListenerMouse.h"
  69. #include "base/CCEventListenerTouch.h"
  70. #include "base/CCEventMouse.h"
  71. #include "base/CCEventTouch.h"
  72. #include "base/CCEventType.h"
  73. // math
  74. #include "math/CCAffineTransform.h"
  75. #include "math/CCGeometry.h"
  76. #include "math/CCVertex.h"
  77. #include "math/Mat4.h"
  78. #include "math/MathUtil.h"
  79. #include "math/Quaternion.h"
  80. #include "math/Vec2.h"
  81. #include "math/Vec3.h"
  82. #include "math/Vec4.h"
  83. // actions
  84. #include "2d/CCAction.h"
  85. #include "2d/CCActionCamera.h"
  86. #include "2d/CCActionCatmullRom.h"
  87. #include "2d/CCActionEase.h"
  88. #include "2d/CCActionGrid.h"
  89. #include "2d/CCActionGrid3D.h"
  90. #include "2d/CCActionInstant.h"
  91. #include "2d/CCActionInterval.h"
  92. #include "2d/CCActionManager.h"
  93. #include "2d/CCActionPageTurn3D.h"
  94. #include "2d/CCActionProgressTimer.h"
  95. #include "2d/CCActionTiledGrid.h"
  96. #include "2d/CCActionTween.h"
  97. #include "2d/CCTweenFunction.h"
  98. // 2d nodes
  99. #include "2d/CCAtlasNode.h"
  100. #include "2d/CCClippingNode.h"
  101. #include "2d/CCClippingRectangleNode.h"
  102. #include "2d/CCDrawNode.h"
  103. #include "2d/CCDrawingPrimitives.h"
  104. #include "2d/CCFontFNT.h"
  105. #include "2d/CCLabel.h"
  106. #include "2d/CCLabelAtlas.h"
  107. #include "2d/CCLabelBMFont.h"
  108. #include "2d/CCLabelTTF.h"
  109. #include "2d/CCLayer.h"
  110. #include "2d/CCMenu.h"
  111. #include "2d/CCMenuItem.h"
  112. #include "2d/CCMotionStreak.h"
  113. #include "2d/CCNode.h"
  114. #include "2d/CCNodeGrid.h"
  115. #include "2d/CCParticleBatchNode.h"
  116. #include "2d/CCParticleExamples.h"
  117. #include "2d/CCParticleSystem.h"
  118. #include "2d/CCParticleSystemQuad.h"
  119. #include "2d/CCProgressTimer.h"
  120. #include "2d/CCProtectedNode.h"
  121. #include "2d/CCRenderTexture.h"
  122. #include "2d/CCScene.h"
  123. #include "2d/CCTransition.h"
  124. #include "2d/CCTransitionPageTurn.h"
  125. #include "2d/CCTransitionProgress.h"
  126. // 2d utils
  127. #include "2d/CCCamera.h"
  128. #include "2d/CCCameraBackgroundBrush.h"
  129. #include "2d/CCGrabber.h"
  130. #include "2d/CCGrid.h"
  131. #include "2d/CCLight.h"
  132. // include
  133. #include "base/CCProtocols.h"
  134. // renderer
  135. #include "renderer/CCCustomCommand.h"
  136. #include "renderer/CCGLProgram.h"
  137. #include "renderer/CCGLProgramCache.h"
  138. #include "renderer/CCGLProgramState.h"
  139. #include "renderer/CCGroupCommand.h"
  140. #include "renderer/CCMaterial.h"
  141. #include "renderer/CCPass.h"
  142. #include "renderer/CCPrimitive.h"
  143. #include "renderer/CCPrimitiveCommand.h"
  144. #include "renderer/CCQuadCommand.h"
  145. #include "renderer/CCRenderCommand.h"
  146. #include "renderer/CCRenderCommandPool.h"
  147. #include "renderer/CCRenderState.h"
  148. #include "renderer/CCRenderer.h"
  149. #include "renderer/CCTechnique.h"
  150. #include "renderer/CCTexture2D.h"
  151. #include "renderer/CCTextureCube.h"
  152. #include "renderer/CCTextureCache.h"
  153. #include "renderer/CCTrianglesCommand.h"
  154. #include "renderer/CCVertexAttribBinding.h"
  155. #include "renderer/CCVertexIndexBuffer.h"
  156. #include "renderer/CCVertexIndexData.h"
  157. #include "renderer/CCFrameBuffer.h"
  158. #include "renderer/ccGLStateCache.h"
  159. #include "renderer/ccShaders.h"
  160. // physics
  161. #include "physics/CCPhysicsBody.h"
  162. #include "physics/CCPhysicsContact.h"
  163. #include "physics/CCPhysicsJoint.h"
  164. #include "physics/CCPhysicsShape.h"
  165. #include "physics/CCPhysicsWorld.h"
  166. // platform
  167. #include "platform/CCCommon.h"
  168. #include "platform/CCDevice.h"
  169. #include "platform/CCFileUtils.h"
  170. #include "platform/CCImage.h"
  171. #include "platform/CCPlatformConfig.h"
  172. #include "platform/CCPlatformMacros.h"
  173. #include "platform/CCSAXParser.h"
  174. #include "platform/CCThread.h"
  175. #if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
  176. #include "platform/ios/CCApplication-ios.h"
  177. #include "platform/ios/CCGLViewImpl-ios.h"
  178. #include "platform/ios/CCGL-ios.h"
  179. #include "platform/ios/CCStdC-ios.h"
  180. #endif // CC_TARGET_PLATFORM == CC_PLATFORM_IOS
  181. #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
  182. #include "platform/android/CCApplication-android.h"
  183. #include "platform/android/CCGLViewImpl-android.h"
  184. #include "platform/android/CCGL-android.h"
  185. #include "platform/android/CCStdC-android.h"
  186. //Enhance modification begin
  187. #include "platform/android/CCEnhanceAPI-android.h"
  188. //Enhance modification end
  189. #endif // CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
  190. #if (CC_TARGET_PLATFORM == CC_PLATFORM_BLACKBERRY)
  191. #include "platform/blackberry/CCApplication.h"
  192. #include "platform/blackberry/CCGLViewImpl.h"
  193. #include "platform/blackberry/CCGL.h"
  194. #include "platform/blackberry/CCStdC.h"
  195. #endif // CC_TARGET_PLATFORM == CC_PLATFORM_BLACKBERRY
  196. #if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
  197. #include "platform/win32/CCApplication-win32.h"
  198. #include "platform/desktop/CCGLViewImpl-desktop.h"
  199. #include "platform/win32/CCGL-win32.h"
  200. #include "platform/win32/CCStdC-win32.h"
  201. #endif // CC_TARGET_PLATFORM == CC_PLATFORM_WIN32
  202. #if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC)
  203. #include "platform/desktop/CCGLViewImpl-desktop.h"
  204. #include "platform/mac/CCApplication-mac.h"
  205. #include "platform/mac/CCGL-mac.h"
  206. #include "platform/mac/CCStdC-mac.h"
  207. #endif // CC_TARGET_PLATFORM == CC_PLATFORM_MAC
  208. #if (CC_TARGET_PLATFORM == CC_PLATFORM_LINUX)
  209. #include "platform/linux/CCApplication-linux.h"
  210. #include "platform/desktop/CCGLViewImpl-desktop.h"
  211. #include "platform/linux/CCGL-linux.h"
  212. #include "platform/linux/CCStdC-linux.h"
  213. #endif // CC_TARGET_PLATFORM == CC_PLATFORM_LINUX
  214. #if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT)
  215. #include "platform/winrt/CCApplication.h"
  216. #include "platform/winrt/CCGLViewImpl-winrt.h"
  217. #include "platform/winrt/CCGL.h"
  218. #include "platform/winrt/CCStdC.h"
  219. #endif // CC_TARGET_PLATFORM == CC_PLATFORM_WINRT
  220. #if (CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN)
  221. #include "platform/tizen/CCApplication-tizen.h"
  222. #include "platform/tizen/CCGLViewImpl-tizen.h"
  223. #include "platform/tizen/CCGL-tizen.h"
  224. #include "platform/tizen/CCStdC-tizen.h"
  225. #endif
  226. // script_support
  227. #include "base/CCScriptSupport.h"
  228. // sprite_nodes
  229. #include "2d/CCAnimation.h"
  230. #include "2d/CCAnimationCache.h"
  231. #include "2d/CCSprite.h"
  232. #include "2d/CCAutoPolygon.h"
  233. #include "2d/CCSpriteBatchNode.h"
  234. #include "2d/CCSpriteFrame.h"
  235. #include "2d/CCSpriteFrameCache.h"
  236. // text_input_node
  237. #include "2d/CCTextFieldTTF.h"
  238. // textures
  239. #include "renderer/CCTextureAtlas.h"
  240. // tilemap_parallax_nodes
  241. #include "2d/CCParallaxNode.h"
  242. #include "2d/CCTMXLayer.h"
  243. #include "2d/CCTMXObjectGroup.h"
  244. #include "2d/CCTMXTiledMap.h"
  245. #include "2d/CCTMXXMLParser.h"
  246. #include "2d/CCTileMapAtlas.h"
  247. #include "2d/CCFastTMXLayer.h"
  248. #include "2d/CCFastTMXTiledMap.h"
  249. // component
  250. #include "2d/CCComponent.h"
  251. #include "2d/CCComponentContainer.h"
  252. //3d
  253. #include "3d/CCAABB.h"
  254. #include "3d/CCAnimate3D.h"
  255. #include "3d/CCAnimation3D.h"
  256. #include "3d/CCAttachNode.h"
  257. #include "3d/CCBillBoard.h"
  258. #include "3d/CCFrustum.h"
  259. #include "3d/CCMesh.h"
  260. #include "3d/CCMeshSkin.h"
  261. #include "3d/CCMotionStreak3D.h"
  262. #include "3d/CCMeshVertexIndexData.h"
  263. #include "3d/CCOBB.h"
  264. #include "3d/CCPlane.h"
  265. #include "3d/CCRay.h"
  266. #include "3d/CCSkeleton3D.h"
  267. #include "3d/CCSkybox.h"
  268. #include "3d/CCSprite3D.h"
  269. #include "3d/CCSprite3DMaterial.h"
  270. #include "3d/CCTerrain.h"
  271. // vr
  272. #include "vr/CCVRGenericRenderer.h"
  273. // Deprecated
  274. // All deprecated features are include inside deprecated/CCDeprecated.h.
  275. // It is recommended that you just include what is needed.
  276. // eg. #include "deprecated/CCString.h" if you only need cocos2d::__String.
  277. #include "deprecated/CCDeprecated.h"
  278. NS_CC_BEGIN
  279. CC_DLL const char* cocos2dVersion();
  280. NS_CC_END
  281. #endif // __COCOS2D_H__