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
@@ -28,29 +28,75 @@
|
|
28
28
|
cocos2d (cc) configuration file
|
29
29
|
*/
|
30
30
|
|
31
|
+
/** @def CC_ENABLE_CHIPMUNK_INTEGRATION
|
32
|
+
If enabled, it will include CCPhysicsScript and CCPhysicsDebugNode with Chipmunk Physics support.
|
33
|
+
If you enable it, make sure that Chipmunk is in the search path.
|
34
|
+
Disabled by default
|
35
|
+
|
36
|
+
@since v2.1
|
37
|
+
*/
|
38
|
+
#ifndef CC_ENABLE_CHIPMUNK_INTEGRATION
|
39
|
+
#define CC_ENABLE_CHIPMUNK_INTEGRATION 0
|
40
|
+
#endif
|
41
|
+
|
42
|
+
/** @def CC_CHIPMUNK_IMPORT
|
43
|
+
Which file to import if using Chipmunk.
|
44
|
+
Change it to "ObjectiveChipmunk.h" or define it as a preprocessor macro if you are using ObjectiveChipmunk.
|
45
|
+
@since v2.1
|
46
|
+
*/
|
47
|
+
#if CC_ENABLE_CHIPMUNK_INTEGRATION && !defined(CC_CHIPMUNK_IMPORT)
|
48
|
+
#define CC_CHIPMUNK_IMPORT "chipmunk.h"
|
49
|
+
#endif
|
50
|
+
|
51
|
+
/** @def CC_ENABLE_BOX2D_INTEGRATION
|
52
|
+
If enabled, it will include CCPhysicsScript with Box2D Physics support.
|
53
|
+
If you enable it, make sure that Box2D is in the search path.
|
54
|
+
|
55
|
+
Disabled by default
|
56
|
+
|
57
|
+
@since v2.1
|
58
|
+
*/
|
59
|
+
#ifndef CC_ENABLE_BOX2D_INTEGRATION
|
60
|
+
#define CC_ENABLE_BOX2D_INTEGRATION 0
|
61
|
+
#endif
|
62
|
+
|
63
|
+
/** @def CC_ENABLE_STACKABLE_ACTIONS
|
64
|
+
If enabled, actions that alter the position property (eg: CCMoveBy, CCJumpBy, CCBezierBy, etc..) will be stacked.
|
65
|
+
If you run 2 or more 'position' actions at the same time on a node, then end position will be the sum of all the positions.
|
66
|
+
If disabled, only the last run action will take effect.
|
67
|
+
|
68
|
+
Enabled by default. Disable to be compatible with v2.0 and older versions.
|
69
|
+
|
70
|
+
@since v2.1
|
71
|
+
*/
|
72
|
+
#ifndef CC_ENABLE_STACKABLE_ACTIONS
|
73
|
+
#define CC_ENABLE_STACKABLE_ACTIONS 1
|
74
|
+
#endif
|
75
|
+
|
76
|
+
|
31
77
|
/** @def CC_ENABLE_GL_STATE_CACHE
|
32
78
|
If enabled, cocos2d will maintain an OpenGL state cache internally to avoid unnecessary switches.
|
33
|
-
In order to use them, you have to use the following functions,
|
79
|
+
In order to use them, you have to use the following functions, instead of the the GL ones:
|
34
80
|
- ccGLUseProgram() instead of glUseProgram()
|
35
81
|
- ccGLDeleteProgram() instead of glDeleteProgram()
|
36
82
|
- ccGLBlendFunc() instead of glBlendFunc()
|
37
83
|
|
38
84
|
If this functionality is disabled, then ccGLUseProgram(), ccGLDeleteProgram(), ccGLBlendFunc() will call the GL ones, without using the cache.
|
39
85
|
|
40
|
-
It is
|
86
|
+
It is recommended to enable it whenever possible to improve speed.
|
41
87
|
If you are migrating your code from GL ES 1.1, then keep it disabled. Once all your code works as expected, turn it on.
|
42
88
|
|
43
|
-
Default value:
|
89
|
+
Default value: Enabled by default
|
44
90
|
|
45
91
|
@since v2.0.0
|
46
92
|
*/
|
47
93
|
#ifndef CC_ENABLE_GL_STATE_CACHE
|
48
|
-
#define CC_ENABLE_GL_STATE_CACHE
|
94
|
+
#define CC_ENABLE_GL_STATE_CACHE 1
|
49
95
|
#endif
|
50
96
|
|
51
97
|
/** @def CC_ENABLE_DEPRECATED
|
52
98
|
If enabled, cocos2d will compile all deprecated methods, classes and free functions. Also, renamed constants will be active as well.
|
53
|
-
Enable it only when migrating a v1.0 or earlier v2.0 versions to the most recent
|
99
|
+
Enable it only when migrating a v1.0 or earlier v2.0 versions to the most recent cocos2d version.
|
54
100
|
|
55
101
|
Default value: Enabled by default
|
56
102
|
|
@@ -108,7 +154,7 @@
|
|
108
154
|
/** @def CC_DIRECTOR_IOS_USE_BACKGROUND_THREAD
|
109
155
|
If enabled, cocos2d-ios will run on a background thread. If disabled cocos2d-ios will run the main thread.
|
110
156
|
|
111
|
-
To enable set it to a 1, to disable it set to 0.
|
157
|
+
To enable set it to a 1, to disable it set to 0. Disabled by default.
|
112
158
|
|
113
159
|
Only valid for cocos2d-ios. Not supported on cocos2d-mac.
|
114
160
|
|
@@ -200,7 +246,7 @@
|
|
200
246
|
|
201
247
|
/** @def CC_SPRITE_DEBUG_DRAW
|
202
248
|
If enabled, all subclasses of CCSprite will draw a bounding box.
|
203
|
-
Useful for debugging purposes only. It is
|
249
|
+
Useful for debugging purposes only. It is recommended to leave it disabled.
|
204
250
|
|
205
251
|
If the CCSprite is being drawn by a CCSpriteBatchNode, the bounding box might be a bit different.
|
206
252
|
To enable set it to a value different than 0. Disabled by default:
|
@@ -215,7 +261,7 @@
|
|
215
261
|
|
216
262
|
/** @def CC_LABELBMFONT_DEBUG_DRAW
|
217
263
|
If enabled, all subclasses of CCLabelBMFont will draw a bounding box
|
218
|
-
Useful for debugging purposes only. It is
|
264
|
+
Useful for debugging purposes only. It is recommended to leave it disabled.
|
219
265
|
|
220
266
|
To enable set it to a value different than 0. Disabled by default.
|
221
267
|
*/
|
@@ -225,7 +271,7 @@
|
|
225
271
|
|
226
272
|
/** @def CC_LABELATLAS_DEBUG_DRAW
|
227
273
|
If enabled, all subclasses of CCLabeltAtlas will draw a bounding box
|
228
|
-
Useful for debugging purposes only. It is
|
274
|
+
Useful for debugging purposes only. It is recommended to leave it disabled.
|
229
275
|
|
230
276
|
To enable set it to a value different than 0. Disabled by default.
|
231
277
|
*/
|
@@ -243,3 +289,4 @@
|
|
243
289
|
#ifndef CC_ENABLE_PROFILERS
|
244
290
|
#define CC_ENABLE_PROFILERS 0
|
245
291
|
#endif
|
292
|
+
|
@@ -44,6 +44,8 @@
|
|
44
44
|
#import "Platforms/Mac/CCDirectorMac.h"
|
45
45
|
#import "Platforms/iOS/CCTouchDispatcher.h"
|
46
46
|
#import "Platforms/iOS/CCDirectorIOS.h"
|
47
|
+
#import "CCActionTiledGrid.h"
|
48
|
+
#import "CCActionGrid3D.h"
|
47
49
|
|
48
50
|
|
49
51
|
/*
|
@@ -57,6 +59,9 @@
|
|
57
59
|
// CCLOGERROR is no longer supported.
|
58
60
|
#define CCLOGERROR CCLOGWARN
|
59
61
|
|
62
|
+
#define ccGridSize CGSize
|
63
|
+
#define ccg CGSizeMake
|
64
|
+
|
60
65
|
// ccTypes.h
|
61
66
|
enum {
|
62
67
|
#ifdef __CC_PLATFORM_IOS
|
@@ -107,9 +112,18 @@ DEPRECATED_ATTRIBUTE @interface MacView : CCGLView
|
|
107
112
|
#define GLProgram CCGLProgram
|
108
113
|
|
109
114
|
// Extensions
|
115
|
+
|
110
116
|
@interface CCScheduler (Deprecated)
|
111
117
|
// new: [director scheduler]
|
112
118
|
+(CCScheduler*) sharedScheduler DEPRECATED_ATTRIBUTE;
|
119
|
+
// new: -(void) scheduleSelector:(SEL)selector forTarget:(id)target interval:(ccTime)interval repeat: (uint) repeat delay: (ccTime) delay paused:(BOOL)paused;
|
120
|
+
-(void) scheduleSelector:(SEL)selector forTarget:(id)target interval:(ccTime)interval paused:(BOOL)paused repeat:(uint)repeat delay:(ccTime)delay DEPRECATED_ATTRIBUTE;
|
121
|
+
// new: unscheduleAllForTarget
|
122
|
+
-(void) unscheduleAllSelectorsForTarget:(id)target DEPRECATED_ATTRIBUTE;
|
123
|
+
// new: unscheduleAll
|
124
|
+
-(void) unscheduleAllSelectors DEPRECATED_ATTRIBUTE;
|
125
|
+
// new: unscheduleAllWithMinPriority:
|
126
|
+
-(void) unscheduleAllSelectorsWithMinPriority:(NSInteger)minPriority DEPRECATED_ATTRIBUTE;
|
113
127
|
@end
|
114
128
|
|
115
129
|
@interface CCActionManager (Deprecated)
|
@@ -130,6 +144,8 @@ DEPRECATED_ATTRIBUTE @interface MacView : CCGLView
|
|
130
144
|
#endif // __CC_PLATFORM_MAC
|
131
145
|
|
132
146
|
@interface CCDirector (Deprecated)
|
147
|
+
// new: [director isPaused]
|
148
|
+
-(BOOL) getIsPaused DEPRECATED_ATTRIBUTE;
|
133
149
|
// new: setView:
|
134
150
|
-(void) setOpenGLView:(CCGLView*)view DEPRECATED_ATTRIBUTE;
|
135
151
|
// new: view
|
@@ -143,6 +159,26 @@ DEPRECATED_ATTRIBUTE @interface MacView : CCGLView
|
|
143
159
|
-(BOOL) isRelativeAnchorPoint DEPRECATED_ATTRIBUTE;
|
144
160
|
@end
|
145
161
|
|
162
|
+
@interface CCLayer (Deprecated)
|
163
|
+
#if __CC_PLATFORM_IOS
|
164
|
+
// new: setTouchEnabled:
|
165
|
+
-(void) setIsTouchEnabled:(BOOL)enabled DEPRECATED_ATTRIBUTE;
|
166
|
+
// new: setAccelerometerEnabled:
|
167
|
+
-(void) setIsAccelerometerEnabled:(BOOL)enabled DEPRECATED_ATTRIBUTE;
|
168
|
+
#elif __CC_PLATFORM_MAC
|
169
|
+
-(void) setIsTouchEnabled:(BOOL)enabled DEPRECATED_ATTRIBUTE;
|
170
|
+
-(void) setIsKeyboardEnabled:(BOOL)enabled DEPRECATED_ATTRIBUTE;
|
171
|
+
-(void) setIsMouseEnabled:(BOOL)enabled DEPRECATED_ATTRIBUTE;
|
172
|
+
// new: setMouseEnabled:priority:
|
173
|
+
-(NSInteger) mouseDelegatePriority DEPRECATED_ATTRIBUTE;
|
174
|
+
// new: setKeyboardEnabled:priority:
|
175
|
+
-(NSInteger) keyboardDelegatePriority DEPRECATED_ATTRIBUTE;
|
176
|
+
// new: setTouchEnabled:priority:
|
177
|
+
-(NSInteger) touchDelegatePriority DEPRECATED_ATTRIBUTE;
|
178
|
+
#endif // __CC_PLATFORM_MAC
|
179
|
+
@end
|
180
|
+
|
181
|
+
|
146
182
|
@interface CCSprite (Deprecated)
|
147
183
|
// new: spriteWithTexture:rect:
|
148
184
|
+(id) spriteWithBatchNode:(CCSpriteBatchNode*)node rect:(CGRect)rect DEPRECATED_ATTRIBUTE;
|
@@ -152,6 +188,12 @@ DEPRECATED_ATTRIBUTE @interface MacView : CCGLView
|
|
152
188
|
-(CCSpriteFrame*) displayedFrame DEPRECATED_ATTRIBUTE;
|
153
189
|
@end
|
154
190
|
|
191
|
+
@interface CCMenuItem (Deprecated)
|
192
|
+
// new: -(CGRect) activeArea;
|
193
|
+
-(CGRect) rect DEPRECATED_ATTRIBUTE;
|
194
|
+
-(void) setRect:(CGRect)rect DEPRECATED_ATTRIBUTE;
|
195
|
+
@end
|
196
|
+
|
155
197
|
@interface CCMenuItemAtlasFont (Deprecated)
|
156
198
|
// new itemWithStirng:charmapFile:itemWidth:itemHeight:startCharMap
|
157
199
|
+(id) itemFromString: (NSString*) value charMapFile:(NSString*) charMapFile itemWidth:(int)itemWidth itemHeight:(int)itemHeight startCharMap:(char)startCharMap DEPRECATED_ATTRIBUTE;
|
@@ -285,6 +327,12 @@ DEPRECATED_ATTRIBUTE @interface MacView : CCGLView
|
|
285
327
|
+ (id) labelWithString:(NSString*)string dimensions:(CGSize)dimensions alignment:(CCTextAlignment)alignment fontName:(NSString*)name fontSize:(CGFloat)size DEPRECATED_ATTRIBUTE;
|
286
328
|
// new: + (id) labelWithString:(NSString*)string dimensions:hAlignment:lineBreakMode:fontName:fontSize:
|
287
329
|
+ (id) labelWithString:(NSString*)string dimensions:(CGSize)dimensions alignment:(CCTextAlignment)alignment lineBreakMode:(CCLineBreakMode)lineBreakMode fontName:(NSString*)name fontSize:(CGFloat)size DEPRECATED_ATTRIBUTE;
|
330
|
+
|
331
|
+
+ (id) labelWithString:(NSString*)string dimensions:(CGSize)dimensions hAlignment:(CCTextAlignment)alignment fontName:(NSString*)name fontSize:(CGFloat)size DEPRECATED_ATTRIBUTE;
|
332
|
+
+ (id) labelWithString:(NSString*)string dimensions:(CGSize)dimensions hAlignment:(CCTextAlignment)alignment lineBreakMode:(CCLineBreakMode)lineBreakMode fontName:(NSString*)name fontSize:(CGFloat)size DEPRECATED_ATTRIBUTE;
|
333
|
+
+ (id) labelWithString:(NSString*)string dimensions:(CGSize)dimensions hAlignment:(CCTextAlignment)alignment vAlignment:(CCVerticalTextAlignment)vertAlignment lineBreakMode:(CCLineBreakMode)lineBreakMode fontName:(NSString*)name fontSize:(CGFloat)size DEPRECATED_ATTRIBUTE;
|
334
|
+
+ (id) labelWithString:(NSString*)string dimensions:(CGSize)dimensions hAlignment:(CCTextAlignment)alignment vAlignment:(CCVerticalTextAlignment)vertAlignment fontName:(NSString*)name fontSize:(CGFloat)size DEPRECATED_ATTRIBUTE;
|
335
|
+
|
288
336
|
// new: + (id) initWithString:(NSString*)string dimensions:hAlignment:fontName:fontSize:
|
289
337
|
- (id) initWithString:(NSString*)string dimensions:(CGSize)dimensions alignment:(CCTextAlignment)alignment fontName:(NSString*)name fontSize:(CGFloat)size DEPRECATED_ATTRIBUTE;
|
290
338
|
// new: + (id) initWithString:(NSString*)string dimensions:hAlignment:lineBreakMode:fontName:fontSize:
|
@@ -296,5 +344,88 @@ DEPRECATED_ATTRIBUTE @interface MacView : CCGLView
|
|
296
344
|
- (id) initWithString:(NSString*)string dimensions:(CGSize)dimensions alignment:(CCTextAlignment)alignment fontName:(NSString*)name fontSize:(CGFloat)size DEPRECATED_ATTRIBUTE;
|
297
345
|
@end
|
298
346
|
|
347
|
+
// Effects
|
348
|
+
#pragma mark - Effects
|
349
|
+
|
350
|
+
@interface CCGridAction (Deprecated)
|
351
|
+
+(id) actionWithSize:(CGSize)size duration:(ccTime)d DEPRECATED_ATTRIBUTE;
|
352
|
+
-(id) initWithSize:(CGSize)gridSize duration:(ccTime)d DEPRECATED_ATTRIBUTE;
|
353
|
+
@end
|
354
|
+
|
355
|
+
@interface CCWaves3D (Deprecated)
|
356
|
+
+(id)actionWithWaves:(int)wav amplitude:(float)amp grid:(CGSize)gridSize duration:(ccTime)d DEPRECATED_ATTRIBUTE;
|
357
|
+
-(id)initWithWaves:(int)wav amplitude:(float)amp grid:(CGSize)gridSize duration:(ccTime)d DEPRECATED_ATTRIBUTE;
|
358
|
+
@end
|
359
|
+
|
360
|
+
@interface CCLens3D (Deprecated)
|
361
|
+
+(id)actionWithPosition:(CGPoint)pos radius:(float)r grid:(CGSize)gridSize duration:(ccTime)d DEPRECATED_ATTRIBUTE;
|
362
|
+
-(id)initWithPosition:(CGPoint)pos radius:(float)r grid:(CGSize)gridSize duration:(ccTime)d DEPRECATED_ATTRIBUTE;
|
363
|
+
@end
|
364
|
+
|
365
|
+
@interface CCRipple3D (Deprecated)
|
366
|
+
+(id)actionWithPosition:(CGPoint)pos radius:(float)r waves:(int)wav amplitude:(float)amp grid:(CGSize)gridSize duration:(ccTime)d DEPRECATED_ATTRIBUTE;
|
367
|
+
-(id)initWithPosition:(CGPoint)pos radius:(float)r waves:(int)wav amplitude:(float)amp grid:(CGSize)gridSize duration:(ccTime)d DEPRECATED_ATTRIBUTE;
|
368
|
+
@end
|
369
|
+
|
370
|
+
@interface CCShaky3D (Deprecated)
|
371
|
+
+(id)actionWithRange:(int)range shakeZ:(BOOL)shakeZ grid:(CGSize)gridSize duration:(ccTime)d DEPRECATED_ATTRIBUTE;
|
372
|
+
-(id)initWithRange:(int)range shakeZ:(BOOL)shakeZ grid:(CGSize)gridSize duration:(ccTime)d DEPRECATED_ATTRIBUTE;
|
373
|
+
@end
|
374
|
+
|
375
|
+
@interface CCLiquid (Deprecated)
|
376
|
+
+(id)actionWithWaves:(int)wav amplitude:(float)amp grid:(CGSize)gridSize duration:(ccTime)d DEPRECATED_ATTRIBUTE;
|
377
|
+
-(id)initWithWaves:(int)wav amplitude:(float)amp grid:(CGSize)gridSize duration:(ccTime)d DEPRECATED_ATTRIBUTE;
|
378
|
+
@end
|
379
|
+
|
380
|
+
@interface CCWaves (Deprecated)
|
381
|
+
+(id)actionWithWaves:(int)wav amplitude:(float)amp horizontal:(BOOL)h vertical:(BOOL)v grid:(CGSize)gridSize duration:(ccTime)d DEPRECATED_ATTRIBUTE;
|
382
|
+
-(id)initWithWaves:(int)wav amplitude:(float)amp horizontal:(BOOL)h vertical:(BOOL)v grid:(CGSize)gridSize duration:(ccTime)d DEPRECATED_ATTRIBUTE;
|
383
|
+
@end
|
384
|
+
|
385
|
+
@interface CCTwirl (Deprecated)
|
386
|
+
+(id)actionWithPosition:(CGPoint)pos twirls:(int)t amplitude:(float)amp grid:(CGSize)gridSize duration:(ccTime)d DEPRECATED_ATTRIBUTE;
|
387
|
+
-(id)initWithPosition:(CGPoint)pos twirls:(int)t amplitude:(float)amp grid:(CGSize)gridSize duration:(ccTime)d DEPRECATED_ATTRIBUTE;
|
388
|
+
@end
|
389
|
+
|
390
|
+
@interface CCShakyTiles3D (Deprecated)
|
391
|
+
+(id)actionWithRange:(int)range shakeZ:(BOOL)shakeZ grid:(CGSize)gridSize duration:(ccTime)d DEPRECATED_ATTRIBUTE;
|
392
|
+
-(id)initWithRange:(int)range shakeZ:(BOOL)shakeZ grid:(CGSize)gridSize duration:(ccTime)d DEPRECATED_ATTRIBUTE;
|
393
|
+
@end
|
394
|
+
|
395
|
+
@interface CCShatteredTiles3D (Deprecated)
|
396
|
+
+(id)actionWithRange:(int)range shatterZ:(BOOL)shatterZ grid:(CGSize)gridSize duration:(ccTime)d DEPRECATED_ATTRIBUTE;
|
397
|
+
-(id)initWithRange:(int)range shatterZ:(BOOL)shatterZ grid:(CGSize)gridSize duration:(ccTime)d DEPRECATED_ATTRIBUTE;
|
398
|
+
@end
|
399
|
+
|
400
|
+
@interface CCShuffleTiles (Deprecated)
|
401
|
+
+(id)actionWithSeed:(int)s grid:(CGSize)gridSize duration:(ccTime)d DEPRECATED_ATTRIBUTE;
|
402
|
+
-(id)initWithSeed:(int)s grid:(CGSize)gridSize duration:(ccTime)d DEPRECATED_ATTRIBUTE;
|
403
|
+
@end
|
404
|
+
|
405
|
+
@interface CCTurnOffTiles (Deprecated)
|
406
|
+
+(id)actionWithSeed:(int)s grid:(CGSize)gridSize duration:(ccTime)d DEPRECATED_ATTRIBUTE;
|
407
|
+
-(id)initWithSeed:(int)s grid:(CGSize)gridSize duration:(ccTime)d DEPRECATED_ATTRIBUTE;
|
408
|
+
@end
|
409
|
+
|
410
|
+
@interface CCWavesTiles3D (Deprecated)
|
411
|
+
+(id)actionWithWaves:(int)wav amplitude:(float)amp grid:(CGSize)gridSize duration:(ccTime)d DEPRECATED_ATTRIBUTE;
|
412
|
+
-(id)initWithWaves:(int)wav amplitude:(float)amp grid:(CGSize)gridSize duration:(ccTime)d DEPRECATED_ATTRIBUTE;
|
413
|
+
@end
|
414
|
+
|
415
|
+
@interface CCJumpTiles3D (Deprecated)
|
416
|
+
+(id)actionWithJumps:(int)j amplitude:(float)amp grid:(CGSize)gridSize duration:(ccTime)d DEPRECATED_ATTRIBUTE;
|
417
|
+
-(id)initWithJumps:(int)j amplitude:(float)amp grid:(CGSize)gridSize duration:(ccTime)d DEPRECATED_ATTRIBUTE;
|
418
|
+
@end
|
419
|
+
|
420
|
+
@interface CCSplitRows (Deprecated)
|
421
|
+
+(id)actionWithRows:(int)rows duration:(ccTime)duration DEPRECATED_ATTRIBUTE;
|
422
|
+
-(id)initWithRows:(int)rows duration:(ccTime)duration DEPRECATED_ATTRIBUTE;
|
423
|
+
@end
|
424
|
+
|
425
|
+
@interface CCSplitCols (Deprecated)
|
426
|
+
+(id)actionWithCols:(int)cols duration:(ccTime)duration DEPRECATED_ATTRIBUTE;
|
427
|
+
-(id)initWithCols:(int)cols duration:(ccTime)duration DEPRECATED_ATTRIBUTE;
|
428
|
+
@end
|
429
|
+
|
299
430
|
#endif // CC_ENABLE_DEPRECATED
|
300
431
|
|
@@ -0,0 +1,39 @@
|
|
1
|
+
/*
|
2
|
+
* cocos2d for iPhone: http://www.cocos2d-iphone.org
|
3
|
+
*
|
4
|
+
* Copyright (c) 2012 Zynga Inc.
|
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
|
+
extern unsigned char cc_fps_images_png[];
|
26
|
+
extern unsigned char cc_fps_images_hd_png[];
|
27
|
+
extern unsigned char cc_fps_images_ipadhd_png[];
|
28
|
+
|
29
|
+
#ifdef __cplusplus
|
30
|
+
extern "C" {
|
31
|
+
#endif
|
32
|
+
|
33
|
+
unsigned int cc_fps_images_len(void);
|
34
|
+
unsigned int cc_fps_images_hd_len(void);
|
35
|
+
unsigned int cc_fps_images_ipadhd_len(void);
|
36
|
+
|
37
|
+
#ifdef __cplusplus
|
38
|
+
}
|
39
|
+
#endif
|
@@ -32,11 +32,11 @@
|
|
32
32
|
/** vertex attrib flags */
|
33
33
|
enum {
|
34
34
|
kCCVertexAttribFlag_None = 0,
|
35
|
-
|
35
|
+
|
36
36
|
kCCVertexAttribFlag_Position = 1 << 0,
|
37
37
|
kCCVertexAttribFlag_Color = 1 << 1,
|
38
38
|
kCCVertexAttribFlag_TexCoords = 1 << 2,
|
39
|
-
|
39
|
+
|
40
40
|
kCCVertexAttribFlag_PosColorTex = ( kCCVertexAttribFlag_Position | kCCVertexAttribFlag_Color | kCCVertexAttribFlag_TexCoords ),
|
41
41
|
};
|
42
42
|
|
@@ -45,20 +45,21 @@ typedef enum {
|
|
45
45
|
// CC_GL_SCISSOR_TEST = 1 << 0,
|
46
46
|
// CC_GL_STENCIL_TEST = 1 << 1,
|
47
47
|
// CC_GL_DEPTH_TEST = 1 << 2,
|
48
|
-
CC_GL_BLEND = 1 << 3,
|
48
|
+
// CC_GL_BLEND = 1 << 3,
|
49
49
|
// CC_GL_DITHER = 1 << 4,
|
50
50
|
|
51
51
|
// CC_GL_ALL = ( CC_GL_SCISSOR_TEST | CC_GL_STENCIL_TEST | CC_GL_DEPTH_TEST | CC_GL_BLEND | CC_GL_DITHER ),
|
52
|
-
CC_GL_ALL = ( CC_GL_BLEND ),
|
53
|
-
|
52
|
+
// CC_GL_ALL = ( CC_GL_BLEND ),
|
53
|
+
CC_GL_ALL = 0,
|
54
|
+
|
54
55
|
} ccGLServerState;
|
55
56
|
|
56
57
|
#ifdef __cplusplus
|
57
58
|
extern "C" {
|
58
59
|
#endif
|
59
|
-
|
60
|
+
|
60
61
|
/** @file ccGLStateCache.h
|
61
|
-
*/
|
62
|
+
*/
|
62
63
|
|
63
64
|
/** Invalidates the GL state cache.
|
64
65
|
If CC_ENABLE_GL_STATE_CACHE it will reset the GL state cache.
|
@@ -84,6 +85,12 @@ void ccGLDeleteProgram( GLuint program );
|
|
84
85
|
*/
|
85
86
|
void ccGLBlendFunc(GLenum sfactor, GLenum dfactor);
|
86
87
|
|
88
|
+
/** Resets the blending mode back to the cached state in case you used glBlendFuncSeparate() or glBlendEquation().
|
89
|
+
If CC_ENABLE_GL_STATE_CACHE is disabled, it will just set the default blending mode using GL_FUNC_ADD.
|
90
|
+
@since v2.0.0
|
91
|
+
*/
|
92
|
+
void ccGLBlendResetToCache(void);
|
93
|
+
|
87
94
|
/** sets the projection matrix as dirty
|
88
95
|
@since v2.0.0
|
89
96
|
*/
|
@@ -91,48 +98,59 @@ void ccSetProjectionMatrixDirty( void );
|
|
91
98
|
|
92
99
|
/** Will enable the vertex attribs that are passed as flags.
|
93
100
|
Possible flags:
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
101
|
+
|
102
|
+
* kCCVertexAttribFlag_Position
|
103
|
+
* kCCVertexAttribFlag_Color
|
104
|
+
* kCCVertexAttribFlag_TexCoords
|
105
|
+
|
99
106
|
These flags can be ORed. The flags that are not present, will be disabled.
|
100
|
-
|
107
|
+
|
101
108
|
@since v2.0.0
|
102
109
|
*/
|
103
110
|
void ccGLEnableVertexAttribs( unsigned int flags );
|
104
111
|
|
105
|
-
/** If the
|
106
|
-
If CC_ENABLE_GL_STATE_CACHE is disabled
|
107
|
-
@since v2.
|
112
|
+
/** If the texture is not already bound to texture unit 0 and if target is GL_TEXTURE_2D, it binds it.
|
113
|
+
If CC_ENABLE_GL_STATE_CACHE is disabled or if target != GL_TEXTURE_2D it will call glBindTexture() directly.
|
114
|
+
@since v2.1
|
108
115
|
*/
|
109
|
-
void
|
116
|
+
void ccGLBindTexture( GLenum target, GLuint textureId );
|
110
117
|
|
111
|
-
/**
|
112
|
-
If CC_ENABLE_GL_STATE_CACHE is disabled, it will call
|
118
|
+
/** If the texture is not already bound to texture unit 0, it binds it.
|
119
|
+
If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glBindTexture() directly.
|
113
120
|
@since v2.0.0
|
114
121
|
*/
|
115
|
-
|
116
|
-
|
122
|
+
void ccGLBindTexture2D( GLuint textureId );
|
117
123
|
|
118
|
-
/** If the texture is not already bound, it binds it.
|
124
|
+
/** If the texture is not already bound to a given unit, it binds it.
|
119
125
|
If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glBindTexture() directly.
|
120
|
-
@since v2.
|
126
|
+
@since v2.1.0
|
121
127
|
*/
|
122
|
-
void
|
128
|
+
void ccGLBindTexture2DN( GLuint textureUnit, GLuint textureId );
|
123
129
|
|
124
|
-
/** It will delete a given texture. If the texture was bound, it will invalidate the cached.
|
130
|
+
/** It will delete a given texture. If the texture was bound, it will invalidate the cached for texture unit 0.
|
125
131
|
If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glDeleteTextures() directly.
|
126
132
|
@since v2.0.0
|
127
133
|
*/
|
128
134
|
void ccGLDeleteTexture(GLuint textureId);
|
129
135
|
|
136
|
+
/** It will delete a given texture. If the texture was bound, it will invalidate the cached for the given texture unit.
|
137
|
+
If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glDeleteTextures() directly.
|
138
|
+
@since v2.1.0
|
139
|
+
*/
|
140
|
+
void ccGLDeleteTextureN( GLuint textureUnit, GLuint textureId );
|
141
|
+
|
142
|
+
/** If the vertex array is not already bound, it binds it.
|
143
|
+
If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glBindVertexArray() directly.
|
144
|
+
@since v2.0.0
|
145
|
+
*/
|
146
|
+
void ccGLBindVAO(GLuint vaoId);
|
147
|
+
|
130
148
|
/** It will enable / disable the server side GL states.
|
131
149
|
If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glEnable() directly.
|
132
150
|
@since v2.0.0
|
133
151
|
*/
|
134
152
|
void ccGLEnable( ccGLServerState flags );
|
135
|
-
|
153
|
+
|
136
154
|
#ifdef __cplusplus
|
137
155
|
}
|
138
156
|
#endif
|
@@ -47,12 +47,12 @@
|
|
47
47
|
*
|
48
48
|
* if COCOS2D_DEBUG==1 then:
|
49
49
|
* CCLOG() will be enabled
|
50
|
-
*
|
50
|
+
* CCLOGWARN() will be enabled
|
51
51
|
* CCLOGINFO() will be disabled
|
52
52
|
*
|
53
53
|
* if COCOS2D_DEBUG==2 or higher then:
|
54
54
|
* CCLOG() will be enabled
|
55
|
-
*
|
55
|
+
* CCLOGWARN() will be enabled
|
56
56
|
* CCLOGINFO() will be enabled
|
57
57
|
*/
|
58
58
|
|
@@ -110,7 +110,7 @@ simple macro that swaps 2 variables
|
|
110
110
|
*/
|
111
111
|
#define CC_RADIANS_TO_DEGREES(__ANGLE__) ((__ANGLE__) * 57.29577951f) // PI * 180
|
112
112
|
|
113
|
-
#define kCCRepeatForever UINT_MAX -1
|
113
|
+
#define kCCRepeatForever (UINT_MAX -1)
|
114
114
|
/** @def CC_BLEND_SRC
|
115
115
|
default gl blend src function. Compatible with premultiplied alpha images.
|
116
116
|
*/
|
@@ -120,7 +120,7 @@ default gl blend src function. Compatible with premultiplied alpha images.
|
|
120
120
|
/** @def CC_DIRECTOR_INIT
|
121
121
|
- Initializes an CCGLView with 0-bit depth format, and RGB565 render buffer.
|
122
122
|
- The CCGLView view will have multiple touches disabled.
|
123
|
-
- It will create a UIWindow and it will assign it the 'window_' ivar. 'window_' must be declared before calling this
|
123
|
+
- It will create a UIWindow and it will assign it the 'window_' ivar. 'window_' must be declared before calling this macro.
|
124
124
|
- It will create a UINavigationController and it will assign it the 'navigationController_' ivar. 'navController_' must be declared before using this macro.
|
125
125
|
- The director_ will be the root view controller of the navController.
|
126
126
|
- It will connect the CCGLView to the Director
|
@@ -188,10 +188,10 @@ do { \
|
|
188
188
|
*/
|
189
189
|
#define CC_NODE_DRAW_SETUP() \
|
190
190
|
do { \
|
191
|
-
ccGLEnable(
|
192
|
-
NSAssert1(
|
193
|
-
[
|
194
|
-
[
|
191
|
+
ccGLEnable( _glServerState ); \
|
192
|
+
NSAssert1(_shaderProgram, @"No shader program set for node: %@", self); \
|
193
|
+
[_shaderProgram use]; \
|
194
|
+
[_shaderProgram setUniformsForBuiltins]; \
|
195
195
|
} while(0)
|
196
196
|
|
197
197
|
|
@@ -337,7 +337,7 @@ CGSizeMake( (__size_in_points__).width * CC_CONTENT_SCALE_FACTOR(), (__size_in_p
|
|
337
337
|
#define CC_ARC_UNSAFE_RETAINED
|
338
338
|
#endif
|
339
339
|
|
340
|
-
/** @def
|
340
|
+
/** @def CC_INCREMENT_GL_DRAWS
|
341
341
|
Increments the GL Draws counts by one.
|
342
342
|
The number of calls per frame are displayed on the screen when the CCDirector's stats are enabled.
|
343
343
|
*/
|
@@ -0,0 +1,41 @@
|
|
1
|
+
/* Copyright (c) 2012 Scott Lembcke and Howling Moon Software
|
2
|
+
*
|
3
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
* of this software and associated documentation files (the "Software"), to deal
|
5
|
+
* in the Software without restriction, including without limitation the rights
|
6
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
+
* copies of the Software, and to permit persons to whom the Software is
|
8
|
+
* furnished to do so, subject to the following conditions:
|
9
|
+
*
|
10
|
+
* The above copyright notice and this permission notice shall be included in
|
11
|
+
* all copies or substantial portions of the Software.
|
12
|
+
*
|
13
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
19
|
+
* SOFTWARE.
|
20
|
+
*/
|
21
|
+
|
22
|
+
" \n\
|
23
|
+
#extension GL_OES_standard_derivatives : enable \n\
|
24
|
+
\n\
|
25
|
+
#ifdef GL_ES \n\
|
26
|
+
varying mediump vec4 v_color; \n\
|
27
|
+
varying mediump vec2 v_texcoord; \n\
|
28
|
+
#else \n\
|
29
|
+
varying vec4 v_color; \n\
|
30
|
+
varying vec2 v_texcoord; \n\
|
31
|
+
#endif \n\
|
32
|
+
\n\
|
33
|
+
void main() \n\
|
34
|
+
{ \n\
|
35
|
+
#if defined GL_OES_standard_derivatives \n\
|
36
|
+
gl_FragColor = v_color*smoothstep(0.0, length(fwidth(v_texcoord)), 1.0 - length(v_texcoord)); \n\
|
37
|
+
#else \n\
|
38
|
+
gl_FragColor = v_color*step(0.0, 1.0 - length(v_texcoord)); \n\
|
39
|
+
#endif \n\
|
40
|
+
} \n\
|
41
|
+
";
|
@@ -0,0 +1,47 @@
|
|
1
|
+
/* Copyright (c) 2012 Scott Lembcke and Howling Moon Software
|
2
|
+
*
|
3
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
* of this software and associated documentation files (the "Software"), to deal
|
5
|
+
* in the Software without restriction, including without limitation the rights
|
6
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
+
* copies of the Software, and to permit persons to whom the Software is
|
8
|
+
* furnished to do so, subject to the following conditions:
|
9
|
+
*
|
10
|
+
* The above copyright notice and this permission notice shall be included in
|
11
|
+
* all copies or substantial portions of the Software.
|
12
|
+
*
|
13
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
19
|
+
* SOFTWARE.
|
20
|
+
*/
|
21
|
+
|
22
|
+
" \n\
|
23
|
+
#ifdef GL_ES \n\
|
24
|
+
attribute mediump vec4 a_position; \n\
|
25
|
+
attribute mediump vec2 a_texcoord; \n\
|
26
|
+
attribute mediump vec4 a_color; \n\
|
27
|
+
\n\
|
28
|
+
varying mediump vec4 v_color; \n\
|
29
|
+
varying mediump vec2 v_texcoord; \n\
|
30
|
+
\n\
|
31
|
+
#else \n\
|
32
|
+
attribute vec4 a_position; \n\
|
33
|
+
attribute vec2 a_texcoord; \n\
|
34
|
+
attribute vec4 a_color; \n\
|
35
|
+
\n\
|
36
|
+
varying vec4 v_color; \n\
|
37
|
+
varying vec2 v_texcoord; \n\
|
38
|
+
#endif \n\
|
39
|
+
\n\
|
40
|
+
void main() \n\
|
41
|
+
{ \n\
|
42
|
+
v_color = vec4(a_color.rgb * a_color.a, a_color.a); \n\
|
43
|
+
v_texcoord = a_texcoord; \n\
|
44
|
+
\n\
|
45
|
+
gl_Position = CC_MVPMatrix * a_position; \n\
|
46
|
+
} \n\
|
47
|
+
";
|
@@ -0,0 +1,37 @@
|
|
1
|
+
/*
|
2
|
+
* cocos2d for iPhone: http://www.cocos2d-iphone.org
|
3
|
+
*
|
4
|
+
* Copyright (c) 2011 Ricardo Quesada
|
5
|
+
* Copyright (c) 2012 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
|
+
" \n\
|
27
|
+
#ifdef GL_ES \n\
|
28
|
+
precision lowp float; \n\
|
29
|
+
#endif \n\
|
30
|
+
\n\
|
31
|
+
varying vec4 v_fragmentColor; \n\
|
32
|
+
\n\
|
33
|
+
void main() \n\
|
34
|
+
{ \n\
|
35
|
+
gl_FragColor = v_fragmentColor; \n\
|
36
|
+
} \n\
|
37
|
+
";
|