/libs/cocos2d/ccConfig.h

http://github.com/kstenerud/ObjectAL-for-iPhone · C Header · 195 lines · 21 code · 20 blank · 154 comment · 1 complexity · 7ce733021eca1f3233d547d035bc241d MD5 · raw file

  1. /*
  2. * cocos2d for iPhone: http://www.cocos2d-iphone.org
  3. *
  4. * Copyright (c) 2008-2010 Ricardo Quesada
  5. *
  6. * Permission is hereby granted, free of charge, to any person obtaining a copy
  7. * of this software and associated documentation files (the "Software"), to deal
  8. * in the Software without restriction, including without limitation the rights
  9. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  10. * copies of the Software, and to permit persons to whom the Software is
  11. * furnished to do so, subject to the following conditions:
  12. *
  13. * The above copyright notice and this permission notice shall be included in
  14. * all copies or substantial portions of the Software.
  15. *
  16. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  17. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  18. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  19. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  20. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  21. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  22. * THE SOFTWARE.
  23. */
  24. /**
  25. @file
  26. cocos2d (cc) configuration file
  27. */
  28. /** @def CC_FONT_LABEL_SUPPORT
  29. If enabled, FontLabel will be used to render .ttf files.
  30. If the .ttf file is not found, then it will use the standard UIFont class
  31. If disabled, the standard UIFont class will be used.
  32. To enable set it to a value different than 0. Enabled by default.
  33. */
  34. #define CC_FONT_LABEL_SUPPORT 1
  35. /** @def CC_DIRECTOR_FAST_FPS
  36. If enabled, then the FPS will be drawn using CCLabelAtlas (fast rendering).
  37. You will need to add the fps_images.png to your project.
  38. If disabled, the FPS will be rendered using CCLabel (slow rendering)
  39. To enable set it to a value different than 0. Enabled by default.
  40. */
  41. #define CC_DIRECTOR_FAST_FPS 1
  42. /** @def CC_DIRECTOR_FPS_INTERVAL
  43. Senconds between FPS updates.
  44. 0.5 seconds, means that the FPS number will be updated every 0.5 seconds.
  45. Having a bigger number means a more reliable FPS
  46. Default value: 0.1f
  47. */
  48. #define CC_DIRECTOR_FPS_INTERVAL (0.1f)
  49. /** @def CC_DIRECTOR_DISPATCH_FAST_EVENTS
  50. If enabled, and only when it is used with CCFastDirector, the main loop will wait 0.04 seconds to
  51. dispatch all the events, even if there are not events to dispatch.
  52. If your game uses lot's of events (eg: touches) it might be a good idea to enable this feature.
  53. Otherwise, it is safe to leave it disabled.
  54. To enable set it to a value different than 0. Disabled by default.
  55. @warning This feature is experimental
  56. */
  57. #define CC_DIRECTOR_DISPATCH_FAST_EVENTS 0
  58. /** @def CC_COCOSNODE_RENDER_SUBPIXEL
  59. If enabled, the CCNode objects (CCSprite, CCLabel,etc) will be able to render in subpixels.
  60. If disabled, integer pixels will be used.
  61. To enable set it to a value different than 0. Enabled by default.
  62. */
  63. #define CC_COCOSNODE_RENDER_SUBPIXEL 1
  64. /** @def CC_SPRITEBATCHNODE_RENDER_SUBPIXEL
  65. If enabled, the CCSprite objects rendered with CCSpriteBatchNode will be able to render in subpixels.
  66. If disabled, integer pixels will be used.
  67. To enable set it to a value different than 0. Enabled by default.
  68. */
  69. #define CC_SPRITEBATCHNODE_RENDER_SUBPIXEL 1
  70. /** @def CC_USES_VBO
  71. If enabled, batch nodes (texture atlas and particle system) will use VBO instead of vertex list (VBO is recommended by Apple)
  72. To enable set it to a value different than 0.
  73. Enabled by default on ARMv7 processors and iPhone Simulator.
  74. Disabled by default on ARMv6 processors.
  75. @since v0.99.5
  76. */
  77. #if defined(__ARM_NEON__) || defined(TARGET_IPHONE_SIMULATOR)
  78. #define CC_USES_VBO 1
  79. #else
  80. #define CC_USES_VBO 0
  81. #endif
  82. /** @def CC_NODE_TRANSFORM_USING_AFFINE_MATRIX
  83. If enabled, CCNode will transform the nodes using a cached Affine matrix.
  84. If disabled, the node will be transformed using glTranslate,glRotate,glScale.
  85. Using the affine matrix only requires 2 GL calls.
  86. Using the translate/rotate/scale requires 5 GL calls.
  87. But computing the Affine matrix is relative expensive.
  88. But according to performance tests, Affine matrix performs better.
  89. This parameter doesn't affect SpriteSheet nodes.
  90. To enable set it to a value different than 0. Enabled by default.
  91. */
  92. #define CC_NODE_TRANSFORM_USING_AFFINE_MATRIX 1
  93. /** @def CC_OPTIMIZE_BLEND_FUNC_FOR_PREMULTIPLIED_ALPHA
  94. If most of your imamges have pre-multiplied alpha, set it to 1 (if you are going to use .PNG/.JPG file images).
  95. Only set to 0 if ALL your images by-pass Apple UIImage loading system (eg: if you use libpng or PVR images)
  96. To enable set it to a value different than 0. Enabled by default.
  97. @since v0.99.5
  98. */
  99. #define CC_OPTIMIZE_BLEND_FUNC_FOR_PREMULTIPLIED_ALPHA 1
  100. /** @def CC_TEXTURE_ATLAS_USE_TRIANGLE_STRIP
  101. Use GL_TRIANGLE_STRIP instead of GL_TRIANGLES when rendering the texture atlas.
  102. It seems it is the recommend way, but it is much slower, so, enable it at your own risk
  103. To enable set it to a value different than 0. Disabled by default.
  104. */
  105. #define CC_TEXTURE_ATLAS_USE_TRIANGLE_STRIP 0
  106. /** @def CC_TEXTURE_NPOT_SUPPORT
  107. If enabled, NPOT textures will be used where available. Only 3rd gen (and newer) devices support NPOT textures.
  108. NPOT textures have the following limitations:
  109. - They can't have mipmaps
  110. - They only accept GL_CLAMP_TO_EDGE in GL_TEXTURE_WRAP_{S,T}
  111. To enable set it to a value different than 0. Disabled by default.
  112. @since v0.99.2
  113. */
  114. #define CC_TEXTURE_NPOT_SUPPORT 0
  115. /** @def CC_SPRITE_DEBUG_DRAW
  116. If enabled, all subclasses of CCSprite will draw a bounding box
  117. Useful for debugging purposes only. It is recommened to leave it disabled.
  118. To enable set it to a value different than 0. Disabled by default.
  119. */
  120. #define CC_SPRITE_DEBUG_DRAW 0
  121. /** @def CC_SPRITEBATCHNODE_DEBUG_DRAW
  122. If enabled, all subclasses of CCSprite that are rendered using an CCSpriteSheet draw a bounding box.
  123. Useful for debugging purposes only. It is recommened to leave it disabled.
  124. To enable set it to a value different than 0. Disabled by default.
  125. */
  126. #define CC_SPRITEBATCHNODE_DEBUG_DRAW 0
  127. /** @def CC_BITMAPFONTATLAS_DEBUG_DRAW
  128. If enabled, all subclasses of BitmapFontAtlas will draw a bounding box
  129. Useful for debugging purposes only. It is recommened to leave it disabled.
  130. To enable set it to a value different than 0. Disabled by default.
  131. */
  132. #define CC_BITMAPFONTATLAS_DEBUG_DRAW 0
  133. /** @def CC_LABELATLAS_DEBUG_DRAW
  134. If enabled, all subclasses of LabeltAtlas will draw a bounding box
  135. Useful for debugging purposes only. It is recommened to leave it disabled.
  136. To enable set it to a value different than 0. Disabled by default.
  137. */
  138. #define CC_LABELATLAS_DEBUG_DRAW 0
  139. /** @def CC_ENABLE_PROFILERS
  140. If enabled, will activate various profilers withing cocos2d. This statistical data will be output to the console
  141. once per second showing average time (in milliseconds) required to execute the specific routine(s).
  142. Useful for debugging purposes only. It is recommened to leave it disabled.
  143. To enable set it to a value different than 0. Disabled by default.
  144. */
  145. #define CC_ENABLE_PROFILERS 0
  146. /** @def CC_COMPATIBILITY_WITH_0_8
  147. Enable it if you want to support v0.8 compatbility.
  148. Basically, classes without namespaces will work.
  149. It is recommended to disable compatibility once you have migrated your game to v0.9 to avoid class name polution
  150. To enable set it to a value different than 0. Disabled by default.
  151. */
  152. #define CC_COMPATIBILITY_WITH_0_8 0