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.
- checksums.yaml +8 -8
- data/Gemfile.lock +1 -1
- data/LICENSE +1 -1
- data/LICENSE_Box2D +20 -0
- data/LICENSE_Cocos2D +24 -0
- data/README.md +34 -66
- data/Rakefile +2 -3
- data/bin/joybox +49 -0
- data/command/joybox/USAGE +24 -0
- data/command/joybox/templates/layer.erb +11 -0
- data/command/joybox/templates/layer_spec.erb +3 -0
- data/command/joybox/templates/scene.erb +11 -0
- data/command/joybox/templates/scene_spec.erb +3 -0
- data/command/joybox/templates/sprite.erb +11 -0
- data/command/joybox/templates/sprite_spec.erb +3 -0
- data/command/joybox_generate_command.rb +114 -0
- data/joybox.gemspec +44 -0
- data/lib/joybox/joybox-ios.rb +47 -0
- data/lib/joybox/joybox-osx.rb +47 -0
- data/lib/joybox/version.rb +1 -1
- data/lib/joybox.rb +18 -36
- data/{lib/joybox/cocos2d → motion/joybox}/actions/actions.rb +0 -0
- data/motion/joybox/actions/animate.rb +22 -0
- data/motion/joybox/actions/bezier.rb +33 -0
- data/motion/joybox/actions/blink.rb +24 -0
- data/motion/joybox/actions/ease.rb +149 -0
- data/motion/joybox/actions/fade.rb +38 -0
- data/motion/joybox/actions/jump.rb +39 -0
- data/{lib/joybox/cocos2d → motion/joybox}/actions/move.rb +4 -2
- data/motion/joybox/actions/place.rb +22 -0
- data/{lib/joybox/cocos2d → motion/joybox}/actions/repeat.rb +10 -1
- data/{lib/joybox/cocos2d → motion/joybox}/actions/rotate.rb +4 -2
- data/{lib/joybox/cocos2d → motion/joybox}/actions/scale.rb +4 -2
- data/{lib/joybox/cocos2d → motion/joybox}/actions/sequence.rb +3 -3
- data/{lib/joybox/cocos2d → motion/joybox}/actions/skew.rb +0 -0
- data/motion/joybox/actions/spawn.rb +22 -0
- data/motion/joybox/actions/tint.rb +37 -0
- data/motion/joybox/animations/animation.rb +60 -0
- data/{lib/joybox/cocos2d → motion/joybox}/common/color.rb +12 -1
- data/{lib/joybox/cocos2d → motion/joybox}/common/gc_size.rb +4 -4
- data/{lib/joybox/cocos2d → motion/joybox}/common/ns_set.rb +0 -0
- data/{lib/joybox/cocos2d → motion/joybox}/common/numeric.rb +0 -0
- data/{lib/joybox/cocos2d → motion/joybox}/common/screen.rb +4 -4
- data/motion/joybox/core/layer.rb +51 -0
- data/{lib/joybox/cocos2d → motion/joybox}/core/node.rb +0 -0
- data/{lib/joybox/cocos2d → motion/joybox}/core/scene.rb +0 -0
- data/{lib/joybox/cocos2d → motion/joybox}/core/sprite.rb +22 -3
- data/{lib/joybox/cocos2d → motion/joybox}/core/sprite_batch.rb +0 -0
- data/motion/joybox/core/sprite_frame_cache.rb +147 -0
- data/{lib/joybox/cocos2d/cocos2d.rb → motion/joybox/joybox.rb} +3 -1
- data/{lib/joybox/cocos2d → motion/joybox}/macros.rb +0 -0
- data/{lib/joybox/box2d → motion/joybox/physics}/body.rb +44 -17
- data/{lib/joybox/cocos2d/core → motion/joybox/physics}/physics_sprite.rb +1 -1
- data/motion/joybox/physics/world.rb +79 -0
- data/{lib/joybox/cocos2d → motion/joybox}/ui/label.rb +3 -2
- data/{lib/joybox/cocos2d → motion/joybox}/ui/menu.rb +0 -0
- data/{lib/joybox/cocos2d → motion/joybox}/ui/menu_image.rb +0 -0
- data/{lib/joybox/cocos2d → motion/joybox}/ui/menu_label.rb +0 -0
- data/{lib/joybox/cocos2d → motion/joybox}/ui/ui.rb +0 -0
- data/{lib/joybox/cocos2d → motion/joybox-ios}/common/cg_point.rb +9 -2
- data/{lib/joybox/cocos2d → motion/joybox-ios}/common/ui_touch.rb +1 -1
- data/{lib/joybox/cocos2d → motion/joybox-ios}/configuration/configuration.rb +0 -0
- data/{lib/joybox/cocos2d → motion/joybox-ios}/configuration/file_utils.rb +0 -3
- data/{lib/joybox/cocos2d → motion/joybox-ios}/configuration/gl_view.rb +0 -0
- data/{lib/joybox/cocos2d → motion/joybox-ios}/configuration/texture_2d.rb +0 -0
- data/{lib/joybox/cocos2d → motion/joybox-ios}/core/layer.rb +1 -45
- data/{lib/joybox/cocos2d → motion/joybox-ios}/director.rb +6 -6
- data/motion/joybox-osx/common/ats_point.rb +48 -0
- data/motion/joybox-osx/common/ns_event.rb +8 -0
- data/motion/joybox-osx/configuration/configuration.rb +46 -0
- data/motion/joybox-osx/configuration/gl_view.rb +57 -0
- data/motion/joybox-osx/core/layer.rb +135 -0
- data/motion/joybox-osx/director.rb +42 -0
- data/template/joybox-ios/files/Rakefile.erb +9 -0
- data/{app → template/joybox-ios/files/app}/app_delegate.rb +1 -5
- data/{resources → template/joybox-ios/files/resources}/fps_images-hd.png +0 -0
- data/{resources → template/joybox-ios/files/resources}/fps_images-ipadhd.png +0 -0
- data/{resources → template/joybox-ios/files/resources}/fps_images.png +0 -0
- data/template/joybox-ios/files/spec/main_spec.rb.erb +9 -0
- data/template/joybox-osx/files/Rakefile.erb +9 -0
- data/template/joybox-osx/files/app/app_delegate.rb +23 -0
- data/template/joybox-osx/files/app/layers/default_layer.rb +5 -0
- data/template/joybox-osx/files/app/menu.rb +51 -0
- data/template/joybox-osx/files/resources/Credits.rtf +29 -0
- data/template/joybox-osx/files/resources/fps_images-hd.png +0 -0
- data/template/joybox-osx/files/resources/fps_images-ipadhd.png +0 -0
- data/template/joybox-osx/files/resources/fps_images.png +0 -0
- data/template/joybox-osx/files/spec/main_spec.rb.erb +9 -0
- data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Box2D +0 -0
- data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Box2D.framework.bridgesupport +47 -37
- data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Versions/A/Box2D +0 -0
- data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Versions/A/Headers/Collision/B2DContactListener.h +0 -0
- data/vendor/vendor-ios/Box2D.framework/Versions/A/Headers/Collision/Shapes/B2DCircleShape.h +16 -0
- data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Versions/A/Headers/Collision/Shapes/B2DEdgeShape.h +0 -0
- data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Versions/A/Headers/Collision/Shapes/B2DPolygonShape.h +0 -0
- data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Versions/A/Headers/Collision/Shapes/B2DShape.h +0 -0
- data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Versions/A/Headers/Dynamics/B2DBody.h +6 -6
- data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Versions/A/Headers/Dynamics/B2DWorld.h +0 -0
- data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Versions/A/Resources/Box2DConfig.cmake +0 -0
- data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Versions/A/Resources/CMakeLists.txt +0 -0
- data/vendor/vendor-ios/Box2D.framework/Versions/A/Resources/LICENSE +22 -0
- data/vendor/vendor-ios/cocos_2d/cocos_2d.bridgesupport +9154 -0
- data/vendor/vendor-ios/cocos_2d/cocos_2d_exceptions.bridgesupport +39 -0
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCAction.h +23 -23
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionCamera.h +21 -19
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionCatmullRom.h +18 -6
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionEase.h +117 -31
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionGrid.h +19 -17
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionGrid3D.h +45 -42
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionInstant.h +21 -13
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionInterval.h +123 -81
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionManager.h +2 -2
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionPageTurn3D.h +2 -1
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionProgressTimer.h +4 -4
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionTiledGrid.h +46 -38
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionTween.h +3 -3
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCAnimation.h +8 -8
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCAnimationCache.h +2 -2
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCAtlasNode.h +19 -17
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCCamera.h +12 -12
- data/vendor/vendor-ios/cocos_2d/include/CCClippingNode.h +77 -0
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCConfiguration.h +31 -13
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCDirector.h +51 -42
- data/vendor/vendor-ios/cocos_2d/include/CCDrawNode.h +65 -0
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCDrawingPrimitives.h +42 -8
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCGLProgram.h +56 -21
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCGrabber.h +2 -2
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCGrid.h +29 -29
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCLabelAtlas.h +5 -2
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCLabelBMFont.h +56 -32
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCLabelTTF.h +20 -20
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCLayer.h +107 -79
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCMenu.h +10 -14
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCMenuItem.h +37 -32
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCMotionStreak.h +18 -19
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCNode+Debug.h +0 -0
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCNode.h +87 -37
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCParallaxNode.h +2 -2
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCParticleBatchNode.h +2 -2
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCParticleExamples.h +22 -0
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCParticleSystem.h +51 -40
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCParticleSystemQuad.h +4 -4
- data/vendor/vendor-ios/cocos_2d/include/CCPhysicsDebugNode.h +58 -0
- data/vendor/vendor-ios/cocos_2d/include/CCPhysicsSprite.h +82 -0
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCProgressTimer.h +9 -11
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCProtocols.h +54 -26
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCRenderTexture.h +29 -9
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCScene.h +4 -0
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCScheduler.h +94 -40
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCShaderCache.h +1 -1
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCSprite.h +21 -28
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCSpriteBatchNode.h +16 -9
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCSpriteFrame.h +10 -10
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCSpriteFrameCache.h +6 -6
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTMXLayer.h +16 -16
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTMXObjectGroup.h +4 -4
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTMXTiledMap.h +9 -9
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTMXXMLParser.h +44 -33
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTexture2D.h +17 -25
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTextureAtlas.h +10 -10
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTextureCache.h +4 -4
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTexturePVR.h +25 -8
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTileMapAtlas.h +6 -6
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTransition.h +57 -12
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTransitionPageTurn.h +2 -2
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTransitionProgress.h +27 -5
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms}/CCGL.h +4 -2
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms}/CCNS.h +0 -0
- data/vendor/vendor-ios/cocos_2d/include/Platforms/Mac/CCDirectorMac.h +110 -0
- data/vendor/vendor-ios/cocos_2d/include/Platforms/Mac/CCEventDispatcher.h +343 -0
- data/vendor/vendor-ios/cocos_2d/include/Platforms/Mac/CCGLView.h +103 -0
- data/vendor/vendor-ios/cocos_2d/include/Platforms/Mac/CCWindow.h +41 -0
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms/iOS}/CCDirectorIOS.h +12 -5
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms/iOS}/CCES2Renderer.h +12 -12
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms/iOS}/CCESRenderer.h +0 -0
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms/iOS}/CCGLView.h +28 -13
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms/iOS}/CCTouchDelegateProtocol.h +4 -4
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms/iOS}/CCTouchDispatcher.h +2 -2
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms/iOS}/CCTouchHandler.h +7 -7
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/CCArray.h +1 -1
- data/vendor/vendor-ios/cocos_2d/include/Support/CCFileUtils.h +394 -0
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/CCProfiling.h +0 -0
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/CCVertex.h +1 -1
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/CGPointExtension.h +4 -2
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/NSThread+performBlock.h +0 -0
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/OpenGL_Internal.h +0 -0
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/TGAlib.h +0 -0
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/TransformUtils.h +0 -0
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/ZipUtils.h +4 -4
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/base64.h +0 -0
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/ccCArray.h +15 -15
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/ccUtils.h +0 -0
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/uthash.h +129 -184
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/utlist.h +298 -55
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/ccConfig.h +56 -9
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/ccDeprecated.h +131 -0
- data/vendor/vendor-ios/cocos_2d/include/ccFPSImages.h +39 -0
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/ccGLStateCache.h +44 -26
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/ccMacros.h +9 -9
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionColorLengthTexture_frag.h +41 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionColorLengthTexture_vert.h +47 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionColor_frag.h +37 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionColor_vert.h +40 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionTextureA8Color_frag.h +41 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionTextureA8Color_vert.h +45 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionTextureColorAlphaTest_frag.h +47 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionTextureColor_frag.h +39 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionTextureColor_vert.h +45 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionTexture_frag.h +38 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionTexture_uColor_frag.h +41 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionTexture_uColor_vert.h +41 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionTexture_vert.h +41 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_Position_uColor_frag.h +37 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_Position_uColor_vert.h +43 -0
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/ccShaders.h +11 -0
- data/vendor/vendor-ios/cocos_2d/include/ccTypes.h +392 -0
- data/vendor/vendor-ios/cocos_2d/include/cocos2d-ios-exceptions.bridgesupport +39 -0
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/cocos2d.h +28 -3
- data/vendor/vendor-ios/cocos_2d/include/gen_cocos2d_bridgesupport.sh +17 -0
- data/vendor/vendor-ios/cocos_2d/include/gen_cocos2d_complement.sh +17 -0
- data/vendor/vendor-ios/cocos_2d/libcocos2d.a +0 -0
- data/vendor/vendor-osx/box_2d/box_2d.bridgesupport +176 -0
- data/vendor/vendor-osx/box_2d/include/B2DBody.h +46 -0
- data/vendor/vendor-osx/box_2d/include/B2DCircleShape.h +16 -0
- data/vendor/vendor-osx/box_2d/include/B2DContactListener.h +30 -0
- data/vendor/vendor-osx/box_2d/include/B2DEdgeShape.h +17 -0
- data/vendor/vendor-osx/box_2d/include/B2DPolygonShape.h +16 -0
- data/vendor/vendor-osx/box_2d/include/B2DShape.h +18 -0
- data/vendor/vendor-osx/box_2d/include/B2DWorld.h +44 -0
- data/vendor/vendor-osx/box_2d/libBox2D.a +0 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d.bridgesupport +8292 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCAction.h +195 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionCamera.h +75 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionCatmullRom.h +151 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionEase.h +245 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionGrid.h +167 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionGrid3D.h +208 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionInstant.h +235 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionInterval.h +473 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionManager.h +113 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionPageTurn3D.h +43 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionProgressTimer.h +59 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionTiledGrid.h +219 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionTween.h +62 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCAnimation.h +150 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCAnimationCache.h +74 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCAtlasNode.h +98 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCCamera.h +98 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCClippingNode.h +77 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCConfiguration.h +144 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCDirector.h +353 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCDrawNode.h +65 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCDrawingPrimitives.h +173 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCGLProgram.h +185 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCGrabber.h +44 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCGrid.h +130 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCLabelAtlas.h +71 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCLabelBMFont.h +240 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCLabelTTF.h +132 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCLayer.h +308 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCMenu.h +96 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCMenuItem.h +428 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCMotionStreak.h +86 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCNode+Debug.h +39 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCNode.h +619 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCParallaxNode.h +50 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCParticleBatchNode.h +99 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCParticleExamples.h +117 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCParticleSystem.h +464 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCParticleSystemQuad.h +73 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCPhysicsDebugNode.h +58 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCPhysicsSprite.h +82 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCProgressTimer.h +92 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCProtocols.h +160 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCRenderTexture.h +159 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCScene.h +47 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCScheduler.h +284 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCShaderCache.h +60 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCSprite.h +281 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCSpriteBatchNode.h +145 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCSpriteFrame.h +126 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCSpriteFrameCache.h +121 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTMXLayer.h +164 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTMXObjectGroup.h +67 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTMXTiledMap.h +145 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTMXXMLParser.h +228 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTexture2D.h +349 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTextureAtlas.h +188 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTextureCache.h +146 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTexturePVR.h +146 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTileMapAtlas.h +83 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTransition.h +341 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTransitionPageTurn.h +60 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTransitionProgress.h +84 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Platforms/CCGL.h +74 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Platforms/CCNS.h +54 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Platforms/Mac/CCDirectorMac.h +110 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Platforms/Mac/CCEventDispatcher.h +343 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Platforms/Mac/CCGLView.h +103 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Platforms/Mac/CCWindow.h +41 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/CCArray.h +119 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/CCFileUtils.h +394 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/CCProfiling.h +89 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/CCVertex.h +36 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/CGPointExtension.h +346 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/NSThread+performBlock.h +22 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/OpenGL_Internal.h +86 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/TGAlib.h +55 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/TransformUtils.h +36 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/ZipUtils.h +91 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/base64.h +33 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/ccCArray.h +229 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/ccUtils.h +36 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/uthash.h +917 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/utlist.h +733 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccConfig.h +292 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccDeprecated.h +431 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccFPSImages.h +39 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccGLStateCache.h +156 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccMacros.h +353 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionColorLengthTexture_frag.h +41 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionColorLengthTexture_vert.h +47 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionColor_frag.h +37 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionColor_vert.h +40 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionTextureA8Color_frag.h +41 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionTextureA8Color_vert.h +45 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionTextureColorAlphaTest_frag.h +47 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionTextureColor_frag.h +39 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionTextureColor_vert.h +45 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionTexture_frag.h +38 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionTexture_uColor_frag.h +41 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionTexture_uColor_vert.h +41 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionTexture_vert.h +41 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_Position_uColor_frag.h +37 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_Position_uColor_vert.h +43 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShaders.h +56 -0
- data/vendor/{Cocos2D/include → vendor-osx/cocos_2d/cocos_2d_include}/ccTypes.h +39 -35
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/cocos2d.h +203 -0
- data/vendor/vendor-osx/cocos_2d/libcocos2d.a +0 -0
- metadata +363 -195
- data/app/layers/box2d_layer.rb +0 -109
- data/app/layers/cocos2d_layer.rb +0 -14
- data/app/layers/cocos_motion_layer.rb +0 -145
- data/app/layers/menu_layer.rb +0 -59
- data/lib/joybox/box2d/world.rb +0 -79
- data/resources/box2d/blocks_sprite_sheet.png +0 -0
- data/resources/cocos_motion/dot.png +0 -0
- data/resources/cocos_motion/dot_selected.png +0 -0
- data/resources/cocos_motion/grossini.png +0 -0
- data/resources/cocos_motion/grossinis_sister.png +0 -0
- data/resources/cocos_motion/grossinis_sister_two.png +0 -0
- data/resources/cocos_motion/left_arrow.png +0 -0
- data/resources/cocos_motion/left_arrow_selected.png +0 -0
- data/resources/cocos_motion/right_arrow.png +0 -0
- data/resources/cocos_motion/right_arrow_selected.png +0 -0
- data/vendor/Cocos2D/Cocos2D.bridgesupport +0 -7808
- data/vendor/Cocos2D/include/CCFileUtils.h +0 -188
- data/vendor/Cocos2D/include/CocosDenshion/CDAudioManager.h +0 -243
- data/vendor/Cocos2D/include/CocosDenshion/CDConfig.h +0 -60
- data/vendor/Cocos2D/include/CocosDenshion/CDOpenALSupport.h +0 -77
- data/vendor/Cocos2D/include/CocosDenshion/CDXPropertyModifierAction.h +0 -45
- data/vendor/Cocos2D/include/CocosDenshion/CocosDenshion.h +0 -440
- data/vendor/Cocos2D/include/CocosDenshion/SimpleAudioEngine.h +0 -90
- data/vendor/Cocos2D/include/RubyMotionSchedule.h +0 -7
- data/vendor/Cocos2D/include/ccShader_PositionColor_frag.h +0 -12
- data/vendor/Cocos2D/include/ccShader_PositionColor_vert.h +0 -17
- data/vendor/Cocos2D/include/ccShader_PositionTextureA8Color_frag.h +0 -16
- data/vendor/Cocos2D/include/ccShader_PositionTextureA8Color_vert.h +0 -21
- data/vendor/Cocos2D/include/ccShader_PositionTextureColorAlphaTest_frag.h +0 -23
- data/vendor/Cocos2D/include/ccShader_PositionTextureColor_frag.h +0 -14
- data/vendor/Cocos2D/include/ccShader_PositionTextureColor_vert.h +0 -22
- data/vendor/Cocos2D/include/ccShader_PositionTexture_frag.h +0 -13
- data/vendor/Cocos2D/include/ccShader_PositionTexture_uColor_frag.h +0 -16
- data/vendor/Cocos2D/include/ccShader_PositionTexture_uColor_vert.h +0 -18
- data/vendor/Cocos2D/include/ccShader_PositionTexture_vert.h +0 -17
- data/vendor/Cocos2D/include/ccShader_Position_uColor_frag.h +0 -12
- data/vendor/Cocos2D/include/ccShader_Position_uColor_vert.h +0 -19
- data/vendor/Cocos2D/include/kazmath/GL/mat4stack.h +0 -51
- data/vendor/Cocos2D/include/kazmath/GL/matrix.h +0 -58
- data/vendor/Cocos2D/include/kazmath/aabb.h +0 -53
- data/vendor/Cocos2D/include/kazmath/kazmath.h +0 -39
- data/vendor/Cocos2D/include/kazmath/mat3.h +0 -75
- data/vendor/Cocos2D/include/kazmath/mat4.h +0 -93
- data/vendor/Cocos2D/include/kazmath/neon_matrix_impl.h +0 -41
- data/vendor/Cocos2D/include/kazmath/plane.h +0 -70
- data/vendor/Cocos2D/include/kazmath/quaternion.h +0 -113
- data/vendor/Cocos2D/include/kazmath/ray2.h +0 -50
- data/vendor/Cocos2D/include/kazmath/utility.h +0 -74
- data/vendor/Cocos2D/include/kazmath/vec2.h +0 -64
- data/vendor/Cocos2D/include/kazmath/vec3.h +0 -68
- data/vendor/Cocos2D/include/kazmath/vec4.h +0 -68
- data/vendor/Cocos2D/libCocosDenshion.a +0 -0
- data/vendor/Cocos2D/libcocos2d.a +0 -0
@@ -0,0 +1,98 @@
|
|
1
|
+
/*
|
2
|
+
* cocos2d for iPhone: http://www.cocos2d-iphone.org
|
3
|
+
*
|
4
|
+
* Copyright (c) 2008-2010 Ricardo Quesada
|
5
|
+
* Copyright (c) 2011 Zynga Inc.
|
6
|
+
*
|
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
|
+
*
|
14
|
+
* The above copyright notice and this permission notice shall be included in
|
15
|
+
* all copies or substantial portions of the Software.
|
16
|
+
*
|
17
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
23
|
+
* THE SOFTWARE.
|
24
|
+
*/
|
25
|
+
|
26
|
+
|
27
|
+
|
28
|
+
#import "CCNode.h"
|
29
|
+
#import "kazmath/mat4.h"
|
30
|
+
|
31
|
+
/**
|
32
|
+
A CCCamera is used in every CCNode.
|
33
|
+
Useful to look at the object from different views.
|
34
|
+
The OpenGL gluLookAt() function is used to locate the
|
35
|
+
camera.
|
36
|
+
|
37
|
+
If the object is transformed by any of the scale, rotation or
|
38
|
+
position attributes, then they will override the camera.
|
39
|
+
|
40
|
+
IMPORTANT: Either your use the camera or the rotation/scale/position properties. You can't use both.
|
41
|
+
World coordinates won't work if you use the camera.
|
42
|
+
|
43
|
+
Limitations:
|
44
|
+
|
45
|
+
- Some nodes, like CCParallaxNode, CCParticle uses world node coordinates, and they won't work properly if you move them (or any of their ancestors)
|
46
|
+
using the camera.
|
47
|
+
|
48
|
+
- It doesn't work on batched nodes like CCSprite objects when they are parented to a CCSpriteBatchNode object.
|
49
|
+
|
50
|
+
- It is recommended to use it ONLY if you are going to create 3D effects. For 2D effects, use the action CCFollow or position/scale/rotate.
|
51
|
+
|
52
|
+
*/
|
53
|
+
|
54
|
+
@interface CCCamera : NSObject
|
55
|
+
{
|
56
|
+
float _eyeX;
|
57
|
+
float _eyeY;
|
58
|
+
float _eyeZ;
|
59
|
+
|
60
|
+
float _centerX;
|
61
|
+
float _centerY;
|
62
|
+
float _centerZ;
|
63
|
+
|
64
|
+
float _upX;
|
65
|
+
float _upY;
|
66
|
+
float _upZ;
|
67
|
+
|
68
|
+
BOOL _dirty;
|
69
|
+
|
70
|
+
kmMat4 _lookupMatrix;
|
71
|
+
}
|
72
|
+
|
73
|
+
/** whether of not the camera is dirty */
|
74
|
+
@property (nonatomic,readwrite) BOOL dirty;
|
75
|
+
|
76
|
+
/** returns the Z eye */
|
77
|
+
+(float) getZEye;
|
78
|
+
|
79
|
+
/** sets the camera in the defaul position */
|
80
|
+
-(void) restore;
|
81
|
+
/** Sets the camera using gluLookAt using its eye, center and up_vector */
|
82
|
+
-(void) locate;
|
83
|
+
/** sets the eye values in points */
|
84
|
+
-(void) setEyeX: (float)x eyeY:(float)y eyeZ:(float)z;
|
85
|
+
/** sets the center values in points */
|
86
|
+
-(void) setCenterX: (float)x centerY:(float)y centerZ:(float)z;
|
87
|
+
/** sets the up values */
|
88
|
+
-(void) setUpX: (float)x upY:(float)y upZ:(float)z;
|
89
|
+
|
90
|
+
/** get the eye vector values in points */
|
91
|
+
-(void) eyeX:(float*)x eyeY:(float*)y eyeZ:(float*)z;
|
92
|
+
/** get the center vector values in points */
|
93
|
+
-(void) centerX:(float*)x centerY:(float*)y centerZ:(float*)z;
|
94
|
+
/** get the up vector values */
|
95
|
+
-(void) upX:(float*)x upY:(float*)y upZ:(float*)z;
|
96
|
+
|
97
|
+
|
98
|
+
@end
|
@@ -0,0 +1,77 @@
|
|
1
|
+
/*
|
2
|
+
* cocos2d for iPhone: http://www.cocos2d-iphone.org
|
3
|
+
*
|
4
|
+
* Copyright (c) 2012 Pierre-David Bélanger
|
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
|
+
|
26
|
+
#import "CCNode.h"
|
27
|
+
|
28
|
+
/** CCClippingNode is a subclass of CCNode.
|
29
|
+
It draws its content (childs) clipped using a stencil.
|
30
|
+
The stencil is an other CCNode that will not be drawn.
|
31
|
+
The clipping is done using the alpha part of the stencil (adjusted with an alphaThreshold).
|
32
|
+
*/
|
33
|
+
@interface CCClippingNode : CCNode
|
34
|
+
{
|
35
|
+
CCNode *_stencil;
|
36
|
+
GLfloat _alphaThreshold;
|
37
|
+
BOOL _inverted;
|
38
|
+
}
|
39
|
+
|
40
|
+
/** The CCNode to use as a stencil to do the clipping.
|
41
|
+
The stencil node will be retained.
|
42
|
+
This default to nil.
|
43
|
+
*/
|
44
|
+
@property (nonatomic, retain) CCNode *stencil;
|
45
|
+
|
46
|
+
/** The alpha threshold.
|
47
|
+
The content is drawn only where the stencil have pixel with alpha greater than the alphaThreshold.
|
48
|
+
Should be a float between 0 and 1.
|
49
|
+
This default to 1 (so alpha test is disabled).
|
50
|
+
*/
|
51
|
+
@property (nonatomic) GLfloat alphaThreshold;
|
52
|
+
|
53
|
+
/** Inverted. If this is set to YES,
|
54
|
+
the stencil is inverted, so the content is drawn where the stencil is NOT drawn.
|
55
|
+
This default to NO.
|
56
|
+
*/
|
57
|
+
@property (nonatomic) BOOL inverted;
|
58
|
+
|
59
|
+
/** Creates and initializes a clipping node without a stencil.
|
60
|
+
*/
|
61
|
+
+ (id)clippingNode;
|
62
|
+
|
63
|
+
/** Creates and initializes a clipping node with an other node as its stencil.
|
64
|
+
The stencil node will be retained.
|
65
|
+
*/
|
66
|
+
+ (id)clippingNodeWithStencil:(CCNode *)stencil;
|
67
|
+
|
68
|
+
/** Initializes a clipping node without a stencil.
|
69
|
+
*/
|
70
|
+
- (id)init;
|
71
|
+
|
72
|
+
/** Initializes a clipping node with an other node as its stencil.
|
73
|
+
The stencil node will be retained, and its parent will be set to this clipping node.
|
74
|
+
*/
|
75
|
+
- (id)initWithStencil:(CCNode *)stencil;
|
76
|
+
|
77
|
+
@end
|
@@ -0,0 +1,144 @@
|
|
1
|
+
/*
|
2
|
+
* cocos2d for iPhone: http://www.cocos2d-iphone.org
|
3
|
+
*
|
4
|
+
* Copyright (c) 2010 Ricardo Quesada
|
5
|
+
* Copyright (c) 2011 Zynga Inc.
|
6
|
+
*
|
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
|
+
*
|
14
|
+
* The above copyright notice and this permission notice shall be included in
|
15
|
+
* all copies or substantial portions of the Software.
|
16
|
+
*
|
17
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
23
|
+
* THE SOFTWARE.
|
24
|
+
*/
|
25
|
+
|
26
|
+
#import <Foundation/Foundation.h>
|
27
|
+
|
28
|
+
#import "Platforms/CCGL.h"
|
29
|
+
|
30
|
+
/** OS version definitions. Includes both iOS and Mac OS versions
|
31
|
+
*/
|
32
|
+
enum {
|
33
|
+
kCCiOSVersion_4_0 = 0x04000000,
|
34
|
+
kCCiOSVersion_4_0_1 = 0x04000100,
|
35
|
+
kCCiOSVersion_4_1 = 0x04010000,
|
36
|
+
kCCiOSVersion_4_2 = 0x04020000,
|
37
|
+
kCCiOSVersion_4_2_1 = 0x04020100,
|
38
|
+
kCCiOSVersion_4_3 = 0x04030000,
|
39
|
+
kCCiOSVersion_4_3_1 = 0x04030100,
|
40
|
+
kCCiOSVersion_4_3_2 = 0x04030200,
|
41
|
+
kCCiOSVersion_4_3_3 = 0x04030300,
|
42
|
+
kCCiOSVersion_4_3_4 = 0x04030400,
|
43
|
+
kCCiOSVersion_4_3_5 = 0x04030500,
|
44
|
+
kCCiOSVersion_5_0 = 0x05000000,
|
45
|
+
kCCiOSVersion_5_0_1 = 0x05000100,
|
46
|
+
kCCiOSVersion_5_1_0 = 0x05010000,
|
47
|
+
kCCiOSVersion_6_0_0 = 0x06000000,
|
48
|
+
|
49
|
+
kCCMacVersion_10_6 = 0x0a060000,
|
50
|
+
kCCMacVersion_10_7 = 0x0a070000,
|
51
|
+
kCCMacVersion_10_8 = 0x0a080000,
|
52
|
+
};
|
53
|
+
|
54
|
+
enum {
|
55
|
+
kCCDeviceiPhone,
|
56
|
+
kCCDeviceiPhoneRetinaDisplay,
|
57
|
+
kCCDeviceiPhone5,
|
58
|
+
kCCDeviceiPhone5RetinaDisplay,
|
59
|
+
kCCDeviceiPad,
|
60
|
+
kCCDeviceiPadRetinaDisplay,
|
61
|
+
|
62
|
+
kCCDeviceMac,
|
63
|
+
kCCDeviceMacRetinaDisplay,
|
64
|
+
};
|
65
|
+
|
66
|
+
/**
|
67
|
+
CCConfiguration contains some openGL variables
|
68
|
+
@since v0.99.0
|
69
|
+
*/
|
70
|
+
@interface CCConfiguration : NSObject {
|
71
|
+
|
72
|
+
BOOL _openGLInitialized;
|
73
|
+
|
74
|
+
GLint _maxTextureSize;
|
75
|
+
BOOL _supportsPVRTC;
|
76
|
+
BOOL _supportsNPOT;
|
77
|
+
BOOL _supportsBGRA8888;
|
78
|
+
BOOL _supportsDiscardFramebuffer;
|
79
|
+
BOOL _supportsShareableVAO;
|
80
|
+
GLint _maxSamplesAllowed;
|
81
|
+
GLint _maxTextureUnits;
|
82
|
+
|
83
|
+
unsigned int _OSVersion;
|
84
|
+
}
|
85
|
+
|
86
|
+
/** OpenGL Max texture size. */
|
87
|
+
@property (nonatomic, readonly) GLint maxTextureSize;
|
88
|
+
|
89
|
+
/** returns the maximum texture units
|
90
|
+
@since v2.0.0
|
91
|
+
*/
|
92
|
+
@property (nonatomic, readonly) GLint maxTextureUnits;
|
93
|
+
|
94
|
+
/** Whether or not the GPU supports NPOT (Non Power Of Two) textures.
|
95
|
+
OpenGL ES 2.0 already supports NPOT (iOS).
|
96
|
+
|
97
|
+
@since v0.99.2
|
98
|
+
*/
|
99
|
+
@property (nonatomic, readonly) BOOL supportsNPOT;
|
100
|
+
|
101
|
+
/** Whether or not PVR Texture Compressed is supported */
|
102
|
+
@property (nonatomic, readonly) BOOL supportsPVRTC;
|
103
|
+
|
104
|
+
/** Whether or not BGRA8888 textures are supported.
|
105
|
+
|
106
|
+
@since v0.99.2
|
107
|
+
*/
|
108
|
+
@property (nonatomic, readonly) BOOL supportsBGRA8888;
|
109
|
+
|
110
|
+
/** Whether or not glDiscardFramebufferEXT is supported
|
111
|
+
|
112
|
+
@since v0.99.2
|
113
|
+
*/
|
114
|
+
@property (nonatomic, readonly) BOOL supportsDiscardFramebuffer;
|
115
|
+
|
116
|
+
/** Whether or not shareable VAOs are supported.
|
117
|
+
@since v2.0.0
|
118
|
+
*/
|
119
|
+
@property (nonatomic, readonly) BOOL supportsShareableVAO;
|
120
|
+
|
121
|
+
/** returns the OS version.
|
122
|
+
- On iOS devices it returns the firmware version.
|
123
|
+
- On Mac returns the OS version
|
124
|
+
|
125
|
+
@since v0.99.5
|
126
|
+
*/
|
127
|
+
@property (nonatomic, readonly) unsigned int OSVersion;
|
128
|
+
|
129
|
+
|
130
|
+
/** returns a shared instance of the CCConfiguration */
|
131
|
+
+(CCConfiguration *) sharedConfiguration;
|
132
|
+
|
133
|
+
/** returns whether or not an OpenGL is supported */
|
134
|
+
- (BOOL) checkForGLExtension:(NSString *)searchName;
|
135
|
+
|
136
|
+
/** returns the current device */
|
137
|
+
-(NSInteger) runningDevice;
|
138
|
+
|
139
|
+
/** dumps in the console the CCConfiguration information.
|
140
|
+
@since v2.1
|
141
|
+
*/
|
142
|
+
-(void) dumpInfo;
|
143
|
+
|
144
|
+
@end
|
@@ -0,0 +1,353 @@
|
|
1
|
+
/*
|
2
|
+
* cocos2d for iPhone: http://www.cocos2d-iphone.org
|
3
|
+
*
|
4
|
+
* Copyright (c) 2008-2010 Ricardo Quesada
|
5
|
+
* Copyright (c) 2011 Zynga Inc.
|
6
|
+
*
|
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
|
+
*
|
14
|
+
* The above copyright notice and this permission notice shall be included in
|
15
|
+
* all copies or substantial portions of the Software.
|
16
|
+
*
|
17
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
23
|
+
* THE SOFTWARE.
|
24
|
+
*/
|
25
|
+
|
26
|
+
|
27
|
+
#import "ccConfig.h"
|
28
|
+
#import "ccTypes.h"
|
29
|
+
#import "ccMacros.h"
|
30
|
+
|
31
|
+
#import "CCProtocols.h"
|
32
|
+
#import "Platforms/CCGL.h"
|
33
|
+
#import "kazmath/mat4.h"
|
34
|
+
|
35
|
+
/** @typedef ccDirectorProjection
|
36
|
+
Possible OpenGL projections used by director
|
37
|
+
*/
|
38
|
+
typedef enum {
|
39
|
+
/// sets a 2D projection (orthogonal projection).
|
40
|
+
kCCDirectorProjection2D,
|
41
|
+
|
42
|
+
/// sets a 3D projection with a fovy=60, znear=0.5f and zfar=1500.
|
43
|
+
kCCDirectorProjection3D,
|
44
|
+
|
45
|
+
/// it calls "updateProjection" on the projection delegate.
|
46
|
+
kCCDirectorProjectionCustom,
|
47
|
+
|
48
|
+
/// Detault projection is 3D projection
|
49
|
+
kCCDirectorProjectionDefault = kCCDirectorProjection3D,
|
50
|
+
|
51
|
+
} ccDirectorProjection;
|
52
|
+
|
53
|
+
|
54
|
+
@class CCLabelAtlas;
|
55
|
+
@class CCScene;
|
56
|
+
@class CCScheduler;
|
57
|
+
@class CCActionManager;
|
58
|
+
|
59
|
+
|
60
|
+
#ifdef __CC_PLATFORM_IOS
|
61
|
+
#define CC_VIEWCONTROLLER UIViewController
|
62
|
+
#elif defined(__CC_PLATFORM_MAC)
|
63
|
+
#define CC_VIEWCONTROLLER NSObject
|
64
|
+
#endif
|
65
|
+
|
66
|
+
/**Class that creates and handle the main Window and manages how
|
67
|
+
and when to execute the Scenes.
|
68
|
+
|
69
|
+
The CCDirector is also responsible for:
|
70
|
+
- initializing the OpenGL ES context
|
71
|
+
- setting the OpenGL pixel format (default on is RGB565)
|
72
|
+
- setting the OpenGL buffer depth (default one is 0-bit)
|
73
|
+
- setting the projection (default one is 3D)
|
74
|
+
|
75
|
+
Since the CCDirector is a singleton, the standard way to use it is by calling:
|
76
|
+
- [[CCDirector sharedDirector] methodName];
|
77
|
+
|
78
|
+
The CCDirector also sets the default OpenGL context:
|
79
|
+
- GL_TEXTURE_2D is enabled
|
80
|
+
- GL_VERTEX_ARRAY is enabled
|
81
|
+
- GL_COLOR_ARRAY is enabled
|
82
|
+
- GL_TEXTURE_COORD_ARRAY is enabled
|
83
|
+
*/
|
84
|
+
@interface CCDirector : CC_VIEWCONTROLLER
|
85
|
+
{
|
86
|
+
// internal timer
|
87
|
+
NSTimeInterval _animationInterval;
|
88
|
+
NSTimeInterval _oldAnimationInterval;
|
89
|
+
|
90
|
+
/* stats */
|
91
|
+
BOOL _displayStats;
|
92
|
+
|
93
|
+
NSUInteger _frames;
|
94
|
+
NSUInteger _totalFrames;
|
95
|
+
ccTime _secondsPerFrame;
|
96
|
+
|
97
|
+
ccTime _accumDt;
|
98
|
+
ccTime _frameRate;
|
99
|
+
CCLabelAtlas *_FPSLabel;
|
100
|
+
CCLabelAtlas *_SPFLabel;
|
101
|
+
CCLabelAtlas *_drawsLabel;
|
102
|
+
|
103
|
+
/* is the running scene paused */
|
104
|
+
BOOL _isPaused;
|
105
|
+
|
106
|
+
/* Is the director running */
|
107
|
+
BOOL _isAnimating;
|
108
|
+
|
109
|
+
/* The running scene */
|
110
|
+
CCScene *_runningScene;
|
111
|
+
|
112
|
+
/* This object will be visited after the scene. Useful to hook a notification node */
|
113
|
+
id _notificationNode;
|
114
|
+
|
115
|
+
/* will be the next 'runningScene' in the next frame
|
116
|
+
nextScene is a weak reference. */
|
117
|
+
CCScene *_nextScene;
|
118
|
+
|
119
|
+
/* If YES, then "old" scene will receive the cleanup message */
|
120
|
+
BOOL _sendCleanupToScene;
|
121
|
+
|
122
|
+
/* scheduled scenes */
|
123
|
+
NSMutableArray *_scenesStack;
|
124
|
+
|
125
|
+
/* last time the main loop was updated */
|
126
|
+
struct timeval _lastUpdate;
|
127
|
+
/* delta time since last tick to main loop */
|
128
|
+
ccTime _dt;
|
129
|
+
/* whether or not the next delta time will be zero */
|
130
|
+
BOOL _nextDeltaTimeZero;
|
131
|
+
|
132
|
+
/* projection used */
|
133
|
+
ccDirectorProjection _projection;
|
134
|
+
|
135
|
+
/* CCDirector delegate */
|
136
|
+
id<CCDirectorDelegate> _delegate;
|
137
|
+
|
138
|
+
/* window size in points */
|
139
|
+
CGSize _winSizeInPoints;
|
140
|
+
|
141
|
+
/* window size in pixels */
|
142
|
+
CGSize _winSizeInPixels;
|
143
|
+
|
144
|
+
/* the cocos2d running thread */
|
145
|
+
NSThread *_runningThread;
|
146
|
+
|
147
|
+
/* scheduler associated with this director */
|
148
|
+
CCScheduler *_scheduler;
|
149
|
+
|
150
|
+
/* action manager associated with this director */
|
151
|
+
CCActionManager *_actionManager;
|
152
|
+
|
153
|
+
/* OpenGLView. On iOS it is a copy of self.view */
|
154
|
+
CCGLView *__view;
|
155
|
+
}
|
156
|
+
|
157
|
+
/** returns the cocos2d thread.
|
158
|
+
If you want to run any cocos2d task, run it in this thread.
|
159
|
+
On iOS usually it is the main thread.
|
160
|
+
@since v0.99.5
|
161
|
+
*/
|
162
|
+
@property (readonly, nonatomic ) NSThread *runningThread;
|
163
|
+
/** The current running Scene. Director can only run one Scene at the time */
|
164
|
+
@property (nonatomic,readonly) CCScene* runningScene;
|
165
|
+
/** The FPS value */
|
166
|
+
@property (nonatomic,readwrite, assign) NSTimeInterval animationInterval;
|
167
|
+
/** Whether or not to display director statistics */
|
168
|
+
@property (nonatomic, readwrite, assign) BOOL displayStats;
|
169
|
+
/** whether or not the next delta time will be zero */
|
170
|
+
@property (nonatomic,readwrite,assign) BOOL nextDeltaTimeZero;
|
171
|
+
/** Whether or not the Director is paused */
|
172
|
+
@property (nonatomic,readonly,getter=isPaused) BOOL paused;
|
173
|
+
/** Whether or not the Director is active (animating) */
|
174
|
+
@property (nonatomic,readonly) BOOL isAnimating;
|
175
|
+
/** Sets an OpenGL projection */
|
176
|
+
@property (nonatomic,readwrite) ccDirectorProjection projection;
|
177
|
+
/** How many frames were called since the director started */
|
178
|
+
@property (nonatomic,readonly) NSUInteger totalFrames;
|
179
|
+
/** seconds per frame */
|
180
|
+
@property (nonatomic, readonly) ccTime secondsPerFrame;
|
181
|
+
|
182
|
+
/** Whether or not the replaced scene will receive the cleanup message.
|
183
|
+
If the new scene is pushed, then the old scene won't receive the "cleanup" message.
|
184
|
+
If the new scene replaces the old one, the it will receive the "cleanup" message.
|
185
|
+
@since v0.99.0
|
186
|
+
*/
|
187
|
+
@property (nonatomic, readonly) BOOL sendCleanupToScene;
|
188
|
+
|
189
|
+
/** This object will be visited after the main scene is visited.
|
190
|
+
This object MUST implement the "visit" selector.
|
191
|
+
Useful to hook a notification object, like CCNotifications (http://github.com/manucorporat/CCNotifications)
|
192
|
+
@since v0.99.5
|
193
|
+
*/
|
194
|
+
@property (nonatomic, readwrite, retain) id notificationNode;
|
195
|
+
|
196
|
+
/** CCDirector delegate. It shall implement the CCDirectorDelegate protocol
|
197
|
+
@since v0.99.5
|
198
|
+
*/
|
199
|
+
@property (nonatomic, readwrite, assign) id<CCDirectorDelegate> delegate;
|
200
|
+
|
201
|
+
/** CCScheduler associated with this director
|
202
|
+
@since v2.0
|
203
|
+
*/
|
204
|
+
@property (nonatomic,readwrite,retain) CCScheduler *scheduler;
|
205
|
+
|
206
|
+
/** CCActionManager associated with this director
|
207
|
+
@since v2.0
|
208
|
+
*/
|
209
|
+
@property (nonatomic,readwrite,retain) CCActionManager *actionManager;
|
210
|
+
|
211
|
+
/** returns a shared instance of the director */
|
212
|
+
+(CCDirector*)sharedDirector;
|
213
|
+
|
214
|
+
|
215
|
+
#pragma mark Director - Stats
|
216
|
+
|
217
|
+
#pragma mark Director - Win Size
|
218
|
+
/** returns the size of the OpenGL view in points */
|
219
|
+
- (CGSize) winSize;
|
220
|
+
|
221
|
+
/** returns the size of the OpenGL view in pixels.
|
222
|
+
On Mac winSize and winSizeInPixels return the same value.
|
223
|
+
*/
|
224
|
+
- (CGSize) winSizeInPixels;
|
225
|
+
|
226
|
+
/** changes the projection size */
|
227
|
+
-(void) reshapeProjection:(CGSize)newWindowSize;
|
228
|
+
|
229
|
+
/** Sets the glViewport*/
|
230
|
+
-(void) setViewport;
|
231
|
+
|
232
|
+
/** converts a UIKit coordinate to an OpenGL coordinate
|
233
|
+
Useful to convert (multi) touch coordinates to the current layout (portrait or landscape)
|
234
|
+
*/
|
235
|
+
-(CGPoint) convertToGL: (CGPoint) p;
|
236
|
+
/** converts an OpenGL coordinate to a UIKit coordinate
|
237
|
+
Useful to convert node points to window points for calls such as glScissor
|
238
|
+
*/
|
239
|
+
-(CGPoint) convertToUI:(CGPoint)p;
|
240
|
+
|
241
|
+
/// XXX: missing description
|
242
|
+
-(float) getZEye;
|
243
|
+
|
244
|
+
#pragma mark Director - Scene Management
|
245
|
+
|
246
|
+
/** Enters the Director's main loop with the given Scene.
|
247
|
+
* Call it to run only your FIRST scene.
|
248
|
+
* Don't call it if there is already a running scene.
|
249
|
+
*
|
250
|
+
* It will call pushScene: and then it will call startAnimation
|
251
|
+
*/
|
252
|
+
- (void) runWithScene:(CCScene*) scene;
|
253
|
+
|
254
|
+
/** Suspends the execution of the running scene, pushing it on the stack of suspended scenes.
|
255
|
+
* The new scene will be executed.
|
256
|
+
* Try to avoid big stacks of pushed scenes to reduce memory allocation.
|
257
|
+
* ONLY call it if there is a running scene.
|
258
|
+
*/
|
259
|
+
- (void) pushScene:(CCScene*) scene;
|
260
|
+
|
261
|
+
/** Pops out a scene from the queue.
|
262
|
+
* This scene will replace the running one.
|
263
|
+
* The running scene will be deleted. If there are no more scenes in the stack the execution is terminated.
|
264
|
+
* ONLY call it if there is a running scene.
|
265
|
+
*/
|
266
|
+
- (void) popScene;
|
267
|
+
|
268
|
+
/**Pops out all scenes from the queue until the root scene in the queue.
|
269
|
+
* This scene will replace the running one.
|
270
|
+
* Internally it will call `popToSceneStackLevel:1`
|
271
|
+
*/
|
272
|
+
- (void) popToRootScene;
|
273
|
+
|
274
|
+
/** Pops out all scenes from the queue until it reaches `level`.
|
275
|
+
If level is 0, it will end the director.
|
276
|
+
If level is 1, it will pop all scenes until it reaches to root scene.
|
277
|
+
If level is <= than the current stack level, it won't do anything.
|
278
|
+
*/
|
279
|
+
-(void) popToSceneStackLevel:(NSUInteger)level;
|
280
|
+
|
281
|
+
/** Replaces the running scene with a new one. The running scene is terminated.
|
282
|
+
* ONLY call it if there is a running scene.
|
283
|
+
*/
|
284
|
+
-(void) replaceScene: (CCScene*) scene;
|
285
|
+
|
286
|
+
/** Ends the execution, releases the running scene.
|
287
|
+
It doesn't remove the OpenGL view from its parent. You have to do it manually.
|
288
|
+
*/
|
289
|
+
-(void) end;
|
290
|
+
|
291
|
+
/** Pauses the running scene.
|
292
|
+
The running scene will be _drawed_ but all scheduled timers will be paused
|
293
|
+
While paused, the draw rate will be 4 FPS to reduce CPU consumption
|
294
|
+
*/
|
295
|
+
-(void) pause;
|
296
|
+
|
297
|
+
/** Resumes the paused scene
|
298
|
+
The scheduled timers will be activated again.
|
299
|
+
The "delta time" will be 0 (as if the game wasn't paused)
|
300
|
+
*/
|
301
|
+
-(void) resume;
|
302
|
+
|
303
|
+
/** Stops the animation. Nothing will be drawn. The main loop won't be triggered anymore.
|
304
|
+
If you want to pause your animation call [pause] instead.
|
305
|
+
*/
|
306
|
+
-(void) stopAnimation;
|
307
|
+
|
308
|
+
/** The main loop is triggered again.
|
309
|
+
Call this function only if [stopAnimation] was called earlier
|
310
|
+
@warning Don't call this function to start the main loop. To run the main loop call runWithScene
|
311
|
+
*/
|
312
|
+
-(void) startAnimation;
|
313
|
+
|
314
|
+
/** Draw the scene.
|
315
|
+
This method is called every frame. Don't call it manually.
|
316
|
+
*/
|
317
|
+
-(void) drawScene;
|
318
|
+
|
319
|
+
|
320
|
+
// XXX: Hack. Should be placed on CCDirectorMac.h. Refactoring needed
|
321
|
+
#if defined(__CC_PLATFORM_MAC)
|
322
|
+
/** sets the openGL view */
|
323
|
+
-(void) setView:(CCGLView*)view;
|
324
|
+
|
325
|
+
/** returns the OpenGL view */
|
326
|
+
-(CCGLView*) view;
|
327
|
+
#endif
|
328
|
+
|
329
|
+
#pragma mark Director - Memory Helper
|
330
|
+
|
331
|
+
/** Removes all the cocos2d data that was cached automatically.
|
332
|
+
It will purge the CCTextureCache, CCLabelBMFont cache.
|
333
|
+
IMPORTANT: The CCSpriteFrameCache won't be purged. If you want to purge it, you have to purge it manually.
|
334
|
+
@since v0.99.3
|
335
|
+
*/
|
336
|
+
-(void) purgeCachedData;
|
337
|
+
|
338
|
+
// OpenGL Helper
|
339
|
+
|
340
|
+
/** sets the OpenGL default values */
|
341
|
+
-(void) setGLDefaultValues;
|
342
|
+
/** enables/disables OpenGL alpha blending */
|
343
|
+
- (void) setAlphaBlending: (BOOL) on;
|
344
|
+
/** enables/disables OpenGL depth test */
|
345
|
+
- (void) setDepthTest: (BOOL) on;
|
346
|
+
|
347
|
+
// helper
|
348
|
+
/** creates the Stats labels */
|
349
|
+
-(void) createStatsLabel;
|
350
|
+
@end
|
351
|
+
|
352
|
+
// optimization. Should only be used to read it. Never to write it.
|
353
|
+
extern NSUInteger __ccNumberOfDraws;
|