├── .gitignore
├── AUTHORS
├── AppledocSettings.plist
├── CCControlExtension
├── CCControl
│ ├── CCControl.h
│ ├── CCControl.m
│ ├── CCControlButton.h
│ ├── CCControlButton.m
│ ├── CCControlColourPicker.h
│ ├── CCControlColourPicker.m
│ ├── CCControlPicker.h
│ ├── CCControlPicker.m
│ ├── CCControlPotentiometer.h
│ ├── CCControlPotentiometer.m
│ ├── CCControlSlider.h
│ ├── CCControlSlider.m
│ ├── CCControlStepper.h
│ ├── CCControlStepper.m
│ ├── CCControlSwitch.h
│ ├── CCControlSwitch.m
│ ├── Shaders
│ │ ├── ccControlShaders.h
│ │ ├── ccControlShaders.m
│ │ └── ccShader_ControlSwitchMask_frag.h
│ └── Utils
│ │ ├── ARCMacro.h
│ │ ├── CCColourUtils.h
│ │ ├── CCColourUtils.m
│ │ ├── CCScale9Sprite.h
│ │ └── CCScale9Sprite.m
├── CCControlExtension.h
└── README.md
├── CCControlExtensionExamples
├── README.md
├── cocos2d-gles20-cccontrol-examples-ios.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── touchknow.xcuserdatad
│ │ │ └── WorkspaceSettings.xcsettings
│ └── xcuserdata
│ │ ├── YannickL.xcuserdatad
│ │ └── xcschemes
│ │ │ ├── cocos2d-gles20-cccontrol-examples-ios.xcscheme
│ │ │ └── xcschememanagement.plist
│ │ ├── touchknow.xcuserdatad
│ │ ├── xcdebugger
│ │ │ └── Breakpoints.xcbkptlist
│ │ └── xcschemes
│ │ │ ├── cocos2d-gles20-cccontrol-examples-ios.xcscheme
│ │ │ └── xcschememanagement.plist
│ │ └── vlidholt.xcuserdatad
│ │ └── xcschemes
│ │ ├── cocos2d-gles20-cccontrol-examples-ios.xcscheme
│ │ └── xcschememanagement.plist
└── cocos2d-gles20-cccontrol-examples-ios
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Classes
│ ├── Mains
│ │ ├── CCControlScene.h
│ │ ├── CCControlScene.m
│ │ ├── CCControlSceneManager.h
│ │ └── CCControlSceneManager.m
│ └── Test
│ │ ├── CCControlButtonTest
│ │ ├── CCControlButtonTest.h
│ │ ├── CCControlButtonTest.m
│ │ └── Resources
│ │ │ ├── button-hd.png
│ │ │ ├── button.png
│ │ │ ├── buttonBackground.png
│ │ │ ├── buttonHighlighted-hd.png
│ │ │ └── buttonHighlighted.png
│ │ ├── CCControlColourPicker
│ │ ├── CCControlColourPickerTest.h
│ │ ├── CCControlColourPickerTest.m
│ │ └── Resources
│ │ │ ├── hd
│ │ │ ├── arrow-hd.png
│ │ │ ├── hueBackground-hd.png
│ │ │ ├── picker-hd.png
│ │ │ ├── tintBackground-hd.png
│ │ │ └── tintOverlay-hd.png
│ │ │ ├── ipad
│ │ │ ├── arrow-ipad.png
│ │ │ ├── hueBackground-ipad.png
│ │ │ ├── picker-ipad.png
│ │ │ ├── tintBackground-ipad.png
│ │ │ └── tintOverlay-ipad.png
│ │ │ ├── ipadhd
│ │ │ ├── arrow-ipadhd.png
│ │ │ ├── hueBackground-ipadhd.png
│ │ │ ├── picker-ipadhd.png
│ │ │ ├── tintBackground-ipadhd.png
│ │ │ └── tintOverlay-ipadhd.png
│ │ │ └── sd
│ │ │ ├── arrow.png
│ │ │ ├── hueBackground.png
│ │ │ ├── picker.png
│ │ │ ├── tintBackground.png
│ │ │ └── tintOverlay.png
│ │ ├── CCControlPickerTest
│ │ ├── CCControlPickerTest.h
│ │ ├── CCControlPickerTest.m
│ │ └── Resources
│ │ │ ├── pickerBackground-hd.png
│ │ │ ├── pickerBackground-ipad.png
│ │ │ ├── pickerBackground-ipadhd.png
│ │ │ ├── pickerBackground.png
│ │ │ ├── pickerSelection-hd.png
│ │ │ ├── pickerSelection-ipad.png
│ │ │ ├── pickerSelection-ipadhd.png
│ │ │ └── pickerSelection.png
│ │ ├── CCControlPotentiometerTest
│ │ ├── CCControlPotentiometerTest.h
│ │ ├── CCControlPotentiometerTest.m
│ │ └── Resources
│ │ │ ├── potentiometerButton-hd.png
│ │ │ ├── potentiometerButton-ipad.png
│ │ │ ├── potentiometerButton-ipadhd.png
│ │ │ ├── potentiometerButton.png
│ │ │ ├── potentiometerProgress-hd.png
│ │ │ ├── potentiometerProgress-ipad.png
│ │ │ ├── potentiometerProgress-ipadhd.png
│ │ │ ├── potentiometerProgress.png
│ │ │ ├── potentiometerTrack-hd.png
│ │ │ ├── potentiometerTrack-ipad.png
│ │ │ ├── potentiometerTrack-ipadhd.png
│ │ │ └── potentiometerTrack.png
│ │ ├── CCControlSliderTest
│ │ ├── CCControlSliderTest.h
│ │ ├── CCControlSliderTest.m
│ │ └── Resources
│ │ │ ├── sliderProgress-hd.png
│ │ │ ├── sliderProgress.png
│ │ │ ├── sliderThumb-hd.png
│ │ │ ├── sliderThumb.png
│ │ │ ├── sliderTrack-hd.png
│ │ │ └── sliderTrack.png
│ │ ├── CCControlStepperTest
│ │ ├── CCControlStepperTest.h
│ │ ├── CCControlStepperTest.m
│ │ └── Resources
│ │ │ ├── stepper-minus-hd.png
│ │ │ ├── stepper-minus-ipadhd.png
│ │ │ ├── stepper-minus.png
│ │ │ ├── stepper-plus-hd.png
│ │ │ ├── stepper-plus-ipadhd.png
│ │ │ └── stepper-plus.png
│ │ └── CCControlSwitchTest
│ │ ├── CCControlSwitchTest.h
│ │ ├── CCControlSwitchTest.m
│ │ └── Resources
│ │ ├── switch-mask-hd.png
│ │ ├── switch-mask-ipadhd.png
│ │ ├── switch-mask.png
│ │ ├── switch-off-hd.png
│ │ ├── switch-off-ipadhd.png
│ │ ├── switch-off.png
│ │ ├── switch-on-hd.png
│ │ ├── switch-on-ipadhd.png
│ │ ├── switch-on.png
│ │ ├── switch-thumb-hd.png
│ │ ├── switch-thumb-ipadhd.png
│ │ └── switch-thumb.png
│ ├── IntroLayer.h
│ ├── IntroLayer.m
│ ├── Prefix.pch
│ ├── Resources
│ ├── Default-568h@2x.png
│ ├── Default-Landscape~ipad.png
│ ├── Default.png
│ ├── Default@2x.png
│ ├── Icon-72.png
│ ├── Icon.png
│ ├── Icon@2x.png
│ ├── Images
│ │ ├── background-hd.png
│ │ ├── background-ipad.png
│ │ ├── background-ipadhd.png
│ │ ├── background.png
│ │ ├── ribbon-hd.png
│ │ └── ribbon.png
│ ├── Info.plist
│ ├── MenuImages
│ │ ├── b1-hd.png
│ │ ├── b1-ipad.png
│ │ ├── b1.png
│ │ ├── b2-hd.png
│ │ ├── b2-ipad.png
│ │ ├── b2.png
│ │ ├── f1-hd.png
│ │ ├── f1-ipad.png
│ │ ├── f1.png
│ │ ├── f2-hd.png
│ │ ├── f2-ipad.png
│ │ ├── f2.png
│ │ ├── r1-hd.png
│ │ ├── r1-ipad.png
│ │ ├── r1.png
│ │ ├── r2-hd.png
│ │ ├── r2-ipad.png
│ │ └── r2.png
│ ├── fps_images-hd.png
│ ├── fps_images-ipadhd.png
│ ├── fps_images.png
│ └── iTunesArtwork
│ ├── Shaders
│ ├── PositionColor.fsh
│ ├── PositionColor.vsh
│ ├── PositionTexture.fsh
│ ├── PositionTexture.vsh
│ ├── PositionTextureA8Color.fsh
│ ├── PositionTextureA8Color.vsh
│ ├── PositionTextureColor.fsh
│ ├── PositionTextureColor.vsh
│ ├── PositionTextureColorAlphaTest.fsh
│ ├── PositionTexture_uColor.fsh
│ ├── PositionTexture_uColor.vsh
│ ├── Position_uColor.fsh
│ └── Position_uColor.vsh
│ ├── libs
│ ├── CocosDenshion
│ │ ├── CDAudioManager.h
│ │ ├── CDAudioManager.m
│ │ ├── CDConfig.h
│ │ ├── CDOpenALSupport.h
│ │ ├── CDOpenALSupport.m
│ │ ├── CocosDenshion.h
│ │ ├── CocosDenshion.m
│ │ ├── SimpleAudioEngine.h
│ │ └── SimpleAudioEngine.m
│ ├── LICENSE_CocosDenshion.txt
│ ├── LICENSE_Kazmath.txt
│ ├── LICENSE_cocos2d.txt
│ ├── cocos2d
│ │ ├── CCAction.h
│ │ ├── CCAction.m
│ │ ├── CCActionCamera.h
│ │ ├── CCActionCamera.m
│ │ ├── CCActionCatmullRom.h
│ │ ├── CCActionCatmullRom.m
│ │ ├── CCActionEase.h
│ │ ├── CCActionEase.m
│ │ ├── CCActionGrid.h
│ │ ├── CCActionGrid.m
│ │ ├── CCActionGrid3D.h
│ │ ├── CCActionGrid3D.m
│ │ ├── CCActionInstant.h
│ │ ├── CCActionInstant.m
│ │ ├── CCActionInterval.h
│ │ ├── CCActionInterval.m
│ │ ├── CCActionManager.h
│ │ ├── CCActionManager.m
│ │ ├── CCActionPageTurn3D.h
│ │ ├── CCActionPageTurn3D.m
│ │ ├── CCActionProgressTimer.h
│ │ ├── CCActionProgressTimer.m
│ │ ├── CCActionTiledGrid.h
│ │ ├── CCActionTiledGrid.m
│ │ ├── CCActionTween.h
│ │ ├── CCActionTween.m
│ │ ├── CCAnimation.h
│ │ ├── CCAnimation.m
│ │ ├── CCAnimationCache.h
│ │ ├── CCAnimationCache.m
│ │ ├── CCAtlasNode.h
│ │ ├── CCAtlasNode.m
│ │ ├── CCCamera.h
│ │ ├── CCCamera.m
│ │ ├── CCConfiguration.h
│ │ ├── CCConfiguration.m
│ │ ├── CCDirector.h
│ │ ├── CCDirector.m
│ │ ├── CCDrawingPrimitives.h
│ │ ├── CCDrawingPrimitives.m
│ │ ├── CCGLProgram.h
│ │ ├── CCGLProgram.m
│ │ ├── CCGrabber.h
│ │ ├── CCGrabber.m
│ │ ├── CCGrid.h
│ │ ├── CCGrid.m
│ │ ├── CCLabelAtlas.h
│ │ ├── CCLabelAtlas.m
│ │ ├── CCLabelBMFont.h
│ │ ├── CCLabelBMFont.m
│ │ ├── CCLabelTTF.h
│ │ ├── CCLabelTTF.m
│ │ ├── CCLayer.h
│ │ ├── CCLayer.m
│ │ ├── CCMenu.h
│ │ ├── CCMenu.m
│ │ ├── CCMenuItem.h
│ │ ├── CCMenuItem.m
│ │ ├── CCMotionStreak.h
│ │ ├── CCMotionStreak.m
│ │ ├── CCNode+Debug.h
│ │ ├── CCNode+Debug.m
│ │ ├── CCNode.h
│ │ ├── CCNode.m
│ │ ├── CCParallaxNode.h
│ │ ├── CCParallaxNode.m
│ │ ├── CCParticleBatchNode.h
│ │ ├── CCParticleBatchNode.m
│ │ ├── CCParticleExamples.h
│ │ ├── CCParticleExamples.m
│ │ ├── CCParticleSystem.h
│ │ ├── CCParticleSystem.m
│ │ ├── CCParticleSystemQuad.h
│ │ ├── CCParticleSystemQuad.m
│ │ ├── CCProgressTimer.h
│ │ ├── CCProgressTimer.m
│ │ ├── CCProtocols.h
│ │ ├── CCRenderTexture.h
│ │ ├── CCRenderTexture.m
│ │ ├── CCScene.h
│ │ ├── CCScene.m
│ │ ├── CCScheduler.h
│ │ ├── CCScheduler.m
│ │ ├── CCShaderCache.h
│ │ ├── CCShaderCache.m
│ │ ├── CCSprite.h
│ │ ├── CCSprite.m
│ │ ├── CCSpriteBatchNode.h
│ │ ├── CCSpriteBatchNode.m
│ │ ├── CCSpriteFrame.h
│ │ ├── CCSpriteFrame.m
│ │ ├── CCSpriteFrameCache.h
│ │ ├── CCSpriteFrameCache.m
│ │ ├── CCTMXLayer.h
│ │ ├── CCTMXLayer.m
│ │ ├── CCTMXObjectGroup.h
│ │ ├── CCTMXObjectGroup.m
│ │ ├── CCTMXTiledMap.h
│ │ ├── CCTMXTiledMap.m
│ │ ├── CCTMXXMLParser.h
│ │ ├── CCTMXXMLParser.m
│ │ ├── CCTexture2D.h
│ │ ├── CCTexture2D.m
│ │ ├── CCTextureAtlas.h
│ │ ├── CCTextureAtlas.m
│ │ ├── CCTextureCache.h
│ │ ├── CCTextureCache.m
│ │ ├── CCTexturePVR.h
│ │ ├── CCTexturePVR.m
│ │ ├── CCTileMapAtlas.h
│ │ ├── CCTileMapAtlas.m
│ │ ├── CCTransition.h
│ │ ├── CCTransition.m
│ │ ├── CCTransitionPageTurn.h
│ │ ├── CCTransitionPageTurn.m
│ │ ├── CCTransitionProgress.h
│ │ ├── CCTransitionProgress.m
│ │ ├── Platforms
│ │ │ ├── CCGL.h
│ │ │ ├── CCNS.h
│ │ │ ├── Mac
│ │ │ │ ├── CCDirectorMac.h
│ │ │ │ ├── CCDirectorMac.m
│ │ │ │ ├── CCEventDispatcher.h
│ │ │ │ ├── CCEventDispatcher.m
│ │ │ │ ├── CCGLView.h
│ │ │ │ ├── CCGLView.m
│ │ │ │ ├── CCWindow.h
│ │ │ │ └── CCWindow.m
│ │ │ └── iOS
│ │ │ │ ├── CCDirectorIOS.h
│ │ │ │ ├── CCDirectorIOS.m
│ │ │ │ ├── CCES2Renderer.h
│ │ │ │ ├── CCES2Renderer.m
│ │ │ │ ├── CCESRenderer.h
│ │ │ │ ├── CCGLView.h
│ │ │ │ ├── CCGLView.m
│ │ │ │ ├── CCTouchDelegateProtocol.h
│ │ │ │ ├── CCTouchDispatcher.h
│ │ │ │ ├── CCTouchDispatcher.m
│ │ │ │ ├── CCTouchHandler.h
│ │ │ │ └── CCTouchHandler.m
│ │ ├── Support
│ │ │ ├── CCArray.h
│ │ │ ├── CCArray.m
│ │ │ ├── CCFileUtils.h
│ │ │ ├── CCFileUtils.m
│ │ │ ├── CCProfiling.h
│ │ │ ├── CCProfiling.m
│ │ │ ├── CCVertex.h
│ │ │ ├── CCVertex.m
│ │ │ ├── CGPointExtension.h
│ │ │ ├── CGPointExtension.m
│ │ │ ├── NSThread+performBlock.h
│ │ │ ├── NSThread+performBlock.m
│ │ │ ├── OpenGL_Internal.h
│ │ │ ├── TGAlib.h
│ │ │ ├── TGAlib.m
│ │ │ ├── TransformUtils.h
│ │ │ ├── TransformUtils.m
│ │ │ ├── ZipUtils.h
│ │ │ ├── ZipUtils.m
│ │ │ ├── base64.c
│ │ │ ├── base64.h
│ │ │ ├── ccCArray.h
│ │ │ ├── ccCArray.m
│ │ │ ├── ccUtils.c
│ │ │ ├── ccUtils.h
│ │ │ ├── uthash.h
│ │ │ └── utlist.h
│ │ ├── ccConfig.h
│ │ ├── ccDeprecated.h
│ │ ├── ccDeprecated.m
│ │ ├── ccGLStateCache.h
│ │ ├── ccGLStateCache.m
│ │ ├── ccMacros.h
│ │ ├── ccShader_PositionColor_frag.h
│ │ ├── ccShader_PositionColor_vert.h
│ │ ├── ccShader_PositionTextureA8Color_frag.h
│ │ ├── ccShader_PositionTextureA8Color_vert.h
│ │ ├── ccShader_PositionTextureColorAlphaTest_frag.h
│ │ ├── ccShader_PositionTextureColor_frag.h
│ │ ├── ccShader_PositionTextureColor_vert.h
│ │ ├── ccShader_PositionTexture_frag.h
│ │ ├── ccShader_PositionTexture_uColor_frag.h
│ │ ├── ccShader_PositionTexture_uColor_vert.h
│ │ ├── ccShader_PositionTexture_vert.h
│ │ ├── ccShader_Position_uColor_frag.h
│ │ ├── ccShader_Position_uColor_vert.h
│ │ ├── ccShaders.h
│ │ ├── ccShaders.m
│ │ ├── ccTypes.h
│ │ ├── cocos2d.h
│ │ └── cocos2d.m
│ └── kazmath
│ │ ├── include
│ │ └── kazmath
│ │ │ ├── GL
│ │ │ ├── mat4stack.h
│ │ │ └── matrix.h
│ │ │ ├── aabb.h
│ │ │ ├── kazmath.h
│ │ │ ├── mat3.h
│ │ │ ├── mat4.h
│ │ │ ├── neon_matrix_impl.h
│ │ │ ├── plane.h
│ │ │ ├── quaternion.h
│ │ │ ├── ray2.h
│ │ │ ├── utility.h
│ │ │ ├── vec2.h
│ │ │ ├── vec3.h
│ │ │ └── vec4.h
│ │ └── src
│ │ ├── CMakeLists.txt
│ │ ├── ChangeLog
│ │ ├── GL
│ │ ├── mat4stack.c
│ │ └── matrix.c
│ │ ├── aabb.c
│ │ ├── mat3.c
│ │ ├── mat4.c
│ │ ├── neon_matrix_impl.c
│ │ ├── plane.c
│ │ ├── quaternion.c
│ │ ├── ray2.c
│ │ ├── utility.c
│ │ ├── vec2.c
│ │ ├── vec3.c
│ │ └── vec4.c
│ └── main.m
├── LICENSE_CCControlExtention.txt
├── README.md
└── appledoc_generate.sh
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | .DS_Store
3 | build/
4 | *.pbxuser
5 | !default.pbxuser
6 | *.mode1v3
7 | !default.mode1v3
8 | *.mode2v3
9 | !default.mode2v3
10 | *.perspectivev3
11 | !default.perspectivev3
12 | *.xcworkspace
13 | !default.xcworkspace
14 | xcuserdata
15 | profile
16 | *.moved-aside
17 | DerivedData
18 | .idea/
19 | documentation
--------------------------------------------------------------------------------
/AUTHORS:
--------------------------------------------------------------------------------
1 | CCControlExtension - Authors
2 |
3 | Lead developer:
4 | Yannick Loriot (http://www.yannickloriot.com/)
5 |
6 | People/companies who were/are contributing code to CCControlExtension (alphabetically ordered):
7 |
8 | * Chris Wilson (http://sketchshare.co.uk/)
9 | [NEW] CCControlColourPicker
10 |
11 | * Lionel Paolini (http://lionel-pao.blogspot.fr/)
12 | [NEW] Logo and the splashscreen
13 |
14 | * Sébastien Dabet (https://github.com/sdabet)
15 | [ADD] MarginLR and MarginTB properties for the CCControlButton
16 |
17 | * Stewart Hamilton (http://sketchshare.co.uk/)
18 | [NEW] CCControlColourPicker
19 |
20 | * Viktor Lidholt (http://www.cocosbuilder.com/)
21 | [NEW] Integration with CocosBuilder:
22 | CCControl, CCControlButton, CCScale9Sprite
23 | [ADD] Setters/getters for spriteFrame, insetLeft, insetTop, insetRight, insetBottom in CCScale9Sprite
24 | [ADD] Support for rotated sprite frames in CCScale9Sprite
25 | [ADD] Turning on/off zoom effect in CCControlButton
26 | [ADD] Setters/getters for labelAnchorPoint, preferedSize in the CCControlButton
27 | [FIX] Positioning for insets in CCControlButton
28 |
--------------------------------------------------------------------------------
/AppledocSettings.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | --company-id
6 | com.yannickloriot
7 | --create-docset
8 |
9 | --ignore
10 |
11 | .m
12 | CCColourUtils.h
13 | Utils.h
14 |
15 | --install-docset
16 |
17 | --docset-platform-family
18 | iphoneos
19 | --output
20 | documentation
21 | --project-company
22 | Yannick Loriot
23 | --project-name
24 | CCControlExtension
25 | --project-version
26 | 2.0
27 | --docset-feed-url
28 | http://yannickloriot.com/library/ios/cccontrolextension/
29 | --docset-package-url
30 | http://yannickloriot.com/library/ios/cccontrolextension/
31 | --keep-undocumented-objects
32 |
33 | --keep-undocumented-members
34 |
35 | --warn-undocumented-object
36 |
37 | --warn-undocumented-member
38 |
39 | --warn-empty-description
40 |
41 | --warn-missing-arg
42 |
43 | --warn-unknown-directive
44 |
45 | --logformat
46 | html
47 | --exit-threshold
48 | 2
49 |
50 |
51 |
--------------------------------------------------------------------------------
/CCControlExtension/CCControl/Shaders/ccControlShaders.h:
--------------------------------------------------------------------------------
1 | /*
2 | * ccControlShaders.h
3 | *
4 | * Copyright 2013 Yannick Loriot.
5 | * http://yannickloriot.com
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 | #ifdef __cplusplus__
28 | extern "C" {
29 | #endif // __cplusplus__
30 |
31 | extern const GLchar * ccControlSwitchMask_frag;
32 |
33 | #ifdef __cplusplus__
34 | }
35 | #endif // __cplusplus__
36 |
--------------------------------------------------------------------------------
/CCControlExtension/CCControl/Shaders/ccControlShaders.m:
--------------------------------------------------------------------------------
1 | /*
2 | * ccControlShaders.m
3 | *
4 | * Copyright 2013 Yannick Loriot.
5 | * http://yannickloriot.com
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | *
25 | */
26 |
27 | #import "ccControlShaders.h"
28 |
29 | const GLchar * ccControlSwitchMask_frag =
30 | #import "ccShader_ControlSwitchMask_frag.h"
--------------------------------------------------------------------------------
/CCControlExtension/CCControl/Shaders/ccShader_ControlSwitchMask_frag.h:
--------------------------------------------------------------------------------
1 | /*
2 | * ccShader_ControlSwitchMask_frag.h
3 | *
4 | * Copyright 2013 Yannick Loriot.
5 | * http://yannickloriot.com
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 | " \n\
28 | #ifdef GL_ES \n\
29 | precision lowp float; \n\
30 | #endif \n\
31 | \n\
32 | varying vec4 v_fragmentColor; \n\
33 | varying vec2 v_texCoord; \n\
34 | uniform sampler2D u_texture; \n\
35 | uniform sampler2D u_mask; \n\
36 | \n\
37 | void main() \n\
38 | { \n\
39 | vec4 texColor = texture2D(u_texture, v_texCoord); \n\
40 | vec4 maskColor = texture2D(u_mask, v_texCoord); \n\
41 | vec4 finalColor = vec4(texColor.r, texColor.g, texColor.b, maskColor.a * texColor.a); \n\
42 | gl_FragColor = v_fragmentColor * finalColor; \n\
43 | } \n\
44 | ";
--------------------------------------------------------------------------------
/CCControlExtension/CCControl/Utils/ARCMacro.h:
--------------------------------------------------------------------------------
1 | //
2 | // ARCMacros.h
3 | // InnerBand
4 | //
5 | // For an explanation of why these work, see:
6 | //
7 | // http://raptureinvenice.com/arc-support-without-branches/
8 | //
9 | // Created by John Blanco on 1/28/12.
10 | // Rapture In Venice releases all rights to this code. Feel free use and/or copy it openly and freely!
11 | //
12 | // NOTE: __bridge_tranfer is not included here because releasing would be inconsistent.
13 | // Avoid it unless you're using ARC exclusively or managing it with __has_feature(objc_arc).
14 | //
15 |
16 | #if !defined(__clang__) || __clang_major__ < 3
17 | #ifndef __bridge
18 | #define __bridge
19 | #endif
20 |
21 | #ifndef __bridge_retain
22 | #define __bridge_retain
23 | #endif
24 |
25 | #ifndef __bridge_retained
26 | #define __bridge_retained
27 | #endif
28 |
29 | #ifndef __autoreleasing
30 | #define __autoreleasing
31 | #endif
32 |
33 | #ifndef __strong
34 | #define __strong
35 | #endif
36 |
37 | #ifndef __unsafe_unretained
38 | #define __unsafe_unretained
39 | #endif
40 |
41 | #ifndef __weak
42 | #define __weak
43 | #endif
44 | #endif
45 |
46 | #if __has_feature(objc_arc)
47 | #define SAFE_ARC_PROP_RETAIN strong
48 | #define SAFE_ARC_RETAIN(x) (x)
49 | #define SAFE_ARC_RELEASE(x)
50 | #define SAFE_ARC_AUTORELEASE(x) (x)
51 | #define SAFE_ARC_BLOCK_COPY(x) (x)
52 | #define SAFE_ARC_BLOCK_RELEASE(x)
53 | #define SAFE_ARC_SUPER_DEALLOC()
54 | #define SAFE_ARC_AUTORELEASE_POOL_START() @autoreleasepool {
55 | #define SAFE_ARC_AUTORELEASE_POOL_END() }
56 | #else
57 | #define SAFE_ARC_PROP_RETAIN retain
58 | #define SAFE_ARC_RETAIN(x) ([(x) retain])
59 | #define SAFE_ARC_RELEASE(x) ([(x) release])
60 | #define SAFE_ARC_AUTORELEASE(x) ([(x) autorelease])
61 | #define SAFE_ARC_BLOCK_COPY(x) (Block_copy(x))
62 | #define SAFE_ARC_BLOCK_RELEASE(x) (Block_release(x))
63 | #define SAFE_ARC_SUPER_DEALLOC() ([super dealloc])
64 | #define SAFE_ARC_AUTORELEASE_POOL_START() NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
65 | #define SAFE_ARC_AUTORELEASE_POOL_END() [pool release];
66 | #endif
67 |
--------------------------------------------------------------------------------
/CCControlExtension/CCControl/Utils/CCColourUtils.h:
--------------------------------------------------------------------------------
1 | /*
2 | * ColourUtils.h
3 | *
4 | * Copyright 2012-present Stewart Hamilton-Arrandale.
5 | * http://creativewax.co.uk
6 | *
7 | * Modified by Yannick Loriot.
8 | * http://yannickloriot.com
9 | *
10 | * Permission is hereby granted, free of charge, to any person obtaining a copy
11 | * of this software and associated documentation files (the "Software"), to deal
12 | * in the Software without restriction, including without limitation the rights
13 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14 | * copies of the Software, and to permit persons to whom the Software is
15 | * furnished to do so, subject to the following conditions:
16 | *
17 | * The above copyright notice and this permission notice shall be included in
18 | * all copies or substantial portions of the Software.
19 | *
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
26 | * THE SOFTWARE.
27 | *
28 | */
29 |
30 | #import
31 |
32 | typedef struct
33 | {
34 | double r; // percent
35 | double g; // percent
36 | double b; // percent
37 | double a; // percent
38 | } RGBA;
39 |
40 | typedef struct
41 | {
42 | double h; // angle in degrees
43 | double s; // percent
44 | double v; // percent
45 | } HSV;
46 |
47 | @interface CCColourUtils : NSObject
48 |
49 | #pragma mark - Constuctors - Initializers
50 |
51 | #pragma mark - Public Methods
52 |
53 | + (HSV)HSVfromRGB:(RGBA)value;
54 | + (RGBA)RGBfromHSV:(HSV)value;
55 |
56 | @end
57 |
--------------------------------------------------------------------------------
/CCControlExtension/CCControlExtension.h:
--------------------------------------------------------------------------------
1 | /*
2 | * CCControlExtension.h
3 | *
4 | * Copyright 2012-present Yannick Loriot.
5 | * http://yannickloriot.com
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 | #ifndef CCControlExtension_h
28 | #define CCControlExtension_h
29 |
30 | #import "CCScale9Sprite.h"
31 |
32 | #import "CCControl.h"
33 | #import "CCControlButton.h"
34 | #import "CCControlColourPicker.h"
35 | #import "CCControlPicker.h"
36 | #import "CCControlPotentiometer.h"
37 | #import "CCControlSlider.h"
38 | #import "CCControlStepper.h"
39 | #import "CCControlSwitch.h"
40 |
41 | #endif
42 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios.xcodeproj/project.xcworkspace/xcuserdata/touchknow.xcuserdatad/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEWorkspaceUserSettings_HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges
6 |
7 | IDEWorkspaceUserSettings_SnapshotAutomaticallyBeforeSignificantChanges
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios.xcodeproj/xcuserdata/YannickL.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | cocos2d-gles20-cccontrol-examples-ios.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | C23875A61503DC13004BF57E
16 |
17 | primary
18 |
19 |
20 | F495C16816C82F500046272F
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios.xcodeproj/xcuserdata/touchknow.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios.xcodeproj/xcuserdata/touchknow.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | cocos2d-gles20-cccontrol-examples-ios.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | C23875A61503DC13004BF57E
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios.xcodeproj/xcuserdata/vlidholt.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | cocos2d-gles20-cccontrol-examples-ios.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | C23875A61503DC13004BF57E
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // CControlExtensionExample
4 | //
5 | // Created by Yannick Loriot on 04/03/12.
6 | // Copyright Yannick Loriot 2012. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "cocos2d.h"
11 |
12 | @interface AppController : NSObject
13 | {
14 | UIWindow *window_;
15 | UINavigationController *navController_;
16 |
17 | CCDirectorIOS *director_; // weak ref
18 | }
19 |
20 | @property (nonatomic, retain) UIWindow *window;
21 | @property (readonly) UINavigationController *navController;
22 | @property (readonly) CCDirectorIOS *director;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Mains/CCControlScene.h:
--------------------------------------------------------------------------------
1 | /*
2 | * CCControlScene.h
3 | *
4 | * Copyright (c) 2011 Yannick Loriot
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in
14 | * all copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | * THE SOFTWARE.
23 | *
24 | */
25 |
26 | #import
27 | #import "cocos2d.h"
28 |
29 | #import "CCControlExtension.h"
30 |
31 | @interface CCControlScene : CCLayer
32 | {
33 | @public
34 | CCLabelTTF *sceneTitleLabel;
35 | }
36 | /** Title label of the scene. */
37 | @property (nonatomic, retain) CCLabelTTF *sceneTitleLabel;
38 |
39 | #pragma mark Constructors - Initializers
40 |
41 | /**
42 | * Returns a CCScene that contains the CCControl example layer.
43 | *
44 | * @param title The title of the scene.
45 | */
46 | + (CCScene *)sceneWithTitle:(NSString *)title;
47 |
48 | #pragma mark Public Methods
49 |
50 | @end
51 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Mains/CCControlSceneManager.h:
--------------------------------------------------------------------------------
1 | /*
2 | * CCControlSceneManager.h
3 | *
4 | * Copyright (c) 2011 Yannick Loriot
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in
14 | * all copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | * THE SOFTWARE.
23 | *
24 | */
25 |
26 | #import "cocos2d.h"
27 |
28 | @interface CCControlSceneManager : NSObject
29 | {
30 | @private
31 | NSInteger currentControlSceneId;
32 | NSArray *controlScenes;
33 | }
34 |
35 | #pragma mark Constructors - Initializers
36 |
37 | /** Returns the singleton of the control scene manager. */
38 | + (CCControlSceneManager *)sharedControlSceneManager;
39 |
40 | #pragma mark Public Methods
41 |
42 | /** Returns the next control scene. */
43 | - (CCScene *)nextControlScene;
44 |
45 | /** Returns the previous control scene. */
46 | - (CCScene *)previousControlScene;
47 |
48 | /** Returns the current control scene. */
49 | - (CCScene *)currentControlScene;
50 |
51 | @end
52 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlButtonTest/CCControlButtonTest.h:
--------------------------------------------------------------------------------
1 | /*
2 | * CCControlButtonTest.h
3 | *
4 | * Copyright (c) 2011 Yannick Loriot
5 | * http://yannickloriot.com
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | *
25 | */
26 |
27 | #import "CCControlScene.h"
28 |
29 | @interface CCControlButtonTest_HelloVariableSize : CCControlScene
30 | {
31 | @protected
32 | }
33 |
34 | #pragma mark Constructors - Initializers
35 |
36 | #pragma mark Public Methods
37 |
38 | @end
39 |
40 | @interface CCControlButtonTest_Event : CCControlScene
41 | {
42 | @protected
43 | CCLabelTTF *displayEvents;
44 | }
45 |
46 | #pragma mark Constructors - Initializers
47 |
48 | #pragma mark Public Methods
49 |
50 | @end
51 |
52 | @interface CCControlButtonTest_Styling : CCControlScene
53 | {
54 | }
55 |
56 | #pragma mark Constructors - Initializers
57 |
58 | #pragma mark Public Methods
59 |
60 | @end
61 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlButtonTest/Resources/button-hd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlButtonTest/Resources/button-hd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlButtonTest/Resources/button.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlButtonTest/Resources/button.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlButtonTest/Resources/buttonBackground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlButtonTest/Resources/buttonBackground.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlButtonTest/Resources/buttonHighlighted-hd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlButtonTest/Resources/buttonHighlighted-hd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlButtonTest/Resources/buttonHighlighted.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlButtonTest/Resources/buttonHighlighted.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlColourPicker/CCControlColourPickerTest.h:
--------------------------------------------------------------------------------
1 | /*
2 | * CCControlColourPickerTest.h
3 | *
4 | * Copyright (c) 2012 Yannick Loriot
5 | * http://yannickloriot.com
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | *
25 | */
26 |
27 | #import "CCControlScene.h"
28 |
29 | @interface CCControlColourPickerTest : CCControlScene
30 | {
31 | @protected
32 | CCLabelTTF *colorLabel;
33 | }
34 |
35 | #pragma mark Constructors - Initializers
36 |
37 | #pragma mark Public Methods
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlColourPicker/Resources/hd/arrow-hd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlColourPicker/Resources/hd/arrow-hd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlColourPicker/Resources/hd/hueBackground-hd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlColourPicker/Resources/hd/hueBackground-hd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlColourPicker/Resources/hd/picker-hd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlColourPicker/Resources/hd/picker-hd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlColourPicker/Resources/hd/tintBackground-hd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlColourPicker/Resources/hd/tintBackground-hd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlColourPicker/Resources/hd/tintOverlay-hd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlColourPicker/Resources/hd/tintOverlay-hd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlColourPicker/Resources/ipad/arrow-ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlColourPicker/Resources/ipad/arrow-ipad.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlColourPicker/Resources/ipad/hueBackground-ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlColourPicker/Resources/ipad/hueBackground-ipad.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlColourPicker/Resources/ipad/picker-ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlColourPicker/Resources/ipad/picker-ipad.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlColourPicker/Resources/ipad/tintBackground-ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlColourPicker/Resources/ipad/tintBackground-ipad.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlColourPicker/Resources/ipad/tintOverlay-ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlColourPicker/Resources/ipad/tintOverlay-ipad.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlColourPicker/Resources/ipadhd/arrow-ipadhd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlColourPicker/Resources/ipadhd/arrow-ipadhd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlColourPicker/Resources/ipadhd/hueBackground-ipadhd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlColourPicker/Resources/ipadhd/hueBackground-ipadhd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlColourPicker/Resources/ipadhd/picker-ipadhd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlColourPicker/Resources/ipadhd/picker-ipadhd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlColourPicker/Resources/ipadhd/tintBackground-ipadhd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlColourPicker/Resources/ipadhd/tintBackground-ipadhd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlColourPicker/Resources/ipadhd/tintOverlay-ipadhd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlColourPicker/Resources/ipadhd/tintOverlay-ipadhd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlColourPicker/Resources/sd/arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlColourPicker/Resources/sd/arrow.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlColourPicker/Resources/sd/hueBackground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlColourPicker/Resources/sd/hueBackground.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlColourPicker/Resources/sd/picker.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlColourPicker/Resources/sd/picker.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlColourPicker/Resources/sd/tintBackground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlColourPicker/Resources/sd/tintBackground.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlColourPicker/Resources/sd/tintOverlay.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlColourPicker/Resources/sd/tintOverlay.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlPickerTest/CCControlPickerTest.h:
--------------------------------------------------------------------------------
1 | /*
2 | * CCControlPickerTest.h
3 | *
4 | * Copyright (c) 2013 Yannick Loriot
5 | * http://yannickloriot.com
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | *
25 | */
26 |
27 | #import "CCControlScene.h"
28 |
29 | @interface CCControlPickerTest : CCControlScene
30 | {
31 | @protected
32 | CCLabelTTF *_displayValueLabel;
33 | }
34 |
35 | @end
36 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlPickerTest/Resources/pickerBackground-hd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlPickerTest/Resources/pickerBackground-hd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlPickerTest/Resources/pickerBackground-ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlPickerTest/Resources/pickerBackground-ipad.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlPickerTest/Resources/pickerBackground-ipadhd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlPickerTest/Resources/pickerBackground-ipadhd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlPickerTest/Resources/pickerBackground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlPickerTest/Resources/pickerBackground.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlPickerTest/Resources/pickerSelection-hd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlPickerTest/Resources/pickerSelection-hd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlPickerTest/Resources/pickerSelection-ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlPickerTest/Resources/pickerSelection-ipad.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlPickerTest/Resources/pickerSelection-ipadhd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlPickerTest/Resources/pickerSelection-ipadhd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlPickerTest/Resources/pickerSelection.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlPickerTest/Resources/pickerSelection.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlPotentiometerTest/CCControlPotentiometerTest.h:
--------------------------------------------------------------------------------
1 | /*
2 | * CCControlPotentiometerTest.h
3 | *
4 | * Copyright (c) 2012 Yannick Loriot
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in
14 | * all copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | * THE SOFTWARE.
23 | *
24 | */
25 |
26 | #import "CCControlScene.h"
27 |
28 | @interface CCControlPotentiometerTest : CCControlScene
29 | {
30 | @protected
31 | CCLabelTTF *displayValueLabel;
32 | }
33 |
34 | #pragma mark Constructors - Initializers
35 |
36 | #pragma mark Public Methods
37 |
38 | @end
39 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlPotentiometerTest/Resources/potentiometerButton-hd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlPotentiometerTest/Resources/potentiometerButton-hd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlPotentiometerTest/Resources/potentiometerButton-ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlPotentiometerTest/Resources/potentiometerButton-ipad.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlPotentiometerTest/Resources/potentiometerButton-ipadhd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlPotentiometerTest/Resources/potentiometerButton-ipadhd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlPotentiometerTest/Resources/potentiometerButton.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlPotentiometerTest/Resources/potentiometerButton.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlPotentiometerTest/Resources/potentiometerProgress-hd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlPotentiometerTest/Resources/potentiometerProgress-hd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlPotentiometerTest/Resources/potentiometerProgress-ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlPotentiometerTest/Resources/potentiometerProgress-ipad.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlPotentiometerTest/Resources/potentiometerProgress-ipadhd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlPotentiometerTest/Resources/potentiometerProgress-ipadhd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlPotentiometerTest/Resources/potentiometerProgress.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlPotentiometerTest/Resources/potentiometerProgress.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlPotentiometerTest/Resources/potentiometerTrack-hd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlPotentiometerTest/Resources/potentiometerTrack-hd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlPotentiometerTest/Resources/potentiometerTrack-ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlPotentiometerTest/Resources/potentiometerTrack-ipad.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlPotentiometerTest/Resources/potentiometerTrack-ipadhd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlPotentiometerTest/Resources/potentiometerTrack-ipadhd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlPotentiometerTest/Resources/potentiometerTrack.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlPotentiometerTest/Resources/potentiometerTrack.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlSliderTest/CCControlSliderTest.h:
--------------------------------------------------------------------------------
1 | /*
2 | * CCControlSliderTest.h
3 | *
4 | * Copyright (c) 2011 Yannick Loriot
5 | * http://yannickloriot.com
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | *
25 | */
26 |
27 | #import "CCControlScene.h"
28 |
29 | @interface CCControlSliderTest : CCControlScene
30 | {
31 | @protected
32 | CCLabelTTF *displayValueLabel;
33 | }
34 |
35 | #pragma mark Constructors - Initializers
36 |
37 | #pragma mark Public Methods
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlSliderTest/Resources/sliderProgress-hd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlSliderTest/Resources/sliderProgress-hd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlSliderTest/Resources/sliderProgress.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlSliderTest/Resources/sliderProgress.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlSliderTest/Resources/sliderThumb-hd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlSliderTest/Resources/sliderThumb-hd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlSliderTest/Resources/sliderThumb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlSliderTest/Resources/sliderThumb.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlSliderTest/Resources/sliderTrack-hd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlSliderTest/Resources/sliderTrack-hd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlSliderTest/Resources/sliderTrack.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlSliderTest/Resources/sliderTrack.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlStepperTest/CCControlStepperTest.h:
--------------------------------------------------------------------------------
1 | /*
2 | * CCControlStepper.h
3 | *
4 | * Copyright (c) 2012 Yannick Loriot
5 | * http://yannickloriot.com
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | *
25 | */
26 |
27 | #import "CCControlScene.h"
28 |
29 | @interface CCControlStepperTest : CCControlScene
30 | {
31 | @protected
32 | CCLabelTTF *displayValueLabel;
33 | }
34 |
35 | @end
36 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlStepperTest/Resources/stepper-minus-hd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlStepperTest/Resources/stepper-minus-hd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlStepperTest/Resources/stepper-minus-ipadhd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlStepperTest/Resources/stepper-minus-ipadhd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlStepperTest/Resources/stepper-minus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlStepperTest/Resources/stepper-minus.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlStepperTest/Resources/stepper-plus-hd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlStepperTest/Resources/stepper-plus-hd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlStepperTest/Resources/stepper-plus-ipadhd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlStepperTest/Resources/stepper-plus-ipadhd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlStepperTest/Resources/stepper-plus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlStepperTest/Resources/stepper-plus.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlSwitchTest/CCControlSwitchTest.h:
--------------------------------------------------------------------------------
1 | /*
2 | * CCControlSwitchTest.h
3 | *
4 | * Copyright (c) 2012 Yannick Loriot
5 | * http://yannickloriot.com
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | *
25 | */
26 |
27 | #import "CCControlScene.h"
28 |
29 | @interface CCControlSwitchTest : CCControlScene
30 | {
31 | @protected
32 | CCLabelTTF *displayValueLabel;
33 | }
34 |
35 | @end
36 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlSwitchTest/Resources/switch-mask-hd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlSwitchTest/Resources/switch-mask-hd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlSwitchTest/Resources/switch-mask-ipadhd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlSwitchTest/Resources/switch-mask-ipadhd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlSwitchTest/Resources/switch-mask.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlSwitchTest/Resources/switch-mask.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlSwitchTest/Resources/switch-off-hd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlSwitchTest/Resources/switch-off-hd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlSwitchTest/Resources/switch-off-ipadhd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlSwitchTest/Resources/switch-off-ipadhd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlSwitchTest/Resources/switch-off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlSwitchTest/Resources/switch-off.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlSwitchTest/Resources/switch-on-hd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlSwitchTest/Resources/switch-on-hd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlSwitchTest/Resources/switch-on-ipadhd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlSwitchTest/Resources/switch-on-ipadhd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlSwitchTest/Resources/switch-on.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlSwitchTest/Resources/switch-on.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlSwitchTest/Resources/switch-thumb-hd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlSwitchTest/Resources/switch-thumb-hd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlSwitchTest/Resources/switch-thumb-ipadhd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlSwitchTest/Resources/switch-thumb-ipadhd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlSwitchTest/Resources/switch-thumb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Classes/Test/CCControlSwitchTest/Resources/switch-thumb.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/IntroLayer.h:
--------------------------------------------------------------------------------
1 | //
2 | // IntroLayer.h
3 | // CControlExtensionExample
4 | //
5 | // Created by Yannick Loriot on 1/3/13.
6 | // Copyright Yannick Loriot 2013. All rights reserved.
7 | //
8 |
9 |
10 | // When you import this file, you import all the cocos2d classes
11 | #import "cocos2d.h"
12 |
13 | // HelloWorldLayer
14 | @interface IntroLayer : CCLayer
15 | {
16 | }
17 |
18 | // returns a CCScene that contains the HelloWorldLayer as the only child
19 | +(CCScene *) scene;
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/IntroLayer.m:
--------------------------------------------------------------------------------
1 | //
2 | // IntroLayer.m
3 | // CControlExtensionExample
4 | //
5 | // Created by Yannick Loriot on 1/3/13.
6 | // Copyright Yannick Loriot 2013. All rights reserved.
7 | //
8 |
9 |
10 | // Import the interfaces
11 | #import "IntroLayer.h"
12 | #import "CCControlSceneManager.h"
13 |
14 |
15 | #pragma mark - IntroLayer
16 |
17 | // HelloWorldLayer implementation
18 | @implementation IntroLayer
19 |
20 | // Helper class method that creates a Scene with the HelloWorldLayer as the only child.
21 | +(CCScene *) scene
22 | {
23 | // 'scene' is an autorelease object.
24 | CCScene *scene = [CCScene node];
25 |
26 | // 'layer' is an autorelease object.
27 | IntroLayer *layer = [IntroLayer node];
28 |
29 | // add layer as a child to scene
30 | [scene addChild: layer];
31 |
32 | // return the scene
33 | return scene;
34 | }
35 |
36 | - (void)onEnter
37 | {
38 | [super onEnter];
39 |
40 | // Ask director for the window size
41 | CGSize size = [[CCDirector sharedDirector] winSize];
42 |
43 | CCSprite *background;
44 |
45 | if( UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone ) {
46 | background = [CCSprite spriteWithFile:@"Default.png"];
47 | background.rotation = 90;
48 | } else {
49 | background = [CCSprite spriteWithFile:@"Default-Landscape~ipad.png"];
50 | }
51 | background.position = ccp(size.width/2, size.height/2);
52 |
53 | // add the label as a child to this Layer
54 | [self addChild: background];
55 |
56 | // In one second transition to the new scene
57 | [self scheduleOnce:@selector(makeTransition:) delay:1];
58 | }
59 |
60 | - (void)makeTransition:(ccTime)dt
61 | {
62 | // Retrieve the scene manager
63 | CCControlSceneManager *sceneManager = [CCControlSceneManager sharedControlSceneManager];
64 |
65 | [[CCDirector sharedDirector] replaceScene:[CCTransitionCrossFade transitionWithDuration:0.2f scene:[sceneManager currentControlScene]]];
66 | }
67 | @end
68 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header for all source files of the 'Test' target in the 'Test' project
3 | //
4 |
5 | #import
6 |
7 | #ifndef __IPHONE_3_0
8 | #warning "This project uses features only available in iPhone SDK 3.0 and later."
9 | #endif
10 |
11 | #ifdef __OBJC__
12 | #import
13 | #import
14 | #endif
15 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/Default-568h@2x.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/Default-Landscape~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/Default-Landscape~ipad.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/Default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/Default.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/Default@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/Default@2x.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/Icon-72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/Icon-72.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/Icon.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/Icon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/Icon@2x.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/Images/background-hd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/Images/background-hd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/Images/background-ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/Images/background-ipad.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/Images/background-ipadhd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/Images/background-ipadhd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/Images/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/Images/background.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/Images/ribbon-hd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/Images/ribbon-hd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/Images/ribbon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/Images/ribbon.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleDisplayName
8 | CCControl
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleIconFile
12 |
13 | CFBundleIconFiles
14 |
15 | Icon.png
16 | Icon@2x.png
17 | Icon-72.png
18 |
19 | CFBundleIdentifier
20 | com.yourcompany.${PRODUCT_NAME:rfc1034identifier}
21 | CFBundleInfoDictionaryVersion
22 | 6.0
23 | CFBundleName
24 | ${PRODUCT_NAME}
25 | CFBundlePackageType
26 | APPL
27 | CFBundleShortVersionString
28 | 2.0
29 | CFBundleSignature
30 | ????
31 | CFBundleVersion
32 | 2.0
33 | LSRequiresIPhoneOS
34 |
35 | UIPrerenderedIcon
36 |
37 | UIRequiredDeviceCapabilities
38 |
39 | accelerometer
40 |
41 | opengles-2
42 |
43 |
44 | UIStatusBarHidden
45 |
46 | UIViewControllerBasedStatusBarAppearance
47 |
48 | UISupportedInterfaceOrientations
49 |
50 | UIInterfaceOrientationLandscapeRight
51 | UIInterfaceOrientationLandscapeLeft
52 |
53 | UISupportedInterfaceOrientations~ipad
54 |
55 | UIInterfaceOrientationLandscapeLeft
56 | UIInterfaceOrientationLandscapeRight
57 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/MenuImages/b1-hd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/MenuImages/b1-hd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/MenuImages/b1-ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/MenuImages/b1-ipad.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/MenuImages/b1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/MenuImages/b1.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/MenuImages/b2-hd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/MenuImages/b2-hd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/MenuImages/b2-ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/MenuImages/b2-ipad.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/MenuImages/b2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/MenuImages/b2.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/MenuImages/f1-hd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/MenuImages/f1-hd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/MenuImages/f1-ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/MenuImages/f1-ipad.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/MenuImages/f1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/MenuImages/f1.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/MenuImages/f2-hd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/MenuImages/f2-hd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/MenuImages/f2-ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/MenuImages/f2-ipad.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/MenuImages/f2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/MenuImages/f2.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/MenuImages/r1-hd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/MenuImages/r1-hd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/MenuImages/r1-ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/MenuImages/r1-ipad.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/MenuImages/r1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/MenuImages/r1.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/MenuImages/r2-hd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/MenuImages/r2-hd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/MenuImages/r2-ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/MenuImages/r2-ipad.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/MenuImages/r2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/MenuImages/r2.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/fps_images-hd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/fps_images-hd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/fps_images-ipadhd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/fps_images-ipadhd.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/fps_images.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/fps_images.png
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/iTunesArtwork:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yannickl/CCControlExtension/1a5fcb0aa0d62e575c3e78ceaa455c8225f46128/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Resources/iTunesArtwork
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Shaders/PositionColor.fsh:
--------------------------------------------------------------------------------
1 | // http://www.cocos2d-iphone.org
2 |
3 | #ifdef GL_ES
4 | precision lowp float;
5 | #endif
6 |
7 | varying vec4 v_fragmentColor;
8 |
9 | void main()
10 | {
11 | gl_FragColor = v_fragmentColor;
12 | }
13 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Shaders/PositionColor.vsh:
--------------------------------------------------------------------------------
1 | // http://www.cocos2d-iphone.org
2 |
3 | attribute vec4 a_position;
4 | attribute vec4 a_color;
5 |
6 | uniform mat4 u_MVPMatrix;
7 |
8 | #ifdef GL_ES
9 | varying lowp vec4 v_fragmentColor;
10 | #else
11 | varying vec4 v_fragmentColor;
12 | #endif
13 |
14 |
15 | void main()
16 | {
17 | gl_Position = u_MVPMatrix * a_position;
18 | v_fragmentColor = a_color;
19 | }
20 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Shaders/PositionTexture.fsh:
--------------------------------------------------------------------------------
1 | // http://www.cocos2d-iphone.org
2 |
3 | #ifdef GL_ES
4 | precision lowp float;
5 | #endif
6 |
7 | varying vec2 v_texCoord;
8 | uniform sampler2D u_texture;
9 |
10 | void main()
11 | {
12 | gl_FragColor = texture2D(u_texture, v_texCoord);
13 | }
14 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Shaders/PositionTexture.vsh:
--------------------------------------------------------------------------------
1 | // http://www.cocos2d-iphone.org
2 |
3 | attribute vec4 a_position;
4 | attribute vec2 a_texCoord;
5 |
6 | uniform mat4 u_MVPMatrix;
7 |
8 | #ifdef GL_ES
9 | varying mediump vec2 v_texCoord;
10 | #else
11 | varying vec2 v_texCoord;
12 | #endif
13 |
14 | void main()
15 | {
16 | gl_Position = u_MVPMatrix * a_position;
17 | v_texCoord = a_texCoord;
18 | }
19 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Shaders/PositionTextureA8Color.fsh:
--------------------------------------------------------------------------------
1 | // http://www.cocos2d-iphone.org
2 |
3 | #ifdef GL_ES
4 | precision lowp float;
5 | #endif
6 |
7 | varying vec4 v_fragmentColor;
8 | varying vec2 v_texCoord;
9 | uniform sampler2D u_texture;
10 |
11 | void main()
12 | {
13 | gl_FragColor = vec4( v_fragmentColor.rgb, // RGB from uniform
14 | v_fragmentColor.a * texture2D(u_texture, v_texCoord).a // A from texture & uniform
15 | );
16 | }
17 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Shaders/PositionTextureA8Color.vsh:
--------------------------------------------------------------------------------
1 | // http://www.cocos2d-iphone.org
2 |
3 | attribute vec4 a_position;
4 | attribute vec2 a_texCoord;
5 | attribute vec4 a_color;
6 |
7 | uniform mat4 u_MVPMatrix;
8 |
9 | #ifdef GL_ES
10 | varying lowp vec4 v_fragmentColor;
11 | varying mediump vec2 v_texCoord;
12 | #else
13 | varying vec4 v_fragmentColor;
14 | varying vec2 v_texCoord;
15 | #endif
16 |
17 | void main()
18 | {
19 | gl_Position = u_MVPMatrix * a_position;
20 | v_fragmentColor = a_color;
21 | v_texCoord = a_texCoord;
22 | }
23 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Shaders/PositionTextureColor.fsh:
--------------------------------------------------------------------------------
1 | // http://www.cocos2d-iphone.org
2 |
3 | #ifdef GL_ES
4 | precision lowp float;
5 | #endif
6 |
7 | varying vec4 v_fragmentColor;
8 | varying vec2 v_texCoord;
9 | uniform sampler2D u_texture;
10 |
11 | void main()
12 | {
13 | gl_FragColor = v_fragmentColor * texture2D(u_texture, v_texCoord);
14 | }
15 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Shaders/PositionTextureColor.vsh:
--------------------------------------------------------------------------------
1 | // http://www.cocos2d-iphone.org
2 |
3 | attribute vec4 a_position;
4 | attribute vec2 a_texCoord;
5 | attribute vec4 a_color;
6 |
7 | uniform mat4 u_MVPMatrix;
8 |
9 | #ifdef GL_ES
10 | varying lowp vec4 v_fragmentColor;
11 | varying mediump vec2 v_texCoord;
12 | #else
13 | varying vec4 v_fragmentColor;
14 | varying vec2 v_texCoord;
15 | #endif
16 |
17 | void main()
18 | {
19 | gl_Position = u_MVPMatrix * a_position;
20 | v_fragmentColor = a_color;
21 | v_texCoord = a_texCoord;
22 | }
23 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Shaders/PositionTextureColorAlphaTest.fsh:
--------------------------------------------------------------------------------
1 | // http://www.cocos2d-iphone.org
2 |
3 | #ifdef GL_ES
4 | precision lowp float;
5 | #endif
6 |
7 | uniform float u_alpha_value;
8 |
9 | varying vec4 v_fragmentColor;
10 | varying vec2 v_texCoord;
11 | uniform sampler2D u_texture;
12 |
13 | void main()
14 | {
15 | vec4 texColor = texture2D(u_texture, v_texCoord);
16 |
17 | //
18 | // mimic: glAlphaFunc(GL_GREATER)
19 | // pass if ( incoming_pixel >= u_alpha_value ) => fail if incoming_pixel < u_alpha_value
20 | //
21 | if ( texColor.a <= u_alpha_value )
22 | {
23 | discard;
24 | }
25 |
26 | gl_FragColor = texColor * v_fragmentColor;
27 | }
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Shaders/PositionTexture_uColor.fsh:
--------------------------------------------------------------------------------
1 | // http://www.cocos2d-iphone.org
2 |
3 | #ifdef GL_ES
4 | precision lowp float;
5 | #endif
6 |
7 | uniform vec4 u_color;
8 |
9 | varying vec2 v_texCoord;
10 |
11 | uniform sampler2D u_texture;
12 |
13 | void main()
14 | {
15 | gl_FragColor = texture2D(u_texture, v_texCoord) * u_color;
16 | }
17 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Shaders/PositionTexture_uColor.vsh:
--------------------------------------------------------------------------------
1 | // http://www.cocos2d-iphone.org
2 |
3 | attribute vec4 a_position;
4 | attribute vec2 a_texCoord;
5 |
6 | uniform mat4 u_MVPMatrix;
7 |
8 | #ifdef GL_ES
9 | varying mediump vec2 v_texCoord;
10 | #else
11 | varying vec2 v_texCoord;
12 | #endif
13 |
14 | void main()
15 | {
16 | gl_Position = u_MVPMatrix * a_position;
17 | v_texCoord = a_texCoord;
18 | }
19 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Shaders/Position_uColor.fsh:
--------------------------------------------------------------------------------
1 | // http://www.cocos2d-iphone.org
2 |
3 | #ifdef GL_ES
4 | precision lowp float;
5 | #endif
6 |
7 | varying vec4 v_fragmentColor;
8 |
9 | void main()
10 | {
11 | gl_FragColor = v_fragmentColor;
12 | }
13 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/Shaders/Position_uColor.vsh:
--------------------------------------------------------------------------------
1 | // http://www.cocos2d-iphone.org
2 |
3 | attribute vec4 a_position;
4 |
5 | uniform mat4 u_MVPMatrix;
6 | uniform vec4 u_color;
7 | uniform float u_pointSize;
8 |
9 | #ifdef GL_ES
10 | varying lowp vec4 v_fragmentColor;
11 | #else
12 | varying vec4 v_fragmentColor;
13 | #endif
14 |
15 | void main()
16 | {
17 | gl_Position = u_MVPMatrix * a_position;
18 | gl_PointSize = u_pointSize;
19 | v_fragmentColor = u_color;
20 | }
21 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/CocosDenshion/CDConfig.h:
--------------------------------------------------------------------------------
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 |
61 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/LICENSE_CocosDenshion.txt:
--------------------------------------------------------------------------------
1 | CocosDenshion Sound Engine
2 |
3 | Copyright (c) 2010 Steve Oldmeadow
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/LICENSE_Kazmath.txt:
--------------------------------------------------------------------------------
1 | Kazmath is a 3D math library aimed at game programming. It is released under the modified BSD license.
2 |
3 | Authors
4 |
5 | Luke Benstead
6 | Carsten Haubold
7 |
8 | License
9 |
10 | Copyright (c) 2008, Luke Benstead.
11 | All rights reserved.
12 |
13 | Redistribution and use in source and binary forms, with or without modification,
14 | are permitted provided that the following conditions are met:
15 |
16 | * Redistributions of source code must retain the above copyright notice,
17 | this list of conditions and the following disclaimer.
18 | * Redistributions in binary form must reproduce the above copyright notice,
19 | this list of conditions and the following disclaimer in the documentation
20 | and/or other materials provided with the distribution.
21 |
22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
23 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
24 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
25 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
26 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
27 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
29 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
31 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 |
33 |
34 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/LICENSE_cocos2d.txt:
--------------------------------------------------------------------------------
1 | cocos2d for iPhone: http://www.cocos2d-iphone.org
2 |
3 | Copyright (c) 2011 - Zynga Inc. and contributors
4 | (see each file to see the different copyright owners)
5 |
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 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/CCActionCamera.h:
--------------------------------------------------------------------------------
1 | /*
2 | * cocos2d for iPhone: http://www.cocos2d-iphone.org
3 | *
4 | * Copyright (c) 2008-2010 Ricardo Quesada
5 | * Copyright (c) 2011 Zynga Inc.
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | *
25 | */
26 |
27 | #import "CCActionInterval.h"
28 |
29 | @class CCCamera;
30 |
31 | /** Base class for CCCamera actions
32 | */
33 | @interface CCActionCamera : CCActionInterval
34 | {
35 | float centerXOrig_;
36 | float centerYOrig_;
37 | float centerZOrig_;
38 |
39 | float eyeXOrig_;
40 | float eyeYOrig_;
41 | float eyeZOrig_;
42 |
43 | float upXOrig_;
44 | float upYOrig_;
45 | float upZOrig_;
46 | }
47 | @end
48 |
49 | /** CCOrbitCamera action
50 | Orbits the camera around the center of the screen using spherical coordinates
51 | */
52 | @interface CCOrbitCamera : CCActionCamera
53 | {
54 | float radius_;
55 | float deltaRadius_;
56 | float angleZ_;
57 | float deltaAngleZ_;
58 | float angleX_;
59 | float deltaAngleX_;
60 |
61 | float radZ_;
62 | float radDeltaZ_;
63 | float radX_;
64 | float radDeltaX_;
65 |
66 | }
67 | /** creates a CCOrbitCamera action with radius, delta-radius, z, deltaZ, x, deltaX */
68 | +(id) actionWithDuration:(float) t radius:(float)r deltaRadius:(float) dr angleZ:(float)z deltaAngleZ:(float)dz angleX:(float)x deltaAngleX:(float)dx;
69 | /** initializes a CCOrbitCamera action with radius, delta-radius, z, deltaZ, x, deltaX */
70 | -(id) initWithDuration:(float) t radius:(float)r deltaRadius:(float) dr angleZ:(float)z deltaAngleZ:(float)dz angleX:(float)x deltaAngleX:(float)dx;
71 | /** positions the camera according to spherical coordinates */
72 | -(void) sphericalRadius:(float*) r zenith:(float*) zenith azimuth:(float*) azimuth;
73 | @end
74 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/CCActionPageTurn3D.h:
--------------------------------------------------------------------------------
1 | /*
2 | * cocos2d for iPhone: http://www.cocos2d-iphone.org
3 | *
4 | * Copyright (c) 2009 Sindesso Pty Ltd http://www.sindesso.com/
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in
14 | * all copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | * THE SOFTWARE.
23 | *
24 | */
25 |
26 |
27 | #import "CCActionGrid3D.h"
28 |
29 | /**
30 | * This action simulates a page turn from the bottom right hand corner of the screen
31 | * It's not much use by itself but is used by the PageTurnTransition.
32 | *
33 | * Based on an original paper by L Hong et al.
34 | * http://www.parc.com/publication/1638/turning-pages-of-3d-electronic-books.html
35 | *
36 | * @since v0.8.2
37 | */
38 | @interface CCPageTurn3D : CCGrid3DAction
39 | {
40 | }
41 |
42 | @end
43 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/CCActionProgressTimer.h:
--------------------------------------------------------------------------------
1 | /*
2 | * cocos2d for iPhone: http://www.cocos2d-iphone.org
3 | *
4 | * Copyright (C) 2010 Lam Pham
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in
14 | * all copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | * THE SOFTWARE.
23 | *
24 | */
25 |
26 |
27 | #import
28 | #import "CCProgressTimer.h"
29 | #import "CCActionInterval.h"
30 |
31 | /**
32 | Progress to percentage
33 | @since v0.99.1
34 | */
35 | @interface CCProgressTo : CCActionInterval
36 | {
37 | float to_;
38 | float from_;
39 | }
40 | /** Creates and initializes with a duration and a percent */
41 | +(id) actionWithDuration:(ccTime)duration percent:(float)percent;
42 | /** Initializes with a duration and a percent */
43 | -(id) initWithDuration:(ccTime)duration percent:(float)percent;
44 | @end
45 |
46 | /**
47 | Progress from a percentage to another percentage
48 | @since v0.99.1
49 | */
50 | @interface CCProgressFromTo : CCActionInterval
51 | {
52 | float to_;
53 | float from_;
54 | }
55 | /** Creates and initializes the action with a duration, a "from" percentage and a "to" percentage */
56 | +(id) actionWithDuration:(ccTime)duration from:(float)fromPercentage to:(float) toPercentage;
57 | /** Initializes the action with a duration, a "from" percentage and a "to" percentage */
58 | -(id) initWithDuration:(ccTime)duration from:(float)fromPercentage to:(float) toPercentage;
59 | @end
60 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/CCActionTween.h:
--------------------------------------------------------------------------------
1 | /*
2 | * cocos2d for iPhone: http://www.cocos2d-iphone.org
3 | *
4 | * Copyright 2009 lhunath (Maarten Billemont)
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in
14 | * all copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | * THE SOFTWARE.
23 | *
24 | */
25 |
26 |
27 | #import
28 | #import "CCActionInterval.h"
29 |
30 | /** CCActionTween
31 |
32 | CCActionTween is an action that lets you update any property of an object.
33 | For example, if you want to modify the "width" property of a target from 200 to 300 in 2 seconds, then:
34 |
35 | id modifyWidth = [CCActionTween actionWithDuration:2 key:@"width" from:200 to:300];
36 | [target runAction:modifyWidth];
37 |
38 |
39 | Another example: CCScaleTo action could be rewriten using CCPropertyAction:
40 |
41 | // scaleA and scaleB are equivalents
42 | id scaleA = [CCScaleTo actionWithDuration:2 scale:3];
43 | id scaleB = [CCActionTween actionWithDuration:2 key:@"scale" from:1 to:3];
44 |
45 |
46 | @since v0.99.2
47 | */
48 | @interface CCActionTween : CCActionInterval
49 | {
50 | NSString *key_;
51 |
52 | float from_, to_;
53 | float delta_;
54 | }
55 |
56 | /** creates an initializes the action with the property name (key), and the from and to parameters. */
57 | + (id)actionWithDuration:(ccTime)aDuration key:(NSString *)key from:(float)from to:(float)to;
58 |
59 | /** initializes the action with the property name (key), and the from and to parameters. */
60 | - (id)initWithDuration:(ccTime)aDuration key:(NSString *)key from:(float)from to:(float)to;
61 |
62 | @end
63 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/CCActionTween.m:
--------------------------------------------------------------------------------
1 | /*
2 | * cocos2d for iPhone: http://www.cocos2d-iphone.org
3 | *
4 | * Copyright 2009 lhunath (Maarten Billemont)
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in
14 | * all copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | * THE SOFTWARE.
23 | *
24 | */
25 |
26 | #import "CCActionTween.h"
27 |
28 |
29 | @implementation CCActionTween
30 |
31 | + (id)actionWithDuration:(ccTime)aDuration key:(NSString *)aKey from:(float)aFrom to:(float)aTo {
32 |
33 | return [[[[self class] alloc] initWithDuration:aDuration key:aKey from:aFrom to:aTo] autorelease];
34 | }
35 |
36 | - (id)initWithDuration:(ccTime)aDuration key:(NSString *)key from:(float)from to:(float)to {
37 |
38 | if ((self = [super initWithDuration:aDuration])) {
39 |
40 | key_ = [key copy];
41 | to_ = to;
42 | from_ = from;
43 |
44 | }
45 |
46 | return self;
47 | }
48 |
49 | - (void) dealloc
50 | {
51 | [key_ release];
52 | [super dealloc];
53 | }
54 |
55 | - (void)startWithTarget:aTarget
56 | {
57 | [super startWithTarget:aTarget];
58 | delta_ = to_ - from_;
59 | }
60 |
61 | - (void) update:(ccTime) dt
62 | {
63 | [target_ setValue:[NSNumber numberWithFloat:to_ - delta_ * (1 - dt)] forKey:key_];
64 | }
65 |
66 | - (CCActionInterval *) reverse
67 | {
68 | return [[self class] actionWithDuration:duration_ key:key_ from:to_ to:from_];
69 | }
70 |
71 |
72 | @end
73 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/CCAnimationCache.h:
--------------------------------------------------------------------------------
1 | /*
2 | * cocos2d for iPhone: http://www.cocos2d-iphone.org
3 | *
4 | * Copyright (c) 2010 Ricardo Quesada
5 | * Copyright (c) 2011 Zynga Inc.
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | *
25 | */
26 |
27 | #import
28 |
29 | @class CCAnimation;
30 |
31 | /** Singleton that manages the CCAnimation objects.
32 | It saves in a cache the animations. You should use this class if you want to save your animations in a cache.
33 |
34 | @since v0.99.5
35 | */
36 | @interface CCAnimationCache : NSObject
37 | {
38 | NSMutableDictionary *animations_;
39 | }
40 |
41 | /** Retruns ths shared instance of the Animation cache */
42 | + (CCAnimationCache *) sharedAnimationCache;
43 |
44 | /** Purges the cache. It releases all the CCAnimation objects and the shared instance.
45 | */
46 | +(void)purgeSharedAnimationCache;
47 |
48 | /** Adds a CCAnimation with a name.
49 | */
50 | -(void) addAnimation:(CCAnimation*)animation name:(NSString*)name;
51 |
52 | /** Deletes a CCAnimation from the cache.
53 | */
54 | -(void) removeAnimationByName:(NSString*)name;
55 |
56 | /** Returns a CCAnimation that was previously added.
57 | If the name is not found it will return nil.
58 | You should retain the returned copy if you are going to use it.
59 | */
60 | -(CCAnimation*) animationByName:(NSString*)name;
61 |
62 | /** Adds an animation from an NSDictionary
63 | Make sure that the frames were previously loaded in the CCSpriteFrameCache.
64 | @since v1.1
65 | */
66 | -(void)addAnimationsWithDictionary:(NSDictionary *)dictionary;
67 |
68 | /** Adds an animation from a plist file.
69 | Make sure that the frames were previously loaded in the CCSpriteFrameCache.
70 | @since v1.1
71 | */
72 | -(void)addAnimationsWithFile:(NSString *)plist;
73 |
74 | @end
75 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/CCGrabber.h:
--------------------------------------------------------------------------------
1 | /*
2 | * cocos2d for iPhone: http://www.cocos2d-iphone.org
3 | *
4 | * Copyright (c) 2009 On-Core
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in
14 | * all copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | * THE SOFTWARE.
23 | *
24 | */
25 |
26 |
27 | #import "Platforms/CCGL.h"
28 | #import
29 |
30 | @class CCTexture2D;
31 |
32 | /** FBO class that grabs the the contents of the screen */
33 | @interface CCGrabber : NSObject
34 | {
35 | GLuint fbo_;
36 | GLint oldFBO_;
37 | GLfloat oldClearColor_[4];
38 | }
39 |
40 | -(void)grab:(CCTexture2D*)texture;
41 | -(void)beforeRender:(CCTexture2D*)texture;
42 | -(void)afterRender:(CCTexture2D*)texture;
43 |
44 | @end
45 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/CCNode+Debug.h:
--------------------------------------------------------------------------------
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 | #import "CCNode.h"
26 |
27 | #ifdef DEBUG
28 |
29 | /** Debugging extensions of CCNode.
30 | They are available when the DEBUG macro is defined at compile time
31 | */
32 | @interface CCNode (Debug)
33 |
34 | /** prints on the debug console the scene graph */
35 | -(void) walkSceneGraph:(NSUInteger)level;
36 |
37 | @end
38 |
39 | #endif // DEBUG
40 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/CCNode+Debug.m:
--------------------------------------------------------------------------------
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 | #import "CCNode+Debug.h"
26 |
27 | #ifdef DEBUG
28 |
29 | @implementation CCNode (Debug)
30 |
31 | -(void) walkSceneGraph:(NSUInteger)level
32 | {
33 | char buf[64];
34 | NSUInteger i=0;
35 | for( i=0; idata;
45 | i = 0;
46 |
47 | // draw children zOrder < 0
48 | for( ; i < arrayData->num; i++ ) {
49 | CCNode *child = arrayData->arr[i];
50 | if ( [child zOrder] < 0 )
51 | [child walkSceneGraph:level+1];
52 | else
53 | break;
54 | }
55 |
56 | // self draw
57 | NSLog(@"walk tree: %s> %@ %p", buf, self, self);
58 |
59 | // draw children zOrder >= 0
60 | for( ; i < arrayData->num; i++ ) {
61 | CCNode *child = arrayData->arr[i];
62 | [child walkSceneGraph:level+1];
63 | }
64 |
65 | } else
66 | NSLog(@"walk tree: %s> %@ %p", buf, self, self);
67 |
68 | }
69 | @end
70 |
71 | #endif // DEBUG
72 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/CCParallaxNode.h:
--------------------------------------------------------------------------------
1 | /*
2 | * cocos2d for iPhone: http://www.cocos2d-iphone.org
3 | *
4 | * Copyright (c) 2009-2010 Ricardo Quesada
5 | * Copyright (c) 2011 Zynga Inc.
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | *
25 | */
26 |
27 | #import "CCNode.h"
28 | #import "Support/ccCArray.h"
29 |
30 | /** CCParallaxNode: A node that simulates a parallax scroller
31 |
32 | The children will be moved faster / slower than the parent according the the parallax ratio.
33 |
34 | */
35 | @interface CCParallaxNode : CCNode
36 | {
37 | ccArray *parallaxArray_;
38 | CGPoint lastPosition;
39 | }
40 |
41 | /** array that holds the offset / ratio of the children */
42 | @property (nonatomic,readwrite) ccArray * parallaxArray;
43 |
44 | /** Adds a child to the container with a z-order, a parallax ratio and a position offset
45 | It returns self, so you can chain several addChilds.
46 | @since v0.8
47 | */
48 | -(void) addChild: (CCNode*)node z:(NSInteger)z parallaxRatio:(CGPoint)c positionOffset:(CGPoint)positionOffset;
49 |
50 | @end
51 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/CCParticleExamples.h:
--------------------------------------------------------------------------------
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 "ccMacros.h"
29 | #import "CCParticleSystemQuad.h"
30 |
31 | //! A fire particle system
32 | @interface CCParticleFire: CCParticleSystemQuad
33 | {
34 | }
35 | @end
36 |
37 | //! A fireworks particle system
38 | @interface CCParticleFireworks : CCParticleSystemQuad
39 | {
40 | }
41 | @end
42 |
43 | //! A sun particle system
44 | @interface CCParticleSun : CCParticleSystemQuad
45 | {
46 | }
47 | @end
48 |
49 | //! A galaxy particle system
50 | @interface CCParticleGalaxy : CCParticleSystemQuad
51 | {
52 | }
53 | @end
54 |
55 | //! A flower particle system
56 | @interface CCParticleFlower : CCParticleSystemQuad
57 | {
58 | }
59 | @end
60 |
61 | //! A meteor particle system
62 | @interface CCParticleMeteor : CCParticleSystemQuad
63 | {
64 | }
65 | @end
66 |
67 | //! An spiral particle system
68 | @interface CCParticleSpiral : CCParticleSystemQuad
69 | {
70 | }
71 | @end
72 |
73 | //! An explosion particle system
74 | @interface CCParticleExplosion : CCParticleSystemQuad
75 | {
76 | }
77 | @end
78 |
79 | //! An smoke particle system
80 | @interface CCParticleSmoke : CCParticleSystemQuad
81 | {
82 | }
83 | @end
84 |
85 | //! An snow particle system
86 | @interface CCParticleSnow : CCParticleSystemQuad
87 | {
88 | }
89 | @end
90 |
91 | //! A rain particle system
92 | @interface CCParticleRain : CCParticleSystemQuad
93 | {
94 | }
95 | @end
96 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/CCParticleSystemQuad.h:
--------------------------------------------------------------------------------
1 | /*
2 | * cocos2d for iPhone: http://www.cocos2d-iphone.org
3 | *
4 | * Copyright (c) 2009 Leonardo Kasperavičius
5 | *
6 | * Copyright (c) 2008-2010 Ricardo Quesada
7 | * Copyright (c) 2011 Zynga Inc.
8 | *
9 | * Permission is hereby granted, free of charge, to any person obtaining a copy
10 | * of this software and associated documentation files (the "Software"), to deal
11 | * in the Software without restriction, including without limitation the rights
12 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 | * copies of the Software, and to permit persons to whom the Software is
14 | * furnished to do so, subject to the following conditions:
15 | *
16 | * The above copyright notice and this permission notice shall be included in
17 | * all copies or substantial portions of the Software.
18 | *
19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | * THE SOFTWARE.
26 | *
27 | */
28 |
29 |
30 | #import "CCParticleSystem.h"
31 | #import "ccConfig.h"
32 |
33 | @class CCSpriteFrame;
34 |
35 | /** CCParticleSystemQuad is a subclass of CCParticleSystem
36 |
37 | It includes all the features of ParticleSystem.
38 |
39 | Special features and Limitations:
40 | - Particle size can be any float number.
41 | - The system can be scaled
42 | - The particles can be rotated
43 | - It supports subrects
44 | - It supports batched rendering since 1.1
45 | @since v0.8
46 | */
47 | @interface CCParticleSystemQuad : CCParticleSystem
48 | {
49 | ccV3F_C4B_T2F_Quad *quads_; // quads to be rendered
50 | GLushort *indices_; // indices
51 | GLuint VAOname_;
52 | GLuint buffersVBO_[2]; //0: vertex 1: indices
53 | }
54 |
55 | /** initialices the indices for the vertices */
56 | -(void) initIndices;
57 |
58 | /** initilizes the texture with a rectangle measured Points */
59 | -(void) initTexCoordsWithRect:(CGRect)rect;
60 |
61 | /** Sets a new CCSpriteFrame as particle.
62 | WARNING: this method is experimental. Use setTexture:withRect instead.
63 | @since v0.99.4
64 | */
65 | -(void)setDisplayFrame:(CCSpriteFrame*)spriteFrame;
66 |
67 | /** Sets a new texture with a rect. The rect is in Points.
68 | @since v0.99.4
69 | */
70 | -(void) setTexture:(CCTexture2D *)texture withRect:(CGRect)rect;
71 |
72 | @end
73 |
74 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/CCScene.h:
--------------------------------------------------------------------------------
1 | /*
2 | * cocos2d for iPhone: http://www.cocos2d-iphone.org
3 | *
4 | * Copyright (c) 2008-2010 Ricardo Quesada
5 | * Copyright (c) 2011 Zynga Inc.
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | *
25 | */
26 |
27 |
28 | #import "CCNode.h"
29 |
30 | /** CCScene is a subclass of CCNode that is used only as an abstract concept.
31 |
32 | CCScene an CCNode are almost identical with the difference that CCScene has its
33 | anchor point (by default) at the center of the screen.
34 |
35 | For the moment CCScene has no other logic than that, but in future releases it might have
36 | additional logic.
37 |
38 | It is a good practice to use and CCScene as the parent of all your nodes.
39 | */
40 | @interface CCScene : CCNode
41 | {
42 | }
43 | @end
44 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/CCScene.m:
--------------------------------------------------------------------------------
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 "CCScene.h"
29 | #import "Support/CGPointExtension.h"
30 | #import "CCDirector.h"
31 |
32 |
33 | @implementation CCScene
34 | -(id) init
35 | {
36 | if( (self=[super init]) ) {
37 | CGSize s = [[CCDirector sharedDirector] winSize];
38 | self.ignoreAnchorPointForPosition = YES;
39 | anchorPoint_ = ccp(0.5f, 0.5f);
40 | [self setContentSize:s];
41 | }
42 |
43 | return self;
44 | }
45 | @end
46 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/CCShaderCache.h:
--------------------------------------------------------------------------------
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 | #import
27 | #import "ccMacros.h"
28 | #ifdef __CC_PLATFORM_IOS
29 | #import
30 | #endif // __CC_PLATFORM_IOS
31 |
32 | @class CCGLProgram;
33 |
34 | /** CCShaderCache
35 | Singleton that stores manages GL shaders
36 | @since v2.0
37 | */
38 | @interface CCShaderCache : NSObject {
39 |
40 | NSMutableDictionary *programs_;
41 |
42 | }
43 |
44 | /** returns the shared instance */
45 | + (CCShaderCache *)sharedShaderCache;
46 |
47 | /** purges the cache. It releases the retained instance. */
48 | +(void)purgeSharedShaderCache;
49 |
50 | /** loads the default shaders */
51 | -(void) loadDefaultShaders;
52 |
53 | /** returns a GL program for a given key */
54 | -(CCGLProgram *) programForKey:(NSString*)key;
55 |
56 | /** adds a CCGLProgram to the cache for a given name */
57 | - (void) addProgram:(CCGLProgram*)program forKey:(NSString*)key;
58 |
59 | @end
60 |
61 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/CCTMXObjectGroup.h:
--------------------------------------------------------------------------------
1 | /*
2 | * cocos2d for iPhone: http://www.cocos2d-iphone.org
3 | *
4 | * Copyright (c) 2010 Neophit
5 | *
6 | * Copyright (c) 2010 Ricardo Quesada
7 | * Copyright (c) 2011 Zynga Inc.
8 | *
9 | * Permission is hereby granted, free of charge, to any person obtaining a copy
10 | * of this software and associated documentation files (the "Software"), to deal
11 | * in the Software without restriction, including without limitation the rights
12 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 | * copies of the Software, and to permit persons to whom the Software is
14 | * furnished to do so, subject to the following conditions:
15 | *
16 | * The above copyright notice and this permission notice shall be included in
17 | * all copies or substantial portions of the Software.
18 | *
19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | * THE SOFTWARE.
26 | *
27 | *
28 | * TMX Tiled Map support:
29 | * http://www.mapeditor.org
30 | *
31 | */
32 |
33 | #import "CCNode.h"
34 |
35 |
36 | @class CCTMXObjectGroup;
37 |
38 |
39 | /** CCTMXObjectGroup represents the TMX object group.
40 | @since v0.99.0
41 | */
42 | @interface CCTMXObjectGroup : NSObject
43 | {
44 | NSString *groupName_;
45 | CGPoint positionOffset_;
46 | NSMutableArray *objects_;
47 | NSMutableDictionary *properties_;
48 | }
49 |
50 | /** name of the group */
51 | @property (nonatomic,readwrite,retain) NSString *groupName;
52 | /** offset position of child objects */
53 | @property (nonatomic,readwrite,assign) CGPoint positionOffset;
54 | /** array of the objects */
55 | @property (nonatomic,readwrite,retain) NSMutableArray *objects;
56 | /** list of properties stored in a dictionary */
57 | @property (nonatomic,readwrite,retain) NSMutableDictionary *properties;
58 |
59 | /** return the value for the specific property name */
60 | -(id) propertyNamed:(NSString *)propertyName;
61 |
62 | /** return the dictionary for the specific object name.
63 | It will return the 1st object found on the array for the given name.
64 | */
65 | -(NSMutableDictionary*) objectNamed:(NSString *)objectName;
66 |
67 | @end
68 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/CCTMXObjectGroup.m:
--------------------------------------------------------------------------------
1 | /*
2 | * cocos2d for iPhone: http://www.cocos2d-iphone.org
3 | *
4 | * Copyright (c) 2010 Neophit
5 | *
6 | * Copyright (c) 2010 Ricardo Quesada
7 | * Copyright (c) 2011 Zynga Inc.
8 | *
9 | * Permission is hereby granted, free of charge, to any person obtaining a copy
10 | * of this software and associated documentation files (the "Software"), to deal
11 | * in the Software without restriction, including without limitation the rights
12 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 | * copies of the Software, and to permit persons to whom the Software is
14 | * furnished to do so, subject to the following conditions:
15 | *
16 | * The above copyright notice and this permission notice shall be included in
17 | * all copies or substantial portions of the Software.
18 | *
19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | * THE SOFTWARE.
26 | *
27 | *
28 | * TMX Tiled Map support:
29 | * http://www.mapeditor.org
30 | *
31 | */
32 |
33 | #import "CCTMXObjectGroup.h"
34 | #import "CCTMXXMLParser.h"
35 | #import "ccMacros.h"
36 | #import "Support/CGPointExtension.h"
37 |
38 |
39 | #pragma mark -
40 | #pragma mark TMXObjectGroup
41 |
42 | @implementation CCTMXObjectGroup
43 |
44 | @synthesize groupName = groupName_;
45 | @synthesize objects = objects_;
46 | @synthesize positionOffset = positionOffset_;
47 | @synthesize properties = properties_;
48 |
49 | -(id) init
50 | {
51 | if (( self=[super init] )) {
52 | self.groupName = nil;
53 | self.positionOffset = CGPointZero;
54 | self.objects = [NSMutableArray arrayWithCapacity:10];
55 | self.properties = [NSMutableDictionary dictionaryWithCapacity:5];
56 | }
57 | return self;
58 | }
59 |
60 | -(void) dealloc
61 | {
62 | CCLOGINFO( @"cocos2d: deallocing %@", self );
63 |
64 | [groupName_ release];
65 | [objects_ release];
66 | [properties_ release];
67 | [super dealloc];
68 | }
69 |
70 | -(NSMutableDictionary*) objectNamed:(NSString *)objectName
71 | {
72 | for( id object in objects_ ) {
73 | if( [[object valueForKey:@"name"] isEqual:objectName] )
74 | return object;
75 | }
76 |
77 | // object not found
78 | return nil;
79 | }
80 |
81 | -(id) propertyNamed:(NSString *)propertyName
82 | {
83 | return [properties_ valueForKey:propertyName];
84 | }
85 |
86 | @end
87 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/CCTransitionPageTurn.h:
--------------------------------------------------------------------------------
1 | /*
2 | * cocos2d for iPhone: http://www.cocos2d-iphone.org
3 | *
4 | * Copyright (c) 2009 Sindesso Pty Ltd http://www.sindesso.com/
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in
14 | * all copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | * THE SOFTWARE.
23 | *
24 | */
25 |
26 |
27 | #import "CCTransition.h"
28 |
29 | /** CCTransitionPageTurn transition.
30 | * A transition which peels back the bottom right hand corner of a scene
31 | * to transition to the scene beneath it simulating a page turn
32 | *
33 | * This uses a 3DAction so it is strongly recommended that depth buffering
34 | * is turned on in CCDirector using:
35 | *
36 | * [[CCDirector sharedDirector] setDepthBufferFormat:kCCDepthBuffer16];
37 | *
38 | * @since v0.8.2
39 | */
40 | @interface CCTransitionPageTurn : CCTransitionScene
41 | {
42 | BOOL back_;
43 | }
44 | /**
45 | * creates a base transition with duration and incoming scene
46 | * if back is TRUE then the effect is reversed to appear as if the incoming
47 | * scene is being turned from left over the outgoing scene
48 | */
49 | +(id) transitionWithDuration:(ccTime) t scene:(CCScene*)s backwards:(BOOL) back;
50 |
51 | /**
52 | * creates a base transition with duration and incoming scene
53 | * if back is TRUE then the effect is reversed to appear as if the incoming
54 | * scene is being turned from left over the outgoing scene
55 | */
56 | -(id) initWithDuration:(ccTime) t scene:(CCScene*)s backwards:(BOOL) back;
57 |
58 | -(CCActionInterval*) actionWithSize:(ccGridSize) vector;
59 |
60 | @end
61 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/CCTransitionProgress.h:
--------------------------------------------------------------------------------
1 | /*
2 | * cocos2d for iPhone: http://www.cocos2d-iphone.org
3 | *
4 | * Copyright (c) 2009 Lam Pham
5 | *
6 | * Copyright (c) 2012 Ricardo Quesada
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy
9 | * of this software and associated documentation files (the "Software"), to deal
10 | * in the Software without restriction, including without limitation the rights
11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 | * copies of the Software, and to permit persons to whom the Software is
13 | * furnished to do so, subject to the following conditions:
14 | *
15 | * The above copyright notice and this permission notice shall be included in
16 | * all copies or substantial portions of the Software.
17 | *
18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24 | * THE SOFTWARE.
25 | *
26 | */
27 |
28 | #import "CCTransition.h"
29 |
30 | @interface CCTransitionProgress : CCTransitionScene
31 | {
32 | float to_, from_;
33 | CCScene *sceneToBeModified_;
34 | }
35 | @end
36 |
37 | /** CCTransitionRadialCCW transition.
38 | A counter colock-wise radial transition to the next scene
39 | */
40 | @interface CCTransitionProgressRadialCCW : CCTransitionProgress
41 | @end
42 |
43 | /** CCTransitionRadialCW transition.
44 | A counter colock-wise radial transition to the next scene
45 | */
46 | @interface CCTransitionProgressRadialCW : CCTransitionProgress
47 | @end
48 |
49 | /** CCTransitionProgressHorizontal transition.
50 | A colock-wise radial transition to the next scene
51 | */
52 | @interface CCTransitionProgressHorizontal : CCTransitionProgress
53 | @end
54 |
55 | @interface CCTransitionProgressVertical : CCTransitionProgress
56 | @end
57 |
58 | @interface CCTransitionProgressInOut : CCTransitionProgress
59 | @end
60 |
61 | @interface CCTransitionProgressOutIn : CCTransitionProgress
62 | @end
63 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/Platforms/CCGL.h:
--------------------------------------------------------------------------------
1 | /*
2 | * cocos2d for iPhone: http://www.cocos2d-iphone.org
3 | *
4 | * Copyright (c) 2010 Ricardo Quesada
5 | * Copyright (c) 2011 Zynga Inc.
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 |
26 | //
27 | // Common layer for OpenGL stuff
28 | //
29 |
30 | #import "../ccMacros.h"
31 |
32 | #if __CC_PLATFORM_IOS
33 | #import
34 | #import
35 | #import
36 | #import "iOS/CCGLView.h"
37 |
38 | #elif __CC_PLATFORM_MAC
39 | #import
40 | #import
41 | #import // needed for NSOpenGLView
42 | #import "Mac/CCGLView.h"
43 | #endif
44 |
45 |
46 | // iOS
47 | #if __CC_PLATFORM_IOS
48 | #define glClearDepth glClearDepthf
49 | #define glDeleteVertexArrays glDeleteVertexArraysOES
50 | #define glGenVertexArrays glGenVertexArraysOES
51 | #define glBindVertexArray glBindVertexArrayOES
52 |
53 | #define CC_GL_DEPTH24_STENCIL8 GL_DEPTH24_STENCIL8_OES
54 |
55 | // Mac
56 | #elif __CC_PLATFORM_MAC
57 |
58 | #define CC_GL_DEPTH24_STENCIL8 GL_DEPTH24_STENCIL8
59 |
60 | #if 1
61 | #define glDeleteVertexArrays glDeleteVertexArraysAPPLE
62 | #define glGenVertexArrays glGenVertexArraysAPPLE
63 | #define glBindVertexArray glBindVertexArrayAPPLE
64 |
65 | #else // OpenGL 3.2 Core Profile
66 |
67 | #define glDeleteVertexArrays glDeleteVertexArrays
68 | #define glGenVertexArrays glGenVertexArrays
69 | #define glBindVertexArray glBindVertexArray
70 | #endif
71 |
72 | #endif
73 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/Platforms/CCNS.h:
--------------------------------------------------------------------------------
1 | /*
2 | * cocos2d for iPhone: http://www.cocos2d-iphone.org
3 | *
4 | * Copyright (c) 2010 Ricardo Quesada
5 | * Copyright (c) 2011 Zynga Inc.
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 |
26 | //
27 | // Common layer for NS (Next-Step) stuff
28 | //
29 |
30 | #import "../ccMacros.h"
31 |
32 | #import // for NSObject
33 |
34 | #ifdef __CC_PLATFORM_IOS
35 |
36 | #define CCRectFromString(__r__) CGRectFromString(__r__)
37 | #define CCPointFromString(__p__) CGPointFromString(__p__)
38 | #define CCSizeFromString(__s__) CGSizeFromString(__s__)
39 | #define CCNSSizeToCGSize
40 | #define CCNSRectToCGRect
41 | #define CCNSPointToCGPoint
42 |
43 |
44 | #elif defined(__CC_PLATFORM_MAC)
45 |
46 | #define CCRectFromString(__r__) NSRectToCGRect( NSRectFromString(__r__) )
47 | #define CCPointFromString(__p__) NSPointToCGPoint( NSPointFromString(__p__) )
48 | #define CCSizeFromString(__s__) NSSizeToCGSize( NSSizeFromString(__s__) )
49 | #define CCNSSizeToCGSize NSSizeToCGSize
50 | #define CCNSRectToCGRect NSRectToCGRect
51 | #define CCNSPointToCGPoint NSPointToCGPoint
52 | #endif
53 |
54 |
55 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/Platforms/Mac/CCWindow.h:
--------------------------------------------------------------------------------
1 | /*
2 | * cocos2d for iPhone: http://www.cocos2d-iphone.org
3 | *
4 | * Copyright (c) 2010 Ricardo Quesada
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in
14 | * all copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | * THE SOFTWARE.
23 | */
24 |
25 | // Only compile this code on Mac. These files should not be included on your iOS project.
26 | // But in case they are included, it won't be compiled.
27 | #import "../../ccMacros.h"
28 | #ifdef __CC_PLATFORM_MAC
29 |
30 | #import
31 |
32 |
33 | @interface CCWindow : NSWindow
34 | {
35 | }
36 | - (id) initWithFrame:(NSRect)frame fullscreen:(BOOL)fullscreen;
37 |
38 | @end
39 |
40 |
41 | #endif // __CC_PLATFORM_MAC
42 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/Platforms/Mac/CCWindow.m:
--------------------------------------------------------------------------------
1 | /*
2 | * cocos2d for iPhone: http://www.cocos2d-iphone.org
3 | *
4 | * Copyright (c) 2010 Ricardo Quesada
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in
14 | * all copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | * THE SOFTWARE.
23 | */
24 |
25 | // Only compile this code on Mac. These files should not be included on your iOS project.
26 | // But in case they are included, it won't be compiled.
27 | #import "../../ccMacros.h"
28 | #ifdef __CC_PLATFORM_MAC
29 |
30 | #import "CCWindow.h"
31 |
32 |
33 | @implementation CCWindow
34 |
35 | - (id) initWithFrame:(NSRect)frame fullscreen:(BOOL)fullscreen
36 | {
37 | int styleMask = fullscreen ? NSBackingStoreBuffered : ( NSTitledWindowMask | NSClosableWindowMask );
38 | self = [self initWithContentRect:frame
39 | styleMask:styleMask
40 | backing:NSBackingStoreBuffered
41 | defer:YES];
42 |
43 | if (self != nil)
44 | {
45 | if(fullscreen)
46 | {
47 | [self setLevel:NSMainMenuWindowLevel+1];
48 | [self setHidesOnDeactivate:YES];
49 | [self setHasShadow:NO];
50 | }
51 |
52 | [self setAcceptsMouseMovedEvents:NO];
53 | [self setOpaque:YES];
54 | }
55 | return self;
56 | }
57 |
58 | - (BOOL) canBecomeKeyWindow
59 | {
60 | return YES;
61 | }
62 |
63 | - (BOOL) canBecomeMainWindow
64 | {
65 | return YES;
66 | }
67 | @end
68 |
69 | #endif // __CC_PLATFORM_MAC
70 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/Platforms/iOS/CCES2Renderer.h:
--------------------------------------------------------------------------------
1 | /*
2 | * cocos2d for iPhone: http://www.cocos2d-iphone.org
3 | *
4 | * Copyright (c) 2010 Ricardo Quesada
5 | * Copyright (c) 2011 Zynga Inc.
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | *
25 | *
26 | * File autogenerated with Xcode. Adapted for cocos2d needs.
27 | */
28 |
29 | // Only compile this code on iOS. These files should NOT be included on your Mac project.
30 | // But in case they are included, it won't be compiled.
31 | #import "../../ccMacros.h"
32 | #ifdef __CC_PLATFORM_IOS
33 |
34 | #import "CCESRenderer.h"
35 |
36 | #import
37 | #import
38 |
39 | @interface CCES2Renderer : NSObject
40 | {
41 | // The pixel dimensions of the CAEAGLLayer
42 | GLint backingWidth_;
43 | GLint backingHeight_;
44 |
45 | unsigned int samplesToUse_;
46 | BOOL multiSampling_;
47 |
48 | unsigned int depthFormat_;
49 | unsigned int pixelFormat_;
50 |
51 | // The OpenGL ES names for the framebuffer and renderbuffer used to render to this view
52 | GLuint defaultFramebuffer_;
53 | GLuint colorRenderbuffer_;
54 | GLuint depthBuffer_;
55 |
56 |
57 | //buffers for MSAA
58 | GLuint msaaFramebuffer_;
59 | GLuint msaaColorbuffer_;
60 |
61 | EAGLContext *context_;
62 | }
63 |
64 | /** Color Renderbuffer */
65 | @property (nonatomic,readonly) GLuint colorRenderbuffer;
66 |
67 | /** Default Renderbuffer */
68 | @property (nonatomic,readonly) GLuint defaultFramebuffer;
69 |
70 | /** MSAA Framebuffer */
71 | @property (nonatomic,readonly) GLuint msaaFramebuffer;
72 |
73 | /** MSAA Color Buffer */
74 | @property (nonatomic,readonly) GLuint msaaColorbuffer;
75 |
76 | /** EAGLContext */
77 | @property (nonatomic,readonly) EAGLContext* context;
78 |
79 | - (BOOL)resizeFromLayer:(CAEAGLLayer *)layer;
80 | @end
81 |
82 | #endif // __CC_PLATFORM_IOS
83 |
84 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/Platforms/iOS/CCESRenderer.h:
--------------------------------------------------------------------------------
1 | /*
2 | * cocos2d for iPhone: http://www.cocos2d-iphone.org
3 | *
4 | * Copyright (c) 2010 Ricardo Quesada
5 | * Copyright (c) 2011 Zynga Inc.
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | *
25 | *
26 | * File autogenerated with Xcode. Adapted for cocos2d needs.
27 | */
28 |
29 | // Only compile this code on iOS. These files should NOT be included on your Mac project.
30 | // But in case they are included, it won't be compiled.
31 | #import "../../ccMacros.h"
32 | #ifdef __CC_PLATFORM_IOS
33 |
34 | #import
35 |
36 | #import
37 | #import
38 |
39 | @protocol CCESRenderer
40 |
41 | - (id) initWithDepthFormat:(unsigned int)depthFormat withPixelFormat:(unsigned int)pixelFormat withSharegroup:(EAGLSharegroup*)sharegroup withMultiSampling:(BOOL) multiSampling withNumberOfSamples:(unsigned int) requestedSamples;
42 |
43 | - (BOOL) resizeFromLayer:(CAEAGLLayer *)layer;
44 |
45 | - (EAGLContext*) context;
46 | - (CGSize) backingSize;
47 |
48 | - (unsigned int) colorRenderBuffer;
49 | - (unsigned int) defaultFrameBuffer;
50 | - (unsigned int) msaaFrameBuffer;
51 | - (unsigned int) msaaColorBuffer;
52 | @end
53 |
54 | #endif // __CC_PLATFORM_IOS
55 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/Support/CCProfiling.h:
--------------------------------------------------------------------------------
1 | /*
2 | * cocos2d for iPhone: http://www.cocos2d-iphone.org
3 | *
4 | * Copyright (c) 2010 Stuart Carnie
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in
14 | * all copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | * THE SOFTWARE.
23 | *
24 | */
25 |
26 |
27 | #import
28 | #import
29 |
30 | @class CCProfilingTimer;
31 |
32 | /** CCProfiler
33 | cocos2d builtin profiler.
34 |
35 | To use it, enable set the CC_ENABLE_PROFILERS=1 in the ccConfig.h file
36 | */
37 | @interface CCProfiler : NSObject {
38 | @public
39 | NSMutableDictionary* activeTimers;
40 | }
41 |
42 | /** shared instance */
43 | + (CCProfiler*)sharedProfiler;
44 |
45 | /** Creates and adds a new timer */
46 | - (CCProfilingTimer*) createAndAddTimerWithName:(NSString*)timerName;
47 |
48 | /** releases a timer */
49 | - (void)releaseTimer:(NSString*)timerName;
50 |
51 | /** releases all timers */
52 | - (void) releaseAllTimers;
53 |
54 | /** display the timers */
55 | - (void)displayTimers;
56 |
57 | @end
58 |
59 | /** CCProfilingTimer
60 | Profiling timers used by CCProfiler
61 | */
62 | @interface CCProfilingTimer : NSObject {
63 |
64 | @public
65 | NSString *name;
66 | struct timeval startTime;
67 | double averageTime;
68 | double minTime;
69 | double maxTime;
70 | double totalTime;
71 | NSUInteger numberOfCalls;
72 | }
73 |
74 | /** resets the timer properties */
75 | -(void) reset;
76 | @end
77 |
78 | extern void CCProfilingBeginTimingBlock(NSString *timerName);
79 | extern void CCProfilingEndTimingBlock(NSString *timerName);
80 | extern void CCProfilingResetTimingBlock(NSString *timerName);
81 |
82 | /*
83 | * cocos2d profiling categories
84 | * used to enable / disable profilers with granularity
85 | */
86 |
87 | extern BOOL kCCProfilerCategorySprite;
88 | extern BOOL kCCProfilerCategoryBatchSprite;
89 | extern BOOL kCCProfilerCategoryParticles;
90 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/Support/CCVertex.h:
--------------------------------------------------------------------------------
1 | /*
2 | * cocos2d for iPhone: http://www.cocos2d-iphone.org
3 | *
4 | * Copyright (c) 2011 ForzeField Studios S.L. http://forzefield.com
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 | #import "ccTypes.h"
26 |
27 | /** @file CCVertex.h */
28 |
29 | /** converts a line to a polygon */
30 | void ccVertexLineToPolygon(CGPoint *points, float stroke, ccVertex2F *vertices, NSUInteger offset, NSUInteger nuPoints);
31 |
32 | /** returns wheter or not the line intersects */
33 | BOOL ccVertexLineIntersect(float Ax, float Ay,
34 | float Bx, float By,
35 | float Cx, float Cy,
36 | float Dx, float Dy, float *T);
37 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/Support/NSThread+performBlock.h:
--------------------------------------------------------------------------------
1 | /* cocos2d for iPhone
2 | *
3 | * http://www.cocos2d-iphone.org
4 | *
5 | *
6 | * Idea taken from: http://stackoverflow.com/a/3940757
7 | *
8 | */
9 |
10 | #import
11 |
12 | @interface NSThread (sendBlockToBackground)
13 | /** performs a block on the thread. It won't wait until it is done. */
14 | - (void) performBlock:(void (^)(void))block;
15 |
16 | /** performs a block on the thread. */
17 | - (void) performBlock:(void (^)(void))block waitUntilDone:(BOOL)wait;
18 |
19 | /** performs a block on the thread. */
20 | - (void) performBlock:(void (^)(id param))block withObject:(id)object waitUntilDone:(BOOL)wait;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/Support/NSThread+performBlock.m:
--------------------------------------------------------------------------------
1 | /* cocos2d for iPhone
2 | *
3 | * http://www.cocos2d-iphone.org
4 | *
5 | *
6 | * Idea taken from: http://stackoverflow.com/a/3940757
7 | *
8 | */
9 |
10 |
11 | #import "NSThread+performBlock.h"
12 | #import "../ccMacros.h"
13 |
14 | typedef void (^BlockWithParam)(id param);
15 | @interface CCObjectWith2Params : NSObject
16 | {
17 | @public
18 | BlockWithParam block;
19 | id param;
20 | }
21 | @property (nonatomic,copy) BlockWithParam block;
22 | @property (nonatomic,readwrite,retain) id param;
23 | @end
24 |
25 | @implementation CCObjectWith2Params
26 | @synthesize block, param;
27 | - (void)dealloc {
28 | CCLOG(@"cocos2d: deallocing %@", self);
29 | [block release];
30 | [param release];
31 |
32 | [super dealloc];
33 | }
34 | @end
35 |
36 | @implementation NSThread (sendBlockToBackground)
37 |
38 | - (void) performBlock: (void (^)(void))block;
39 | {
40 | return [self performBlock:block waitUntilDone:NO];
41 | }
42 |
43 | - (void) performBlock:(void (^)(void))block waitUntilDone:(BOOL)wait
44 | {
45 | [self performSelector:@selector(executeBlock:)
46 | onThread:self
47 | withObject: [[block copy] autorelease]
48 | waitUntilDone: wait];
49 | }
50 |
51 | - (void) performBlock:(void (^)(id param))block withObject:(id)object waitUntilDone:(BOOL)wait
52 | {
53 | CCObjectWith2Params * obj = [[CCObjectWith2Params alloc] init];
54 | obj.block = block;
55 | obj.param = object;
56 |
57 | [obj autorelease];
58 |
59 | [self performSelector:@selector(executeBlock2:)
60 | onThread:self
61 | withObject:obj
62 | waitUntilDone:wait];
63 | }
64 |
65 | - (void) executeBlock: (void (^)(void))block;
66 | {
67 | block();
68 | }
69 |
70 | - (void) executeBlock2:(CCObjectWith2Params*)object
71 | {
72 | BlockWithParam block = object.block;
73 | block( object.param );
74 | }
75 |
76 | @end
77 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/Support/TGAlib.h:
--------------------------------------------------------------------------------
1 | //
2 | // TGA lib for cocos2d-iphone
3 | //
4 | // sources from: http://www.lighthouse3d.com/opengl/terrain/index.php3?tgasource
5 | //
6 |
7 | //#ifndef TGA_LIB
8 | //#define TGA_LIB
9 |
10 | /**
11 | @file
12 | TGA image support
13 | */
14 |
15 | enum {
16 | TGA_OK,
17 | TGA_ERROR_FILE_OPEN,
18 | TGA_ERROR_READING_FILE,
19 | TGA_ERROR_INDEXED_COLOR,
20 | TGA_ERROR_MEMORY,
21 | TGA_ERROR_COMPRESSED_FILE,
22 | };
23 |
24 | /** TGA format */
25 | typedef struct sImageTGA {
26 | int status;
27 | unsigned char type, pixelDepth;
28 |
29 | /** map width */
30 | short int width;
31 |
32 | /** map height */
33 | short int height;
34 |
35 | /** raw data */
36 | unsigned char *imageData;
37 | int flipped;
38 | } tImageTGA;
39 |
40 | /// load the image header fields. We only keep those that matter!
41 | void tgaLoadHeader(FILE *file, tImageTGA *info);
42 |
43 | /// loads the image pixels. You shouldn't call this function directly
44 | void tgaLoadImageData(FILE *file, tImageTGA *info);
45 |
46 | /// this is the function to call when we want to load an image
47 | tImageTGA * tgaLoad(const char *filename);
48 |
49 | // /converts RGB to greyscale
50 | void tgaRGBtogreyscale(tImageTGA *info);
51 |
52 | /// releases the memory used for the image
53 | void tgaDestroy(tImageTGA *info);
54 |
55 | //#endif // TGA_LIB
56 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/Support/TransformUtils.h:
--------------------------------------------------------------------------------
1 | /*
2 | * cocos2d for iPhone: http://www.cocos2d-iphone.org
3 | *
4 | * Copyright (c) 2009 Valentin Milea
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in
14 | * all copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | * THE SOFTWARE.
23 | *
24 | */
25 |
26 | #import "../ccMacros.h"
27 | #import "../Platforms/CCGL.h"
28 |
29 | #ifdef __CC_PLATFORM_IOS
30 | #import
31 | #elif defined(__CC_PLATFORM_MAC)
32 | #import
33 | #endif
34 |
35 | void CGAffineToGL(const CGAffineTransform *t, GLfloat *m);
36 | void GLToCGAffine(const GLfloat *m, CGAffineTransform *t);
37 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/Support/TransformUtils.m:
--------------------------------------------------------------------------------
1 | /*
2 | * cocos2d for iPhone: http://www.cocos2d-iphone.org
3 | *
4 | * Copyright (c) 2009 Valentin Milea
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in
14 | * all copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | * THE SOFTWARE.
23 | *
24 | */
25 |
26 |
27 | #import "TransformUtils.h"
28 |
29 | void CGAffineToGL(const CGAffineTransform *t, GLfloat *m)
30 | {
31 | // | m[0] m[4] m[8] m[12] | | m11 m21 m31 m41 | | a c 0 tx |
32 | // | m[1] m[5] m[9] m[13] | | m12 m22 m32 m42 | | b d 0 ty |
33 | // | m[2] m[6] m[10] m[14] | <=> | m13 m23 m33 m43 | <=> | 0 0 1 0 |
34 | // | m[3] m[7] m[11] m[15] | | m14 m24 m34 m44 | | 0 0 0 1 |
35 |
36 | m[2] = m[3] = m[6] = m[7] = m[8] = m[9] = m[11] = m[14] = 0.0f;
37 | m[10] = m[15] = 1.0f;
38 | m[0] = t->a; m[4] = t->c; m[12] = t->tx;
39 | m[1] = t->b; m[5] = t->d; m[13] = t->ty;
40 | }
41 |
42 | void GLToCGAffine(const GLfloat *m, CGAffineTransform *t)
43 | {
44 | t->a = m[0]; t->c = m[4]; t->tx = m[12];
45 | t->b = m[1]; t->d = m[5]; t->ty = m[13];
46 | }
47 |
48 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/Support/ZipUtils.h:
--------------------------------------------------------------------------------
1 | /* cocos2d for iPhone
2 | *
3 | * http://www.cocos2d-iphone.org
4 | *
5 | *
6 | * inflateMemory_ based on zlib example code
7 | * http://www.zlib.net
8 | *
9 | * Some ideas were taken from:
10 | * http://themanaworld.org/
11 | * from the mapreader.cpp file
12 | *
13 | */
14 |
15 | #ifndef __CC_ZIP_UTILS_H
16 | #define __CC_ZIP_UTILS_H
17 |
18 | #import
19 |
20 | #ifdef __cplusplus
21 | extern "C" {
22 | #endif
23 |
24 | /* XXX: pragma pack ??? */
25 | /** @struct CCZHeader
26 | */
27 | struct CCZHeader {
28 | uint8_t sig[4]; // signature. Should be 'CCZ!' 4 bytes
29 | uint16_t compression_type; // should 0
30 | uint16_t version; // should be 2 (although version type==1 is also supported)
31 | uint32_t reserved; // Reserverd for users.
32 | uint32_t len; // size of the uncompressed file
33 | };
34 |
35 | enum {
36 | CCZ_COMPRESSION_ZLIB, // zlib format.
37 | CCZ_COMPRESSION_BZIP2, // bzip2 format (not supported yet)
38 | CCZ_COMPRESSION_GZIP, // gzip format (not supported yet)
39 | CCZ_COMPRESSION_NONE, // plain (not supported yet)
40 | };
41 |
42 | /** @file
43 | * Zip helper functions
44 | */
45 |
46 | /**
47 | * Inflates either zlib or gzip deflated memory. The inflated memory is
48 | * expected to be freed by the caller.
49 | *
50 | * It will allocate 256k for the destination buffer. If it is not enought it will multiply the previous buffer size per 2, until there is enough memory.
51 | * @returns the length of the deflated buffer
52 | *
53 | @since v0.8.1
54 | */
55 | int ccInflateMemory(unsigned char *in, unsigned int inLength, unsigned char **out);
56 |
57 | /**
58 | * Inflates either zlib or gzip deflated memory. The inflated memory is
59 | * expected to be freed by the caller.
60 | *
61 | * outLenghtHint is assumed to be the needed room to allocate the inflated buffer.
62 | *
63 | * @returns the length of the deflated buffer
64 | *
65 | @since v1.0.0
66 | */
67 | int ccInflateMemoryWithHint(unsigned char *in, unsigned int inLength, unsigned char **out, unsigned int outLenghtHint );
68 |
69 |
70 | /** inflates a GZip file into memory
71 | *
72 | * @returns the length of the deflated buffer
73 | *
74 | * @since v0.99.5
75 | */
76 | int ccInflateGZipFile(const char *filename, unsigned char **out);
77 |
78 | /** inflates a CCZ file into memory
79 | *
80 | * @returns the length of the deflated buffer
81 | *
82 | * @since v0.99.5
83 | */
84 | int ccInflateCCZFile(const char *filename, unsigned char **out);
85 |
86 |
87 | #ifdef __cplusplus
88 | }
89 | #endif
90 |
91 | #endif // __CC_ZIP_UTILS_H
92 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/Support/base64.c:
--------------------------------------------------------------------------------
1 | /*
2 | public domain BASE64 code
3 |
4 | modified for cocos2d-iphone: http://www.cocos2d-iphone.org
5 | */
6 |
7 | #include
8 | #include
9 |
10 | #include "base64.h"
11 |
12 | unsigned char alphabet[64] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
13 |
14 | int _base64Decode( unsigned char *input, unsigned int input_len, unsigned char *output, unsigned int *output_len );
15 |
16 | int _base64Decode( unsigned char *input, unsigned int input_len, unsigned char *output, unsigned int *output_len )
17 | {
18 | static char inalphabet[256], decoder[256];
19 | int i, bits, c, char_count, errors = 0;
20 | unsigned int input_idx = 0;
21 | unsigned int output_idx = 0;
22 |
23 | for (i = (sizeof alphabet) - 1; i >= 0 ; i--) {
24 | inalphabet[alphabet[i]] = 1;
25 | decoder[alphabet[i]] = i;
26 | }
27 |
28 | char_count = 0;
29 | bits = 0;
30 | for( input_idx=0; input_idx < input_len ; input_idx++ ) {
31 | c = input[ input_idx ];
32 | if (c == '=')
33 | break;
34 | if (c > 255 || ! inalphabet[c])
35 | continue;
36 | bits += decoder[c];
37 | char_count++;
38 | if (char_count == 4) {
39 | output[ output_idx++ ] = (bits >> 16);
40 | output[ output_idx++ ] = ((bits >> 8) & 0xff);
41 | output[ output_idx++ ] = ( bits & 0xff);
42 | bits = 0;
43 | char_count = 0;
44 | } else {
45 | bits <<= 6;
46 | }
47 | }
48 |
49 | if( c == '=' ) {
50 | switch (char_count) {
51 | case 1:
52 | fprintf(stderr, "base64Decode: encoding incomplete: at least 2 bits missing");
53 | errors++;
54 | break;
55 | case 2:
56 | output[ output_idx++ ] = ( bits >> 10 );
57 | break;
58 | case 3:
59 | output[ output_idx++ ] = ( bits >> 16 );
60 | output[ output_idx++ ] = (( bits >> 8 ) & 0xff);
61 | break;
62 | }
63 | } else if ( input_idx < input_len ) {
64 | if (char_count) {
65 | fprintf(stderr, "base64 encoding incomplete: at least %d bits truncated",
66 | ((4 - char_count) * 6));
67 | errors++;
68 | }
69 | }
70 |
71 | *output_len = output_idx;
72 | return errors;
73 | }
74 |
75 | int base64Decode(unsigned char *in, unsigned int inLength, unsigned char **out)
76 | {
77 | unsigned int outLength = 0;
78 |
79 | //should be enough to store 6-bit buffers in 8-bit buffers
80 | *out = malloc( inLength * 3.0f / 4.0f + 1 );
81 | if( *out ) {
82 | int ret = _base64Decode(in, inLength, *out, &outLength);
83 |
84 | if (ret > 0 )
85 | {
86 | printf("Base64Utils: error decoding");
87 | free(*out);
88 | *out = NULL;
89 | outLength = 0;
90 | }
91 | }
92 | return outLength;
93 | }
94 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/Support/base64.h:
--------------------------------------------------------------------------------
1 | /*
2 | public domain BASE64 code
3 |
4 | modified for cocos2d-iphone: http://www.cocos2d-iphone.org
5 | */
6 |
7 | #ifndef __CC_BASE64_DECODE_H
8 | #define __CC_BASE64_DECODE_H
9 |
10 | #ifdef __cplusplus
11 | extern "C" {
12 | #endif
13 |
14 |
15 | /** @file
16 | base64 helper functions
17 | */
18 |
19 | /**
20 | * Decodes a 64base encoded memory. The decoded memory is
21 | * expected to be freed by the caller.
22 | *
23 | * @returns the length of the out buffer
24 | *
25 | @since v0.8.1
26 | */
27 | int base64Decode(unsigned char *in, unsigned int inLength, unsigned char **out);
28 |
29 | #ifdef __cplusplus
30 | }
31 | #endif
32 |
33 | #endif // __CC_BASE64_DECODE_H
34 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/Support/ccUtils.c:
--------------------------------------------------------------------------------
1 | /*
2 | * cocos2d for iPhone: http://www.cocos2d-iphone.org
3 | *
4 | */
5 |
6 | /*
7 | ccNextPOT function is licensed under the same license that is used in CCTexture2D.m.
8 | */
9 | #include "ccUtils.h"
10 |
11 | unsigned long ccNextPOT(unsigned long x)
12 | {
13 | x = x - 1;
14 | x = x | (x >> 1);
15 | x = x | (x >> 2);
16 | x = x | (x >> 4);
17 | x = x | (x >> 8);
18 | x = x | (x >>16);
19 | return x + 1;
20 | }
21 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/Support/ccUtils.h:
--------------------------------------------------------------------------------
1 | /*
2 | * cocos2d for iPhone: http://www.cocos2d-iphone.org
3 | *
4 | */
5 |
6 | #ifndef __CC_UTILS_H
7 | #define __CC_UTILS_H
8 |
9 | #ifdef __cplusplus
10 | extern "C" {
11 | #endif
12 |
13 | /** @file ccUtils.h
14 | Misc free functions
15 | */
16 |
17 | /*
18 | ccNextPOT function is licensed under the same license that is used in CCTexture2D.m.
19 | */
20 |
21 | /** returns the Next Power of Two value.
22 |
23 | Examples:
24 | - If "value" is 15, it will return 16.
25 | - If "value" is 16, it will return 16.
26 | - If "value" is 17, it will return 32.
27 |
28 | @since v0.99.5
29 | */
30 | unsigned long ccNextPOT( unsigned long value );
31 |
32 | #ifdef __cplusplus
33 | }
34 | #endif
35 |
36 | #endif // ! __CC_UTILS_H
37 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/ccShader_PositionColor_frag.h:
--------------------------------------------------------------------------------
1 | " \n\
2 | #ifdef GL_ES \n\
3 | precision lowp float; \n\
4 | #endif \n\
5 | \n\
6 | varying vec4 v_fragmentColor; \n\
7 | \n\
8 | void main() \n\
9 | { \n\
10 | gl_FragColor = v_fragmentColor; \n\
11 | } \n\
12 | ";
13 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/ccShader_PositionColor_vert.h:
--------------------------------------------------------------------------------
1 | " \n\
2 | attribute vec4 a_position; \n\
3 | attribute vec4 a_color; \n\
4 | uniform mat4 u_MVPMatrix; \n\
5 | \n\
6 | #ifdef GL_ES \n\
7 | varying lowp vec4 v_fragmentColor; \n\
8 | #else \n\
9 | varying vec4 v_fragmentColor; \n\
10 | #endif \n\
11 | \n\
12 | void main() \n\
13 | { \n\
14 | gl_Position = u_MVPMatrix * a_position; \n\
15 | v_fragmentColor = a_color; \n\
16 | } \n\
17 | ";
18 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/ccShader_PositionTextureA8Color_frag.h:
--------------------------------------------------------------------------------
1 | " \n\
2 | #ifdef GL_ES \n\
3 | precision lowp float; \n\
4 | #endif \n\
5 | \n\
6 | varying vec4 v_fragmentColor; \n\
7 | varying vec2 v_texCoord; \n\
8 | uniform sampler2D u_texture; \n\
9 | \n\
10 | void main() \n\
11 | { \n\
12 | gl_FragColor = vec4( v_fragmentColor.rgb, // RGB from uniform \n\
13 | v_fragmentColor.a * texture2D(u_texture, v_texCoord).a // A from texture & uniform \n\
14 | ); \n\
15 | } \n\
16 | ";
17 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/ccShader_PositionTextureA8Color_vert.h:
--------------------------------------------------------------------------------
1 | " \n\
2 | attribute vec4 a_position; \n\
3 | attribute vec2 a_texCoord; \n\
4 | attribute vec4 a_color; \n\
5 | uniform mat4 u_MVPMatrix; \n\
6 | \n\
7 | #ifdef GL_ES \n\
8 | varying lowp vec4 v_fragmentColor; \n\
9 | varying mediump vec2 v_texCoord; \n\
10 | #else \n\
11 | varying vec4 v_fragmentColor; \n\
12 | varying vec2 v_texCoord; \n\
13 | #endif \n\
14 | \n\
15 | void main() \n\
16 | { \n\
17 | gl_Position = u_MVPMatrix * a_position; \n\
18 | v_fragmentColor = a_color; \n\
19 | v_texCoord = a_texCoord; \n\
20 | } \n\
21 | ";
22 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/ccShader_PositionTextureColorAlphaTest_frag.h:
--------------------------------------------------------------------------------
1 | " \n\
2 | #ifdef GL_ES \n\
3 | precision lowp float; \n\
4 | #endif \n\
5 | \n\
6 | varying vec4 v_fragmentColor; \n\
7 | varying vec2 v_texCoord; \n\
8 | uniform sampler2D u_texture; \n\
9 | uniform float u_alpha_value; \n\
10 | \n\
11 | void main() \n\
12 | { \n\
13 | vec4 texColor = texture2D(u_texture, v_texCoord); \n\
14 | \n\
15 | // mimic: glAlphaFunc(GL_GREATER) \n\
16 | // pass if ( incoming_pixel >= u_alpha_value ) => fail if incoming_pixel < u_alpha_value \n\
17 | \n\
18 | if ( texColor.a <= u_alpha_value ) \n\
19 | discard; \n\
20 | \n\
21 | gl_FragColor = texColor * v_fragmentColor; \n\
22 | } \n\
23 | ";
24 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/ccShader_PositionTextureColor_frag.h:
--------------------------------------------------------------------------------
1 | " \n\
2 | #ifdef GL_ES \n\
3 | precision lowp float; \n\
4 | #endif \n\
5 | \n\
6 | varying vec4 v_fragmentColor; \n\
7 | varying vec2 v_texCoord; \n\
8 | uniform sampler2D u_texture; \n\
9 | \n\
10 | void main() \n\
11 | { \n\
12 | gl_FragColor = v_fragmentColor * texture2D(u_texture, v_texCoord); \n\
13 | } \n\
14 | ";
15 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/ccShader_PositionTextureColor_vert.h:
--------------------------------------------------------------------------------
1 | " \n\
2 | attribute vec4 a_position; \n\
3 | attribute vec2 a_texCoord; \n\
4 | attribute vec4 a_color; \n\
5 | \n\
6 | uniform mat4 u_MVPMatrix; \n\
7 | \n\
8 | #ifdef GL_ES \n\
9 | varying lowp vec4 v_fragmentColor; \n\
10 | varying mediump vec2 v_texCoord; \n\
11 | #else \n\
12 | varying vec4 v_fragmentColor; \n\
13 | varying vec2 v_texCoord; \n\
14 | #endif \n\
15 | \n\
16 | void main() \n\
17 | { \n\
18 | gl_Position = u_MVPMatrix * a_position; \n\
19 | v_fragmentColor = a_color; \n\
20 | v_texCoord = a_texCoord; \n\
21 | } \n\
22 | ";
23 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/ccShader_PositionTexture_frag.h:
--------------------------------------------------------------------------------
1 | " \n\
2 | #ifdef GL_ES \n\
3 | precision lowp float; \n\
4 | #endif \n\
5 | \n\
6 | varying vec2 v_texCoord; \n\
7 | uniform sampler2D u_texture; \n\
8 | \n\
9 | void main() \n\
10 | { \n\
11 | gl_FragColor = texture2D(u_texture, v_texCoord); \n\
12 | } \n\
13 | ";
14 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/ccShader_PositionTexture_uColor_frag.h:
--------------------------------------------------------------------------------
1 | " \n\
2 | #ifdef GL_ES \n\
3 | precision lowp float; \n\
4 | #endif \n\
5 | \n\
6 | uniform vec4 u_color; \n\
7 | \n\
8 | varying vec2 v_texCoord; \n\
9 | \n\
10 | uniform sampler2D u_texture; \n\
11 | \n\
12 | void main() \n\
13 | { \n\
14 | gl_FragColor = texture2D(u_texture, v_texCoord) * u_color; \n\
15 | } \n\
16 | ";
17 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/ccShader_PositionTexture_uColor_vert.h:
--------------------------------------------------------------------------------
1 | " \n\
2 | attribute vec4 a_position; \n\
3 | attribute vec2 a_texCoord; \n\
4 | \n\
5 | uniform mat4 u_MVPMatrix; \n\
6 | \n\
7 | #ifdef GL_ES \n\
8 | varying mediump vec2 v_texCoord; \n\
9 | #else \n\
10 | varying vec2 v_texCoord; \n\
11 | #endif \n\
12 | \n\
13 | void main() \n\
14 | { \n\
15 | gl_Position = u_MVPMatrix * a_position; \n\
16 | v_texCoord = a_texCoord; \n\
17 | } \n\
18 | ";
19 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/ccShader_PositionTexture_vert.h:
--------------------------------------------------------------------------------
1 | " \n\
2 | attribute vec4 a_position; \n\
3 | attribute vec2 a_texCoord; \n\
4 | uniform mat4 u_MVPMatrix; \n\
5 | \n\
6 | #ifdef GL_ES \n\
7 | varying mediump vec2 v_texCoord; \n\
8 | #else \n\
9 | varying vec2 v_texCoord; \n\
10 | #endif \n\
11 | \n\
12 | void main() \n\
13 | { \n\
14 | gl_Position = u_MVPMatrix * a_position; \n\
15 | v_texCoord = a_texCoord; \n\
16 | } \n\
17 | ";
18 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/ccShader_Position_uColor_frag.h:
--------------------------------------------------------------------------------
1 | " \n\
2 | #ifdef GL_ES \n\
3 | precision lowp float; \n\
4 | #endif \n\
5 | \n\
6 | varying vec4 v_fragmentColor; \n\
7 | \n\
8 | void main() \n\
9 | { \n\
10 | gl_FragColor = v_fragmentColor; \n\
11 | } \n\
12 | ";
13 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/ccShader_Position_uColor_vert.h:
--------------------------------------------------------------------------------
1 | " \n\
2 | attribute vec4 a_position; \n\
3 | uniform mat4 u_MVPMatrix; \n\
4 | uniform vec4 u_color; \n\
5 | uniform float u_pointSize; \n\
6 | \n\
7 | #ifdef GL_ES \n\
8 | varying lowp vec4 v_fragmentColor; \n\
9 | #else \n\
10 | varying vec4 v_fragmentColor; \n\
11 | #endif \n\
12 | \n\
13 | void main() \n\
14 | { \n\
15 | gl_Position = u_MVPMatrix * a_position; \n\
16 | gl_PointSize = u_pointSize; \n\
17 | v_fragmentColor = u_color; \n\
18 | } \n\
19 | ";
20 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/ccShaders.h:
--------------------------------------------------------------------------------
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 | #import "Platforms/CCGL.h"
26 |
27 | extern const GLchar * ccPosition_uColor_frag;
28 | extern const GLchar * ccPosition_uColor_vert;
29 |
30 | extern const GLchar * ccPositionColor_frag;
31 | extern const GLchar * ccPositionColor_vert;
32 |
33 | extern const GLchar * ccPositionTexture_frag;
34 | extern const GLchar * ccPositionTexture_vert;
35 |
36 | extern const GLchar * ccPositionTextureA8Color_frag;
37 | extern const GLchar * ccPositionTextureA8Color_vert;
38 |
39 | extern const GLchar * ccPositionTextureColor_frag;
40 | extern const GLchar * ccPositionTextureColor_vert;
41 |
42 | extern const GLchar * ccPositionTextureColorAlphaTest_frag;
43 |
44 | extern const GLchar * ccPositionTexture_uColor_frag;
45 | extern const GLchar * ccPositionTexture_uColor_vert;
46 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/ccShaders.m:
--------------------------------------------------------------------------------
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 | #import "ccShaders.h"
26 |
27 | //
28 | const GLchar * ccPosition_uColor_frag =
29 | #import "ccShader_Position_uColor_frag.h"
30 | const GLchar * ccPosition_uColor_vert =
31 | #import "ccShader_Position_uColor_vert.h"
32 |
33 | //
34 | const GLchar * ccPositionColor_frag =
35 | #import "ccShader_PositionColor_frag.h"
36 | const GLchar * ccPositionColor_vert =
37 | #import "ccShader_PositionColor_vert.h"
38 |
39 | //
40 | const GLchar * ccPositionTexture_frag =
41 | #import "ccShader_PositionTexture_frag.h"
42 | const GLchar * ccPositionTexture_vert =
43 | #import "ccShader_PositionTexture_vert.h"
44 |
45 | //
46 | const GLchar * ccPositionTextureA8Color_frag =
47 | #import "ccShader_PositionTextureA8Color_frag.h"
48 | const GLchar * ccPositionTextureA8Color_vert =
49 | #import "ccShader_PositionTextureA8Color_vert.h"
50 |
51 | //
52 | const GLchar * ccPositionTextureColor_frag =
53 | #import "ccShader_PositionTextureColor_frag.h"
54 | const GLchar * ccPositionTextureColor_vert =
55 | #import "ccShader_PositionTextureColor_vert.h"
56 |
57 | //
58 | const GLchar * ccPositionTextureColorAlphaTest_frag =
59 | #import "ccShader_PositionTextureColorAlphaTest_frag.h"
60 |
61 | //
62 | const GLchar * ccPositionTexture_uColor_frag =
63 | #import "ccShader_PositionTexture_uColor_frag.h"
64 | const GLchar * ccPositionTexture_uColor_vert =
65 | #import "ccShader_PositionTexture_uColor_vert.h"
66 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/cocos2d/cocos2d.m:
--------------------------------------------------------------------------------
1 | /*
2 | * cocos2d for iPhone: http://www.cocos2d-iphone.org
3 | *
4 | * Copyright (c) 2008-2010 Ricardo Quesada
5 | * Copyright (c) 2011 Zynga Inc.
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in
15 | * all copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 | * THE SOFTWARE.
24 | */
25 |
26 |
27 | #import
28 | #import "cocos2d.h"
29 | static NSString *version = @"cocos2d v2.0.0";
30 |
31 | NSString *cocos2dVersion()
32 | {
33 | return version;
34 | }
35 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/kazmath/include/kazmath/GL/mat4stack.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2008, Luke Benstead.
3 | All rights reserved.
4 |
5 | Redistribution and use in source and binary forms, with or without modification,
6 | are permitted provided that the following conditions are met:
7 |
8 | * Redistributions of source code must retain the above copyright notice,
9 | this list of conditions and the following disclaimer.
10 | * Redistributions in binary form must reproduce the above copyright notice,
11 | this list of conditions and the following disclaimer in the documentation
12 | and/or other materials provided with the distribution.
13 |
14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
15 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
18 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
21 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 | */
25 |
26 | #ifndef C_STACK_H_INCLUDED
27 | #define C_STACK_H_INCLUDED
28 |
29 | #include "../mat4.h"
30 |
31 | typedef struct km_mat4_stack {
32 | int capacity; //The total item capacity
33 | int item_count; //The number of items
34 | kmMat4* top;
35 | kmMat4* stack;
36 | } km_mat4_stack;
37 |
38 | #ifdef __cplusplus
39 | extern "C" {
40 | #endif
41 |
42 | void km_mat4_stack_initialize(km_mat4_stack* stack);
43 | void km_mat4_stack_push(km_mat4_stack* stack, const kmMat4* item);
44 | void km_mat4_stack_pop(km_mat4_stack* stack, kmMat4* pOut);
45 | void km_mat4_stack_release(km_mat4_stack* stack);
46 |
47 | #ifdef __cplusplus
48 | }
49 | #endif
50 |
51 | #endif // C_STACK_H_INCLUDED
52 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/kazmath/include/kazmath/GL/matrix.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2008, Luke Benstead.
3 | All rights reserved.
4 |
5 | Redistribution and use in source and binary forms, with or without modification,
6 | are permitted provided that the following conditions are met:
7 |
8 | * Redistributions of source code must retain the above copyright notice,
9 | this list of conditions and the following disclaimer.
10 | * Redistributions in binary form must reproduce the above copyright notice,
11 | this list of conditions and the following disclaimer in the documentation
12 | and/or other materials provided with the distribution.
13 |
14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
15 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
18 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
21 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 | */
25 |
26 | #ifndef KM_GL_MATRIX_H_INCLUDED
27 | #define KM_GL_MATRIX_H_INCLUDED
28 |
29 | #define KM_GL_MODELVIEW 0x1700
30 | #define KM_GL_PROJECTION 0x1701
31 | #define KM_GL_TEXTURE 0x1702
32 |
33 | typedef unsigned int kmGLEnum;
34 |
35 | #include "../mat4.h"
36 | #include "../vec3.h"
37 |
38 | #ifdef __cplusplus
39 | extern "C" {
40 | #endif
41 |
42 | void kmGLFreeAll(void);
43 | void kmGLPushMatrix(void);
44 | void kmGLPopMatrix(void);
45 | void kmGLMatrixMode(kmGLEnum mode);
46 | void kmGLLoadIdentity(void);
47 | void kmGLLoadMatrix(const kmMat4* pIn);
48 | void kmGLMultMatrix(const kmMat4* pIn);
49 | void kmGLTranslatef(float x, float y, float z);
50 | void kmGLRotatef(float angle, float x, float y, float z);
51 | void kmGLScalef(float x, float y, float z);
52 | void kmGLGetMatrix(kmGLEnum mode, kmMat4* pOut);
53 |
54 | #ifdef __cplusplus
55 | }
56 | #endif
57 |
58 | #endif // MATRIX_H_INCLUDED
59 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/kazmath/include/kazmath/aabb.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2008, Luke Benstead.
3 | All rights reserved.
4 |
5 | Redistribution and use in source and binary forms, with or without modification,
6 | are permitted provided that the following conditions are met:
7 |
8 | * Redistributions of source code must retain the above copyright notice,
9 | this list of conditions and the following disclaimer.
10 | * Redistributions in binary form must reproduce the above copyright notice,
11 | this list of conditions and the following disclaimer in the documentation
12 | and/or other materials provided with the distribution.
13 |
14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
15 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
18 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
21 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 | */
25 |
26 | #ifndef KAZMATH_AABB_H_INCLUDED
27 | #define KAZMATH_AABB_H_INCLUDED
28 |
29 | #include "vec3.h"
30 | #include "utility.h"
31 |
32 | #ifdef __cplusplus
33 | extern "C" {
34 | #endif
35 |
36 | /**
37 | * A struture that represents an axis-aligned
38 | * bounding box.
39 | */
40 | typedef struct kmAABB {
41 | kmVec3 min; /** The max corner of the box */
42 | kmVec3 max; /** The min corner of the box */
43 | } kmAABB;
44 |
45 | const int kmAABBContainsPoint(const kmVec3* pPoint, const kmAABB* pBox);
46 | kmAABB* const kmAABBAssign(kmAABB* pOut, const kmAABB* pIn);
47 | kmAABB* const kmAABBScale(kmAABB* pOut, const kmAABB* pIn, kmScalar s);
48 |
49 | #ifdef __cplusplus
50 | }
51 | #endif
52 |
53 | #endif
54 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/kazmath/include/kazmath/kazmath.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2008, Luke Benstead.
3 | All rights reserved.
4 |
5 | Redistribution and use in source and binary forms, with or without modification,
6 | are permitted provided that the following conditions are met:
7 |
8 | * Redistributions of source code must retain the above copyright notice,
9 | this list of conditions and the following disclaimer.
10 | * Redistributions in binary form must reproduce the above copyright notice,
11 | this list of conditions and the following disclaimer in the documentation
12 | and/or other materials provided with the distribution.
13 |
14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
15 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
18 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
21 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 | */
25 |
26 | #ifndef KAZMATH_H_INCLUDED
27 | #define KAZMATH_H_INCLUDED
28 |
29 | #include "vec2.h"
30 | #include "vec3.h"
31 | #include "mat3.h"
32 | #include "mat4.h"
33 | #include "utility.h"
34 | #include "quaternion.h"
35 | #include "plane.h"
36 | #include "aabb.h"
37 | #include "ray2.h"
38 |
39 | #endif // KAZMATH_H_INCLUDED
40 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/kazmath/include/kazmath/neon_matrix_impl.h:
--------------------------------------------------------------------------------
1 | /*
2 | NEON math library for the iPhone / iPod touch
3 |
4 | Copyright (c) 2009 Justin Saunders
5 |
6 | This software is provided 'as-is', without any express or implied warranty.
7 | In no event will the authors be held liable for any damages arising
8 | from the use of this software.
9 | Permission is granted to anyone to use this software for any purpose,
10 | including commercial applications, and to alter it and redistribute it freely,
11 | subject to the following restrictions:
12 |
13 | 1. The origin of this software must not be misrepresented; you must
14 | not claim that you wrote the original software. If you use this
15 | software in a product, an acknowledgment in the product documentation
16 | would be appreciated but is not required.
17 |
18 | 2. Altered source versions must be plainly marked as such, and must
19 | not be misrepresented as being the original software.
20 |
21 | 3. This notice may not be removed or altered from any source distribution.
22 | */
23 |
24 | #ifndef __NEON_MATRIX_IMPL_H__
25 | #define __NEON_MATRIX_IMPL_H__
26 |
27 | #ifdef __arm__
28 | #include "arm/arch.h"
29 | #endif
30 |
31 | // Matrixes are assumed to be stored in column major format according to OpenGL
32 | // specification.
33 |
34 | // Multiplies two 4x4 matrices (a,b) outputing a 4x4 matrix (output)
35 | void NEON_Matrix4Mul(const float* a, const float* b, float* output );
36 |
37 | // Multiplies a 4x4 matrix (m) with a vector 4 (v), outputing a vector 4
38 | void NEON_Matrix4Vector4Mul(const float* m, const float* v, float* output);
39 |
40 |
41 | #endif // __NEON_MATRIX_IMPL_H__
42 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/kazmath/include/kazmath/ray2.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2011, Luke Benstead.
3 | All rights reserved.
4 |
5 | Redistribution and use in source and binary forms, with or without modification,
6 | are permitted provided that the following conditions are met:
7 |
8 | * Redistributions of source code must retain the above copyright notice,
9 | this list of conditions and the following disclaimer.
10 | * Redistributions in binary form must reproduce the above copyright notice,
11 | this list of conditions and the following disclaimer in the documentation
12 | and/or other materials provided with the distribution.
13 |
14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
15 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
18 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
21 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 | */
25 |
26 | #ifndef RAY_2_H
27 | #define RAY_2_H
28 |
29 | #include "utility.h"
30 | #include "vec2.h"
31 |
32 | #ifdef __cplusplus
33 | extern "C" {
34 | #endif
35 |
36 | typedef struct kmRay2 {
37 | kmVec2 start;
38 | kmVec2 dir;
39 | } kmRay2;
40 |
41 | void kmRay2Fill(kmRay2* ray, kmScalar px, kmScalar py, kmScalar vx, kmScalar vy);
42 | kmBool kmRay2IntersectLineSegment(const kmRay2* ray, const kmVec2* p1, const kmVec2* p2, kmVec2* intersection);
43 | kmBool kmRay2IntersectTriangle(const kmRay2* ray, const kmVec2* p1, const kmVec2* p2, const kmVec2* p3, kmVec2* intersection, kmVec2* normal_out);
44 | kmBool kmRay2IntersectCircle(const kmRay2* ray, const kmVec2 centre, const kmScalar radius, kmVec2* intersection);
45 |
46 | #ifdef __cplusplus
47 | }
48 | #endif
49 |
50 | #endif
51 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/kazmath/include/kazmath/utility.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2008, Luke Benstead.
3 | All rights reserved.
4 |
5 | Redistribution and use in source and binary forms, with or without modification,
6 | are permitted provided that the following conditions are met:
7 |
8 | * Redistributions of source code must retain the above copyright notice,
9 | this list of conditions and the following disclaimer.
10 | * Redistributions in binary form must reproduce the above copyright notice,
11 | this list of conditions and the following disclaimer in the documentation
12 | and/or other materials provided with the distribution.
13 |
14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
15 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
18 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
21 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 | */
25 |
26 | #ifndef UTILITY_H_INCLUDED
27 | #define UTILITY_H_INCLUDED
28 |
29 | #include
30 |
31 | #ifndef kmScalar
32 | #define kmScalar float
33 | #endif
34 |
35 | #ifndef kmBool
36 | #define kmBool unsigned char
37 | #endif
38 |
39 | #ifndef kmEnum
40 | #define kmEnum unsigned int
41 | #endif
42 |
43 | #ifndef KM_FALSE
44 | #define KM_FALSE 0
45 | #endif
46 |
47 | #ifndef KM_TRUE
48 | #define KM_TRUE 1
49 | #endif
50 |
51 | #define kmPI 3.141592f
52 | #define kmPIOver180 0.017453f // PI / 180
53 | #define kmPIUnder180 57.295779f // 180 / PI
54 | #define kmEpsilon 1.0 / 64.0
55 |
56 |
57 |
58 | #ifdef __cplusplus
59 | extern "C" {
60 | #endif
61 |
62 | extern kmScalar kmSQR(kmScalar s);
63 | extern kmScalar kmDegreesToRadians(kmScalar degrees);
64 | extern kmScalar kmRadiansToDegrees(kmScalar radians);
65 |
66 | extern kmScalar min(kmScalar lhs, kmScalar rhs);
67 | extern kmScalar max(kmScalar lhs, kmScalar rhs);
68 | extern kmBool kmAlmostEqual(kmScalar lhs, kmScalar rhs);
69 |
70 | #ifdef __cplusplus
71 | }
72 | #endif
73 |
74 | #endif /* UTILITY_H_INCLUDED */
75 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/kazmath/src/CMakeLists.txt:
--------------------------------------------------------------------------------
1 |
2 | #ADD_LIBRARY(Kazmath STATIC ${KAZMATH_SRCS})
3 | #INSTALL(TARGETS Kazmath ARCHIVE DESTINATION lib)
4 |
5 | INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/include )
6 |
7 | ADD_LIBRARY(kazmath STATIC ${KAZMATH_SOURCES})
8 | INSTALL(TARGETS kazmath ARCHIVE DESTINATION lib)
9 |
10 | #ADD_LIBRARY(KazmathGL STATIC ${GL_UTILS_SRCS})
11 | #INSTALL(TARGETS KazmathGL ARCHIVE DESTINATION lib)
12 |
13 | INSTALL(FILES ${KAZMATH_HEADERS} DESTINATION include/kazmath)
14 | INSTALL(FILES ${GL_UTILS_HEADERS} DESTINATION include/kazmath/GL)
15 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/kazmath/src/aabb.c:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2008, Luke Benstead.
3 | All rights reserved.
4 |
5 | Redistribution and use in source and binary forms, with or without modification,
6 | are permitted provided that the following conditions are met:
7 |
8 | * Redistributions of source code must retain the above copyright notice,
9 | this list of conditions and the following disclaimer.
10 | * Redistributions in binary form must reproduce the above copyright notice,
11 | this list of conditions and the following disclaimer in the documentation
12 | and/or other materials provided with the distribution.
13 |
14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
15 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
18 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
21 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 | */
25 |
26 | #include "kazmath/aabb.h"
27 |
28 | /**
29 | * Returns KM_TRUE if point is in the specified AABB, returns
30 | * KM_FALSE otherwise.
31 | */
32 | const int kmAABBContainsPoint(const kmVec3* pPoint, const kmAABB* pBox)
33 | {
34 | if(pPoint->x >= pBox->min.x && pPoint->x <= pBox->max.x &&
35 | pPoint->y >= pBox->min.y && pPoint->y <= pBox->max.y &&
36 | pPoint->z >= pBox->min.z && pPoint->z <= pBox->max.z) {
37 | return KM_TRUE;
38 | }
39 |
40 | return KM_FALSE;
41 | }
42 |
43 | /**
44 | * Assigns pIn to pOut, returns pOut.
45 | */
46 | kmAABB* const kmAABBAssign(kmAABB* pOut, const kmAABB* pIn)
47 | {
48 | kmVec3Assign(&pOut->min, &pIn->min);
49 | kmVec3Assign(&pOut->max, &pIn->max);
50 | return pOut;
51 | }
52 |
53 | /**
54 | * Scales pIn by s, stores the resulting AABB in pOut. Returns pOut
55 | */
56 | kmAABB* const kmAABBScale(kmAABB* pOut, const kmAABB* pIn, kmScalar s)
57 | {
58 | assert(0 && "Not implemented");
59 | return 0;
60 | }
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/libs/kazmath/src/utility.c:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2008, Luke Benstead.
3 | All rights reserved.
4 |
5 | Redistribution and use in source and binary forms, with or without modification,
6 | are permitted provided that the following conditions are met:
7 |
8 | * Redistributions of source code must retain the above copyright notice,
9 | this list of conditions and the following disclaimer.
10 | * Redistributions in binary form must reproduce the above copyright notice,
11 | this list of conditions and the following disclaimer in the documentation
12 | and/or other materials provided with the distribution.
13 |
14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
15 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
18 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
21 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 | */
25 |
26 | #include "kazmath/utility.h"
27 |
28 | /**
29 | * Returns the square of s (e.g. s*s)
30 | */
31 | kmScalar kmSQR(kmScalar s) {
32 | return s*s;
33 | }
34 |
35 | /**
36 | * Returns degrees as radians.
37 | */
38 | kmScalar kmDegreesToRadians(kmScalar degrees) {
39 | return degrees * kmPIOver180;
40 | }
41 |
42 | /**
43 | * Returns radians as degrees
44 | */
45 | kmScalar kmRadiansToDegrees(kmScalar radians) {
46 | return radians * kmPIUnder180;
47 | }
48 |
49 | kmScalar min(kmScalar lhs, kmScalar rhs) {
50 | return (lhs < rhs)? lhs : rhs;
51 | }
52 |
53 | kmScalar max(kmScalar lhs, kmScalar rhs) {
54 | return (lhs > rhs)? lhs : rhs;
55 | }
56 |
57 | kmBool kmAlmostEqual(kmScalar lhs, kmScalar rhs) {
58 | return (lhs + kmEpsilon > rhs && lhs - kmEpsilon < rhs);
59 | }
60 |
--------------------------------------------------------------------------------
/CCControlExtensionExamples/cocos2d-gles20-cccontrol-examples-ios/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // cocos2d-gles20-cccontrol-examples-ios
4 | //
5 | // Created by Kim Upjohn on 04/03/12.
6 | // Copyright __MyCompanyName__ 2012. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | int main(int argc, char *argv[]) {
12 |
13 | NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
14 | int retVal = UIApplicationMain(argc, argv, nil, @"AppController");
15 | [pool release];
16 | return retVal;
17 | }
18 |
--------------------------------------------------------------------------------
/LICENSE_CCControlExtention.txt:
--------------------------------------------------------------------------------
1 | CCControlExtension: https://github.com/YannickL/CCControlExtension
2 |
3 | Copyright (c) 2011-present - Yannick Loriot and contributors
4 | (see each file to see the different copyright owners)
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 |
--------------------------------------------------------------------------------
/appledoc_generate.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | ###
4 | # You need appledoc 2.1 (https://github.com/tomaz/appledoc/) to generate the documentation thanks to this script
5 | ###
6 |
7 | mkdir documentation
8 |
9 | /Applications/appledoc -h AppledocSettings.plist ./CCControlExtension
--------------------------------------------------------------------------------