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
@@ -1,188 +0,0 @@
|
|
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 <Foundation/Foundation.h>
|
29
|
-
#import "../ccTypes.h"
|
30
|
-
|
31
|
-
/** Helper class to handle file operations */
|
32
|
-
@interface CCFileUtils : NSObject
|
33
|
-
{
|
34
|
-
NSFileManager *fileManager_;
|
35
|
-
NSBundle *bundle_;
|
36
|
-
NSMutableDictionary *fullPathCache_;
|
37
|
-
NSMutableDictionary *removeSuffixCache_;
|
38
|
-
|
39
|
-
|
40
|
-
#ifdef __CC_PLATFORM_IOS
|
41
|
-
BOOL enableFallbackSuffixes_;
|
42
|
-
|
43
|
-
NSString *iPhoneRetinaDisplaySuffix_;
|
44
|
-
NSString *iPadSuffix_;
|
45
|
-
NSString *iPadRetinaDisplaySuffix_;
|
46
|
-
#endif // __CC_PLATFORM_IOS
|
47
|
-
}
|
48
|
-
|
49
|
-
/** NSBundle used by CCFileUtils. By default it uses [NSBundle mainBundle].
|
50
|
-
@since v2.0
|
51
|
-
*/
|
52
|
-
@property (nonatomic, readwrite, retain) NSBundle *bundle;
|
53
|
-
|
54
|
-
/** NSFileManager used by CCFileUtils. By default it uses its own intance.
|
55
|
-
@since v2.0
|
56
|
-
*/
|
57
|
-
@property (nonatomic, readwrite, retain) NSFileManager *fileManager;
|
58
|
-
|
59
|
-
#ifdef __CC_PLATFORM_IOS
|
60
|
-
/** The iPhone RetinaDisplay suffixes to load resources.
|
61
|
-
By default it is "-hd" and "" in that order.
|
62
|
-
Only valid on iOS. Not valid for OS X.
|
63
|
-
|
64
|
-
@since v1.1
|
65
|
-
*/
|
66
|
-
@property (nonatomic,readwrite, copy, setter = setiPhoneRetinaDisplaySuffix:) NSString *iPhoneRetinaDisplaySuffix;
|
67
|
-
|
68
|
-
/** The iPad suffixes to load resources.
|
69
|
-
By default it is "-ipad", "-hd", "", in that order.
|
70
|
-
Only valid on iOS. Not valid for OS X.
|
71
|
-
|
72
|
-
@since v1.1
|
73
|
-
*/
|
74
|
-
@property (nonatomic,readwrite, copy, setter = setiPadSuffix:) NSString *iPadSuffix;
|
75
|
-
|
76
|
-
|
77
|
-
/** Sets the iPad Retina Display suffixes to load resources.
|
78
|
-
By default it is "-ipadhd", "-ipad", "-hd", "", in that order.
|
79
|
-
Only valid on iOS. Not valid for OS X.
|
80
|
-
|
81
|
-
@since v2.0
|
82
|
-
*/
|
83
|
-
@property (nonatomic,readwrite, copy, setter = setiPadRetinaDisplaySuffix:) NSString *iPadRetinaDisplaySuffix;
|
84
|
-
|
85
|
-
/** Whether of not the fallback sufixes is enabled.
|
86
|
-
When enabled it will try to search for the following suffixes in the following order until one is found:
|
87
|
-
* On iPad HD : iPad HD suffix, iPad suffix, iPhone HD suffix, Without suffix
|
88
|
-
* On iPad : iPad suffix, iPhone HD suffix, Without suffix
|
89
|
-
* On iPhone HD: iPhone HD suffix, Without suffix
|
90
|
-
|
91
|
-
By default this functionality is off;
|
92
|
-
*/
|
93
|
-
@property (nonatomic, readwrite) BOOL enableFallbackSuffixes;
|
94
|
-
|
95
|
-
#endif // __CC_PLATFORM_IOS
|
96
|
-
|
97
|
-
/** returns the shared file utils instance */
|
98
|
-
+(CCFileUtils*) sharedFileUtils;
|
99
|
-
|
100
|
-
|
101
|
-
/** Purge cached entries.
|
102
|
-
Will be called automatically by the Director when a memory warning is received
|
103
|
-
*/
|
104
|
-
-(void) purgeCachedEntries;
|
105
|
-
|
106
|
-
/** Returns the fullpath of an filename.
|
107
|
-
|
108
|
-
If in iPhoneRetinaDisplay mode, and a RetinaDisplay file is found, it will return that path.
|
109
|
-
If in iPad mode, and an iPad file is found, it will return that path.
|
110
|
-
|
111
|
-
Examples:
|
112
|
-
|
113
|
-
* In iPad mode: "image.png" -> "/full/path/image-ipad.png" (in case the -ipad file exists)
|
114
|
-
* In iPhone RetinaDisplay mode: "image.png" -> "/full/path/image-hd.png" (in case the -hd file exists)
|
115
|
-
* In iPad RetinaDisplay mode: "image.png" -> "/full/path/image-ipadhd.png" (in case the -ipadhd file exists)
|
116
|
-
|
117
|
-
*/
|
118
|
-
-(NSString*) fullPathFromRelativePath:(NSString*) relPath;
|
119
|
-
|
120
|
-
|
121
|
-
/** Returns the fullpath of an filename including the resolution of the image.
|
122
|
-
|
123
|
-
If in RetinaDisplay mode, and a RetinaDisplay file is found, it will return that path.
|
124
|
-
If in iPad mode, and an iPad file is found, it will return that path.
|
125
|
-
|
126
|
-
Examples:
|
127
|
-
|
128
|
-
* In iPad mode: "image.png" -> "/full/path/image-ipad.png" (in case the -ipad file exists)
|
129
|
-
* In iPhone RetinaDisplay mode: "image.png" -> "/full/path/image-hd.png" (in case the -hd file exists)
|
130
|
-
* In iPad RetinaDisplay mode: "image.png" -> "/full/path/image-ipadhd.png" (in case the -ipadhd file exists)
|
131
|
-
|
132
|
-
If an iPad file is found, it will set resolution type to kCCResolutioniPad
|
133
|
-
If a RetinaDisplay file is found, it will set resolution type to kCCResolutionRetinaDisplay
|
134
|
-
|
135
|
-
*/
|
136
|
-
-(NSString*) fullPathFromRelativePath:(NSString*)relPath resolutionType:(ccResolutionType*)resolutionType;
|
137
|
-
|
138
|
-
#ifdef __CC_PLATFORM_IOS
|
139
|
-
|
140
|
-
/** removes the suffix from a path
|
141
|
-
* On iPhone RetinaDisplay it will remove the -hd suffix
|
142
|
-
* On iPad it will remove the -ipad suffix
|
143
|
-
* On iPad RetinaDisplay it will remove the -ipadhd suffix
|
144
|
-
|
145
|
-
Only valid on iOS. Not valid for OS X.
|
146
|
-
|
147
|
-
@since v0.99.5
|
148
|
-
*/
|
149
|
-
-(NSString *)removeSuffixFromFile:(NSString*) path;
|
150
|
-
|
151
|
-
/** Returns whether or not a given path exists with the iPhone RetinaDisplay suffix.
|
152
|
-
Only available on iOS. Not supported on OS X.
|
153
|
-
@since v1.1
|
154
|
-
*/
|
155
|
-
-(BOOL) iPhoneRetinaDisplayFileExistsAtPath:(NSString*)filename;
|
156
|
-
|
157
|
-
/** Returns whether or not a given filename exists with the iPad suffix.
|
158
|
-
Only available on iOS. Not supported on OS X.
|
159
|
-
@since v1.1
|
160
|
-
*/
|
161
|
-
-(BOOL) iPadFileExistsAtPath:(NSString*)filename;
|
162
|
-
|
163
|
-
/** Returns whether or not a given filename exists with the iPad RetinaDisplay suffix.
|
164
|
-
Only available on iOS. Not supported on OS X.
|
165
|
-
@since v2.0
|
166
|
-
*/
|
167
|
-
-(BOOL) iPadRetinaDisplayFileExistsAtPath:(NSString*)filename;
|
168
|
-
|
169
|
-
#endif // __CC_PLATFORM_IOS
|
170
|
-
|
171
|
-
@end
|
172
|
-
|
173
|
-
|
174
|
-
#ifdef __cplusplus
|
175
|
-
extern "C" {
|
176
|
-
#endif
|
177
|
-
|
178
|
-
/** loads a file into memory.
|
179
|
-
the caller should release the allocated buffer.
|
180
|
-
|
181
|
-
@returns the size of the allocated buffer
|
182
|
-
@since v0.99.5
|
183
|
-
*/
|
184
|
-
NSInteger ccLoadFileIntoMemory(const char *filename, unsigned char **out);
|
185
|
-
|
186
|
-
#ifdef __cplusplus
|
187
|
-
}
|
188
|
-
#endif
|
@@ -1,243 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
Copyright (c) 2010 Steve Oldmeadow
|
3
|
-
|
4
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
|
-
of this software and associated documentation files (the "Software"), to deal
|
6
|
-
in the Software without restriction, including without limitation the rights
|
7
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
-
copies of the Software, and to permit persons to whom the Software is
|
9
|
-
furnished to do so, subject to the following conditions:
|
10
|
-
|
11
|
-
The above copyright notice and this permission notice shall be included in
|
12
|
-
all copies or substantial portions of the Software.
|
13
|
-
|
14
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
20
|
-
THE SOFTWARE.
|
21
|
-
|
22
|
-
$Id$
|
23
|
-
*/
|
24
|
-
|
25
|
-
#import "CocosDenshion.h"
|
26
|
-
#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 30000
|
27
|
-
#import <AVFoundation/AVFoundation.h>
|
28
|
-
#else
|
29
|
-
#import "CDXMacOSXSupport.h"
|
30
|
-
#endif
|
31
|
-
|
32
|
-
/** Different modes of the engine */
|
33
|
-
typedef enum {
|
34
|
-
kAMM_FxOnly, //!Other apps will be able to play audio
|
35
|
-
kAMM_FxPlusMusic, //!Only this app will play audio
|
36
|
-
kAMM_FxPlusMusicIfNoOtherAudio, //!If another app is playing audio at start up then allow it to continue and don't play music
|
37
|
-
kAMM_MediaPlayback, //!This app takes over audio e.g music player app
|
38
|
-
kAMM_PlayAndRecord //!App takes over audio and has input and output
|
39
|
-
} tAudioManagerMode;
|
40
|
-
|
41
|
-
/** Possible states of the engine */
|
42
|
-
typedef enum {
|
43
|
-
kAMStateUninitialised, //!Audio manager has not been initialised - do not use
|
44
|
-
kAMStateInitialising, //!Audio manager is in the process of initialising - do not use
|
45
|
-
kAMStateInitialised //!Audio manager is initialised - safe to use
|
46
|
-
} tAudioManagerState;
|
47
|
-
|
48
|
-
typedef enum {
|
49
|
-
kAMRBDoNothing, //Audio manager will not do anything on resign or becoming active
|
50
|
-
kAMRBStopPlay, //Background music is stopped on resign and resumed on become active
|
51
|
-
kAMRBStop //Background music is stopped on resign but not resumed - maybe because you want to do this from within your game
|
52
|
-
} tAudioManagerResignBehavior;
|
53
|
-
|
54
|
-
/** Notifications */
|
55
|
-
extern NSString * const kCDN_AudioManagerInitialised;
|
56
|
-
|
57
|
-
@interface CDAsynchInitialiser : NSOperation {}
|
58
|
-
@end
|
59
|
-
|
60
|
-
/** CDAudioManager supports two long audio source channels called left and right*/
|
61
|
-
typedef enum {
|
62
|
-
kASC_Left = 0,
|
63
|
-
kASC_Right = 1
|
64
|
-
} tAudioSourceChannel;
|
65
|
-
|
66
|
-
typedef enum {
|
67
|
-
kLAS_Init,
|
68
|
-
kLAS_Loaded,
|
69
|
-
kLAS_Playing,
|
70
|
-
kLAS_Paused,
|
71
|
-
kLAS_Stopped,
|
72
|
-
} tLongAudioSourceState;
|
73
|
-
|
74
|
-
@class CDLongAudioSource;
|
75
|
-
@protocol CDLongAudioSourceDelegate <NSObject>
|
76
|
-
@optional
|
77
|
-
/** The audio source completed playing */
|
78
|
-
- (void) cdAudioSourceDidFinishPlaying:(CDLongAudioSource *) audioSource;
|
79
|
-
/** The file used to load the audio source has changed */
|
80
|
-
- (void) cdAudioSourceFileDidChange:(CDLongAudioSource *) audioSource;
|
81
|
-
@end
|
82
|
-
|
83
|
-
/**
|
84
|
-
CDLongAudioSource represents an audio source that has a long duration which makes
|
85
|
-
it costly to load into memory for playback as an effect using CDSoundEngine. Examples
|
86
|
-
include background music and narration tracks. The audio file may or may not be compressed.
|
87
|
-
Bear in mind that current iDevices can only use hardware to decode a single compressed
|
88
|
-
audio file at a time and playing multiple compressed files will result in a performance drop
|
89
|
-
as software decompression will take place.
|
90
|
-
@since v0.99
|
91
|
-
*/
|
92
|
-
@interface CDLongAudioSource : NSObject <AVAudioPlayerDelegate, CDAudioInterruptProtocol>{
|
93
|
-
AVAudioPlayer *audioSourcePlayer;
|
94
|
-
NSString *audioSourceFilePath;
|
95
|
-
NSInteger numberOfLoops;
|
96
|
-
float volume;
|
97
|
-
id<CDLongAudioSourceDelegate> delegate;
|
98
|
-
BOOL mute;
|
99
|
-
BOOL enabled_;
|
100
|
-
BOOL backgroundMusic;
|
101
|
-
@public
|
102
|
-
BOOL systemPaused;//Used for auto resign handling
|
103
|
-
NSTimeInterval systemPauseLocation;//Used for auto resign handling
|
104
|
-
@protected
|
105
|
-
tLongAudioSourceState state;
|
106
|
-
}
|
107
|
-
@property (readonly) AVAudioPlayer *audioSourcePlayer;
|
108
|
-
@property (readonly) NSString *audioSourceFilePath;
|
109
|
-
@property (readwrite, nonatomic) NSInteger numberOfLoops;
|
110
|
-
@property (readwrite, nonatomic) float volume;
|
111
|
-
@property (assign) id<CDLongAudioSourceDelegate> delegate;
|
112
|
-
/* This long audio source functions as background music */
|
113
|
-
@property (readwrite, nonatomic) BOOL backgroundMusic;
|
114
|
-
|
115
|
-
/** Loads the file into the audio source */
|
116
|
-
-(void) load:(NSString*) filePath;
|
117
|
-
/** Plays the audio source */
|
118
|
-
-(void) play;
|
119
|
-
/** Stops playing the audio soruce */
|
120
|
-
-(void) stop;
|
121
|
-
/** Pauses the audio source */
|
122
|
-
-(void) pause;
|
123
|
-
/** Rewinds the audio source */
|
124
|
-
-(void) rewind;
|
125
|
-
/** Resumes playing the audio source if it was paused */
|
126
|
-
-(void) resume;
|
127
|
-
/** Returns whether or not the audio source is playing */
|
128
|
-
-(BOOL) isPlaying;
|
129
|
-
|
130
|
-
@end
|
131
|
-
|
132
|
-
/**
|
133
|
-
CDAudioManager manages audio requirements for a game. It provides access to a CDSoundEngine object
|
134
|
-
for playing sound effects. It provides access to two CDLongAudioSource object (left and right channel)
|
135
|
-
for playing long duration audio such as background music and narration tracks. Additionally it manages
|
136
|
-
the audio session to take care of things like audio session interruption and interacting with the audio
|
137
|
-
of other apps that are running on the device.
|
138
|
-
|
139
|
-
Requirements:
|
140
|
-
- Firmware: OS 2.2 or greater
|
141
|
-
- Files: CDAudioManager.*, CocosDenshion.*
|
142
|
-
- Frameworks: OpenAL, AudioToolbox, AVFoundation
|
143
|
-
@since v0.8
|
144
|
-
*/
|
145
|
-
@interface CDAudioManager : NSObject <CDLongAudioSourceDelegate, CDAudioInterruptProtocol, AVAudioSessionDelegate> {
|
146
|
-
CDSoundEngine *soundEngine;
|
147
|
-
CDLongAudioSource *backgroundMusic;
|
148
|
-
NSMutableArray *audioSourceChannels;
|
149
|
-
NSString* _audioSessionCategory;
|
150
|
-
BOOL _audioWasPlayingAtStartup;
|
151
|
-
tAudioManagerMode _mode;
|
152
|
-
SEL backgroundMusicCompletionSelector;
|
153
|
-
id backgroundMusicCompletionListener;
|
154
|
-
BOOL willPlayBackgroundMusic;
|
155
|
-
BOOL _mute;
|
156
|
-
BOOL _resigned;
|
157
|
-
BOOL _interrupted;
|
158
|
-
BOOL _audioSessionActive;
|
159
|
-
BOOL enabled_;
|
160
|
-
|
161
|
-
//For handling resign/become active
|
162
|
-
BOOL _isObservingAppEvents;
|
163
|
-
tAudioManagerResignBehavior _resignBehavior;
|
164
|
-
}
|
165
|
-
|
166
|
-
@property (readonly) CDSoundEngine *soundEngine;
|
167
|
-
@property (readonly) CDLongAudioSource *backgroundMusic;
|
168
|
-
@property (readonly) BOOL willPlayBackgroundMusic;
|
169
|
-
|
170
|
-
/** Returns the shared singleton */
|
171
|
-
+ (CDAudioManager *) sharedManager;
|
172
|
-
+ (tAudioManagerState) sharedManagerState;
|
173
|
-
/** Configures the shared singleton with a mode*/
|
174
|
-
+ (void) configure: (tAudioManagerMode) mode;
|
175
|
-
/** Initializes the engine asynchronously with a mode */
|
176
|
-
+ (void) initAsynchronously: (tAudioManagerMode) mode;
|
177
|
-
/** Initializes the engine synchronously with a mode, channel definition and a total number of channels */
|
178
|
-
- (id) init: (tAudioManagerMode) mode;
|
179
|
-
-(void) audioSessionInterrupted;
|
180
|
-
-(void) audioSessionResumed;
|
181
|
-
-(void) setResignBehavior:(tAudioManagerResignBehavior) resignBehavior autoHandle:(BOOL) autoHandle;
|
182
|
-
/** Returns true is audio is muted at a hardware level e.g user has ringer switch set to off */
|
183
|
-
-(BOOL) isDeviceMuted;
|
184
|
-
/** Returns true if another app is playing audio such as the iPod music player */
|
185
|
-
-(BOOL) isOtherAudioPlaying;
|
186
|
-
/** Sets the way the audio manager interacts with the operating system such as whether it shares output with other apps or obeys the mute switch */
|
187
|
-
-(void) setMode:(tAudioManagerMode) mode;
|
188
|
-
/** Shuts down the shared audio manager instance so that it can be reinitialised */
|
189
|
-
+(void) end;
|
190
|
-
|
191
|
-
/** Call if you want to use built in resign behavior but need to do some additional audio processing on resign active. */
|
192
|
-
- (void) applicationWillResignActive;
|
193
|
-
/** Call if you want to use built in resign behavior but need to do some additional audio processing on become active. */
|
194
|
-
- (void) applicationDidBecomeActive;
|
195
|
-
|
196
|
-
//New AVAudioPlayer API
|
197
|
-
/** Loads the data from the specified file path to the channel's audio source */
|
198
|
-
-(CDLongAudioSource*) audioSourceLoad:(NSString*) filePath channel:(tAudioSourceChannel) channel;
|
199
|
-
/** Retrieves the audio source for the specified channel */
|
200
|
-
-(CDLongAudioSource*) audioSourceForChannel:(tAudioSourceChannel) channel;
|
201
|
-
|
202
|
-
//Legacy AVAudioPlayer API
|
203
|
-
/** Plays music in background. The music can be looped or not
|
204
|
-
It is recommended to use .aac files as background music since they are decoded by the device (hardware).
|
205
|
-
*/
|
206
|
-
-(void) playBackgroundMusic:(NSString*) filePath loop:(BOOL) loop;
|
207
|
-
/** Preloads a background music */
|
208
|
-
-(void) preloadBackgroundMusic:(NSString*) filePath;
|
209
|
-
/** Stops playing the background music */
|
210
|
-
-(void) stopBackgroundMusic;
|
211
|
-
/** Pauses the background music */
|
212
|
-
-(void) pauseBackgroundMusic;
|
213
|
-
/** Rewinds the background music */
|
214
|
-
-(void) rewindBackgroundMusic;
|
215
|
-
/** Resumes playing the background music */
|
216
|
-
-(void) resumeBackgroundMusic;
|
217
|
-
/** Returns whether or not the background music is playing */
|
218
|
-
-(BOOL) isBackgroundMusicPlaying;
|
219
|
-
|
220
|
-
-(void) setBackgroundMusicCompletionListener:(id) listener selector:(SEL) selector;
|
221
|
-
|
222
|
-
@end
|
223
|
-
|
224
|
-
/** Fader for long audio source objects */
|
225
|
-
@interface CDLongAudioSourceFader : CDPropertyModifier{}
|
226
|
-
@end
|
227
|
-
|
228
|
-
static const int kCDNoBuffer = -1;
|
229
|
-
|
230
|
-
/** Allows buffers to be associated with file names */
|
231
|
-
@interface CDBufferManager:NSObject{
|
232
|
-
NSMutableDictionary* loadedBuffers;
|
233
|
-
NSMutableArray *freedBuffers;
|
234
|
-
CDSoundEngine *soundEngine;
|
235
|
-
int nextBufferId;
|
236
|
-
}
|
237
|
-
|
238
|
-
-(id) initWithEngine:(CDSoundEngine *) theSoundEngine;
|
239
|
-
-(int) bufferForFile:(NSString*) filePath create:(BOOL) create;
|
240
|
-
-(void) releaseBufferForFile:(NSString *) filePath;
|
241
|
-
|
242
|
-
@end
|
243
|
-
|
@@ -1,60 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
Copyright (c) 2010 Steve Oldmeadow
|
3
|
-
|
4
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
|
-
of this software and associated documentation files (the "Software"), to deal
|
6
|
-
in the Software without restriction, including without limitation the rights
|
7
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
-
copies of the Software, and to permit persons to whom the Software is
|
9
|
-
furnished to do so, subject to the following conditions:
|
10
|
-
|
11
|
-
The above copyright notice and this permission notice shall be included in
|
12
|
-
all copies or substantial portions of the Software.
|
13
|
-
|
14
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
20
|
-
THE SOFTWARE.
|
21
|
-
|
22
|
-
$Id$
|
23
|
-
*/
|
24
|
-
#define COCOSDENSHION_VERSION "Aphex.rc"
|
25
|
-
|
26
|
-
|
27
|
-
/**
|
28
|
-
If enabled code useful for debugging such as parameter check assertions will be performed.
|
29
|
-
If you experience any problems you should enable this and test your code with a debug build.
|
30
|
-
*/
|
31
|
-
//#define CD_DEBUG 1
|
32
|
-
|
33
|
-
/**
|
34
|
-
The total number of sounds/buffers that can be loaded assuming memory is sufficient
|
35
|
-
*/
|
36
|
-
//Number of buffers slots that will be initially created
|
37
|
-
#define CD_BUFFERS_START 64
|
38
|
-
//Number of buffers that will be added
|
39
|
-
#define CD_BUFFERS_INCREMENT 16
|
40
|
-
|
41
|
-
/**
|
42
|
-
If enabled, OpenAL code will use static buffers. When static buffers are used the audio
|
43
|
-
data is managed outside of OpenAL, this eliminates a memcpy operation which leads to
|
44
|
-
higher performance when loading sounds.
|
45
|
-
|
46
|
-
However, the downside is that when the audio data is freed you must
|
47
|
-
be certain that it is no longer being accessed otherwise your app will crash. Testing on OS 2.2.1
|
48
|
-
and 3.1.2 has shown that this may occur if a buffer is being used by a source with state = AL_PLAYING
|
49
|
-
when the buffer is deleted. If the data is freed too quickly after the source is stopped then
|
50
|
-
a crash will occur. The implemented workaround is that when static buffers are used the unloadBuffer code will wait for
|
51
|
-
any playing sources to finish playing before the associated buffer and data are deleted, however, this delay may negate any
|
52
|
-
performance gains that are achieved during loading.
|
53
|
-
|
54
|
-
Performance tests on a 1st gen iPod running OS 2.2.1 loading the CocosDenshionDemo sounds were ~0.14 seconds without
|
55
|
-
static buffers and ~0.12 seconds when using static buffers.
|
56
|
-
|
57
|
-
*/
|
58
|
-
//#define CD_USE_STATIC_BUFFERS 1
|
59
|
-
|
60
|
-
|
@@ -1,77 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
|
3
|
-
Disclaimer: IMPORTANT: This Apple software is supplied to you by
|
4
|
-
Apple Inc. ("Apple") in consideration of your agreement to the
|
5
|
-
following terms, and your use, installation, modification or
|
6
|
-
redistribution of this Apple software constitutes acceptance of these
|
7
|
-
terms. If you do not agree with these terms, please do not use,
|
8
|
-
install, modify or redistribute this Apple software.
|
9
|
-
|
10
|
-
In consideration of your agreement to abide by the following terms, and
|
11
|
-
subject to these terms, Apple grants you a personal, non-exclusive
|
12
|
-
license, under Apple's copyrights in this original Apple software (the
|
13
|
-
"Apple Software"), to use, reproduce, modify and redistribute the Apple
|
14
|
-
Software, with or without modifications, in source and/or binary forms;
|
15
|
-
provided that if you redistribute the Apple Software in its entirety and
|
16
|
-
without modifications, you must retain this notice and the following
|
17
|
-
text and disclaimers in all such redistributions of the Apple Software.
|
18
|
-
Neither the name, trademarks, service marks or logos of Apple Inc.
|
19
|
-
may be used to endorse or promote products derived from the Apple
|
20
|
-
Software without specific prior written permission from Apple. Except
|
21
|
-
as expressly stated in this notice, no other rights or licenses, express
|
22
|
-
or implied, are granted by Apple herein, including but not limited to
|
23
|
-
any patent rights that may be infringed by your derivative works or by
|
24
|
-
other works in which the Apple Software may be incorporated.
|
25
|
-
|
26
|
-
The Apple Software is provided by Apple on an "AS IS" basis. APPLE
|
27
|
-
MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
|
28
|
-
THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS
|
29
|
-
FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND
|
30
|
-
OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
|
31
|
-
|
32
|
-
IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL
|
33
|
-
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
34
|
-
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
35
|
-
INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,
|
36
|
-
MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED
|
37
|
-
AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),
|
38
|
-
STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE
|
39
|
-
POSSIBILITY OF SUCH DAMAGE.
|
40
|
-
|
41
|
-
Copyright (C) 2009 Apple Inc. All Rights Reserved.
|
42
|
-
|
43
|
-
$Id$
|
44
|
-
*/
|
45
|
-
|
46
|
-
/*
|
47
|
-
This file contains code from version 1.1 and 1.4 of MyOpenALSupport.h taken from Apple's oalTouch version.
|
48
|
-
The 1.4 version code is used for loading IMA4 files, however, this code causes very noticeable clicking
|
49
|
-
when used to load wave files that are looped so the 1.1 version code is used specifically for loading
|
50
|
-
wav files.
|
51
|
-
*/
|
52
|
-
|
53
|
-
#ifndef __CD_OPENAL_H
|
54
|
-
#define __CD_OPENAL_H
|
55
|
-
|
56
|
-
#ifdef __cplusplus
|
57
|
-
extern "C" {
|
58
|
-
#endif
|
59
|
-
|
60
|
-
|
61
|
-
#import <OpenAL/al.h>
|
62
|
-
#import <OpenAL/alc.h>
|
63
|
-
#import <CoreFoundation/CFURL.h>
|
64
|
-
|
65
|
-
|
66
|
-
//Taken from oalTouch MyOpenALSupport 1.1
|
67
|
-
void* CDloadWaveAudioData(CFURLRef inFileURL, ALsizei *outDataSize, ALenum *outDataFormat, ALsizei* outSampleRate);
|
68
|
-
void* CDloadCafAudioData(CFURLRef inFileURL, ALsizei *outDataSize, ALenum *outDataFormat, ALsizei* outSampleRate);
|
69
|
-
void* CDGetOpenALAudioData(CFURLRef inFileURL, ALsizei *outDataSize, ALenum *outDataFormat, ALsizei* outSampleRate);
|
70
|
-
|
71
|
-
#ifdef __cplusplus
|
72
|
-
}
|
73
|
-
#endif
|
74
|
-
|
75
|
-
#endif
|
76
|
-
|
77
|
-
|
@@ -1,45 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
Copyright (c) 2010 Steve Oldmeadow
|
3
|
-
|
4
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
|
-
of this software and associated documentation files (the "Software"), to deal
|
6
|
-
in the Software without restriction, including without limitation the rights
|
7
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
-
copies of the Software, and to permit persons to whom the Software is
|
9
|
-
furnished to do so, subject to the following conditions:
|
10
|
-
|
11
|
-
The above copyright notice and this permission notice shall be included in
|
12
|
-
all copies or substantial portions of the Software.
|
13
|
-
|
14
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
20
|
-
THE SOFTWARE.
|
21
|
-
|
22
|
-
$Id$
|
23
|
-
*/
|
24
|
-
|
25
|
-
#import "cocos2d.h"
|
26
|
-
#import "SimpleAudioEngine.h"
|
27
|
-
|
28
|
-
/** Base class for actions that modify audio properties
|
29
|
-
@since v 1.0
|
30
|
-
*/
|
31
|
-
@interface CDXPropertyModifierAction : CCActionInterval {
|
32
|
-
CDPropertyModifier *modifier;
|
33
|
-
float lastSetValue;
|
34
|
-
}
|
35
|
-
/** creates the action */
|
36
|
-
+(id) actionWithDuration:(ccTime)t modifier:(CDPropertyModifier*) aModifier;
|
37
|
-
|
38
|
-
/** initializes the action */
|
39
|
-
-(id) initWithDuration:(ccTime)t modifier:(CDPropertyModifier*) aModifier;
|
40
|
-
|
41
|
-
+(void) fadeSoundEffects:(ccTime)t finalVolume:(float)endVol curveType:(tCDInterpolationType)curve shouldStop:(BOOL) stop;
|
42
|
-
+(void) fadeSoundEffect:(ccTime)t finalVolume:(float)endVol curveType:(tCDInterpolationType)curve shouldStop:(BOOL) stop effect:(CDSoundSource*) effect;
|
43
|
-
+(void) fadeBackgroundMusic:(ccTime)t finalVolume:(float)endVol curveType:(tCDInterpolationType) curve shouldStop:(BOOL) stop;
|
44
|
-
|
45
|
-
@end
|