├── 7-BalloonGameTutorial ├── .png ├── music.caf ├── balloonpop.caf ├── bluetutorial.png ├── redtutorial.png ├── reset_button.png ├── bluetutorial@2x.png ├── greentutorial.png ├── indigotutorial.png ├── orangetutorial.png ├── redtutorial@2x.png ├── reset_button@2x.png ├── screenoverlay.png ├── violettutorial.png ├── yellowtutorial.png ├── greentutorial@2x.png ├── indigotutorial@2x.png ├── orangetutorial@2x.png ├── violettutorial@2x.png ├── yellowtutorial@2x.png ├── tutorialbackground.png ├── tutorialbackground@2x.png ├── BalloonGameTutorial_Prefix.pch ├── main.m ├── Classes │ ├── Classes │ │ ├── SPSprite.m │ │ ├── SPStage_Internal.h │ │ ├── SPDisplayObject_Internal.h │ │ ├── SPEvent_Internal.h │ │ ├── SPUtils.m │ │ ├── SPTouch_Internal.h │ │ ├── SPUtils.h │ │ ├── SPAnimatable.h │ │ ├── Sparrow.h │ │ ├── SPEnterFrameEvent.m │ │ ├── SPAVSound.h │ │ ├── SPAVSoundChannel.h │ │ ├── SPALSoundChannel.h │ │ ├── SPNSExtensions.h │ │ ├── SPALSound.h │ │ ├── SPSprite.h │ │ ├── SPAVSound.m │ │ └── SPBitmapChar.m │ ├── Game.h │ └── BalloonGameTutorialAppDelegate.h └── BalloonGameTutorial-Info.plist ├── 1-BalloonGameTutorial ├── music.caf ├── balloonpop.caf ├── bluetutorial.png ├── redtutorial.png ├── reset_button.png ├── greentutorial.png ├── indigotutorial.png ├── orangetutorial.png ├── redfortutorial.png ├── screenoverlay.png ├── violettutorial.png ├── yellowtutorial.png ├── tutorialbackground.png ├── BalloonGameTutorial_Prefix.pch ├── main.m ├── Classes │ ├── Classes │ │ ├── SPSprite.m │ │ ├── SPStage_Internal.h │ │ ├── SPDisplayObject_Internal.h │ │ ├── SPEvent_Internal.h │ │ ├── SPUtils.m │ │ ├── SPTouch_Internal.h │ │ ├── SPUtils.h │ │ ├── SPAnimatable.h │ │ ├── Sparrow.h │ │ ├── SPEnterFrameEvent.m │ │ ├── SPAVSound.h │ │ ├── SPAVSoundChannel.h │ │ ├── SPALSoundChannel.h │ │ ├── SPNSExtensions.h │ │ ├── SPALSound.h │ │ ├── SPSprite.h │ │ ├── SPAVSound.m │ │ ├── SPBitmapChar.m │ │ └── SPTouchProcessor.h │ ├── Game.h │ ├── Game.m │ └── BalloonGameTutorialAppDelegate.h └── BalloonGameTutorial-Info.plist ├── 2-BalloonGameTutorial ├── music.caf ├── balloonpop.caf ├── bluetutorial.png ├── redtutorial.png ├── reset_button.png ├── greentutorial.png ├── indigotutorial.png ├── orangetutorial.png ├── redfortutorial.png ├── screenoverlay.png ├── violettutorial.png ├── yellowtutorial.png ├── tutorialbackground.png ├── BalloonGameTutorial_Prefix.pch ├── main.m ├── Classes │ ├── Classes │ │ ├── SPSprite.m │ │ ├── SPStage_Internal.h │ │ ├── SPDisplayObject_Internal.h │ │ ├── SPEvent_Internal.h │ │ ├── SPUtils.m │ │ ├── SPTouch_Internal.h │ │ ├── SPUtils.h │ │ ├── SPAnimatable.h │ │ ├── Sparrow.h │ │ ├── SPEnterFrameEvent.m │ │ ├── SPAVSound.h │ │ ├── SPAVSoundChannel.h │ │ ├── SPALSoundChannel.h │ │ ├── SPNSExtensions.h │ │ ├── SPALSound.h │ │ ├── SPSprite.h │ │ ├── SPAVSound.m │ │ ├── SPBitmapChar.m │ │ └── SPTouchProcessor.h │ ├── Game.h │ └── BalloonGameTutorialAppDelegate.h └── BalloonGameTutorial-Info.plist ├── 3-BalloonGameTutorial ├── music.caf ├── balloonpop.caf ├── bluetutorial.png ├── redtutorial.png ├── reset_button.png ├── greentutorial.png ├── indigotutorial.png ├── orangetutorial.png ├── redfortutorial.png ├── screenoverlay.png ├── violettutorial.png ├── yellowtutorial.png ├── tutorialbackground.png ├── BalloonGameTutorial_Prefix.pch ├── main.m ├── Classes │ ├── Classes │ │ ├── SPSprite.m │ │ ├── SPStage_Internal.h │ │ ├── SPDisplayObject_Internal.h │ │ ├── SPEvent_Internal.h │ │ ├── SPUtils.m │ │ ├── SPTouch_Internal.h │ │ ├── SPUtils.h │ │ ├── SPAnimatable.h │ │ ├── Sparrow.h │ │ ├── SPEnterFrameEvent.m │ │ ├── SPAVSound.h │ │ ├── SPAVSoundChannel.h │ │ ├── SPALSoundChannel.h │ │ ├── SPNSExtensions.h │ │ ├── SPALSound.h │ │ ├── SPSprite.h │ │ ├── SPAVSound.m │ │ ├── SPBitmapChar.m │ │ └── SPTouchProcessor.h │ ├── Game.h │ └── BalloonGameTutorialAppDelegate.h └── BalloonGameTutorial-Info.plist ├── 4-BalloonGameTutorial ├── music.caf ├── balloonpop.caf ├── bluetutorial.png ├── redtutorial.png ├── reset_button.png ├── greentutorial.png ├── indigotutorial.png ├── orangetutorial.png ├── redfortutorial.png ├── screenoverlay.png ├── violettutorial.png ├── yellowtutorial.png ├── tutorialbackground.png ├── BalloonGameTutorial_Prefix.pch ├── main.m ├── Classes │ ├── Classes │ │ ├── SPSprite.m │ │ ├── SPStage_Internal.h │ │ ├── SPDisplayObject_Internal.h │ │ ├── SPEvent_Internal.h │ │ ├── SPUtils.m │ │ ├── SPTouch_Internal.h │ │ ├── SPUtils.h │ │ ├── SPAnimatable.h │ │ ├── Sparrow.h │ │ ├── SPEnterFrameEvent.m │ │ ├── SPAVSound.h │ │ ├── SPAVSoundChannel.h │ │ ├── SPALSoundChannel.h │ │ ├── SPNSExtensions.h │ │ ├── SPALSound.h │ │ ├── SPSprite.h │ │ ├── SPAVSound.m │ │ ├── SPBitmapChar.m │ │ └── SPTouchProcessor.h │ ├── Game.h │ └── BalloonGameTutorialAppDelegate.h └── BalloonGameTutorial-Info.plist ├── 5-BalloonGameTutorial ├── music.caf ├── balloonpop.caf ├── bluetutorial.png ├── redtutorial.png ├── reset_button.png ├── greentutorial.png ├── indigotutorial.png ├── orangetutorial.png ├── redfortutorial.png ├── screenoverlay.png ├── violettutorial.png ├── yellowtutorial.png ├── tutorialbackground.png ├── BalloonGameTutorial_Prefix.pch ├── main.m ├── Classes │ ├── Classes │ │ ├── SPSprite.m │ │ ├── SPStage_Internal.h │ │ ├── SPDisplayObject_Internal.h │ │ ├── SPEvent_Internal.h │ │ ├── SPUtils.m │ │ ├── SPTouch_Internal.h │ │ ├── SPUtils.h │ │ ├── SPAnimatable.h │ │ ├── Sparrow.h │ │ ├── SPEnterFrameEvent.m │ │ ├── SPAVSound.h │ │ ├── SPAVSoundChannel.h │ │ ├── SPALSoundChannel.h │ │ ├── SPNSExtensions.h │ │ ├── SPALSound.h │ │ ├── SPSprite.h │ │ ├── SPAVSound.m │ │ ├── SPBitmapChar.m │ │ └── SPTouchProcessor.h │ ├── Game.h │ └── BalloonGameTutorialAppDelegate.h └── BalloonGameTutorial-Info.plist └── 6-BalloonGameTutorial ├── music.caf ├── balloonpop.caf ├── bluetutorial.png ├── redtutorial.png ├── reset_button.png ├── greentutorial.png ├── indigotutorial.png ├── orangetutorial.png ├── redfortutorial.png ├── screenoverlay.png ├── violettutorial.png ├── yellowtutorial.png ├── tutorialbackground.png ├── BalloonGameTutorial_Prefix.pch ├── main.m ├── Classes ├── Classes │ ├── SPSprite.m │ ├── SPStage_Internal.h │ ├── SPDisplayObject_Internal.h │ ├── SPEvent_Internal.h │ ├── SPUtils.m │ ├── SPTouch_Internal.h │ ├── SPUtils.h │ ├── SPAnimatable.h │ ├── Sparrow.h │ ├── SPEnterFrameEvent.m │ ├── SPAVSound.h │ ├── SPAVSoundChannel.h │ ├── SPALSoundChannel.h │ ├── SPNSExtensions.h │ ├── SPALSound.h │ ├── SPSprite.h │ ├── SPAVSound.m │ └── SPBitmapChar.m ├── Game.h └── BalloonGameTutorialAppDelegate.h └── BalloonGameTutorial-Info.plist /7-BalloonGameTutorial/ .png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/7-BalloonGameTutorial/ .png -------------------------------------------------------------------------------- /1-BalloonGameTutorial/music.caf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/1-BalloonGameTutorial/music.caf -------------------------------------------------------------------------------- /2-BalloonGameTutorial/music.caf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/2-BalloonGameTutorial/music.caf -------------------------------------------------------------------------------- /3-BalloonGameTutorial/music.caf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/3-BalloonGameTutorial/music.caf -------------------------------------------------------------------------------- /4-BalloonGameTutorial/music.caf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/4-BalloonGameTutorial/music.caf -------------------------------------------------------------------------------- /5-BalloonGameTutorial/music.caf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/5-BalloonGameTutorial/music.caf -------------------------------------------------------------------------------- /6-BalloonGameTutorial/music.caf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/6-BalloonGameTutorial/music.caf -------------------------------------------------------------------------------- /7-BalloonGameTutorial/music.caf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/7-BalloonGameTutorial/music.caf -------------------------------------------------------------------------------- /1-BalloonGameTutorial/balloonpop.caf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/1-BalloonGameTutorial/balloonpop.caf -------------------------------------------------------------------------------- /2-BalloonGameTutorial/balloonpop.caf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/2-BalloonGameTutorial/balloonpop.caf -------------------------------------------------------------------------------- /3-BalloonGameTutorial/balloonpop.caf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/3-BalloonGameTutorial/balloonpop.caf -------------------------------------------------------------------------------- /4-BalloonGameTutorial/balloonpop.caf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/4-BalloonGameTutorial/balloonpop.caf -------------------------------------------------------------------------------- /5-BalloonGameTutorial/balloonpop.caf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/5-BalloonGameTutorial/balloonpop.caf -------------------------------------------------------------------------------- /6-BalloonGameTutorial/balloonpop.caf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/6-BalloonGameTutorial/balloonpop.caf -------------------------------------------------------------------------------- /7-BalloonGameTutorial/balloonpop.caf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/7-BalloonGameTutorial/balloonpop.caf -------------------------------------------------------------------------------- /1-BalloonGameTutorial/bluetutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/1-BalloonGameTutorial/bluetutorial.png -------------------------------------------------------------------------------- /1-BalloonGameTutorial/redtutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/1-BalloonGameTutorial/redtutorial.png -------------------------------------------------------------------------------- /1-BalloonGameTutorial/reset_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/1-BalloonGameTutorial/reset_button.png -------------------------------------------------------------------------------- /2-BalloonGameTutorial/bluetutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/2-BalloonGameTutorial/bluetutorial.png -------------------------------------------------------------------------------- /2-BalloonGameTutorial/redtutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/2-BalloonGameTutorial/redtutorial.png -------------------------------------------------------------------------------- /2-BalloonGameTutorial/reset_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/2-BalloonGameTutorial/reset_button.png -------------------------------------------------------------------------------- /3-BalloonGameTutorial/bluetutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/3-BalloonGameTutorial/bluetutorial.png -------------------------------------------------------------------------------- /3-BalloonGameTutorial/redtutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/3-BalloonGameTutorial/redtutorial.png -------------------------------------------------------------------------------- /3-BalloonGameTutorial/reset_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/3-BalloonGameTutorial/reset_button.png -------------------------------------------------------------------------------- /4-BalloonGameTutorial/bluetutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/4-BalloonGameTutorial/bluetutorial.png -------------------------------------------------------------------------------- /4-BalloonGameTutorial/redtutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/4-BalloonGameTutorial/redtutorial.png -------------------------------------------------------------------------------- /4-BalloonGameTutorial/reset_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/4-BalloonGameTutorial/reset_button.png -------------------------------------------------------------------------------- /5-BalloonGameTutorial/bluetutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/5-BalloonGameTutorial/bluetutorial.png -------------------------------------------------------------------------------- /5-BalloonGameTutorial/redtutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/5-BalloonGameTutorial/redtutorial.png -------------------------------------------------------------------------------- /5-BalloonGameTutorial/reset_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/5-BalloonGameTutorial/reset_button.png -------------------------------------------------------------------------------- /6-BalloonGameTutorial/bluetutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/6-BalloonGameTutorial/bluetutorial.png -------------------------------------------------------------------------------- /6-BalloonGameTutorial/redtutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/6-BalloonGameTutorial/redtutorial.png -------------------------------------------------------------------------------- /6-BalloonGameTutorial/reset_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/6-BalloonGameTutorial/reset_button.png -------------------------------------------------------------------------------- /7-BalloonGameTutorial/bluetutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/7-BalloonGameTutorial/bluetutorial.png -------------------------------------------------------------------------------- /7-BalloonGameTutorial/redtutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/7-BalloonGameTutorial/redtutorial.png -------------------------------------------------------------------------------- /7-BalloonGameTutorial/reset_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/7-BalloonGameTutorial/reset_button.png -------------------------------------------------------------------------------- /1-BalloonGameTutorial/greentutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/1-BalloonGameTutorial/greentutorial.png -------------------------------------------------------------------------------- /1-BalloonGameTutorial/indigotutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/1-BalloonGameTutorial/indigotutorial.png -------------------------------------------------------------------------------- /1-BalloonGameTutorial/orangetutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/1-BalloonGameTutorial/orangetutorial.png -------------------------------------------------------------------------------- /1-BalloonGameTutorial/redfortutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/1-BalloonGameTutorial/redfortutorial.png -------------------------------------------------------------------------------- /1-BalloonGameTutorial/screenoverlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/1-BalloonGameTutorial/screenoverlay.png -------------------------------------------------------------------------------- /1-BalloonGameTutorial/violettutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/1-BalloonGameTutorial/violettutorial.png -------------------------------------------------------------------------------- /1-BalloonGameTutorial/yellowtutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/1-BalloonGameTutorial/yellowtutorial.png -------------------------------------------------------------------------------- /2-BalloonGameTutorial/greentutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/2-BalloonGameTutorial/greentutorial.png -------------------------------------------------------------------------------- /2-BalloonGameTutorial/indigotutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/2-BalloonGameTutorial/indigotutorial.png -------------------------------------------------------------------------------- /2-BalloonGameTutorial/orangetutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/2-BalloonGameTutorial/orangetutorial.png -------------------------------------------------------------------------------- /2-BalloonGameTutorial/redfortutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/2-BalloonGameTutorial/redfortutorial.png -------------------------------------------------------------------------------- /2-BalloonGameTutorial/screenoverlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/2-BalloonGameTutorial/screenoverlay.png -------------------------------------------------------------------------------- /2-BalloonGameTutorial/violettutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/2-BalloonGameTutorial/violettutorial.png -------------------------------------------------------------------------------- /2-BalloonGameTutorial/yellowtutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/2-BalloonGameTutorial/yellowtutorial.png -------------------------------------------------------------------------------- /3-BalloonGameTutorial/greentutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/3-BalloonGameTutorial/greentutorial.png -------------------------------------------------------------------------------- /3-BalloonGameTutorial/indigotutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/3-BalloonGameTutorial/indigotutorial.png -------------------------------------------------------------------------------- /3-BalloonGameTutorial/orangetutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/3-BalloonGameTutorial/orangetutorial.png -------------------------------------------------------------------------------- /3-BalloonGameTutorial/redfortutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/3-BalloonGameTutorial/redfortutorial.png -------------------------------------------------------------------------------- /3-BalloonGameTutorial/screenoverlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/3-BalloonGameTutorial/screenoverlay.png -------------------------------------------------------------------------------- /3-BalloonGameTutorial/violettutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/3-BalloonGameTutorial/violettutorial.png -------------------------------------------------------------------------------- /3-BalloonGameTutorial/yellowtutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/3-BalloonGameTutorial/yellowtutorial.png -------------------------------------------------------------------------------- /4-BalloonGameTutorial/greentutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/4-BalloonGameTutorial/greentutorial.png -------------------------------------------------------------------------------- /4-BalloonGameTutorial/indigotutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/4-BalloonGameTutorial/indigotutorial.png -------------------------------------------------------------------------------- /4-BalloonGameTutorial/orangetutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/4-BalloonGameTutorial/orangetutorial.png -------------------------------------------------------------------------------- /4-BalloonGameTutorial/redfortutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/4-BalloonGameTutorial/redfortutorial.png -------------------------------------------------------------------------------- /4-BalloonGameTutorial/screenoverlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/4-BalloonGameTutorial/screenoverlay.png -------------------------------------------------------------------------------- /4-BalloonGameTutorial/violettutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/4-BalloonGameTutorial/violettutorial.png -------------------------------------------------------------------------------- /4-BalloonGameTutorial/yellowtutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/4-BalloonGameTutorial/yellowtutorial.png -------------------------------------------------------------------------------- /5-BalloonGameTutorial/greentutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/5-BalloonGameTutorial/greentutorial.png -------------------------------------------------------------------------------- /5-BalloonGameTutorial/indigotutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/5-BalloonGameTutorial/indigotutorial.png -------------------------------------------------------------------------------- /5-BalloonGameTutorial/orangetutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/5-BalloonGameTutorial/orangetutorial.png -------------------------------------------------------------------------------- /5-BalloonGameTutorial/redfortutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/5-BalloonGameTutorial/redfortutorial.png -------------------------------------------------------------------------------- /5-BalloonGameTutorial/screenoverlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/5-BalloonGameTutorial/screenoverlay.png -------------------------------------------------------------------------------- /5-BalloonGameTutorial/violettutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/5-BalloonGameTutorial/violettutorial.png -------------------------------------------------------------------------------- /5-BalloonGameTutorial/yellowtutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/5-BalloonGameTutorial/yellowtutorial.png -------------------------------------------------------------------------------- /6-BalloonGameTutorial/greentutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/6-BalloonGameTutorial/greentutorial.png -------------------------------------------------------------------------------- /6-BalloonGameTutorial/indigotutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/6-BalloonGameTutorial/indigotutorial.png -------------------------------------------------------------------------------- /6-BalloonGameTutorial/orangetutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/6-BalloonGameTutorial/orangetutorial.png -------------------------------------------------------------------------------- /6-BalloonGameTutorial/redfortutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/6-BalloonGameTutorial/redfortutorial.png -------------------------------------------------------------------------------- /6-BalloonGameTutorial/screenoverlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/6-BalloonGameTutorial/screenoverlay.png -------------------------------------------------------------------------------- /6-BalloonGameTutorial/violettutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/6-BalloonGameTutorial/violettutorial.png -------------------------------------------------------------------------------- /6-BalloonGameTutorial/yellowtutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/6-BalloonGameTutorial/yellowtutorial.png -------------------------------------------------------------------------------- /7-BalloonGameTutorial/bluetutorial@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/7-BalloonGameTutorial/bluetutorial@2x.png -------------------------------------------------------------------------------- /7-BalloonGameTutorial/greentutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/7-BalloonGameTutorial/greentutorial.png -------------------------------------------------------------------------------- /7-BalloonGameTutorial/indigotutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/7-BalloonGameTutorial/indigotutorial.png -------------------------------------------------------------------------------- /7-BalloonGameTutorial/orangetutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/7-BalloonGameTutorial/orangetutorial.png -------------------------------------------------------------------------------- /7-BalloonGameTutorial/redtutorial@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/7-BalloonGameTutorial/redtutorial@2x.png -------------------------------------------------------------------------------- /7-BalloonGameTutorial/reset_button@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/7-BalloonGameTutorial/reset_button@2x.png -------------------------------------------------------------------------------- /7-BalloonGameTutorial/screenoverlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/7-BalloonGameTutorial/screenoverlay.png -------------------------------------------------------------------------------- /7-BalloonGameTutorial/violettutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/7-BalloonGameTutorial/violettutorial.png -------------------------------------------------------------------------------- /7-BalloonGameTutorial/yellowtutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/7-BalloonGameTutorial/yellowtutorial.png -------------------------------------------------------------------------------- /7-BalloonGameTutorial/greentutorial@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/7-BalloonGameTutorial/greentutorial@2x.png -------------------------------------------------------------------------------- /7-BalloonGameTutorial/indigotutorial@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/7-BalloonGameTutorial/indigotutorial@2x.png -------------------------------------------------------------------------------- /7-BalloonGameTutorial/orangetutorial@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/7-BalloonGameTutorial/orangetutorial@2x.png -------------------------------------------------------------------------------- /7-BalloonGameTutorial/violettutorial@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/7-BalloonGameTutorial/violettutorial@2x.png -------------------------------------------------------------------------------- /7-BalloonGameTutorial/yellowtutorial@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/7-BalloonGameTutorial/yellowtutorial@2x.png -------------------------------------------------------------------------------- /1-BalloonGameTutorial/tutorialbackground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/1-BalloonGameTutorial/tutorialbackground.png -------------------------------------------------------------------------------- /2-BalloonGameTutorial/tutorialbackground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/2-BalloonGameTutorial/tutorialbackground.png -------------------------------------------------------------------------------- /3-BalloonGameTutorial/tutorialbackground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/3-BalloonGameTutorial/tutorialbackground.png -------------------------------------------------------------------------------- /4-BalloonGameTutorial/tutorialbackground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/4-BalloonGameTutorial/tutorialbackground.png -------------------------------------------------------------------------------- /5-BalloonGameTutorial/tutorialbackground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/5-BalloonGameTutorial/tutorialbackground.png -------------------------------------------------------------------------------- /6-BalloonGameTutorial/tutorialbackground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/6-BalloonGameTutorial/tutorialbackground.png -------------------------------------------------------------------------------- /7-BalloonGameTutorial/tutorialbackground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/7-BalloonGameTutorial/tutorialbackground.png -------------------------------------------------------------------------------- /7-BalloonGameTutorial/tutorialbackground@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maniacdev/iOS-Balloon-Game-Tutorial/HEAD/7-BalloonGameTutorial/tutorialbackground@2x.png -------------------------------------------------------------------------------- /1-BalloonGameTutorial/BalloonGameTutorial_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'BalloonGameTutorial' target in the 'BalloonGameTutorial' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #import 8 | 9 | #import "Sparrow.h" 10 | #endif 11 | -------------------------------------------------------------------------------- /2-BalloonGameTutorial/BalloonGameTutorial_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'BalloonGameTutorial' target in the 'BalloonGameTutorial' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #import 8 | 9 | #import "Sparrow.h" 10 | #endif 11 | -------------------------------------------------------------------------------- /3-BalloonGameTutorial/BalloonGameTutorial_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'BalloonGameTutorial' target in the 'BalloonGameTutorial' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #import 8 | 9 | #import "Sparrow.h" 10 | #endif 11 | -------------------------------------------------------------------------------- /4-BalloonGameTutorial/BalloonGameTutorial_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'BalloonGameTutorial' target in the 'BalloonGameTutorial' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #import 8 | 9 | #import "Sparrow.h" 10 | #endif 11 | -------------------------------------------------------------------------------- /5-BalloonGameTutorial/BalloonGameTutorial_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'BalloonGameTutorial' target in the 'BalloonGameTutorial' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #import 8 | 9 | #import "Sparrow.h" 10 | #endif 11 | -------------------------------------------------------------------------------- /6-BalloonGameTutorial/BalloonGameTutorial_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'BalloonGameTutorial' target in the 'BalloonGameTutorial' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #import 8 | 9 | #import "Sparrow.h" 10 | #endif 11 | -------------------------------------------------------------------------------- /7-BalloonGameTutorial/BalloonGameTutorial_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'BalloonGameTutorial' target in the 'BalloonGameTutorial' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #import 8 | 9 | #import "Sparrow.h" 10 | #endif 11 | -------------------------------------------------------------------------------- /1-BalloonGameTutorial/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // BalloonGameTutorial 4 | // 5 | // Created by Johann Dowa on 10-07-20. 6 | // Copyright JID Marketing 2010. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) { 12 | NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; 13 | int retVal = UIApplicationMain(argc, argv, nil, nil); 14 | [pool release]; 15 | return retVal; 16 | } 17 | -------------------------------------------------------------------------------- /2-BalloonGameTutorial/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // BalloonGameTutorial 4 | // 5 | // Created by Johann Dowa on 10-07-20. 6 | // Copyright JID Marketing 2010. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) { 12 | NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; 13 | int retVal = UIApplicationMain(argc, argv, nil, nil); 14 | [pool release]; 15 | return retVal; 16 | } 17 | -------------------------------------------------------------------------------- /3-BalloonGameTutorial/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // BalloonGameTutorial 4 | // 5 | // Created by Johann Dowa on 10-07-20. 6 | // Copyright JID Marketing 2010. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) { 12 | NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; 13 | int retVal = UIApplicationMain(argc, argv, nil, nil); 14 | [pool release]; 15 | return retVal; 16 | } 17 | -------------------------------------------------------------------------------- /4-BalloonGameTutorial/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // BalloonGameTutorial 4 | // 5 | // Created by Johann Dowa on 10-07-20. 6 | // Copyright JID Marketing 2010. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) { 12 | NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; 13 | int retVal = UIApplicationMain(argc, argv, nil, nil); 14 | [pool release]; 15 | return retVal; 16 | } 17 | -------------------------------------------------------------------------------- /5-BalloonGameTutorial/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // BalloonGameTutorial 4 | // 5 | // Created by Johann Dowa on 10-07-20. 6 | // Copyright JID Marketing 2010. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) { 12 | NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; 13 | int retVal = UIApplicationMain(argc, argv, nil, nil); 14 | [pool release]; 15 | return retVal; 16 | } 17 | -------------------------------------------------------------------------------- /6-BalloonGameTutorial/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // BalloonGameTutorial 4 | // 5 | // Created by Johann Dowa on 10-07-20. 6 | // Copyright JID Marketing 2010. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) { 12 | NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; 13 | int retVal = UIApplicationMain(argc, argv, nil, nil); 14 | [pool release]; 15 | return retVal; 16 | } 17 | -------------------------------------------------------------------------------- /7-BalloonGameTutorial/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // BalloonGameTutorial 4 | // 5 | // Created by Johann Dowa on 10-07-20. 6 | // Copyright JID Marketing 2010. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) { 12 | NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; 13 | int retVal = UIApplicationMain(argc, argv, nil, nil); 14 | [pool release]; 15 | return retVal; 16 | } 17 | -------------------------------------------------------------------------------- /1-BalloonGameTutorial/Classes/Classes/SPSprite.m: -------------------------------------------------------------------------------- 1 | // 2 | // SPSprite.m 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 21.03.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import "SPSprite.h" 13 | 14 | 15 | @implementation SPSprite 16 | 17 | + (SPSprite*)sprite 18 | { 19 | return [[[SPSprite alloc] init] autorelease]; 20 | } 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /2-BalloonGameTutorial/Classes/Classes/SPSprite.m: -------------------------------------------------------------------------------- 1 | // 2 | // SPSprite.m 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 21.03.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import "SPSprite.h" 13 | 14 | 15 | @implementation SPSprite 16 | 17 | + (SPSprite*)sprite 18 | { 19 | return [[[SPSprite alloc] init] autorelease]; 20 | } 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /3-BalloonGameTutorial/Classes/Classes/SPSprite.m: -------------------------------------------------------------------------------- 1 | // 2 | // SPSprite.m 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 21.03.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import "SPSprite.h" 13 | 14 | 15 | @implementation SPSprite 16 | 17 | + (SPSprite*)sprite 18 | { 19 | return [[[SPSprite alloc] init] autorelease]; 20 | } 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /4-BalloonGameTutorial/Classes/Classes/SPSprite.m: -------------------------------------------------------------------------------- 1 | // 2 | // SPSprite.m 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 21.03.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import "SPSprite.h" 13 | 14 | 15 | @implementation SPSprite 16 | 17 | + (SPSprite*)sprite 18 | { 19 | return [[[SPSprite alloc] init] autorelease]; 20 | } 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /5-BalloonGameTutorial/Classes/Classes/SPSprite.m: -------------------------------------------------------------------------------- 1 | // 2 | // SPSprite.m 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 21.03.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import "SPSprite.h" 13 | 14 | 15 | @implementation SPSprite 16 | 17 | + (SPSprite*)sprite 18 | { 19 | return [[[SPSprite alloc] init] autorelease]; 20 | } 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /6-BalloonGameTutorial/Classes/Classes/SPSprite.m: -------------------------------------------------------------------------------- 1 | // 2 | // SPSprite.m 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 21.03.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import "SPSprite.h" 13 | 14 | 15 | @implementation SPSprite 16 | 17 | + (SPSprite*)sprite 18 | { 19 | return [[[SPSprite alloc] init] autorelease]; 20 | } 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /7-BalloonGameTutorial/Classes/Classes/SPSprite.m: -------------------------------------------------------------------------------- 1 | // 2 | // SPSprite.m 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 21.03.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import "SPSprite.h" 13 | 14 | 15 | @implementation SPSprite 16 | 17 | + (SPSprite*)sprite 18 | { 19 | return [[[SPSprite alloc] init] autorelease]; 20 | } 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /1-BalloonGameTutorial/Classes/Classes/SPStage_Internal.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPStage_Internal.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 30.08.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPStage.h" 14 | 15 | @interface SPStage (Internal) 16 | 17 | - (void)setNativeView:(id)nativeView; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /2-BalloonGameTutorial/Classes/Classes/SPStage_Internal.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPStage_Internal.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 30.08.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPStage.h" 14 | 15 | @interface SPStage (Internal) 16 | 17 | - (void)setNativeView:(id)nativeView; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /3-BalloonGameTutorial/Classes/Classes/SPStage_Internal.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPStage_Internal.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 30.08.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPStage.h" 14 | 15 | @interface SPStage (Internal) 16 | 17 | - (void)setNativeView:(id)nativeView; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /4-BalloonGameTutorial/Classes/Classes/SPStage_Internal.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPStage_Internal.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 30.08.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPStage.h" 14 | 15 | @interface SPStage (Internal) 16 | 17 | - (void)setNativeView:(id)nativeView; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /5-BalloonGameTutorial/Classes/Classes/SPStage_Internal.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPStage_Internal.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 30.08.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPStage.h" 14 | 15 | @interface SPStage (Internal) 16 | 17 | - (void)setNativeView:(id)nativeView; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /6-BalloonGameTutorial/Classes/Classes/SPStage_Internal.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPStage_Internal.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 30.08.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPStage.h" 14 | 15 | @interface SPStage (Internal) 16 | 17 | - (void)setNativeView:(id)nativeView; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /7-BalloonGameTutorial/Classes/Classes/SPStage_Internal.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPStage_Internal.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 30.08.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPStage.h" 14 | 15 | @interface SPStage (Internal) 16 | 17 | - (void)setNativeView:(id)nativeView; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /1-BalloonGameTutorial/Classes/Classes/SPDisplayObject_Internal.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPDisplayObject_Internal.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 03.05.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPDisplayObject.h" 14 | 15 | @interface SPDisplayObject (Internal) 16 | 17 | - (void)setParent:(SPDisplayObjectContainer*)parent; 18 | - (void)dispatchEventOnChildren:(SPEvent *)event; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /2-BalloonGameTutorial/Classes/Classes/SPDisplayObject_Internal.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPDisplayObject_Internal.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 03.05.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPDisplayObject.h" 14 | 15 | @interface SPDisplayObject (Internal) 16 | 17 | - (void)setParent:(SPDisplayObjectContainer*)parent; 18 | - (void)dispatchEventOnChildren:(SPEvent *)event; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /3-BalloonGameTutorial/Classes/Classes/SPDisplayObject_Internal.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPDisplayObject_Internal.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 03.05.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPDisplayObject.h" 14 | 15 | @interface SPDisplayObject (Internal) 16 | 17 | - (void)setParent:(SPDisplayObjectContainer*)parent; 18 | - (void)dispatchEventOnChildren:(SPEvent *)event; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /4-BalloonGameTutorial/Classes/Classes/SPDisplayObject_Internal.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPDisplayObject_Internal.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 03.05.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPDisplayObject.h" 14 | 15 | @interface SPDisplayObject (Internal) 16 | 17 | - (void)setParent:(SPDisplayObjectContainer*)parent; 18 | - (void)dispatchEventOnChildren:(SPEvent *)event; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /5-BalloonGameTutorial/Classes/Classes/SPDisplayObject_Internal.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPDisplayObject_Internal.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 03.05.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPDisplayObject.h" 14 | 15 | @interface SPDisplayObject (Internal) 16 | 17 | - (void)setParent:(SPDisplayObjectContainer*)parent; 18 | - (void)dispatchEventOnChildren:(SPEvent *)event; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /6-BalloonGameTutorial/Classes/Classes/SPDisplayObject_Internal.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPDisplayObject_Internal.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 03.05.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPDisplayObject.h" 14 | 15 | @interface SPDisplayObject (Internal) 16 | 17 | - (void)setParent:(SPDisplayObjectContainer*)parent; 18 | - (void)dispatchEventOnChildren:(SPEvent *)event; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /7-BalloonGameTutorial/Classes/Classes/SPDisplayObject_Internal.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPDisplayObject_Internal.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 03.05.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPDisplayObject.h" 14 | 15 | @interface SPDisplayObject (Internal) 16 | 17 | - (void)setParent:(SPDisplayObjectContainer*)parent; 18 | - (void)dispatchEventOnChildren:(SPEvent *)event; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /1-BalloonGameTutorial/Classes/Classes/SPEvent_Internal.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPEvent_Internal.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 03.05.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPEvent.h" 14 | 15 | @interface SPEvent (Internal) 16 | 17 | - (BOOL)stopsImmediatePropagation; 18 | - (BOOL)stopsPropagation; 19 | - (void)setTarget:(SPEventDispatcher*)target; 20 | - (void)setCurrentTarget:(SPEventDispatcher*)currentTarget; 21 | 22 | @end 23 | 24 | -------------------------------------------------------------------------------- /2-BalloonGameTutorial/Classes/Classes/SPEvent_Internal.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPEvent_Internal.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 03.05.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPEvent.h" 14 | 15 | @interface SPEvent (Internal) 16 | 17 | - (BOOL)stopsImmediatePropagation; 18 | - (BOOL)stopsPropagation; 19 | - (void)setTarget:(SPEventDispatcher*)target; 20 | - (void)setCurrentTarget:(SPEventDispatcher*)currentTarget; 21 | 22 | @end 23 | 24 | -------------------------------------------------------------------------------- /3-BalloonGameTutorial/Classes/Classes/SPEvent_Internal.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPEvent_Internal.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 03.05.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPEvent.h" 14 | 15 | @interface SPEvent (Internal) 16 | 17 | - (BOOL)stopsImmediatePropagation; 18 | - (BOOL)stopsPropagation; 19 | - (void)setTarget:(SPEventDispatcher*)target; 20 | - (void)setCurrentTarget:(SPEventDispatcher*)currentTarget; 21 | 22 | @end 23 | 24 | -------------------------------------------------------------------------------- /4-BalloonGameTutorial/Classes/Classes/SPEvent_Internal.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPEvent_Internal.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 03.05.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPEvent.h" 14 | 15 | @interface SPEvent (Internal) 16 | 17 | - (BOOL)stopsImmediatePropagation; 18 | - (BOOL)stopsPropagation; 19 | - (void)setTarget:(SPEventDispatcher*)target; 20 | - (void)setCurrentTarget:(SPEventDispatcher*)currentTarget; 21 | 22 | @end 23 | 24 | -------------------------------------------------------------------------------- /5-BalloonGameTutorial/Classes/Classes/SPEvent_Internal.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPEvent_Internal.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 03.05.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPEvent.h" 14 | 15 | @interface SPEvent (Internal) 16 | 17 | - (BOOL)stopsImmediatePropagation; 18 | - (BOOL)stopsPropagation; 19 | - (void)setTarget:(SPEventDispatcher*)target; 20 | - (void)setCurrentTarget:(SPEventDispatcher*)currentTarget; 21 | 22 | @end 23 | 24 | -------------------------------------------------------------------------------- /6-BalloonGameTutorial/Classes/Classes/SPEvent_Internal.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPEvent_Internal.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 03.05.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPEvent.h" 14 | 15 | @interface SPEvent (Internal) 16 | 17 | - (BOOL)stopsImmediatePropagation; 18 | - (BOOL)stopsPropagation; 19 | - (void)setTarget:(SPEventDispatcher*)target; 20 | - (void)setCurrentTarget:(SPEventDispatcher*)currentTarget; 21 | 22 | @end 23 | 24 | -------------------------------------------------------------------------------- /7-BalloonGameTutorial/Classes/Classes/SPEvent_Internal.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPEvent_Internal.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 03.05.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPEvent.h" 14 | 15 | @interface SPEvent (Internal) 16 | 17 | - (BOOL)stopsImmediatePropagation; 18 | - (BOOL)stopsPropagation; 19 | - (void)setTarget:(SPEventDispatcher*)target; 20 | - (void)setCurrentTarget:(SPEventDispatcher*)currentTarget; 21 | 22 | @end 23 | 24 | -------------------------------------------------------------------------------- /1-BalloonGameTutorial/Classes/Classes/SPUtils.m: -------------------------------------------------------------------------------- 1 | // 2 | // SPUtils.m 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 04.01.11. 6 | // Copyright 2011 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import "SPUtils.h" 13 | 14 | 15 | @implementation SPUtils 16 | 17 | + (int)nextPowerOfTwo:(int)number 18 | { 19 | int result = 1; 20 | while (result < number) result *= 2; 21 | return result; 22 | } 23 | 24 | + (int)randomIntBetween:(int)minValue and:(int)maxValue 25 | { 26 | return (int)(minValue + [self randomFloat] * (maxValue - minValue)); 27 | } 28 | 29 | + (float)randomFloat 30 | { 31 | return (float) arc4random() / UINT_MAX; 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /2-BalloonGameTutorial/Classes/Classes/SPUtils.m: -------------------------------------------------------------------------------- 1 | // 2 | // SPUtils.m 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 04.01.11. 6 | // Copyright 2011 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import "SPUtils.h" 13 | 14 | 15 | @implementation SPUtils 16 | 17 | + (int)nextPowerOfTwo:(int)number 18 | { 19 | int result = 1; 20 | while (result < number) result *= 2; 21 | return result; 22 | } 23 | 24 | + (int)randomIntBetween:(int)minValue and:(int)maxValue 25 | { 26 | return (int)(minValue + [self randomFloat] * (maxValue - minValue)); 27 | } 28 | 29 | + (float)randomFloat 30 | { 31 | return (float) arc4random() / UINT_MAX; 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /3-BalloonGameTutorial/Classes/Classes/SPUtils.m: -------------------------------------------------------------------------------- 1 | // 2 | // SPUtils.m 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 04.01.11. 6 | // Copyright 2011 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import "SPUtils.h" 13 | 14 | 15 | @implementation SPUtils 16 | 17 | + (int)nextPowerOfTwo:(int)number 18 | { 19 | int result = 1; 20 | while (result < number) result *= 2; 21 | return result; 22 | } 23 | 24 | + (int)randomIntBetween:(int)minValue and:(int)maxValue 25 | { 26 | return (int)(minValue + [self randomFloat] * (maxValue - minValue)); 27 | } 28 | 29 | + (float)randomFloat 30 | { 31 | return (float) arc4random() / UINT_MAX; 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /4-BalloonGameTutorial/Classes/Classes/SPUtils.m: -------------------------------------------------------------------------------- 1 | // 2 | // SPUtils.m 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 04.01.11. 6 | // Copyright 2011 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import "SPUtils.h" 13 | 14 | 15 | @implementation SPUtils 16 | 17 | + (int)nextPowerOfTwo:(int)number 18 | { 19 | int result = 1; 20 | while (result < number) result *= 2; 21 | return result; 22 | } 23 | 24 | + (int)randomIntBetween:(int)minValue and:(int)maxValue 25 | { 26 | return (int)(minValue + [self randomFloat] * (maxValue - minValue)); 27 | } 28 | 29 | + (float)randomFloat 30 | { 31 | return (float) arc4random() / UINT_MAX; 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /5-BalloonGameTutorial/Classes/Classes/SPUtils.m: -------------------------------------------------------------------------------- 1 | // 2 | // SPUtils.m 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 04.01.11. 6 | // Copyright 2011 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import "SPUtils.h" 13 | 14 | 15 | @implementation SPUtils 16 | 17 | + (int)nextPowerOfTwo:(int)number 18 | { 19 | int result = 1; 20 | while (result < number) result *= 2; 21 | return result; 22 | } 23 | 24 | + (int)randomIntBetween:(int)minValue and:(int)maxValue 25 | { 26 | return (int)(minValue + [self randomFloat] * (maxValue - minValue)); 27 | } 28 | 29 | + (float)randomFloat 30 | { 31 | return (float) arc4random() / UINT_MAX; 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /6-BalloonGameTutorial/Classes/Classes/SPUtils.m: -------------------------------------------------------------------------------- 1 | // 2 | // SPUtils.m 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 04.01.11. 6 | // Copyright 2011 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import "SPUtils.h" 13 | 14 | 15 | @implementation SPUtils 16 | 17 | + (int)nextPowerOfTwo:(int)number 18 | { 19 | int result = 1; 20 | while (result < number) result *= 2; 21 | return result; 22 | } 23 | 24 | + (int)randomIntBetween:(int)minValue and:(int)maxValue 25 | { 26 | return (int)(minValue + [self randomFloat] * (maxValue - minValue)); 27 | } 28 | 29 | + (float)randomFloat 30 | { 31 | return (float) arc4random() / UINT_MAX; 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /7-BalloonGameTutorial/Classes/Classes/SPUtils.m: -------------------------------------------------------------------------------- 1 | // 2 | // SPUtils.m 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 04.01.11. 6 | // Copyright 2011 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import "SPUtils.h" 13 | 14 | 15 | @implementation SPUtils 16 | 17 | + (int)nextPowerOfTwo:(int)number 18 | { 19 | int result = 1; 20 | while (result < number) result *= 2; 21 | return result; 22 | } 23 | 24 | + (int)randomIntBetween:(int)minValue and:(int)maxValue 25 | { 26 | return (int)(minValue + [self randomFloat] * (maxValue - minValue)); 27 | } 28 | 29 | + (float)randomFloat 30 | { 31 | return (float) arc4random() / UINT_MAX; 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /1-BalloonGameTutorial/Classes/Classes/SPTouch_Internal.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPTouch_Internal.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 03.05.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPTouch.h" 14 | 15 | @interface SPTouch (Internal) 16 | 17 | - (void)setTimestamp:(double)timestamp; 18 | - (void)setGlobalX:(float)x; 19 | - (void)setGlobalY:(float)y; 20 | - (void)setPreviousGlobalX:(float)x; 21 | - (void)setPreviousGlobalY:(float)y; 22 | - (void)setTapCount:(int)tapCount; 23 | - (void)setPhase:(SPTouchPhase)phase; 24 | - (void)setTarget:(SPDisplayObject*)target; 25 | 26 | + (SPTouch*)touch; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /2-BalloonGameTutorial/Classes/Classes/SPTouch_Internal.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPTouch_Internal.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 03.05.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPTouch.h" 14 | 15 | @interface SPTouch (Internal) 16 | 17 | - (void)setTimestamp:(double)timestamp; 18 | - (void)setGlobalX:(float)x; 19 | - (void)setGlobalY:(float)y; 20 | - (void)setPreviousGlobalX:(float)x; 21 | - (void)setPreviousGlobalY:(float)y; 22 | - (void)setTapCount:(int)tapCount; 23 | - (void)setPhase:(SPTouchPhase)phase; 24 | - (void)setTarget:(SPDisplayObject*)target; 25 | 26 | + (SPTouch*)touch; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /3-BalloonGameTutorial/Classes/Classes/SPTouch_Internal.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPTouch_Internal.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 03.05.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPTouch.h" 14 | 15 | @interface SPTouch (Internal) 16 | 17 | - (void)setTimestamp:(double)timestamp; 18 | - (void)setGlobalX:(float)x; 19 | - (void)setGlobalY:(float)y; 20 | - (void)setPreviousGlobalX:(float)x; 21 | - (void)setPreviousGlobalY:(float)y; 22 | - (void)setTapCount:(int)tapCount; 23 | - (void)setPhase:(SPTouchPhase)phase; 24 | - (void)setTarget:(SPDisplayObject*)target; 25 | 26 | + (SPTouch*)touch; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /4-BalloonGameTutorial/Classes/Classes/SPTouch_Internal.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPTouch_Internal.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 03.05.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPTouch.h" 14 | 15 | @interface SPTouch (Internal) 16 | 17 | - (void)setTimestamp:(double)timestamp; 18 | - (void)setGlobalX:(float)x; 19 | - (void)setGlobalY:(float)y; 20 | - (void)setPreviousGlobalX:(float)x; 21 | - (void)setPreviousGlobalY:(float)y; 22 | - (void)setTapCount:(int)tapCount; 23 | - (void)setPhase:(SPTouchPhase)phase; 24 | - (void)setTarget:(SPDisplayObject*)target; 25 | 26 | + (SPTouch*)touch; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /5-BalloonGameTutorial/Classes/Classes/SPTouch_Internal.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPTouch_Internal.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 03.05.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPTouch.h" 14 | 15 | @interface SPTouch (Internal) 16 | 17 | - (void)setTimestamp:(double)timestamp; 18 | - (void)setGlobalX:(float)x; 19 | - (void)setGlobalY:(float)y; 20 | - (void)setPreviousGlobalX:(float)x; 21 | - (void)setPreviousGlobalY:(float)y; 22 | - (void)setTapCount:(int)tapCount; 23 | - (void)setPhase:(SPTouchPhase)phase; 24 | - (void)setTarget:(SPDisplayObject*)target; 25 | 26 | + (SPTouch*)touch; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /6-BalloonGameTutorial/Classes/Classes/SPTouch_Internal.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPTouch_Internal.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 03.05.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPTouch.h" 14 | 15 | @interface SPTouch (Internal) 16 | 17 | - (void)setTimestamp:(double)timestamp; 18 | - (void)setGlobalX:(float)x; 19 | - (void)setGlobalY:(float)y; 20 | - (void)setPreviousGlobalX:(float)x; 21 | - (void)setPreviousGlobalY:(float)y; 22 | - (void)setTapCount:(int)tapCount; 23 | - (void)setPhase:(SPTouchPhase)phase; 24 | - (void)setTarget:(SPDisplayObject*)target; 25 | 26 | + (SPTouch*)touch; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /7-BalloonGameTutorial/Classes/Classes/SPTouch_Internal.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPTouch_Internal.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 03.05.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPTouch.h" 14 | 15 | @interface SPTouch (Internal) 16 | 17 | - (void)setTimestamp:(double)timestamp; 18 | - (void)setGlobalX:(float)x; 19 | - (void)setGlobalY:(float)y; 20 | - (void)setPreviousGlobalX:(float)x; 21 | - (void)setPreviousGlobalY:(float)y; 22 | - (void)setTapCount:(int)tapCount; 23 | - (void)setPhase:(SPTouchPhase)phase; 24 | - (void)setTarget:(SPDisplayObject*)target; 25 | 26 | + (SPTouch*)touch; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /1-BalloonGameTutorial/Classes/Classes/SPUtils.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPUtils.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 04.01.11. 6 | // Copyright 2011 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | 14 | /// The SPUtils class contains utility methods for different purposes. 15 | 16 | @interface SPUtils : NSObject 17 | 18 | /// Finds the next power of two equal to or above the specified number. 19 | + (int)nextPowerOfTwo:(int)number; 20 | 21 | /// Returns a random integer number between `minValue` (inclusive) and `maxValue` (exclusive). 22 | + (int)randomIntBetween:(int)minValue and:(int)maxValue; 23 | 24 | /// Returns a random float number between 0.0 and 1.0 25 | + (float)randomFloat; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /2-BalloonGameTutorial/Classes/Classes/SPUtils.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPUtils.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 04.01.11. 6 | // Copyright 2011 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | 14 | /// The SPUtils class contains utility methods for different purposes. 15 | 16 | @interface SPUtils : NSObject 17 | 18 | /// Finds the next power of two equal to or above the specified number. 19 | + (int)nextPowerOfTwo:(int)number; 20 | 21 | /// Returns a random integer number between `minValue` (inclusive) and `maxValue` (exclusive). 22 | + (int)randomIntBetween:(int)minValue and:(int)maxValue; 23 | 24 | /// Returns a random float number between 0.0 and 1.0 25 | + (float)randomFloat; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /3-BalloonGameTutorial/Classes/Classes/SPUtils.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPUtils.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 04.01.11. 6 | // Copyright 2011 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | 14 | /// The SPUtils class contains utility methods for different purposes. 15 | 16 | @interface SPUtils : NSObject 17 | 18 | /// Finds the next power of two equal to or above the specified number. 19 | + (int)nextPowerOfTwo:(int)number; 20 | 21 | /// Returns a random integer number between `minValue` (inclusive) and `maxValue` (exclusive). 22 | + (int)randomIntBetween:(int)minValue and:(int)maxValue; 23 | 24 | /// Returns a random float number between 0.0 and 1.0 25 | + (float)randomFloat; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /4-BalloonGameTutorial/Classes/Classes/SPUtils.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPUtils.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 04.01.11. 6 | // Copyright 2011 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | 14 | /// The SPUtils class contains utility methods for different purposes. 15 | 16 | @interface SPUtils : NSObject 17 | 18 | /// Finds the next power of two equal to or above the specified number. 19 | + (int)nextPowerOfTwo:(int)number; 20 | 21 | /// Returns a random integer number between `minValue` (inclusive) and `maxValue` (exclusive). 22 | + (int)randomIntBetween:(int)minValue and:(int)maxValue; 23 | 24 | /// Returns a random float number between 0.0 and 1.0 25 | + (float)randomFloat; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /5-BalloonGameTutorial/Classes/Classes/SPUtils.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPUtils.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 04.01.11. 6 | // Copyright 2011 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | 14 | /// The SPUtils class contains utility methods for different purposes. 15 | 16 | @interface SPUtils : NSObject 17 | 18 | /// Finds the next power of two equal to or above the specified number. 19 | + (int)nextPowerOfTwo:(int)number; 20 | 21 | /// Returns a random integer number between `minValue` (inclusive) and `maxValue` (exclusive). 22 | + (int)randomIntBetween:(int)minValue and:(int)maxValue; 23 | 24 | /// Returns a random float number between 0.0 and 1.0 25 | + (float)randomFloat; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /6-BalloonGameTutorial/Classes/Classes/SPUtils.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPUtils.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 04.01.11. 6 | // Copyright 2011 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | 14 | /// The SPUtils class contains utility methods for different purposes. 15 | 16 | @interface SPUtils : NSObject 17 | 18 | /// Finds the next power of two equal to or above the specified number. 19 | + (int)nextPowerOfTwo:(int)number; 20 | 21 | /// Returns a random integer number between `minValue` (inclusive) and `maxValue` (exclusive). 22 | + (int)randomIntBetween:(int)minValue and:(int)maxValue; 23 | 24 | /// Returns a random float number between 0.0 and 1.0 25 | + (float)randomFloat; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /7-BalloonGameTutorial/Classes/Classes/SPUtils.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPUtils.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 04.01.11. 6 | // Copyright 2011 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | 14 | /// The SPUtils class contains utility methods for different purposes. 15 | 16 | @interface SPUtils : NSObject 17 | 18 | /// Finds the next power of two equal to or above the specified number. 19 | + (int)nextPowerOfTwo:(int)number; 20 | 21 | /// Returns a random integer number between `minValue` (inclusive) and `maxValue` (exclusive). 22 | + (int)randomIntBetween:(int)minValue and:(int)maxValue; 23 | 24 | /// Returns a random float number between 0.0 and 1.0 25 | + (float)randomFloat; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /1-BalloonGameTutorial/Classes/Game.h: -------------------------------------------------------------------------------- 1 | // 2 | // Game.h 3 | // BalloonGameTutorial 4 | // 5 | // Created by Johann Dowa of ManiacDev.com 6 | // Copyright Johann Dowa 2010. All rights reserved. 7 | // 8 | // You may use this code within your own games. In fact I encourage it, and if 9 | // you provide credit somewhere in your game to myself and ManiacDev.Com tell 10 | // me about it and I'll mention it on my ManiacDev.Com which receives thousands 11 | // of daily visits. 12 | // 13 | // You may however not use this code or any portion for any use other than in 14 | // the development of iOS applications without my permission. 15 | // (In other words you may not use it in any tutorials, books wikis etc. 16 | // without asking me first) 17 | // 18 | #import 19 | 20 | @interface Game : SPStage 21 | { 22 | int score; 23 | int level; 24 | SPTextField *scoreTextField; 25 | SPTextField *levelTextField; 26 | } 27 | @end 28 | -------------------------------------------------------------------------------- /2-BalloonGameTutorial/Classes/Game.h: -------------------------------------------------------------------------------- 1 | // 2 | // Game.h 3 | // BalloonGameTutorial 4 | // 5 | // Created by Johann Dowa of ManiacDev.com 6 | // Copyright Johann Dowa 2010. All rights reserved. 7 | // 8 | // You may use this code within your own games. In fact I encourage it, and if 9 | // you provide credit somewhere in your game to myself and ManiacDev.Com tell 10 | // me about it and I'll mention it on my ManiacDev.Com which receives thousands 11 | // of daily visits. 12 | // 13 | // You may however not use this code or any portion for any use other than in 14 | // the development of iOS applications without my permission. 15 | // (In other words you may not use it in any tutorials, books wikis etc. 16 | // without asking me first) 17 | // 18 | #import 19 | 20 | @interface Game : SPStage 21 | { 22 | int score; 23 | int level; 24 | SPTextField *scoreTextField; 25 | SPTextField *levelTextField; 26 | } 27 | @end 28 | -------------------------------------------------------------------------------- /1-BalloonGameTutorial/Classes/Game.m: -------------------------------------------------------------------------------- 1 | // 2 | // Game.m 3 | // BalloonGameTutorial 4 | // 5 | // Created by Johann Dowa of ManiacDev.com 6 | // Copyright Johann Dowa 2010. All rights reserved. 7 | // 8 | // You may use this code within your own games. In fact I encourage it, and if 9 | // you provide credit somewhere in your game to myself and ManiacDev.Com tell 10 | // me about it and I'll mention it on my ManiacDev.Com which receives thousands 11 | // of daily visits. 12 | // 13 | // You may however not use this code or any portion for any use other than in 14 | // the development of iOS applications without my permission. 15 | // (In other words you may not use it in any tutorials, books wikis etc. 16 | // without asking me first) 17 | 18 | #import "Game.h" 19 | 20 | // 21 | @implementation Game 22 | 23 | 24 | - (id)initWithWidth:(float)width height:(float)height 25 | { 26 | 27 | if (self = [super initWithWidth:width height:height]) 28 | { 29 | } 30 | 31 | return self; 32 | } 33 | @end 34 | 35 | -------------------------------------------------------------------------------- /3-BalloonGameTutorial/Classes/Game.h: -------------------------------------------------------------------------------- 1 | // 2 | // Game.h 3 | // BalloonGameTutorial 4 | // 5 | // Created by Johann Dowa of ManiacDev.com 6 | // Copyright Johann Dowa 2010. All rights reserved. 7 | // 8 | // You may use this code within your own games. In fact I encourage it, and if 9 | // you provide credit somewhere in your game to myself and ManiacDev.Com tell 10 | // me about it and I'll mention it on my ManiacDev.Com which receives thousands 11 | // of daily visits. 12 | // 13 | // You may however not use this code or any portion for any use other than in 14 | // the development of iOS applications without my permission. 15 | // (In other words you may not use it in any tutorials, books wikis etc. 16 | // without asking me first) 17 | // 18 | #import 19 | 20 | @interface Game : SPStage 21 | { 22 | int score; 23 | int level; 24 | SPTextField *scoreTextField; 25 | SPTextField *levelTextField; 26 | NSMutableArray *balloonTextures; 27 | SPSprite *playFieldSprite; 28 | } 29 | -(void)addBalloon; 30 | @end 31 | -------------------------------------------------------------------------------- /1-BalloonGameTutorial/Classes/Classes/SPAnimatable.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPAnimatable.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 09.05.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | 14 | /** ------------------------------------------------------------------------------------------------ 15 | 16 | The SPAnimatable protocol describes objects that are animated depending on the passed time. 17 | Any object that implements this protocol can be added to the SPJuggler. 18 | 19 | ------------------------------------------------------------------------------------------------- */ 20 | 21 | @protocol SPAnimatable 22 | 23 | /// Advance the animation by a number of seconds. 24 | - (void)advanceTime:(double)seconds; 25 | 26 | /// Indicates if the animation is finished. (The juggler will purge the object.) 27 | @property (nonatomic, readonly) BOOL isComplete; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /2-BalloonGameTutorial/Classes/Classes/SPAnimatable.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPAnimatable.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 09.05.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | 14 | /** ------------------------------------------------------------------------------------------------ 15 | 16 | The SPAnimatable protocol describes objects that are animated depending on the passed time. 17 | Any object that implements this protocol can be added to the SPJuggler. 18 | 19 | ------------------------------------------------------------------------------------------------- */ 20 | 21 | @protocol SPAnimatable 22 | 23 | /// Advance the animation by a number of seconds. 24 | - (void)advanceTime:(double)seconds; 25 | 26 | /// Indicates if the animation is finished. (The juggler will purge the object.) 27 | @property (nonatomic, readonly) BOOL isComplete; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /3-BalloonGameTutorial/Classes/Classes/SPAnimatable.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPAnimatable.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 09.05.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | 14 | /** ------------------------------------------------------------------------------------------------ 15 | 16 | The SPAnimatable protocol describes objects that are animated depending on the passed time. 17 | Any object that implements this protocol can be added to the SPJuggler. 18 | 19 | ------------------------------------------------------------------------------------------------- */ 20 | 21 | @protocol SPAnimatable 22 | 23 | /// Advance the animation by a number of seconds. 24 | - (void)advanceTime:(double)seconds; 25 | 26 | /// Indicates if the animation is finished. (The juggler will purge the object.) 27 | @property (nonatomic, readonly) BOOL isComplete; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /4-BalloonGameTutorial/Classes/Classes/SPAnimatable.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPAnimatable.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 09.05.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | 14 | /** ------------------------------------------------------------------------------------------------ 15 | 16 | The SPAnimatable protocol describes objects that are animated depending on the passed time. 17 | Any object that implements this protocol can be added to the SPJuggler. 18 | 19 | ------------------------------------------------------------------------------------------------- */ 20 | 21 | @protocol SPAnimatable 22 | 23 | /// Advance the animation by a number of seconds. 24 | - (void)advanceTime:(double)seconds; 25 | 26 | /// Indicates if the animation is finished. (The juggler will purge the object.) 27 | @property (nonatomic, readonly) BOOL isComplete; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /5-BalloonGameTutorial/Classes/Classes/SPAnimatable.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPAnimatable.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 09.05.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | 14 | /** ------------------------------------------------------------------------------------------------ 15 | 16 | The SPAnimatable protocol describes objects that are animated depending on the passed time. 17 | Any object that implements this protocol can be added to the SPJuggler. 18 | 19 | ------------------------------------------------------------------------------------------------- */ 20 | 21 | @protocol SPAnimatable 22 | 23 | /// Advance the animation by a number of seconds. 24 | - (void)advanceTime:(double)seconds; 25 | 26 | /// Indicates if the animation is finished. (The juggler will purge the object.) 27 | @property (nonatomic, readonly) BOOL isComplete; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /6-BalloonGameTutorial/Classes/Classes/SPAnimatable.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPAnimatable.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 09.05.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | 14 | /** ------------------------------------------------------------------------------------------------ 15 | 16 | The SPAnimatable protocol describes objects that are animated depending on the passed time. 17 | Any object that implements this protocol can be added to the SPJuggler. 18 | 19 | ------------------------------------------------------------------------------------------------- */ 20 | 21 | @protocol SPAnimatable 22 | 23 | /// Advance the animation by a number of seconds. 24 | - (void)advanceTime:(double)seconds; 25 | 26 | /// Indicates if the animation is finished. (The juggler will purge the object.) 27 | @property (nonatomic, readonly) BOOL isComplete; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /7-BalloonGameTutorial/Classes/Classes/SPAnimatable.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPAnimatable.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 09.05.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | 14 | /** ------------------------------------------------------------------------------------------------ 15 | 16 | The SPAnimatable protocol describes objects that are animated depending on the passed time. 17 | Any object that implements this protocol can be added to the SPJuggler. 18 | 19 | ------------------------------------------------------------------------------------------------- */ 20 | 21 | @protocol SPAnimatable 22 | 23 | /// Advance the animation by a number of seconds. 24 | - (void)advanceTime:(double)seconds; 25 | 26 | /// Indicates if the animation is finished. (The juggler will purge the object.) 27 | @property (nonatomic, readonly) BOOL isComplete; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /4-BalloonGameTutorial/Classes/Game.h: -------------------------------------------------------------------------------- 1 | // 2 | // Game.h 3 | // BalloonGameTutorial 4 | // 5 | // Created by Johann Dowa of ManiacDev.com 6 | // Copyright Johann Dowa 2010. All rights reserved. 7 | // 8 | // You may use this code within your own games. In fact I encourage it, and if 9 | // you provide credit somewhere in your game to myself and ManiacDev.Com tell 10 | // me about it and I'll mention it on my ManiacDev.Com which receives thousands 11 | // of daily visits. 12 | // 13 | // You may however not use this code or any portion for any use other than in 14 | // the development of iOS applications without my permission. 15 | // (In other words you may not use it in any tutorials, books wikis etc. 16 | // without asking me first) 17 | // 18 | #import 19 | 20 | @interface Game : SPStage 21 | { 22 | int score; 23 | int level; 24 | SPTextField *scoreTextField; 25 | SPTextField *levelTextField; 26 | NSMutableArray *balloonTextures; 27 | SPSprite *playFieldSprite; 28 | } 29 | -(void)addBalloon; 30 | -(void)onTouchBalloon:(SPTouchEvent*)event; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /1-BalloonGameTutorial/BalloonGameTutorial-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | com.yourcompany.${PRODUCT_NAME:rfc1034identifier} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | NSMainNibFile 28 | MainWindow 29 | UIStatusBarHidden 30 | 31 | UIApplicationExitsOnSuspend 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /2-BalloonGameTutorial/BalloonGameTutorial-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | com.yourcompany.${PRODUCT_NAME:rfc1034identifier} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | NSMainNibFile 28 | MainWindow 29 | UIStatusBarHidden 30 | 31 | UIApplicationExitsOnSuspend 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /3-BalloonGameTutorial/BalloonGameTutorial-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | com.yourcompany.${PRODUCT_NAME:rfc1034identifier} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | NSMainNibFile 28 | MainWindow 29 | UIStatusBarHidden 30 | 31 | UIApplicationExitsOnSuspend 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /4-BalloonGameTutorial/BalloonGameTutorial-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | com.yourcompany.${PRODUCT_NAME:rfc1034identifier} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | NSMainNibFile 28 | MainWindow 29 | UIStatusBarHidden 30 | 31 | UIApplicationExitsOnSuspend 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /5-BalloonGameTutorial/BalloonGameTutorial-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | com.yourcompany.${PRODUCT_NAME:rfc1034identifier} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | NSMainNibFile 28 | MainWindow 29 | UIStatusBarHidden 30 | 31 | UIApplicationExitsOnSuspend 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /6-BalloonGameTutorial/BalloonGameTutorial-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | com.yourcompany.${PRODUCT_NAME:rfc1034identifier} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | NSMainNibFile 28 | MainWindow 29 | UIStatusBarHidden 30 | 31 | UIApplicationExitsOnSuspend 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /7-BalloonGameTutorial/BalloonGameTutorial-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | com.yourcompany.${PRODUCT_NAME:rfc1034identifier} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | NSMainNibFile 28 | MainWindow 29 | UIStatusBarHidden 30 | 31 | UIApplicationExitsOnSuspend 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /5-BalloonGameTutorial/Classes/Game.h: -------------------------------------------------------------------------------- 1 | // 2 | // Game.h 3 | // BalloonGameTutorial 4 | // 5 | // Created by Johann Dowa of ManiacDev.com 6 | // Copyright Johann Dowa 2010. All rights reserved. 7 | // 8 | // You may use this code within your own games. In fact I encourage it, and if 9 | // you provide credit somewhere in your game to myself and ManiacDev.Com tell 10 | // me about it and I'll mention it on my ManiacDev.Com which receives thousands 11 | // of daily visits. 12 | // 13 | // You may however not use this code or any portion for any use other than in 14 | // the development of iOS applications without my permission. 15 | // (In other words you may not use it in any tutorials, books wikis etc. 16 | // without asking me first) 17 | // 18 | #import 19 | 20 | @interface Game : SPStage 21 | { 22 | int score; 23 | int level; 24 | SPTextField *scoreTextField; 25 | SPTextField *levelTextField; 26 | NSMutableArray *balloonTextures; 27 | SPSprite *playFieldSprite; 28 | } 29 | -(void)addBalloon; 30 | -(void)onTouchBalloon:(SPTouchEvent*)event; 31 | -(void)movementThroughTopOfScreen:(SPEvent*)event; 32 | -(void)drawBalloons; 33 | -(void)balloonPopped:(SPEvent*)event; 34 | @end 35 | -------------------------------------------------------------------------------- /6-BalloonGameTutorial/Classes/Game.h: -------------------------------------------------------------------------------- 1 | // 2 | // Game.h 3 | // BalloonGameTutorial 4 | // 5 | // Created by Johann Dowa of ManiacDev.com 6 | // Copyright Johann Dowa 2010. All rights reserved. 7 | // 8 | // You may use this code within your own games. In fact I encourage it, and if 9 | // you provide credit somewhere in your game to myself and ManiacDev.Com tell 10 | // me about it and I'll mention it on my ManiacDev.Com which receives thousands 11 | // of daily visits. 12 | // 13 | // You may however not use this code or any portion for any use other than in 14 | // the development of iOS applications without my permission. 15 | // (In other words you may not use it in any tutorials, books wikis etc. 16 | // without asking me first) 17 | // 18 | #import 19 | 20 | @interface Game : SPStage 21 | { 22 | int score; 23 | int level; 24 | SPTextField *scoreTextField; 25 | SPTextField *levelTextField; 26 | NSMutableArray *balloonTextures; 27 | SPSprite *playFieldSprite; 28 | BOOL resetButtonVisible; 29 | } 30 | -(void)addBalloon; 31 | -(void)onTouchBalloon:(SPTouchEvent*)event; 32 | -(void)movementThroughTopOfScreen:(SPEvent*)event; 33 | -(void)drawBalloons; 34 | -(void)balloonPopped:(SPEvent*)event; 35 | -(void)onResetButtonTriggered:(SPEvent*)event; 36 | @end 37 | -------------------------------------------------------------------------------- /7-BalloonGameTutorial/Classes/Game.h: -------------------------------------------------------------------------------- 1 | // 2 | // Game.h 3 | // BalloonGameTutorial 4 | // 5 | // Created by Johann Dowa of ManiacDev.com 6 | // Copyright Johann Dowa 2010. All rights reserved. 7 | // 8 | // You may use this code within your own games. In fact I encourage it, and if 9 | // you provide credit somewhere in your game to myself and ManiacDev.Com tell 10 | // me about it and I'll mention it on my ManiacDev.Com which receives thousands 11 | // of daily visits. 12 | // 13 | // You may however not use this code or any portion for any use other than in 14 | // the development of iOS applications without my permission. 15 | // (In other words you may not use it in any tutorials, books wikis etc. 16 | // without asking me first) 17 | // 18 | #import 19 | 20 | @interface Game : SPStage 21 | { 22 | int score; 23 | int level; 24 | SPTextField *scoreTextField; 25 | SPTextField *levelTextField; 26 | NSMutableArray *balloonTextures; 27 | SPSprite *playFieldSprite; 28 | BOOL resetButtonVisible; 29 | } 30 | -(void)addBalloon; 31 | -(void)onTouchBalloon:(SPTouchEvent*)event; 32 | -(void)movementThroughTopOfScreen:(SPEvent*)event; 33 | -(void)drawBalloons; 34 | -(void)balloonPopped:(SPEvent*)event; 35 | -(void)onResetButtonTriggered:(SPEvent*)event; 36 | @end 37 | -------------------------------------------------------------------------------- /1-BalloonGameTutorial/Classes/Classes/Sparrow.h: -------------------------------------------------------------------------------- 1 | // 2 | // Sparrow.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 21.03.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #define SPARROW_VERSION @"1.1.0" 13 | 14 | #import "SPNSExtensions.h" 15 | #import "SPEventDispatcher.h" 16 | #import "SPDisplayObject.h" 17 | #import "SPDisplayObjectContainer.h" 18 | #import "SPQuad.h" 19 | #import "SPImage.h" 20 | #import "SPTextField.h" 21 | #import "SPBitmapFont.h" 22 | #import "SPButton.h" 23 | #import "SPStage.h" 24 | #import "SPSprite.h" 25 | #import "SPMovieClip.h" 26 | #import "SPTexture.h" 27 | #import "SPSubTexture.h" 28 | #import "SPRenderTexture.h" 29 | #import "SPGLTexture.h" 30 | #import "SPTextureAtlas.h" 31 | #import "SPEvent.h" 32 | #import "SPTouchEvent.h" 33 | #import "SPEnterFrameEvent.h" 34 | #import "SPJuggler.h" 35 | #import "SPTransitions.h" 36 | #import "SPTween.h" 37 | #import "SPDelayedInvocation.h" 38 | #import "SPRectangle.h" 39 | #import "SPMacros.h" 40 | #import "SPUtils.h" 41 | #import "SPView.h" 42 | #import "SPRenderSupport.h" 43 | #import "SPAudioEngine.h" 44 | #import "SPSound.h" 45 | #import "SPSoundChannel.h" 46 | -------------------------------------------------------------------------------- /2-BalloonGameTutorial/Classes/Classes/Sparrow.h: -------------------------------------------------------------------------------- 1 | // 2 | // Sparrow.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 21.03.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #define SPARROW_VERSION @"1.1.0" 13 | 14 | #import "SPNSExtensions.h" 15 | #import "SPEventDispatcher.h" 16 | #import "SPDisplayObject.h" 17 | #import "SPDisplayObjectContainer.h" 18 | #import "SPQuad.h" 19 | #import "SPImage.h" 20 | #import "SPTextField.h" 21 | #import "SPBitmapFont.h" 22 | #import "SPButton.h" 23 | #import "SPStage.h" 24 | #import "SPSprite.h" 25 | #import "SPMovieClip.h" 26 | #import "SPTexture.h" 27 | #import "SPSubTexture.h" 28 | #import "SPRenderTexture.h" 29 | #import "SPGLTexture.h" 30 | #import "SPTextureAtlas.h" 31 | #import "SPEvent.h" 32 | #import "SPTouchEvent.h" 33 | #import "SPEnterFrameEvent.h" 34 | #import "SPJuggler.h" 35 | #import "SPTransitions.h" 36 | #import "SPTween.h" 37 | #import "SPDelayedInvocation.h" 38 | #import "SPRectangle.h" 39 | #import "SPMacros.h" 40 | #import "SPUtils.h" 41 | #import "SPView.h" 42 | #import "SPRenderSupport.h" 43 | #import "SPAudioEngine.h" 44 | #import "SPSound.h" 45 | #import "SPSoundChannel.h" 46 | -------------------------------------------------------------------------------- /3-BalloonGameTutorial/Classes/Classes/Sparrow.h: -------------------------------------------------------------------------------- 1 | // 2 | // Sparrow.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 21.03.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #define SPARROW_VERSION @"1.1.0" 13 | 14 | #import "SPNSExtensions.h" 15 | #import "SPEventDispatcher.h" 16 | #import "SPDisplayObject.h" 17 | #import "SPDisplayObjectContainer.h" 18 | #import "SPQuad.h" 19 | #import "SPImage.h" 20 | #import "SPTextField.h" 21 | #import "SPBitmapFont.h" 22 | #import "SPButton.h" 23 | #import "SPStage.h" 24 | #import "SPSprite.h" 25 | #import "SPMovieClip.h" 26 | #import "SPTexture.h" 27 | #import "SPSubTexture.h" 28 | #import "SPRenderTexture.h" 29 | #import "SPGLTexture.h" 30 | #import "SPTextureAtlas.h" 31 | #import "SPEvent.h" 32 | #import "SPTouchEvent.h" 33 | #import "SPEnterFrameEvent.h" 34 | #import "SPJuggler.h" 35 | #import "SPTransitions.h" 36 | #import "SPTween.h" 37 | #import "SPDelayedInvocation.h" 38 | #import "SPRectangle.h" 39 | #import "SPMacros.h" 40 | #import "SPUtils.h" 41 | #import "SPView.h" 42 | #import "SPRenderSupport.h" 43 | #import "SPAudioEngine.h" 44 | #import "SPSound.h" 45 | #import "SPSoundChannel.h" 46 | -------------------------------------------------------------------------------- /4-BalloonGameTutorial/Classes/Classes/Sparrow.h: -------------------------------------------------------------------------------- 1 | // 2 | // Sparrow.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 21.03.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #define SPARROW_VERSION @"1.1.0" 13 | 14 | #import "SPNSExtensions.h" 15 | #import "SPEventDispatcher.h" 16 | #import "SPDisplayObject.h" 17 | #import "SPDisplayObjectContainer.h" 18 | #import "SPQuad.h" 19 | #import "SPImage.h" 20 | #import "SPTextField.h" 21 | #import "SPBitmapFont.h" 22 | #import "SPButton.h" 23 | #import "SPStage.h" 24 | #import "SPSprite.h" 25 | #import "SPMovieClip.h" 26 | #import "SPTexture.h" 27 | #import "SPSubTexture.h" 28 | #import "SPRenderTexture.h" 29 | #import "SPGLTexture.h" 30 | #import "SPTextureAtlas.h" 31 | #import "SPEvent.h" 32 | #import "SPTouchEvent.h" 33 | #import "SPEnterFrameEvent.h" 34 | #import "SPJuggler.h" 35 | #import "SPTransitions.h" 36 | #import "SPTween.h" 37 | #import "SPDelayedInvocation.h" 38 | #import "SPRectangle.h" 39 | #import "SPMacros.h" 40 | #import "SPUtils.h" 41 | #import "SPView.h" 42 | #import "SPRenderSupport.h" 43 | #import "SPAudioEngine.h" 44 | #import "SPSound.h" 45 | #import "SPSoundChannel.h" 46 | -------------------------------------------------------------------------------- /5-BalloonGameTutorial/Classes/Classes/Sparrow.h: -------------------------------------------------------------------------------- 1 | // 2 | // Sparrow.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 21.03.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #define SPARROW_VERSION @"1.1.0" 13 | 14 | #import "SPNSExtensions.h" 15 | #import "SPEventDispatcher.h" 16 | #import "SPDisplayObject.h" 17 | #import "SPDisplayObjectContainer.h" 18 | #import "SPQuad.h" 19 | #import "SPImage.h" 20 | #import "SPTextField.h" 21 | #import "SPBitmapFont.h" 22 | #import "SPButton.h" 23 | #import "SPStage.h" 24 | #import "SPSprite.h" 25 | #import "SPMovieClip.h" 26 | #import "SPTexture.h" 27 | #import "SPSubTexture.h" 28 | #import "SPRenderTexture.h" 29 | #import "SPGLTexture.h" 30 | #import "SPTextureAtlas.h" 31 | #import "SPEvent.h" 32 | #import "SPTouchEvent.h" 33 | #import "SPEnterFrameEvent.h" 34 | #import "SPJuggler.h" 35 | #import "SPTransitions.h" 36 | #import "SPTween.h" 37 | #import "SPDelayedInvocation.h" 38 | #import "SPRectangle.h" 39 | #import "SPMacros.h" 40 | #import "SPUtils.h" 41 | #import "SPView.h" 42 | #import "SPRenderSupport.h" 43 | #import "SPAudioEngine.h" 44 | #import "SPSound.h" 45 | #import "SPSoundChannel.h" 46 | -------------------------------------------------------------------------------- /6-BalloonGameTutorial/Classes/Classes/Sparrow.h: -------------------------------------------------------------------------------- 1 | // 2 | // Sparrow.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 21.03.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #define SPARROW_VERSION @"1.1.0" 13 | 14 | #import "SPNSExtensions.h" 15 | #import "SPEventDispatcher.h" 16 | #import "SPDisplayObject.h" 17 | #import "SPDisplayObjectContainer.h" 18 | #import "SPQuad.h" 19 | #import "SPImage.h" 20 | #import "SPTextField.h" 21 | #import "SPBitmapFont.h" 22 | #import "SPButton.h" 23 | #import "SPStage.h" 24 | #import "SPSprite.h" 25 | #import "SPMovieClip.h" 26 | #import "SPTexture.h" 27 | #import "SPSubTexture.h" 28 | #import "SPRenderTexture.h" 29 | #import "SPGLTexture.h" 30 | #import "SPTextureAtlas.h" 31 | #import "SPEvent.h" 32 | #import "SPTouchEvent.h" 33 | #import "SPEnterFrameEvent.h" 34 | #import "SPJuggler.h" 35 | #import "SPTransitions.h" 36 | #import "SPTween.h" 37 | #import "SPDelayedInvocation.h" 38 | #import "SPRectangle.h" 39 | #import "SPMacros.h" 40 | #import "SPUtils.h" 41 | #import "SPView.h" 42 | #import "SPRenderSupport.h" 43 | #import "SPAudioEngine.h" 44 | #import "SPSound.h" 45 | #import "SPSoundChannel.h" 46 | -------------------------------------------------------------------------------- /7-BalloonGameTutorial/Classes/Classes/Sparrow.h: -------------------------------------------------------------------------------- 1 | // 2 | // Sparrow.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 21.03.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #define SPARROW_VERSION @"1.1.0" 13 | 14 | #import "SPNSExtensions.h" 15 | #import "SPEventDispatcher.h" 16 | #import "SPDisplayObject.h" 17 | #import "SPDisplayObjectContainer.h" 18 | #import "SPQuad.h" 19 | #import "SPImage.h" 20 | #import "SPTextField.h" 21 | #import "SPBitmapFont.h" 22 | #import "SPButton.h" 23 | #import "SPStage.h" 24 | #import "SPSprite.h" 25 | #import "SPMovieClip.h" 26 | #import "SPTexture.h" 27 | #import "SPSubTexture.h" 28 | #import "SPRenderTexture.h" 29 | #import "SPGLTexture.h" 30 | #import "SPTextureAtlas.h" 31 | #import "SPEvent.h" 32 | #import "SPTouchEvent.h" 33 | #import "SPEnterFrameEvent.h" 34 | #import "SPJuggler.h" 35 | #import "SPTransitions.h" 36 | #import "SPTween.h" 37 | #import "SPDelayedInvocation.h" 38 | #import "SPRectangle.h" 39 | #import "SPMacros.h" 40 | #import "SPUtils.h" 41 | #import "SPView.h" 42 | #import "SPRenderSupport.h" 43 | #import "SPAudioEngine.h" 44 | #import "SPSound.h" 45 | #import "SPSoundChannel.h" 46 | -------------------------------------------------------------------------------- /1-BalloonGameTutorial/Classes/BalloonGameTutorialAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // BalloonGameTutorialAppDelegate.h 3 | // BalloonGameTutorial 4 | // 5 | // Created by Johann Dowa of ManiacDev.com 6 | // Copyright Johann Dowa 2010. All rights reserved. 7 | // 8 | // You may use this code within your own games. In fact I encourage it, and if 9 | // you provide credit somewhere in your game to myself and ManiacDev.Com tell 10 | // me about it and I'll mention it on my ManiacDev.Com which receives thousands 11 | // of daily visits. 12 | // 13 | // You may however not use this code or any portion for any use other than in 14 | // the development of iOS applications without my permission. 15 | // (In other words you may not use it in any tutorials, books wikis etc. 16 | // without asking me first) 17 | // 18 | // This file was created automatically when creating a Sparrow project 19 | // I left this alone - Check the Game.m file to learn how the app was made. 20 | 21 | #import 22 | #import "Sparrow.h" 23 | 24 | @interface BalloonGameTutorialAppDelegate : NSObject 25 | { 26 | UIWindow *window; 27 | SPView *sparrowView; 28 | } 29 | 30 | @property (nonatomic, retain) IBOutlet UIWindow *window; 31 | @property (nonatomic, retain) IBOutlet SPView *sparrowView; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /2-BalloonGameTutorial/Classes/BalloonGameTutorialAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // BalloonGameTutorialAppDelegate.h 3 | // BalloonGameTutorial 4 | // 5 | // Created by Johann Dowa of ManiacDev.com 6 | // Copyright Johann Dowa 2010. All rights reserved. 7 | // 8 | // You may use this code within your own games. In fact I encourage it, and if 9 | // you provide credit somewhere in your game to myself and ManiacDev.Com tell 10 | // me about it and I'll mention it on my ManiacDev.Com which receives thousands 11 | // of daily visits. 12 | // 13 | // You may however not use this code or any portion for any use other than in 14 | // the development of iOS applications without my permission. 15 | // (In other words you may not use it in any tutorials, books wikis etc. 16 | // without asking me first) 17 | // 18 | // This file was created automatically when creating a Sparrow project 19 | // I left this alone - Check the Game.m file to learn how the app was made. 20 | 21 | #import 22 | #import "Sparrow.h" 23 | 24 | @interface BalloonGameTutorialAppDelegate : NSObject 25 | { 26 | UIWindow *window; 27 | SPView *sparrowView; 28 | } 29 | 30 | @property (nonatomic, retain) IBOutlet UIWindow *window; 31 | @property (nonatomic, retain) IBOutlet SPView *sparrowView; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /3-BalloonGameTutorial/Classes/BalloonGameTutorialAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // BalloonGameTutorialAppDelegate.h 3 | // BalloonGameTutorial 4 | // 5 | // Created by Johann Dowa of ManiacDev.com 6 | // Copyright Johann Dowa 2010. All rights reserved. 7 | // 8 | // You may use this code within your own games. In fact I encourage it, and if 9 | // you provide credit somewhere in your game to myself and ManiacDev.Com tell 10 | // me about it and I'll mention it on my ManiacDev.Com which receives thousands 11 | // of daily visits. 12 | // 13 | // You may however not use this code or any portion for any use other than in 14 | // the development of iOS applications without my permission. 15 | // (In other words you may not use it in any tutorials, books wikis etc. 16 | // without asking me first) 17 | // 18 | // This file was created automatically when creating a Sparrow project 19 | // I left this alone - Check the Game.m file to learn how the app was made. 20 | 21 | #import 22 | #import "Sparrow.h" 23 | 24 | @interface BalloonGameTutorialAppDelegate : NSObject 25 | { 26 | UIWindow *window; 27 | SPView *sparrowView; 28 | } 29 | 30 | @property (nonatomic, retain) IBOutlet UIWindow *window; 31 | @property (nonatomic, retain) IBOutlet SPView *sparrowView; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /4-BalloonGameTutorial/Classes/BalloonGameTutorialAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // BalloonGameTutorialAppDelegate.h 3 | // BalloonGameTutorial 4 | // 5 | // Created by Johann Dowa of ManiacDev.com 6 | // Copyright Johann Dowa 2010. All rights reserved. 7 | // 8 | // You may use this code within your own games. In fact I encourage it, and if 9 | // you provide credit somewhere in your game to myself and ManiacDev.Com tell 10 | // me about it and I'll mention it on my ManiacDev.Com which receives thousands 11 | // of daily visits. 12 | // 13 | // You may however not use this code or any portion for any use other than in 14 | // the development of iOS applications without my permission. 15 | // (In other words you may not use it in any tutorials, books wikis etc. 16 | // without asking me first) 17 | // 18 | // This file was created automatically when creating a Sparrow project 19 | // I left this alone - Check the Game.m file to learn how the app was made. 20 | 21 | #import 22 | #import "Sparrow.h" 23 | 24 | @interface BalloonGameTutorialAppDelegate : NSObject 25 | { 26 | UIWindow *window; 27 | SPView *sparrowView; 28 | } 29 | 30 | @property (nonatomic, retain) IBOutlet UIWindow *window; 31 | @property (nonatomic, retain) IBOutlet SPView *sparrowView; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /5-BalloonGameTutorial/Classes/BalloonGameTutorialAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // BalloonGameTutorialAppDelegate.h 3 | // BalloonGameTutorial 4 | // 5 | // Created by Johann Dowa of ManiacDev.com 6 | // Copyright Johann Dowa 2010. All rights reserved. 7 | // 8 | // You may use this code within your own games. In fact I encourage it, and if 9 | // you provide credit somewhere in your game to myself and ManiacDev.Com tell 10 | // me about it and I'll mention it on my ManiacDev.Com which receives thousands 11 | // of daily visits. 12 | // 13 | // You may however not use this code or any portion for any use other than in 14 | // the development of iOS applications without my permission. 15 | // (In other words you may not use it in any tutorials, books wikis etc. 16 | // without asking me first) 17 | // 18 | // This file was created automatically when creating a Sparrow project 19 | // I left this alone - Check the Game.m file to learn how the app was made. 20 | 21 | #import 22 | #import "Sparrow.h" 23 | 24 | @interface BalloonGameTutorialAppDelegate : NSObject 25 | { 26 | UIWindow *window; 27 | SPView *sparrowView; 28 | } 29 | 30 | @property (nonatomic, retain) IBOutlet UIWindow *window; 31 | @property (nonatomic, retain) IBOutlet SPView *sparrowView; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /6-BalloonGameTutorial/Classes/BalloonGameTutorialAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // BalloonGameTutorialAppDelegate.h 3 | // BalloonGameTutorial 4 | // 5 | // Created by Johann Dowa of ManiacDev.com 6 | // Copyright Johann Dowa 2010. All rights reserved. 7 | // 8 | // You may use this code within your own games. In fact I encourage it, and if 9 | // you provide credit somewhere in your game to myself and ManiacDev.Com tell 10 | // me about it and I'll mention it on my ManiacDev.Com which receives thousands 11 | // of daily visits. 12 | // 13 | // You may however not use this code or any portion for any use other than in 14 | // the development of iOS applications without my permission. 15 | // (In other words you may not use it in any tutorials, books wikis etc. 16 | // without asking me first) 17 | // 18 | // This file was created automatically when creating a Sparrow project 19 | // I left this alone - Check the Game.m file to learn how the app was made. 20 | 21 | #import 22 | #import "Sparrow.h" 23 | 24 | @interface BalloonGameTutorialAppDelegate : NSObject 25 | { 26 | UIWindow *window; 27 | SPView *sparrowView; 28 | } 29 | 30 | @property (nonatomic, retain) IBOutlet UIWindow *window; 31 | @property (nonatomic, retain) IBOutlet SPView *sparrowView; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /7-BalloonGameTutorial/Classes/BalloonGameTutorialAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // BalloonGameTutorialAppDelegate.h 3 | // BalloonGameTutorial 4 | // 5 | // Created by Johann Dowa of ManiacDev.com 6 | // Copyright Johann Dowa 2010. All rights reserved. 7 | // 8 | // You may use this code within your own games. In fact I encourage it, and if 9 | // you provide credit somewhere in your game to myself and ManiacDev.Com tell 10 | // me about it and I'll mention it on my ManiacDev.Com which receives thousands 11 | // of daily visits. 12 | // 13 | // You may however not use this code or any portion for any use other than in 14 | // the development of iOS applications without my permission. 15 | // (In other words you may not use it in any tutorials, books wikis etc. 16 | // without asking me first) 17 | // 18 | // This file was created automatically when creating a Sparrow project 19 | // I left this alone - Check the Game.m file to learn how the app was made. 20 | 21 | #import 22 | #import "Sparrow.h" 23 | 24 | @interface BalloonGameTutorialAppDelegate : NSObject 25 | { 26 | UIWindow *window; 27 | SPView *sparrowView; 28 | } 29 | 30 | @property (nonatomic, retain) IBOutlet UIWindow *window; 31 | @property (nonatomic, retain) IBOutlet SPView *sparrowView; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /1-BalloonGameTutorial/Classes/Classes/SPEnterFrameEvent.m: -------------------------------------------------------------------------------- 1 | // 2 | // SPEnterFrameEvent.m 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 30.04.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import "SPEnterFrameEvent.h" 13 | 14 | 15 | @implementation SPEnterFrameEvent 16 | 17 | @synthesize passedTime = mPassedTime; 18 | 19 | - (id)initWithType:(NSString*)type bubbles:(BOOL)bubbles passedTime:(double)seconds 20 | { 21 | if (self = [super initWithType:type bubbles:bubbles]) 22 | { 23 | mPassedTime = seconds; 24 | } 25 | return self; 26 | } 27 | 28 | - (id)initWithType:(NSString*)type passedTime:(double)seconds; 29 | { 30 | return [self initWithType:type bubbles:NO passedTime:seconds]; 31 | } 32 | 33 | - (id)initWithType:(NSString*)type bubbles:(BOOL)bubbles 34 | { 35 | return [self initWithType:type bubbles:bubbles passedTime:0.0f]; 36 | } 37 | 38 | + (SPEnterFrameEvent*)eventWithType:(NSString*)type passedTime:(double)seconds 39 | { 40 | return [[[SPEnterFrameEvent alloc] initWithType:type passedTime:seconds] autorelease]; 41 | } 42 | 43 | - (void)dealloc 44 | { 45 | [super dealloc]; 46 | } 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /2-BalloonGameTutorial/Classes/Classes/SPEnterFrameEvent.m: -------------------------------------------------------------------------------- 1 | // 2 | // SPEnterFrameEvent.m 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 30.04.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import "SPEnterFrameEvent.h" 13 | 14 | 15 | @implementation SPEnterFrameEvent 16 | 17 | @synthesize passedTime = mPassedTime; 18 | 19 | - (id)initWithType:(NSString*)type bubbles:(BOOL)bubbles passedTime:(double)seconds 20 | { 21 | if (self = [super initWithType:type bubbles:bubbles]) 22 | { 23 | mPassedTime = seconds; 24 | } 25 | return self; 26 | } 27 | 28 | - (id)initWithType:(NSString*)type passedTime:(double)seconds; 29 | { 30 | return [self initWithType:type bubbles:NO passedTime:seconds]; 31 | } 32 | 33 | - (id)initWithType:(NSString*)type bubbles:(BOOL)bubbles 34 | { 35 | return [self initWithType:type bubbles:bubbles passedTime:0.0f]; 36 | } 37 | 38 | + (SPEnterFrameEvent*)eventWithType:(NSString*)type passedTime:(double)seconds 39 | { 40 | return [[[SPEnterFrameEvent alloc] initWithType:type passedTime:seconds] autorelease]; 41 | } 42 | 43 | - (void)dealloc 44 | { 45 | [super dealloc]; 46 | } 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /3-BalloonGameTutorial/Classes/Classes/SPEnterFrameEvent.m: -------------------------------------------------------------------------------- 1 | // 2 | // SPEnterFrameEvent.m 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 30.04.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import "SPEnterFrameEvent.h" 13 | 14 | 15 | @implementation SPEnterFrameEvent 16 | 17 | @synthesize passedTime = mPassedTime; 18 | 19 | - (id)initWithType:(NSString*)type bubbles:(BOOL)bubbles passedTime:(double)seconds 20 | { 21 | if (self = [super initWithType:type bubbles:bubbles]) 22 | { 23 | mPassedTime = seconds; 24 | } 25 | return self; 26 | } 27 | 28 | - (id)initWithType:(NSString*)type passedTime:(double)seconds; 29 | { 30 | return [self initWithType:type bubbles:NO passedTime:seconds]; 31 | } 32 | 33 | - (id)initWithType:(NSString*)type bubbles:(BOOL)bubbles 34 | { 35 | return [self initWithType:type bubbles:bubbles passedTime:0.0f]; 36 | } 37 | 38 | + (SPEnterFrameEvent*)eventWithType:(NSString*)type passedTime:(double)seconds 39 | { 40 | return [[[SPEnterFrameEvent alloc] initWithType:type passedTime:seconds] autorelease]; 41 | } 42 | 43 | - (void)dealloc 44 | { 45 | [super dealloc]; 46 | } 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /4-BalloonGameTutorial/Classes/Classes/SPEnterFrameEvent.m: -------------------------------------------------------------------------------- 1 | // 2 | // SPEnterFrameEvent.m 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 30.04.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import "SPEnterFrameEvent.h" 13 | 14 | 15 | @implementation SPEnterFrameEvent 16 | 17 | @synthesize passedTime = mPassedTime; 18 | 19 | - (id)initWithType:(NSString*)type bubbles:(BOOL)bubbles passedTime:(double)seconds 20 | { 21 | if (self = [super initWithType:type bubbles:bubbles]) 22 | { 23 | mPassedTime = seconds; 24 | } 25 | return self; 26 | } 27 | 28 | - (id)initWithType:(NSString*)type passedTime:(double)seconds; 29 | { 30 | return [self initWithType:type bubbles:NO passedTime:seconds]; 31 | } 32 | 33 | - (id)initWithType:(NSString*)type bubbles:(BOOL)bubbles 34 | { 35 | return [self initWithType:type bubbles:bubbles passedTime:0.0f]; 36 | } 37 | 38 | + (SPEnterFrameEvent*)eventWithType:(NSString*)type passedTime:(double)seconds 39 | { 40 | return [[[SPEnterFrameEvent alloc] initWithType:type passedTime:seconds] autorelease]; 41 | } 42 | 43 | - (void)dealloc 44 | { 45 | [super dealloc]; 46 | } 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /5-BalloonGameTutorial/Classes/Classes/SPEnterFrameEvent.m: -------------------------------------------------------------------------------- 1 | // 2 | // SPEnterFrameEvent.m 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 30.04.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import "SPEnterFrameEvent.h" 13 | 14 | 15 | @implementation SPEnterFrameEvent 16 | 17 | @synthesize passedTime = mPassedTime; 18 | 19 | - (id)initWithType:(NSString*)type bubbles:(BOOL)bubbles passedTime:(double)seconds 20 | { 21 | if (self = [super initWithType:type bubbles:bubbles]) 22 | { 23 | mPassedTime = seconds; 24 | } 25 | return self; 26 | } 27 | 28 | - (id)initWithType:(NSString*)type passedTime:(double)seconds; 29 | { 30 | return [self initWithType:type bubbles:NO passedTime:seconds]; 31 | } 32 | 33 | - (id)initWithType:(NSString*)type bubbles:(BOOL)bubbles 34 | { 35 | return [self initWithType:type bubbles:bubbles passedTime:0.0f]; 36 | } 37 | 38 | + (SPEnterFrameEvent*)eventWithType:(NSString*)type passedTime:(double)seconds 39 | { 40 | return [[[SPEnterFrameEvent alloc] initWithType:type passedTime:seconds] autorelease]; 41 | } 42 | 43 | - (void)dealloc 44 | { 45 | [super dealloc]; 46 | } 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /6-BalloonGameTutorial/Classes/Classes/SPEnterFrameEvent.m: -------------------------------------------------------------------------------- 1 | // 2 | // SPEnterFrameEvent.m 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 30.04.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import "SPEnterFrameEvent.h" 13 | 14 | 15 | @implementation SPEnterFrameEvent 16 | 17 | @synthesize passedTime = mPassedTime; 18 | 19 | - (id)initWithType:(NSString*)type bubbles:(BOOL)bubbles passedTime:(double)seconds 20 | { 21 | if (self = [super initWithType:type bubbles:bubbles]) 22 | { 23 | mPassedTime = seconds; 24 | } 25 | return self; 26 | } 27 | 28 | - (id)initWithType:(NSString*)type passedTime:(double)seconds; 29 | { 30 | return [self initWithType:type bubbles:NO passedTime:seconds]; 31 | } 32 | 33 | - (id)initWithType:(NSString*)type bubbles:(BOOL)bubbles 34 | { 35 | return [self initWithType:type bubbles:bubbles passedTime:0.0f]; 36 | } 37 | 38 | + (SPEnterFrameEvent*)eventWithType:(NSString*)type passedTime:(double)seconds 39 | { 40 | return [[[SPEnterFrameEvent alloc] initWithType:type passedTime:seconds] autorelease]; 41 | } 42 | 43 | - (void)dealloc 44 | { 45 | [super dealloc]; 46 | } 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /7-BalloonGameTutorial/Classes/Classes/SPEnterFrameEvent.m: -------------------------------------------------------------------------------- 1 | // 2 | // SPEnterFrameEvent.m 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 30.04.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import "SPEnterFrameEvent.h" 13 | 14 | 15 | @implementation SPEnterFrameEvent 16 | 17 | @synthesize passedTime = mPassedTime; 18 | 19 | - (id)initWithType:(NSString*)type bubbles:(BOOL)bubbles passedTime:(double)seconds 20 | { 21 | if (self = [super initWithType:type bubbles:bubbles]) 22 | { 23 | mPassedTime = seconds; 24 | } 25 | return self; 26 | } 27 | 28 | - (id)initWithType:(NSString*)type passedTime:(double)seconds; 29 | { 30 | return [self initWithType:type bubbles:NO passedTime:seconds]; 31 | } 32 | 33 | - (id)initWithType:(NSString*)type bubbles:(BOOL)bubbles 34 | { 35 | return [self initWithType:type bubbles:bubbles passedTime:0.0f]; 36 | } 37 | 38 | + (SPEnterFrameEvent*)eventWithType:(NSString*)type passedTime:(double)seconds 39 | { 40 | return [[[SPEnterFrameEvent alloc] initWithType:type passedTime:seconds] autorelease]; 41 | } 42 | 43 | - (void)dealloc 44 | { 45 | [super dealloc]; 46 | } 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /1-BalloonGameTutorial/Classes/Classes/SPAVSound.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPAVSound.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 29.05.10. 6 | // Copyright 2010 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import 14 | 15 | #import "SPSound.h" 16 | 17 | /** ------------------------------------------------------------------------------------------------ 18 | 19 | The SPAVSound class is a concrete implementation of SPSound that uses AVAudioPlayer internally. 20 | 21 | Don't create instances of this class manually. Use [SPSound initWithContentsOfFile:] instead. 22 | 23 | */ 24 | 25 | @interface SPAVSound : SPSound 26 | { 27 | @private 28 | NSData *mSoundData; 29 | double mDuration; 30 | } 31 | 32 | /// -------------------- 33 | /// @name Initialization 34 | /// -------------------- 35 | 36 | /// Initializes a sound with the contents of a file and the known duration. 37 | - (id)initWithContentsOfFile:(NSString *)path duration:(double)duration; 38 | 39 | /// ------------- 40 | /// @name methods 41 | /// ------------- 42 | 43 | /// Creates an AVAudioPlayer object from the sound. 44 | - (AVAudioPlayer *)createPlayer; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /2-BalloonGameTutorial/Classes/Classes/SPAVSound.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPAVSound.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 29.05.10. 6 | // Copyright 2010 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import 14 | 15 | #import "SPSound.h" 16 | 17 | /** ------------------------------------------------------------------------------------------------ 18 | 19 | The SPAVSound class is a concrete implementation of SPSound that uses AVAudioPlayer internally. 20 | 21 | Don't create instances of this class manually. Use [SPSound initWithContentsOfFile:] instead. 22 | 23 | */ 24 | 25 | @interface SPAVSound : SPSound 26 | { 27 | @private 28 | NSData *mSoundData; 29 | double mDuration; 30 | } 31 | 32 | /// -------------------- 33 | /// @name Initialization 34 | /// -------------------- 35 | 36 | /// Initializes a sound with the contents of a file and the known duration. 37 | - (id)initWithContentsOfFile:(NSString *)path duration:(double)duration; 38 | 39 | /// ------------- 40 | /// @name methods 41 | /// ------------- 42 | 43 | /// Creates an AVAudioPlayer object from the sound. 44 | - (AVAudioPlayer *)createPlayer; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /3-BalloonGameTutorial/Classes/Classes/SPAVSound.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPAVSound.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 29.05.10. 6 | // Copyright 2010 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import 14 | 15 | #import "SPSound.h" 16 | 17 | /** ------------------------------------------------------------------------------------------------ 18 | 19 | The SPAVSound class is a concrete implementation of SPSound that uses AVAudioPlayer internally. 20 | 21 | Don't create instances of this class manually. Use [SPSound initWithContentsOfFile:] instead. 22 | 23 | */ 24 | 25 | @interface SPAVSound : SPSound 26 | { 27 | @private 28 | NSData *mSoundData; 29 | double mDuration; 30 | } 31 | 32 | /// -------------------- 33 | /// @name Initialization 34 | /// -------------------- 35 | 36 | /// Initializes a sound with the contents of a file and the known duration. 37 | - (id)initWithContentsOfFile:(NSString *)path duration:(double)duration; 38 | 39 | /// ------------- 40 | /// @name methods 41 | /// ------------- 42 | 43 | /// Creates an AVAudioPlayer object from the sound. 44 | - (AVAudioPlayer *)createPlayer; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /4-BalloonGameTutorial/Classes/Classes/SPAVSound.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPAVSound.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 29.05.10. 6 | // Copyright 2010 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import 14 | 15 | #import "SPSound.h" 16 | 17 | /** ------------------------------------------------------------------------------------------------ 18 | 19 | The SPAVSound class is a concrete implementation of SPSound that uses AVAudioPlayer internally. 20 | 21 | Don't create instances of this class manually. Use [SPSound initWithContentsOfFile:] instead. 22 | 23 | */ 24 | 25 | @interface SPAVSound : SPSound 26 | { 27 | @private 28 | NSData *mSoundData; 29 | double mDuration; 30 | } 31 | 32 | /// -------------------- 33 | /// @name Initialization 34 | /// -------------------- 35 | 36 | /// Initializes a sound with the contents of a file and the known duration. 37 | - (id)initWithContentsOfFile:(NSString *)path duration:(double)duration; 38 | 39 | /// ------------- 40 | /// @name methods 41 | /// ------------- 42 | 43 | /// Creates an AVAudioPlayer object from the sound. 44 | - (AVAudioPlayer *)createPlayer; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /5-BalloonGameTutorial/Classes/Classes/SPAVSound.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPAVSound.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 29.05.10. 6 | // Copyright 2010 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import 14 | 15 | #import "SPSound.h" 16 | 17 | /** ------------------------------------------------------------------------------------------------ 18 | 19 | The SPAVSound class is a concrete implementation of SPSound that uses AVAudioPlayer internally. 20 | 21 | Don't create instances of this class manually. Use [SPSound initWithContentsOfFile:] instead. 22 | 23 | */ 24 | 25 | @interface SPAVSound : SPSound 26 | { 27 | @private 28 | NSData *mSoundData; 29 | double mDuration; 30 | } 31 | 32 | /// -------------------- 33 | /// @name Initialization 34 | /// -------------------- 35 | 36 | /// Initializes a sound with the contents of a file and the known duration. 37 | - (id)initWithContentsOfFile:(NSString *)path duration:(double)duration; 38 | 39 | /// ------------- 40 | /// @name methods 41 | /// ------------- 42 | 43 | /// Creates an AVAudioPlayer object from the sound. 44 | - (AVAudioPlayer *)createPlayer; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /6-BalloonGameTutorial/Classes/Classes/SPAVSound.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPAVSound.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 29.05.10. 6 | // Copyright 2010 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import 14 | 15 | #import "SPSound.h" 16 | 17 | /** ------------------------------------------------------------------------------------------------ 18 | 19 | The SPAVSound class is a concrete implementation of SPSound that uses AVAudioPlayer internally. 20 | 21 | Don't create instances of this class manually. Use [SPSound initWithContentsOfFile:] instead. 22 | 23 | */ 24 | 25 | @interface SPAVSound : SPSound 26 | { 27 | @private 28 | NSData *mSoundData; 29 | double mDuration; 30 | } 31 | 32 | /// -------------------- 33 | /// @name Initialization 34 | /// -------------------- 35 | 36 | /// Initializes a sound with the contents of a file and the known duration. 37 | - (id)initWithContentsOfFile:(NSString *)path duration:(double)duration; 38 | 39 | /// ------------- 40 | /// @name methods 41 | /// ------------- 42 | 43 | /// Creates an AVAudioPlayer object from the sound. 44 | - (AVAudioPlayer *)createPlayer; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /7-BalloonGameTutorial/Classes/Classes/SPAVSound.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPAVSound.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 29.05.10. 6 | // Copyright 2010 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import 14 | 15 | #import "SPSound.h" 16 | 17 | /** ------------------------------------------------------------------------------------------------ 18 | 19 | The SPAVSound class is a concrete implementation of SPSound that uses AVAudioPlayer internally. 20 | 21 | Don't create instances of this class manually. Use [SPSound initWithContentsOfFile:] instead. 22 | 23 | */ 24 | 25 | @interface SPAVSound : SPSound 26 | { 27 | @private 28 | NSData *mSoundData; 29 | double mDuration; 30 | } 31 | 32 | /// -------------------- 33 | /// @name Initialization 34 | /// -------------------- 35 | 36 | /// Initializes a sound with the contents of a file and the known duration. 37 | - (id)initWithContentsOfFile:(NSString *)path duration:(double)duration; 38 | 39 | /// ------------- 40 | /// @name methods 41 | /// ------------- 42 | 43 | /// Creates an AVAudioPlayer object from the sound. 44 | - (AVAudioPlayer *)createPlayer; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /1-BalloonGameTutorial/Classes/Classes/SPAVSoundChannel.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPAVSoundChannel.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 29.05.10. 6 | // Copyright 2010 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import 14 | 15 | #import "SPSoundChannel.h" 16 | #import "SPAVSound.h" 17 | 18 | /** ------------------------------------------------------------------------------------------------ 19 | 20 | The SPAVSoundChannel class is a concrete implementation of SPSoundChannel that uses AVAudioPlayer 21 | internally. 22 | 23 | Don't create instances of this class manually. Use [SPSound createChannel] instead. 24 | 25 | ------------------------------------------------------------------------------------------------- */ 26 | 27 | @interface SPAVSoundChannel : SPSoundChannel 28 | { 29 | @private 30 | SPAVSound *mSound; 31 | AVAudioPlayer *mPlayer; 32 | BOOL mPaused; 33 | float mVolume; 34 | } 35 | 36 | /// ------------------ 37 | /// @name Initializers 38 | /// ------------------ 39 | 40 | /// Initializes a sound channel from an SPAVSound object. 41 | - (id)initWithSound:(SPAVSound *)sound; 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /2-BalloonGameTutorial/Classes/Classes/SPAVSoundChannel.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPAVSoundChannel.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 29.05.10. 6 | // Copyright 2010 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import 14 | 15 | #import "SPSoundChannel.h" 16 | #import "SPAVSound.h" 17 | 18 | /** ------------------------------------------------------------------------------------------------ 19 | 20 | The SPAVSoundChannel class is a concrete implementation of SPSoundChannel that uses AVAudioPlayer 21 | internally. 22 | 23 | Don't create instances of this class manually. Use [SPSound createChannel] instead. 24 | 25 | ------------------------------------------------------------------------------------------------- */ 26 | 27 | @interface SPAVSoundChannel : SPSoundChannel 28 | { 29 | @private 30 | SPAVSound *mSound; 31 | AVAudioPlayer *mPlayer; 32 | BOOL mPaused; 33 | float mVolume; 34 | } 35 | 36 | /// ------------------ 37 | /// @name Initializers 38 | /// ------------------ 39 | 40 | /// Initializes a sound channel from an SPAVSound object. 41 | - (id)initWithSound:(SPAVSound *)sound; 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /3-BalloonGameTutorial/Classes/Classes/SPAVSoundChannel.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPAVSoundChannel.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 29.05.10. 6 | // Copyright 2010 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import 14 | 15 | #import "SPSoundChannel.h" 16 | #import "SPAVSound.h" 17 | 18 | /** ------------------------------------------------------------------------------------------------ 19 | 20 | The SPAVSoundChannel class is a concrete implementation of SPSoundChannel that uses AVAudioPlayer 21 | internally. 22 | 23 | Don't create instances of this class manually. Use [SPSound createChannel] instead. 24 | 25 | ------------------------------------------------------------------------------------------------- */ 26 | 27 | @interface SPAVSoundChannel : SPSoundChannel 28 | { 29 | @private 30 | SPAVSound *mSound; 31 | AVAudioPlayer *mPlayer; 32 | BOOL mPaused; 33 | float mVolume; 34 | } 35 | 36 | /// ------------------ 37 | /// @name Initializers 38 | /// ------------------ 39 | 40 | /// Initializes a sound channel from an SPAVSound object. 41 | - (id)initWithSound:(SPAVSound *)sound; 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /4-BalloonGameTutorial/Classes/Classes/SPAVSoundChannel.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPAVSoundChannel.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 29.05.10. 6 | // Copyright 2010 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import 14 | 15 | #import "SPSoundChannel.h" 16 | #import "SPAVSound.h" 17 | 18 | /** ------------------------------------------------------------------------------------------------ 19 | 20 | The SPAVSoundChannel class is a concrete implementation of SPSoundChannel that uses AVAudioPlayer 21 | internally. 22 | 23 | Don't create instances of this class manually. Use [SPSound createChannel] instead. 24 | 25 | ------------------------------------------------------------------------------------------------- */ 26 | 27 | @interface SPAVSoundChannel : SPSoundChannel 28 | { 29 | @private 30 | SPAVSound *mSound; 31 | AVAudioPlayer *mPlayer; 32 | BOOL mPaused; 33 | float mVolume; 34 | } 35 | 36 | /// ------------------ 37 | /// @name Initializers 38 | /// ------------------ 39 | 40 | /// Initializes a sound channel from an SPAVSound object. 41 | - (id)initWithSound:(SPAVSound *)sound; 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /5-BalloonGameTutorial/Classes/Classes/SPAVSoundChannel.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPAVSoundChannel.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 29.05.10. 6 | // Copyright 2010 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import 14 | 15 | #import "SPSoundChannel.h" 16 | #import "SPAVSound.h" 17 | 18 | /** ------------------------------------------------------------------------------------------------ 19 | 20 | The SPAVSoundChannel class is a concrete implementation of SPSoundChannel that uses AVAudioPlayer 21 | internally. 22 | 23 | Don't create instances of this class manually. Use [SPSound createChannel] instead. 24 | 25 | ------------------------------------------------------------------------------------------------- */ 26 | 27 | @interface SPAVSoundChannel : SPSoundChannel 28 | { 29 | @private 30 | SPAVSound *mSound; 31 | AVAudioPlayer *mPlayer; 32 | BOOL mPaused; 33 | float mVolume; 34 | } 35 | 36 | /// ------------------ 37 | /// @name Initializers 38 | /// ------------------ 39 | 40 | /// Initializes a sound channel from an SPAVSound object. 41 | - (id)initWithSound:(SPAVSound *)sound; 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /6-BalloonGameTutorial/Classes/Classes/SPAVSoundChannel.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPAVSoundChannel.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 29.05.10. 6 | // Copyright 2010 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import 14 | 15 | #import "SPSoundChannel.h" 16 | #import "SPAVSound.h" 17 | 18 | /** ------------------------------------------------------------------------------------------------ 19 | 20 | The SPAVSoundChannel class is a concrete implementation of SPSoundChannel that uses AVAudioPlayer 21 | internally. 22 | 23 | Don't create instances of this class manually. Use [SPSound createChannel] instead. 24 | 25 | ------------------------------------------------------------------------------------------------- */ 26 | 27 | @interface SPAVSoundChannel : SPSoundChannel 28 | { 29 | @private 30 | SPAVSound *mSound; 31 | AVAudioPlayer *mPlayer; 32 | BOOL mPaused; 33 | float mVolume; 34 | } 35 | 36 | /// ------------------ 37 | /// @name Initializers 38 | /// ------------------ 39 | 40 | /// Initializes a sound channel from an SPAVSound object. 41 | - (id)initWithSound:(SPAVSound *)sound; 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /7-BalloonGameTutorial/Classes/Classes/SPAVSoundChannel.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPAVSoundChannel.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 29.05.10. 6 | // Copyright 2010 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import 14 | 15 | #import "SPSoundChannel.h" 16 | #import "SPAVSound.h" 17 | 18 | /** ------------------------------------------------------------------------------------------------ 19 | 20 | The SPAVSoundChannel class is a concrete implementation of SPSoundChannel that uses AVAudioPlayer 21 | internally. 22 | 23 | Don't create instances of this class manually. Use [SPSound createChannel] instead. 24 | 25 | ------------------------------------------------------------------------------------------------- */ 26 | 27 | @interface SPAVSoundChannel : SPSoundChannel 28 | { 29 | @private 30 | SPAVSound *mSound; 31 | AVAudioPlayer *mPlayer; 32 | BOOL mPaused; 33 | float mVolume; 34 | } 35 | 36 | /// ------------------ 37 | /// @name Initializers 38 | /// ------------------ 39 | 40 | /// Initializes a sound channel from an SPAVSound object. 41 | - (id)initWithSound:(SPAVSound *)sound; 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /1-BalloonGameTutorial/Classes/Classes/SPALSoundChannel.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPALSoundChannel.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 28.05.10. 6 | // Copyright 2010 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPSoundChannel.h" 14 | 15 | @class SPALSound; 16 | 17 | /** ------------------------------------------------------------------------------------------------ 18 | 19 | The SPALSoundChannel class is a concrete implementation of SPSoundChannel that uses 20 | OpenAL internally. 21 | 22 | Don't create instances of this class manually. Use [SPSound createChannel] instead. 23 | 24 | ------------------------------------------------------------------------------------------------- */ 25 | 26 | @interface SPALSoundChannel : SPSoundChannel 27 | { 28 | @private 29 | SPALSound *mSound; 30 | uint mSourceID; 31 | float mVolume; 32 | BOOL mLoop; 33 | 34 | double mStartMoment; 35 | double mPauseMoment; 36 | BOOL mInterrupted; 37 | } 38 | 39 | /// ------------------ 40 | /// @name Initializers 41 | /// ------------------ 42 | 43 | /// Initializes a sound channel from an SPALSound object. 44 | - (id)initWithSound:(SPALSound *)sound; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /2-BalloonGameTutorial/Classes/Classes/SPALSoundChannel.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPALSoundChannel.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 28.05.10. 6 | // Copyright 2010 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPSoundChannel.h" 14 | 15 | @class SPALSound; 16 | 17 | /** ------------------------------------------------------------------------------------------------ 18 | 19 | The SPALSoundChannel class is a concrete implementation of SPSoundChannel that uses 20 | OpenAL internally. 21 | 22 | Don't create instances of this class manually. Use [SPSound createChannel] instead. 23 | 24 | ------------------------------------------------------------------------------------------------- */ 25 | 26 | @interface SPALSoundChannel : SPSoundChannel 27 | { 28 | @private 29 | SPALSound *mSound; 30 | uint mSourceID; 31 | float mVolume; 32 | BOOL mLoop; 33 | 34 | double mStartMoment; 35 | double mPauseMoment; 36 | BOOL mInterrupted; 37 | } 38 | 39 | /// ------------------ 40 | /// @name Initializers 41 | /// ------------------ 42 | 43 | /// Initializes a sound channel from an SPALSound object. 44 | - (id)initWithSound:(SPALSound *)sound; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /3-BalloonGameTutorial/Classes/Classes/SPALSoundChannel.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPALSoundChannel.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 28.05.10. 6 | // Copyright 2010 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPSoundChannel.h" 14 | 15 | @class SPALSound; 16 | 17 | /** ------------------------------------------------------------------------------------------------ 18 | 19 | The SPALSoundChannel class is a concrete implementation of SPSoundChannel that uses 20 | OpenAL internally. 21 | 22 | Don't create instances of this class manually. Use [SPSound createChannel] instead. 23 | 24 | ------------------------------------------------------------------------------------------------- */ 25 | 26 | @interface SPALSoundChannel : SPSoundChannel 27 | { 28 | @private 29 | SPALSound *mSound; 30 | uint mSourceID; 31 | float mVolume; 32 | BOOL mLoop; 33 | 34 | double mStartMoment; 35 | double mPauseMoment; 36 | BOOL mInterrupted; 37 | } 38 | 39 | /// ------------------ 40 | /// @name Initializers 41 | /// ------------------ 42 | 43 | /// Initializes a sound channel from an SPALSound object. 44 | - (id)initWithSound:(SPALSound *)sound; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /4-BalloonGameTutorial/Classes/Classes/SPALSoundChannel.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPALSoundChannel.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 28.05.10. 6 | // Copyright 2010 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPSoundChannel.h" 14 | 15 | @class SPALSound; 16 | 17 | /** ------------------------------------------------------------------------------------------------ 18 | 19 | The SPALSoundChannel class is a concrete implementation of SPSoundChannel that uses 20 | OpenAL internally. 21 | 22 | Don't create instances of this class manually. Use [SPSound createChannel] instead. 23 | 24 | ------------------------------------------------------------------------------------------------- */ 25 | 26 | @interface SPALSoundChannel : SPSoundChannel 27 | { 28 | @private 29 | SPALSound *mSound; 30 | uint mSourceID; 31 | float mVolume; 32 | BOOL mLoop; 33 | 34 | double mStartMoment; 35 | double mPauseMoment; 36 | BOOL mInterrupted; 37 | } 38 | 39 | /// ------------------ 40 | /// @name Initializers 41 | /// ------------------ 42 | 43 | /// Initializes a sound channel from an SPALSound object. 44 | - (id)initWithSound:(SPALSound *)sound; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /5-BalloonGameTutorial/Classes/Classes/SPALSoundChannel.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPALSoundChannel.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 28.05.10. 6 | // Copyright 2010 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPSoundChannel.h" 14 | 15 | @class SPALSound; 16 | 17 | /** ------------------------------------------------------------------------------------------------ 18 | 19 | The SPALSoundChannel class is a concrete implementation of SPSoundChannel that uses 20 | OpenAL internally. 21 | 22 | Don't create instances of this class manually. Use [SPSound createChannel] instead. 23 | 24 | ------------------------------------------------------------------------------------------------- */ 25 | 26 | @interface SPALSoundChannel : SPSoundChannel 27 | { 28 | @private 29 | SPALSound *mSound; 30 | uint mSourceID; 31 | float mVolume; 32 | BOOL mLoop; 33 | 34 | double mStartMoment; 35 | double mPauseMoment; 36 | BOOL mInterrupted; 37 | } 38 | 39 | /// ------------------ 40 | /// @name Initializers 41 | /// ------------------ 42 | 43 | /// Initializes a sound channel from an SPALSound object. 44 | - (id)initWithSound:(SPALSound *)sound; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /6-BalloonGameTutorial/Classes/Classes/SPALSoundChannel.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPALSoundChannel.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 28.05.10. 6 | // Copyright 2010 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPSoundChannel.h" 14 | 15 | @class SPALSound; 16 | 17 | /** ------------------------------------------------------------------------------------------------ 18 | 19 | The SPALSoundChannel class is a concrete implementation of SPSoundChannel that uses 20 | OpenAL internally. 21 | 22 | Don't create instances of this class manually. Use [SPSound createChannel] instead. 23 | 24 | ------------------------------------------------------------------------------------------------- */ 25 | 26 | @interface SPALSoundChannel : SPSoundChannel 27 | { 28 | @private 29 | SPALSound *mSound; 30 | uint mSourceID; 31 | float mVolume; 32 | BOOL mLoop; 33 | 34 | double mStartMoment; 35 | double mPauseMoment; 36 | BOOL mInterrupted; 37 | } 38 | 39 | /// ------------------ 40 | /// @name Initializers 41 | /// ------------------ 42 | 43 | /// Initializes a sound channel from an SPALSound object. 44 | - (id)initWithSound:(SPALSound *)sound; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /7-BalloonGameTutorial/Classes/Classes/SPALSoundChannel.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPALSoundChannel.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 28.05.10. 6 | // Copyright 2010 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPSoundChannel.h" 14 | 15 | @class SPALSound; 16 | 17 | /** ------------------------------------------------------------------------------------------------ 18 | 19 | The SPALSoundChannel class is a concrete implementation of SPSoundChannel that uses 20 | OpenAL internally. 21 | 22 | Don't create instances of this class manually. Use [SPSound createChannel] instead. 23 | 24 | ------------------------------------------------------------------------------------------------- */ 25 | 26 | @interface SPALSoundChannel : SPSoundChannel 27 | { 28 | @private 29 | SPALSound *mSound; 30 | uint mSourceID; 31 | float mVolume; 32 | BOOL mLoop; 33 | 34 | double mStartMoment; 35 | double mPauseMoment; 36 | BOOL mInterrupted; 37 | } 38 | 39 | /// ------------------ 40 | /// @name Initializers 41 | /// ------------------ 42 | 43 | /// Initializes a sound channel from an SPALSound object. 44 | - (id)initWithSound:(SPALSound *)sound; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /1-BalloonGameTutorial/Classes/Classes/SPNSExtensions.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPNSAdditions.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 13.05.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | 14 | /** Sparrow extensions for the NSInvocation class. */ 15 | @interface NSInvocation (SPNSExtensions) 16 | 17 | /// Creates an invocation with a specified target and selector. 18 | + (NSInvocation *)invocationWithTarget:(id)target selector:(SEL)selector; 19 | 20 | @end 21 | 22 | /** Sparrow extensions for the NSString class. */ 23 | @interface NSString (SPNSExtensions) 24 | 25 | /// Creates a string by appending a suffix to a filename in front of its extension. 26 | - (NSString *)stringByAppendingSuffixToFilename:(NSString *)suffix; 27 | 28 | @end 29 | 30 | /** Sparrow extensions for the NSBundle class. */ 31 | @interface NSBundle (SPNSExtensions) 32 | 33 | /// Determines if a resource with a certain scale factor suffix (@2x) exists. 34 | /// 35 | /// @return Returns the path to the scaled resource if it exists; otherwise, the path to the 36 | // unscaled resource - or nil if that does not exist, either. 37 | - (NSString *)pathForResource:(NSString *)name withScaleFactor:(float)factor; 38 | 39 | @end -------------------------------------------------------------------------------- /2-BalloonGameTutorial/Classes/Classes/SPNSExtensions.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPNSAdditions.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 13.05.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | 14 | /** Sparrow extensions for the NSInvocation class. */ 15 | @interface NSInvocation (SPNSExtensions) 16 | 17 | /// Creates an invocation with a specified target and selector. 18 | + (NSInvocation *)invocationWithTarget:(id)target selector:(SEL)selector; 19 | 20 | @end 21 | 22 | /** Sparrow extensions for the NSString class. */ 23 | @interface NSString (SPNSExtensions) 24 | 25 | /// Creates a string by appending a suffix to a filename in front of its extension. 26 | - (NSString *)stringByAppendingSuffixToFilename:(NSString *)suffix; 27 | 28 | @end 29 | 30 | /** Sparrow extensions for the NSBundle class. */ 31 | @interface NSBundle (SPNSExtensions) 32 | 33 | /// Determines if a resource with a certain scale factor suffix (@2x) exists. 34 | /// 35 | /// @return Returns the path to the scaled resource if it exists; otherwise, the path to the 36 | // unscaled resource - or nil if that does not exist, either. 37 | - (NSString *)pathForResource:(NSString *)name withScaleFactor:(float)factor; 38 | 39 | @end -------------------------------------------------------------------------------- /3-BalloonGameTutorial/Classes/Classes/SPNSExtensions.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPNSAdditions.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 13.05.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | 14 | /** Sparrow extensions for the NSInvocation class. */ 15 | @interface NSInvocation (SPNSExtensions) 16 | 17 | /// Creates an invocation with a specified target and selector. 18 | + (NSInvocation *)invocationWithTarget:(id)target selector:(SEL)selector; 19 | 20 | @end 21 | 22 | /** Sparrow extensions for the NSString class. */ 23 | @interface NSString (SPNSExtensions) 24 | 25 | /// Creates a string by appending a suffix to a filename in front of its extension. 26 | - (NSString *)stringByAppendingSuffixToFilename:(NSString *)suffix; 27 | 28 | @end 29 | 30 | /** Sparrow extensions for the NSBundle class. */ 31 | @interface NSBundle (SPNSExtensions) 32 | 33 | /// Determines if a resource with a certain scale factor suffix (@2x) exists. 34 | /// 35 | /// @return Returns the path to the scaled resource if it exists; otherwise, the path to the 36 | // unscaled resource - or nil if that does not exist, either. 37 | - (NSString *)pathForResource:(NSString *)name withScaleFactor:(float)factor; 38 | 39 | @end -------------------------------------------------------------------------------- /4-BalloonGameTutorial/Classes/Classes/SPNSExtensions.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPNSAdditions.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 13.05.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | 14 | /** Sparrow extensions for the NSInvocation class. */ 15 | @interface NSInvocation (SPNSExtensions) 16 | 17 | /// Creates an invocation with a specified target and selector. 18 | + (NSInvocation *)invocationWithTarget:(id)target selector:(SEL)selector; 19 | 20 | @end 21 | 22 | /** Sparrow extensions for the NSString class. */ 23 | @interface NSString (SPNSExtensions) 24 | 25 | /// Creates a string by appending a suffix to a filename in front of its extension. 26 | - (NSString *)stringByAppendingSuffixToFilename:(NSString *)suffix; 27 | 28 | @end 29 | 30 | /** Sparrow extensions for the NSBundle class. */ 31 | @interface NSBundle (SPNSExtensions) 32 | 33 | /// Determines if a resource with a certain scale factor suffix (@2x) exists. 34 | /// 35 | /// @return Returns the path to the scaled resource if it exists; otherwise, the path to the 36 | // unscaled resource - or nil if that does not exist, either. 37 | - (NSString *)pathForResource:(NSString *)name withScaleFactor:(float)factor; 38 | 39 | @end -------------------------------------------------------------------------------- /5-BalloonGameTutorial/Classes/Classes/SPNSExtensions.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPNSAdditions.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 13.05.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | 14 | /** Sparrow extensions for the NSInvocation class. */ 15 | @interface NSInvocation (SPNSExtensions) 16 | 17 | /// Creates an invocation with a specified target and selector. 18 | + (NSInvocation *)invocationWithTarget:(id)target selector:(SEL)selector; 19 | 20 | @end 21 | 22 | /** Sparrow extensions for the NSString class. */ 23 | @interface NSString (SPNSExtensions) 24 | 25 | /// Creates a string by appending a suffix to a filename in front of its extension. 26 | - (NSString *)stringByAppendingSuffixToFilename:(NSString *)suffix; 27 | 28 | @end 29 | 30 | /** Sparrow extensions for the NSBundle class. */ 31 | @interface NSBundle (SPNSExtensions) 32 | 33 | /// Determines if a resource with a certain scale factor suffix (@2x) exists. 34 | /// 35 | /// @return Returns the path to the scaled resource if it exists; otherwise, the path to the 36 | // unscaled resource - or nil if that does not exist, either. 37 | - (NSString *)pathForResource:(NSString *)name withScaleFactor:(float)factor; 38 | 39 | @end -------------------------------------------------------------------------------- /6-BalloonGameTutorial/Classes/Classes/SPNSExtensions.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPNSAdditions.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 13.05.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | 14 | /** Sparrow extensions for the NSInvocation class. */ 15 | @interface NSInvocation (SPNSExtensions) 16 | 17 | /// Creates an invocation with a specified target and selector. 18 | + (NSInvocation *)invocationWithTarget:(id)target selector:(SEL)selector; 19 | 20 | @end 21 | 22 | /** Sparrow extensions for the NSString class. */ 23 | @interface NSString (SPNSExtensions) 24 | 25 | /// Creates a string by appending a suffix to a filename in front of its extension. 26 | - (NSString *)stringByAppendingSuffixToFilename:(NSString *)suffix; 27 | 28 | @end 29 | 30 | /** Sparrow extensions for the NSBundle class. */ 31 | @interface NSBundle (SPNSExtensions) 32 | 33 | /// Determines if a resource with a certain scale factor suffix (@2x) exists. 34 | /// 35 | /// @return Returns the path to the scaled resource if it exists; otherwise, the path to the 36 | // unscaled resource - or nil if that does not exist, either. 37 | - (NSString *)pathForResource:(NSString *)name withScaleFactor:(float)factor; 38 | 39 | @end -------------------------------------------------------------------------------- /7-BalloonGameTutorial/Classes/Classes/SPNSExtensions.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPNSAdditions.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 13.05.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | 14 | /** Sparrow extensions for the NSInvocation class. */ 15 | @interface NSInvocation (SPNSExtensions) 16 | 17 | /// Creates an invocation with a specified target and selector. 18 | + (NSInvocation *)invocationWithTarget:(id)target selector:(SEL)selector; 19 | 20 | @end 21 | 22 | /** Sparrow extensions for the NSString class. */ 23 | @interface NSString (SPNSExtensions) 24 | 25 | /// Creates a string by appending a suffix to a filename in front of its extension. 26 | - (NSString *)stringByAppendingSuffixToFilename:(NSString *)suffix; 27 | 28 | @end 29 | 30 | /** Sparrow extensions for the NSBundle class. */ 31 | @interface NSBundle (SPNSExtensions) 32 | 33 | /// Determines if a resource with a certain scale factor suffix (@2x) exists. 34 | /// 35 | /// @return Returns the path to the scaled resource if it exists; otherwise, the path to the 36 | // unscaled resource - or nil if that does not exist, either. 37 | - (NSString *)pathForResource:(NSString *)name withScaleFactor:(float)factor; 38 | 39 | @end -------------------------------------------------------------------------------- /1-BalloonGameTutorial/Classes/Classes/SPALSound.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPALSound.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 28.05.10. 6 | // Copyright 2010 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPSound.h" 14 | 15 | /** ------------------------------------------------------------------------------------------------ 16 | 17 | The SPALSound class is a concrete implementation of SPSound that uses OpenAL internally. 18 | 19 | Don't create instances of this class manually. Use [SPSound initWithContentsOfFile:] instead. 20 | 21 | ------------------------------------------------------------------------------------------------- */ 22 | 23 | @interface SPALSound : SPSound 24 | { 25 | @private 26 | uint mBufferID; 27 | double mDuration; 28 | } 29 | 30 | /// -------------------- 31 | /// @name Initialization 32 | /// -------------------- 33 | 34 | /// Initializes a sound with its known properties. 35 | - (id)initWithData:(const void *)data size:(int)size channels:(int)channels frequency:(int)frequency 36 | duration:(double)duration; 37 | 38 | /// ---------------- 39 | /// @name Properties 40 | /// ---------------- 41 | 42 | /// The OpenAL buffer ID of the sound. 43 | @property (nonatomic, readonly) uint bufferID; 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /2-BalloonGameTutorial/Classes/Classes/SPALSound.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPALSound.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 28.05.10. 6 | // Copyright 2010 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPSound.h" 14 | 15 | /** ------------------------------------------------------------------------------------------------ 16 | 17 | The SPALSound class is a concrete implementation of SPSound that uses OpenAL internally. 18 | 19 | Don't create instances of this class manually. Use [SPSound initWithContentsOfFile:] instead. 20 | 21 | ------------------------------------------------------------------------------------------------- */ 22 | 23 | @interface SPALSound : SPSound 24 | { 25 | @private 26 | uint mBufferID; 27 | double mDuration; 28 | } 29 | 30 | /// -------------------- 31 | /// @name Initialization 32 | /// -------------------- 33 | 34 | /// Initializes a sound with its known properties. 35 | - (id)initWithData:(const void *)data size:(int)size channels:(int)channels frequency:(int)frequency 36 | duration:(double)duration; 37 | 38 | /// ---------------- 39 | /// @name Properties 40 | /// ---------------- 41 | 42 | /// The OpenAL buffer ID of the sound. 43 | @property (nonatomic, readonly) uint bufferID; 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /3-BalloonGameTutorial/Classes/Classes/SPALSound.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPALSound.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 28.05.10. 6 | // Copyright 2010 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPSound.h" 14 | 15 | /** ------------------------------------------------------------------------------------------------ 16 | 17 | The SPALSound class is a concrete implementation of SPSound that uses OpenAL internally. 18 | 19 | Don't create instances of this class manually. Use [SPSound initWithContentsOfFile:] instead. 20 | 21 | ------------------------------------------------------------------------------------------------- */ 22 | 23 | @interface SPALSound : SPSound 24 | { 25 | @private 26 | uint mBufferID; 27 | double mDuration; 28 | } 29 | 30 | /// -------------------- 31 | /// @name Initialization 32 | /// -------------------- 33 | 34 | /// Initializes a sound with its known properties. 35 | - (id)initWithData:(const void *)data size:(int)size channels:(int)channels frequency:(int)frequency 36 | duration:(double)duration; 37 | 38 | /// ---------------- 39 | /// @name Properties 40 | /// ---------------- 41 | 42 | /// The OpenAL buffer ID of the sound. 43 | @property (nonatomic, readonly) uint bufferID; 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /4-BalloonGameTutorial/Classes/Classes/SPALSound.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPALSound.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 28.05.10. 6 | // Copyright 2010 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPSound.h" 14 | 15 | /** ------------------------------------------------------------------------------------------------ 16 | 17 | The SPALSound class is a concrete implementation of SPSound that uses OpenAL internally. 18 | 19 | Don't create instances of this class manually. Use [SPSound initWithContentsOfFile:] instead. 20 | 21 | ------------------------------------------------------------------------------------------------- */ 22 | 23 | @interface SPALSound : SPSound 24 | { 25 | @private 26 | uint mBufferID; 27 | double mDuration; 28 | } 29 | 30 | /// -------------------- 31 | /// @name Initialization 32 | /// -------------------- 33 | 34 | /// Initializes a sound with its known properties. 35 | - (id)initWithData:(const void *)data size:(int)size channels:(int)channels frequency:(int)frequency 36 | duration:(double)duration; 37 | 38 | /// ---------------- 39 | /// @name Properties 40 | /// ---------------- 41 | 42 | /// The OpenAL buffer ID of the sound. 43 | @property (nonatomic, readonly) uint bufferID; 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /5-BalloonGameTutorial/Classes/Classes/SPALSound.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPALSound.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 28.05.10. 6 | // Copyright 2010 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPSound.h" 14 | 15 | /** ------------------------------------------------------------------------------------------------ 16 | 17 | The SPALSound class is a concrete implementation of SPSound that uses OpenAL internally. 18 | 19 | Don't create instances of this class manually. Use [SPSound initWithContentsOfFile:] instead. 20 | 21 | ------------------------------------------------------------------------------------------------- */ 22 | 23 | @interface SPALSound : SPSound 24 | { 25 | @private 26 | uint mBufferID; 27 | double mDuration; 28 | } 29 | 30 | /// -------------------- 31 | /// @name Initialization 32 | /// -------------------- 33 | 34 | /// Initializes a sound with its known properties. 35 | - (id)initWithData:(const void *)data size:(int)size channels:(int)channels frequency:(int)frequency 36 | duration:(double)duration; 37 | 38 | /// ---------------- 39 | /// @name Properties 40 | /// ---------------- 41 | 42 | /// The OpenAL buffer ID of the sound. 43 | @property (nonatomic, readonly) uint bufferID; 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /6-BalloonGameTutorial/Classes/Classes/SPALSound.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPALSound.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 28.05.10. 6 | // Copyright 2010 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPSound.h" 14 | 15 | /** ------------------------------------------------------------------------------------------------ 16 | 17 | The SPALSound class is a concrete implementation of SPSound that uses OpenAL internally. 18 | 19 | Don't create instances of this class manually. Use [SPSound initWithContentsOfFile:] instead. 20 | 21 | ------------------------------------------------------------------------------------------------- */ 22 | 23 | @interface SPALSound : SPSound 24 | { 25 | @private 26 | uint mBufferID; 27 | double mDuration; 28 | } 29 | 30 | /// -------------------- 31 | /// @name Initialization 32 | /// -------------------- 33 | 34 | /// Initializes a sound with its known properties. 35 | - (id)initWithData:(const void *)data size:(int)size channels:(int)channels frequency:(int)frequency 36 | duration:(double)duration; 37 | 38 | /// ---------------- 39 | /// @name Properties 40 | /// ---------------- 41 | 42 | /// The OpenAL buffer ID of the sound. 43 | @property (nonatomic, readonly) uint bufferID; 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /7-BalloonGameTutorial/Classes/Classes/SPALSound.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPALSound.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 28.05.10. 6 | // Copyright 2010 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPSound.h" 14 | 15 | /** ------------------------------------------------------------------------------------------------ 16 | 17 | The SPALSound class is a concrete implementation of SPSound that uses OpenAL internally. 18 | 19 | Don't create instances of this class manually. Use [SPSound initWithContentsOfFile:] instead. 20 | 21 | ------------------------------------------------------------------------------------------------- */ 22 | 23 | @interface SPALSound : SPSound 24 | { 25 | @private 26 | uint mBufferID; 27 | double mDuration; 28 | } 29 | 30 | /// -------------------- 31 | /// @name Initialization 32 | /// -------------------- 33 | 34 | /// Initializes a sound with its known properties. 35 | - (id)initWithData:(const void *)data size:(int)size channels:(int)channels frequency:(int)frequency 36 | duration:(double)duration; 37 | 38 | /// ---------------- 39 | /// @name Properties 40 | /// ---------------- 41 | 42 | /// The OpenAL buffer ID of the sound. 43 | @property (nonatomic, readonly) uint bufferID; 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /1-BalloonGameTutorial/Classes/Classes/SPSprite.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPSprite.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 21.03.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPDisplayObjectContainer.h" 14 | 15 | /** ------------------------------------------------------------------------------------------------ 16 | 17 | An SPSprite is the most lightweight, non-abstract container class. 18 | 19 | Use it as a simple means of grouping objects together in one coordinate system. 20 | 21 | SPSprite *sprite = [SPSprite sprite]; 22 | 23 | // create children 24 | SPImage *venus = [SPImage imageWithContentsOfFile:@"venus.png"]; 25 | SPImage *mars = [SPImage imageWithContentsOfFile:@"mars.png"]; 26 | 27 | // move children to some relative positions 28 | venus.x = 50; 29 | mars.x = -20; 30 | 31 | // add children to the sprite 32 | [sprite addChild:venus]; 33 | [sprite addChild:mars]; 34 | 35 | // calculate total width of all children 36 | float totalWidth = sprite.width; 37 | 38 | // rotate the whole group 39 | sprite.rotation = PI; 40 | 41 | ------------------------------------------------------------------------------------------------- */ 42 | 43 | @interface SPSprite : SPDisplayObjectContainer 44 | 45 | /// Create a new, empty sprite. 46 | + (SPSprite*)sprite; 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /2-BalloonGameTutorial/Classes/Classes/SPSprite.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPSprite.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 21.03.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPDisplayObjectContainer.h" 14 | 15 | /** ------------------------------------------------------------------------------------------------ 16 | 17 | An SPSprite is the most lightweight, non-abstract container class. 18 | 19 | Use it as a simple means of grouping objects together in one coordinate system. 20 | 21 | SPSprite *sprite = [SPSprite sprite]; 22 | 23 | // create children 24 | SPImage *venus = [SPImage imageWithContentsOfFile:@"venus.png"]; 25 | SPImage *mars = [SPImage imageWithContentsOfFile:@"mars.png"]; 26 | 27 | // move children to some relative positions 28 | venus.x = 50; 29 | mars.x = -20; 30 | 31 | // add children to the sprite 32 | [sprite addChild:venus]; 33 | [sprite addChild:mars]; 34 | 35 | // calculate total width of all children 36 | float totalWidth = sprite.width; 37 | 38 | // rotate the whole group 39 | sprite.rotation = PI; 40 | 41 | ------------------------------------------------------------------------------------------------- */ 42 | 43 | @interface SPSprite : SPDisplayObjectContainer 44 | 45 | /// Create a new, empty sprite. 46 | + (SPSprite*)sprite; 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /3-BalloonGameTutorial/Classes/Classes/SPSprite.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPSprite.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 21.03.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPDisplayObjectContainer.h" 14 | 15 | /** ------------------------------------------------------------------------------------------------ 16 | 17 | An SPSprite is the most lightweight, non-abstract container class. 18 | 19 | Use it as a simple means of grouping objects together in one coordinate system. 20 | 21 | SPSprite *sprite = [SPSprite sprite]; 22 | 23 | // create children 24 | SPImage *venus = [SPImage imageWithContentsOfFile:@"venus.png"]; 25 | SPImage *mars = [SPImage imageWithContentsOfFile:@"mars.png"]; 26 | 27 | // move children to some relative positions 28 | venus.x = 50; 29 | mars.x = -20; 30 | 31 | // add children to the sprite 32 | [sprite addChild:venus]; 33 | [sprite addChild:mars]; 34 | 35 | // calculate total width of all children 36 | float totalWidth = sprite.width; 37 | 38 | // rotate the whole group 39 | sprite.rotation = PI; 40 | 41 | ------------------------------------------------------------------------------------------------- */ 42 | 43 | @interface SPSprite : SPDisplayObjectContainer 44 | 45 | /// Create a new, empty sprite. 46 | + (SPSprite*)sprite; 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /4-BalloonGameTutorial/Classes/Classes/SPSprite.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPSprite.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 21.03.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPDisplayObjectContainer.h" 14 | 15 | /** ------------------------------------------------------------------------------------------------ 16 | 17 | An SPSprite is the most lightweight, non-abstract container class. 18 | 19 | Use it as a simple means of grouping objects together in one coordinate system. 20 | 21 | SPSprite *sprite = [SPSprite sprite]; 22 | 23 | // create children 24 | SPImage *venus = [SPImage imageWithContentsOfFile:@"venus.png"]; 25 | SPImage *mars = [SPImage imageWithContentsOfFile:@"mars.png"]; 26 | 27 | // move children to some relative positions 28 | venus.x = 50; 29 | mars.x = -20; 30 | 31 | // add children to the sprite 32 | [sprite addChild:venus]; 33 | [sprite addChild:mars]; 34 | 35 | // calculate total width of all children 36 | float totalWidth = sprite.width; 37 | 38 | // rotate the whole group 39 | sprite.rotation = PI; 40 | 41 | ------------------------------------------------------------------------------------------------- */ 42 | 43 | @interface SPSprite : SPDisplayObjectContainer 44 | 45 | /// Create a new, empty sprite. 46 | + (SPSprite*)sprite; 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /5-BalloonGameTutorial/Classes/Classes/SPSprite.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPSprite.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 21.03.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPDisplayObjectContainer.h" 14 | 15 | /** ------------------------------------------------------------------------------------------------ 16 | 17 | An SPSprite is the most lightweight, non-abstract container class. 18 | 19 | Use it as a simple means of grouping objects together in one coordinate system. 20 | 21 | SPSprite *sprite = [SPSprite sprite]; 22 | 23 | // create children 24 | SPImage *venus = [SPImage imageWithContentsOfFile:@"venus.png"]; 25 | SPImage *mars = [SPImage imageWithContentsOfFile:@"mars.png"]; 26 | 27 | // move children to some relative positions 28 | venus.x = 50; 29 | mars.x = -20; 30 | 31 | // add children to the sprite 32 | [sprite addChild:venus]; 33 | [sprite addChild:mars]; 34 | 35 | // calculate total width of all children 36 | float totalWidth = sprite.width; 37 | 38 | // rotate the whole group 39 | sprite.rotation = PI; 40 | 41 | ------------------------------------------------------------------------------------------------- */ 42 | 43 | @interface SPSprite : SPDisplayObjectContainer 44 | 45 | /// Create a new, empty sprite. 46 | + (SPSprite*)sprite; 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /6-BalloonGameTutorial/Classes/Classes/SPSprite.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPSprite.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 21.03.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPDisplayObjectContainer.h" 14 | 15 | /** ------------------------------------------------------------------------------------------------ 16 | 17 | An SPSprite is the most lightweight, non-abstract container class. 18 | 19 | Use it as a simple means of grouping objects together in one coordinate system. 20 | 21 | SPSprite *sprite = [SPSprite sprite]; 22 | 23 | // create children 24 | SPImage *venus = [SPImage imageWithContentsOfFile:@"venus.png"]; 25 | SPImage *mars = [SPImage imageWithContentsOfFile:@"mars.png"]; 26 | 27 | // move children to some relative positions 28 | venus.x = 50; 29 | mars.x = -20; 30 | 31 | // add children to the sprite 32 | [sprite addChild:venus]; 33 | [sprite addChild:mars]; 34 | 35 | // calculate total width of all children 36 | float totalWidth = sprite.width; 37 | 38 | // rotate the whole group 39 | sprite.rotation = PI; 40 | 41 | ------------------------------------------------------------------------------------------------- */ 42 | 43 | @interface SPSprite : SPDisplayObjectContainer 44 | 45 | /// Create a new, empty sprite. 46 | + (SPSprite*)sprite; 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /7-BalloonGameTutorial/Classes/Classes/SPSprite.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPSprite.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 21.03.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | #import "SPDisplayObjectContainer.h" 14 | 15 | /** ------------------------------------------------------------------------------------------------ 16 | 17 | An SPSprite is the most lightweight, non-abstract container class. 18 | 19 | Use it as a simple means of grouping objects together in one coordinate system. 20 | 21 | SPSprite *sprite = [SPSprite sprite]; 22 | 23 | // create children 24 | SPImage *venus = [SPImage imageWithContentsOfFile:@"venus.png"]; 25 | SPImage *mars = [SPImage imageWithContentsOfFile:@"mars.png"]; 26 | 27 | // move children to some relative positions 28 | venus.x = 50; 29 | mars.x = -20; 30 | 31 | // add children to the sprite 32 | [sprite addChild:venus]; 33 | [sprite addChild:mars]; 34 | 35 | // calculate total width of all children 36 | float totalWidth = sprite.width; 37 | 38 | // rotate the whole group 39 | sprite.rotation = PI; 40 | 41 | ------------------------------------------------------------------------------------------------- */ 42 | 43 | @interface SPSprite : SPDisplayObjectContainer 44 | 45 | /// Create a new, empty sprite. 46 | + (SPSprite*)sprite; 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /1-BalloonGameTutorial/Classes/Classes/SPAVSound.m: -------------------------------------------------------------------------------- 1 | // 2 | // SPAVSound.m 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 29.05.10. 6 | // Copyright 2010 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import "SPAVSound.h" 13 | #import "SPAVSoundChannel.h" 14 | 15 | @implementation SPAVSound 16 | 17 | @synthesize duration = mDuration; 18 | 19 | - (id)init 20 | { 21 | [self release]; 22 | return nil; 23 | } 24 | 25 | - (id)initWithContentsOfFile:(NSString *)path duration:(double)duration 26 | { 27 | if (self = [super init]) 28 | { 29 | NSString *fullPath = [path isAbsolutePath] ? 30 | path : [[NSBundle mainBundle] pathForResource:path ofType:nil]; 31 | mSoundData = [[NSData alloc] initWithContentsOfMappedFile:fullPath]; 32 | mDuration = duration; 33 | } 34 | return self; 35 | } 36 | 37 | - (void)dealloc 38 | { 39 | [mSoundData release]; 40 | [super dealloc]; 41 | } 42 | 43 | - (SPSoundChannel *)createChannel 44 | { 45 | return [[[SPAVSoundChannel alloc] initWithSound:self] autorelease]; 46 | } 47 | 48 | - (AVAudioPlayer *)createPlayer 49 | { 50 | NSError *error = nil; 51 | AVAudioPlayer *player = [[AVAudioPlayer alloc] initWithData:mSoundData error:&error]; 52 | if (error) NSLog(@"Could not create AVAudioPlayer: %@", [error description]); 53 | return [player autorelease]; 54 | } 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /2-BalloonGameTutorial/Classes/Classes/SPAVSound.m: -------------------------------------------------------------------------------- 1 | // 2 | // SPAVSound.m 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 29.05.10. 6 | // Copyright 2010 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import "SPAVSound.h" 13 | #import "SPAVSoundChannel.h" 14 | 15 | @implementation SPAVSound 16 | 17 | @synthesize duration = mDuration; 18 | 19 | - (id)init 20 | { 21 | [self release]; 22 | return nil; 23 | } 24 | 25 | - (id)initWithContentsOfFile:(NSString *)path duration:(double)duration 26 | { 27 | if (self = [super init]) 28 | { 29 | NSString *fullPath = [path isAbsolutePath] ? 30 | path : [[NSBundle mainBundle] pathForResource:path ofType:nil]; 31 | mSoundData = [[NSData alloc] initWithContentsOfMappedFile:fullPath]; 32 | mDuration = duration; 33 | } 34 | return self; 35 | } 36 | 37 | - (void)dealloc 38 | { 39 | [mSoundData release]; 40 | [super dealloc]; 41 | } 42 | 43 | - (SPSoundChannel *)createChannel 44 | { 45 | return [[[SPAVSoundChannel alloc] initWithSound:self] autorelease]; 46 | } 47 | 48 | - (AVAudioPlayer *)createPlayer 49 | { 50 | NSError *error = nil; 51 | AVAudioPlayer *player = [[AVAudioPlayer alloc] initWithData:mSoundData error:&error]; 52 | if (error) NSLog(@"Could not create AVAudioPlayer: %@", [error description]); 53 | return [player autorelease]; 54 | } 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /3-BalloonGameTutorial/Classes/Classes/SPAVSound.m: -------------------------------------------------------------------------------- 1 | // 2 | // SPAVSound.m 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 29.05.10. 6 | // Copyright 2010 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import "SPAVSound.h" 13 | #import "SPAVSoundChannel.h" 14 | 15 | @implementation SPAVSound 16 | 17 | @synthesize duration = mDuration; 18 | 19 | - (id)init 20 | { 21 | [self release]; 22 | return nil; 23 | } 24 | 25 | - (id)initWithContentsOfFile:(NSString *)path duration:(double)duration 26 | { 27 | if (self = [super init]) 28 | { 29 | NSString *fullPath = [path isAbsolutePath] ? 30 | path : [[NSBundle mainBundle] pathForResource:path ofType:nil]; 31 | mSoundData = [[NSData alloc] initWithContentsOfMappedFile:fullPath]; 32 | mDuration = duration; 33 | } 34 | return self; 35 | } 36 | 37 | - (void)dealloc 38 | { 39 | [mSoundData release]; 40 | [super dealloc]; 41 | } 42 | 43 | - (SPSoundChannel *)createChannel 44 | { 45 | return [[[SPAVSoundChannel alloc] initWithSound:self] autorelease]; 46 | } 47 | 48 | - (AVAudioPlayer *)createPlayer 49 | { 50 | NSError *error = nil; 51 | AVAudioPlayer *player = [[AVAudioPlayer alloc] initWithData:mSoundData error:&error]; 52 | if (error) NSLog(@"Could not create AVAudioPlayer: %@", [error description]); 53 | return [player autorelease]; 54 | } 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /4-BalloonGameTutorial/Classes/Classes/SPAVSound.m: -------------------------------------------------------------------------------- 1 | // 2 | // SPAVSound.m 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 29.05.10. 6 | // Copyright 2010 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import "SPAVSound.h" 13 | #import "SPAVSoundChannel.h" 14 | 15 | @implementation SPAVSound 16 | 17 | @synthesize duration = mDuration; 18 | 19 | - (id)init 20 | { 21 | [self release]; 22 | return nil; 23 | } 24 | 25 | - (id)initWithContentsOfFile:(NSString *)path duration:(double)duration 26 | { 27 | if (self = [super init]) 28 | { 29 | NSString *fullPath = [path isAbsolutePath] ? 30 | path : [[NSBundle mainBundle] pathForResource:path ofType:nil]; 31 | mSoundData = [[NSData alloc] initWithContentsOfMappedFile:fullPath]; 32 | mDuration = duration; 33 | } 34 | return self; 35 | } 36 | 37 | - (void)dealloc 38 | { 39 | [mSoundData release]; 40 | [super dealloc]; 41 | } 42 | 43 | - (SPSoundChannel *)createChannel 44 | { 45 | return [[[SPAVSoundChannel alloc] initWithSound:self] autorelease]; 46 | } 47 | 48 | - (AVAudioPlayer *)createPlayer 49 | { 50 | NSError *error = nil; 51 | AVAudioPlayer *player = [[AVAudioPlayer alloc] initWithData:mSoundData error:&error]; 52 | if (error) NSLog(@"Could not create AVAudioPlayer: %@", [error description]); 53 | return [player autorelease]; 54 | } 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /5-BalloonGameTutorial/Classes/Classes/SPAVSound.m: -------------------------------------------------------------------------------- 1 | // 2 | // SPAVSound.m 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 29.05.10. 6 | // Copyright 2010 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import "SPAVSound.h" 13 | #import "SPAVSoundChannel.h" 14 | 15 | @implementation SPAVSound 16 | 17 | @synthesize duration = mDuration; 18 | 19 | - (id)init 20 | { 21 | [self release]; 22 | return nil; 23 | } 24 | 25 | - (id)initWithContentsOfFile:(NSString *)path duration:(double)duration 26 | { 27 | if (self = [super init]) 28 | { 29 | NSString *fullPath = [path isAbsolutePath] ? 30 | path : [[NSBundle mainBundle] pathForResource:path ofType:nil]; 31 | mSoundData = [[NSData alloc] initWithContentsOfMappedFile:fullPath]; 32 | mDuration = duration; 33 | } 34 | return self; 35 | } 36 | 37 | - (void)dealloc 38 | { 39 | [mSoundData release]; 40 | [super dealloc]; 41 | } 42 | 43 | - (SPSoundChannel *)createChannel 44 | { 45 | return [[[SPAVSoundChannel alloc] initWithSound:self] autorelease]; 46 | } 47 | 48 | - (AVAudioPlayer *)createPlayer 49 | { 50 | NSError *error = nil; 51 | AVAudioPlayer *player = [[AVAudioPlayer alloc] initWithData:mSoundData error:&error]; 52 | if (error) NSLog(@"Could not create AVAudioPlayer: %@", [error description]); 53 | return [player autorelease]; 54 | } 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /6-BalloonGameTutorial/Classes/Classes/SPAVSound.m: -------------------------------------------------------------------------------- 1 | // 2 | // SPAVSound.m 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 29.05.10. 6 | // Copyright 2010 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import "SPAVSound.h" 13 | #import "SPAVSoundChannel.h" 14 | 15 | @implementation SPAVSound 16 | 17 | @synthesize duration = mDuration; 18 | 19 | - (id)init 20 | { 21 | [self release]; 22 | return nil; 23 | } 24 | 25 | - (id)initWithContentsOfFile:(NSString *)path duration:(double)duration 26 | { 27 | if (self = [super init]) 28 | { 29 | NSString *fullPath = [path isAbsolutePath] ? 30 | path : [[NSBundle mainBundle] pathForResource:path ofType:nil]; 31 | mSoundData = [[NSData alloc] initWithContentsOfMappedFile:fullPath]; 32 | mDuration = duration; 33 | } 34 | return self; 35 | } 36 | 37 | - (void)dealloc 38 | { 39 | [mSoundData release]; 40 | [super dealloc]; 41 | } 42 | 43 | - (SPSoundChannel *)createChannel 44 | { 45 | return [[[SPAVSoundChannel alloc] initWithSound:self] autorelease]; 46 | } 47 | 48 | - (AVAudioPlayer *)createPlayer 49 | { 50 | NSError *error = nil; 51 | AVAudioPlayer *player = [[AVAudioPlayer alloc] initWithData:mSoundData error:&error]; 52 | if (error) NSLog(@"Could not create AVAudioPlayer: %@", [error description]); 53 | return [player autorelease]; 54 | } 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /7-BalloonGameTutorial/Classes/Classes/SPAVSound.m: -------------------------------------------------------------------------------- 1 | // 2 | // SPAVSound.m 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 29.05.10. 6 | // Copyright 2010 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import "SPAVSound.h" 13 | #import "SPAVSoundChannel.h" 14 | 15 | @implementation SPAVSound 16 | 17 | @synthesize duration = mDuration; 18 | 19 | - (id)init 20 | { 21 | [self release]; 22 | return nil; 23 | } 24 | 25 | - (id)initWithContentsOfFile:(NSString *)path duration:(double)duration 26 | { 27 | if (self = [super init]) 28 | { 29 | NSString *fullPath = [path isAbsolutePath] ? 30 | path : [[NSBundle mainBundle] pathForResource:path ofType:nil]; 31 | mSoundData = [[NSData alloc] initWithContentsOfMappedFile:fullPath]; 32 | mDuration = duration; 33 | } 34 | return self; 35 | } 36 | 37 | - (void)dealloc 38 | { 39 | [mSoundData release]; 40 | [super dealloc]; 41 | } 42 | 43 | - (SPSoundChannel *)createChannel 44 | { 45 | return [[[SPAVSoundChannel alloc] initWithSound:self] autorelease]; 46 | } 47 | 48 | - (AVAudioPlayer *)createPlayer 49 | { 50 | NSError *error = nil; 51 | AVAudioPlayer *player = [[AVAudioPlayer alloc] initWithData:mSoundData error:&error]; 52 | if (error) NSLog(@"Could not create AVAudioPlayer: %@", [error description]); 53 | return [player autorelease]; 54 | } 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /1-BalloonGameTutorial/Classes/Classes/SPBitmapChar.m: -------------------------------------------------------------------------------- 1 | // 2 | // SPBitmapChar.m 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 12.10.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import "SPBitmapChar.h" 13 | #import "SPTexture.h" 14 | 15 | @implementation SPBitmapChar 16 | 17 | @synthesize charID = mCharID; 18 | @synthesize xOffset = mXOffset; 19 | @synthesize yOffset = mYOffset; 20 | @synthesize xAdvance = mXAdvance; 21 | 22 | - (id)initWithID:(int)charID texture:(SPTexture *)texture 23 | xOffset:(float)xOffset yOffset:(float)yOffset xAdvance:(float)xAdvance; 24 | { 25 | if (self = [super initWithTexture:texture]) 26 | { 27 | mCharID = charID; 28 | mXOffset = xOffset; 29 | mYOffset = yOffset; 30 | mXAdvance = xAdvance; 31 | } 32 | return self; 33 | } 34 | 35 | - (id)initWithTexture:(SPTexture *)texture 36 | { 37 | return [self initWithID:0 texture:texture xOffset:0 yOffset:0 xAdvance:texture.width]; 38 | } 39 | 40 | - (id)init 41 | { 42 | [self release]; 43 | return nil; 44 | } 45 | 46 | #pragma mark NSCopying 47 | 48 | - (id)copyWithZone:(NSZone*)zone; 49 | { 50 | return [[[self class] allocWithZone:zone] initWithID:mCharID texture:self.texture 51 | xOffset:mXOffset yOffset:mYOffset 52 | xAdvance:mXAdvance]; 53 | } 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /2-BalloonGameTutorial/Classes/Classes/SPBitmapChar.m: -------------------------------------------------------------------------------- 1 | // 2 | // SPBitmapChar.m 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 12.10.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import "SPBitmapChar.h" 13 | #import "SPTexture.h" 14 | 15 | @implementation SPBitmapChar 16 | 17 | @synthesize charID = mCharID; 18 | @synthesize xOffset = mXOffset; 19 | @synthesize yOffset = mYOffset; 20 | @synthesize xAdvance = mXAdvance; 21 | 22 | - (id)initWithID:(int)charID texture:(SPTexture *)texture 23 | xOffset:(float)xOffset yOffset:(float)yOffset xAdvance:(float)xAdvance; 24 | { 25 | if (self = [super initWithTexture:texture]) 26 | { 27 | mCharID = charID; 28 | mXOffset = xOffset; 29 | mYOffset = yOffset; 30 | mXAdvance = xAdvance; 31 | } 32 | return self; 33 | } 34 | 35 | - (id)initWithTexture:(SPTexture *)texture 36 | { 37 | return [self initWithID:0 texture:texture xOffset:0 yOffset:0 xAdvance:texture.width]; 38 | } 39 | 40 | - (id)init 41 | { 42 | [self release]; 43 | return nil; 44 | } 45 | 46 | #pragma mark NSCopying 47 | 48 | - (id)copyWithZone:(NSZone*)zone; 49 | { 50 | return [[[self class] allocWithZone:zone] initWithID:mCharID texture:self.texture 51 | xOffset:mXOffset yOffset:mYOffset 52 | xAdvance:mXAdvance]; 53 | } 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /3-BalloonGameTutorial/Classes/Classes/SPBitmapChar.m: -------------------------------------------------------------------------------- 1 | // 2 | // SPBitmapChar.m 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 12.10.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import "SPBitmapChar.h" 13 | #import "SPTexture.h" 14 | 15 | @implementation SPBitmapChar 16 | 17 | @synthesize charID = mCharID; 18 | @synthesize xOffset = mXOffset; 19 | @synthesize yOffset = mYOffset; 20 | @synthesize xAdvance = mXAdvance; 21 | 22 | - (id)initWithID:(int)charID texture:(SPTexture *)texture 23 | xOffset:(float)xOffset yOffset:(float)yOffset xAdvance:(float)xAdvance; 24 | { 25 | if (self = [super initWithTexture:texture]) 26 | { 27 | mCharID = charID; 28 | mXOffset = xOffset; 29 | mYOffset = yOffset; 30 | mXAdvance = xAdvance; 31 | } 32 | return self; 33 | } 34 | 35 | - (id)initWithTexture:(SPTexture *)texture 36 | { 37 | return [self initWithID:0 texture:texture xOffset:0 yOffset:0 xAdvance:texture.width]; 38 | } 39 | 40 | - (id)init 41 | { 42 | [self release]; 43 | return nil; 44 | } 45 | 46 | #pragma mark NSCopying 47 | 48 | - (id)copyWithZone:(NSZone*)zone; 49 | { 50 | return [[[self class] allocWithZone:zone] initWithID:mCharID texture:self.texture 51 | xOffset:mXOffset yOffset:mYOffset 52 | xAdvance:mXAdvance]; 53 | } 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /4-BalloonGameTutorial/Classes/Classes/SPBitmapChar.m: -------------------------------------------------------------------------------- 1 | // 2 | // SPBitmapChar.m 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 12.10.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import "SPBitmapChar.h" 13 | #import "SPTexture.h" 14 | 15 | @implementation SPBitmapChar 16 | 17 | @synthesize charID = mCharID; 18 | @synthesize xOffset = mXOffset; 19 | @synthesize yOffset = mYOffset; 20 | @synthesize xAdvance = mXAdvance; 21 | 22 | - (id)initWithID:(int)charID texture:(SPTexture *)texture 23 | xOffset:(float)xOffset yOffset:(float)yOffset xAdvance:(float)xAdvance; 24 | { 25 | if (self = [super initWithTexture:texture]) 26 | { 27 | mCharID = charID; 28 | mXOffset = xOffset; 29 | mYOffset = yOffset; 30 | mXAdvance = xAdvance; 31 | } 32 | return self; 33 | } 34 | 35 | - (id)initWithTexture:(SPTexture *)texture 36 | { 37 | return [self initWithID:0 texture:texture xOffset:0 yOffset:0 xAdvance:texture.width]; 38 | } 39 | 40 | - (id)init 41 | { 42 | [self release]; 43 | return nil; 44 | } 45 | 46 | #pragma mark NSCopying 47 | 48 | - (id)copyWithZone:(NSZone*)zone; 49 | { 50 | return [[[self class] allocWithZone:zone] initWithID:mCharID texture:self.texture 51 | xOffset:mXOffset yOffset:mYOffset 52 | xAdvance:mXAdvance]; 53 | } 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /5-BalloonGameTutorial/Classes/Classes/SPBitmapChar.m: -------------------------------------------------------------------------------- 1 | // 2 | // SPBitmapChar.m 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 12.10.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import "SPBitmapChar.h" 13 | #import "SPTexture.h" 14 | 15 | @implementation SPBitmapChar 16 | 17 | @synthesize charID = mCharID; 18 | @synthesize xOffset = mXOffset; 19 | @synthesize yOffset = mYOffset; 20 | @synthesize xAdvance = mXAdvance; 21 | 22 | - (id)initWithID:(int)charID texture:(SPTexture *)texture 23 | xOffset:(float)xOffset yOffset:(float)yOffset xAdvance:(float)xAdvance; 24 | { 25 | if (self = [super initWithTexture:texture]) 26 | { 27 | mCharID = charID; 28 | mXOffset = xOffset; 29 | mYOffset = yOffset; 30 | mXAdvance = xAdvance; 31 | } 32 | return self; 33 | } 34 | 35 | - (id)initWithTexture:(SPTexture *)texture 36 | { 37 | return [self initWithID:0 texture:texture xOffset:0 yOffset:0 xAdvance:texture.width]; 38 | } 39 | 40 | - (id)init 41 | { 42 | [self release]; 43 | return nil; 44 | } 45 | 46 | #pragma mark NSCopying 47 | 48 | - (id)copyWithZone:(NSZone*)zone; 49 | { 50 | return [[[self class] allocWithZone:zone] initWithID:mCharID texture:self.texture 51 | xOffset:mXOffset yOffset:mYOffset 52 | xAdvance:mXAdvance]; 53 | } 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /6-BalloonGameTutorial/Classes/Classes/SPBitmapChar.m: -------------------------------------------------------------------------------- 1 | // 2 | // SPBitmapChar.m 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 12.10.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import "SPBitmapChar.h" 13 | #import "SPTexture.h" 14 | 15 | @implementation SPBitmapChar 16 | 17 | @synthesize charID = mCharID; 18 | @synthesize xOffset = mXOffset; 19 | @synthesize yOffset = mYOffset; 20 | @synthesize xAdvance = mXAdvance; 21 | 22 | - (id)initWithID:(int)charID texture:(SPTexture *)texture 23 | xOffset:(float)xOffset yOffset:(float)yOffset xAdvance:(float)xAdvance; 24 | { 25 | if (self = [super initWithTexture:texture]) 26 | { 27 | mCharID = charID; 28 | mXOffset = xOffset; 29 | mYOffset = yOffset; 30 | mXAdvance = xAdvance; 31 | } 32 | return self; 33 | } 34 | 35 | - (id)initWithTexture:(SPTexture *)texture 36 | { 37 | return [self initWithID:0 texture:texture xOffset:0 yOffset:0 xAdvance:texture.width]; 38 | } 39 | 40 | - (id)init 41 | { 42 | [self release]; 43 | return nil; 44 | } 45 | 46 | #pragma mark NSCopying 47 | 48 | - (id)copyWithZone:(NSZone*)zone; 49 | { 50 | return [[[self class] allocWithZone:zone] initWithID:mCharID texture:self.texture 51 | xOffset:mXOffset yOffset:mYOffset 52 | xAdvance:mXAdvance]; 53 | } 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /7-BalloonGameTutorial/Classes/Classes/SPBitmapChar.m: -------------------------------------------------------------------------------- 1 | // 2 | // SPBitmapChar.m 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 12.10.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import "SPBitmapChar.h" 13 | #import "SPTexture.h" 14 | 15 | @implementation SPBitmapChar 16 | 17 | @synthesize charID = mCharID; 18 | @synthesize xOffset = mXOffset; 19 | @synthesize yOffset = mYOffset; 20 | @synthesize xAdvance = mXAdvance; 21 | 22 | - (id)initWithID:(int)charID texture:(SPTexture *)texture 23 | xOffset:(float)xOffset yOffset:(float)yOffset xAdvance:(float)xAdvance; 24 | { 25 | if (self = [super initWithTexture:texture]) 26 | { 27 | mCharID = charID; 28 | mXOffset = xOffset; 29 | mYOffset = yOffset; 30 | mXAdvance = xAdvance; 31 | } 32 | return self; 33 | } 34 | 35 | - (id)initWithTexture:(SPTexture *)texture 36 | { 37 | return [self initWithID:0 texture:texture xOffset:0 yOffset:0 xAdvance:texture.width]; 38 | } 39 | 40 | - (id)init 41 | { 42 | [self release]; 43 | return nil; 44 | } 45 | 46 | #pragma mark NSCopying 47 | 48 | - (id)copyWithZone:(NSZone*)zone; 49 | { 50 | return [[[self class] allocWithZone:zone] initWithID:mCharID texture:self.texture 51 | xOffset:mXOffset yOffset:mYOffset 52 | xAdvance:mXAdvance]; 53 | } 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /1-BalloonGameTutorial/Classes/Classes/SPTouchProcessor.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPTouchProcessor.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 03.05.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | 14 | @class SPDisplayObjectContainer; 15 | 16 | /** ------------------------------------------------------------------------------------------------ 17 | 18 | The SPTouchProcesser processes raw touch information and dispatches it on display objects. 19 | 20 | _This is an internal class. You do not have to use it manually._ 21 | 22 | ------------------------------------------------------------------------------------------------- */ 23 | 24 | @interface SPTouchProcessor : NSObject 25 | { 26 | @private 27 | SPDisplayObjectContainer *mRoot; 28 | NSMutableSet *mCurrentTouches; 29 | } 30 | 31 | /// ------------------ 32 | /// @name Initializers 33 | /// ------------------ 34 | 35 | /// Initializes a touch processor with a certain root object. 36 | - (id)initWithRoot:(SPDisplayObjectContainer*)root; 37 | 38 | /// ------------- 39 | /// @name Methods 40 | /// ------------- 41 | 42 | /// @name Processes raw touches and dispatches events on the touched display objects. 43 | - (void)processTouches:(NSSet*)touches; 44 | 45 | /// ---------------- 46 | /// @name Properties 47 | /// ---------------- 48 | 49 | /// The root display container to check for touched targets. 50 | @property (nonatomic, assign) SPDisplayObjectContainer *root; 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /2-BalloonGameTutorial/Classes/Classes/SPTouchProcessor.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPTouchProcessor.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 03.05.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | 14 | @class SPDisplayObjectContainer; 15 | 16 | /** ------------------------------------------------------------------------------------------------ 17 | 18 | The SPTouchProcesser processes raw touch information and dispatches it on display objects. 19 | 20 | _This is an internal class. You do not have to use it manually._ 21 | 22 | ------------------------------------------------------------------------------------------------- */ 23 | 24 | @interface SPTouchProcessor : NSObject 25 | { 26 | @private 27 | SPDisplayObjectContainer *mRoot; 28 | NSMutableSet *mCurrentTouches; 29 | } 30 | 31 | /// ------------------ 32 | /// @name Initializers 33 | /// ------------------ 34 | 35 | /// Initializes a touch processor with a certain root object. 36 | - (id)initWithRoot:(SPDisplayObjectContainer*)root; 37 | 38 | /// ------------- 39 | /// @name Methods 40 | /// ------------- 41 | 42 | /// @name Processes raw touches and dispatches events on the touched display objects. 43 | - (void)processTouches:(NSSet*)touches; 44 | 45 | /// ---------------- 46 | /// @name Properties 47 | /// ---------------- 48 | 49 | /// The root display container to check for touched targets. 50 | @property (nonatomic, assign) SPDisplayObjectContainer *root; 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /3-BalloonGameTutorial/Classes/Classes/SPTouchProcessor.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPTouchProcessor.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 03.05.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | 14 | @class SPDisplayObjectContainer; 15 | 16 | /** ------------------------------------------------------------------------------------------------ 17 | 18 | The SPTouchProcesser processes raw touch information and dispatches it on display objects. 19 | 20 | _This is an internal class. You do not have to use it manually._ 21 | 22 | ------------------------------------------------------------------------------------------------- */ 23 | 24 | @interface SPTouchProcessor : NSObject 25 | { 26 | @private 27 | SPDisplayObjectContainer *mRoot; 28 | NSMutableSet *mCurrentTouches; 29 | } 30 | 31 | /// ------------------ 32 | /// @name Initializers 33 | /// ------------------ 34 | 35 | /// Initializes a touch processor with a certain root object. 36 | - (id)initWithRoot:(SPDisplayObjectContainer*)root; 37 | 38 | /// ------------- 39 | /// @name Methods 40 | /// ------------- 41 | 42 | /// @name Processes raw touches and dispatches events on the touched display objects. 43 | - (void)processTouches:(NSSet*)touches; 44 | 45 | /// ---------------- 46 | /// @name Properties 47 | /// ---------------- 48 | 49 | /// The root display container to check for touched targets. 50 | @property (nonatomic, assign) SPDisplayObjectContainer *root; 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /4-BalloonGameTutorial/Classes/Classes/SPTouchProcessor.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPTouchProcessor.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 03.05.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | 14 | @class SPDisplayObjectContainer; 15 | 16 | /** ------------------------------------------------------------------------------------------------ 17 | 18 | The SPTouchProcesser processes raw touch information and dispatches it on display objects. 19 | 20 | _This is an internal class. You do not have to use it manually._ 21 | 22 | ------------------------------------------------------------------------------------------------- */ 23 | 24 | @interface SPTouchProcessor : NSObject 25 | { 26 | @private 27 | SPDisplayObjectContainer *mRoot; 28 | NSMutableSet *mCurrentTouches; 29 | } 30 | 31 | /// ------------------ 32 | /// @name Initializers 33 | /// ------------------ 34 | 35 | /// Initializes a touch processor with a certain root object. 36 | - (id)initWithRoot:(SPDisplayObjectContainer*)root; 37 | 38 | /// ------------- 39 | /// @name Methods 40 | /// ------------- 41 | 42 | /// @name Processes raw touches and dispatches events on the touched display objects. 43 | - (void)processTouches:(NSSet*)touches; 44 | 45 | /// ---------------- 46 | /// @name Properties 47 | /// ---------------- 48 | 49 | /// The root display container to check for touched targets. 50 | @property (nonatomic, assign) SPDisplayObjectContainer *root; 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /5-BalloonGameTutorial/Classes/Classes/SPTouchProcessor.h: -------------------------------------------------------------------------------- 1 | // 2 | // SPTouchProcessor.h 3 | // Sparrow 4 | // 5 | // Created by Daniel Sperl on 03.05.09. 6 | // Copyright 2009 Incognitek. All rights reserved. 7 | // 8 | // This program is free software; you can redistribute it and/or modify 9 | // it under the terms of the Simplified BSD License. 10 | // 11 | 12 | #import 13 | 14 | @class SPDisplayObjectContainer; 15 | 16 | /** ------------------------------------------------------------------------------------------------ 17 | 18 | The SPTouchProcesser processes raw touch information and dispatches it on display objects. 19 | 20 | _This is an internal class. You do not have to use it manually._ 21 | 22 | ------------------------------------------------------------------------------------------------- */ 23 | 24 | @interface SPTouchProcessor : NSObject 25 | { 26 | @private 27 | SPDisplayObjectContainer *mRoot; 28 | NSMutableSet *mCurrentTouches; 29 | } 30 | 31 | /// ------------------ 32 | /// @name Initializers 33 | /// ------------------ 34 | 35 | /// Initializes a touch processor with a certain root object. 36 | - (id)initWithRoot:(SPDisplayObjectContainer*)root; 37 | 38 | /// ------------- 39 | /// @name Methods 40 | /// ------------- 41 | 42 | /// @name Processes raw touches and dispatches events on the touched display objects. 43 | - (void)processTouches:(NSSet*)touches; 44 | 45 | /// ---------------- 46 | /// @name Properties 47 | /// ---------------- 48 | 49 | /// The root display container to check for touched targets. 50 | @property (nonatomic, assign) SPDisplayObjectContainer *root; 51 | 52 | @end 53 | --------------------------------------------------------------------------------