joybox 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (393) hide show
  1. checksums.yaml +8 -8
  2. data/Gemfile.lock +1 -1
  3. data/LICENSE +1 -1
  4. data/LICENSE_Box2D +20 -0
  5. data/LICENSE_Cocos2D +24 -0
  6. data/README.md +34 -66
  7. data/Rakefile +2 -3
  8. data/bin/joybox +49 -0
  9. data/command/joybox/USAGE +24 -0
  10. data/command/joybox/templates/layer.erb +11 -0
  11. data/command/joybox/templates/layer_spec.erb +3 -0
  12. data/command/joybox/templates/scene.erb +11 -0
  13. data/command/joybox/templates/scene_spec.erb +3 -0
  14. data/command/joybox/templates/sprite.erb +11 -0
  15. data/command/joybox/templates/sprite_spec.erb +3 -0
  16. data/command/joybox_generate_command.rb +114 -0
  17. data/joybox.gemspec +44 -0
  18. data/lib/joybox/joybox-ios.rb +47 -0
  19. data/lib/joybox/joybox-osx.rb +47 -0
  20. data/lib/joybox/version.rb +1 -1
  21. data/lib/joybox.rb +18 -36
  22. data/{lib/joybox/cocos2d → motion/joybox}/actions/actions.rb +0 -0
  23. data/motion/joybox/actions/animate.rb +22 -0
  24. data/motion/joybox/actions/bezier.rb +33 -0
  25. data/motion/joybox/actions/blink.rb +24 -0
  26. data/motion/joybox/actions/ease.rb +149 -0
  27. data/motion/joybox/actions/fade.rb +38 -0
  28. data/motion/joybox/actions/jump.rb +39 -0
  29. data/{lib/joybox/cocos2d → motion/joybox}/actions/move.rb +4 -2
  30. data/motion/joybox/actions/place.rb +22 -0
  31. data/{lib/joybox/cocos2d → motion/joybox}/actions/repeat.rb +10 -1
  32. data/{lib/joybox/cocos2d → motion/joybox}/actions/rotate.rb +4 -2
  33. data/{lib/joybox/cocos2d → motion/joybox}/actions/scale.rb +4 -2
  34. data/{lib/joybox/cocos2d → motion/joybox}/actions/sequence.rb +3 -3
  35. data/{lib/joybox/cocos2d → motion/joybox}/actions/skew.rb +0 -0
  36. data/motion/joybox/actions/spawn.rb +22 -0
  37. data/motion/joybox/actions/tint.rb +37 -0
  38. data/motion/joybox/animations/animation.rb +60 -0
  39. data/{lib/joybox/cocos2d → motion/joybox}/common/color.rb +12 -1
  40. data/{lib/joybox/cocos2d → motion/joybox}/common/gc_size.rb +4 -4
  41. data/{lib/joybox/cocos2d → motion/joybox}/common/ns_set.rb +0 -0
  42. data/{lib/joybox/cocos2d → motion/joybox}/common/numeric.rb +0 -0
  43. data/{lib/joybox/cocos2d → motion/joybox}/common/screen.rb +4 -4
  44. data/motion/joybox/core/layer.rb +51 -0
  45. data/{lib/joybox/cocos2d → motion/joybox}/core/node.rb +0 -0
  46. data/{lib/joybox/cocos2d → motion/joybox}/core/scene.rb +0 -0
  47. data/{lib/joybox/cocos2d → motion/joybox}/core/sprite.rb +22 -3
  48. data/{lib/joybox/cocos2d → motion/joybox}/core/sprite_batch.rb +0 -0
  49. data/motion/joybox/core/sprite_frame_cache.rb +147 -0
  50. data/{lib/joybox/cocos2d/cocos2d.rb → motion/joybox/joybox.rb} +3 -1
  51. data/{lib/joybox/cocos2d → motion/joybox}/macros.rb +0 -0
  52. data/{lib/joybox/box2d → motion/joybox/physics}/body.rb +44 -17
  53. data/{lib/joybox/cocos2d/core → motion/joybox/physics}/physics_sprite.rb +1 -1
  54. data/motion/joybox/physics/world.rb +79 -0
  55. data/{lib/joybox/cocos2d → motion/joybox}/ui/label.rb +3 -2
  56. data/{lib/joybox/cocos2d → motion/joybox}/ui/menu.rb +0 -0
  57. data/{lib/joybox/cocos2d → motion/joybox}/ui/menu_image.rb +0 -0
  58. data/{lib/joybox/cocos2d → motion/joybox}/ui/menu_label.rb +0 -0
  59. data/{lib/joybox/cocos2d → motion/joybox}/ui/ui.rb +0 -0
  60. data/{lib/joybox/cocos2d → motion/joybox-ios}/common/cg_point.rb +9 -2
  61. data/{lib/joybox/cocos2d → motion/joybox-ios}/common/ui_touch.rb +1 -1
  62. data/{lib/joybox/cocos2d → motion/joybox-ios}/configuration/configuration.rb +0 -0
  63. data/{lib/joybox/cocos2d → motion/joybox-ios}/configuration/file_utils.rb +0 -3
  64. data/{lib/joybox/cocos2d → motion/joybox-ios}/configuration/gl_view.rb +0 -0
  65. data/{lib/joybox/cocos2d → motion/joybox-ios}/configuration/texture_2d.rb +0 -0
  66. data/{lib/joybox/cocos2d → motion/joybox-ios}/core/layer.rb +1 -45
  67. data/{lib/joybox/cocos2d → motion/joybox-ios}/director.rb +6 -6
  68. data/motion/joybox-osx/common/ats_point.rb +48 -0
  69. data/motion/joybox-osx/common/ns_event.rb +8 -0
  70. data/motion/joybox-osx/configuration/configuration.rb +46 -0
  71. data/motion/joybox-osx/configuration/gl_view.rb +57 -0
  72. data/motion/joybox-osx/core/layer.rb +135 -0
  73. data/motion/joybox-osx/director.rb +42 -0
  74. data/template/joybox-ios/files/Rakefile.erb +9 -0
  75. data/{app → template/joybox-ios/files/app}/app_delegate.rb +1 -5
  76. data/{resources → template/joybox-ios/files/resources}/fps_images-hd.png +0 -0
  77. data/{resources → template/joybox-ios/files/resources}/fps_images-ipadhd.png +0 -0
  78. data/{resources → template/joybox-ios/files/resources}/fps_images.png +0 -0
  79. data/template/joybox-ios/files/spec/main_spec.rb.erb +9 -0
  80. data/template/joybox-osx/files/Rakefile.erb +9 -0
  81. data/template/joybox-osx/files/app/app_delegate.rb +23 -0
  82. data/template/joybox-osx/files/app/layers/default_layer.rb +5 -0
  83. data/template/joybox-osx/files/app/menu.rb +51 -0
  84. data/template/joybox-osx/files/resources/Credits.rtf +29 -0
  85. data/template/joybox-osx/files/resources/fps_images-hd.png +0 -0
  86. data/template/joybox-osx/files/resources/fps_images-ipadhd.png +0 -0
  87. data/template/joybox-osx/files/resources/fps_images.png +0 -0
  88. data/template/joybox-osx/files/spec/main_spec.rb.erb +9 -0
  89. data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Box2D +0 -0
  90. data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Box2D.framework.bridgesupport +47 -37
  91. data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Versions/A/Box2D +0 -0
  92. data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Versions/A/Headers/Collision/B2DContactListener.h +0 -0
  93. data/vendor/vendor-ios/Box2D.framework/Versions/A/Headers/Collision/Shapes/B2DCircleShape.h +16 -0
  94. data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Versions/A/Headers/Collision/Shapes/B2DEdgeShape.h +0 -0
  95. data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Versions/A/Headers/Collision/Shapes/B2DPolygonShape.h +0 -0
  96. data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Versions/A/Headers/Collision/Shapes/B2DShape.h +0 -0
  97. data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Versions/A/Headers/Dynamics/B2DBody.h +6 -6
  98. data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Versions/A/Headers/Dynamics/B2DWorld.h +0 -0
  99. data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Versions/A/Resources/Box2DConfig.cmake +0 -0
  100. data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Versions/A/Resources/CMakeLists.txt +0 -0
  101. data/vendor/vendor-ios/Box2D.framework/Versions/A/Resources/LICENSE +22 -0
  102. data/vendor/vendor-ios/cocos_2d/cocos_2d.bridgesupport +9154 -0
  103. data/vendor/vendor-ios/cocos_2d/cocos_2d_exceptions.bridgesupport +39 -0
  104. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCAction.h +23 -23
  105. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionCamera.h +21 -19
  106. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionCatmullRom.h +18 -6
  107. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionEase.h +117 -31
  108. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionGrid.h +19 -17
  109. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionGrid3D.h +45 -42
  110. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionInstant.h +21 -13
  111. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionInterval.h +123 -81
  112. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionManager.h +2 -2
  113. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionPageTurn3D.h +2 -1
  114. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionProgressTimer.h +4 -4
  115. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionTiledGrid.h +46 -38
  116. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionTween.h +3 -3
  117. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCAnimation.h +8 -8
  118. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCAnimationCache.h +2 -2
  119. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCAtlasNode.h +19 -17
  120. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCCamera.h +12 -12
  121. data/vendor/vendor-ios/cocos_2d/include/CCClippingNode.h +77 -0
  122. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCConfiguration.h +31 -13
  123. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCDirector.h +51 -42
  124. data/vendor/vendor-ios/cocos_2d/include/CCDrawNode.h +65 -0
  125. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCDrawingPrimitives.h +42 -8
  126. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCGLProgram.h +56 -21
  127. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCGrabber.h +2 -2
  128. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCGrid.h +29 -29
  129. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCLabelAtlas.h +5 -2
  130. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCLabelBMFont.h +56 -32
  131. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCLabelTTF.h +20 -20
  132. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCLayer.h +107 -79
  133. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCMenu.h +10 -14
  134. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCMenuItem.h +37 -32
  135. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCMotionStreak.h +18 -19
  136. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCNode+Debug.h +0 -0
  137. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCNode.h +87 -37
  138. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCParallaxNode.h +2 -2
  139. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCParticleBatchNode.h +2 -2
  140. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCParticleExamples.h +22 -0
  141. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCParticleSystem.h +51 -40
  142. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCParticleSystemQuad.h +4 -4
  143. data/vendor/vendor-ios/cocos_2d/include/CCPhysicsDebugNode.h +58 -0
  144. data/vendor/vendor-ios/cocos_2d/include/CCPhysicsSprite.h +82 -0
  145. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCProgressTimer.h +9 -11
  146. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCProtocols.h +54 -26
  147. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCRenderTexture.h +29 -9
  148. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCScene.h +4 -0
  149. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCScheduler.h +94 -40
  150. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCShaderCache.h +1 -1
  151. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCSprite.h +21 -28
  152. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCSpriteBatchNode.h +16 -9
  153. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCSpriteFrame.h +10 -10
  154. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCSpriteFrameCache.h +6 -6
  155. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTMXLayer.h +16 -16
  156. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTMXObjectGroup.h +4 -4
  157. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTMXTiledMap.h +9 -9
  158. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTMXXMLParser.h +44 -33
  159. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTexture2D.h +17 -25
  160. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTextureAtlas.h +10 -10
  161. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTextureCache.h +4 -4
  162. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTexturePVR.h +25 -8
  163. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTileMapAtlas.h +6 -6
  164. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTransition.h +57 -12
  165. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTransitionPageTurn.h +2 -2
  166. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTransitionProgress.h +27 -5
  167. data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms}/CCGL.h +4 -2
  168. data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms}/CCNS.h +0 -0
  169. data/vendor/vendor-ios/cocos_2d/include/Platforms/Mac/CCDirectorMac.h +110 -0
  170. data/vendor/vendor-ios/cocos_2d/include/Platforms/Mac/CCEventDispatcher.h +343 -0
  171. data/vendor/vendor-ios/cocos_2d/include/Platforms/Mac/CCGLView.h +103 -0
  172. data/vendor/vendor-ios/cocos_2d/include/Platforms/Mac/CCWindow.h +41 -0
  173. data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms/iOS}/CCDirectorIOS.h +12 -5
  174. data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms/iOS}/CCES2Renderer.h +12 -12
  175. data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms/iOS}/CCESRenderer.h +0 -0
  176. data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms/iOS}/CCGLView.h +28 -13
  177. data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms/iOS}/CCTouchDelegateProtocol.h +4 -4
  178. data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms/iOS}/CCTouchDispatcher.h +2 -2
  179. data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms/iOS}/CCTouchHandler.h +7 -7
  180. data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/CCArray.h +1 -1
  181. data/vendor/vendor-ios/cocos_2d/include/Support/CCFileUtils.h +394 -0
  182. data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/CCProfiling.h +0 -0
  183. data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/CCVertex.h +1 -1
  184. data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/CGPointExtension.h +4 -2
  185. data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/NSThread+performBlock.h +0 -0
  186. data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/OpenGL_Internal.h +0 -0
  187. data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/TGAlib.h +0 -0
  188. data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/TransformUtils.h +0 -0
  189. data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/ZipUtils.h +4 -4
  190. data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/base64.h +0 -0
  191. data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/ccCArray.h +15 -15
  192. data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/ccUtils.h +0 -0
  193. data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/uthash.h +129 -184
  194. data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/utlist.h +298 -55
  195. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/ccConfig.h +56 -9
  196. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/ccDeprecated.h +131 -0
  197. data/vendor/vendor-ios/cocos_2d/include/ccFPSImages.h +39 -0
  198. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/ccGLStateCache.h +44 -26
  199. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/ccMacros.h +9 -9
  200. data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionColorLengthTexture_frag.h +41 -0
  201. data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionColorLengthTexture_vert.h +47 -0
  202. data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionColor_frag.h +37 -0
  203. data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionColor_vert.h +40 -0
  204. data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionTextureA8Color_frag.h +41 -0
  205. data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionTextureA8Color_vert.h +45 -0
  206. data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionTextureColorAlphaTest_frag.h +47 -0
  207. data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionTextureColor_frag.h +39 -0
  208. data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionTextureColor_vert.h +45 -0
  209. data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionTexture_frag.h +38 -0
  210. data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionTexture_uColor_frag.h +41 -0
  211. data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionTexture_uColor_vert.h +41 -0
  212. data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionTexture_vert.h +41 -0
  213. data/vendor/vendor-ios/cocos_2d/include/ccShader_Position_uColor_frag.h +37 -0
  214. data/vendor/vendor-ios/cocos_2d/include/ccShader_Position_uColor_vert.h +43 -0
  215. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/ccShaders.h +11 -0
  216. data/vendor/vendor-ios/cocos_2d/include/ccTypes.h +392 -0
  217. data/vendor/vendor-ios/cocos_2d/include/cocos2d-ios-exceptions.bridgesupport +39 -0
  218. data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/cocos2d.h +28 -3
  219. data/vendor/vendor-ios/cocos_2d/include/gen_cocos2d_bridgesupport.sh +17 -0
  220. data/vendor/vendor-ios/cocos_2d/include/gen_cocos2d_complement.sh +17 -0
  221. data/vendor/vendor-ios/cocos_2d/libcocos2d.a +0 -0
  222. data/vendor/vendor-osx/box_2d/box_2d.bridgesupport +176 -0
  223. data/vendor/vendor-osx/box_2d/include/B2DBody.h +46 -0
  224. data/vendor/vendor-osx/box_2d/include/B2DCircleShape.h +16 -0
  225. data/vendor/vendor-osx/box_2d/include/B2DContactListener.h +30 -0
  226. data/vendor/vendor-osx/box_2d/include/B2DEdgeShape.h +17 -0
  227. data/vendor/vendor-osx/box_2d/include/B2DPolygonShape.h +16 -0
  228. data/vendor/vendor-osx/box_2d/include/B2DShape.h +18 -0
  229. data/vendor/vendor-osx/box_2d/include/B2DWorld.h +44 -0
  230. data/vendor/vendor-osx/box_2d/libBox2D.a +0 -0
  231. data/vendor/vendor-osx/cocos_2d/cocos_2d.bridgesupport +8292 -0
  232. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCAction.h +195 -0
  233. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionCamera.h +75 -0
  234. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionCatmullRom.h +151 -0
  235. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionEase.h +245 -0
  236. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionGrid.h +167 -0
  237. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionGrid3D.h +208 -0
  238. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionInstant.h +235 -0
  239. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionInterval.h +473 -0
  240. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionManager.h +113 -0
  241. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionPageTurn3D.h +43 -0
  242. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionProgressTimer.h +59 -0
  243. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionTiledGrid.h +219 -0
  244. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionTween.h +62 -0
  245. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCAnimation.h +150 -0
  246. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCAnimationCache.h +74 -0
  247. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCAtlasNode.h +98 -0
  248. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCCamera.h +98 -0
  249. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCClippingNode.h +77 -0
  250. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCConfiguration.h +144 -0
  251. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCDirector.h +353 -0
  252. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCDrawNode.h +65 -0
  253. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCDrawingPrimitives.h +173 -0
  254. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCGLProgram.h +185 -0
  255. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCGrabber.h +44 -0
  256. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCGrid.h +130 -0
  257. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCLabelAtlas.h +71 -0
  258. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCLabelBMFont.h +240 -0
  259. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCLabelTTF.h +132 -0
  260. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCLayer.h +308 -0
  261. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCMenu.h +96 -0
  262. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCMenuItem.h +428 -0
  263. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCMotionStreak.h +86 -0
  264. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCNode+Debug.h +39 -0
  265. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCNode.h +619 -0
  266. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCParallaxNode.h +50 -0
  267. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCParticleBatchNode.h +99 -0
  268. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCParticleExamples.h +117 -0
  269. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCParticleSystem.h +464 -0
  270. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCParticleSystemQuad.h +73 -0
  271. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCPhysicsDebugNode.h +58 -0
  272. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCPhysicsSprite.h +82 -0
  273. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCProgressTimer.h +92 -0
  274. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCProtocols.h +160 -0
  275. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCRenderTexture.h +159 -0
  276. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCScene.h +47 -0
  277. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCScheduler.h +284 -0
  278. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCShaderCache.h +60 -0
  279. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCSprite.h +281 -0
  280. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCSpriteBatchNode.h +145 -0
  281. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCSpriteFrame.h +126 -0
  282. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCSpriteFrameCache.h +121 -0
  283. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTMXLayer.h +164 -0
  284. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTMXObjectGroup.h +67 -0
  285. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTMXTiledMap.h +145 -0
  286. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTMXXMLParser.h +228 -0
  287. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTexture2D.h +349 -0
  288. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTextureAtlas.h +188 -0
  289. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTextureCache.h +146 -0
  290. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTexturePVR.h +146 -0
  291. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTileMapAtlas.h +83 -0
  292. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTransition.h +341 -0
  293. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTransitionPageTurn.h +60 -0
  294. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTransitionProgress.h +84 -0
  295. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Platforms/CCGL.h +74 -0
  296. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Platforms/CCNS.h +54 -0
  297. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Platforms/Mac/CCDirectorMac.h +110 -0
  298. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Platforms/Mac/CCEventDispatcher.h +343 -0
  299. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Platforms/Mac/CCGLView.h +103 -0
  300. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Platforms/Mac/CCWindow.h +41 -0
  301. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/CCArray.h +119 -0
  302. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/CCFileUtils.h +394 -0
  303. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/CCProfiling.h +89 -0
  304. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/CCVertex.h +36 -0
  305. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/CGPointExtension.h +346 -0
  306. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/NSThread+performBlock.h +22 -0
  307. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/OpenGL_Internal.h +86 -0
  308. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/TGAlib.h +55 -0
  309. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/TransformUtils.h +36 -0
  310. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/ZipUtils.h +91 -0
  311. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/base64.h +33 -0
  312. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/ccCArray.h +229 -0
  313. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/ccUtils.h +36 -0
  314. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/uthash.h +917 -0
  315. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/utlist.h +733 -0
  316. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccConfig.h +292 -0
  317. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccDeprecated.h +431 -0
  318. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccFPSImages.h +39 -0
  319. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccGLStateCache.h +156 -0
  320. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccMacros.h +353 -0
  321. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionColorLengthTexture_frag.h +41 -0
  322. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionColorLengthTexture_vert.h +47 -0
  323. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionColor_frag.h +37 -0
  324. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionColor_vert.h +40 -0
  325. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionTextureA8Color_frag.h +41 -0
  326. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionTextureA8Color_vert.h +45 -0
  327. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionTextureColorAlphaTest_frag.h +47 -0
  328. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionTextureColor_frag.h +39 -0
  329. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionTextureColor_vert.h +45 -0
  330. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionTexture_frag.h +38 -0
  331. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionTexture_uColor_frag.h +41 -0
  332. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionTexture_uColor_vert.h +41 -0
  333. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionTexture_vert.h +41 -0
  334. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_Position_uColor_frag.h +37 -0
  335. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_Position_uColor_vert.h +43 -0
  336. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShaders.h +56 -0
  337. data/vendor/{Cocos2D/include → vendor-osx/cocos_2d/cocos_2d_include}/ccTypes.h +39 -35
  338. data/vendor/vendor-osx/cocos_2d/cocos_2d_include/cocos2d.h +203 -0
  339. data/vendor/vendor-osx/cocos_2d/libcocos2d.a +0 -0
  340. metadata +363 -195
  341. data/app/layers/box2d_layer.rb +0 -109
  342. data/app/layers/cocos2d_layer.rb +0 -14
  343. data/app/layers/cocos_motion_layer.rb +0 -145
  344. data/app/layers/menu_layer.rb +0 -59
  345. data/lib/joybox/box2d/world.rb +0 -79
  346. data/resources/box2d/blocks_sprite_sheet.png +0 -0
  347. data/resources/cocos_motion/dot.png +0 -0
  348. data/resources/cocos_motion/dot_selected.png +0 -0
  349. data/resources/cocos_motion/grossini.png +0 -0
  350. data/resources/cocos_motion/grossinis_sister.png +0 -0
  351. data/resources/cocos_motion/grossinis_sister_two.png +0 -0
  352. data/resources/cocos_motion/left_arrow.png +0 -0
  353. data/resources/cocos_motion/left_arrow_selected.png +0 -0
  354. data/resources/cocos_motion/right_arrow.png +0 -0
  355. data/resources/cocos_motion/right_arrow_selected.png +0 -0
  356. data/vendor/Cocos2D/Cocos2D.bridgesupport +0 -7808
  357. data/vendor/Cocos2D/include/CCFileUtils.h +0 -188
  358. data/vendor/Cocos2D/include/CocosDenshion/CDAudioManager.h +0 -243
  359. data/vendor/Cocos2D/include/CocosDenshion/CDConfig.h +0 -60
  360. data/vendor/Cocos2D/include/CocosDenshion/CDOpenALSupport.h +0 -77
  361. data/vendor/Cocos2D/include/CocosDenshion/CDXPropertyModifierAction.h +0 -45
  362. data/vendor/Cocos2D/include/CocosDenshion/CocosDenshion.h +0 -440
  363. data/vendor/Cocos2D/include/CocosDenshion/SimpleAudioEngine.h +0 -90
  364. data/vendor/Cocos2D/include/RubyMotionSchedule.h +0 -7
  365. data/vendor/Cocos2D/include/ccShader_PositionColor_frag.h +0 -12
  366. data/vendor/Cocos2D/include/ccShader_PositionColor_vert.h +0 -17
  367. data/vendor/Cocos2D/include/ccShader_PositionTextureA8Color_frag.h +0 -16
  368. data/vendor/Cocos2D/include/ccShader_PositionTextureA8Color_vert.h +0 -21
  369. data/vendor/Cocos2D/include/ccShader_PositionTextureColorAlphaTest_frag.h +0 -23
  370. data/vendor/Cocos2D/include/ccShader_PositionTextureColor_frag.h +0 -14
  371. data/vendor/Cocos2D/include/ccShader_PositionTextureColor_vert.h +0 -22
  372. data/vendor/Cocos2D/include/ccShader_PositionTexture_frag.h +0 -13
  373. data/vendor/Cocos2D/include/ccShader_PositionTexture_uColor_frag.h +0 -16
  374. data/vendor/Cocos2D/include/ccShader_PositionTexture_uColor_vert.h +0 -18
  375. data/vendor/Cocos2D/include/ccShader_PositionTexture_vert.h +0 -17
  376. data/vendor/Cocos2D/include/ccShader_Position_uColor_frag.h +0 -12
  377. data/vendor/Cocos2D/include/ccShader_Position_uColor_vert.h +0 -19
  378. data/vendor/Cocos2D/include/kazmath/GL/mat4stack.h +0 -51
  379. data/vendor/Cocos2D/include/kazmath/GL/matrix.h +0 -58
  380. data/vendor/Cocos2D/include/kazmath/aabb.h +0 -53
  381. data/vendor/Cocos2D/include/kazmath/kazmath.h +0 -39
  382. data/vendor/Cocos2D/include/kazmath/mat3.h +0 -75
  383. data/vendor/Cocos2D/include/kazmath/mat4.h +0 -93
  384. data/vendor/Cocos2D/include/kazmath/neon_matrix_impl.h +0 -41
  385. data/vendor/Cocos2D/include/kazmath/plane.h +0 -70
  386. data/vendor/Cocos2D/include/kazmath/quaternion.h +0 -113
  387. data/vendor/Cocos2D/include/kazmath/ray2.h +0 -50
  388. data/vendor/Cocos2D/include/kazmath/utility.h +0 -74
  389. data/vendor/Cocos2D/include/kazmath/vec2.h +0 -64
  390. data/vendor/Cocos2D/include/kazmath/vec3.h +0 -68
  391. data/vendor/Cocos2D/include/kazmath/vec4.h +0 -68
  392. data/vendor/Cocos2D/libCocosDenshion.a +0 -0
  393. data/vendor/Cocos2D/libcocos2d.a +0 -0
@@ -42,19 +42,17 @@ typedef enum {
42
42
  The progress can be Radial, Horizontal or vertical.
43
43
  @since v0.99.1
44
44
  */
45
- @interface CCProgressTimer : CCNode<CCRGBAProtocol> {
46
- CCProgressTimerType type_;
47
- float percentage_;
48
- CCSprite *sprite_;
45
+ @interface CCProgressTimer : CCNodeRGBA {
46
+ CCProgressTimerType _type;
47
+ float _percentage;
48
+ CCSprite *_sprite;
49
49
 
50
- int vertexDataCount_;
51
- ccV2F_C4B_T2F *vertexData_;
52
- CGPoint midpoint_;
53
- CGPoint barChangeRate_;
54
- BOOL reverseDirection_;
50
+ int _vertexDataCount;
51
+ ccV2F_C4B_T2F *_vertexData;
52
+ CGPoint _midpoint;
53
+ CGPoint _barChangeRate;
54
+ BOOL _reverseDirection;
55
55
  }
56
- @property (nonatomic) ccColor3B color;
57
- @property (nonatomic) GLubyte opacity;
58
56
  /** Change the percentage to change progress. */
59
57
  @property (nonatomic, readwrite) CCProgressTimerType type;
60
58
  @property (nonatomic, readwrite) BOOL reverseDirection;
@@ -25,33 +25,44 @@
25
25
 
26
26
  #import "ccMacros.h"
27
27
  #import "ccTypes.h"
28
- #import "CCTexture2D.h"
29
28
 
30
- #pragma mark -
31
- #pragma mark CCRGBAProtocol
29
+
30
+ @class CCTexture2D;
31
+ @class CCDirector;
32
+
33
+ #pragma mark - CCRGBAProtocol
32
34
 
33
35
  /// CC RGBA protocol
34
36
  @protocol CCRGBAProtocol <NSObject>
35
- /** sets Color
37
+ /** sets and returns the color (tint)
36
38
  @since v0.8
37
39
  */
38
- -(void) setColor:(ccColor3B)color;
39
- /** returns the color
40
- @since v0.8
41
- */
42
- -(ccColor3B) color;
40
+ @property (nonatomic) ccColor3B color;
41
+ /** returns the displayed color */
42
+ @property (nonatomic, readonly) ccColor3B displayedColor;
43
+ /** whether or not color should be propagated to its children */
44
+ @property (nonatomic, getter = isCascadeColorEnabled) BOOL cascadeColorEnabled;
45
+
46
+ /** recursive method that updates display color */
47
+ - (void)updateDisplayedColor:(ccColor3B)color;
43
48
 
44
- /// returns the opacity
45
- -(GLubyte) opacity;
46
- /** sets the opacity.
47
- @warning If the the texture has premultiplied alpha then, the R, G and B channels will be modifed.
49
+ /** sets and returns the opacity.
50
+ @warning If the the texture has premultiplied alpha then, the R, G and B channels will be modified.
48
51
  Values goes from 0 to 255, where 255 means fully opaque.
49
52
  */
50
- -(void) setOpacity: (GLubyte) opacity;
53
+ @property (nonatomic) GLubyte opacity;
54
+ /** returns the displayed opacity */
55
+ @property (nonatomic, readonly) GLubyte displayedOpacity;
56
+ /** whether or not opacity should be propagated to its children */
57
+ @property (nonatomic, getter = isCascadeOpacityEnabled) BOOL cascadeOpacityEnabled;
58
+
59
+ /** recursive method that updates the displayed opacity */
60
+ - (void)updateDisplayedOpacity:(GLubyte)opacity;
61
+
51
62
  @optional
52
63
  /** sets the premultipliedAlphaOpacity property.
53
64
  If set to NO then opacity will be applied as: glColor(R,G,B,opacity);
54
- If set to YES then oapcity will be applied as: glColor(opacity, opacity, opacity, opacity );
65
+ If set to YES then opacity will be applied as: glColor(opacity, opacity, opacity, opacity );
55
66
  Textures with premultiplied alpha will have this property by default on YES. Otherwise the default value is NO
56
67
  @since v0.8
57
68
  */
@@ -62,10 +73,9 @@
62
73
  -(BOOL) doesOpacityModifyRGB;
63
74
  @end
64
75
 
65
- #pragma mark -
66
- #pragma mark CCBlendProtocol
76
+ #pragma mark - CCBlendProtocol
67
77
  /**
68
- You can specify the blending fuction.
78
+ You can specify the blending function.
69
79
  @since v0.99.0
70
80
  */
71
81
  @protocol CCBlendProtocol <NSObject>
@@ -76,8 +86,7 @@
76
86
  @end
77
87
 
78
88
 
79
- #pragma mark -
80
- #pragma mark CCTextureProtocol
89
+ #pragma mark - CCTextureProtocol
81
90
 
82
91
  /** CCNode objects that uses a Texture2D to render the images.
83
92
  The texture can have a blending function.
@@ -85,7 +94,7 @@
85
94
  src=GL_ONE dst= GL_ONE_MINUS_SRC_ALPHA
86
95
  else
87
96
  src=GL_SRC_ALPHA dst= GL_ONE_MINUS_SRC_ALPHA
88
- But you can change the blending funtion at any time.
97
+ But you can change the blending function at any time.
89
98
  @since v0.8.0
90
99
  */
91
100
  @protocol CCTextureProtocol <CCBlendProtocol>
@@ -95,8 +104,7 @@
95
104
  -(void) setTexture:(CCTexture2D*)texture;
96
105
  @end
97
106
 
98
- #pragma mark -
99
- #pragma mark CCLabelProtocol
107
+ #pragma mark - CCLabelProtocol
100
108
  /** Common interface for Labels */
101
109
  @protocol CCLabelProtocol <NSObject>
102
110
  /** sets a new label using an NSString.
@@ -114,19 +122,39 @@
114
122
  @end
115
123
 
116
124
 
117
- #pragma mark -
118
- #pragma mark CCDirectorDelegate
125
+ #pragma mark - CCDirectorDelegate
119
126
  /** CCDirector delegate */
120
127
  @protocol CCDirectorDelegate <NSObject>
121
128
 
122
129
  @optional
123
- /** Called by CCDirector when the porjection is updated, and "custom" projection is used */
130
+ /** Called by CCDirector when the projection is updated, and "custom" projection is used */
124
131
  -(void) updateProjection;
125
132
 
126
133
  #ifdef __CC_PLATFORM_IOS
127
134
  /** Returns a Boolean value indicating whether the CCDirector supports the specified orientation. Default value is YES (supports all possible orientations) */
128
135
  - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation;
129
136
 
137
+ // Commented. See issue #1453 for further info: http://code.google.com/p/cocos2d-iphone/issues/detail?id=1453
138
+ //- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration;
139
+
140
+ /** Called when projection is resized (due to layoutSubviews on the view). This is important to respond to in order to setup your scene with the proper dimensions (which only exist after the first call to layoutSubviews) so that you can set your scene as early as possible to avoid startup flicker
141
+ */
142
+ -(void) directorDidReshapeProjection:(CCDirector*)director;
143
+
130
144
  #endif // __CC_PLATFORM_IOS
131
145
 
132
146
  @end
147
+
148
+
149
+ #pragma mark - CCAccelerometerDelegate
150
+
151
+ #ifdef __CC_PLATFORM_IOS
152
+ /** CCAccelerometerDelegate delegate */
153
+ @class UIAcceleration;
154
+ @class UIAccelerometer;
155
+ @protocol CCAccelerometerDelegate <NSObject>
156
+
157
+ @optional
158
+ - (void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration;
159
+ @end
160
+ #endif // __CC_PLATFORM_IOS
@@ -45,7 +45,7 @@ typedef enum
45
45
  /**
46
46
  CCRenderTexture is a generic rendering target. To render things into it,
47
47
  simply construct a render target, call begin on it, call visit on any cocos2d
48
- scenes or objects to render them, and call end. For convienience, render texture
48
+ scenes or objects to render them, and call end. For convenience, render texture
49
49
  adds a sprite as its display child with the results, so you can simply add
50
50
  the render texture to your scene and treat it like any other CCNode.
51
51
  There are also functions for saving the render texture to disk in PNG or JPG format.
@@ -54,13 +54,19 @@ typedef enum
54
54
  */
55
55
  @interface CCRenderTexture : CCNode
56
56
  {
57
- GLuint fbo_;
58
- GLuint depthRenderBufffer_;
59
- GLint oldFBO_;
60
- CCTexture2D* texture_;
61
- CCSprite* sprite_;
62
-
63
- GLenum pixelFormat_;
57
+ GLuint _FBO;
58
+ GLuint _depthRenderBufffer;
59
+ GLint _oldFBO;
60
+ CCTexture2D* _texture;
61
+ CCSprite* _sprite;
62
+ GLenum _pixelFormat;
63
+
64
+ // code for "auto" update
65
+ GLbitfield _clearFlags;
66
+ ccColor4F _clearColor;
67
+ GLclampf _clearDepth;
68
+ GLint _clearStencil;
69
+ BOOL _autoDraw;
64
70
  }
65
71
 
66
72
  /** The CCSprite being used.
@@ -68,7 +74,21 @@ typedef enum
68
74
  The blending function can be changed in runtime by calling:
69
75
  - [[renderTexture sprite] setBlendFunc:(ccBlendFunc){GL_ONE, GL_ONE_MINUS_SRC_ALPHA}];
70
76
  */
71
- @property (nonatomic,readwrite, assign) CCSprite* sprite;
77
+ @property (nonatomic,readwrite, retain) CCSprite* sprite;
78
+
79
+ /** Valid flags: GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, GL_STENCIL_BUFFER_BIT. They can be OR'ed. Valid when "autoDraw is YES. */
80
+ @property (nonatomic, readwrite) GLbitfield clearFlags;
81
+ /** Clear color value. Valid only when "autoDraw" is YES. */
82
+ @property (nonatomic, readwrite) ccColor4F clearColor;
83
+ /** Value for clearDepth. Valid only when autoDraw is YES. */
84
+ @property (nonatomic, readwrite) GLclampf clearDepth;
85
+ /** Value for clear Stencil. Valid only when autoDraw is YES */
86
+ @property (nonatomic, readwrite) GLint clearStencil;
87
+ /** When enabled, it will render its children into the texture automatically. Disabled by default for compatiblity reasons.
88
+ Will be enabled in the future.
89
+ */
90
+ @property (nonatomic, readwrite) BOOL autoDraw;
91
+
72
92
 
73
93
  /** initializes a RenderTexture object with width and height in Points and a pixel format( only RGB and RGBA formats are valid ) and depthStencil format*/
74
94
  +(id)renderTextureWithWidth:(int)w height:(int)h pixelFormat:(CCTexture2DPixelFormat) format depthStencilFormat:(GLuint)depthStencilFormat;
@@ -40,4 +40,8 @@
40
40
  @interface CCScene : CCNode
41
41
  {
42
42
  }
43
+ /** initializes a node.
44
+ The node will be created as "autorelease".
45
+ */
46
+ -(id) init;
43
47
  @end
@@ -42,44 +42,66 @@ typedef void (*TICK_IMP)(id, SEL, ccTime);
42
42
  /** Light weight timer */
43
43
  @interface CCTimer : NSObject
44
44
  {
45
- id target;
46
- TICK_IMP impMethod;
47
-
48
- ccTime elapsed;
49
- BOOL runForever;
50
- BOOL useDelay;
51
- uint nTimesExecuted;
52
- uint repeat; //0 = once, 1 is 2 x executed
53
- ccTime delay;
54
-
55
- @public // optimization
56
- ccTime interval;
57
- SEL selector;
45
+ ccTime _interval;
46
+ ccTime _elapsed;
47
+ BOOL _runForever;
48
+ BOOL _useDelay;
49
+ uint _nTimesExecuted;
50
+ uint _repeat; //0 = once, 1 is 2 x executed
51
+ ccTime _delay;
58
52
  }
53
+
59
54
  /** interval in seconds */
60
55
  @property (nonatomic,readwrite,assign) ccTime interval;
61
56
 
62
- /** Allocates a timer with a target and a selector.
63
- */
57
+
58
+ /** triggers the timer */
59
+ -(void) update: (ccTime) dt;
60
+ @end
61
+
62
+ @interface CCTimerTargetSelector : CCTimer
63
+ {
64
+ id _target;
65
+ SEL _selector;
66
+ TICK_IMP _impMethod;
67
+ }
68
+
69
+ /** selector */
70
+ @property (nonatomic,readonly) SEL selector;
71
+
72
+ /** Allocates a timer with a target and a selector. */
64
73
  +(id) timerWithTarget:(id) t selector:(SEL)s;
65
74
 
66
- /** Allocates a timer with a target, a selector and an interval in seconds.
67
- */
75
+ /** Allocates a timer with a target, a selector and an interval in seconds. */
68
76
  +(id) timerWithTarget:(id) t selector:(SEL)s interval:(ccTime)seconds;
69
77
 
70
- /** Initializes a timer with a target and a selector.
71
- */
72
- -(id) initWithTarget:(id) t selector:(SEL)s;
78
+ /** Initializes a timer with a target and a selector. */
79
+ -(id) initWithTarget:(id) t selector:(SEL)s;
73
80
 
74
- /** Initializes a timer with a target, a selector, an interval in seconds, repeat in number of times to repeat, delay in seconds
75
- */
81
+ /** Initializes a timer with a target, a selector, an interval in seconds, repeat in number of times to repeat, delay in seconds */
76
82
  -(id) initWithTarget:(id)t selector:(SEL)s interval:(ccTime) seconds repeat:(uint) r delay:(ccTime) d;
83
+ @end
77
84
 
78
85
 
79
- /** triggers the timer */
80
- -(void) update: (ccTime) dt;
81
- @end
86
+ @interface CCTimerBlock : CCTimer
87
+ {
88
+ void (^_block)(ccTime delta);
89
+ NSString *_key;
90
+ id _target;
91
+ }
92
+
93
+ /** unique identifier of the block */
94
+ @property (nonatomic, readonly) NSString *key;
82
95
 
96
+ /** owner of the timer */
97
+ @property (nonatomic, readonly, assign) id target;
98
+
99
+ /** Allocates a timer with a target, interval in seconds, a key and a block */
100
+ +(id) timerWithTarget:(id)owner interval:(ccTime)seconds key:(NSString*)key block:(void(^)(ccTime delta)) block;
101
+
102
+ /** Initializes a timer with a target(owner), interval in seconds, repeat in number of times to repeat, delay in seconds and a block */
103
+ -(id) initWithTarget:(id)owner interval:(ccTime) seconds repeat:(uint) r delay:(ccTime)d key:(NSString*)key block:(void(^)(ccTime delta))block;
104
+ @end
83
105
 
84
106
 
85
107
  //
@@ -103,7 +125,7 @@ struct _hashUpdateEntry;
103
125
 
104
126
  @interface CCScheduler : NSObject
105
127
  {
106
- ccTime timeScale_;
128
+ ccTime _timeScale;
107
129
 
108
130
  //
109
131
  // "updates with priority" stuff
@@ -114,7 +136,7 @@ struct _hashUpdateEntry;
114
136
  struct _hashUpdateEntry *hashForUpdates; // hash used to fetch quickly the list entries for pause,delete,etc.
115
137
 
116
138
  // Used for "selectors with interval"
117
- struct _hashSelectorEntry *hashForSelectors;
139
+ struct _hashSelectorEntry *hashForTimers;
118
140
  struct _hashSelectorEntry *currentTarget;
119
141
  BOOL currentTargetSalvaged;
120
142
 
@@ -123,17 +145,31 @@ struct _hashUpdateEntry;
123
145
  SEL updateSelector;
124
146
 
125
147
  BOOL updateHashLocked; // If true unschedule will not remove anything from a hash. Elements will only be marked for deletion.
148
+
149
+ BOOL _paused;
126
150
  }
127
151
 
128
152
  /** Modifies the time of all scheduled callbacks.
129
- You can use this property to create a 'slow motion' or 'fast fordward' effect.
153
+ You can use this property to create a 'slow motion' or 'fast forward' effect.
130
154
  Default is 1.0. To create a 'slow motion' effect, use values below 1.0.
131
- To create a 'fast fordward' effect, use values higher than 1.0.
155
+ To create a 'fast forward' effect, use values higher than 1.0.
132
156
  @since v0.8
133
157
  @warning It will affect EVERY scheduled selector / action.
134
158
  */
135
159
  @property (nonatomic,readwrite) ccTime timeScale;
136
160
 
161
+
162
+ /** Will pause / resume the CCScheduler.
163
+ It won't dispatch any message to any target/selector, block if it is paused.
164
+
165
+ The difference between `pauseAllTargets` and `pause, is that `setPaused` will pause the CCScheduler,
166
+ while `pauseAllTargets` will pause all the targets, one by one.
167
+ `setPaused` will pause the whole Scheduler, meaning that calls to `resumeTargets:`, `resumeTarget:` won't affect it.
168
+
169
+ @since v2.1.0
170
+ */
171
+ @property (nonatomic,readonly,getter=isPaused) BOOL paused;
172
+
137
173
  /** 'update' the scheduler.
138
174
  You should NEVER call this method, unless you know what you are doing.
139
175
  */
@@ -141,14 +177,14 @@ struct _hashUpdateEntry;
141
177
 
142
178
  /** The scheduled method will be called every 'interval' seconds.
143
179
  If paused is YES, then it won't be called until it is resumed.
144
- If 'interval' is 0, it will be called every frame, but if so, it recommened to use 'scheduleUpdateForTarget:' instead.
180
+ If 'interval' is 0, it will be called every frame, but if so, it recommended to use 'scheduleUpdateForTarget:' instead.
145
181
  If the selector is already scheduled, then only the interval parameter will be updated without re-scheduling it again.
146
- repeat let the action be repeated repeat + 1 times, use kCCRepeatForever to let the action run continiously
182
+ repeat lets the action be repeated repeat + 1 times, use kCCRepeatForever to let the action run continuously
147
183
  delay is the amount of time the action will wait before it'll start
148
184
 
149
185
  @since v0.99.3, repeat and delay added in v1.1
150
186
  */
151
- -(void) scheduleSelector:(SEL)selector forTarget:(id)target interval:(ccTime)interval paused:(BOOL)paused repeat: (uint) repeat delay: (ccTime) delay;
187
+ -(void) scheduleSelector:(SEL)selector forTarget:(id)target interval:(ccTime)interval repeat:(uint)repeat delay:(ccTime)delay paused:(BOOL)paused;
152
188
 
153
189
  /** calls scheduleSelector with kCCRepeatForever and a 0 delay */
154
190
  -(void) scheduleSelector:(SEL)selector forTarget:(id)target interval:(ccTime)interval paused:(BOOL)paused;
@@ -160,35 +196,53 @@ struct _hashUpdateEntry;
160
196
  */
161
197
  -(void) scheduleUpdateForTarget:(id)target priority:(NSInteger)priority paused:(BOOL)paused;
162
198
 
199
+ /** The scheduled block will be called every 'interval' seconds.
200
+ 'key' is a unique identifier of the block. Needed to unschedule the block or update its interval.
201
+ 'target' is needed for all the method related to "target" like "pause" and "unschedule"
202
+ If 'interval' is 0, it will be called every frame, but if so, it recommended to use 'scheduleUpdateForTarget:' instead.
203
+ 'repeat' lets the action be repeated repeat + 1 times, use kCCRepeatForever to let the action run continuously.
204
+ 'delay' is the amount of time the action will wait before it'll start.
205
+ If paused is YES, then it won't be called until it is resumed.
206
+ If the block is already scheduled, then only the interval parameter will be updated without re-scheduling it again.
207
+ @since v2.1
208
+ */
209
+ -(void) scheduleBlockForKey:(NSString*)key target:(id)target interval:(ccTime)interval repeat:(uint)repeat delay:(ccTime)delay paused:(BOOL)paused block:(void(^)(ccTime dt))block;
210
+
163
211
  /** Unshedules a selector for a given target.
164
212
  If you want to unschedule the "update", use unscheudleUpdateForTarget.
165
213
  @since v0.99.3
166
214
  */
167
215
  -(void) unscheduleSelector:(SEL)selector forTarget:(id)target;
168
216
 
217
+ /** Unshedules a block for a given key / target pair.
218
+ If you want to unschedule the "update", use unscheudleUpdateForTarget.
219
+ @since v2.1
220
+ */
221
+ -(void) unscheduleBlockForKey:(NSString*)key target:(id)target;
222
+
169
223
  /** Unschedules the update selector for a given target
170
224
  @since v0.99.3
171
225
  */
172
226
  -(void) unscheduleUpdateForTarget:(id)target;
173
227
 
174
- /** Unschedules all selectors for a given target.
228
+ /** Unschedules all selectors and blocks for a given target.
175
229
  This also includes the "update" selector.
176
230
  @since v0.99.3
177
231
  */
178
- -(void) unscheduleAllSelectorsForTarget:(id)target;
232
+ -(void) unscheduleAllForTarget:(id)target;
179
233
 
180
- /** Unschedules all selectors from all targets.
234
+ /** Unschedules all selectors and blocks from all targets.
181
235
  You should NEVER call this method, unless you know what you are doing.
182
236
 
183
237
  @since v0.99.3
184
238
  */
185
- -(void) unscheduleAllSelectors;
239
+ -(void) unscheduleAll;
186
240
 
187
- /** Unschedules all selectors from all targets with a minimum priority.
241
+ /** Unschedules all selectors and blocks from all targets with a minimum priority.
188
242
  You should only call this with kCCPriorityNonSystemMin or higher.
189
243
  @since v2.0.0
190
244
  */
191
- -(void) unscheduleAllSelectorsWithMinPriority:(NSInteger)minPriority;
245
+ -(void) unscheduleAllWithMinPriority:(NSInteger)minPriority;
192
246
 
193
247
  /** Pauses the target.
194
248
  All scheduled selectors/update for a given target won't be 'ticked' until the target is resumed.
@@ -209,13 +263,13 @@ struct _hashUpdateEntry;
209
263
  */
210
264
  -(BOOL) isTargetPaused:(id)target;
211
265
 
212
- /** Pause all selectors from all targets.
266
+ /** Pause all selectors and blocks from all targets.
213
267
  You should NEVER call this method, unless you know what you are doing.
214
268
  @since v2.0.0
215
269
  */
216
270
  -(NSSet*) pauseAllTargets;
217
271
 
218
- /** Pause all selectors from all targets with a minimum priority.
272
+ /** Pause all selectors and blocks from all targets with a minimum priority.
219
273
  You should only call this with kCCPriorityNonSystemMin or higher.
220
274
  @since v2.0.0
221
275
  */
@@ -37,7 +37,7 @@
37
37
  */
38
38
  @interface CCShaderCache : NSObject {
39
39
 
40
- NSMutableDictionary *programs_;
40
+ NSMutableDictionary *_programs;
41
41
 
42
42
  }
43
43
 
@@ -60,53 +60,50 @@
60
60
  *
61
61
  * The default anchorPoint in CCSprite is (0.5, 0.5).
62
62
  */
63
- @interface CCSprite : CCNode <CCRGBAProtocol, CCTextureProtocol>
63
+ @interface CCSprite : CCNodeRGBA <CCTextureProtocol>
64
64
  {
65
65
 
66
66
  //
67
67
  // Data used when the sprite is rendered using a CCSpriteBatchNode
68
68
  //
69
- CCTextureAtlas *textureAtlas_; // Sprite Sheet texture atlas (weak reference)
70
- NSUInteger atlasIndex_; // Absolute (real) Index on the batch node
71
- CCSpriteBatchNode *batchNode_; // Used batch node (weak reference)
72
- CGAffineTransform transformToBatch_; //
73
- BOOL dirty_; // Sprite needs to be updated
74
- BOOL recursiveDirty_; // Subchildren needs to be updated
75
- BOOL hasChildren_; // optimization to check if it contain children
76
- BOOL shouldBeHidden_; // should not be drawn because one of the ancestors is not visible
69
+ CCTextureAtlas *_textureAtlas; // Sprite Sheet texture atlas (weak reference)
70
+ NSUInteger _atlasIndex; // Absolute (real) Index on the batch node
71
+ CCSpriteBatchNode *_batchNode; // Used batch node (weak reference)
72
+ CGAffineTransform _transformToBatch; //
73
+ BOOL _dirty; // Sprite needs to be updated
74
+ BOOL _recursiveDirty; // Subchildren needs to be updated
75
+ BOOL _hasChildren; // optimization to check if it contain children
76
+ BOOL _shouldBeHidden; // should not be drawn because one of the ancestors is not visible
77
77
 
78
78
  //
79
79
  // Data used when the sprite is self-rendered
80
80
  //
81
- ccBlendFunc blendFunc_; // Needed for the texture protocol
82
- CCTexture2D *texture_; // Texture used to render the sprite
81
+ ccBlendFunc _blendFunc; // Needed for the texture protocol
82
+ CCTexture2D *_texture; // Texture used to render the sprite
83
83
 
84
84
  //
85
85
  // Shared data
86
86
  //
87
87
 
88
88
  // sprite rectangle
89
- CGRect rect_;
89
+ CGRect _rect;
90
90
 
91
91
  // texture
92
- BOOL rectRotated_;
92
+ BOOL _rectRotated;
93
93
 
94
94
  // Offset Position (used by Zwoptex)
95
- CGPoint offsetPosition_;
96
- CGPoint unflippedOffsetPositionFromCenter_;
95
+ CGPoint _offsetPosition;
96
+ CGPoint _unflippedOffsetPositionFromCenter;
97
97
 
98
98
  // vertex coords, texture coords and color info
99
- ccV3F_C4B_T2F_Quad quad_;
99
+ ccV3F_C4B_T2F_Quad _quad;
100
100
 
101
101
  // opacity and RGB protocol
102
- GLubyte opacity_;
103
- ccColor3B color_;
104
- ccColor3B colorUnmodified_;
105
- BOOL opacityModifyRGB_;
102
+ BOOL _opacityModifyRGB;
106
103
 
107
104
  // image is flipped
108
- BOOL flipX_;
109
- BOOL flipY_;
105
+ BOOL _flipX;
106
+ BOOL _flipY;
110
107
  }
111
108
 
112
109
  /** whether or not the Sprite needs to be updated in the Atlas */
@@ -135,10 +132,6 @@
135
132
  sprite.scaleY *= -1;
136
133
  */
137
134
  @property (nonatomic,readwrite) BOOL flipY;
138
- /** opacity: conforms to CCRGBAProtocol protocol */
139
- @property (nonatomic,readwrite) GLubyte opacity;
140
- /** RGB colors: conforms to CCRGBAProtocol protocol */
141
- @property (nonatomic,readwrite) ccColor3B color;
142
135
  /** weak reference of the CCTextureAtlas used when the sprite is rendered using a CCSpriteBatchNode */
143
136
  @property (nonatomic,readwrite,assign) CCTextureAtlas *textureAtlas;
144
137
  /** weak reference to the CCSpriteBatchNode that renders the CCSprite */
@@ -187,7 +180,7 @@
187
180
 
188
181
  /** Creates an sprite with a CGImageRef and a key.
189
182
  The key is used by the CCTextureCache to know if a texture was already created with this CGImage.
190
- For example, a valid key is: @"sprite_frame_01".
183
+ For example, a valid key is: @"_spriteframe_01".
191
184
  If key is nil, then a new texture will be created each time by the CCTextureCache.
192
185
  @since v0.99.0
193
186
  */
@@ -235,7 +228,7 @@
235
228
 
236
229
  /** Initializes an sprite with a CGImageRef and a key
237
230
  The key is used by the CCTextureCache to know if a texture was already created with this CGImage.
238
- For example, a valid key is: @"sprite_frame_01".
231
+ For example, a valid key is: @"_spriteframe_01".
239
232
  If key is nil, then a new texture will be created each time by the CCTextureCache.
240
233
  @since v0.99.0
241
234
  */
@@ -53,11 +53,11 @@
53
53
  */
54
54
  @interface CCSpriteBatchNode : CCNode <CCTextureProtocol>
55
55
  {
56
- CCTextureAtlas *textureAtlas_;
57
- ccBlendFunc blendFunc_;
56
+ CCTextureAtlas *_textureAtlas;
57
+ ccBlendFunc _blendFunc;
58
58
 
59
- // all descendants: chlidren, gran children, etc...
60
- CCArray *descendants_;
59
+ // all descendants: children, grandchildren, etc...
60
+ CCArray *_descendants;
61
61
  }
62
62
 
63
63
  /** returns the TextureAtlas that is used */
@@ -66,7 +66,7 @@
66
66
  /** conforms to CCTextureProtocol protocol */
67
67
  @property (nonatomic,readwrite) ccBlendFunc blendFunc;
68
68
 
69
- /** descendants (children, gran children, etc) */
69
+ /** descendants (children, grandchildren, etc) */
70
70
  @property (nonatomic,readonly) CCArray *descendants;
71
71
 
72
72
  /** creates a CCSpriteBatchNode with a texture2d and a default capacity of 29 children.
@@ -125,14 +125,21 @@
125
125
  @end
126
126
 
127
127
  @interface CCSpriteBatchNode (QuadExtensions)
128
- /** Adds a quad into the texture atlas but it won't be added into the children array.
128
+ /** Inserts a quad at a certain index into the texture atlas. The CCSprite won't be added into the children array.
129
129
  This method should be called only when you are dealing with very big AtlasSrite and when most of the CCSprite won't be updated.
130
- For example: a tile map (CCTMXMap) or a label with lots of characgers (CCLabelBMFont)
130
+ For example: a tile map (CCTMXMap) or a label with lots of characters (CCLabelBMFont)
131
131
  */
132
- -(id) addSpriteWithoutQuad:(CCSprite*)child z:(NSUInteger)z tag:(NSInteger)aTag;
132
+ -(void) insertQuadFromSprite:(CCSprite*)sprite quadIndex:(NSUInteger)index;
133
+
134
+ /** Updates a quad at a certain index into the texture atlas. The CCSprite won't be added into the children array.
135
+ This method should be called only when you are dealing with very big AtlasSrite and when most of the CCSprite won't be updated.
136
+ For example: a tile map (CCTMXMap) or a label with lots of characters (CCLabelBMFont)
137
+ */
138
+ -(void) updateQuadFromSprite:(CCSprite*)sprite quadIndex:(NSUInteger)index;
133
139
 
134
140
  /* This is the opposite of "addQuadFromSprite".
135
141
  It adds the sprite to the children and descendants array, but it doesn't add it to the texture atlas.
136
142
  */
137
- -(void) addQuadFromSprite:(CCSprite*)sprite quadIndex:(NSUInteger)index;
143
+ -(id) addSpriteWithoutQuad:(CCSprite*)child z:(NSUInteger)z tag:(NSInteger)aTag;
144
+
138
145
  @end
@@ -40,20 +40,20 @@
40
40
  */
41
41
  @interface CCSpriteFrame : NSObject <NSCopying>
42
42
  {
43
- CGRect rect_;
44
- CGRect rectInPixels_;
45
- BOOL rotated_;
46
- CGPoint offset_;
47
- CGPoint offsetInPixels_;
48
- CGSize originalSize_;
49
- CGSize originalSizeInPixels_;
50
- CCTexture2D *texture_;
51
- NSString *textureFilename_;
43
+ CGRect _rect;
44
+ CGRect _rectInPixels;
45
+ BOOL _rotated;
46
+ CGPoint _offset;
47
+ CGPoint _offsetInPixels;
48
+ CGSize _originalSize;
49
+ CGSize _originalSizeInPixels;
50
+ CCTexture2D *_texture;
51
+ NSString *_textureFilename;
52
52
  }
53
53
  /** rect of the frame in points. If it is updated, then rectInPixels will be updated too. */
54
54
  @property (nonatomic,readwrite) CGRect rect;
55
55
 
56
- /** rect of the frame in pixels. If it is updated, then rect (points) will be udpated too. */
56
+ /** rect of the frame in pixels. If it is updated, then rect (points) will be updated too. */
57
57
  @property (nonatomic,readwrite) CGRect rectInPixels;
58
58
 
59
59
  /** whether or not the rect of the frame is rotated ( x = x+width, y = y+height, width = height, height = width ) */