<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>Support/Cocos2d/Resources/cocos2d-iphone.xcclassmodel/elements</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/Resources/cocos2d-iphone.xcclassmodel/layout</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/cocos2d/Support/CGPointExtension.h</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/cocos2d/Support/CGPointExtension.m</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/cocos2d/Support/FileUtils.h</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/cocos2d/Support/FileUtils.m</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/cocos2d/Support/ccArray.h</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/doxygen.config</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/experimental/README.experimental.txt</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/external/Chipmunk/LICENSE.chipmunk.txt</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/external/TouchJSON/LICENSE.TouchJSON.txt</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/external/Tremor/CHANGELOG.tremor.txt</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/external/Tremor/COPYING.tremor.txt</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/external/Tremor/Makefile.am</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/external/Tremor/README.tremor.txt</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/external/Tremor/Version_script.in</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/external/Tremor/asm_arm.h</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/external/Tremor/autogen.sh</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/external/Tremor/backends.h</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/external/Tremor/bitwise.c</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/external/Tremor/block.c</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/external/Tremor/block.h</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/external/Tremor/codebook.c</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/external/Tremor/codebook.h</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/external/Tremor/codec_internal.h</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/external/Tremor/config_types.h</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/external/Tremor/configure.in</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/external/Tremor/floor0.c</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/external/Tremor/floor1.c</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/external/Tremor/framing.c</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/external/Tremor/info.c</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/external/Tremor/ivorbiscodec.h</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/external/Tremor/ivorbisfile.h</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/external/Tremor/ivorbisfile_example.c</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/external/Tremor/lsp_lookup.h</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/external/Tremor/mapping0.c</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/external/Tremor/mdct.c</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/external/Tremor/mdct.h</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/external/Tremor/mdct_lookup.h</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/external/Tremor/misc.h</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/external/Tremor/ogg.h</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/external/Tremor/os.h</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/external/Tremor/os_types.h</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/external/Tremor/registry.c</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/external/Tremor/registry.h</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/external/Tremor/res012.c</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/external/Tremor/sharedbook.c</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/external/Tremor/synthesis.c</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/external/Tremor/vorbisfile.c</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/external/Tremor/window.c</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/external/Tremor/window.h</filename>
    </added>
    <added>
      <filename>Support/Cocos2d/external/Tremor/window_lookup.h</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,4 +1,4 @@
-cocos2d-iphone (0.7.1) Xcode Template
+cocos2d-iphone (0.7.2) Xcode Template
 =====================================
 
 Install in:</diff>
      <filename>README.markdown</filename>
    </modified>
    <modified>
      <diff>@@ -7,54 +7,59 @@ Special thanks to: Lucio Torre, Alejandro Cura, Daniel Moisset &amp; Rayentray Tappa
 
 cocos2d for iPhone wouldn't be possible without the help of the community who is
 constantly adding new features, sending patches, opening issues:
-       http://groups.google.com/group/cocos2d-iphone-discuss
+	   http://groups.google.com/group/cocos2d-iphone-discuss
 
 Poeple/companies who were/are contributing code to cocos2d for iPhone (alphabetically ordered):
 
-    * Alejandro Cura: author of AccelViewPortDemo
-    * Alex Winston: author of ParticleSnow
+	* Alejandro Cura: author of AccelViewPortDemo
+	* Alex Winston: author of ParticleSnow
 		patches for CocosNode
-    * Alia Mc.Cutcheon: scale &amp; rotate order fixed in CocosNode.m
+	* Alia Mc.Cutcheon: scale &amp; rotate order fixed in CocosNode.m
 		category is cocosLive is UTF8'ized
 		added sanity in scheduler
-    * Andy Fitter: patches for Texture2D
-    * Anton Zemlyanov: patches for MenuItemToggle that supports selectedIndex
-    * Brian Hammond: patches for Demos
-    * Clinth Harris: patches for Doc generator script
-    * Codemattic: patches for CocosNode
+		TileMapAtlas supports fullpath
+	* Andy Fitter: patches for Texture2D
+	* Anton Zemlyanov: patches for MenuItemToggle that supports selectedIndex
+	* Brian Hammond: patches for Demos
+	* Clinth Harris: patches for Doc generator script
+	* Codemattic: patches for CocosNode
 		patches fro MenuItemFont
-    * effervens: patches for Director
-    * Ernesto Corvi: author of TGA RLE support
+	* effervens: patches for Director
+	* Ernesto Corvi: author of TGA RLE support
 		patches for TextureMgr
 		patches for Sprite
-    * Ernesto Corvi &amp; On-Core (http://www.on-core.com/): author of Effects and EffectsDemo
-        Added Support classes: Grabber, Grid, GridAction
-        Added Basic Effects: StopGrid, ReuseGrid
-        Added Grid Effects: Waves3D, FlipX3D, FlipY3D, Lens3D, Ripple3D, Liquid,
+	* Ernesto Corvi &amp; On-Core (http://www.on-core.com/): author of Effects and EffectsDemo
+		Added Support classes: Grabber, Grid, GridAction
+		Added Basic Effects: StopGrid, ReuseGrid
+		Added Grid Effects: Waves3D, FlipX3D, FlipY3D, Lens3D, Ripple3D, Liquid,
 			Shaky3D, Waves, Twirl
-        Added Tiled Grid Effects: ShakyTiles3D, ShatteredTiles3D, ShuffleTiles,
+		Added Tiled Grid Effects: ShakyTiles3D, ShatteredTiles3D, ShuffleTiles,
 			FadeOutTRTiles, FadeOutBLTiles, FadeOutUpTiles, FadeOutDownTiles,
 			TurnOffTiles, WavesTiles3D, JumpTiles3D, SplitRows, SplitCols
-        Added Composite actions: AccelAmplitude, AccelDeccelAmplitude, DeccelAmplitude
-    * Favo Yang: patch for unschedule timer in CocosNode
-    * Florin Dumitrescu: added &quot;update score&quot; in cocosLive
-	    author of the sound engine: PASoundListener, PASoundMgr, PASoundSource
-    * Fradj Johann: patches for CocosNode
+		Added Composite actions: AccelAmplitude, AccelDeccelAmplitude, DeccelAmplitude
+	* Favo Yang: patch for unschedule timer in CocosNode
+	* Florin Dumitrescu: added &quot;update score&quot; in cocosLive
+		author of the sound engine: PASoundListener, PASoundMgr, PASoundSource
+	* Fradj Johann: patches for CocosNode
 		patches for Layer
 		patches for MultiplexLayer
-    * Graham Perks: Atlas works with GL_CULL_FACE
+	* Graham Perks: Atlas works with GL_CULL_FACE
 		FastDirector doesn't leak autorelease pool patch
-    * Ishaq Malik: patches for CocosNode
-    * Jacob Eiting: patches for Primitives
-    * Jason Booth (slipster216): author of EaseAction
+	* guilo0: Added TintTo action
+	* Hans Larsen: Possibility to create empty menus
+	* Ishaq Malik: patches for CocosNode
+	* Jacob Eiting: patches for Primitives
+	* Jason Booth (slipster216): author of the EaseAction actions
 		author of EaseAction demos
 		author of StreakDemo, MotionStreak and Ribbon
 		patch for ScaleTo/By action to support X and Y.
-    * Joe Vennix: patches for CocosNode
-    * kermidt.zed: patches for absolutePosition in CocosNode
+	* Joe Vennix: patches for CocosNode
+	* jkrippy: patch for menu align. takes scale into account
+	* kasatani: AtlasSprite index 0 is not overwritten
+	* kermidt.zed: patches for absolutePosition in CocosNode
 		patches for Labels in Texture2D
-    * lukeman: patches for MenuItem
-    * Maarten Billemont (lhunath): author of ParticleRain
+	* lukeman: patches for MenuItem
+	* Maarten Billemont (lhunath): author of ParticleRain
 		added suport for particles' source
 		&quot;Particles are updated on update, not draw&quot; patch
 		fixed memory leaks in Sprite
@@ -68,22 +73,24 @@ Poeple/companies who were/are contributing code to cocos2d for iPhone (alphabeti
 		Menu can be aligned in Columns and Rows
 		MenuItem supports LabelAtlas
 		Added RGB protocol in CocosNode, Atlas, Texture
-    * mark at abitofthought: author of Fast Director
-    * Mitch: patches for Menu
+		Particle reset system works as expected
+		CocosNode: fixed &quot;already scheduled exception&quot; bug
+	* mark at abitofthought: author of Fast Director
+	* Mitch: patches for Menu
 		 author of MenuItemToggle
-    * Math Sephton: patches for Demos
+	* Math Sephton: patches for Demos
 		patches for License
-    * Matt Oswald: fix to set depthbuffer size on Director
+	* Matt Oswald: fix to set depthbuffer size on Director
 		TextureAtlas supports Texture2D objects
 		author of the original AtlasSprite and AtlasSpriteManager
-    * rac5372: compiler warning in MenuItem
-    * ratman: patch for TileMapAtlas: it works with 255 tiles
+	* rac5372: compiler warning in MenuItem
+	* ratman: patch for TileMapAtlas: it works with 255 tiles
 		  patch for TextureMgr: supports directory within image names
-    * Serge Kolgan: patches for CocosNode
-    * Steve Israelson: patches for Scheduler
+	* Serge Kolgan: patches for CocosNode
+	* Steve Israelson: patches for Scheduler
 		pactches for Actions
 		patches for Transitions
-    * Steve Oldmeadow: patches for Texture2D
+	* Steve Oldmeadow: patches for Texture2D
 	* Valentin Milea: clean up CocosNode, added better comments to CocosNode
 		Set transformAnchor point in Sprite
 		Actions can have tags
@@ -92,7 +99,14 @@ Poeple/companies who were/are contributing code to cocos2d for iPhone (alphabeti
 		removed unused scale ivar in CocosNode
 		Layer conforms to TouchDelegate protocol
 		Ability to remove nil objects
-    * yarrington: patches for Director
+		ccArray: a fast alternative to NSMutableArray
+		improved Scheduler timer performance
+		improved CocosNode runAction/stopAction
+		fixed possible memory leak when running actions
+		AtlasSpriteManager#removeChild fixes
+		CocosNode#runAction doesn't run an already running action
+		Added improvements, fixes and documentation in CGPointExtension
+	* yarrington: patches for Director
 
 
 Am I missing someone ? Oops, sorry. Send me an email.</diff>
      <filename>Support/Cocos2d/AUTHORS</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,52 @@
+version 0.7.2 - 23-Apr-2009
+ . All: removed chipmunk macros. using CG macros (issue #290)
+ . Actions: Added TintTo and TintBy (issue #204)
+ . AtlasSprite: don't overwrite index 0 (issue #283)
+ . AtlasSprite: Supports Z-order (issue #275)
+ . AtlasSprite &amp; Sprite: don't auto center sprite when setting frame (issue #281)
+ . AtlasSprite: don't render in subpixels (issue #135)
+ . AtlasSpriteManager: supports transformations (issue #308)
+ . AtlasSpriteManager: fixes in removeChild (issue #296)
+ . AtlasSpriteManager: works with capacity=1 (issue #305)
+ . CocosNode: CocosNodeExtras merged into CocosNode (issue #292)
+ . CocosNode: improved runAction/stopAction (issue #300)
+ . CocosNode: possible memory leak when running actions (issue #298)
+ . CocosNode: dont execute an already running action (issue #299)
+ . CocosNode: children referring to deallocated parent (issue #297)
+ . CocosNode: fixed &quot;already scheduled exception&quot; (issue #251)
+ . CocosNode: don't render in subpixels (issue #135)
+ . Demos: AtlasSprite with z-order (issue #275)
+ . Demos: ParticleDemo uses touches to move the center of the emitter (issue #138)
+ . Demos: organized tests folder (issue #280)
+ . Demos: Atlas and Sprites uses TintBy and TintTo (issue #204)
+ . Demos: Menu shows how to use padding / dynamic toggle items (part of issue #249, issue #224)
+ . Demos: added drawing primitives excample (part of issue #322)
+ . Director: Attach uses 'bounds' not 'frame' (issue #233)
+ . Director: runWithScene / end doesn't crash/leak anymore (issue #325)
+ . Director / Transitions: pushScene with Transitions works (issue #267)
+ . Documentation: API doc documents free functions (issue #314)
+ . Menu: an empty menu can be crated (issue #277)
+ . Menu: align supports padding (issue #249)
+ . Menu: align takes into account scale (issue #248)
+ . Menu: MenuToggleItem supports add/remove items in runtime (issue #224)
+ . Particles: Use by default fire.pvr (issue #276)
+ . Particles: resetSystem actually resets the system (issue #252)
+ . Particles: texture is a property (issue #282)
+ . Particles: colors and vertices in 1 VBO (issue #246)
+ . Primitives: deprecated all functions. New functions uses CGPoint (issue #322)
+ . Scheduler: improved timer performance (issue #309)
+ . SoundSupport: supports vorbis codec (issue #321)
+ . ccArray: a fast alternative to NSMutableArray (issue #304)
+ . TextureAtlas: fixed colorarray memory leak (issue #272)
+ . TextureAtlas: support for insert,remove,reorder (issue #275)
+ . TextureAtlas: free indices correctly when out of memory (issue #293)
+ . TextureAtlas: resizeCapacity returns BOOL instead of raise exception (issue #294)
+ . TextureAtlas: prevent crash when not enough memory while allocating color (issue #295)
+ . TextureNode: texture is &quot;retain&quot; not &quot;assign&quot; (issue #230 and issue #274)
+ . TileMapAtlas: supports fullpath (issue #220)
+ . TileMapAtlas: don't render in subpixels (issue #135)
+ . XCode project: added class model (issue #312)
+ 
 version 0.7.1 - 20-Mar-2009
  . Actions: added tags to actions (issue #222)
  . Actions: Spawns can be Speeded (issue #257)</diff>
      <filename>Support/Cocos2d/CHANGELOG</filename>
    </modified>
    <modified>
      <diff>@@ -3,16 +3,21 @@ cocos2d for iPhone donors:
 
 (Alphabetically ordered)
 
+AFKSoft (http://www.afksoft.com/)
 Jonathan Apple (http://www.jonathanapple.com/)
 Markus Barta (http://markus.barta.com)
+Michael Daley (michael_daley AT me com)
 David from Little Lumnes (http://www.littlelumens.com)
-Eric Farraro
+Eric Farraro (ejfarraro AT ucdavis edu)
 Josh Isaak (http://www.futurebot.com)
+Rolandas Razma (gamebit AT gmail com)
 David Roach (http://www.creativeclasssoftware.com)
 Alexandre Rousseau (http://www.ninermedia.com)
+S A Jenkins (jenkinsuz AT hotmail com)
 Matt Sephton (http://www.gingerbeardman.com)
+Scott Shapiro (scott AT iisystems com)
 Hoan Ton-That (http://www.happyappyinc.com)
-Anton Zemlyanov
+Anton Zemlyanov (anton.zem AT gmail com)
 
 
 Thank you!</diff>
      <filename>Support/Cocos2d/DONORS</filename>
    </modified>
    <modified>
      <diff>@@ -10,21 +10,21 @@ design:
 Main features
     * Scene management (workflow)
     * Transitions between scenes
-	* Sprites and Sprite Sheets
-	* Effects: Lens, Ripple, Waves, Liquid, etc.
+    * Sprites and Sprite Sheets
+    * Effects: Lens, Ripple, Waves, Liquid, etc.
     * Actions (behaviours): 
-		* Trasformation Actions: Move, Rotate, Scale, Jump, etc.
-		* Composable actions: Sequence, Spawn, Repeat, Reverse
-		* Ease Actions: Exp, Sin, Cubic, etc.
-		* Misc actions: CallFunc, OrbitCamera
+        * Trasformation Actions: Move, Rotate, Scale, Fade, Tint, etc.
+        * Composable actions: Sequence, Spawn, Repeat, Reverse
+        * Ease Actions: Exp, Sin, Cubic, etc.
+        * Misc actions: CallFunc, OrbitCamera
     * Basic menus and buttons
     * Integrated Chipmunk 2d physics engine
     * Particle system
     * Text rendering support
     * Texture Atlas support
     * Tile Map support
-	* Parallax scrolling support
-	* High Score server
+    * Parallax scrolling support
+    * High Score server
     * Touch/Accelerometer support
     * Portrait and Landscape mode
     * Integrated Pause/Resume
@@ -35,7 +35,7 @@ Main features
 
 Experimental features:
     * Motion Streak / Ribbon support
-	* Sound Engine support
+    * Sound Engine support
 
 This library does not work with the toolchain, but it
 should be easy to port it to it.</diff>
      <filename>Support/Cocos2d/README</filename>
    </modified>
    <modified>
      <diff>@@ -16,7 +16,6 @@
 #include &lt;sys/time.h&gt;
 
 #import &quot;ccTypes.h&quot;
-#import &quot;chipmunk.h&quot;
 
 enum {
 	kActionTagInvalid = -1,</diff>
      <filename>Support/Cocos2d/cocos2d/Action.h</filename>
    </modified>
    <modified>
      <diff>@@ -45,10 +45,7 @@
 -(void) dealloc
 {
 	CCLOG(@&quot;deallocing %@&quot;, self);
-	if( target ) {
-		[target release];
-		target = nil;
-	}
+	[target release];
 	[super dealloc];
 }
 </diff>
      <filename>Support/Cocos2d/cocos2d/Action.m</filename>
    </modified>
    <modified>
      <diff>@@ -31,7 +31,6 @@
  *
  *	- Limitations
  *		- Their parent can only be an AtlasSpriteManager
- *		- They all use z-order 0
  *		- They can't have children
  *		- Camera is not supported yet (eg: OrbitCamera action doesn't work)
  *		- GridBase actions are supported (eg: Lens, Ripple, Twirl)
@@ -43,30 +42,33 @@
 @interface AtlasSprite : CocosNode &lt;CocosNodeSize, CocosNodeFrames, CocosNodeOpacity, CocosNodeRGB&gt;
 {
 	// weak reference
-	TextureAtlas *mAtlas;
-	int mAtlasIndex;
+	TextureAtlas *textureAtlas_;
+	NSUInteger atlasIndex_;
 
 	// texture pixels
-	CGRect mRect;
+	CGRect rect_;
 
 	// texture coords
 	// stored as floats in the range [0..1]
-	ccQuad2 mTexCoords;
+	ccQuad2 texCoords_;
 
-	// screen pixels
+	// vertex coordinates
 	// stored as pixel locations
-	ccQuad3 mVertices;
+	ccQuad3 vertexCoords_;
 	
 	// whether or not this Sprite needs to be updated in the Atlas
 	BOOL	dirtyPosition;
 	
 	// opacity and RGB protocol
-	GLubyte _opacity;
-	GLubyte _r, _g, _b;
+	GLubyte opacity_;
+	GLubyte r_, g_, b_;
 	BOOL	dirtyColor;
 	
 	// Animations that belong to the sprite
 	NSMutableDictionary *animations;
+	
+	// cocosNodeProtcol
+	BOOL	autoCenterFrames_;
 }
 
 /** whether or not the Sprite needs to be updated in the Atlas */
@@ -74,9 +76,11 @@
 /** whether or not the Sprite's color needs to be updated in the Atlas */
 @property (readonly) BOOL dirtyColor;
 /** returns the altas index of the AtlasSprite */
-@property (readonly) int atlasIndex;
+@property (readonly) NSUInteger atlasIndex;
 /** returns the rect of the AtlasSprite */
 @property (readonly) CGRect textureRect;
+/** whether or not the new frames will be auto centered */
+@property (readwrite) BOOL autoCenterFrames;
 
 /** creates an AtlasSprite with an AtlasSpriteManager inidicating the Rect of the Atlas */
 +(id)spriteWithRect:(CGRect)rect spriteManager:(AtlasSpriteManager*)manager;
@@ -86,6 +90,7 @@
 /** updates the Quad in the TextureAtlas with it's new position, scale and rotation */
 -(void)updateAtlas;
 
+-(void)insertInAtlasAtIndex:(NSUInteger)index;
 -(void)updatePosition;
 -(void)updateColor;
 </diff>
      <filename>Support/Cocos2d/cocos2d/AtlasSprite.h</filename>
    </modified>
    <modified>
      <diff>@@ -14,10 +14,15 @@
 
 #import &quot;AtlasSpriteManager.h&quot;
 #import &quot;AtlasSprite.h&quot;
+#import &quot;Support/CGPointExtension.h&quot;
 
 #pragma mark -
 #pragma mark AltasSprite
 
+enum {
+	kIndexNotInitialized = 0xffffffff,
+};
+
 @interface AtlasSprite (Private)
 -(void)updateTextureCoords;
 -(void) initAnimationDictionary;
@@ -26,8 +31,9 @@
 @implementation AtlasSprite
 
 @synthesize dirtyColor, dirtyPosition;
-@synthesize atlasIndex = mAtlasIndex;
-@synthesize textureRect = mRect;
+@synthesize atlasIndex = atlasIndex_;
+@synthesize textureRect = rect_;
+@synthesize autoCenterFrames = autoCenterFrames_;
 
 +(id)spriteWithRect:(CGRect)rect spriteManager:(AtlasSpriteManager*)manager
 {
@@ -37,16 +43,22 @@
 -(id)initWithRect:(CGRect)rect spriteManager:(AtlasSpriteManager*)manager
 {
 	if( (self = [super init])) {
-		mAtlas = [manager atlas];	// weak reference. Don't release
+		textureAtlas_ = [manager atlas];	// weak reference. Don't release
 		
+		atlasIndex_ = kIndexNotInitialized;
+
 		dirtyPosition = YES;
-		dirtyColor = NO;			// optimization. If the color is not changed
-									// gl_color_array is not sent to the GPU
+		dirtyColor = NO;			// optimization. If the color is not changed gl_color_array is not send to the GPU
 		
 		// RGB and opacity
-		_r = _g = _b = _opacity = 255;
-
+		r_ = g_ = b_ = opacity_ = 255;
+		
 		animations = nil;		// lazy alloc
+		
+		// default transform anchor: center
+		transformAnchor = ccp( rect.size.width / 2, rect.size.height /2 );		
+		autoCenterFrames_ = NO;
+		
 		[self setTextureRect:rect];
 	}
 
@@ -55,7 +67,7 @@
 
 - (NSString*) description
 {
-	return [NSString stringWithFormat:@&quot;&lt;%@ = %08X | Rect = (%.2f,%.2f,%.2f,%.2f) | tag = %i&gt;&quot;, [self class], self, mRect.origin.x, mRect.origin.y, mRect.size.width, mRect.size.height, tag];
+	return [NSString stringWithFormat:@&quot;&lt;%@ = %08X | Rect = (%.2f,%.2f,%.2f,%.2f) | tag = %i&gt;&quot;, [self class], self, rect_.origin.x, rect_.origin.y, rect_.size.width, rect_.size.height, tag];
 }
 
 - (void) dealloc
@@ -71,22 +83,32 @@
 
 -(void)setTextureRect:(CGRect) rect
 {
-	mRect = rect;
-	transformAnchor = cpv( mRect.size.width / 2, mRect.size.height /2 );
+	rect_ = rect;
 
 	[self updateTextureCoords];
-	[self updateAtlas];
+	
+	// Don't update Atlas if index == -1. issue #283
+	if( atlasIndex_ != kIndexNotInitialized)
+		[self updateAtlas];
+	else
+		dirtyPosition = YES;
+	
+	// add these lines	
+	if( autoCenterFrames_ ) {
+		self.transformAnchor = ccp(rect.size.width/2, rect.size.height/2);
+		dirtyPosition = YES;
+	}	
 }
 
 -(void)updateTextureCoords
 {
-	float atlasWidth = mAtlas.texture.pixelsWide;
-	float atlasHeight = mAtlas.texture.pixelsHigh;
+	float atlasWidth = textureAtlas_.texture.pixelsWide;
+	float atlasHeight = textureAtlas_.texture.pixelsHigh;
 
-	float left = mRect.origin.x / atlasWidth;
-	float right = (mRect.origin.x + mRect.size.width) / atlasWidth;
-	float top = mRect.origin.y / atlasHeight;
-	float bottom = (mRect.origin.y + mRect.size.height) / atlasHeight;
+	float left = rect_.origin.x / atlasWidth;
+	float right = (rect_.origin.x + rect_.size.width) / atlasWidth;
+	float top = rect_.origin.y / atlasHeight;
+	float bottom = (rect_.origin.y + rect_.size.height) / atlasHeight;
 
 	ccQuad2 newCoords = {
 		left, bottom,
@@ -95,13 +117,13 @@
 		right, top,
 	};
 
-	mTexCoords = newCoords;
+	texCoords_ = newCoords;
 }
 
 -(void) updateColor
 {
-	ccColorB colorQuad = { _r, _g, _b, _opacity};
-	[mAtlas updateColorWithColorQuad:&amp;colorQuad atIndex:mAtlasIndex];
+	ccColorB colorQuad = { r_, g_, b_, opacity_};
+	[textureAtlas_ updateColorWithColorQuad:&amp;colorQuad atIndex:atlasIndex_];
 	dirtyColor = NO;
 }
 
@@ -119,7 +141,7 @@
 			0,0,0,			
 		};
 		
-		mVertices = newVertices;
+		vertexCoords_ = newVertices;
 	}
 	
 	// rotation ? -&gt; update: rotation, scale, position
@@ -127,8 +149,8 @@
 		float x1 = -transformAnchor.x * scaleX;
 		float y1 = -transformAnchor.y * scaleY;
 
-		float x2 = x1 + mRect.size.width * scaleX;
-		float y2 = y1 + mRect.size.height * scaleY;
+		float x2 = x1 + rect_.size.width * scaleX;
+		float y2 = y1 + rect_.size.height * scaleY;
 		float x = position.x;
 		float y = position.y;
 		
@@ -145,11 +167,11 @@
 		float dy = x1 * sr + y2 * cr + y;
 
 		ccQuad3 newVertices = 
-					{ax, ay, 0,
-					bx, by, 0,
-					dx, dy, 0,
-					cx, cy, 0};
-		mVertices = newVertices;		
+					{(int)ax, (int)ay, 0,
+					(int)bx, (int)by, 0,
+					(int)dx, (int)dy, 0,
+					(int)cx, (int)cy, 0};
+		vertexCoords_ = newVertices;		
 	}
 	
 	// scale ? -&gt; update: scale, position
@@ -160,16 +182,16 @@
 		
 		float x1 = (x- transformAnchor.x * scaleX);
 		float y1 = (y- transformAnchor.y * scaleY);
-		float x2 = (x1 + mRect.size.width * scaleX);
-		float y2 = (y1 + mRect.size.height * scaleY);
+		float x2 = (x1 + rect_.size.width * scaleX);
+		float y2 = (y1 + rect_.size.height * scaleY);
 		ccQuad3 newVertices = {
-			x1,y1,0,
-			x2,y1,0,
-			x1,y2,0,
-			x2,y2,0,
+			(int)x1,(int)y1,0,
+			(int)x2,(int)y1,0,
+			(int)x1,(int)y2,0,
+			(int)x2,(int)y2,0,
 		};
 
-		mVertices = newVertices;	
+		vertexCoords_ = newVertices;	
 	}
 	
 	// update position
@@ -179,33 +201,39 @@
 		
 		float x1 = (x-transformAnchor.x);
 		float y1 = (y-transformAnchor.y);
-		float x2 = (x1 + mRect.size.width);
-		float y2 = (y1 + mRect.size.height);
+		float x2 = (x1 + rect_.size.width);
+		float y2 = (y1 + rect_.size.height);
 		ccQuad3 newVertices = {
-			x1,y1,0,
-			x2,y1,0,
-			x1,y2,0,
-			x2,y2,0,
+			(int)x1,(int)y1,0,
+			(int)x2,(int)y1,0,
+			(int)x1,(int)y2,0,
+			(int)x2,(int)y2,0,
 		};
 		
-		mVertices = newVertices;
+		vertexCoords_ = newVertices;
 	}
 
-	[mAtlas updateQuadWithTexture:&amp;mTexCoords vertexQuad:&amp;mVertices atIndex:mAtlasIndex];
+	[textureAtlas_ updateQuadWithTexture:&amp;texCoords_ vertexQuad:&amp;vertexCoords_ atIndex:atlasIndex_];
 	dirtyPosition = NO;
 	return;
 }
 
 -(void)updateAtlas
 {
-	[mAtlas updateQuadWithTexture:&amp;mTexCoords vertexQuad:&amp;mVertices atIndex:mAtlasIndex];
+	[textureAtlas_ updateQuadWithTexture:&amp;texCoords_ vertexQuad:&amp;vertexCoords_ atIndex:atlasIndex_];
+}
+
+-(void)insertInAtlasAtIndex:(NSUInteger)index
+{
+	atlasIndex_ = index;
+	[textureAtlas_ insertQuadWithTexture:&amp;texCoords_ vertexQuad:&amp;vertexCoords_ atIndex:atlasIndex_];
 }
 
 //
 // CocosNode property overloads
 //
 #pragma mark AltasSprite - property overloads
--(void)setPosition:(cpVect)pos
+-(void)setPosition:(CGPoint)pos
 {
 	[super setPosition:pos];
 	dirtyPosition = YES;
@@ -235,7 +263,7 @@
 	dirtyPosition = YES;
 }
 
--(void)setTransformAnchor:(cpVect)anchor
+-(void)setTransformAnchor:(CGPoint)anchor
 {
 	[super setTransformAnchor:anchor];
 	dirtyPosition = YES;
@@ -266,12 +294,12 @@
 //
 -(void) setOpacity:(GLubyte) anOpacity
 {
-	_opacity = anOpacity;
+	opacity_ = anOpacity;
 	dirtyColor = YES;
 }
 -(GLubyte)opacity
 {
-	return _opacity;
+	return opacity_;
 }
 
 //
@@ -279,22 +307,22 @@
 //
 -(void) setRGB: (GLubyte)r :(GLubyte)g :(GLubyte)b
 {
-	_r = r;
-	_g = g;
-	_b = b;
+	r_ = r;
+	g_ = g;
+	b_ = b;
 	dirtyColor = YES;
 }
 -(GLubyte) r
 {
-	return _r;
+	return r_;
 }
 -(GLubyte) g
 {
-	return _g;
+	return g_;
 }
 -(GLubyte) b
 {
-	return _b;
+	return b_;
 }
 
 //
@@ -302,7 +330,7 @@
 //
 -(CGSize)contentSize
 {
-	return mRect.size;
+	return rect_.size;
 }
 
 //
@@ -311,7 +339,9 @@
 -(void) setDisplayFrame:(id)newFrame
 {
 	AtlasSpriteFrame *frame = (AtlasSpriteFrame*)newFrame;
-	[self setTextureRect: [frame rect]];
+	CGRect rect = [frame rect];
+
+	[self setTextureRect: rect];	
 }
 
 -(void) setDisplayFrame: (NSString*) animationName index:(int) frameIndex
@@ -321,19 +351,24 @@
 	
 	AtlasAnimation *a = [animations objectForKey: animationName];
 	AtlasSpriteFrame *frame = [[a frames] objectAtIndex:frameIndex];
-	[self setTextureRect: [frame rect]];
+	
+	NSAssert( frame, @&quot;AtlasSprite#setDisplayFrame. Invalid frame&quot;);
+	CGRect rect = [frame rect];
+
+	[self setTextureRect: rect];
+	
 }
 
 -(BOOL) isFrameDisplayed:(id)frame 
 {
 	AtlasSpriteFrame *spr = (AtlasSpriteFrame*)frame;
 	CGRect r = [spr rect];
-	return CGRectEqualToRect(r, mRect);
+	return CGRectEqualToRect(r, rect_);
 }
 
 -(id) displayFrame
 {
-	return [AtlasSpriteFrame frameWithRect:mRect];
+	return [AtlasSpriteFrame frameWithRect:rect_];
 }
 // XXX: duplicated code. Sprite.m and AtlasSprite.m share this same piece of code
 -(void) addAnimation: (id&lt;CocosAnimation&gt;) anim
@@ -380,7 +415,7 @@
 	return [self initWithName:t delay:d firstFrame:nil vaList:nil];
 }
 
-/** initializes an AtlasAnimation with an AtlasSpriteManager, a name, and the frames from AtlasSpriteFrames */
+/* initializes an AtlasAnimation with an AtlasSpriteManager, a name, and the frames from AtlasSpriteFrames */
 -(id) initWithName:(NSString*)t delay:(float)d firstFrame:(AtlasSpriteFrame*)frame vaList:(va_list)args
 {
 	if( (self=[super init]) ) {</diff>
      <filename>Support/Cocos2d/cocos2d/AtlasSprite.m</filename>
    </modified>
    <modified>
      <diff>@@ -24,17 +24,16 @@
  * that belongs to this Manager. Use 1 AtlasSpriteManager per TextureAtlas
 *
  * Limitations:
- *  - The only object that is accepted as child is AtlasSprite
- *  - All it's children are Aliased or Antialiased. They can't be some Aliased and some Antialiased
- *  - All it's children will have the same z-order: 0
+ *  - The only object that is accepted as children are AtlasSprite
+ *  - It's children are all Aliased or all Antialiased. They can't be some Aliased and some Antialiased
  * 
  * @since v0.7.1
  */
 @interface AtlasSpriteManager : CocosNode
 {
 @private
-	unsigned int mTotalSprites;
-	TextureAtlas *mAtlas;
+	unsigned int totalSprites_;
+	TextureAtlas *textureAtlas_;
 }
 
 /** returns the TextureAtlas that is used */
@@ -54,7 +53,7 @@
 /** initializes an AtlasSpriteManager with a file image (.png, .jpeg, .pvr, etc) */
 -(id)initWithFile:(NSString*)fileImage capacity:(NSUInteger)capacity;
 
--(int)indexForNewChild;
+-(NSUInteger)indexForNewChildAtZ:(int)z;
 
 /** creates an sprite with a rect in the AtlasSpriteManage */
 -(AtlasSprite*) createSpriteWithRect:(CGRect)rect;</diff>
      <filename>Support/Cocos2d/cocos2d/AtlasSpriteManager.h</filename>
    </modified>
    <modified>
      <diff>@@ -27,23 +27,22 @@ const int defaultCapacity = 29;
 @implementation AtlasSprite (Remove)
 -(void)setIndex:(int)index
 {
-	mAtlasIndex = index;
-	[self updateAtlas];
-
-	if( mAtlas.withColorArray )
-		[self updateColor];
+	atlasIndex_ = index;
 }
 @end
 
+@interface AtlasSpriteManager (private)
+-(void) resizeAtlas;
+@end
 
 #pragma mark AtlasSpriteManager
 @implementation AtlasSpriteManager
 
-@synthesize atlas = mAtlas;
+@synthesize atlas = textureAtlas_;
 
 -(void)dealloc
 {	
-	[mAtlas release];
+	[textureAtlas_ release];
 
 	[super dealloc];
 }
@@ -81,8 +80,8 @@ const int defaultCapacity = 29;
 -(id)initWithTexture:(Texture2D *)tex capacity:(NSUInteger)capacity
 {
 	if( (self=[super init])) {
-		mTotalSprites = 0;
-		mAtlas = [[TextureAtlas alloc] initWithTexture:tex capacity:capacity];
+		totalSprites_ = 0;
+		textureAtlas_ = [[TextureAtlas alloc] initWithTexture:tex capacity:capacity];
 		
 		// no lazy alloc in this node
 		children = [[NSMutableArray alloc] initWithCapacity:capacity];
@@ -97,8 +96,8 @@ const int defaultCapacity = 29;
 -(id)initWithFile:(NSString *)fileImage capacity:(NSUInteger)capacity
 {
 	if( (self=[super init]) ) {
-		mTotalSprites = 0;
-		mAtlas = [[TextureAtlas alloc] initWithFile:fileImage capacity:capacity];
+		totalSprites_ = 0;
+		textureAtlas_ = [[TextureAtlas alloc] initWithFile:fileImage capacity:capacity];
 		
 		// no lazy alloc in this node
 		children = [[NSMutableArray alloc] initWithCapacity:capacity];
@@ -114,31 +113,44 @@ const int defaultCapacity = 29;
 // Don't call visit on it's children
 -(void) visit
 {
-	// don't iterate over it's children
-	// the only valid children are AtlasSprites
-	// and are drawn in the atlas
+
+	// CAREFUL:
+	// This visit is almost identical to CocosNode#visit
+	// with the exception that it doesn't call visit on it's children
+	//
+	// The alternative is to have a void AtlasSprite#visit, but this
+	// although is less mantainable, is faster
+	//
+	if (!visible)
+		return;
+	
+	glPushMatrix();
+	
+	if ( grid &amp;&amp; grid.active)
+		[grid beforeDraw];
+	
+	[self transform];
 	
 	[self draw];
+	
+	if ( grid &amp;&amp; grid.active)
+		[grid afterDraw:self.camera];
+	
+	glPopMatrix();
 }
 
--(int)indexForNewChild
+-(NSUInteger)indexForNewChildAtZ:(int)z
 {
-	// if we're going beyond the current TextureAtlas's capacity,
-	// all the previously initialized sprites will need to redo their texture coords
-	// this is likely computationally expensive
-	if(mTotalSprites == mAtlas.totalQuads)
-	{
-		CCLOG(@&quot;Resizing TextureAtlas capacity, from [%d] to [%d].&quot;, mAtlas.totalQuads, mAtlas.totalQuads * 3 / 2);
+	NSUInteger index = 0;
 
-		[mAtlas resizeCapacity:mAtlas.totalQuads * 3 / 2];
-		
-		for(AtlasSprite *sprite in children)
-		{
-			[sprite updateAtlas];
+	for( AtlasSprite *sprite in children) {
+		if ( sprite.zOrder &gt; z ) {
+			break;
 		}
+		index++;
 	}
-
-	return mTotalSprites;
+		
+	return index;
 }
 
 -(AtlasSprite*) createSpriteWithRect:(CGRect)rect
@@ -146,34 +158,88 @@ const int defaultCapacity = 29;
 	return [AtlasSprite spriteWithRect:rect spriteManager:self];
 }
 
-/*
- * override add:
- */
+// override addChild:
 -(id) addChild:(AtlasSprite*)child z:(int)z tag:(int) aTag
 {
+	NSAssert( child != nil, @&quot;Argument must be non-nil&quot;);
 	NSAssert( [child isKindOfClass:[AtlasSprite class]], @&quot;AtlasSpriteManager only supports AtlasSprites as children&quot;);
 	
-	[child setIndex: [self indexForNewChild] ];
-	[child updateAtlas];
+	if(totalSprites_ == textureAtlas_.capacity)
+		[self resizeAtlas];
+
+	NSUInteger index = [self indexForNewChildAtZ:z];
+	[child insertInAtlasAtIndex: index];
 
-	mTotalSprites++;
-	return [super addChild:child z:z tag:aTag];
+	if( textureAtlas_.withColorArray )
+		[child updateColor];
+
+	totalSprites_++;
+	[super addChild:child z:z tag:aTag];
+
+	NSUInteger count = [children count];
+	index++;
+	for(; index &lt; count; index++) {
+		AtlasSprite *sprite = (AtlasSprite *)[children objectAtIndex:index];
+		NSAssert([sprite atlasIndex] == index - 1, @&quot;AtlasSpriteManager: index failed&quot;);
+		[sprite setIndex:index];		
+	}
+	
+	return self;
 }
 
+// override removeChild:
 -(void)removeChild: (AtlasSprite *)sprite cleanup:(BOOL)doCleanup
 {
-	int index= sprite.atlasIndex;
+	// explicit nil handling
+	if (sprite == nil)
+		return;
+	// ignore non-children 
+	if( ![children containsObject:sprite] )
+		return;
+	
+	NSUInteger index= sprite.atlasIndex;
 	[super removeChild:sprite cleanup:doCleanup];
 
+	[textureAtlas_ removeQuadAtIndex:index];
+
 	// update all sprites beyond this one
-	int count = [children count];
+	NSUInteger count = [children count];
 	for(; index &lt; count; index++)
 	{
 		AtlasSprite *other = (AtlasSprite *)[children objectAtIndex:index];
 		NSAssert([other atlasIndex] == index + 1, @&quot;AtlasSpriteManager: index failed&quot;);
 		[other setIndex:index];
 	}	
-	mTotalSprites--;
+	totalSprites_--;
+}
+
+// override reorderChild
+-(void) reorderChild:(AtlasSprite*)child z:(int)z
+{
+	// reorder child in the children array
+	[super reorderChild:child z:z];
+
+	
+	// What's the new atlas index ?
+	NSUInteger newAtlasIndex = 0;
+	for( AtlasSprite *sprite in children) {
+		if( [sprite isEqual:child] )
+			break;
+		newAtlasIndex++;
+	}
+	
+	if( newAtlasIndex != child.atlasIndex ) {
+
+		[textureAtlas_ insertQuadFromIndex:child.atlasIndex atIndex:newAtlasIndex];
+		
+		// update atlas index
+		NSUInteger count = MAX( newAtlasIndex, child.atlasIndex);
+		NSUInteger index = MIN( newAtlasIndex, child.atlasIndex);
+		for( ; index &lt; count+1 ; index++ ) {
+			AtlasSprite *sprite = (AtlasSprite *)[children objectAtIndex:index];
+			[sprite setIndex: index];
+		}
+	}
 }
 
 -(void)removeChildAtIndex:(NSUInteger)index cleanup:(BOOL)doCleanup
@@ -184,7 +250,9 @@ const int defaultCapacity = 29;
 -(void)removeAllChildrenWithCleanup:(BOOL)doCleanup
 {
 	[super removeAllChildrenWithCleanup:doCleanup];
-	mTotalSprites = 0;
+	
+	totalSprites_ = 0;
+	[textureAtlas_ removeAllQuads];
 }
 
 #pragma mark AtlasSpriteManager - draw
@@ -198,25 +266,45 @@ const int defaultCapacity = 29;
 			[child updateColor];
 	}
 
-	if(mTotalSprites &gt; 0)
+	if(totalSprites_ &gt; 0)
 	{
 		glEnableClientState(GL_VERTEX_ARRAY);
 		glEnableClientState(GL_TEXTURE_COORD_ARRAY);
 		
-		if( mAtlas.withColorArray )
+		if( textureAtlas_.withColorArray )
 			glEnableClientState(GL_COLOR_ARRAY);
 
 		glEnable(GL_TEXTURE_2D);
 
-		[mAtlas drawNumberOfQuads:mTotalSprites];
+		[textureAtlas_ drawQuads];
 
 		glDisable(GL_TEXTURE_2D);
 
-		if( mAtlas.withColorArray )
+		if( textureAtlas_.withColorArray )
 			glDisableClientState(GL_COLOR_ARRAY);
 		glDisableClientState(GL_VERTEX_ARRAY);
 		glDisableClientState(GL_TEXTURE_COORD_ARRAY);
 	}
 }
 
+#pragma mark AtlasSpriteManager - private
+-(void) resizeAtlas
+{
+	// if we're going beyond the current TextureAtlas's capacity,
+	// all the previously initialized sprites will need to redo their texture coords
+	// this is likely computationally expensive
+	NSUInteger quantity = (textureAtlas_.totalQuads + 1) * 4 / 3;
+
+	CCLOG(@&quot;Resizing TextureAtlas capacity, from [%d] to [%d].&quot;, textureAtlas_.totalQuads, quantity);
+
+
+	if( ! [textureAtlas_ resizeCapacity:quantity] ) {
+		// serious problems
+		CCLOG(@&quot;WARNING: Not enough memory to resize the atlas&quot;);
+		NSAssert(NO,@&quot;XXX: AltasSpriteManager#resizeAtlas SHALL handle this assert&quot;);
+	}
+	
+	for(AtlasSprite *sprite in children)
+		[sprite updateAtlas];
+}
 @end</diff>
      <filename>Support/Cocos2d/cocos2d/AtlasSpriteManager.m</filename>
    </modified>
    <modified>
      <diff>@@ -60,8 +60,8 @@
 	angleX = x;
 	deltaAngleX = dx;
 
-	radDeltaZ = (cpFloat)CC_DEGREES_TO_RADIANS(dz);
-	radDeltaX = (cpFloat)CC_DEGREES_TO_RADIANS(dx);
+	radDeltaZ = (CGFloat)CC_DEGREES_TO_RADIANS(dz);
+	radDeltaX = (CGFloat)CC_DEGREES_TO_RADIANS(dx);
 	
 	return self;
 }
@@ -75,12 +75,12 @@
 	if( isnan(radius) )
 		radius = r;
 	if( isnan(angleZ) )
-		angleZ = (cpFloat)CC_RADIANS_TO_DEGREES(zenith);
+		angleZ = (CGFloat)CC_RADIANS_TO_DEGREES(zenith);
 	if( isnan(angleX) )
-		angleX = (cpFloat)CC_RADIANS_TO_DEGREES(azimuth);
+		angleX = (CGFloat)CC_RADIANS_TO_DEGREES(azimuth);
 
-	radZ = (cpFloat)CC_DEGREES_TO_RADIANS(angleZ);
-	radX = (cpFloat)CC_DEGREES_TO_RADIANS(angleX);
+	radZ = (CGFloat)CC_DEGREES_TO_RADIANS(angleZ);
+	radX = (CGFloat)CC_DEGREES_TO_RADIANS(angleX);
 }
 
 -(void) update: (ccTime) t
@@ -118,7 +118,7 @@
 
 	*zenith = acosf( z/r);
 	if( x &lt; 0 )
-		*azimuth= (cpFloat)M_PI - asinf(y/s);
+		*azimuth= (CGFloat)M_PI - asinf(y/s);
 	else
 		*azimuth = asinf(y/s);
 					</diff>
      <filename>Support/Cocos2d/cocos2d/CameraAction.m</filename>
    </modified>
    <modified>
      <diff>@@ -3,6 +3,7 @@
  * http://code.google.com/p/cocos2d-iphone
  *
  * Copyright (C) 2008,2009 Ricardo Quesada
+ * Copyright (C) 2009 Valentin Milea
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the 'cocos2d for iPhone' license.
@@ -12,12 +13,9 @@
  *
  */
 
-
 #import &lt;OpenGLES/ES1/gl.h&gt;
-#import &lt;UIKit/UIKit.h&gt;
 
 #import &quot;Action.h&quot;
-#import &quot;chipmunk.h&quot;
 #import &quot;cctypes.h&quot;
 
 enum {
@@ -71,7 +69,7 @@ enum {
 	float scaleY;
 	
 	// position of the node
-	cpVect position;
+	CGPoint position;
 	
 	// parallax X factor
 	float parallaxRatioX;
@@ -97,7 +95,7 @@ enum {
 	BOOL relativeTransformAnchor;
 	
 	// transformation anchor point
-	cpVect transformAnchor;
+	CGPoint transformAnchor;
 	
 	// array of children
 	NSMutableArray *children;
@@ -133,7 +131,7 @@ enum {
 /** The Y parallax ratio of the node. 1.0 is the default ratio */
 @property(readwrite,assign) float parallaxRatioX;
 /** Position (x,y) of the node in OpenGL coordinates. (0,0) is the left-bottom corner */
-@property(readwrite,assign) cpVect position;
+@property(readwrite,assign) CGPoint position;
 /** A Camera object that lets you move the node using camera coordinates.
  * If you use the Camera then position, scale &amp; rotation won't be used */
 @property(readonly) Camera* camera;
@@ -142,7 +140,7 @@ enum {
 /** Whether of not the node is visible. Default is YES */
 @property(readwrite,assign) BOOL visible;
 /** The transformation anchor point. For Sprite and Label the transform anchor point is (width/2, height/2) */
-@property(readwrite,assign) cpVect transformAnchor;
+@property(readwrite,assign) CGPoint transformAnchor;
 /** A weak reference to the parent */
 @property(readwrite,assign) CocosNode* parent;
 /** If YES the transformtions will be relative to (-transform.x, -transform.y).
@@ -194,7 +192,7 @@ enum {
  It returns self, so you can chain several addChilds.
  @since v0.7.1
  */
--(id) addChild: (CocosNode*)node z:(int)z parallaxRatio:(cpVect)c;
+-(id) addChild: (CocosNode*)node z:(int)z parallaxRatio:(CGPoint)c;
 
 // composition: ADD (deprecated)
 
@@ -213,7 +211,7 @@ enum {
 /** Adds a child to the container with a z-order and a parallax ratio
  @deprecated Will be removed in v0.8. Use addChild:z:tag:paralalxRatio instead
  */
--(id) add: (CocosNode*)node z:(int)z parallaxRatio:(cpVect)c __attribute__ ((deprecated));
+-(id) add: (CocosNode*)node z:(int)z parallaxRatio:(CGPoint)c __attribute__ ((deprecated));
 
 // composition: REMOVE
 
@@ -280,9 +278,9 @@ enum {
 
 /** Returns the absolute position of the CocosNode
  @deprecated Use convertToWorldSpace:CGPointZero instead. Will be removed in v0.8
- @return a cpVect value
+ @return a CGPoint value
  */
--(cpVect) absolutePosition __attribute__ ((deprecated));
+-(CGPoint) absolutePosition __attribute__ ((deprecated));
 
 /** Reorders a child according to a new z value.
  * The child MUST be already added.
@@ -299,9 +297,16 @@ enum {
 
 // transformations
 
-/** performs opengl view-matrix transformation based on position, scale, rotation and other attributes. */
+/** performs OpenGL view-matrix transformation based on position, scale, rotation and other attributes. */
 -(void) transform;
 
+/** performs OpenGL view-matrix transformation of it's ancestors.
+ Generally the ancestors are already transformed, but in certain cases (eg: attaching a FBO)
+ it's necessary to transform the ancestors again.
+ @since v0.7.2
+ */
+-(void) transformAncestors;
+
 
 // actions
 
@@ -309,7 +314,9 @@ enum {
  @deprecated Will be removed in v0.8. Use runAction instead
  */
 -(Action*) do: (Action*) action __attribute__ ((deprecated));
-/** Executes an action, and returns the action that is executed
+/** Executes an action, and returns the action that is executed.
+ The target will be retained.
+ @warning in v0.8 the target won't be retained anymore
  @since v0.7.1
  @return An Action pointer
  */
@@ -349,6 +356,41 @@ enum {
 -(void) schedule: (SEL) s interval:(ccTime)seconds;
 /** unschedule a selector */
 -(void) unschedule: (SEL) s;
+
+// transformation methods
+
+/// actual affine transforms used
+/// XXX: needs documentation
+/// @since v0.7.1
+- (CGAffineTransform)nodeToWorldTransform;
+/// XXX: needs documentation
+/// @since v0.7.1
+- (CGAffineTransform)worldToNodeTransform;
+/** converts a world coordinate to local coordinate
+ @since v0.7.1
+ */
+- (CGPoint)convertToNodeSpace:(CGPoint)worldPoint;
+/** converts local coordinate to world space
+ @since v0.7.1
+ */
+- (CGPoint)convertToWorldSpace:(CGPoint)nodePoint;
+/** converts a world coordinate to local coordinate
+ treating the returned/received node point as anchor relative
+ @since v0.7.1
+ */
+- (CGPoint)convertToNodeSpaceAR:(CGPoint)worldPoint;
+/** converts local coordinate to world space
+ treating the returned/received node point as anchor relative
+ @since v0.7.1
+ */
+- (CGPoint)convertToWorldSpaceAR:(CGPoint)nodePoint;
+// convenience methods which take a UITouch instead of CGPoint
+/// XXX: needs documentation
+/// @since v0.7.1
+- (CGPoint)convertTouchToNodeSpace:(UITouch *)touch;
+/// XXX: needs documentation
+/// @since v0.7.1
+- (CGPoint)convertTouchToNodeSpaceAR:(UITouch *)touch;
 @end
 
 //
@@ -356,7 +398,7 @@ enum {
 //
 
 /// CocosNode opacity protocol
-@protocol CocosNodeOpacity
+@protocol CocosNodeOpacity &lt;NSObject&gt;
 /// returns the opacity
 -(GLubyte) opacity;
 /// sets the opacity
@@ -365,14 +407,14 @@ enum {
 
 
 /// Size CocosNode protocol
-@protocol CocosNodeSize
+@protocol CocosNodeSize &lt;NSObject&gt;
 /// returns the size in pixels of the un-tranformted texture.
 -(CGSize) contentSize;
 @end
 
 
 /// Size CocosNode protocol
-@protocol CocosNodeRGB
+@protocol CocosNodeRGB &lt;NSObject&gt;
 /** set the color of the node.
  * example:  [node setRGB: 255:128:24];  or  [node setRGB:0xff:0x88:0x22];
  @since v0.7.1
@@ -389,7 +431,7 @@ enum {
 
 /// Objects that supports the Animation protocol
 /// @since v0.7.1
-@protocol CocosAnimation
+@protocol CocosAnimation &lt;NSObject&gt;
 /** reaonly array with the frames */
 -(NSArray*) frames;
 /** delay of the animations */
@@ -401,7 +443,7 @@ enum {
 
 /// Nodes supports frames protocol
 /// @since v0.7.1
-@protocol CocosNodeFrames
+@protocol CocosNodeFrames &lt;NSObject&gt;
 /** sets a new display frame to the node */
 -(void) setDisplayFrame:(id)newFrame;
 /** changes the display frame based on an animation and an index */
@@ -414,5 +456,10 @@ enum {
 -(id&lt;CocosAnimation&gt;)animationByName: (NSString*) animationName;
 /** adds an Animation to the Sprite */
 -(void) addAnimation: (id&lt;CocosAnimation&gt;) animation;
+/** whether or not the method 'setDisplayFrame' will auto center the frames or not
+ @deprecated Added only to fix issue #281. v0.8 will use relative transformAnchor point.
+ @since v0.7.2
+ */
+-(void) setAutoCenterFrames:(BOOL) autoCenterFrames;
 @end
 </diff>
      <filename>Support/Cocos2d/cocos2d/CocosNode.h</filename>
    </modified>
    <modified>
      <diff>@@ -3,6 +3,7 @@
  * http://code.google.com/p/cocos2d-iphone
  *
  * Copyright (C) 2008,2009 Ricardo Quesada
+ * Copyright (C) 2009 Valentin Milea
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the 'cocos2d for iPhone' license.
@@ -18,7 +19,14 @@
 #import &quot;Grid.h&quot;
 #import &quot;Scheduler.h&quot;
 #import &quot;ccMacros.h&quot;
+#import &quot;Director.h&quot;
+#import &quot;Support/CGPointExtension.h&quot;
 
+#if 1
+#define RENDER_IN_SUBPIXEL
+#else
+#define RENDER_IN_SUBPIXEL (int)
+#endif
 
 @interface CocosNode (Private)
 -(void) step_: (ccTime) dt;
@@ -59,7 +67,7 @@
 	
 	isRunning = NO;
 	
-	position = cpvzero;
+	position = CGPointZero;
 	
 	rotation = 0.0f;		// 0 degrees	
 	scaleX = 1.0f;			// scale factor
@@ -71,7 +79,7 @@
 	
 	visible = YES;
 
-	transformAnchor = cpvzero;
+	transformAnchor = CGPointZero;
 	
 	tag = kCocosNodeTagInvalid;
 	
@@ -132,7 +140,12 @@
 	[grid release];
 	
 	// children
-	[children makeObjectsPerformSelector:@selector(cleanup)];
+	
+	for (CocosNode *child in children) {
+		child.parent = nil;
+		[child cleanup];
+	}
+	
 	[children release];
 	
 	// timers
@@ -167,7 +180,7 @@
 	CCLOG(@&quot;add:z:tag: is deprecated. Use addChild:z:tag:&quot;);
 	return [self addChild:child z:z tag:aTag];
 }
-/* Add logic MUST only be on this selector
+/* &quot;add&quot; logic MUST only be on this selector
  * If a class want's to extend the 'addChild' behaviour it only needs
  * to override this selector
  */
@@ -190,12 +203,12 @@
 	return self;
 }
 
--(id) add: (CocosNode*) child z:(int)z parallaxRatio:(cpVect)c
+-(id) add: (CocosNode*) child z:(int)z parallaxRatio:(CGPoint)c
 {
 	CCLOG(@&quot;add:z:tag:parallaxRatio: is deprecated. Use addChild:z:parallaxRatio:&quot;);
 	return [self addChild:child z:z parallaxRatio:c];
 }
--(id) addChild: (CocosNode*) child z:(int)z parallaxRatio:(cpVect)c
+-(id) addChild: (CocosNode*) child z:(int)z parallaxRatio:(CGPoint)c
 {
 	NSAssert( child != nil, @&quot;Argument must be non-nil&quot;);
 	child.parallaxRatioX = c.x;
@@ -237,7 +250,7 @@
 	CCLOG(@&quot;removeAndStop: is deprecated. Use removeChild:cleanup:&quot;);
 	return [self removeChild:child cleanup:YES];
 }
-/* Remove logic MUST only be on this selector
+/* &quot;remove&quot; logic MUST only be on this selector
  * If a class want's to extend the 'removeChild' behaviour it only needs
  * to override this selector
  */
@@ -274,7 +287,6 @@
 }
 
 -(void) removeAll
-
 {
 	CCLOG(@&quot;removeAll is deprecated. Use removeAllChildrenWithCleanup:&quot;);
 	return [self removeAllChildrenWithCleanup:NO];
@@ -316,15 +328,15 @@
 	return nil;
 }
 
--(cpVect) absolutePosition
+-(CGPoint) absolutePosition
 {
-	cpVect ret = position;
+	CGPoint ret = position;
 	
 	CocosNode *cn = self;
 	
 	while (cn.parent != nil) {
 		cn = cn.parent;
-		ret = cpvadd( ret,  cn.position );
+		ret = ccpAdd( ret,  cn.position );
 	}
 	
 	return ret;
@@ -389,6 +401,8 @@
 -(void) draw
 {
 	// override me
+	// Only use this function to draw your staff.
+	// DON'T draw your stuff outside this method
 }
 
 -(void) visit
@@ -398,8 +412,10 @@
 	
 	glPushMatrix();
 	
-	if ( grid &amp;&amp; grid.active)
+	if ( grid &amp;&amp; grid.active) {
 		[grid beforeDraw];
+		[self transformAncestors];
+	}
 	
 	[self transform];
 	
@@ -425,6 +441,14 @@
 
 #pragma mark CocosNode - Transformations
 
+-(void) transformAncestors
+{
+	if( self.parent ) {
+		[self.parent transformAncestors];
+		[self.parent transform];
+	}
+}
+
 -(void) transform
 {
 	if ( !(grid &amp;&amp; grid.active) )
@@ -433,7 +457,7 @@
 	float parallaxOffsetX = 0;
 	float parallaxOffsetY = 0;
 	
-	// XXX: Parallax code should be moved to a ParallaxNode node
+	// XXX: In v0.8 parallax code will be moved to a ParallaxNode node
 	if( (parallaxRatioX != 1.0f || parallaxRatioY != 1.0) &amp;&amp; parent ) {
 		parallaxOffsetX = -parent.position.x + parent.position.x * parallaxRatioX;
 		parallaxOffsetY = -parent.position.y + parent.position.y * parallaxRatioY;		
@@ -443,12 +467,12 @@
 	
 	// transalte
 	if ( relativeTransformAnchor &amp;&amp; (transformAnchor.x != 0 || transformAnchor.y != 0 ) )
-		glTranslatef( -transformAnchor.x + parallaxOffsetX, -transformAnchor.y + parallaxOffsetY, 0);
+		glTranslatef( RENDER_IN_SUBPIXEL(-transformAnchor.x + parallaxOffsetX), RENDER_IN_SUBPIXEL(-transformAnchor.y + parallaxOffsetY), 0);
 	
 	if (transformAnchor.x != 0 || transformAnchor.y != 0 )
-		glTranslatef( position.x + transformAnchor.x + parallaxOffsetX, position.y + transformAnchor.y + parallaxOffsetY, 0);
+		glTranslatef( RENDER_IN_SUBPIXEL(position.x + transformAnchor.x + parallaxOffsetX), RENDER_IN_SUBPIXEL(position.y + transformAnchor.y + parallaxOffsetY), 0);
 	else if ( position.x !=0 || position.y !=0 || parallaxOffsetX != 0 || parallaxOffsetY != 0)
-		glTranslatef( position.x + parallaxOffsetX, position.y + parallaxOffsetY, 0 );
+		glTranslatef( RENDER_IN_SUBPIXEL(position.x + parallaxOffsetX), RENDER_IN_SUBPIXEL(position.y + parallaxOffsetY), 0 );
 	
 	// rotate
 	if (rotation != 0.0f )
@@ -460,7 +484,7 @@
 	
 	// restore and re-position point
 	if (transformAnchor.x != 0.0f || transformAnchor.y != 0.0f)
-		glTranslatef(-transformAnchor.x + parallaxOffsetX, -transformAnchor.y + parallaxOffsetY, 0);
+		glTranslatef(RENDER_IN_SUBPIXEL(-transformAnchor.x + parallaxOffsetX), RENDER_IN_SUBPIXEL(-transformAnchor.y + parallaxOffsetY), 0);
 }
 
 -(float) scale
@@ -498,24 +522,22 @@
 
 -(void) onEnter
 {
-	isRunning = YES;
-	
-	
 	for( id child in children )
 		[child onEnter];
 	
 	[self activateTimers];
+
+	isRunning = YES;
 }
 
 -(void) onExit
 {
-	isRunning = NO;
-	
 	[self deactivateTimers];
+
+	isRunning = NO;	
 	
 	for( id child in children )
 		[child onExit];
-	
 }
 
 #pragma mark CocosNode Actions
@@ -549,11 +571,15 @@
 {
 	NSAssert( action != nil, @&quot;Argument must be non-nil&quot;);
 	
-#ifdef DEBUG
-	if ( [actions containsObject:action] || [actionsToAdd containsObject:action] ) {
-		CCLOG(@&quot;WARNING: action already scheduled.&quot;);
+	NSAssert( ![actionsToAdd containsObject:action], @&quot;Action already sheduled to run&quot;);
+	
+	if ( [actions containsObject:action] ) {
+		NSAssert( [actionsToRemove containsObject:action], @&quot;Action already running&quot;);
+		[actionsToRemove removeObject:action];
+		
+		CCLOG(@&quot;runAction: Action saved from removal&quot;);
+		return action;
 	}
-#endif
 	
 	action.target = self;
 	[action start];
@@ -578,43 +604,39 @@
 
 -(void) stopAction: (Action*) action
 {
-	if( [actionsToRemove containsObject:action] )
-		CCLOG(@&quot;stopAction: action already scheduled for removal!&quot;);
-
-	else if( [actions containsObject:action] )
-		[actionsToRemove addObject:action];
-	
-	else if( [actionsToAdd containsObject:action] )
+	if( [actionsToAdd containsObject:action] )
 		[actionsToAdd removeObject:action];
+	
+	else if( [actions containsObject:action] ) {
+		if( ![actionsToRemove containsObject:action] )
+			[actionsToRemove addObject:action];
+		else
+			CCLOG(@&quot;stopAction: Action already scheduled for removal!&quot;);
+	}
 	else
-		CCLOG(@&quot;stopAction: action not found!&quot;);
+		CCLOG(@&quot;stopAction: Action not found!&quot;);
 }
 
 -(void) stopActionByTag:(int) aTag
 {
 	NSAssert( aTag != kActionTagInvalid, @&quot;Invalid tag&quot;);
 	
-	for( Action *a in actionsToRemove ) {
+	// is going to be added ?
+	for( Action *a in actionsToAdd ) {
 		if( a.tag == aTag ) {
-			CCLOG(@&quot;stopActionByTag: action already scheduled for removal!&quot;);
-			return; 
+			[actionsToAdd removeObject:a];
+			return;
 		}
 	}
 	// is running ?
 	for( Action *a in actions ) {
-		if( a.tag == aTag ) {
+		if( a.tag == aTag &amp;&amp; ![actionsToRemove containsObject:a] ) {
 			[actionsToRemove addObject:a];
 			return; 
 		}
 	}
-	// is going to be added ?
-	for( Action *a in actionsToAdd ) {
-		if( a.tag == aTag ) {
-			[actionsToAdd removeObject:a];
-			return;
-		}
-	}
-	CCLOG(@&quot;stopActionByTag: action not found!&quot;);
+	
+	CCLOG(@&quot;stopActionByTag: Action not running or already scheduled for removal!&quot;);
 }
 
 -(Action*) getActionByTag:(int) aTag
@@ -623,7 +645,7 @@
 	
 	for( Action *a in actionsToRemove ) {
 		if( a.tag == aTag ) {
-			CCLOG(@&quot;getActionByTag: action unavailable, scheduled for removal!&quot;);
+			CCLOG(@&quot;getActionByTag: Action unavailable, scheduled for removal!&quot;);
 			return nil; 
 		}
 	}
@@ -639,7 +661,7 @@
 			return a;
 	}
 
-	CCLOG(@&quot;getActionByTag: action not found&quot;);
+	CCLOG(@&quot;getActionByTag: Action not found&quot;);
 	return nil;
 }
 
@@ -681,8 +703,8 @@
 	// b. Retain actions array before loop, release it after loop. Only 1 retain,
 	//    slightly better performance when there are many actions. Need to keep original
 	//    value because actions might get nullified and you don't want [nil release].
-	
-	[actions retain];
+
+	id actionsBackup = [actions retain];
 	
 	// call all actions
 	for( Action *action in actions ) {
@@ -699,7 +721,7 @@
 		}
 	}
 	
-	[actions release];
+	[actionsBackup release];
 }
 
 #pragma mark CocosNode Timers 
@@ -765,4 +787,74 @@
 	for( id key in scheduledSelectors )
 		[[Scheduler sharedScheduler] unscheduleTimer: [scheduledSelectors objectForKey:key]];
 }
+
+
+#pragma mark CocosNode Transform
+
+- (CGAffineTransform)nodeToWorldTransform
+{
+	CGAffineTransform t = CGAffineTransformIdentity;
+	
+	if (parent != nil) {
+		t = [parent nodeToWorldTransform];
+	}
+	
+	if (!relativeTransformAnchor) {
+		t = CGAffineTransformTranslate(t, transformAnchor.x, transformAnchor.y);
+	}
+	
+	t = CGAffineTransformTranslate(t, position.x, position.y);
+	t = CGAffineTransformRotate(t, -CC_DEGREES_TO_RADIANS(rotation));
+	t = CGAffineTransformScale(t, scaleX, scaleY);
+	
+	t = CGAffineTransformTranslate(t, -transformAnchor.x, -transformAnchor.y);
+	
+	return t;
+}
+
+- (CGAffineTransform)worldToNodeTransform
+{
+	return CGAffineTransformInvert([self nodeToWorldTransform]);
+}
+
+- (CGPoint)convertToNodeSpace:(CGPoint)worldPoint
+{
+	return CGPointApplyAffineTransform(worldPoint, [self worldToNodeTransform]);
+}
+
+- (CGPoint)convertToWorldSpace:(CGPoint)nodePoint
+{
+	return CGPointApplyAffineTransform(nodePoint, [self nodeToWorldTransform]);
+}
+
+- (CGPoint)convertToNodeSpaceAR:(CGPoint)worldPoint
+{
+	CGPoint nodePoint = [self convertToNodeSpace:worldPoint];
+	nodePoint.x -= transformAnchor.x;
+	nodePoint.y -= transformAnchor.y;
+	return nodePoint;
+}
+
+- (CGPoint)convertToWorldSpaceAR:(CGPoint)nodePoint
+{
+	nodePoint.x += transformAnchor.x;
+	nodePoint.y += transformAnchor.y;
+	return [self convertToWorldSpace:nodePoint];
+}
+
+// convenience methods which take a UITouch instead of CGPoint
+
+- (CGPoint)convertTouchToNodeSpace:(UITouch *)touch
+{
+	CGPoint point = [touch locationInView: [touch view]];
+	point = [[Director sharedDirector] convertCoordinate: point];
+	return [self convertToNodeSpace:point];
+}
+
+- (CGPoint)convertTouchToNodeSpaceAR:(UITouch *)touch
+{
+	CGPoint point = [touch locationInView: [touch view]];
+	point = [[Director sharedDirector] convertCoordinate: point];
+	return [self convertToNodeSpaceAR:point];
+}
 @end</diff>
      <filename>Support/Cocos2d/cocos2d/CocosNode.m</filename>
    </modified>
    <modified>
      <diff>@@ -53,15 +53,15 @@ and when to execute the Scenes
 */
 @interface Director : NSObject &lt;EAGLTouchDelegate&gt;
 {
-	EAGLView	*_openGLView;
+	EAGLView	*openGLView_;
 
 	// internal timer
 	NSTimer *animationTimer;
 	NSTimeInterval animationInterval;
 	NSTimeInterval oldAnimationInterval;
 
-	tPixelFormat _pixelFormat;
-	tDepthBufferFormat _depthBufferFormat;
+	tPixelFormat pixelFormat_;
+	tDepthBufferFormat depthBufferFormat_;
 
 	/* landscape mode ? */
 	BOOL landscape;
@@ -78,31 +78,32 @@ and when to execute the Scenes
 	/* is the running scene paused */
 	BOOL paused;
 	
-	/* running scene */
-	Scene *runningScene;
+	/* The running scene */
+	Scene *runningScene_;
 	
-	/* will be the next 'runningScene' in the next frame */
+	/* will be the next 'runningScene' in the next frame
+	 nextScene is a weak reference. */
 	Scene *nextScene;
 	
 	/* event handler */
 	NSMutableArray	*eventHandlers;
 
 	/* scheduled scenes */
-	NSMutableArray *scenes;
+	NSMutableArray *scenesStack_;
 	
 	/* last time the main loop was updated */
 	struct timeval lastUpdate;
 	/* delta time since last tick to main loop */
 	ccTime dt;
 	/* whether or not the next delta time will be zero */
-	BOOL _nextDeltaTimeZero;
+	BOOL nextDeltaTimeZero_;
 	
 	/* are touch events enabled. Default is YES */
 	BOOL eventsEnabled;
 }
 
 /** The current running Scene. Director can only run one Scene at the time */
-@property (readonly, assign) Scene* runningScene;
+@property (readonly) Scene* runningScene;
 /** The FPS value */
 @property (readwrite, assign) NSTimeInterval animationInterval;
 /** Whether or not to display the FPS on the bottom-left corner */
@@ -129,13 +130,13 @@ and when to execute the Scenes
 
 /** change default pixel format.
  Call this class method before attaching it to a UIWindow/UIView
- Default pixel format: RGB565. Supported pixel formats: RGBA8 and RGB565
+ Default pixel format: kRGB565. Supported pixel formats: kRGBA8 and kRGB565
  */
 -(void) setPixelFormat: (tPixelFormat) p;
 
 /** change depth buffer format.
  Call this class method before attaching it to a UIWindow/UIView
- Default depth buffer: 0 (none).  Supported: DepthBufferNone, DepthBuffer16, and DepthBuffer24
+ Default depth buffer: 0 (none).  Supported: kDepthBufferNone, kDepthBuffer16, and kDepthBuffer24
  */
 -(void) setDepthBufferFormat: (tDepthBufferFormat) db;
 </diff>
      <filename>Support/Cocos2d/cocos2d/Director.h</filename>
    </modified>
    <modified>
      <diff>@@ -27,6 +27,7 @@
 #import &quot;Support/glu.h&quot;
 #import &quot;Support/OpenGL_Internal.h&quot;
 #import &quot;Support/Texture2D.h&quot;
+#import &quot;Support/CGPointExtension.h&quot;
 
 #import &quot;Layer.h&quot;
 
@@ -54,11 +55,11 @@
 @implementation Director
 
 @synthesize animationInterval;
-@synthesize runningScene;
+@synthesize runningScene = runningScene_;
 @synthesize displayFPS, eventsEnabled;
-@synthesize openGLView=_openGLView;
-@synthesize pixelFormat=_pixelFormat;
-@synthesize nextDeltaTimeZero=_nextDeltaTimeZero;
+@synthesize openGLView=openGLView_;
+@synthesize pixelFormat=pixelFormat_;
+@synthesize nextDeltaTimeZero=nextDeltaTimeZero_;
 
 //
 // singleton stuff
@@ -104,17 +105,16 @@ static Director *_sharedDirector = nil;
 	//Create a full-screen window
 
 	// default values
-	_pixelFormat = kRGB565;
-	_depthBufferFormat = 0;
+	pixelFormat_ = kRGB565;
+	depthBufferFormat_ = 0;
 
 	// scenes
-	runningScene = nil;
+	runningScene_ = nil;
 	nextScene = nil;
-	scenes = [[NSMutableArray arrayWithCapacity:10] retain];
 	
 	oldAnimationInterval = animationInterval = 1.0 / kDefaultFPS;
 	eventHandlers = [[NSMutableArray arrayWithCapacity:8] retain];
-	
+	scenesStack_ = [[NSMutableArray arrayWithCapacity:10] retain];
 	
 	// landscape
 	landscape = NO;
@@ -140,16 +140,16 @@ static Director *_sharedDirector = nil;
 	[FPSLabel release];
 #endif
 	[eventHandlers release];
-	[runningScene release];
-	[scenes release];
+	[runningScene_ release];
+	[scenesStack_ release];
 	
 	[super dealloc];
 }
 
 -(void) initGLDefaultValues
 {
-	// This method SHOULD be called only after _openGLview was initialized
-	NSAssert( _openGLView, @&quot;_openGLView must be initialized&quot;);
+	// This method SHOULD be called only after openGLView_ was initialized
+	NSAssert( openGLView_, @&quot;openGLView_ must be initialized&quot;);
 
 	[self setAlphaBlending: YES];
 	[self setDepthTest: YES];
@@ -189,14 +189,14 @@ static Director *_sharedDirector = nil;
 	[self applyLandscape];
 	
 	/* draw the scene */
-	[runningScene visit];
+	[runningScene_ visit];
 	if( displayFPS )
 		[self showFPS];
 	
 		glPopMatrix();
 	
 	/* swap buffers */
-	[_openGLView swapBuffers];	
+	[openGLView_ swapBuffers];	
 }
 
 -(void) calculateDeltaTime
@@ -212,9 +212,9 @@ static Director *_sharedDirector = nil;
 	}
 	
 	// new delta time
-	if( _nextDeltaTimeZero ) {
+	if( nextDeltaTimeZero_ ) {
 		dt = 0;
-		_nextDeltaTimeZero = NO;
+		nextDeltaTimeZero_ = NO;
 	} else {
 		dt = (now.tv_sec - lastUpdate.tv_sec) + (now.tv_usec - lastUpdate.tv_usec) / 1000000.0f;
 		dt = MAX(0,dt);
@@ -235,7 +235,7 @@ static Director *_sharedDirector = nil;
 		@throw myException;		
 	}
 	
-	_pixelFormat = format;
+	pixelFormat_ = format;
 }
 
 -(void) setDepthBufferFormat: (tDepthBufferFormat) format
@@ -248,7 +248,7 @@ static Director *_sharedDirector = nil;
 		@throw myException;		
 	}
 
-   _depthBufferFormat = format;
+   depthBufferFormat_ = format;
 }
 
 #pragma mark Director Scene OpenGL Helper
@@ -263,7 +263,7 @@ static Director *_sharedDirector = nil;
 {
 	glMatrixMode(GL_PROJECTION);
 	glLoadIdentity();
-	glOrthof(0, _openGLView.frame.size.width, 0, _openGLView.frame.size.height, -1, 1);
+	glOrthof(0, openGLView_.frame.size.width, 0, openGLView_.frame.size.height, -1, 1);
 	glMatrixMode(GL_MODELVIEW);
 	glLoadIdentity();
 }
@@ -271,15 +271,15 @@ static Director *_sharedDirector = nil;
 // set a 3d projection matrix
 -(void)set3Dprojection
 {
-	glViewport(0, 0, _openGLView.frame.size.width, _openGLView.frame.size.height);
+	glViewport(0, 0, openGLView_.frame.size.width, openGLView_.frame.size.height);
 	glMatrixMode(GL_PROJECTION);
 	glLoadIdentity();
-	gluPerspective(60, (GLfloat)_openGLView.frame.size.width/_openGLView.frame.size.height, 0.5f, 1500.0f);
+	gluPerspective(60, (GLfloat)openGLView_.frame.size.width/openGLView_.frame.size.height, 0.5f, 1500.0f);
 	
 	glMatrixMode(GL_MODELVIEW);	
 	glLoadIdentity();
-	gluLookAt( _openGLView.frame.size.width/2, _openGLView.frame.size.height/2, [Camera getZEye],
-			  _openGLView.frame.size.width/2, _openGLView.frame.size.height/2, 0,
+	gluLookAt( openGLView_.frame.size.width/2, openGLView_.frame.size.height/2, [Camera getZEye],
+			  openGLView_.frame.size.width/2, openGLView_.frame.size.height/2, 0,
 			  0.0f, 1.0f, 0.0f);
 }
 
@@ -316,7 +316,7 @@ static Director *_sharedDirector = nil;
 // is the view currently attached
 -(BOOL)isOpenGLAttached
 {
-	return ([_openGLView superview]!=nil);
+	return ([openGLView_ superview]!=nil);
 }
 
 // detach or attach to a view or a window
@@ -336,7 +336,7 @@ static Director *_sharedDirector = nil;
 	}
 	
 	// remove from the superview
-	[_openGLView removeFromSuperview];
+	[openGLView_ removeFromSuperview];
 	
 	// check if the view is not attached anymore
 	if(![self isOpenGLAttached])
@@ -356,7 +356,7 @@ static Director *_sharedDirector = nil;
 
 -(BOOL)attachInWindow:(UIWindow *)window
 {
-	if([self initOpenGLViewWithView:window withFrame:[window frame]])
+	if([self initOpenGLViewWithView:window withFrame:[window bounds]])
 	{
 		return YES;
 	}
@@ -366,7 +366,7 @@ static Director *_sharedDirector = nil;
 
 -(BOOL)attachInView:(UIView *)view
 {
-	if([self initOpenGLViewWithView:view withFrame:[view frame]])
+	if([self initOpenGLViewWithView:view withFrame:[view bounds]])
 	{
 		return YES;
 	}
@@ -400,25 +400,25 @@ static Director *_sharedDirector = nil;
 	}
 	
 	// check if the view is not initialized
-	if(!_openGLView)
+	if(!openGLView_)
 	{
 		// define the pixel format
 		NSString	*pFormat = kEAGLColorFormatRGB565;
 	    GLuint		depthFormat = 0;
 		
-		if(_pixelFormat==kRGBA8)
+		if(pixelFormat_==kRGBA8)
 			pFormat = kEAGLColorFormatRGBA8;
 		
-		if(_depthBufferFormat == kDepthBuffer16)
+		if(depthBufferFormat_ == kDepthBuffer16)
 			depthFormat = GL_DEPTH_COMPONENT16_OES;
-		else if(_depthBufferFormat == kDepthBuffer24)
+		else if(depthBufferFormat_ == kDepthBuffer24)
 			depthFormat = GL_DEPTH_COMPONENT24_OES;
 		
 		// alloc and init the opengl view
-		_openGLView = [[EAGLView alloc] initWithFrame:rect pixelFormat:pFormat depthFormat:depthFormat preserveBackbuffer:NO];
+		openGLView_ = [[EAGLView alloc] initWithFrame:rect pixelFormat:pFormat depthFormat:depthFormat preserveBackbuffer:NO];
 		
 		// check if the view was alloced and initialized
-		if(!_openGLView)
+		if(!openGLView_)
 		{
 			// the view was not created
 			NSException* myException = [NSException
@@ -431,41 +431,41 @@ static Director *_sharedDirector = nil;
 		}
 		
 		// set autoresizing enabled when attaching the glview to another view
-		[_openGLView setAutoresizesEAGLSurface:YES];
+		[openGLView_ setAutoresizesEAGLSurface:YES];
 		
 		// set the touch delegate of the glview to self
-		[_openGLView setTouchDelegate:self];
+		[openGLView_ setTouchDelegate:self];
 	}
 	else
 	{
 		// set the (new) frame of the glview
-		[_openGLView setFrame:rect];
+		[openGLView_ setFrame:rect];
 	}
 	
 	// check if the superview has touchs enabled and enable it in our view
 	if([view isUserInteractionEnabled])
 	{
-		[_openGLView setUserInteractionEnabled:YES];
+		[openGLView_ setUserInteractionEnabled:YES];
 		[self setEventsEnabled:YES];
 	}
 	else
 	{
-		[_openGLView setUserInteractionEnabled:NO];
+		[openGLView_ setUserInteractionEnabled:NO];
 		[self setEventsEnabled:NO];
 	}
 	
 	// check if multi touches are enabled and set them
 	if([view isMultipleTouchEnabled])
 	{
-		[_openGLView setMultipleTouchEnabled:YES];
+		[openGLView_ setMultipleTouchEnabled:YES];
 	}
 	else
 	{
-		[_openGLView setMultipleTouchEnabled:NO];
+		[openGLView_ setMultipleTouchEnabled:NO];
 	}
 	
 	// add the glview to his (new) superview
-	[view addSubview:_openGLView];
+	[view addSubview:openGLView_];
 	
 	// set the background color of the glview
 	//	[backgroundColor setOpenGLClearColor];
@@ -492,9 +492,9 @@ static Director *_sharedDirector = nil;
 // convert a coordinate from uikit to opengl
 -(CGPoint)convertCoordinate:(CGPoint)p
 {
-	int newY = _openGLView.frame.size.height - p.y;
+	int newY = openGLView_.frame.size.height - p.y;
 	
-	CGPoint ret = CGPointMake( p.x, newY );
+	CGPoint ret = ccp( p.x, newY );
 	if( ! landscape )
 	{
 		ret = ret;
@@ -506,7 +506,7 @@ static Director *_sharedDirector = nil;
 		ret.y = p.x;
 #else
 		ret.x = p.y;
-		ret.y = _openGLView.frame.size.width -p.x;
+		ret.y = openGLView_.frame.size.width -p.x;
 #endif // LANDSCAPE_LEFT
 	}
 	
@@ -516,11 +516,11 @@ static Director *_sharedDirector = nil;
 // get the current size of the glview
 -(CGSize)winSize
 {
-	CGSize s = _openGLView.frame.size;
+	CGSize s = openGLView_.frame.size;
 	if( landscape ) {
 		// swap x,y in landscape mode
-		s.width = _openGLView.frame.size.height;
-		s.height = _openGLView.frame.size.width;
+		s.width = openGLView_.frame.size.height;
+		s.height = openGLView_.frame.size.width;
 	}
 	return s;
 }
@@ -528,7 +528,7 @@ static Director *_sharedDirector = nil;
 // return  the current frame size
 -(CGSize)displaySize
 {
-	return _openGLView.frame.size;
+	return openGLView_.frame.size;
 }
 
 - (BOOL) landscape
@@ -574,10 +574,9 @@ static Director *_sharedDirector = nil;
 - (void)runWithScene:(Scene*) scene
 {
 	NSAssert( scene != nil, @&quot;Argument must be non-nil&quot;);
-	NSAssert( runningScene == nil, @&quot;You can't run an scene if another Scene is running. Use replaceScene or pushScene instead&quot;);
-		
-//	[self pushScene: scene];
-	[self replaceScene: scene];
+	NSAssert( runningScene_ == nil, @&quot;You can't run an scene if another Scene is running. Use replaceScene or pushScene instead&quot;);
+	
+	[self pushScene:scene];
 	[self startAnimation];
 }
 
@@ -585,45 +584,48 @@ static Director *_sharedDirector = nil;
 {
 	NSAssert( scene != nil, @&quot;Argument must be non-nil&quot;);
 
-	nextScene = [scene retain];
+	NSUInteger index = [scenesStack_ count];
+
+	[scenesStack_ replaceObjectAtIndex:index-1 withObject:scene];
+	nextScene = scene;	// nextScene is a weak ref
 }
 
 - (void) pushScene: (Scene*) scene
 {
 	NSAssert( scene != nil, @&quot;Argument must be non-nil&quot;);
-	NSAssert( runningScene != nil, @&quot;A running Scene is needed&quot;);
 
-	[scenes addObject: runningScene];
-	nextScene = [scene retain];		// retained twice
+	[scenesStack_ addObject: scene];
+	nextScene = scene;	// nextScene is a weak ref
 }
 
 -(void) popScene
 {	
-	NSAssert( runningScene != nil, @&quot;A running Scene is needed&quot;);
+	NSAssert( runningScene_ != nil, @&quot;A running Scene is needed&quot;);
 
-	int c = [scenes count];
+	[scenesStack_ removeLastObject];
+	NSUInteger c = [scenesStack_ count];
+	
 	if( c == 0 ) {
 		[self end];
 	} else {
-		nextScene = [[scenes objectAtIndex:c-1] retain];
-		[scenes removeLastObject];
+		nextScene = [scenesStack_ objectAtIndex:c-1];
 	}
 }
 
 -(void) end
 {
-	[scenes release];
-	scenes = nil;
+	// remove all objects, but don't release it.
+	// runWithScene might be executed after 'end'.
+	[scenesStack_ removeAllObjects];
 
-	[runningScene onExit];
-	[runningScene release];
-	runningScene = nil;
-	[self stopAnimation];
+	[runningScene_ onExit];
+	[runningScene_ release];
+	runningScene_ = nil;
+	nextScene = nil;
 
 	// don't release the event handlers
 	// They are needed in case the director is run again
-//	[eventHandlers release];
-//	eventHandlers = nil;
+	[eventHandlers removeAllObjects];
 
 	[self stopAnimation];
 	[self detach];
@@ -638,13 +640,13 @@ static Director *_sharedDirector = nil;
 
 -(void) setNextScene
 {
-	[runningScene onExit];
-	[runningScene release];
-	
-	[nextScene onEnter];
-	runningScene = nextScene;
+	[runningScene_ onExit];
+	[runningScene_ release];
 	
+	runningScene_ = [nextScene retain];
 	nextScene = nil;
+
+	[runningScene_ onEnter];
 }
 
 -(void) pause
@@ -835,7 +837,7 @@ static Director *_sharedDirector = nil;
 	glEnableClientState( GL_TEXTURE_COORD_ARRAY );
 	
 	glColor4ub(224,224,244,200);
-	[texture drawAtPoint: CGPointMake(5,2)];
+	[texture drawAtPoint: ccp(5,2)];
 	[texture release];
 	
 	glDisable(GL_TEXTURE_2D);</diff>
      <filename>Support/Cocos2d/cocos2d/Director.m</filename>
    </modified>
    <modified>
      <diff>@@ -29,14 +29,14 @@
 	int			reuseGrid;
 	ccGridSize	gridSize;
 	Texture2D *	texture;
-	cpVect		step;
+	CGPoint		step;
 	Grabber *	grabber;
 }
 
 @property BOOL active;
 @property int reuseGrid;
 @property (readonly) ccGridSize gridSize;
-@property cpVect step;
+@property CGPoint step;
 @property (nonatomic, retain) Texture2D *texture;
 @property (nonatomic, retain) Grabber *grabber;
 </diff>
      <filename>Support/Cocos2d/cocos2d/Grid.h</filename>
    </modified>
    <modified>
      <diff>@@ -19,6 +19,7 @@
 #import &quot;Grabber.h&quot;
 
 #import &quot;Support/glu.h&quot;
+#import &quot;Support/CGPointExtension.h&quot;
 
 @implementation GridBase
 
@@ -214,7 +215,7 @@
 	
 	vertices = malloc((gridSize.x+1)*(gridSize.y+1)*sizeof(ccVertex3D));
 	originalVertices = malloc((gridSize.x+1)*(gridSize.y+1)*sizeof(ccVertex3D));
-	texCoordinates = malloc((gridSize.x+1)*(gridSize.y+1)*sizeof(cpVect));
+	texCoordinates = malloc((gridSize.x+1)*(gridSize.y+1)*sizeof(CGPoint));
 	indices = malloc(gridSize.x*gridSize.y*sizeof(GLushort)*6);
 	
 	float *vertArray = (float*)vertices;
@@ -264,7 +265,7 @@
 			ccVertex3D l2[4] = { e, f, g, h };
 			
 			int tex1[4] = { a*2, b*2, c*2, d*2 };
-			cpVect tex2[4] = { cpv(x1,y1), cpv(x2,y1), cpv(x2,y2), cpv(x1,y2) };
+			CGPoint tex2[4] = { ccp(x1,y1), ccp(x2,y1), ccp(x2,y2), ccp(x1,y2) };
 			
 			for( i = 0; i &lt; 4; i++ )
 			{</diff>
      <filename>Support/Cocos2d/cocos2d/Grid.m</filename>
    </modified>
    <modified>
      <diff>@@ -58,21 +58,21 @@
 /** Lens3D action */
 @interface Lens3D : Grid3DAction
 {
-	cpVect	position;
+	CGPoint	position;
 	float	radius;
 	float	lensEffect;
-	cpVect	lastPosition;
+	CGPoint	lastPosition;
 }
 
 /** lens effect. Defaults to 0.7 - 0 means no effect, 1 is very strong effect */
 @property float lensEffect;
 /** lens center position */
-@property cpVect position;
+@property CGPoint position;
 
 /** creates the action with center position, radius, a grid size and duration */
-+(id)actionWithPosition:(cpVect)pos radius:(float)r grid:(ccGridSize)gridSize duration:(ccTime)d;
++(id)actionWithPosition:(CGPoint)pos radius:(float)r grid:(ccGridSize)gridSize duration:(ccTime)d;
 /** initializes the action with center position, radius, a grid size and duration */
--(id)initWithPosition:(cpVect)pos radius:(float)r grid:(ccGridSize)gridSize duration:(ccTime)d;
+-(id)initWithPosition:(CGPoint)pos radius:(float)r grid:(ccGridSize)gridSize duration:(ccTime)d;
 
 @end
 
@@ -81,7 +81,7 @@
 /** Ripple3D action */
 @interface Ripple3D : Grid3DAction
 {
-	cpVect	position;
+	CGPoint	position;
 	float	radius;
 	int		waves;
 	float	amplitude;
@@ -89,16 +89,16 @@
 }
 
 /** center position */
-@property cpVect position;
+@property CGPoint position;
 /** amplitude */
 @property float amplitude;
 /** amplitude rate */
 @property float amplitudeRate;
 
 /** creates the action with radius, number of waves, amplitude, a grid size and duration */
-+(id)actionWithPosition:(cpVect)pos radius:(float)r waves:(int)wav amplitude:(float)amp grid:(ccGridSize)gridSize duration:(ccTime)d;
++(id)actionWithPosition:(CGPoint)pos radius:(float)r waves:(int)wav amplitude:(float)amp grid:(ccGridSize)gridSize duration:(ccTime)d;
 /** initializes the action with radius, number of waves, amplitude, a grid size and duration */
--(id)initWithPosition:(cpVect)pos radius:(float)r waves:(int)wav amplitude:(float)amp grid:(ccGridSize)gridSize duration:(ccTime)d;
+-(id)initWithPosition:(CGPoint)pos radius:(float)r waves:(int)wav amplitude:(float)amp grid:(ccGridSize)gridSize duration:(ccTime)d;
 
 @end
 
@@ -170,22 +170,22 @@
 /** Twirl action */
 @interface Twirl : Grid3DAction
 {
-	cpVect	position;
+	CGPoint	position;
 	int		twirls;
 	float	amplitude;
 	float	amplitudeRate;
 }
 
 /** twirl center */
-@property cpVect position;
+@property CGPoint position;
 /** amplitude */
 @property float amplitude;
 /** amplitude rate */
 @property float amplitudeRate;
 
 /** creates the action with center position, number of twirls, amplitude, a grid size and duration */
-+(id)actionWithPosition:(cpVect)pos twirls:(int)t amplitude:(float)amp grid:(ccGridSize)gridSize duration:(ccTime)d;
++(id)actionWithPosition:(CGPoint)pos twirls:(int)t amplitude:(float)amp grid:(ccGridSize)gridSize duration:(ccTime)d;
 /** initializes the action with center position, number of twirls, amplitude, a grid size and duration */
--(id)initWithPosition:(cpVect)pos twirls:(int)t amplitude:(float)amp grid:(ccGridSize)gridSize duration:(ccTime)d;
+-(id)initWithPosition:(CGPoint)pos twirls:(int)t amplitude:(float)amp grid:(ccGridSize)gridSize duration:(ccTime)d;
 
 @end</diff>
      <filename>Support/Cocos2d/cocos2d/Grid3DAction.h</filename>
    </modified>
    <modified>
      <diff>@@ -13,6 +13,7 @@
  */
 
 #import &quot;Grid3DAction.h&quot;
+#import &quot;Support/CGPointExtension.h&quot;
 
 @implementation Waves3D
 
@@ -45,7 +46,7 @@
 		for( j = 0; j &lt; (gridSize.y+1); j++ )
 		{
 			ccVertex3D	v = [self originalVertex:ccg(i,j)];
-			v.z += (sinf((cpFloat)M_PI*time*waves*2 + (v.y+v.x) * .01f) * amplitude * amplitudeRate);
+			v.z += (sinf((CGFloat)M_PI*time*waves*2 + (v.y+v.x) * .01f) * amplitude * amplitudeRate);
 			[self setVertex:ccg(i,j) vertex:v];
 		}
 	}
@@ -78,19 +79,19 @@
 
 -(void)update:(ccTime)time
 {
-	cpFloat angle = (cpFloat)M_PI * time; // 180 degrees
-	cpFloat mz = sinf( angle );
+	CGFloat angle = (CGFloat)M_PI * time; // 180 degrees
+	CGFloat mz = sinf( angle );
 	angle = angle / 2.0f;     // x calculates degrees from 0 to 90
-	cpFloat mx = cosf( angle );
+	CGFloat mx = cosf( angle );
 	
 	ccVertex3D	v0, v1, v, diff;
 	
 	v0 = [self originalVertex:ccg(1,1)];
 	v1 = [self originalVertex:ccg(0,0)];
 	
-	cpFloat	x0 = v0.x;
-	cpFloat	x1 = v1.x;
-	cpFloat x;
+	CGFloat	x0 = v0.x;
+	CGFloat	x1 = v1.x;
+	CGFloat x;
 	ccGridSize	a, b, c, d;
 	
 	if ( x0 &gt; x1 )
@@ -148,19 +149,19 @@
 
 -(void)update:(ccTime)time
 {
-	cpFloat angle = (cpFloat)M_PI * time; // 180 degrees
-	cpFloat mz = sinf( angle );
+	CGFloat angle = (CGFloat)M_PI * time; // 180 degrees
+	CGFloat mz = sinf( angle );
 	angle = angle / 2.0f;     // x calculates degrees from 0 to 90
-	cpFloat my = cosf( angle );
+	CGFloat my = cosf( angle );
 	
 	ccVertex3D	v0, v1, v, diff;
 	
 	v0 = [self originalVertex:ccg(1,1)];
 	v1 = [self originalVertex:ccg(0,0)];
 	
-	cpFloat	y0 = v0.y;
-	cpFloat	y1 = v1.y;
-	cpFloat y;
+	CGFloat	y0 = v0.y;
+	CGFloat	y1 = v1.y;
+	CGFloat y;
 	ccGridSize	a, b, c, d;
 	
 	if ( y0 &gt; y1 )
@@ -219,19 +220,19 @@
 @synthesize lensEffect;
 @synthesize position;
 
-+(id)actionWithPosition:(cpVect)pos radius:(float)r grid:(ccGridSize)gridSize duration:(ccTime)d
++(id)actionWithPosition:(CGPoint)pos radius:(float)r grid:(ccGridSize)gridSize duration:(ccTime)d
 {
 	return [[[self alloc] initWithPosition:pos radius:r grid:gridSize duration:d] autorelease];
 }
 
--(id)initWithPosition:(cpVect)pos radius:(float)r grid:(ccGridSize)gSize duration:(ccTime)d
+-(id)initWithPosition:(CGPoint)pos radius:(float)r grid:(ccGridSize)gSize duration:(ccTime)d
 {
 	if ( (self = [super initWithSize:gSize duration:d]) )
 	{
 		position = pos;
 		radius = r;
 		lensEffect = 0.7f;
-		lastPosition = cpv(-1,-1);
+		lastPosition = ccp(-1,-1);
 	}
 	
 	return self;
@@ -248,22 +249,22 @@
 			for( j = 0; j &lt; gridSize.y+1; j++ )
 			{
 				ccVertex3D	v = [self originalVertex:ccg(i,j)];
-				cpVect vect = cpvsub(position, cpv(v.x,v.y));
-				cpFloat r = cpvlength(vect);
+				CGPoint vect = ccpSub(position, ccp(v.x,v.y));
+				CGFloat r = ccpLength(vect);
 				
 				if ( r &lt; radius )
 				{
 					r = radius - r;
-					cpFloat pre_log = r / radius;
+					CGFloat pre_log = r / radius;
 					if ( pre_log == 0 ) pre_log = 0.001f;
 					float l = logf(pre_log) * lensEffect;
 					float new_r = expf( l ) * radius;
 					
-					if ( cpvlength(vect) &gt; 0 )
+					if ( ccpLength(vect) &gt; 0 )
 					{
-						vect = cpvnormalize(vect);
-						cpVect new_vect = cpvmult(vect, new_r);
-						v.z += cpvlength(new_vect) * lensEffect;
+						vect = ccpNormalize(vect);
+						CGPoint new_vect = ccpMult(vect, new_r);
+						v.z += ccpLength(new_vect) * lensEffect;
 					}
 				}
 				
@@ -285,12 +286,12 @@
 @synthesize amplitude;
 @synthesize amplitudeRate;
 
-+(id)actionWithPosition:(cpVect)pos radius:(float)r waves:(int)wav amplitude:(float)amp grid:(ccGridSize)gridSize duration:(ccTime)d
++(id)actionWithPosition:(CGPoint)pos radius:(float)r waves:(int)wav amplitude:(float)amp grid:(ccGridSize)gridSize duration:(ccTime)d
 {
 	return [[[self alloc] initWithPosition:pos radius:r waves:wav amplitude:amp grid:gridSize duration:d] autorelease];
 }
 
--(id)initWithPosition:(cpVect)pos radius:(float)r waves:(int)wav amplitude:(float)amp grid:(ccGridSize)gSize duration:(ccTime)d
+-(id)initWithPosition:(CGPoint)pos radius:(float)r waves:(int)wav amplitude:(float)amp grid:(ccGridSize)gSize duration:(ccTime)d
 {
 	if ( (self = [super initWithSize:gSize duration:d]) )
 	{
@@ -313,14 +314,14 @@
 		for( j = 0; j &lt; (gridSize.y+1); j++ )
 		{
 			ccVertex3D	v = [self originalVertex:ccg(i,j)];
-			cpVect vect = cpvsub(position, cpv(v.x,v.y));
-			cpFloat r = cpvlength(vect);
+			CGPoint vect = ccpSub(position, ccp(v.x,v.y));
+			CGFloat r = ccpLength(vect);
 			
 			if ( r &lt; radius )
 			{
 				r = radius - r;
-				cpFloat rate = powf( r / radius, 2);
-				v.z += (sinf( time*(cpFloat)M_PI*waves*2 + r * 0.1f) * amplitude * amplitudeRate * rate );
+				CGFloat rate = powf( r / radius, 2);
+				v.z += (sinf( time*(CGFloat)M_PI*waves*2 + r * 0.1f) * amplitude * amplitudeRate * rate );
 			}
 			
 			[self setVertex:ccg(i,j) vertex:v];
@@ -404,8 +405,8 @@
 		for( j = 1; j &lt; gridSize.y; j++ )
 		{
 			ccVertex3D	v = [self originalVertex:ccg(i,j)];
-			v.x = (v.x + (sinf(time*(cpFloat)M_PI*waves*2 + v.x * .01f) * amplitude * amplitudeRate));
-			v.y = (v.y + (sinf(time*(cpFloat)M_PI*waves*2 + v.y * .01f) * amplitude * amplitudeRate));
+			v.x = (v.x + (sinf(time*(CGFloat)M_PI*waves*2 + v.x * .01f) * amplitude * amplitudeRate));
+			v.y = (v.y + (sinf(time*(CGFloat)M_PI*waves*2 + v.y * .01f) * amplitude * amplitudeRate));
 			[self setVertex:ccg(i,j) vertex:v];
 		}
 	}
@@ -450,10 +451,10 @@
 			ccVertex3D	v = [self originalVertex:ccg(i,j)];
 			
 			if ( vertical )
-				v.x = (v.x + (sinf(time*(cpFloat)M_PI*waves*2 + v.y * .01f) * amplitude * amplitudeRate));
+				v.x = (v.x + (sinf(time*(CGFloat)M_PI*waves*2 + v.y * .01f) * amplitude * amplitudeRate));
 			
 			if ( horizontal )
-				v.y = (v.y + (sinf(time*(cpFloat)M_PI*waves*2 + v.x * .01f) * amplitude * amplitudeRate));
+				v.y = (v.y + (sinf(time*(CGFloat)M_PI*waves*2 + v.x * .01f) * amplitude * amplitudeRate));
 					
 			[self setVertex:ccg(i,j) vertex:v];
 		}
@@ -470,12 +471,12 @@
 @synthesize amplitude;
 @synthesize amplitudeRate;
 
-+(id)actionWithPosition:(cpVect)pos twirls:(int)t amplitude:(float)amp grid:(ccGridSize)gridSize duration:(ccTime)d
++(id)actionWithPosition:(CGPoint)pos twirls:(int)t amplitude:(float)amp grid:(ccGridSize)gridSize duration:(ccTime)d
 {
 	return [[[self alloc] initWithPosition:pos twirls:t amplitude:amp grid:gridSize duration:d] autorelease];
 }
 
--(id)initWithPosition:(cpVect)pos twirls:(int)t amplitude:(float)amp grid:(ccGridSize)gSize duration:(ccTime)d
+-(id)initWithPosition:(CGPoint)pos twirls:(int)t amplitude:(float)amp grid:(ccGridSize)gSize duration:(ccTime)d
 {
 	if ( (self = [super initWithSize:gSize duration:d]) )
 	{
@@ -491,7 +492,7 @@
 -(void)update:(ccTime)time
 {
 	int i, j;
-	cpVect		c = position;
+	CGPoint		c = position;
 	
 	for( i = 0; i &lt; (gridSize.x+1); i++ )
 	{
@@ -499,13 +500,13 @@
 		{
 			ccVertex3D	v = [self originalVertex:ccg(i,j)];
 			
-			cpVect	avg = cpv(i-(gridSize.x/2.0f), j-(gridSize.y/2.0f));
-			cpFloat r = cpvlength( avg );
+			CGPoint	avg = ccp(i-(gridSize.x/2.0f), j-(gridSize.y/2.0f));
+			CGFloat r = ccpLength( avg );
 			
-			cpFloat amp = 0.1f * amplitude * amplitudeRate;
-			cpFloat a = r * cosf( (cpFloat)M_PI/2.0f + time * (cpFloat)M_PI * twirls * 2 ) * amp;
+			CGFloat amp = 0.1f * amplitude * amplitudeRate;
+			CGFloat a = r * cosf( (CGFloat)M_PI/2.0f + time * (CGFloat)M_PI * twirls * 2 ) * amp;
 			
-			cpVect	d;
+			CGPoint	d;
 			
 			d.x = sinf(a) * (v.y-c.y) + cosf(a) * (v.x-c.x);
 			d.y = cosf(a) * (v.y-c.y) - sinf(a) * (v.x-c.x);</diff>
      <filename>Support/Cocos2d/cocos2d/Grid3DAction.m</filename>
    </modified>
    <modified>
      <diff>@@ -98,7 +98,6 @@
 	Grid3D *g = (Grid3D *)target.grid;
 	return [g setVertex:pos vertex:vertex];
 }
-
 @end
 
 ////////////////////////////////////////////////////////////
@@ -133,17 +132,17 @@
 ////////////////////////////////////////////////////////////
 
 @interface IntervalAction (Amplitude)
--(void)setAmplitudeRate:(cpFloat)amp;
--(cpFloat)getAmplitudeRate;
+-(void)setAmplitudeRate:(CGFloat)amp;
+-(CGFloat)getAmplitudeRate;
 @end
 
 @implementation IntervalAction (Amplitude)
--(void)setAmplitudeRate:(cpFloat)amp
+-(void)setAmplitudeRate:(CGFloat)amp
 {
 	[NSException raise:@&quot;IntervalAction (Amplitude)&quot; format:@&quot;Abstract class needs implementation&quot;];
 }
 
--(cpFloat)getAmplitudeRate
+-(CGFloat)getAmplitudeRate
 {
 	[NSException raise:@&quot;IntervalAction (Amplitude)&quot; format:@&quot;Abstract class needs implementation&quot;];
 	return 0;</diff>
      <filename>Support/Cocos2d/cocos2d/GridAction.m</filename>
    </modified>
    <modified>
      <diff>@@ -54,12 +54,12 @@
  */
 @interface Place : InstantAction &lt;NSCopying&gt;
 {
-	cpVect position;
+	CGPoint position;
 }
 /** creates a Place action with a position */
-+(id) actionWithPosition: (cpVect) pos;
++(id) actionWithPosition: (CGPoint) pos;
 /** Initializes a Place action with a position */
--(id) initWithPosition: (cpVect) pos;
+-(id) initWithPosition: (CGPoint) pos;
 @end
 
 /** Calls a 'callback'
@@ -78,7 +78,7 @@
 @end
 
 /** Calls a 'callback' with the node as the first argument
- * N means Node
+ /* N means Node
  */
 @interface CallFuncN : CallFunc
 {</diff>
      <filename>Support/Cocos2d/cocos2d/InstantAction.h</filename>
    </modified>
    <modified>
      <diff>@@ -24,10 +24,8 @@
 
 -(id) init
 {
-	if( !(self=[super init]) )
-		return nil;
-	
-	duration = 0;
+	if( (self=[super init]) )	
+		duration = 0;
 	return self;
 }
 
@@ -88,16 +86,15 @@
 // Place
 //
 @implementation Place
-+(id) actionWithPosition: (cpVect) pos
++(id) actionWithPosition: (CGPoint) pos
 {
 	return [[[self alloc]initWithPosition:pos]autorelease];
 }
 
--(id) initWithPosition: (cpVect) pos
+-(id) initWithPosition: (CGPoint) pos
 {
-	if( ! (self=[super init]) )
-		return nil;
-	position = pos;
+	if( (self=[super init]) )
+		position = pos;
 	return self;
 }
 
@@ -125,11 +122,10 @@
 
 -(id) initWithTarget: (id) t selector:(SEL) s
 {
-	if( ! (self=[super init]) )
-		return nil;
-	
-	targetCallback = [t retain];
-	selector = s;
+	if( (self=[super init]) ) {
+		targetCallback = [t retain];
+		selector = s;
+	}
 	return self;
 }
 
@@ -181,15 +177,14 @@
 
 -(id) initWithTarget:(id) t selector:(SEL) s data:(void*) d
 {
-	if( !(self=[super initWithTarget:t selector:s]) )
-		return nil;
-	data = d;
-	
-	NSMethodSignature * sig = [[t class] instanceMethodSignatureForSelector:s];
-	invocation = [NSInvocation invocationWithMethodSignature:sig];
-	[invocation setTarget:t];
-	[invocation setSelector:s];
-	[invocation retain];
+	if( (self=[super initWithTarget:t selector:s]) ) {
+		data = d;	
+		NSMethodSignature * sig = [[t class] instanceMethodSignatureForSelector:s];
+		invocation = [NSInvocation invocationWithMethodSignature:sig];
+		[invocation setTarget:t];
+		[invocation setSelector:s];
+		[invocation retain];
+	}
 	return self;
 }
 </diff>
      <filename>Support/Cocos2d/cocos2d/InstantAction.m</filename>
    </modified>
    <modified>
      <diff>@@ -15,9 +15,6 @@
 #import &quot;CocosNode.h&quot;
 #import &quot;Action.h&quot;
 
-#import &quot;chipmunk.h&quot;
-
-
 #include &lt;sys/time.h&gt;
 
 /** An interval action is an action that takes place within a certain period of time.
@@ -71,9 +68,9 @@ Example:
 /** helper contructor to create an array of sequenceable actions */
 +(id) actions: (IntervalAction*) action1, ... NS_REQUIRES_NIL_TERMINATION;
 /** creates the action */
-+(id) actionOne: (IntervalAction*) one two:(IntervalAction*) two;
++(id) actionOne:(IntervalAction*)actionOne two:(IntervalAction*)actionTwo;
 /** initializes the action */
--(id) initOne: (IntervalAction*) one two:(IntervalAction*) two;
+-(id) initOne:(IntervalAction*)actionOne two:(IntervalAction*)actionTwo;
 @end
 
 
@@ -87,9 +84,9 @@ Example:
 	IntervalAction *other;
 }
 /** creates the Repeat action. Times is an unsigned integer between 1 and pow(2,30) */
-+(id) actionWithAction: (IntervalAction*) action times: (unsigned int) t;
++(id) actionWithAction:(IntervalAction*)action times: (unsigned int)times;
 /** initializes the action. Times is an unsigned integer between 1 and pow(2,30) */
--(id) initWithAction: (IntervalAction*) action times: (unsigned int) t;
+-(id) initWithAction:(IntervalAction*)action times: (unsigned int)times;
 @end
 
 /** Spawn a new action immediately
@@ -117,9 +114,9 @@ Example:
 	float startAngle;
 }
 /** creates the action */
-+(id) actionWithDuration: (ccTime) t angle:(float) a;
++(id) actionWithDuration:(ccTime)duration angle:(float)angle;
 /** initializes the action */
--(id) initWithDuration: (ccTime) t angle:(float) a;
+-(id) initWithDuration:(ccTime)duration angle:(float)angle;
 @end
 
 /** Rotates a CocosNode object clockwise a number of degrees by modiying it's rotation attribute.
@@ -130,23 +127,23 @@ Example:
 	float startAngle;
 }
 /** creates the action */
-+(id) actionWithDuration: (ccTime) t angle:(float) a;
++(id) actionWithDuration:(ccTime)duration angle:(float)deltaAngle;
 /** initializes the action */
--(id) initWithDuration: (ccTime) t angle:(float) a;
+-(id) initWithDuration:(ccTime)duration angle:(float)deltaAngle;
 @end
 
 /** Moves a CocosNode object to the position x,y. x and y are absolute coordinates by modifying it's position attribute.
 */
 @interface MoveTo : IntervalAction &lt;NSCopying&gt;
 {
-	cpVect endPosition;
-	cpVect startPosition;
-	cpVect delta;
+	CGPoint endPosition;
+	CGPoint startPosition;
+	CGPoint delta;
 }
 /** creates the action */
-+(id) actionWithDuration: (ccTime) t position: (cpVect) pos;
++(id) actionWithDuration:(ccTime)duration position:(CGPoint)position;
 /** initializes the action */
--(id) initWithDuration: (ccTime) t position: (cpVect) pos;
+-(id) initWithDuration:(ccTime)duration position:(CGPoint)position;
 @end
 
 /**  Moves a CocosNode object x,y pixels by modifying it's position attribute.
@@ -157,24 +154,24 @@ Example:
 {
 }
 /** creates the action */
-+(id) actionWithDuration: (ccTime) t position: (cpVect) delta;
++(id) actionWithDuration: (ccTime)duration position:(CGPoint)deltaPosition;
 /** initializes the action */
--(id) initWithDuration: (ccTime) t position: (cpVect) delta;
+-(id) initWithDuration: (ccTime)duration position:(CGPoint)deltaPosition;
 @end
 
 /** Moves a CocosNode object simulating a jump movement by modifying it's position attribute.
 */
  @interface JumpBy : IntervalAction &lt;NSCopying&gt;
 {
-	cpVect startPosition;
-	cpVect delta;
+	CGPoint startPosition;
+	CGPoint delta;
 	ccTime height;
 	int jumps;
 }
 /** creates the action */
-+(id) actionWithDuration: (ccTime) t position: (cpVect) pos height: (ccTime) h jumps:(int)j;
++(id) actionWithDuration: (ccTime)duration position:(CGPoint)position height:(ccTime)height jumps:(int)jumps;
 /** initializes the action */
--(id) initWithDuration: (ccTime) t position: (cpVect) pos height: (ccTime) h jumps:(int)j;
+-(id) initWithDuration: (ccTime)duration position:(CGPoint)position height:(ccTime)height jumps:(int)jumps;
 @end
 
 /** Moves a CocosNode object to a position simulating a jump movement by modifying it's position attribute.
@@ -186,6 +183,7 @@ Example:
 
 
 /** Scales a CocosNode object to a zoom factor by modifying it's scale attribute.
+ @warning This action doesn't support &quot;reverse&quot;
  */
 @interface ScaleTo : IntervalAction &lt;NSCopying&gt;
 {
@@ -199,13 +197,13 @@ Example:
 	float deltaY;
 }
 /** creates the action with the same scale factor for X and Y */
-+(id) actionWithDuration: (ccTime) t scale:(float) s;
++(id) actionWithDuration: (ccTime)duration scale:(float) s;
 /** initializes the action with the same scale factor for X and Y */
--(id) initWithDuration: (ccTime) t scale:(float) s;
+-(id) initWithDuration: (ccTime)duration scale:(float) s;
 /** creates the action with and X factor and a Y factor */
-+(id) actionWithDuration: (ccTime) t scaleX:(float) sx scaleY:(float)sy;
++(id) actionWithDuration: (ccTime)duration scaleX:(float) sx scaleY:(float)sy;
 /** initializes the action with and X factor and a Y factor */
--(id) initWithDuration: (ccTime) t scaleX:(float) sx scaleY:(float)sy;
+-(id) initWithDuration: (ccTime)duration scaleX:(float) sx scaleY:(float)sy;
 @end
 
 /** Scales a CocosNode object a zoom factor by modifying it's scale attribute.
@@ -222,35 +220,69 @@ Example:
 	int times;
 }
 /** creates the action */
-+(id) actionWithDuration: (ccTime) t blinks: (int) blinks;
++(id) actionWithDuration: (ccTime)duration blinks:(unsigned int)blinks;
 /** initilizes the action */
--(id) initWithDuration: (ccTime) t blinks: (int) blinks;
+-(id) initWithDuration: (ccTime)duration blinks:(unsigned int)blinks;
 @end
 
-/** Fades in a CocosNode, from opacity 0 to 255 */
+/** Fades in a CocosNode that implements the CocosNodeOpacity protocol, from opacity 0 to 255.
+ The &quot;reverse&quot; of this action is FadeOut
+ */
 @interface FadeIn : IntervalAction &lt;NSCopying&gt;
 {
 }
 @end
 
-/** Fades out a CocosNode, from opacity 255 to 0 */
+/** Fades out a CocosNode that implements the CocosNodeOpacity protocol, from opacity 255 to 0.
+ The &quot;reverse&quot; of this action is FadeIn
+*/
 @interface FadeOut : IntervalAction &lt;NSCopying&gt;
 {
 }
 @end
 
-/** Fades a CocosNode from current opacity to a custom one */
+/** Fades a CocosNode that implements the CocosNodeOpacity protocol from current opacity to a custom one.
+ @warning This action doesn't support &quot;reverse&quot;
+ */
 @interface FadeTo : IntervalAction &lt;NSCopying&gt;
 {
 	GLubyte toOpacity;
 	GLubyte fromOpacity;
 }
 /** creates an action with duration and opactiy */
-+(id) actionWithDuration: (ccTime) t opacity: (GLubyte) o;
++(id) actionWithDuration:(ccTime)duration opacity:(GLubyte)opactiy;
+/** initializes the action with duration and opacity */
+-(id) initWithDuration:(ccTime)duration opacity:(GLubyte)opacity;
+@end
+
+/** Tints a CocosNode that implements the CocosNodeRGB protocol from current tint to a custom one.
+ @warning This action doesn't support &quot;reverse&quot;
+ @since v0.7.2
+*/
+@interface TintTo : IntervalAction &lt;NSCopying&gt;
+{
+	GLubyte toR, toG, toB;
+	GLubyte fromR, fromG, fromB;
+}
+/** creates an action with duration and opactiy */
++(id) actionWithDuration:(ccTime)duration red:(GLubyte)red green:(GLubyte)green blue:(GLubyte)blue;
 /** initializes the action with duration and opacity */
--(id) initWithDuration: (ccTime) t opacity: (GLubyte) o;
+-(id) initWithDuration:(ccTime)duration red:(GLubyte)red green:(GLubyte)green blue:(GLubyte)blue;
 @end
 
+/** Tints a CocosNode that implements the CocosNodeRGB protocol from current tint to a custom one.
+ @since v0.7.2
+ */
+@interface TintBy : IntervalAction &lt;NSCopying&gt;
+{
+	GLshort deltaR, deltaG, deltaB;
+	GLshort fromR, fromG, fromB;
+}
+/** creates an action with duration and opactiy */
++(id) actionWithDuration:(ccTime)duration red:(GLshort)deltaRed green:(GLshort)deltaGreen blue:(GLshort)deltaBlue;
+/** initializes the action with duration and opacity */
+-(id) initWithDuration:(ccTime)duration red:(GLshort)deltaRed green:(GLshort)deltaGreen blue:(GLshort)deltaBlue;
+@end
 
 
 /** Changes the acceleration of an action</diff>
      <filename>Support/Cocos2d/cocos2d/IntervalAction.h</filename>
    </modified>
    <modified>
      <diff>@@ -16,6 +16,7 @@
 #import &quot;IntervalAction.h&quot;
 #import &quot;Sprite.h&quot;
 #import &quot;CocosNode.h&quot;
+#import &quot;Support/CGPointExtension.h&quot;
 
 //
 // IntervalAction
@@ -455,12 +456,12 @@
 // MoveTo
 //
 @implementation MoveTo
-+(id) actionWithDuration: (ccTime) t position: (cpVect) p
++(id) actionWithDuration: (ccTime) t position: (CGPoint) p
 {	
 	return [[[self alloc] initWithDuration:t position:p ] autorelease];
 }
 
--(id) initWithDuration: (ccTime) t position: (cpVect) p
+-(id) initWithDuration: (ccTime) t position: (CGPoint) p
 {
 	if( !(self=[super initWithDuration: t]) )
 		return nil;
@@ -479,12 +480,12 @@
 {
 	[super start];
 	startPosition = [target position];
-	delta = cpvsub( endPosition, startPosition );
+	delta = ccpSub( endPosition, startPosition );
 }
 
 -(void) update: (ccTime) t
 {	
-	target.position = cpv( (startPosition.x + delta.x * t ), (startPosition.y + delta.y * t ) );
+	target.position = ccp( (startPosition.x + delta.x * t ), (startPosition.y + delta.y * t ) );
 }
 @end
 
@@ -492,12 +493,12 @@
 // MoveBy
 //
 @implementation MoveBy
-+(id) actionWithDuration: (ccTime) t position: (cpVect) p
++(id) actionWithDuration: (ccTime) t position: (CGPoint) p
 {	
 	return [[[self alloc] initWithDuration:t position:p ] autorelease];
 }
 
--(id) initWithDuration: (ccTime) t position: (cpVect) p
+-(id) initWithDuration: (ccTime) t position: (CGPoint) p
 {
 	if( !(self=[super initWithDuration: t]) )
 		return nil;
@@ -514,14 +515,14 @@
 
 -(void) start
 {
-	cpVect dTmp = delta;
+	CGPoint dTmp = delta;
 	[super start];
 	delta = dTmp;
 }
 
 -(IntervalAction*) reverse
 {
-	return [MoveBy actionWithDuration: duration position: cpv( -delta.x, -delta.y)];
+	return [MoveBy actionWithDuration: duration position: ccp( -delta.x, -delta.y)];
 }
 @end
 
@@ -529,12 +530,12 @@
 // JumpBy
 //
 @implementation JumpBy
-+(id) actionWithDuration: (ccTime) t position: (cpVect) pos height: (ccTime) h jumps:(int)j
++(id) actionWithDuration: (ccTime) t position: (CGPoint) pos height: (ccTime) h jumps:(int)j
 {
 	return [[[self alloc] initWithDuration: t position: pos height: h jumps:j] autorelease];
 }
 
--(id) initWithDuration: (ccTime) t position: (cpVect) pos height: (ccTime) h jumps:(int)j
+-(id) initWithDuration: (ccTime) t position: (CGPoint) pos height: (ccTime) h jumps:(int)j
 {
 	if( !(self=[super initWithDuration:t]) )
 		return nil;
@@ -559,15 +560,15 @@
 
 -(void) update: (ccTime) t
 {
-	ccTime y = height * fabsf( sinf(t * (cpFloat)M_PI * jumps ) );
+	ccTime y = height * fabsf( sinf(t * (CGFloat)M_PI * jumps ) );
 	y += delta.y * t;
 	ccTime x = delta.x * t;
-	target.position = cpv( startPosition.x + x, startPosition.y + y );
+	target.position = ccp( startPosition.x + x, startPosition.y + y );
 }
 
 -(IntervalAction*) reverse
 {
-	return [JumpBy actionWithDuration: duration position: cpv(-delta.x,-delta.y) height: height jumps:jumps];
+	return [JumpBy actionWithDuration: duration position: ccp(-delta.x,-delta.y) height: height jumps:jumps];
 }
 @end
 
@@ -578,7 +579,7 @@
 -(void) start
 {
 	[super start];
-	delta = cpv( delta.x - startPosition.x, delta.y - startPosition.y );
+	delta = ccp( delta.x - startPosition.x, delta.y - startPosition.y );
 }
 @end
 
@@ -618,7 +619,7 @@
 
 -(id) copyWithZone: (NSZone*) zone
 {
-	Action *copy = [[[self class] allocWithZone: zone] initWithDuration: [self duration] scaleX: endScaleX scaleY:endScaleY];
+	Action *copy = [[[self class] allocWithZone: zone] initWithDuration: [self duration] scaleX:endScaleX scaleY:endScaleY];
 	return copy;
 }
 
@@ -659,12 +660,12 @@
 // Blink
 //
 @implementation Blink
-+(id) actionWithDuration: (ccTime) t blinks: (int) b
++(id) actionWithDuration: (ccTime) t blinks: (unsigned int) b
 {
 	return [[[ self alloc] initWithDuration: t blinks: b] autorelease];
 }
 
--(id) initWithDuration: (ccTime) t blinks: (int) b
+-(id) initWithDuration: (ccTime) t blinks: (unsigned int) b
 {
 	if( ! (self=[super initWithDuration: t] ) )
 		return nil;
@@ -731,9 +732,8 @@
 
 -(id) initWithDuration: (ccTime) t opacity: (GLubyte) o
 {
-	if( ! (self=[super initWithDuration: t] ) )
-		return nil;
-	toOpacity = o;
+	if( (self=[super initWithDuration: t] ) )
+		toOpacity = o;
 	return self;
 }
 
@@ -756,8 +756,99 @@
 @end
 
 //
+// TintTo
+//
+#pragma mark TintTo
+@implementation TintTo
++(id) actionWithDuration:(ccTime)t red:(GLubyte)r green:(GLubyte)g blue:(GLubyte)b
+{
+	return [[(TintTo*)[ self alloc] initWithDuration:t red:r green:g blue:b] autorelease];
+}
+
+-(id) initWithDuration: (ccTime) t red:(GLubyte)r green:(GLubyte)g blue:(GLubyte)b
+{
+	if( (self=[super initWithDuration: t] ) ) {
+		toR = r;
+		toG = g;
+		toB = b;
+	}
+	return self;
+}
+
+-(id) copyWithZone: (NSZone*) zone
+{
+	Action *copy = [(TintTo*)[[self class] allocWithZone: zone] initWithDuration: [self duration] red:toR green:toG blue:toB];
+	return copy;
+}
+
+-(void) start
+{
+	[super start];
+	
+	id&lt;CocosNodeRGB&gt; tn = (id&lt;CocosNodeRGB&gt;) target;
+	
+	fromR = [tn r];
+	fromG = [tn g];
+	fromB = [tn b];
+}
+
+-(void) update: (ccTime) t
+{
+	id&lt;CocosNodeRGB&gt; tn = (id&lt;CocosNodeRGB&gt;) target;
+	[tn setRGB:fromR + (toR - fromR) * t :fromG + (toG - fromG) * t :fromB + (toB - fromB) * t];
+}
+@end
+
+//
+// TintBy
+//
+#pragma mark TintBy
+@implementation TintBy
++(id) actionWithDuration:(ccTime)t red:(GLshort)r green:(GLshort)g blue:(GLshort)b
+{
+	return [[(TintBy*)[ self alloc] initWithDuration:t red:r green:g blue:b] autorelease];
+}
+
+-(id) initWithDuration:(ccTime)t red:(GLshort)r green:(GLshort)g blue:(GLshort)b
+{
+	if( (self=[super initWithDuration: t] ) ) {
+		deltaR = r;
+		deltaG = g;
+		deltaB = b;
+	}
+	return self;
+}
+
+-(id) copyWithZone: (NSZone*) zone
+{
+	return[(TintBy*)[[self class] allocWithZone: zone] initWithDuration: [self duration] red:deltaR green:deltaG blue:deltaB];
+}
+
+-(void) start
+{
+	[super start];
+	
+	id&lt;CocosNodeRGB&gt; tn = (id&lt;CocosNodeRGB&gt;) target;
+	fromR = [tn r];
+	fromG = [tn g];
+	fromB = [tn b];
+}
+
+-(void) update: (ccTime) t
+{
+	id&lt;CocosNodeRGB&gt; tn = (id&lt;CocosNodeRGB&gt;) target;
+	[tn setRGB:fromR + deltaR * t :fromG + deltaG * t :fromB + deltaB * t];
+}
+- (IntervalAction*) reverse
+{
+	return [TintBy actionWithDuration:duration red:-deltaR green:-deltaG blue:-deltaB];
+}
+@end
+
+//
 // Accelerate
 //
+#pragma mark Accelerate
 @implementation Accelerate
 @synthesize rate;
 + (id) actionWithAction: (IntervalAction*) action rate: (float) r
@@ -936,32 +1027,32 @@
 //
 @implementation Animate
 
-+(id) actionWithAnimation: (id&lt;CocosAnimation&gt;) a
++(id) actionWithAnimation: (id&lt;CocosAnimation&gt;)anim
 {
-	return [[[self alloc] initWithAnimation: a restoreOriginalFrame:YES] autorelease];
+	return [[[self alloc] initWithAnimation:anim restoreOriginalFrame:YES] autorelease];
 }
 
-+(id) actionWithAnimation: (id&lt;CocosAnimation&gt;) a restoreOriginalFrame:(BOOL)b
++(id) actionWithAnimation: (id&lt;CocosAnimation&gt;)anim restoreOriginalFrame:(BOOL)b
 {
-	return [[[self alloc] initWithAnimation: a restoreOriginalFrame:b] autorelease];
+	return [[[self alloc] initWithAnimation:anim restoreOriginalFrame:b] autorelease];
 }
 
--(id) initWithAnimation: (id&lt;CocosAnimation&gt;) a
+-(id) initWithAnimation: (id&lt;CocosAnimation&gt;)anim
 {
-	NSAssert( a!=nil, @&quot;Animate: argument Animation must be non-nil&quot;);
-	return [self initWithAnimation:a restoreOriginalFrame:YES];
+	NSAssert( anim!=nil, @&quot;Animate: argument Animation must be non-nil&quot;);
+	return [self initWithAnimation:anim restoreOriginalFrame:YES];
 }
 
--(id) initWithAnimation: (id&lt;CocosAnimation&gt;) a restoreOriginalFrame:(BOOL) b
+-(id) initWithAnimation: (id&lt;CocosAnimation&gt;)anim restoreOriginalFrame:(BOOL) b
 {
-	NSAssert( a!=nil, @&quot;Animate: argument Animation must be non-nil&quot;);
+	NSAssert( anim!=nil, @&quot;Animate: argument Animation must be non-nil&quot;);
 
-	if( !(self=[super initWithDuration: [[a frames] count] * [a delay]]) )
-		return nil;
+	if( (self=[super initWithDuration: [[anim frames] count] * [anim delay]]) ) {
 
-	restoreOriginalFrame = b;
-	animation = [(NSObject*)a retain];
-	origFrame = nil;
+		restoreOriginalFrame = b;
+		animation = [anim retain];
+		origFrame = nil;
+	}
 	return self;
 }
 
@@ -1015,4 +1106,3 @@
 	}
 }
 @end
-</diff>
      <filename>Support/Cocos2d/cocos2d/IntervalAction.m</filename>
    </modified>
    <modified>
      <diff>@@ -13,14 +13,8 @@
  */
 
 
-#import &lt;QuartzCore/QuartzCore.h&gt;
-#import &lt;OpenGLES/EAGLDrawable.h&gt;
-#import &lt;UIKit/UIKit.h&gt;
-#import &lt;OpenGLES/EAGL.h&gt;
-#import &lt;OpenGLES/ES1/gl.h&gt;
-#import &lt;OpenGLES/ES1/glext.h&gt;
-
 #import &quot;Label.h&quot;
+#import &quot;Support/CGPointExtension.h&quot;
 
 @implementation Label
 
@@ -73,21 +67,23 @@
 
 - (void) setString:(NSString*)string
 {
-	if (texture)
-		[texture release];
-
 	if( CGSizeEqualToSize( _dimensions, CGSizeZero ) )
-		texture = [[Texture2D alloc] initWithString:string fontName:_fontName fontSize:_fontSize];
+		// WARNING: double retain
+		self.texture = [[Texture2D alloc] initWithString:string fontName:_fontName fontSize:_fontSize];
 	else
-		texture = [[Texture2D alloc] initWithString:string dimensions:_dimensions alignment:_alignment fontName:_fontName fontSize:_fontSize];
+		// WARNING: double retain
+		self.texture = [[Texture2D alloc] initWithString:string dimensions:_dimensions alignment:_alignment fontName:_fontName fontSize:_fontSize];
+	
+	// end of warning. 1 retain only
+	[self.texture release];
+
 	CGSize s = texture.contentSize;
-	transformAnchor = cpv( s.width/2, s.height/2);
+	transformAnchor = ccp( s.width/2, s.height/2);
 }
 
 - (void) dealloc
 {
 	[_fontName release];
-	[texture release];
 	[super dealloc];
 }
 @end</diff>
      <filename>Support/Cocos2d/cocos2d/Label.m</filename>
    </modified>
    <modified>
      <diff>@@ -37,9 +37,18 @@
 
 /** align items vertically */
 -(void) alignItemsVertically;
+/** align items vertically with padding
+ @since v0.7.2
+ */
+-(void) alignItemsVerticallyWithPadding:(float) padding;
 
 /** align items horizontally */
 -(void) alignItemsHorizontally;
+/** align items horizontally with padding
+ @since v0.7.2
+ */
+-(void) alignItemsHorizontallyWithPadding: (float) padding;
+
 
 /** align items in rows of columns */
 -(void) alignItemsInColumns: (NSNumber *) columns, ... NS_REQUIRES_NIL_TERMINATION;</diff>
      <filename>Support/Cocos2d/cocos2d/Menu.h</filename>
    </modified>
    <modified>
      <diff>@@ -15,7 +15,11 @@
 
 #import &quot;Menu.h&quot;
 #import &quot;Director.h&quot;
-#import &quot;CocosNodeExtras.h&quot;
+#import &quot;Support/CGPointExtension.h&quot;
+
+enum {
+	kDefaultPadding =  5,
+};
 
 @interface Menu (Private)
 // returns touched menu item, if any
@@ -61,19 +65,21 @@
 		s.height -= r.size.width;
 	else
 	    s.height -= r.size.height;
-	position = cpv(s.width/2, s.height/2);
+	position = ccp(s.width/2, s.height/2);
 
 	isTouchEnabled = YES;
 	selectedItem = -1;
 	
 	int z=0;
 	
-	[self addChild: item z:z];
-	MenuItem *i = va_arg(args, MenuItem*);
-	while(i) {
-		z++;
-		[self addChild: i z:z];
-		i = va_arg(args, MenuItem*);
+	if (item) {
+		[self addChild: item z:z];
+		MenuItem *i = va_arg(args, MenuItem*);
+		while(i) {
+			z++;
+			[self addChild: i z:z];
+			i = va_arg(args, MenuItem*);
+		}
 	}
 //	[self alignItemsVertically];
 	
@@ -94,7 +100,6 @@
 	return [super addChild:child z:z tag:aTag];
 }
 
-
 #pragma mark Menu - Events
 
 - (BOOL)ccTouchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
@@ -164,28 +169,37 @@
 #pragma mark Menu - Alignment
 -(void) alignItemsVertically
 {
-	int height = -5;
+	return [self alignItemsVerticallyWithPadding:kDefaultPadding];
+}
+-(void) alignItemsVerticallyWithPadding:(float)padding
+{
+	float height = -padding;
 	for(MenuItem *item in children)
-	    height += [item contentSize].height + 5;
+	    height += [item contentSize].height * item.scaleY + padding;
 
-	float y = height / 2;
+	float y = height / 2.0f;
 	for(MenuItem *item in children) {
-	    [item setPosition:cpv(0, y - [item contentSize].height / 2)];
-	    y -= [item contentSize].height + 5;
+	    [item setPosition:ccp(0, y - [item contentSize].height * item.scaleY / 2.0f)];
+	    y -= [item contentSize].height * item.scaleY + padding;
 	}
 }
 
 -(void) alignItemsHorizontally
 {
+	return [self alignItemsHorizontallyWithPadding:kDefaultPadding];
+}
+
+-(void) alignItemsHorizontallyWithPadding:(float)padding
+{
 	
-	int width = -5;
+	float width = -padding;
 	for(MenuItem* item in children)
-	    width += [item contentSize].width + 5;
+	    width += [item contentSize].width * item.scaleX + padding;
 
-	int x = -width / 2;
+	float x = -width / 2.0f;
 	for(MenuItem* item in children) {
-		[item setPosition:cpv(x + [item contentSize].width / 2, 0)];
-		x += [item contentSize].width + 5;
+		[item setPosition:ccp(x + [item contentSize].width * item.scaleX / 2.0f, 0)];
+		x += [item contentSize].width * item.scaleX + padding;
 	}
 }
 
@@ -211,16 +225,10 @@
 	int height = -5;
     NSUInteger row = 0, rowHeight = 0, columnsOccupied = 0, rowColumns;
 	for(MenuItem *item in children) {
-        if(row &gt;= [rows count])
-            @throw [NSException exceptionWithName:NSInternalInconsistencyException
-                                           reason:@&quot;Too many menu items for the amount of rows/columns.&quot;
-                                         userInfo:nil];
+		NSAssert( row &lt; [rows count], @&quot;Too many menu items for the amount of rows/columns.&quot;);
         
         rowColumns = [(NSNumber *) [rows objectAtIndex:row] unsignedIntegerValue];
-        if(rowColumns == 0)
-            @throw [NSException exceptionWithName:NSInternalInconsistencyException
-                                           reason:[NSString stringWithFormat:@&quot;Can't have zero columns on a row (row %d).&quot;, row]
-                                         userInfo:nil];
+		NSAssert( rowColumns, @&quot;Can't have zero columns on a row&quot;);
         
         rowHeight = fmaxf(rowHeight, [item contentSize].height);
         ++columnsOccupied;
@@ -233,10 +241,7 @@
             ++row;
         }
     }
-    if(columnsOccupied != 0)
-        @throw [NSException exceptionWithName:NSInternalInconsistencyException
-                                       reason:@&quot;Too many rows/columns for available menu items.&quot;
-                                     userInfo:nil];
+	NSAssert( !columnsOccupied, @&quot;Too many rows/columns for available menu items.&quot; );
 
     CGSize winSize = [[Director sharedDirector] winSize];
     
@@ -250,7 +255,7 @@
         }
 
         rowHeight = fmaxf(rowHeight, [item contentSize].height);
-        [item setPosition:cpv(x - winSize.width / 2,
+        [item setPosition:ccp(x - winSize.width / 2,
                               y - [item contentSize].height / 2)];
             
         x += w + 10;
@@ -294,16 +299,10 @@
 	int width = -10, columnHeight = -5;
     NSUInteger column = 0, columnWidth = 0, rowsOccupied = 0, columnRows;
 	for(MenuItem *item in children) {
-        if(column &gt;= [columns count])
-            @throw [NSException exceptionWithName:NSInternalInconsistencyException
-                                           reason:@&quot;Too many menu items for the amount of rows/columns.&quot;
-                                         userInfo:nil];
+		NSAssert( column &lt; [columns count], @&quot;Too many menu items for the amount of rows/columns.&quot;);
         
         columnRows = [(NSNumber *) [columns objectAtIndex:column] unsignedIntegerValue];
-        if(columnRows == 0)
-            @throw [NSException exceptionWithName:NSInternalInconsistencyException
-                                           reason:[NSString stringWithFormat:@&quot;Can't have zero rows on a column (column %d).&quot;, column]
-                                         userInfo:nil];
+		NSAssert( columnRows, @&quot;Can't have zero rows on a column&quot;);
         
         columnWidth = fmaxf(columnWidth, [item contentSize].width);
         columnHeight += [item contentSize].height + 5;
@@ -320,10 +319,7 @@
             ++column;
         }
     }
-    if(rowsOccupied != 0)
-        @throw [NSException exceptionWithName:NSInternalInconsistencyException
-                                       reason:@&quot;Too many rows/columns for available menu items.&quot;
-                                     userInfo:nil];
+	NSAssert( !rowsOccupied, @&quot;Too many rows/columns for available menu items.&quot;);
     
     CGSize winSize = [[Director sharedDirector] winSize];
     
@@ -336,7 +332,7 @@
         }
         
         columnWidth = fmaxf(columnWidth, [item contentSize].width);
-        [item setPosition:cpv(x + [(NSNumber *) [columnWidths objectAtIndex:column] unsignedIntegerValue] / 2,
+        [item setPosition:ccp(x + [(NSNumber *) [columnWidths objectAtIndex:column] unsignedIntegerValue] / 2,
                               y - winSize.height / 2)];
         
         y -= [item contentSize].height + 10;</diff>
      <filename>Support/Cocos2d/cocos2d/Menu.m</filename>
    </modified>
    <modified>
      <diff>@@ -159,12 +159,16 @@
 /** A MenuItemToggle */
 @interface MenuItemToggle : MenuItem
 {
-	NSUInteger selectedIndex;
-	NSMutableArray* subItems;
+	NSUInteger selectedIndex_;
+	NSMutableArray* subItems_;
 }
 
 /** returns the selected item */
 @property (readwrite) NSUInteger selectedIndex;
+/** NSMutableArray that contains the subitems. You can add/remove items in runtime, and you can replace the array with a new one.
+ @since v0.7.2
+ */
+@property (readwrite,retain) NSMutableArray *subItems;
 
 /** creates a menu item from a list of items with a target/selector */
 +(id) itemWithTarget:(id)t selector:(SEL)s items:(MenuItem*) item, ... NS_REQUIRES_NIL_TERMINATION;</diff>
      <filename>Support/Cocos2d/cocos2d/MenuItem.h</filename>
    </modified>
    <modified>
      <diff>@@ -17,6 +17,7 @@
 #import &quot;LabelAtlas.h&quot;
 #import &quot;IntervalAction.h&quot;
 #import &quot;Sprite.h&quot;
+#import &quot;Support/CGPointExtension.h&quot;
 
 static int _fontSize = kItemSize;
 static NSString *_fontName = @&quot;Marker Felt&quot;;
@@ -161,7 +162,7 @@ enum {
 	[label setOpacity:opacity];
 	
 	CGSize s = label.contentSize;
-	transformAnchor = cpv( s.width/2, s.height/2 );
+	transformAnchor = ccp( s.width/2, s.height/2 );
 	
 	return self;
 }
@@ -170,7 +171,7 @@ enum {
 {
     [label setString:string];
 	CGSize s = label.contentSize;
-    transformAnchor = cpv( s.width/2, s.height/2 );
+    transformAnchor = ccp( s.width/2, s.height/2 );
 }
 
 -(void) dealloc
@@ -309,7 +310,7 @@ enum {
 	[label setOpacity:opacity];
 	
 	CGSize s = label.contentSize;
-	transformAnchor = cpv( s.width/2, s.height/2 );
+	transformAnchor = ccp( s.width/2, s.height/2 );
 	
 	return self;
 }
@@ -318,7 +319,7 @@ enum {
 {
 	[label setString:string];
 	CGSize s = label.contentSize;
-	transformAnchor = cpv( s.width/2, s.height/2 );
+	transformAnchor = ccp( s.width/2, s.height/2 );
 }
 
 -(void) dealloc
@@ -439,7 +440,7 @@ enum {
 	[disabledImage setOpacity:opacity];
 	
 	CGSize s = [normalImage contentSize];
-	transformAnchor = cpv( s.width/2, s.height/2 );
+	transformAnchor = ccp( s.width/2, s.height/2 );
 
 	return self;
 }
@@ -511,6 +512,8 @@ enum {
 //
 @implementation MenuItemToggle
 
+@synthesize subItems = subItems_;
+
 +(id) itemWithTarget: (id)t selector: (SEL)sel items: (MenuItem*) item, ...
 {
 	va_list args;
@@ -524,59 +527,59 @@ enum {
 
 -(id) initWithTarget: (id)t selector: (SEL)sel items:(MenuItem*) item vaList: (va_list) args
 {
-	if( !(self=[super initWithTarget:t selector:sel]) )
-		return nil;
+	if( (self=[super initWithTarget:t selector:sel]) ) {
 	
-	subItems = [[NSMutableArray arrayWithCapacity:2] retain];
-	
-	int z = 0;
-	MenuItem *i = item;
-	while(i) {
-		z++;
-		[subItems addObject:i];
-		i = va_arg(args, MenuItem*);
+		self.subItems = [NSMutableArray arrayWithCapacity:2];
+		
+		int z = 0;
+		MenuItem *i = item;
+		while(i) {
+			z++;
+			[subItems_ addObject:i];
+			i = va_arg(args, MenuItem*);
+		}
+
+		selectedIndex_ = NSUIntegerMax;
+		[self setSelectedIndex:0];
 	}
-
-	selectedIndex = NSUIntegerMax;
-	[self setSelectedIndex:0];
 	
 	return self;
 }
 
 -(void) dealloc
 {
-	[subItems release];
+	[subItems_ release];
 	[super dealloc];
 }
 
 -(void)setSelectedIndex:(NSUInteger)index
 {
-	if( index != selectedIndex ) {
-		selectedIndex=index;
+	if( index != selectedIndex_ ) {
+		selectedIndex_=index;
 		[self removeChildByTag:kCurrentItem cleanup:NO];
 		
-		MenuItem *item = [subItems objectAtIndex:selectedIndex];
+		MenuItem *item = [subItems_ objectAtIndex:selectedIndex_];
 		[self addChild:item z:0 tag:kCurrentItem];
 		
 		CGSize s = [item contentSize];
-		item.position = self.transformAnchor = cpv( s.width/2, s.height/2 );
+		item.position = self.transformAnchor = ccp( s.width/2, s.height/2 );
 	}
 }
 
 -(NSUInteger) selectedIndex
 {
-	return selectedIndex;
+	return selectedIndex_;
 }
 
 
 -(void) selected
 {
-	[[subItems objectAtIndex:selectedIndex] selected];
+	[[subItems_ objectAtIndex:selectedIndex_] selected];
 }
 
 -(void) unselected
 {
-	[[subItems objectAtIndex:selectedIndex] unselected];
+	[[subItems_ objectAtIndex:selectedIndex_] unselected];
 }
 
 -(void) activate
@@ -584,7 +587,7 @@ enum {
 	// update index
 	
 	if( isEnabled ) {
-		NSUInteger newIndex = (selectedIndex + 1) % [subItems count];
+		NSUInteger newIndex = (selectedIndex_ + 1) % [subItems_ count];
 		[self setSelectedIndex:newIndex];
 
 		[invocation invoke];
@@ -594,13 +597,13 @@ enum {
 -(void) setIsEnabled: (BOOL)enabled
 {
 	[super setIsEnabled:enabled];
-	for(MenuItem* item in subItems)
+	for(MenuItem* item in subItems_)
 		[item setIsEnabled:enabled];
 }
 
 -(MenuItem*) selectedItem
 {
-	return [subItems objectAtIndex:selectedIndex];
+	return [subItems_ objectAtIndex:selectedIndex_];
 }
 
 -(CGRect) rect
@@ -623,7 +626,7 @@ enum {
 - (void) setOpacity: (GLubyte)newOpacity
 {
 	[super setOpacity:newOpacity];
-	for(MenuItem* item in subItems)
+	for(MenuItem* item in subItems_)
 		[item setOpacity:newOpacity];
 }
 @end</diff>
      <filename>Support/Cocos2d/cocos2d/MenuItem.m</filename>
    </modified>
    <modified>
      <diff>@@ -14,14 +14,13 @@
 
 #import &lt;UIKit/UIKit.h&gt;
 
-#import &quot;chipmunk.h&quot;
 #import &quot;CocosNode.h&quot;
 #import &quot;ccTypes.h&quot;
 
 typedef struct sParticle
 {
-	cpVect	pos;
-	cpVect	dir;
+	CGPoint	pos;
+	CGPoint	dir;
 	float	radialAccel;
 	float	tangentialAccel;
 	ccColorF	color;
@@ -45,13 +44,13 @@ typedef struct sParticle
 	float elapsed;
 	
 	/// Gravity of the particles
-	cpVect gravity;
+	CGPoint gravity;
 
 	// position is from &quot;superclass&quot; CocosNode
 	// Emitter source position
-	cpVect source;
+	CGPoint source;
 	// Position variance
-	cpVect posVar;
+	CGPoint posVar;
 	
 	// The angle (direction) of the particles measured in degrees
 	float angle;
@@ -113,12 +112,12 @@ typedef struct sParticle
 	
 	// Array of (x,y,size) 
 	ccPointSprite *vertices;
-	// Array of colors
-	ccColorF	*colors;
+//	// Array of colors
+//	ccColorF	*colors;
 	// vertices buffer id
 	GLuint	verticesID;
-	// colors buffer id
-	GLuint	colorsID;
+//	// colors buffer id
+//	GLuint	colorsID;
 	
 	//  particle idx
 	int particleIdx;
@@ -129,13 +128,13 @@ typedef struct sParticle
 /** Quantity of particles that are being simulated at the moment */
 @property (readonly) int	particleCount;
 /** Gravity value */
-@property (readwrite,assign) cpVect gravity;
+@property (readwrite,assign) CGPoint gravity;
 /** How many seconds the emitter wil run. -1 means 'forever' */
 @property (readwrite,assign) float duration;
 /** Source location of particles respective to emitter location */
-@property (readwrite,assign) cpVect source;
+@property (readwrite,assign) CGPoint source;
 /** Position variance of the emitter */
-@property (readwrite,assign) cpVect posVar;
+@property (readwrite,assign) CGPoint posVar;
 /** life, and life variation of each particle */
 @property (readwrite,assign) float life;
 /** life variance of each particle */
@@ -172,6 +171,8 @@ typedef struct sParticle
 @property (readwrite,assign) float emissionRate;
 /** maximum particles of the system */
 @property (readwrite,assign) int totalParticles;
+/** texture used to render the particles */
+@property (readwrite, retain) Texture2D * texture;
 
 //! Initializes a system with a fixed number of particles
 -(id) initWithTotalParticles:(int) numberOfParticles;
@@ -179,12 +180,10 @@ typedef struct sParticle
 -(BOOL) addParticle;
 //! Initializes a particle
 -(void) initParticle: (Particle*) particle;
-//! draw all the particles
--(void) draw;
-//! stop the running system
+//! stop emitting particles. Running particles will continue to run until they die
 -(void) stopSystem;
-//! reset the system
+//! Kill all living particles.
 -(void) resetSystem;
-//! is the system full ?
+//! whether or not the system is full
 -(BOOL) isFull;
 @end</diff>
      <filename>Support/Cocos2d/cocos2d/Particle.h</filename>
    </modified>
    <modified>
      <diff>@@ -30,7 +30,8 @@
 #import &quot;ccMacros.h&quot;
 
 // support
-#import &quot;OpenGL_Internal.h&quot;
+#import &quot;Support/OpenGL_Internal.h&quot;
+#import &quot;Support/CGPointExtension.h&quot;
 
 @implementation ParticleSystem
 @synthesize active, duration;
@@ -47,6 +48,7 @@
 @synthesize totalParticles;
 @synthesize size, sizeVar;
 @synthesize gravity;
+@synthesize texture;
 
 -(id) init {
 	NSException* myException = [NSException
@@ -58,42 +60,38 @@
 
 -(id) initWithTotalParticles:(int) numberOfParticles
 {
-	if( !(self=[super init]) )
-		return nil;
+	if( (self=[super init]) ) {
 
-	totalParticles = numberOfParticles;
-	
-	particles = malloc( sizeof(Particle) * totalParticles );
-	vertices = malloc( sizeof(ccPointSprite) * totalParticles );
-	colors = malloc (sizeof(ccColorF) * totalParticles);
-
-	if( ! ( particles &amp;&amp;vertices &amp;&amp; colors ) ) {
-		NSLog(@&quot;Particle system: not enough memory&quot;);
-		if( particles )
-			free(particles);
-		if( vertices )
-			free(vertices);
-		if( colors )
-			free(colors);
-		return nil;
-	}
-	
-	bzero( particles, sizeof(Particle) * totalParticles );
-	
-	// default, active
-	active = YES;
-	
-	// default: additive
-	blendAdditive = NO;
-	
-	// default: modulate
-	// XXX: not used
-//	colorModulate = YES;
+		totalParticles = numberOfParticles;
+		
+		particles = malloc( sizeof(Particle) * totalParticles );
+		vertices = malloc( sizeof(ccPointSprite) * totalParticles );
+
+		if( ! ( particles &amp;&amp;vertices ) ) {
+			NSLog(@&quot;Particle system: not enough memory&quot;);
+			if( particles )
+				free(particles);
+			if( vertices )
+				free(vertices);
+			return nil;
+		}
+		
+		bzero( particles, sizeof(Particle) * totalParticles );
 		
-	glGenBuffers(1, &amp;verticesID);
-	glGenBuffers(1, &amp;colorsID);	
+		// default, active
+		active = YES;
+		
+		// default: additive
+		blendAdditive = NO;
+		
+		// default: modulate
+		// XXX: not used
+	//	colorModulate = YES;
+			
+		glGenBuffers(1, &amp;verticesID);
 
-	[self schedule:@selector(step:)];
+		[self schedule:@selector(step:)];
+	}
 
 	return self;
 }
@@ -102,9 +100,7 @@
 {
 	free( particles );
 	free(vertices);
-	free(colors);
 	glDeleteBuffers(1, &amp;verticesID);
-	glDeleteBuffers(1, &amp;colorsID);
 
 	[texture release];
 	
@@ -126,18 +122,18 @@
 
 -(void) initParticle: (Particle*) particle
 {
-	cpVect v;
+	CGPoint v;
 
 	// position
-	particle-&gt;pos.x = source.x + posVar.x * CCRANDOM_MINUS1_1();
-	particle-&gt;pos.y = source.y + posVar.y * CCRANDOM_MINUS1_1();
+	particle-&gt;pos.x = (int) (source.x + posVar.x * CCRANDOM_MINUS1_1());
+	particle-&gt;pos.y = (int) (source.y + posVar.y * CCRANDOM_MINUS1_1());
 	
 	// direction
-	float a = (cpFloat)CC_DEGREES_TO_RADIANS( angle + angleVar * CCRANDOM_MINUS1_1() );
+	float a = (CGFloat)CC_DEGREES_TO_RADIANS( angle + angleVar * CCRANDOM_MINUS1_1() );
 	v.y = sinf( a );
 	v.x = cosf( a );
 	float s = speed + speedVar * CCRANDOM_MINUS1_1();
-	particle-&gt;dir = cpvmult( v, s );
+	particle-&gt;dir = ccpMult( v, s );
 	
 	// radial accel
 	particle-&gt;radialAccel = radialAccel + radialAccelVar * CCRANDOM_MINUS1_1();
@@ -194,27 +190,27 @@
 
 		if( p-&gt;life &gt; 0 ) {
 
-			cpVect tmp, radial, tangential;
+			CGPoint tmp, radial, tangential;
 
-			radial = cpvzero;
+			radial = CGPointZero;
 			// radial acceleration
 			if(p-&gt;pos.x || p-&gt;pos.y)
-				radial = cpvnormalize(p-&gt;pos);
+				radial = ccpNormalize(p-&gt;pos);
 			tangential = radial;
-			radial = cpvmult(radial, p-&gt;radialAccel);
+			radial = ccpMult(radial, p-&gt;radialAccel);
 
 			// tangential acceleration
 			float newy = tangential.x;
 			tangential.x = -tangential.y;
 			tangential.y = newy;
-			tangential = cpvmult(tangential, p-&gt;tangentialAccel);
+			tangential = ccpMult(tangential, p-&gt;tangentialAccel);
 
 			// (gravity + radial + tangential) * dt
-			tmp = cpvadd( cpvadd( radial, tangential), gravity);
-			tmp = cpvmult( tmp, dt);
-			p-&gt;dir = cpvadd( p-&gt;dir, tmp);
-			tmp = cpvmult(p-&gt;dir, dt);
-			p-&gt;pos = cpvadd( p-&gt;pos, tmp );
+			tmp = ccpAdd( ccpAdd( radial, tangential), gravity);
+			tmp = ccpMult( tmp, dt);
+			p-&gt;dir = ccpAdd( p-&gt;dir, tmp);
+			tmp = ccpMult(p-&gt;dir, dt);
+			p-&gt;pos = ccpAdd( p-&gt;pos, tmp );
 
 			p-&gt;color.r += (p-&gt;deltaColor.r * dt);
 			p-&gt;color.g += (p-&gt;deltaColor.g * dt);
@@ -227,9 +223,7 @@
 			vertices[particleIdx].x = p-&gt;pos.x;
 			vertices[particleIdx].y = p-&gt;pos.y;
 			vertices[particleIdx].size = p-&gt;size;
-
-			// colors
-			colors[particleIdx] = p-&gt;color;
+			vertices[particleIdx].colors = p-&gt;color;
 
 			// update particle counter
 			particleIdx++;
@@ -244,8 +238,6 @@
 
 	glBindBuffer(GL_ARRAY_BUFFER, verticesID);
 	glBufferData(GL_ARRAY_BUFFER, sizeof(ccPointSprite)*totalParticles, vertices,GL_DYNAMIC_DRAW);
-	glBindBuffer(GL_ARRAY_BUFFER, colorsID);
-	glBufferData(GL_ARRAY_BUFFER, sizeof(ccColorF)*totalParticles, colors,GL_DYNAMIC_DRAW);
 	glBindBuffer(GL_ARRAY_BUFFER, 0);
 }
 
@@ -258,8 +250,12 @@
 
 -(void) resetSystem
 {
-	elapsed = duration;
-	emitCounter = 0;
+	active = YES;
+	elapsed = 0;
+	for(particleIdx = 0; particleIdx &lt; particleCount; ++particleIdx) {
+		Particle *p = &amp;particles[particleIdx];
+		p-&gt;life = 0;
+	}
 }
 
 -(void) draw
@@ -281,8 +277,7 @@
 	glPointSizePointerOES(GL_FLOAT,sizeof(ccPointSprite),(GLvoid*) (sizeof(GL_FLOAT)*2));
 	
 	glEnableClientState(GL_COLOR_ARRAY);
-	glBindBuffer(GL_ARRAY_BUFFER, colorsID);
-	glColorPointer(4,GL_FLOAT,0,0);
+	glColorPointer(4, GL_FLOAT, sizeof(ccPointSprite),(GLvoid*) (sizeof(GL_FLOAT)*3));
 
 	// save blend state
 //	glGetIntegerv(GL_BLEND_DST, &amp;blendDst);</diff>
      <filename>Support/Cocos2d/cocos2d/Particle.m</filename>
    </modified>
    <modified>
      <diff>@@ -84,8 +84,7 @@
 	size = 8.0f;
 	sizeVar = 2.0f;
 
-	texture = [[TextureMgr sharedTextureMgr] addImage: @&quot;fire.png&quot;];
-	[texture retain];
+	self.texture = [[TextureMgr sharedTextureMgr] addImage: @&quot;fire.png&quot;];
 
 	// additive
 	blendAdditive = NO;
@@ -162,8 +161,7 @@
 	endColorVar.b = 0.0f;
 	endColorVar.a = 0.0f;
 	
-	texture = [[TextureMgr sharedTextureMgr] addImage: @&quot;fire.png&quot;];
-	[texture retain];
+	self.texture = [[TextureMgr sharedTextureMgr] addImage: @&quot;fire.png&quot;];
 	
 	// additive
 	blendAdditive = YES;
@@ -243,8 +241,7 @@
 	endColorVar.b = 0.0f;
 	endColorVar.a = 0.0f;
 	
-	texture = [[TextureMgr sharedTextureMgr] addImage: @&quot;fire.png&quot;];
-	[texture retain];
+	self.texture = [[TextureMgr sharedTextureMgr] addImage: @&quot;fire.png&quot;];
 	
 	return self;
 }
@@ -322,8 +319,7 @@
 	endColorVar.b = 0.0f;
 	endColorVar.a = 0.0f;
 	
-	texture = [[TextureMgr sharedTextureMgr] addImage: @&quot;fire.png&quot;];
-	[texture retain];
+	self.texture = [[TextureMgr sharedTextureMgr] addImage: @&quot;fire.png&quot;];
 
 	// additive
 	blendAdditive = YES;
@@ -404,8 +400,7 @@
 	endColorVar.b = 0.0f;
 	endColorVar.a = 0.0f;
 	
-	texture = [[TextureMgr sharedTextureMgr] addImage: @&quot;fire.png&quot;];
-	[texture retain];
+	self.texture = [[TextureMgr sharedTextureMgr] addImage: @&quot;fire.png&quot;];
 
 	// additive
 	blendAdditive = YES;
@@ -486,8 +481,7 @@
 	endColorVar.b = 0.0f;
 	endColorVar.a = 0.0f;
 	
-	texture = [[TextureMgr sharedTextureMgr] addImage: @&quot;fire.png&quot;];
-	[texture retain];
+	self.texture = [[TextureMgr sharedTextureMgr] addImage: @&quot;fire.png&quot;];
 	
 	// additive
 	blendAdditive = YES;
@@ -568,8 +562,7 @@
 	endColorVar.b = 0.5f;
 	endColorVar.a = 0.0f;
 	
-	texture = [[TextureMgr sharedTextureMgr] addImage: @&quot;fire.png&quot;];
-	[texture retain];
+	self.texture = [[TextureMgr sharedTextureMgr] addImage: @&quot;fire.png&quot;];
 
 	// additive
 	blendAdditive = NO;
@@ -650,8 +643,7 @@
 	endColorVar.b = 0.5f;
 	endColorVar.a = 0.0f;
 	
-	texture = [[TextureMgr sharedTextureMgr] addImage: @&quot;fire.png&quot;];
-	[texture retain];
+	self.texture = [[TextureMgr sharedTextureMgr] addImage: @&quot;fire.png&quot;];
 
 	// additive
 	blendAdditive = NO;
@@ -728,8 +720,7 @@
 	endColorVar.b = 0.0f;
 	endColorVar.a = 0.0f;
 	
-	texture = [[TextureMgr sharedTextureMgr] addImage: @&quot;fire.png&quot;];
-	[texture retain];
+	self.texture = [[TextureMgr sharedTextureMgr] addImage: @&quot;fire.png&quot;];
 	
 	// additive
 	blendAdditive = NO;
@@ -807,8 +798,7 @@
 	endColorVar.b = 0.0f;
 	endColorVar.a = 0.0f;
 	
-	texture = [[TextureMgr sharedTextureMgr] addImage: @&quot;fire.png&quot;];
-	[texture retain];
+	self.texture = [[TextureMgr sharedTextureMgr] addImage: @&quot;fire.png&quot;];
 	
 	// additive
 	blendAdditive = NO;
@@ -886,8 +876,7 @@
 	endColorVar.b = 0.0f;
 	endColorVar.a = 0.0f;
 	
-	texture = [[TextureMgr sharedTextureMgr] addImage: @&quot;fire.png&quot;];
-	[texture retain];
+	self.texture = [[TextureMgr sharedTextureMgr] addImage: @&quot;fire.png&quot;];
 	
 	// additive
 	blendAdditive = NO;</diff>
      <filename>Support/Cocos2d/cocos2d/ParticleSystems.m</filename>
    </modified>
    <modified>
      <diff>@@ -12,23 +12,57 @@
  *
  */
 
+/**
+ @file
+ Drawing OpenGL ES primitives.
+  - drawPoint
+  - drawLine
+  - drawPoly
+  - drawCircle
+ 
+ You can change the color, width and other property by calling the
+ glColor4ub(), glLineWitdh(), glPointSize().
+ 
+ @warning These functions draws the Line, Point, Polygon, immediately. They aren't batched. If you are going to make a game that depends on these primitives, I suggest creating a batch.
+ */
+
+#import &lt;CoreGraphics/CGGeometry.h&gt;	// for CGPoint
+#import &lt;objc/objc.h&gt;				// for BOOL
 
-/** draws a point given x and y coordinate
- * @warning This function needs optimizations. Try not to use it.
+/** draws a point given point.
+ @deprecated Use drawPoint() instead. Will be removed in v0.8
  */
-void drawPoint( float x, float y );
+void drawPointDeprecated( float x, float y ) __attribute__((deprecated));
 
-/** draws a line given x1,y1 and x2,y2 coordinates
- * @warning This function needs optimizations. Try not to use it.
+/** draws a point given x and y coordinate */
+void drawPoint( CGPoint point );
+
+/** draws an array of points.
+ @since v0.7.2
  */
-void drawLine(float x1, float y1, float x2, float y2);
+void drawPoints( CGPoint *points, unsigned int numberOfPoints );
+
+/** draws a line given x1,y1 and x2,y2 coordinates
+@deprecated Use drawLine() instead. Will be removed in v0.8
+*/
+void drawLineDeprecated(float x1, float y1, float x2, float y2) __attribute__((deprecated));
+
+/** draws a line given the origin and destination point */
+void drawLine( CGPoint origin, CGPoint destination );
 
 /** draws a poligon given a pointer to float coordiantes and the number of vertices
- * @warning This function needs optimizations. Try not to use it.
+ @deprecated Use drawPoly(vertices, numOfVertices, open) instead
  */
-void drawPoly( float *poli, int points );
+void drawPolyDeprecated( float *poli, int points ) __attribute__((deprecated));
 
-/** draws a circle given the center, radius and number of segments
- * @warning This function needs optimizations. Try not to use it.
+/** draws a poligon given a pointer to CGPoint coordiantes and the number of vertices. The polygon can be closed or open
  */
-void drawCircle( float x, float y, float radius, float angle, int segs);
+void drawPoly( CGPoint *vertices, int numOfVertices, BOOL closePolygon );
+
+/** draws a circle given the center, radius and number of segments.
+ @deprecated Use drawCircle() instead. Will be removed in v0.8
+ */
+void drawCircleDeprecated( float x, float y, float radius, float angle, int segs) __attribute__((deprecated));
+
+/** draws a circle given the center, radius and number of segments. */
+void drawCircle( CGPoint center, float radius, float angle, int segments, BOOL drawLineToCenter);</diff>
      <filename>Support/Cocos2d/cocos2d/Primitives.h</filename>
    </modified>
    <modified>
      <diff>@@ -17,7 +17,99 @@
 #import &lt;stdlib.h&gt;
 #import &lt;string.h&gt;
 
-void drawPoint( float x, float y )
+#import &quot;Primitives.h&quot;
+
+void drawPoint( CGPoint point )
+{
+	glVertexPointer(2, GL_FLOAT, 0, &amp;point);
+	glEnableClientState(GL_VERTEX_ARRAY);
+	
+	glDrawArrays(GL_POINTS, 0, 1);
+	
+	glDisableClientState(GL_VERTEX_ARRAY);	
+}
+
+void drawPoints( CGPoint *points, unsigned int numberOfPoints )
+{
+	glVertexPointer(2, GL_FLOAT, 0, points);
+	glEnableClientState(GL_VERTEX_ARRAY);
+	
+	glDrawArrays(GL_POINTS, 0, numberOfPoints);
+	
+	glDisableClientState(GL_VERTEX_ARRAY);	
+}
+
+
+void drawLine( CGPoint origin, CGPoint destination )
+{
+	CGPoint vertices[2];
+	
+	vertices[0] = origin;
+	vertices[1] = destination;
+	
+	glVertexPointer(2, GL_FLOAT, 0, vertices);
+	glEnableClientState(GL_VERTEX_ARRAY);
+	
+	glDrawArrays(GL_LINES, 0, 2);
+	
+	glDisableClientState(GL_VERTEX_ARRAY);
+}
+
+
+void drawPoly( CGPoint *poli, int points, BOOL closePolygon )
+{
+	glVertexPointer(2, GL_FLOAT, 0, poli);
+	glEnableClientState(GL_VERTEX_ARRAY);
+	
+	if( closePolygon )
+		glDrawArrays(GL_LINE_LOOP, 0, points);
+	else
+		glDrawArrays(GL_LINE_STRIP, 0, points);
+	
+	glDisableClientState(GL_VERTEX_ARRAY);
+}
+
+void drawCircle( CGPoint center, float r, float a, int segs, BOOL drawLineToCenter)
+{
+	int additionalSegment = 1;
+	if (drawLineToCenter)
+		additionalSegment++;
+
+	const float coef = 2.0f * (float)M_PI/segs;
+	
+	float *vertices = malloc( sizeof(float)*2*(segs+2));
+	if( ! vertices )
+		return;
+	
+	memset( vertices,0, sizeof(float)*2*(segs+2));
+	
+	for(int i=0;i&lt;=segs;i++)
+	{
+		float rads = i*coef;
+		float j = r * cosf(rads + a) + center.x;
+		float k = r * sinf(rads + a) + center.y;
+		
+		vertices[i*2] = j;
+		vertices[i*2+1] =k;
+	}
+	vertices[(segs+1)*2] = center.x;
+	vertices[(segs+1)*2+1] = center.y;
+	
+	glVertexPointer(2, GL_FLOAT, 0, vertices);
+	glEnableClientState(GL_VERTEX_ARRAY);
+	
+	glDrawArrays(GL_LINE_STRIP, 0, segs+additionalSegment);
+	
+	glDisableClientState(GL_VERTEX_ARRAY);
+	
+	free( vertices );
+}
+
+
+#pragma mark -
+#pragma mark Deprecated
+
+void drawPointDeprecated( float x, float y )
 {
 	GLfloat vertices[1 * 2];
 	
@@ -31,7 +123,7 @@ void drawPoint( float x, float y )
 	glDisableClientState(GL_VERTEX_ARRAY);	
 }
 
-void drawLine(float x1, float y1, float x2, float y2)
+void drawLineDeprecated(float x1, float y1, float x2, float y2)
 {
 	GLfloat vertices[2 * 2];
 	
@@ -48,7 +140,7 @@ void drawLine(float x1, float y1, float x2, float y2)
 	glDisableClientState(GL_VERTEX_ARRAY);
 }
 
-void drawPoly( float *poli, int points )
+void drawPolyDeprecated( float *poli, int points )
 {
 	glVertexPointer(2, GL_FLOAT, 0, poli);
 	glEnableClientState(GL_VERTEX_ARRAY);
@@ -58,7 +150,7 @@ void drawPoly( float *poli, int points )
 	glDisableClientState(GL_VERTEX_ARRAY);
 }
 
-void drawCircle( float x, float y, float r, float a, int segs)
+void drawCircleDeprecated( float x, float y, float r, float a, int segs)
 {
 	const float coef = 2.0f * (float)M_PI/segs;
 	
@@ -73,7 +165,7 @@ void drawCircle( float x, float y, float r, float a, int segs)
 		float rads = i*coef;
 		float j = r * cosf(rads + a) + x;
 		float k = r * sinf(rads + a) + y;
-
+		
 		vertices[i*2] = j;
 		vertices[i*2+1] =k;
 	}</diff>
      <filename>Support/Cocos2d/cocos2d/Primitives.m</filename>
    </modified>
    <modified>
      <diff>@@ -18,16 +18,22 @@
 
 #import &quot;ccTypes.h&quot;
 
+typedef void (*TICK_IMP)(id, SEL, ccTime);
+
 //
 // Timer
 //
 /** Light weight timer */
 @interface Timer : NSObject
 {
-	NSInvocation* invocation;
+	id target;
+	SEL selector;
+	TICK_IMP impMethod;
+	
 	ccTime interval;
-	ccTime elapsed; 
+	ccTime elapsed;
 }
+
 @property (readwrite,assign) ccTime interval;
 
 /** constructor for timer */</diff>
      <filename>Support/Cocos2d/cocos2d/Scheduler.h</filename>
    </modified>
    <modified>
      <diff>@@ -13,9 +13,8 @@
  */
 
 // cocos2d imports
-#import &quot;ccMacros.h&quot;
 #import &quot;Scheduler.h&quot;
-
+#import &quot;ccMacros.h&quot;
 
 //
 // Timer
@@ -52,19 +51,16 @@
 -(id) initWithTarget:(id) t selector:(SEL)s interval:(ccTime) seconds
 {
 	if( (self=[super init]) ) {
-	
-		interval = seconds;
-		elapsed = 0;
-
-		NSMethodSignature * sig = [[t class] instanceMethodSignatureForSelector:s];
+#ifdef DEBUG
+		NSMethodSignature *sig = [t methodSignatureForSelector:s];
 		NSAssert(sig !=0 , @&quot;Signature not found for selector - does it have the following form? -(void) name: (ccTime) dt&quot;);
+#endif
 		
-		invocation = [NSInvocation invocationWithMethodSignature:sig];
-		[invocation setTarget:t];
-		[invocation setSelector:s];
-		[invocation retainArguments];
+		target = [t retain];
+		selector = s;
+		impMethod = (TICK_IMP) [t methodForSelector:s];
 		
-		[invocation retain];
+		interval = seconds;
 	}
 	return self;
 }
@@ -72,7 +68,8 @@
 -(void) dealloc
 {
 	CCLOG( @&quot;deallocing %@&quot;, self);
-	[invocation release];
+	
+	[target release];
 	[super dealloc];
 }
 
@@ -80,9 +77,7 @@
 {
 	elapsed += dt;
 	if( elapsed &gt;= interval ) {
-		[invocation setArgument:&amp;elapsed atIndex:2];
-		[invocation invoke];
-		
+		impMethod(target, selector, elapsed);
 		elapsed = 0;
 	}
 }
@@ -215,7 +210,6 @@ static Scheduler *sharedScheduler;
 		[scheduledMethods addObject:k];
 	[methodsToAdd removeAllObjects];
 	
-	
 	for( Timer *t in scheduledMethods )
 		[t fire: dt];
 }</diff>
      <filename>Support/Cocos2d/cocos2d/Scheduler.m</filename>
    </modified>
    <modified>
      <diff>@@ -36,9 +36,15 @@
  */
 @interface Sprite : TextureNode &lt;CocosNodeFrames&gt;
 {
-	NSMutableDictionary *animations;	
+	NSMutableDictionary *animations;
+	
+	// CocosNodeFrames protocol
+	BOOL	_autoCenterFrames;
 }
 
+/** whether or not the new frames will be auto centered */
+@property (readwrite,assign) BOOL autoCenterFrames;
+
 /** creates an sprite with an image file */
 + (id) spriteWithFile:(NSString *)imageFile;
 /** creates an sprite with a PVRTC image file</diff>
      <filename>Support/Cocos2d/cocos2d/Sprite.h</filename>
    </modified>
    <modified>
      <diff>@@ -15,6 +15,7 @@
 #import &quot;TextureMgr.h&quot;
 #import &quot;Sprite.h&quot;
 #import &quot;ccMacros.h&quot;
+#import &quot;Support/CGPointExtension.h&quot;
 
 #pragma mark Sprite
 
@@ -25,6 +26,8 @@
 
 @implementation Sprite
 
+@synthesize autoCenterFrames = _autoCenterFrames;
+
 #pragma mark Sprite - image file
 + (id) spriteWithFile:(NSString*) filename
 {
@@ -35,7 +38,15 @@
 {
 	self = [super init];
 	if( self ) {
-		self.texture = [[[TextureMgr sharedTextureMgr] addImage: filename] retain];
+		// texture is retained
+		self.texture = [[TextureMgr sharedTextureMgr] addImage: filename];
+		
+		CGSize s = self.texture.contentSize;
+		transformAnchor = ccp(s.width/2, s.height/2);
+		_autoCenterFrames = NO;
+		
+		// lazy alloc
+		animations = nil;
 	}
 	
 	return self;
@@ -50,10 +61,14 @@
 
 - (id) initWithPVRTCFile: (NSString*) fileimage bpp:(int)bpp hasAlpha:(BOOL)alpha width:(int)w
 {
-	self=[super init];
-	if( self ) {
-		self.texture = [[[TextureMgr sharedTextureMgr] addPVRTCImage:fileimage bpp:bpp hasAlpha:alpha width:w] retain];
+	if((self=[super init])) {
+		// texture is retained
+		self.texture = [[TextureMgr sharedTextureMgr] addPVRTCImage:fileimage bpp:bpp hasAlpha:alpha width:w];
 		
+		CGSize s = self.texture.contentSize;
+		transformAnchor = ccp(s.width/2, s.height/2);
+		_autoCenterFrames = NO;
+
 		// lazy alloc
 		animations = nil;
 	}
@@ -72,8 +87,13 @@
 {
 	self = [super init];
 	if( self ) {
-		self.texture = [[[TextureMgr sharedTextureMgr] addCGImage: image] retain];
+		// texture is retained
+		self.texture = [[TextureMgr sharedTextureMgr] addCGImage: image];
 		
+		CGSize s = self.texture.contentSize;
+		transformAnchor = ccp(s.width/2, s.height/2);
+		_autoCenterFrames = NO;
+
 		// lazy alloc
 		animations = nil;
 	}
@@ -90,9 +110,13 @@
 
 - (id) initWithTexture:(Texture2D*) tex
 {
-	self = [super init];
-	if( self ) {
-		self.texture = [tex retain];
+	if( (self = [super init]) ) {
+		// texture is retained
+		self.texture = tex;
+		
+		CGSize s = self.texture.contentSize;
+		transformAnchor = ccp(s.width/2, s.height/2);
+		_autoCenterFrames = NO;
 		
 		// lazy alloc
 		animations = nil;
@@ -105,15 +129,12 @@
 -(void) setTexture: (Texture2D *) aTexture
 {
 	super.texture = aTexture;
-	CGSize s = aTexture.contentSize;
-	self.transformAnchor = cpv(s.width/2, s.height/2);
 }
 
 #pragma mark Sprite
 
 -(void) dealloc
 {
-	[texture release];
 	[animations release];
 	[super dealloc];
 }
@@ -128,10 +149,12 @@
 //
 -(void) setDisplayFrame:(id)frame
 {
-	if( frame == texture )
-		return;
-	[texture release];
-	texture = [frame retain];	
+	self.texture = frame;
+	
+	if( _autoCenterFrames ) {
+		CGSize s = self.texture.contentSize;
+		self.transformAnchor = ccp(s.width/2, s.height/2);
+	}
 }
 
 -(void) setDisplayFrame: (NSString*) animationName index:(int) frameIndex
@@ -140,11 +163,13 @@
 		[self initAnimationDictionary];
 	
 	Animation *a = [animations objectForKey: animationName];
-	Texture2D *tex = [[a frames] objectAtIndex:frameIndex];
-	if( tex == texture )
-		return;
-	[texture release];
-	texture = [tex retain];
+	Texture2D *frame = [[a frames] objectAtIndex:frameIndex];
+	self.texture = frame;
+	
+	if( _autoCenterFrames ) {
+		CGSize s = self.texture.contentSize;
+		self.transformAnchor = ccp(s.width/2, s.height/2);
+	}	
 }
 
 -(BOOL) isFrameDisplayed:(id)frame</diff>
      <filename>Support/Cocos2d/cocos2d/Sprite.m</filename>
    </modified>
    <modified>
      <diff>@@ -7,6 +7,11 @@
 //#ifndef TGA_LIB
 //#define TGA_LIB
 
+/**
+ @file
+ TGA image support
+ */
+
 enum {
 	TGA_OK,
 	TGA_ERROR_FILE_OPEN,
@@ -32,19 +37,19 @@ typedef struct sImageTGA {
 	int flipped;
 } tImageTGA;
 
-// load the image header fields. We only keep those that matter!
+/// load the image header fields. We only keep those that matter!
 void tgaLoadHeader(FILE *file, tImageTGA *info);
 
-// loads the image pixels. You shouldn't call this function directly
+/// loads the image pixels. You shouldn't call this function directly
 void tgaLoadImageData(FILE *file, tImageTGA *info);
 
-// this is the function to call when we want to load an image
+/// this is the function to call when we want to load an image
 tImageTGA * tgaLoad(const char *filename);
 
-// converts RGB to greyscale
+// /converts RGB to greyscale
 void tgaRGBtogreyscale(tImageTGA *info);
 
-// releases the memory used for the image
+/// releases the memory used for the image
 void tgaDestroy(tImageTGA *info);
 
 //#endif // TGA_LIB</diff>
      <filename>Support/Cocos2d/cocos2d/Support/TGAlib.h</filename>
    </modified>
    <modified>
      <diff>@@ -8,7 +8,14 @@
 
 #import &lt;OpenGLES/ES1/gl.h&gt;
 
+/**
+ @file
+ cocos2d OpenGL GLU implementation
+ */
+
+/** OpenGL gluLookAt implementation */
 void gluLookAt(float eyeX, float eyeY, float eyeZ, float lookAtX, float lookAtY, float lookAtZ, float upX, float upY, float upZ);
+/** OpenGL gluPerspective implementation */
 void gluPerspective(GLfloat fovy, GLfloat aspect, GLfloat zNear, GLfloat zFar);
 
 #endif /* __COCOS2D_GLU_H */</diff>
      <filename>Support/Cocos2d/cocos2d/Support/glu.h</filename>
    </modified>
    <modified>
      <diff>@@ -15,60 +15,109 @@
 #import &quot;Texture2D.h&quot;
 #import &quot;ccTypes.h&quot;
 
-/** A class that implements a basic Texture Atlas
- * The Texture Atlas supports vertex array and color array.
+/** A class that implements a Texture Atlas.
+ Supported features:
+   * The atlas file can be a PVRTC, PNG or any other fomrat supported by Texture2D
+   * Quads can be udpated in runtime
+   * Quads can be added in runtime
+   * Quads can be removed in runtime
+   * Quads can be re-ordered in runtime
+   * The TextureAtlas capacity can be increased or decreased in runtime
+   * Color array created on demand
+ The quads are rendered using an OpenGL ES vertex array list
  */
 @interface TextureAtlas : NSObject {
-	NSUInteger			totalQuads;
+	NSUInteger			totalQuads_;
+	NSUInteger			capacity_;
 	ccQuad2		*texCoordinates;
-	ccQuad3		*vertices;
+	ccQuad3		*vertexCoordinates;
 	ccColorB	*colors;			// RGBA for each vertex
 	GLushort	*indices;
 	Texture2D	*texture;
 	
-	BOOL		_withColorArray;
+	BOOL		withColorArray_;
 }
 
+/** quantity of quads that are going to be drawn */
 @property (readonly) NSUInteger totalQuads;
+/** quantity of quads that can be stored with the current texture atlas size */
+@property (readonly) NSUInteger capacity;
+/** Texture of the texture atlas */
 @property (nonatomic,retain) Texture2D *texture;
+/** whether or not the TextureAtlas object is using a color array */
 @property (readonly) BOOL withColorArray;
 
-/** creates a TextureAtlas with an iname filename and with a capacity for n Quads
- * n is the number of Quads that will be rendered at once from this Atlas
- * n is the maximun number of Quads it will be able to render, but not the minimun
+/** creates a TextureAtlas with an filename and with an initial capacity for Quads.
+ * The TextureAtlas capacity can be increased in runtime.
  */
-+(id) textureAtlasWithFile:(NSString*)file capacity: (NSUInteger) n;
++(id) textureAtlasWithFile:(NSString*)file capacity:(NSUInteger)capacity;
 
-/** initializes a TextureAtlas with an iname filename and with a capacity for n Quads
- * n is the number of Quads that will be rendered at once from this Atlas
- * n is the maximun number of Quads it will be able to render, but not the minimun
+/** initializes a TextureAtlas with a filename and with a certain capacity for Quads.
+ * The TextureAtlas capacity can be increased in runtime.
  */
--(id) initWithFile: (NSString*) file capacity:(NSUInteger)n;
+-(id) initWithFile: (NSString*) file capacity:(NSUInteger)capacity;
 
 /** creates a TextureAtlas with a previously initialized Texture2D object, and
- * with an initial capacity for n Quads.  n is the number of Quads that can be rendered
- * at once with this Atlas.
+ * with an initial capacity for n Quads. 
+ * The TextureAtlas capacity can be increased in runtime.
  */
-+(id) textureAtlasWithTexture:(Texture2D *)tex capacity:(NSUInteger)n;
++(id) textureAtlasWithTexture:(Texture2D *)tex capacity:(NSUInteger)capacity;
 
 /** initializes a TextureAtlas with a previously initialized Texture2D object, and
- * with an initial capacity for n Quads.  n is the number of Quads that can be rendered
- * at once with this Atlas.
+ * with an initial capacity for Quads. 
+ * The TextureAtlas capacity can be increased in runtime.
  */
--(id) initWithTexture:(Texture2D *)tex capacity:(NSUInteger)n;
+-(id) initWithTexture:(Texture2D *)tex capacity:(NSUInteger)capacity;
 
 /** updates a certain texture coordinate &amp; vertex with new Quads.
- * n must be between 0 and the atlas capacity - 1
- * The default value of all of the Quads is 0,0,0,0,0,0,0,0, so this selector
- * must be called to initializes every Quad
+ * index must be between 0 and the atlas capacity - 1
  */
--(void) updateQuadWithTexture: (ccQuad2*) quadT vertexQuad:(ccQuad3*) quadV atIndex:(NSUInteger) n;
+-(void) updateQuadWithTexture: (ccQuad2*) quadT vertexQuad:(ccQuad3*) quadV atIndex:(NSUInteger)index;
 
 /** updates the color (RGBA) for a certain quad
  * The 4 vertices of the Quad will be updated with this new quad color
  */
 -(void) updateColorWithColorQuad:(ccColorB*)color atIndex:(NSUInteger)n;
 
+/** updates a certain texture coordinate &amp; vertex with new Quads.
+ * index must be between 0 and the atlas capacity - 1
+ */
+-(void) updateQuadWithTexture:(ccQuad2*)texCoords vertexQuad:(ccQuad3*)vertexCoords atIndex:(NSUInteger)index;
+
+/** Inserts a Quad with texture coordinate &amp; vertex coords at a certain index.
+ index must be between 0 and the atlas capacity - 1
+ @since v0.7.2
+ */
+-(void) insertQuadWithTexture:(ccQuad2*)texCoords vertexQuad:(ccQuad3*)vertexCoords atIndex:(NSUInteger)index;
+
+/** Removes the quad that is located at a certain index and inserts it at a new index
+ This operation is faster than remove and insert in 2 different steps.
+ @since v0.7.2
+*/
+-(void) insertQuadFromIndex:(NSUInteger)fromIndex atIndex:(NSUInteger)newIndex;
+
+/** removes a quad at a given index number.
+ The capacity remains the same, but the total number of quads to be drawn is reduced in 1
+ @since v0.7.2
+ */
+-(void) removeQuadAtIndex:(NSUInteger) index;
+
+/** removes all Quads.
+ The TextureAtlas capacity remains untouched. No memory is freed.
+ The total number of quads to be drawn will be 0
+ @since v0.7.2
+ */
+-(void) removeAllQuads;
+ 
+
+/** resize the capacity of the Texture Atlas.
+ * The new capacity can be lower or higher than the current one
+ * It returns YES if the resize was successful.
+ * If it fails to resize the capacity it will return NO with a new capacity of 0.
+ */
+-(BOOL) resizeCapacity: (NSUInteger) n;
+
+
 /** draws n quads
  * n can't be greater than the capacity of the Atlas
  */
@@ -78,10 +127,4 @@
  */
 -(void) drawQuads;
 
-
-/** resize the capacity of the Texture Atlas.
- * The new capacity can be lower or higher
- */
--(void) resizeCapacity: (NSUInteger) n;
-
 @end</diff>
      <filename>Support/Cocos2d/cocos2d/TextureAtlas.h</filename>
    </modified>
    <modified>
      <diff>@@ -22,14 +22,15 @@
 
 @interface TextureAtlas (Private)
 -(void) initIndices;
--(void) initColorArray;
+-(BOOL) initColorArray;
 @end
 
 
 @implementation TextureAtlas
 
-@synthesize totalQuads, texture;
-@synthesize withColorArray = _withColorArray;
+@synthesize totalQuads = totalQuads_, capacity = capacity_;
+@synthesize texture;
+@synthesize withColorArray = withColorArray_;
 
 #pragma mark TextureAtlas - alloc &amp; init
 
@@ -56,30 +57,25 @@
 	if( ! (self=[super init]) )
 		return nil;
 	
-	totalQuads = n;
+	capacity_ = n;
 	
 	// retained in property
 	self.texture = tex;
 
-	_withColorArray = NO;
+	withColorArray_ = NO;
 
-	texCoordinates = malloc( sizeof(texCoordinates[0]) * totalQuads );
-	vertices = malloc( sizeof(vertices[0]) * totalQuads );
-	indices = malloc( sizeof(indices[0]) * totalQuads * 6 );
+	texCoordinates = malloc( sizeof(texCoordinates[0]) * capacity_ );
+	vertexCoordinates = malloc( sizeof(vertexCoordinates[0]) * capacity_ );
+	indices = malloc( sizeof(indices[0]) * capacity_ * 6 );
 	
-	if( ! ( texCoordinates &amp;&amp; vertices &amp;&amp; indices) ) {
+	if( ! ( texCoordinates &amp;&amp; vertexCoordinates &amp;&amp; indices) ) {
 		NSLog(@&quot;TextureAtlas: not enough memory&quot;);
 		if( texCoordinates )
 			free(texCoordinates);
-		if( vertices )
-			free(vertices);
+		if( vertexCoordinates )
+			free(vertexCoordinates);
 		if( indices )
-			free(vertices);
-		return nil;
-	}
-		
-	if( _withColorArray &amp;&amp; ! colors ) {
-		NSLog(@&quot;TextureAtlas: not enough memory&quot;);
+			free(indices);
 		return nil;
 	}
 
@@ -90,34 +86,48 @@
 
 - (NSString*) description
 {
-	return [NSString stringWithFormat:@&quot;&lt;%@ = %08X | totalQuads =  %i&gt;&quot;, [self class], self, totalQuads];
+	return [NSString stringWithFormat:@&quot;&lt;%@ = %08X | totalQuads =  %i&gt;&quot;, [self class], self, totalQuads_];
 }
 
 -(void) dealloc
 {
 	CCLOG(@&quot;deallocing %@&quot;,self);
 
-	free(vertices);
+	free(vertexCoordinates);
 	free(texCoordinates);
 	free(indices);
+	if(withColorArray_)
+		free(colors);
 	
 	[texture release];
 
 	[super dealloc];
 }
 
--(void) initColorArray
+-(BOOL) initColorArray
 {
-	if( ! _withColorArray ) {
-		colors = malloc( sizeof(colors[0]) * totalQuads * 4 );
-		memset(colors, 0xFF,  totalQuads * 4 * sizeof(colors[0]));
-		_withColorArray = YES;
+	if( !withColorArray_ ) {
+		colors = malloc( sizeof(colors[0]) * capacity_ * 4 );
+		if(!colors) {
+			CCLOG(@&quot;TextureAtlas#initColorArray: not enough memory&quot;);
+			// XXX: These kind of events should raise an exception instead of returning BOOL. 
+			// XXX: For the moment lets continue handling like these.
+			// XXX: But an exception hierarchy should be created
+			// XXX: And the library should work with try() catch().
+			return NO;
+		} else {
+			// default color: 255,255,255,255
+			memset(colors, 0xFF,  capacity_ * 4 * sizeof(colors[0]));
+			withColorArray_ = YES;
+		}
 	}
+	
+	return YES;
 }
 
 -(void) initIndices
 {
-	for( NSUInteger i=0;i&lt;totalQuads;i++) {
+	for( NSUInteger i=0;i&lt; capacity_;i++) {
 		indices[i*6+0] = i*4+0;
 		indices[i*6+1] = i*4+1;
 		indices[i*6+2] = i*4+2;
@@ -130,72 +140,205 @@
 	}
 }
 
-#pragma mark TextureAtlas - Updates
+#pragma mark TextureAtlas - Update, Insert, Move &amp; Remove
 
 -(void) updateQuadWithTexture: (ccQuad2*) quadT vertexQuad:(ccQuad3*) quadV atIndex:(NSUInteger) n
 {
 	
-	NSAssert( n &gt;= 0 &amp;&amp; n &lt; totalQuads, @&quot;updateQuadWithTexture: Invalid index&quot;);
+	NSAssert( n &gt;= 0 &amp;&amp; n &lt; capacity_, @&quot;updateQuadWithTexture: Invalid index&quot;);
+
+	totalQuads_ =  MAX( n+1, totalQuads_);
 
 	texCoordinates[n] = *quadT;
-	vertices[n] = *quadV;
+	vertexCoordinates[n] = *quadV;
 }
 
 -(void) updateColorWithColorQuad:(ccColorB*)color atIndex:(NSUInteger)n
 {
-	NSAssert( n &gt;= 0 &amp;&amp; n &lt; totalQuads, @&quot;updateColorWithQuadColor: Invalid index&quot;);
+	NSAssert( n &gt;= 0 &amp;&amp; n &lt; capacity_, @&quot;updateColorWithQuadColor: Invalid index&quot;);
 
-	if( ! _withColorArray )
+	totalQuads_ =  MAX( n+1, totalQuads_);
+	
+	if( ! withColorArray_ )
 		[self initColorArray];
-	for( int i=0;i&lt;4;i++)
-		colors[n*4+i] = *color;
+	
+	// initColorArray might fail
+
+	if( withColorArray_ ) {
+		for( int i=0;i&lt;4;i++)
+			colors[n*4+i] = *color;
+	}
 }
 
-#pragma mark TextureAtlas - Resize
+-(void) insertQuadWithTexture:(ccQuad2*)texCoords vertexQuad:(ccQuad3*)vertexCoords atIndex:(NSUInteger)index
+{
+	NSAssert( index &gt;= 0 &amp;&amp; index &lt; capacity_, @&quot;updateQuadWithTexture: Invalid index&quot;);
+	
+	totalQuads_++;
+	
+	NSUInteger remaining = (totalQuads_-1) - index;
+	
+	// last object doesn't need to be moved
+	if( remaining ) {
+		// tex coordinates
+		memmove( &amp;texCoordinates[index+1],&amp;texCoordinates[index], sizeof(texCoordinates[0]) * remaining );
+		// vertexCoordinates
+		memmove( &amp;vertexCoordinates[index+1], &amp;vertexCoordinates[index], sizeof(vertexCoordinates[0]) * remaining );
+		// colors
+		if(withColorArray_)
+			memmove(&amp;colors[(index+1)*4], &amp;colors[index*4], sizeof(colors[0]) * remaining * 4);
+	}
+	
+	texCoordinates[index] = *texCoords;
+	vertexCoordinates[index] = *vertexCoords;
+}
 
--(void) resizeCapacity: (NSUInteger) n
+
+-(void) insertQuadFromIndex:(NSUInteger)oldIndex atIndex:(NSUInteger)newIndex
 {
-	if( n == totalQuads )
+	NSAssert( newIndex &gt;= 0 &amp;&amp; newIndex &lt; totalQuads_, @&quot;insertQuadFromIndex:atIndex: Invalid index&quot;);
+	NSAssert( oldIndex &gt;= 0 &amp;&amp; oldIndex &lt; totalQuads_, @&quot;insertQuadFromIndex:atIndex: Invalid index&quot;);
+
+	if( oldIndex == newIndex )
 		return;
+
+	NSUInteger howMany = abs( oldIndex - newIndex);
+	int dst = oldIndex;
+	int src = oldIndex + 1;
+	if( oldIndex &gt; newIndex) {
+		dst = newIndex+1;
+		src = newIndex;
+	}
+
+	// tex coordinates
+	ccQuad2 texCoordsBackup = texCoordinates[oldIndex];
+	memmove( &amp;texCoordinates[dst],&amp;texCoordinates[src], sizeof(texCoordinates[0]) * howMany );
+	texCoordinates[newIndex] = texCoordsBackup;
+
+	// vertexCoordinates coordinates
+	ccQuad3 vertexQuadBackup = vertexCoordinates[oldIndex];
+	memmove( &amp;vertexCoordinates[dst], &amp;vertexCoordinates[src], sizeof(vertexCoordinates[0]) * howMany );
+	vertexCoordinates[newIndex] = vertexQuadBackup;
+
+	// colors
+	if( withColorArray_ ) {
+		ccColorB colorsBackup[4];
+
+		for(int i=0;i&lt;4;i++)
+			colorsBackup[i] = colors[oldIndex*4+i];
+		
+		memmove(&amp;colors[dst*4], &amp;colors[(src)*4], sizeof(colors[0]) * howMany * 4);
+
+		for(int i=0;i&lt;4;i++)
+			colors[newIndex*4+i] = colorsBackup[i];
+	}	
+}
+
+-(void) removeQuadAtIndex:(NSUInteger) index
+{
+	NSAssert( index &gt;= 0 &amp;&amp; index &lt; totalQuads_, @&quot;removeQuadAtIndex: Invalid index&quot;);
+	
+	NSUInteger remaining = (totalQuads_-1) - index;
+	
+	// last object doesn't need to be moved
+	if( remaining ) {
+		// tex coordinates
+		memmove( &amp;texCoordinates[index],&amp;texCoordinates[index+1], sizeof(texCoordinates[0]) * remaining );
+		// vertexCoordinates
+		memmove( &amp;vertexCoordinates[index], &amp;vertexCoordinates[index+1], sizeof(vertexCoordinates[0]) * remaining );
+		// colors
+		if(withColorArray_)
+			memmove(&amp;colors[index*4], &amp;colors[(index+1)*4], sizeof(colors[0]) * remaining * 4);
+	}
 	
-	totalQuads = n;
+	totalQuads_--;
+}
+
+-(void) removeAllQuads
+{
+	totalQuads_ = 0;
+}
 
-	texCoordinates = realloc( texCoordinates, sizeof(texCoordinates[0]) * totalQuads );
-	vertices = realloc( vertices, sizeof(vertices[0]) * totalQuads );
-	indices = realloc( indices, sizeof(indices[0]) * totalQuads * 6 );
+#pragma mark TextureAtlas - Resize
+
+-(BOOL) resizeCapacity: (NSUInteger) newCapacity
+{
+	if( newCapacity == capacity_ )
+		return YES;
 	
-	if( _withColorArray )
-		colors = realloc( colors, sizeof(colors[0]) * totalQuads * 4 );
+	void * tmpColors = nil;
+
+	// update capacity and totolQuads
+	totalQuads_ = MIN(totalQuads_,newCapacity);
+	capacity_ = newCapacity;
+
+	void * tmpTexCoords = realloc( texCoordinates, sizeof(texCoordinates[0]) * capacity_ );
+	void * tmpVertexCoords = realloc( vertexCoordinates, sizeof(vertexCoordinates[0]) * capacity_ );
+	void * tmpIndices = realloc( indices, sizeof(indices[0]) * capacity_ * 6 );
 	
-	if( ! ( texCoordinates &amp;&amp; vertices &amp;&amp; indices) ) {
+	if( withColorArray_ )
+		tmpColors = realloc( colors, sizeof(colors[0]) * capacity_ * 4 );
+	else
+		tmpColors = (void*) 1;
+	
+	if( ! ( tmpTexCoords &amp;&amp; tmpVertexCoords &amp;&amp; tmpIndices &amp;&amp; tmpColors) ) {
 		NSLog(@&quot;TextureAtlas: not enough memory&quot;);
-		if( texCoordinates )
+		if( tmpTexCoords )
+			free(tmpTexCoords);
+		else
 			free(texCoordinates);
-		if( vertices )
-			free(vertices);
-		if( indices )
-			free(vertices);
-		if( colors )
-			free( colors );
-		[NSException raise:@&quot;TextureAtlas:NoMemory&quot; format:@&quot;Texture Atlas. Not enough memory to resize the capacity&quot;];
+		
+		if( tmpVertexCoords )
+			free(tmpVertexCoords);
+		else
+			free(vertexCoordinates);
+		
+		if( tmpIndices )
+			free(tmpIndices);
+		else
+			free(indices);
+
+		if( withColorArray_) {
+			if( tmpColors )
+				free( tmpColors );
+			else
+				free( colors);
+		}
+		
+		texCoordinates = nil;
+		vertexCoordinates = nil;
+		indices = nil;
+		colors = nil;
+		
+		capacity_ = totalQuads_ = 0;
+
+		return NO;
 	}
 	
-	[self initIndices];
+	texCoordinates = tmpTexCoords;
+	vertexCoordinates = tmpVertexCoords;
+	indices = tmpIndices;
+	if( withColorArray_ )
+		colors = tmpColors;
+
+	[self initIndices];	
+
+	return YES;
 }
 
 #pragma mark TextureAtlas - Drawing
 
 -(void) drawQuads
 {
-	return [self drawNumberOfQuads: totalQuads];
+	return [self drawNumberOfQuads: totalQuads_];
 }
 
 -(void) drawNumberOfQuads: (NSUInteger) n
 {		
 	glBindTexture(GL_TEXTURE_2D, [texture name]);
-	glVertexPointer(3, GL_FLOAT, 0, vertices);
+	glVertexPointer(3, GL_FLOAT, 0, vertexCoordinates);
 	glTexCoordPointer(2, GL_FLOAT, 0, texCoordinates);
-	if( _withColorArray )
+	if( withColorArray_ )
 		glColorPointer(4, GL_UNSIGNED_BYTE, 0, colors);
 	glDrawElements(GL_TRIANGLES, n*6, GL_UNSIGNED_SHORT, indices);	
 }</diff>
      <filename>Support/Cocos2d/cocos2d/TextureAtlas.m</filename>
    </modified>
    <modified>
      <diff>@@ -12,12 +12,10 @@
  *
  */
 
-#import &quot;Texture2D.h&quot;
 #import &quot;TextureMgr.h&quot;
+#import &quot;Support/FileUtils.h&quot;
+#import &quot;Support/Texture2D.h&quot;
 
-@interface TextureMgr (Private)
--(NSString*) fullPathFromRelativePath:(NSString*) relPath;
-@end
 
 @implementation TextureMgr
 //
@@ -52,10 +50,9 @@ static TextureMgr *sharedTextureMgr;
 
 -(id) init
 {
-	if( ! (self=[super init]) )
-		return nil;
-	
-	textures = [[NSMutableDictionary dictionaryWithCapacity: 10] retain];
+	if( (self=[super init]) )
+		textures = [[NSMutableDictionary dictionaryWithCapacity: 10] retain];
+
 	return self;
 }
 
@@ -78,7 +75,7 @@ static TextureMgr *sharedTextureMgr;
 	}
 		
 	// Split up directory and filename
-	NSString *fullpath = [self fullPathFromRelativePath:path];
+	NSString *fullpath = [FileUtils fullPathFromRelativePath: path ];
 
 	// all images are handled by UIImage except PVR extension that is handled by our own handler
 	if ( [[path lowercaseString] hasSuffix:@&quot;.pvr&quot;] )
@@ -103,7 +100,7 @@ static TextureMgr *sharedTextureMgr;
 	}
 	
 	// Split up directory and filename
-	NSString *fullpath = [self fullPathFromRelativePath:path];
+	NSString *fullpath = [FileUtils fullPathFromRelativePath:path];
 	
 	NSData *nsdata = [[NSData alloc] initWithContentsOfFile:fullpath];
 	tex = [[Texture2D alloc] initWithPVRTCData:[nsdata bytes] level:0 bpp:bpp hasAlpha:alpha length:w];
@@ -155,23 +152,12 @@ static TextureMgr *sharedTextureMgr;
 
 -(void) removeTexture: (Texture2D*) tex
 {
-	NSAssert(tex != nil, @&quot;TextureMgr: tex MUST not be nill&quot;);
+	if( ! tex )
+		return;
 	
 	NSArray *keys = [textures allKeysForObject:tex];
 	
 	for( NSUInteger i = 0; i &lt; [keys count]; i++ )
 		[textures removeObjectForKey:[keys objectAtIndex:i]];
 }
-
-// private stuff
--(NSString*) fullPathFromRelativePath:(NSString*) relPath
-{
-	NSMutableArray *imagePathComponents = [NSMutableArray arrayWithArray:[relPath pathComponents]];
-	NSString *file = [imagePathComponents lastObject];
-	
-	[imagePathComponents removeLastObject];
-	NSString *imageDirectory = [NSString pathWithComponents:imagePathComponents];
-	
-	return [[NSBundle mainBundle] pathForResource:file ofType:nil inDirectory:imageDirectory];	
-}
 @end</diff>
      <filename>Support/Cocos2d/cocos2d/TextureMgr.m</filename>
    </modified>
    <modified>
      <diff>@@ -44,7 +44,7 @@
 }
 
 /** The texture that is rendered */
-@property (readwrite,assign) Texture2D *texture;
+@property (readwrite,retain) Texture2D *texture;
 
 /** conforms to CocosNodeOpacity and CocosNodeRGB protocol */
 @property (readwrite,assign) GLubyte r, g, b, opacity;</diff>
      <filename>Support/Cocos2d/cocos2d/TextureNode.h</filename>
    </modified>
    <modified>
      <diff>@@ -39,7 +39,7 @@
 
 -(void) dealloc
 {
-	// texture is retained and release by super
+	[texture release];
 	[super dealloc];
 }
 </diff>
      <filename>Support/Cocos2d/cocos2d/TextureNode.m</filename>
    </modified>
    <modified>
      <diff>@@ -14,6 +14,7 @@
 
 #import &quot;TileMapAtlas.h&quot;
 #import &quot;ccMacros.h&quot;
+#import &quot;Support/FileUtils.h&quot;
 
 @interface TileMapAtlas (Private)
 -(void) loadTGAfile:(NSString*)file;
@@ -91,10 +92,12 @@
 {
 	NSAssert( file != nil, @&quot;file must be non-nil&quot;);
 
-	//Find the path of the file
-	NSBundle *mainBndl = [NSBundle mainBundle];
-	NSString *resourcePath = [mainBndl resourcePath];
-	NSString * path = [resourcePath stringByAppendingPathComponent:file];
+	NSString *path = [FileUtils fullPathFromRelativePath:file ];
+
+//	//Find the path of the file
+//	NSBundle *mainBndl = [NSBundle mainBundle];
+//	NSString *resourcePath = [mainBndl resourcePath];
+//	NSString * path = [resourcePath stringByAppendingPathComponent:file];
 	
 	tgaInfo = tgaLoad( [path UTF8String] );
 #if 1
@@ -168,18 +171,18 @@
 	//						  texCoord.tr_x,
 	//						  texCoord.tr_y );
 	
-	vertex.bl_x = x * itemWidth;					// A - x
-	vertex.bl_y = y * itemHeight;					// A - y
-	vertex.bl_z = 0.0f;								// A - z
-	vertex.br_x = x * itemWidth + itemWidth;		// B - x
-	vertex.br_y = y * itemHeight;					// B - y
-	vertex.br_z = 0.0f;								// B - z
-	vertex.tl_x = x * itemWidth;					// C - x
-	vertex.tl_y = y * itemHeight + itemHeight;		// C - y
-	vertex.tl_z = 0.0f;								// C - z
-	vertex.tr_x = x * itemWidth + itemWidth;		// D - x
-	vertex.tr_y = y * itemHeight + itemHeight;		// D - y
-	vertex.tr_z = 0.0f;								// D - z
+	vertex.bl_x = (int) (x * itemWidth);				// A - x
+	vertex.bl_y = (int) (y * itemHeight);				// A - y
+	vertex.bl_z = 0.0f;									// A - z
+	vertex.br_x = (int)(x * itemWidth + itemWidth);		// B - x
+	vertex.br_y = (int)(y * itemHeight);				// B - y
+	vertex.br_z = 0.0f;									// B - z
+	vertex.tl_x = (int)(x * itemWidth);					// C - x
+	vertex.tl_y = (int)(y * itemHeight + itemHeight);	// C - y
+	vertex.tl_z = 0.0f;									// C - z
+	vertex.tr_x = (int)(x * itemWidth + itemWidth);		// D - x
+	vertex.tr_y = (int)(y * itemHeight + itemHeight);	// D - y
+	vertex.tr_z = 0.0f;									// D - z
 	
 	[textureAtlas updateQuadWithTexture:&amp;texCoord vertexQuad:&amp;vertex atIndex:idx];
 }</diff>
      <filename>Support/Cocos2d/cocos2d/TileMapAtlas.m</filename>
    </modified>
    <modified>
      <diff>@@ -15,11 +15,12 @@
 #import &quot;TiledGridAction.h&quot;
 #import &quot;Director.h&quot;
 #import &quot;ccMacros.h&quot;
+#import &quot;Support/CGPointExtension.h&quot;
 
 typedef struct
 {
-	cpVect	position;
-	cpVect	startPosition;
+	CGPoint	position;
+	CGPoint	startPosition;
 	ccGridSize	delta;
 } Tile;
 
@@ -182,7 +183,7 @@ typedef struct
 
 -(ccGridSize)getDelta:(ccGridSize)pos
 {
-	cpVect	pos2;
+	CGPoint	pos2;
 	
 	int idx = pos.x * gridSize.y + pos.y;
 	
@@ -234,8 +235,8 @@ typedef struct
 	{
 		for( j = 0; j &lt; gridSize.y; j++ )
 		{
-			tileArray-&gt;position = cpv(i,j);
-			tileArray-&gt;startPosition = cpv(i,j);
+			tileArray-&gt;position = ccp(i,j);
+			tileArray-&gt;startPosition = ccp(i,j);
 			tileArray-&gt;delta = [self getDelta:ccg(i,j)];
 			tileArray++;
 		}
@@ -252,7 +253,7 @@ typedef struct
 	{
 		for( j = 0; j &lt; gridSize.y; j++ )
 		{
-			tileArray-&gt;position = cpvmult( cpv(tileArray-&gt;delta.x, tileArray-&gt;delta.y), time);
+			tileArray-&gt;position = ccpMult( ccp(tileArray-&gt;delta.x, tileArray-&gt;delta.y), time);
 			[self placeTile:ccg(i,j) tile:*tileArray];
 			tileArray++;
 		}
@@ -267,7 +268,7 @@ typedef struct
 
 -(float)testFunc:(ccGridSize)pos time:(ccTime)time
 {
-	cpVect	n = cpvmult( cpv(gridSize.x,gridSize.y), time);
+	CGPoint	n = ccpMult( ccp(gridSize.x,gridSize.y), time);
 	if ( (n.x+n.y) == 0.0f )
 		return 1.0f;
 	return powf( (pos.x+pos.y) / (n.x+n.y), 6 );
@@ -331,7 +332,7 @@ typedef struct
 
 -(float)testFunc:(ccGridSize)pos time:(ccTime)time
 {
-	cpVect	n = cpvmult(cpv(gridSize.x, gridSize.y), (1.0f-time));
+	CGPoint	n = ccpMult(ccp(gridSize.x, gridSize.y), (1.0f-time));
 	
 	if ( (pos.x+pos.y) == 0 )
 		return 1.0f;
@@ -346,7 +347,7 @@ typedef struct
 
 -(float)testFunc:(ccGridSize)pos time:(ccTime)time
 {
-	cpVect	n = cpvmult(cpv(gridSize.x, gridSize.y), time);
+	CGPoint	n = ccpMult(ccp(gridSize.x, gridSize.y), time);
 	if ( n.y == 0 )
 		return 1.0f;
 	return powf( pos.y / n.y, 6 );
@@ -372,7 +373,7 @@ typedef struct
 
 -(float)testFunc:(ccGridSize)pos time:(ccTime)time
 {
-	cpVect	n = cpvmult(cpv(gridSize.x,gridSize.y), (1.0f - time));
+	CGPoint	n = ccpMult(ccp(gridSize.x,gridSize.y), (1.0f - time));
 	if ( pos.y == 0 )
 		return 1.0f;
 	return powf( n.y / pos.y, 6 );
@@ -503,7 +504,7 @@ typedef struct
 		{
 			ccQuad3 coords = [self originalTile:ccg(i,j)];
 			
-			coords.bl_z = (sinf(time*(cpFloat)M_PI*waves*2 + (coords.bl_y+coords.bl_x) * .01f) * amplitude * amplitudeRate );
+			coords.bl_z = (sinf(time*(CGFloat)M_PI*waves*2 + (coords.bl_y+coords.bl_x) * .01f) * amplitude * amplitudeRate );
 			coords.br_z	= coords.bl_z;
 			coords.tl_z = coords.bl_z;
 			coords.tr_z = coords.bl_z;
@@ -542,8 +543,8 @@ typedef struct
 {
 	int i, j;
 	
-	float sinz =  (sinf((cpFloat)M_PI*time*jumps*2) * amplitude * amplitudeRate );
-	float sinz2 = (sinf((cpFloat)M_PI*(time*jumps*2 + 1)) * amplitude * amplitudeRate );
+	float sinz =  (sinf((CGFloat)M_PI*time*jumps*2) * amplitude * amplitudeRate );
+	float sinz2 = (sinf((CGFloat)M_PI*(time*jumps*2 + 1)) * amplitude * amplitudeRate );
 	
 	for( i = 0; i &lt; gridSize.x; i++ )
 	{</diff>
      <filename>Support/Cocos2d/cocos2d/TiledGridAction.m</filename>
    </modified>
    <modified>
      <diff>@@ -23,6 +23,7 @@
 #import &quot;Camera.h&quot;
 #import &quot;TiledGridAction.h&quot;
 #import &quot;EaseAction.h&quot;
+#import &quot;Support/CGPointExtension.h&quot;
 
 enum {
 	kSceneFade = 0xFADEFADE,
@@ -82,6 +83,9 @@ enum {
 	// enable events while transitions
 	[[Director sharedDirector] setEventsEnabled: YES];
 	
+	// issue #267
+	[outScene setVisible:YES];
+
 	[self removeChild:inScene cleanup:NO];
 	[self removeChild:outScene cleanup:NO];
 	
@@ -93,13 +97,13 @@ enum {
 {
 	/* clean up */	
 	[inScene setVisible:YES];
-	[inScene setPosition:cpv(0,0)];
+	[inScene setPosition:ccp(0,0)];
 	[inScene setScale:1.0f];
 	[inScene setRotation:0.0f];
 	[inScene.camera restore];
 	
 	[outScene setVisible:NO];
-	[outScene setPosition:cpv(0,0)];
+	[outScene setPosition:ccp(0,0)];
 	[outScene setScale:1.0f];
 	[outScene setRotation:0.0f];
 	[outScene.camera restore];
@@ -154,8 +158,8 @@ enum {
 	[inScene setScale:0.001f];
 	[outScene setScale:1.0f];
 	
-	[inScene setTransformAnchor: cpv( s.width/2, s.height/2) ];
-	[outScene setTransformAnchor: cpv( s.width/2, s.height/2) ];
+	[inScene setTransformAnchor: ccp( s.width/2, s.height/2) ];
+	[outScene setTransformAnchor: ccp( s.width/2, s.height/2) ];
 	
 	IntervalAction *rotozoom = [Sequence actions: [Spawn actions:
 								   [ScaleBy actionWithDuration:duration/2 scale:0.001f],
@@ -183,12 +187,12 @@ enum {
 	CGSize s = [[Director sharedDirector] winSize];
 	
 	[inScene setScale:0.5f];
-	[inScene setPosition:cpv( s.width,0 )];
+	[inScene setPosition:ccp( s.width,0 )];
 	
-	[inScene setTransformAnchor: cpv( s.width/2, s.height/2) ];
-	[outScene setTransformAnchor: cpv( s.width/2, s.height/2) ];
+	[inScene setTransformAnchor: ccp( s.width/2, s.height/2) ];
+	[outScene setTransformAnchor: ccp( s.width/2, s.height/2) ];
 
-	IntervalAction *jump = [JumpBy actionWithDuration:duration/4 position:cpv(-s.width,0) height:s.width/4 jumps:2];
+	IntervalAction *jump = [JumpBy actionWithDuration:duration/4 position:ccp(-s.width,0) height:s.width/4 jumps:2];
 	IntervalAction *scaleIn = [ScaleTo actionWithDuration:duration/4 scale:1.0f];
 	IntervalAction *scaleOut = [ScaleTo actionWithDuration:duration/4 scale:0.5f];
 	
@@ -225,13 +229,13 @@ enum {
 }
 -(IntervalAction*) action
 {
-	return [MoveTo actionWithDuration:duration position:cpv(0,0)];
+	return [MoveTo actionWithDuration:duration position:ccp(0,0)];
 }
 
 -(void) initScenes
 {
 	CGSize s = [[Director sharedDirector] winSize];
-	[inScene setPosition: cpv( -s.width,0) ];
+	[inScene setPosition: ccp( -s.width,0) ];
 }
 @end
 
@@ -242,7 +246,7 @@ enum {
 -(void) initScenes
 {
 	CGSize s = [[Director sharedDirector] winSize];
-	[inScene setPosition: cpv( s.width,0) ];
+	[inScene setPosition: ccp( s.width,0) ];
 }
 @end
 
@@ -253,7 +257,7 @@ enum {
 -(void) initScenes
 {
 	CGSize s = [[Director sharedDirector] winSize];
-	[inScene setPosition: cpv( 0, s.height) ];
+	[inScene setPosition: ccp( 0, s.height) ];
 }
 @end
 
@@ -264,7 +268,7 @@ enum {
 -(void) initScenes
 {
 	CGSize s = [[Director sharedDirector] winSize];
-	[inScene setPosition: cpv( 0, -s.height) ];
+	[inScene setPosition: ccp( 0, -s.height) ];
 }
 @end
 
@@ -293,13 +297,13 @@ enum {
 -(IntervalAction*) action
 {
 	CGSize s = [[Director sharedDirector] winSize];
-	return [MoveBy actionWithDuration:duration position:cpv(s.width,0)];
+	return [MoveBy actionWithDuration:duration position:ccp(s.width,0)];
 }
 
 -(void) initScenes
 {
 	CGSize s = [[Director sharedDirector] winSize];
-	[inScene setPosition: cpv( -s.width,0) ];
+	[inScene setPosition: ccp( -s.width,0) ];
 }
 @end
 
@@ -310,13 +314,13 @@ enum {
 -(void) initScenes
 {
 	CGSize s = [[Director sharedDirector] winSize];
-	[inScene setPosition: cpv( s.width,0) ];
+	[inScene setPosition: ccp( s.width,0) ];
 }
 
 -(IntervalAction*) action
 {
 	CGSize s = [[Director sharedDirector] winSize];
-	return [MoveBy actionWithDuration:duration position:cpv(-s.width,0)];
+	return [MoveBy actionWithDuration:duration position:ccp(-s.width,0)];
 }
 
 @end
@@ -328,13 +332,13 @@ enum {
 -(void) initScenes
 {
 	CGSize s = [[Director sharedDirector] winSize];
-	[inScene setPosition: cpv(0,s.height) ];
+	[inScene setPosition: ccp(0,s.height) ];
 }
 
 -(IntervalAction*) action
 {
 	CGSize s = [[Director sharedDirector] winSize];
-	return [MoveBy actionWithDuration:duration position:cpv(0,-s.height)];
+	return [MoveBy actionWithDuration:duration position:ccp(0,-s.height)];
 }
 
 @end
@@ -346,13 +350,13 @@ enum {
 -(void) initScenes
 {
 	CGSize s = [[Director sharedDirector] winSize];
-	[inScene setPosition: cpv(0,-s.height) ];
+	[inScene setPosition: ccp(0,-s.height) ];
 }
 
 -(IntervalAction*) action
 {
 	CGSize s = [[Director sharedDirector] winSize];
-	return [MoveBy actionWithDuration:duration position:cpv(0,s.height)];
+	return [MoveBy actionWithDuration:duration position:ccp(0,s.height)];
 }
 @end
 
@@ -369,8 +373,8 @@ enum {
 	[inScene setScale:0.001f];
 	[outScene setScale:1.0f];
 	
-	[inScene setTransformAnchor:cpv(2*s.width/3,s.height/2) ];
-	[outScene setTransformAnchor:cpv(s.width/3,s.height/2) ];
+	[inScene setTransformAnchor:ccp(2*s.width/3,s.height/2) ];
+	[outScene setTransformAnchor:ccp(s.width/3,s.height/2) ];
 	
 	
 	IntervalAction *scaleOut = [ScaleTo actionWithDuration:duration scale:0.01f];</diff>
      <filename>Support/Cocos2d/cocos2d/Transition.m</filename>
    </modified>
    <modified>
      <diff>@@ -14,6 +14,11 @@
 
 #import &lt;math.h&gt;
 
+/**
+ @file
+ cocos2d helper macros
+ */
+
 #ifdef DEBUG
 //#define CCLOG(s, &#8230;) NSLog((@&#8221;%s %s:%d &#8221; s), __func__, basename(__FILE__), __LINE__, ## __VA_ARGS__);
 #define CCLOG(...) NSLog(__VA_ARGS__)</diff>
      <filename>Support/Cocos2d/cocos2d/ccMacros.h</filename>
    </modified>
    <modified>
      <diff>@@ -12,9 +12,10 @@
  *
  */
 
-//
-// cocos (cc) types
-//
+/**
+ @file
+ cocos2d (cc) types
+*/
 
 //! RGB color composed of bytes. 3 chars
 typedef struct _ccRGBB
@@ -47,6 +48,7 @@ typedef struct _ccPointSprite
 	float x;
 	float y;
 	float size;
+	ccColorF colors;
 } ccPointSprite;
 
 //!	A 2D Quad. 8 floats
@@ -88,7 +90,6 @@ ccg(const int x, const int y)
 	return v;
 }
 
-
 //! delta time type
 //! if you want more resolution redefine it as a double
 typedef float ccTime;</diff>
      <filename>Support/Cocos2d/cocos2d/ccTypes.h</filename>
    </modified>
    <modified>
      <diff>@@ -27,8 +27,8 @@
  */
 
 // 0x00 HI ME LO
-// 00   00 07 01
-#define COCOS2D_VERSION 0x00000701
+// 00   00 07 02
+#define COCOS2D_VERSION 0x00000702
 
 //
 // all cocos2d include files
@@ -37,7 +37,6 @@
 #import &quot;Camera.h&quot;
 #import &quot;CameraAction.h&quot;
 #import &quot;CocosNode.h&quot;
-#import &quot;CocosNodeExtras.h&quot;
 #import &quot;Director.h&quot;
 #import &quot;InstantAction.h&quot;
 #import &quot;IntervalAction.h&quot;
@@ -80,6 +79,8 @@
 #import &quot;Support/OpenGL_Internal.h&quot;
 #import &quot;Support/Texture2D.h&quot;
 #import &quot;Support/EAGLView.h&quot;
+#import &quot;Support/FileUtils.h&quot;
+#import &quot;Support/CGPointExtension.h&quot;
 
 
 // free functions</diff>
      <filename>Support/Cocos2d/cocos2d/cocos2d.h</filename>
    </modified>
    <modified>
      <diff>@@ -14,7 +14,7 @@
 
 #import &lt;UIKit/UIKit.h&gt;
 
-static NSString *version = @&quot;cocos2d v0.7.1&quot;;
+static NSString *version = @&quot;cocos2d v0.7.2&quot;;
 
 NSString *cocos2dVersion()
 {</diff>
      <filename>Support/Cocos2d/cocos2d/cocos2d.m</filename>
    </modified>
    <modified>
      <diff>@@ -93,7 +93,7 @@ typedef enum {
 @end
 
 /** CocosLivePost protocol */
-@protocol CocosLivePostDelegate
+@protocol CocosLivePostDelegate &lt;NSObject&gt;
 -(void) scorePostOk:(id) sender;
 -(void) scorePostFail:(id) sender;
 @end</diff>
      <filename>Support/Cocos2d/cocoslive/ScoreServerPost.h</filename>
    </modified>
    <modified>
      <diff>@@ -80,7 +80,7 @@ typedef enum {
 @end
 
 /** CocosLiveRequest protocol */
-@protocol CocosLiveRequestDelegate
+@protocol CocosLiveRequestDelegate &lt;NSObject&gt;
 -(void) scoreRequestOk:(id) sender;
 -(void) scoreRequestFail:(id) sender;
 @end</diff>
      <filename>Support/Cocos2d/cocoslive/ScoreServerRequest.h</filename>
    </modified>
    <modified>
      <diff>@@ -35,7 +35,7 @@
   NSString* mPath;
   float mWidth;
   float mTextureLength;
-  cpVect mLastLocation;
+  CGPoint mLastLocation;
 }
 
 /** creates the streak */</diff>
      <filename>Support/Cocos2d/experimental/MotionStreak.h</filename>
    </modified>
    <modified>
      <diff>@@ -22,8 +22,7 @@
  */
 
 #import &quot;MotionStreak.h&quot;
-#import &quot;Scheduler.h&quot;
-#import &quot;CocosNodeExtras.h&quot;
+#import &quot;cocos2d.h&quot;
 
 @implementation MotionStreak
 
@@ -43,7 +42,7 @@
     mPath = path;
     mWidth = width;
     mTextureLength = length;
-    mLastLocation = cpvzero;
+    mLastLocation = CGPointZero;
     mColor = color;
     mRibbon = [Ribbon ribbonWithWidth: mWidth image:mPath length:mTextureLength color:color fade:fade];
     [self addChild:mRibbon];
@@ -57,8 +56,8 @@
 
 -(void)update:(ccTime)delta
 {
-	cpVect location = [self convertToWorldSpace:CGPointZero];
-  [mRibbon setPosition:cpv(-1*location.x, -1*location.y)];
+	CGPoint location = [self convertToWorldSpace:CGPointZero];
+  [mRibbon setPosition:ccp(-1*location.x, -1*location.y)];
   float len = sqrtf(powf(mLastLocation.x - location.x, 2) + powf(mLastLocation.y - location.y, 2));
   if (len &gt; mSegThreshold)
   {</diff>
      <filename>Support/Cocos2d/experimental/MotionStreak.m</filename>
    </modified>
    <modified>
      <diff>@@ -33,9 +33,9 @@
 /** Ribbon - dynamically extended connected polygon mesh */
 @interface Ribbon : CocosNode 
 {
-  cpVect mLastPoint1;
-  cpVect mLastPoint2;
-  cpVect mLastLocation;
+  CGPoint mLastPoint1;
+  CGPoint mLastPoint2;
+  CGPoint mLastLocation;
   uint mColor;
   Texture2D* mTexture;
   float mTextureLength;
@@ -56,11 +56,11 @@
 /** init the ribbon */
 -(id)initWithWidth:(float)w image:(NSString*)path length:(float)l color:(uint)color fade:(float)fade;
 /** add a point to the ribbon */
--(void)addPointAt:(cpVect)location width:(float)w;
+-(void)addPointAt:(CGPoint)location width:(float)w;
 /** polling function */
 -(void)update:(ccTime)delta;
 /** determine side of line */
--(float)sideOfLine:(cpVect)p l1:(cpVect)l1 l2:(cpVect)l2;
+-(float)sideOfLine:(CGPoint)p l1:(CGPoint)l1 l2:(CGPoint)l2;
 
 @end
 </diff>
      <filename>Support/Cocos2d/experimental/Ribbon.h</filename>
    </modified>
    <modified>
      <diff>@@ -28,9 +28,7 @@
 
 
 #import &quot;Ribbon.h&quot;
-#import &quot;TextureMgr.h&quot;
-#import &quot;OpenGL_Internal.h&quot;
-
+#import &quot;cocos2d.h&quot;
 
 //
 // Ribbon
@@ -52,7 +50,7 @@
     mTexture = [[[TextureMgr sharedTextureMgr] addImage:path] retain];
     mColor = color;
     mFadeTime = fade;
-    mLastLocation = cpvzero;
+    mLastLocation = CGPointZero;
     mLastWidth = w/2;
     mTexVPos = 0.0f;
     mSegments = [[[NSMutableArray alloc] init] retain];
@@ -74,7 +72,7 @@
 }
 
 // rotates a point around 0, 0
--(cpVect)rotatePoint:(cpVect)vec rotation:(float)a
+-(CGPoint)rotatePoint:(CGPoint)vec rotation:(float)a
 {
   float xtemp = (vec.x * cosf(a)) - (vec.y * sinf(a));
   vec.y = (vec.x * sinf(a)) + (vec.y * cosf(a));
@@ -88,15 +86,15 @@
   mDelta = delta;
 }
 
--(float)sideOfLine:(cpVect)p l1:(cpVect)l1 l2:(cpVect)l2
+-(float)sideOfLine:(CGPoint)p l1:(CGPoint)l1 l2:(CGPoint)l2
 {
-  cpVect vp = cpvperp(cpvsub(l1, l2));
-  cpVect vx = cpvsub(p, l1);
-  return cpvdot(vx, vp);
+  CGPoint vp = ccpPerp(ccpSub(l1, l2));
+  CGPoint vx = ccpSub(p, l1);
+  return ccpDot(vx, vp);
 }
 
 // adds a new segment to the ribbon
--(void)addPointAt:(cpVect)location width:(float)w
+-(void)addPointAt:(CGPoint)location width:(float)w
 {
   w=w*0.5f;
   // if this is the first point added, cache it and return
@@ -108,10 +106,10 @@
     return;
   }
   
-  cpVect sub = cpvsub(mLastLocation, location);
-  float r = cpvtoangle(sub) + 1.57079637f;
-  cpVect p1 = cpvadd([self rotatePoint:cpv(-w, 0) rotation:r], location);
-  cpVect p2 = cpvadd([self rotatePoint:cpv(w, 0) rotation:r], location);
+  CGPoint sub = ccpSub(mLastLocation, location);
+  float r = ccpToAngle(sub) + 1.57079637f;
+  CGPoint p1 = ccpAdd([self rotatePoint:ccp(-w, 0) rotation:r], location);
+  CGPoint p2 = ccpAdd([self rotatePoint:ccp(w, 0) rotation:r], location);
   float len = sqrtf(powf(mLastLocation.x - location.x, 2) + powf(mLastLocation.y - location.y, 2));
   float tend = mTexVPos + len/mTextureLength;
   RibbonSegment* seg;
@@ -168,8 +166,8 @@
   if (seg-&gt;end == 0)
   {
     // first edge has to get rotation from the first real polygon
-    cpVect lp1 = cpvadd([self rotatePoint:cpv(-mLastWidth, 0) rotation:r], mLastLocation);
-    cpVect lp2 = cpvadd([self rotatePoint:cpv(+mLastWidth, 0) rotation:r], mLastLocation);
+    CGPoint lp1 = ccpAdd([self rotatePoint:ccp(-mLastWidth, 0) rotation:r], mLastLocation);
+    CGPoint lp2 = ccpAdd([self rotatePoint:ccp(+mLastWidth, 0) rotation:r], mLastLocation);
     seg-&gt;creationTime[0] = mCurTime - mDelta;
     seg-&gt;verts[0] = lp1.x;
     seg-&gt;verts[1] = lp1.y;</diff>
      <filename>Support/Cocos2d/experimental/Ribbon.m</filename>
    </modified>
    <modified>
      <diff>@@ -18,7 +18,7 @@
   
 	Label* label = [Label labelWithString:[self title] fontName:@&quot;Arial&quot; fontSize:32];
 	[self addChild: label];
-	[label setPosition: cpv(s.width/2, s.height-50)];
+	[label setPosition: ccp(s.width/2, s.height-50)];
   
 	return self;
 }
@@ -38,12 +38,12 @@
   // the root object just rotates around
 	root = [[Sprite spriteWithFile:@&quot;r1.png&quot;] retain];
 	[self addChild: root z:1];
-	[root setPosition: cpv(s.width/2, s.height/2)];
+	[root setPosition: ccp(s.width/2, s.height/2)];
   
   // the target object is offset from root, and the streak is moved to follow it
   target = [Sprite spriteWithFile:@&quot;r1.png&quot;];
   [root addChild:target];
-  [target setPosition:cpv(100,0)];
+  [target setPosition:ccp(100,0)];
   // create the streak object and add it to the scene
   streak = [MotionStreak streakWithFade:3 minSeg:3 image:@&quot;streak.png&quot; width:32 length:32 color:0xFFFFFF];
   [self addChild:streak];
@@ -53,14 +53,14 @@
 	id a1 = [RotateBy actionWithDuration:2 angle:360];
   
 	id action1 = [RepeatForever actionWithAction:a1];
-	id motion = [MoveBy actionWithDuration:2 position:cpv(100,0)];
+	id motion = [MoveBy actionWithDuration:2 position:ccp(100,0)];
 	[root runAction:[RepeatForever actionWithAction:[Sequence actions:motion, [motion reverse], nil]]];
 	[root runAction:action1];
 }
 
 -(void)onUpdate:(ccTime)delta
 {
-//  cpVect p = [target absolutePosition];
+//  CGPoint p = [target absolutePosition];
 //  float r = [root rotation];
 	[streak setPosition:[target convertToWorldSpace:CGPointZero]];
 </diff>
      <filename>Support/Cocos2d/experimental/StreakTest.m</filename>
    </modified>
    <modified>
      <diff>@@ -120,7 +120,7 @@ void drawCircleShape(cpShape *shape)
 	cpBody *body = shape-&gt;body;
 	cpCircleShape *circle = (cpCircleShape *)shape;
 	cpVect c = cpvadd(body-&gt;p, cpvrotate(circle-&gt;c, body-&gt;rot));
-	drawCircle(c.x, c.y, circle-&gt;r, body-&gt;a, 15);
+	drawCircle( ccp(c.x, c.y), circle-&gt;r, body-&gt;a, 15, YES);
 }
 
 void drawSegmentShape(cpShape *shape)
@@ -130,7 +130,7 @@ void drawSegmentShape(cpShape *shape)
 	cpVect a = cpvadd(body-&gt;p, cpvrotate(seg-&gt;a, body-&gt;rot));
 	cpVect b = cpvadd(body-&gt;p, cpvrotate(seg-&gt;b, body-&gt;rot));
 	
-	drawLine( a.x, a.y, b.x, b.y );
+	drawLine( ccp(a.x, a.y), ccp(b.x, b.y) );
 }
 
 void drawPolyShape(cpShape *shape)
@@ -141,16 +141,15 @@ void drawPolyShape(cpShape *shape)
 	int num = poly-&gt;numVerts;
 	cpVect *verts = poly-&gt;verts;
 	
-	float *vertices = malloc( sizeof(float)*2*poly-&gt;numVerts);
+	CGPoint *vertices = malloc( sizeof(CGPoint)*poly-&gt;numVerts);
 	if( ! vertices )
 		return;
 	
 	for(int i=0; i&lt;num; i++){
 		cpVect v = cpvadd(body-&gt;p, cpvrotate(verts[i], body-&gt;rot));
-		vertices[i*2] = v.x;
-		vertices[i*2+1] = v.y;
+		vertices[i] = v;
 	}
-	drawPoly( vertices, poly-&gt;numVerts );
+	drawPoly( vertices, poly-&gt;numVerts, YES );
 	
 	free(vertices);
 }
@@ -178,7 +177,7 @@ void drawCollisions(void *ptr, void *data)
 	cpArbiter *arb = (cpArbiter *)ptr;
 	for(int i=0; i&lt;arb-&gt;numContacts; i++){
 		cpVect v = arb-&gt;contacts[i].p;
-		drawPoint(v.x, v.y);
+		drawPoint( ccp(v.x, v.y) );
 	}
 }
 
@@ -238,7 +237,7 @@ void drawCollisions(void *ptr, void *data)
 	glColor4f(0.0f, 0.0f, 1.0f, 1.0f);
 	for(int i=0; i&lt;num; i++){
 		cpBody *body = (cpBody *)bodies-&gt;arr[i];
-		drawPoint(body-&gt;p.x, body-&gt;p.y);
+		drawPoint( ccp(body-&gt;p.x, body-&gt;p.y) );
 	}
 	
 	glColor4f(1.0f, 0.0f, 0.0f, 1.0f);</diff>
      <filename>Support/Cocos2d/external/Chipmunk/Demo/main.m</filename>
    </modified>
    <modified>
      <diff>@@ -9,15 +9,21 @@
 /* Begin PBXBuildFile section */
 		1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; };
 		1F3B9A2D0EF2145700286867 /* ___PROJECTNAMEASIDENTIFIER___AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F3B9A2B0EF2145700286867 /* ___PROJECTNAMEASIDENTIFIER___AppDelegate.m */; };
+		DC05886C0FA4C73300B8C1AD /* cocos2d-iphone.xcclassmodel in Resources */ = {isa = PBXBuildFile; fileRef = DC05886B0FA4C73300B8C1AD /* cocos2d-iphone.xcclassmodel */; };
+		DC0588730FA4C76300B8C1AD /* cocoslive.m in Sources */ = {isa = PBXBuildFile; fileRef = DC05886E0FA4C76300B8C1AD /* cocoslive.m */; };
+		DC0588740FA4C76300B8C1AD /* ScoreServerPost.m in Sources */ = {isa = PBXBuildFile; fileRef = DC0588700FA4C76300B8C1AD /* ScoreServerPost.m */; };
+		DC0588750FA4C76300B8C1AD /* ScoreServerRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = DC0588720FA4C76300B8C1AD /* ScoreServerRequest.m */; };
+		DC05887D0FA4C78F00B8C1AD /* MotionStreak.m in Sources */ = {isa = PBXBuildFile; fileRef = DC0588770FA4C78F00B8C1AD /* MotionStreak.m */; };
+		DC05887F0FA4C78F00B8C1AD /* Ribbon.m in Sources */ = {isa = PBXBuildFile; fileRef = DC05887A0FA4C78F00B8C1AD /* Ribbon.m */; };
+		DC0588800FA4C78F00B8C1AD /* StreakTest.m in Sources */ = {isa = PBXBuildFile; fileRef = DC05887C0FA4C78F00B8C1AD /* StreakTest.m */; };
+		DC0588980FA4C95E00B8C1AD /* FileUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = DC0588970FA4C95E00B8C1AD /* FileUtils.m */; };
+		DC05889B0FA4C96A00B8C1AD /* CGPointExtension.m in Sources */ = {isa = PBXBuildFile; fileRef = DC05889A0FA4C96A00B8C1AD /* CGPointExtension.m */; };
+		DC0588A20FA4C9D600B8C1AD /* LICENSE.chipmunk.txt in Resources */ = {isa = PBXBuildFile; fileRef = DC0588A10FA4C9D600B8C1AD /* LICENSE.chipmunk.txt */; };
+		DC0588A40FA4CA2000B8C1AD /* README.experimental.txt in Resources */ = {isa = PBXBuildFile; fileRef = DC0588A30FA4CA2000B8C1AD /* README.experimental.txt */; };
+		DC0588A60FA4CA3C00B8C1AD /* LICENSE.TouchJSON.txt in Resources */ = {isa = PBXBuildFile; fileRef = DC0588A50FA4CA3C00B8C1AD /* LICENSE.TouchJSON.txt */; };
 		DC663FAA0F83B1AE000B3E49 /* AtlasSprite.m in Sources */ = {isa = PBXBuildFile; fileRef = DC663FA70F83B1AE000B3E49 /* AtlasSprite.m */; };
 		DC663FAB0F83B1AE000B3E49 /* AtlasSpriteManager.m in Sources */ = {isa = PBXBuildFile; fileRef = DC663FA90F83B1AE000B3E49 /* AtlasSpriteManager.m */; };
-		DC663FAD0F83B23A000B3E49 /* README.experimental in Resources */ = {isa = PBXBuildFile; fileRef = DC663FAC0F83B23A000B3E49 /* README.experimental */; };
-		DC663FD60F83B258000B3E49 /* PASoundListener.m in Sources */ = {isa = PBXBuildFile; fileRef = DC663FC70F83B258000B3E49 /* PASoundListener.m */; };
-		DC663FD70F83B258000B3E49 /* PASoundMgr.m in Sources */ = {isa = PBXBuildFile; fileRef = DC663FC90F83B258000B3E49 /* PASoundMgr.m */; };
-		DC663FD80F83B258000B3E49 /* PASoundSource.m in Sources */ = {isa = PBXBuildFile; fileRef = DC663FCB0F83B258000B3E49 /* PASoundSource.m */; };
-		DC663FE20F83B2A2000B3E49 /* LICENSE.chipmunk in Resources */ = {isa = PBXBuildFile; fileRef = DC663FE00F83B2A2000B3E49 /* LICENSE.chipmunk */; };
 		DC663FE30F83B2A2000B3E49 /* README.chipmunk.txt in Resources */ = {isa = PBXBuildFile; fileRef = DC663FE10F83B2A2000B3E49 /* README.chipmunk.txt */; };
-		DC663FFE0F83B38E000B3E49 /* CocosNodeExtras.m in Sources */ = {isa = PBXBuildFile; fileRef = DC663FFD0F83B38E000B3E49 /* CocosNodeExtras.m */; };
 		DC6640030F83B3EA000B3E49 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC6640020F83B3EA000B3E49 /* AudioToolbox.framework */; };
 		DC6640050F83B3EA000B3E49 /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC6640040F83B3EA000B3E49 /* OpenAL.framework */; };
 		DCCBEF900F601EE20040855A /* MyScene.m in Sources */ = {isa = PBXBuildFile; fileRef = DCCBEF8F0F601EE20040855A /* MyScene.m */; };
@@ -65,13 +71,7 @@
 		DCF473AC0F62C70800448FB1 /* TiledGridAction.m in Sources */ = {isa = PBXBuildFile; fileRef = DCF4733A0F62C70800448FB1 /* TiledGridAction.m */; };
 		DCF473AD0F62C70800448FB1 /* TileMapAtlas.m in Sources */ = {isa = PBXBuildFile; fileRef = DCF4733C0F62C70800448FB1 /* TileMapAtlas.m */; };
 		DCF473AE0F62C70800448FB1 /* Transition.m in Sources */ = {isa = PBXBuildFile; fileRef = DCF4733E0F62C70800448FB1 /* Transition.m */; };
-		DCF473AF0F62C70800448FB1 /* cocoslive.m in Sources */ = {isa = PBXBuildFile; fileRef = DCF473410F62C70800448FB1 /* cocoslive.m */; };
-		DCF473B00F62C70800448FB1 /* ScoreServerPost.m in Sources */ = {isa = PBXBuildFile; fileRef = DCF473430F62C70800448FB1 /* ScoreServerPost.m */; };
-		DCF473B10F62C70800448FB1 /* ScoreServerRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = DCF473450F62C70800448FB1 /* ScoreServerRequest.m */; };
 		DCF473B20F62C70800448FB1 /* DONORS in Resources */ = {isa = PBXBuildFile; fileRef = DCF473460F62C70800448FB1 /* DONORS */; };
-		DCF473B30F62C70800448FB1 /* MotionStreak.m in Sources */ = {isa = PBXBuildFile; fileRef = DCF473490F62C70800448FB1 /* MotionStreak.m */; };
-		DCF473B50F62C70800448FB1 /* Ribbon.m in Sources */ = {isa = PBXBuildFile; fileRef = DCF4734C0F62C70800448FB1 /* Ribbon.m */; };
-		DCF473B60F62C70800448FB1 /* StreakTest.m in Sources */ = {isa = PBXBuildFile; fileRef = DCF4734E0F62C70800448FB1 /* StreakTest.m */; };
 		DCF473B70F62C70800448FB1 /* chipmunk-docs.html in Resources */ = {isa = PBXBuildFile; fileRef = DCF473510F62C70800448FB1 /* chipmunk-docs.html */; };
 		DCF473BA0F62C70800448FB1 /* chipmunk.c in Sources */ = {isa = PBXBuildFile; fileRef = DCF473550F62C70800448FB1 /* chipmunk.c */; };
 		DCF473BB0F62C70800448FB1 /* CMakeLists.txt in Resources */ = {isa = PBXBuildFile; fileRef = DCF473570F62C70800448FB1 /* CMakeLists.txt */; };
@@ -107,22 +107,32 @@
 		1F3B9A820EF2151B00286867 /* ___PROJECTNAMEASIDENTIFIER____Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = &quot;___PROJECTNAMEASIDENTIFIER____Prefix.pch&quot;; sourceTree = SOURCE_ROOT; };
 		29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = &quot;&lt;group&gt;&quot;; };
 		8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = &quot;&lt;group&gt;&quot;; };
+		DC05886B0FA4C73300B8C1AD /* cocos2d-iphone.xcclassmodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcclassmodel; path = &quot;cocos2d-iphone.xcclassmodel&quot;; sourceTree = &quot;&lt;group&gt;&quot;; };
+		DC05886D0FA4C76300B8C1AD /* cocoslive.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cocoslive.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+		DC05886E0FA4C76300B8C1AD /* cocoslive.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = cocoslive.m; sourceTree = &quot;&lt;group&gt;&quot;; };
+		DC05886F0FA4C76300B8C1AD /* ScoreServerPost.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScoreServerPost.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+		DC0588700FA4C76300B8C1AD /* ScoreServerPost.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ScoreServerPost.m; sourceTree = &quot;&lt;group&gt;&quot;; };
+		DC0588710FA4C76300B8C1AD /* ScoreServerRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScoreServerRequest.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+		DC0588720FA4C76300B8C1AD /* ScoreServerRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ScoreServerRequest.m; sourceTree = &quot;&lt;group&gt;&quot;; };
+		DC0588760FA4C78F00B8C1AD /* MotionStreak.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MotionStreak.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+		DC0588770FA4C78F00B8C1AD /* MotionStreak.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MotionStreak.m; sourceTree = &quot;&lt;group&gt;&quot;; };
+		DC0588790FA4C78F00B8C1AD /* Ribbon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Ribbon.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+		DC05887A0FA4C78F00B8C1AD /* Ribbon.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Ribbon.m; sourceTree = &quot;&lt;group&gt;&quot;; };
+		DC05887B0FA4C78F00B8C1AD /* StreakTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StreakTest.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+		DC05887C0FA4C78F00B8C1AD /* StreakTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StreakTest.m; sourceTree = &quot;&lt;group&gt;&quot;; };
+		DC0588960FA4C95E00B8C1AD /* FileUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileUtils.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+		DC0588970FA4C95E00B8C1AD /* FileUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FileUtils.m; sourceTree = &quot;&lt;group&gt;&quot;; };
+		DC0588990FA4C96A00B8C1AD /* CGPointExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGPointExtension.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+		DC05889A0FA4C96A00B8C1AD /* CGPointExtension.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CGPointExtension.m; sourceTree = &quot;&lt;group&gt;&quot;; };
+		DC05889C0FA4C98000B8C1AD /* ccArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ccArray.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+		DC0588A10FA4C9D600B8C1AD /* LICENSE.chipmunk.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE.chipmunk.txt; sourceTree = &quot;&lt;group&gt;&quot;; };
+		DC0588A30FA4CA2000B8C1AD /* README.experimental.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.experimental.txt; sourceTree = &quot;&lt;group&gt;&quot;; };
+		DC0588A50FA4CA3C00B8C1AD /* LICENSE.TouchJSON.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE.TouchJSON.txt; sourceTree = &quot;&lt;group&gt;&quot;; };
 		DC663FA60F83B1AE000B3E49 /* AtlasSprite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AtlasSprite.h; sourceTree = &quot;&lt;group&gt;&quot;; };
 		DC663FA70F83B1AE000B3E49 /* AtlasSprite.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AtlasSprite.m; sourceTree = &quot;&lt;group&gt;&quot;; };
 		DC663FA80F83B1AE000B3E49 /* AtlasSpriteManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AtlasSpriteManager.h; sourceTree = &quot;&lt;group&gt;&quot;; };
 		DC663FA90F83B1AE000B3E49 /* AtlasSpriteManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AtlasSpriteManager.m; sourceTree = &quot;&lt;group&gt;&quot;; };
-		DC663FAC0F83B23A000B3E49 /* README.experimental */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.experimental; sourceTree = &quot;&lt;group&gt;&quot;; };
-		DC663FC50F83B258000B3E49 /* MyOpenALSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyOpenALSupport.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-		DC663FC60F83B258000B3E49 /* PASoundListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PASoundListener.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-		DC663FC70F83B258000B3E49 /* PASoundListener.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PASoundListener.m; sourceTree = &quot;&lt;group&gt;&quot;; };
-		DC663FC80F83B258000B3E49 /* PASoundMgr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PASoundMgr.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-		DC663FC90F83B258000B3E49 /* PASoundMgr.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PASoundMgr.m; sourceTree = &quot;&lt;group&gt;&quot;; };
-		DC663FCA0F83B258000B3E49 /* PASoundSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PASoundSource.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-		DC663FCB0F83B258000B3E49 /* PASoundSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PASoundSource.m; sourceTree = &quot;&lt;group&gt;&quot;; };
-		DC663FE00F83B2A2000B3E49 /* LICENSE.chipmunk */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE.chipmunk; sourceTree = &quot;&lt;group&gt;&quot;; };
 		DC663FE10F83B2A2000B3E49 /* README.chipmunk.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.chipmunk.txt; sourceTree = &quot;&lt;group&gt;&quot;; };
-		DC663FFC0F83B38E000B3E49 /* CocosNodeExtras.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CocosNodeExtras.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-		DC663FFD0F83B38E000B3E49 /* CocosNodeExtras.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CocosNodeExtras.m; sourceTree = &quot;&lt;group&gt;&quot;; };
 		DC6640020F83B3EA000B3E49 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
 		DC6640040F83B3EA000B3E49 /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; };
 		DCCBEF8E0F601EE20040855A /* MyScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyScene.h; sourceTree = &quot;&lt;group&gt;&quot;; };
@@ -212,19 +222,7 @@
 		DCF4733C0F62C70800448FB1 /* TileMapAtlas.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TileMapAtlas.m; sourceTree = &quot;&lt;group&gt;&quot;; };
 		DCF4733D0F62C70800448FB1 /* Transition.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Transition.h; sourceTree = &quot;&lt;group&gt;&quot;; };
 		DCF4733E0F62C70800448FB1 /* Transition.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Transition.m; sourceTree = &quot;&lt;group&gt;&quot;; };
-		DCF473400F62C70800448FB1 /* cocoslive.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cocoslive.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-		DCF473410F62C70800448FB1 /* cocoslive.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = cocoslive.m; sourceTree = &quot;&lt;group&gt;&quot;; };
-		DCF473420F62C70800448FB1 /* ScoreServerPost.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScoreServerPost.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-		DCF473430F62C70800448FB1 /* ScoreServerPost.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ScoreServerPost.m; sourceTree = &quot;&lt;group&gt;&quot;; };
-		DCF473440F62C70800448FB1 /* ScoreServerRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScoreServerRequest.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-		DCF473450F62C70800448FB1 /* ScoreServerRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ScoreServerRequest.m; sourceTree = &quot;&lt;group&gt;&quot;; };
 		DCF473460F62C70800448FB1 /* DONORS */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DONORS; sourceTree = &quot;&lt;group&gt;&quot;; };
-		DCF473480F62C70800448FB1 /* MotionStreak.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MotionStreak.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-		DCF473490F62C70800448FB1 /* MotionStreak.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MotionStreak.m; sourceTree = &quot;&lt;group&gt;&quot;; };
-		DCF4734B0F62C70800448FB1 /* Ribbon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Ribbon.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-		DCF4734C0F62C70800448FB1 /* Ribbon.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Ribbon.m; sourceTree = &quot;&lt;group&gt;&quot;; };
-		DCF4734D0F62C70800448FB1 /* StreakTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StreakTest.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-		DCF4734E0F62C70800448FB1 /* StreakTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StreakTest.m; sourceTree = &quot;&lt;group&gt;&quot;; };
 		DCF473510F62C70800448FB1 /* chipmunk-docs.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = &quot;chipmunk-docs.html&quot;; sourceTree = &quot;&lt;group&gt;&quot;; };
 		DCF473550F62C70800448FB1 /* chipmunk.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = chipmunk.c; sourceTree = &quot;&lt;group&gt;&quot;; };
 		DCF473560F62C70800448FB1 /* chipmunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chipmunk.h; sourceTree = &quot;&lt;group&gt;&quot;; };
@@ -358,13 +356,6 @@
 		DC663FC40F83B258000B3E49 /* sound-engine */ = {
 			isa = PBXGroup;
 			children = (
-				DC663FC50F83B258000B3E49 /* MyOpenALSupport.h */,
-				DC663FC60F83B258000B3E49 /* PASoundListener.h */,
-				DC663FC70F83B258000B3E49 /* PASoundListener.m */,
-				DC663FC80F83B258000B3E49 /* PASoundMgr.h */,
-				DC663FC90F83B258000B3E49 /* PASoundMgr.m */,
-				DC663FCA0F83B258000B3E49 /* PASoundSource.h */,
-				DC663FCB0F83B258000B3E49 /* PASoundSource.m */,
 			);
 			path = &quot;sound-engine&quot;;
 			sourceTree = &quot;&lt;group&gt;&quot;;
@@ -428,8 +419,13 @@
 		DCF473250F62C70800448FB1 /* Support */ = {
 			isa = PBXGroup;
 			children = (
+				DC05889C0FA4C98000B8C1AD /* ccArray.h */,
+				DC0588990FA4C96A00B8C1AD /* CGPointExtension.h */,
+				DC05889A0FA4C96A00B8C1AD /* CGPointExtension.m */,
 				DCF473260F62C70800448FB1 /* EAGLView.h */,
 				DCF473270F62C70800448FB1 /* EAGLView.m */,
+				DC0588960FA4C95E00B8C1AD /* FileUtils.h */,
+				DC0588970FA4C95E00B8C1AD /* FileUtils.m */,
 				DCF473280F62C70800448FB1 /* glu.c */,
 				DCF473290F62C70800448FB1 /* glu.h */,
 				DCF4732A0F62C70800448FB1 /* OpenGL_Internal.h */,
@@ -448,12 +444,12 @@
 		DCF4733F0F62C70800448FB1 /* cocoslive */ = {
 			isa = PBXGroup;
 			children = (
-				DCF473400F62C70800448FB1 /* cocoslive.h */,
-				DCF473410F62C70800448FB1 /* cocoslive.m */,
-				DCF473420F62C70800448FB1 /* ScoreServerPost.h */,
-				DCF473430F62C70800448FB1 /* ScoreServerPost.m */,
-				DCF473440F62C70800448FB1 /* ScoreServerRequest.h */,
-				DCF473450F62C70800448FB1 /* ScoreServerRequest.m */,
+				DC05886D0FA4C76300B8C1AD /* cocoslive.h */,
+				DC05886E0FA4C76300B8C1AD /* cocoslive.m */,
+				DC05886F0FA4C76300B8C1AD /* ScoreServerPost.h */,
+				DC0588700FA4C76300B8C1AD /* ScoreServerPost.m */,
+				DC0588710FA4C76300B8C1AD /* ScoreServerRequest.h */,
+				DC0588720FA4C76300B8C1AD /* ScoreServerRequest.m */,
 			);
 			path = cocoslive;
 			sourceTree = &quot;&lt;group&gt;&quot;;
@@ -461,13 +457,13 @@
 		DCF473470F62C70800448FB1 /* experimental */ = {
 			isa = PBXGroup;
 			children = (
-				DC663FAC0F83B23A000B3E49 /* README.experimental */,
-				DCF473480F62C70800448FB1 /* MotionStreak.h */,
-				DCF473490F62C70800448FB1 /* MotionStreak.m */,
-				DCF4734B0F62C70800448FB1 /* Ribbon.h */,
-				DCF4734C0F62C70800448FB1 /* Ribbon.m */,
-				DCF4734D0F62C70800448FB1 /* StreakTest.h */,
-				DCF4734E0F62C70800448FB1 /* StreakTest.m */,
+				DC0588A30FA4CA2000B8C1AD /* README.experimental.txt */,
+				DC0588760FA4C78F00B8C1AD /* MotionStreak.h */,
+				DC0588770FA4C78F00B8C1AD /* MotionStreak.m */,
+				DC0588790FA4C78F00B8C1AD /* Ribbon.h */,
+				DC05887A0FA4C78F00B8C1AD /* Ribbon.m */,
+				DC05887B0FA4C78F00B8C1AD /* StreakTest.h */,
+				DC05887C0FA4C78F00B8C1AD /* StreakTest.m */,
 				DC663FC40F83B258000B3E49 /* sound-engine */,
 			);
 			path = experimental;
@@ -486,7 +482,7 @@
 			isa = PBXGroup;
 			children = (
 				DCF473510F62C70800448FB1 /* chipmunk-docs.html */,
-				DC663FE00F83B2A2000B3E49 /* LICENSE.chipmunk */,
+				DC0588A10FA4C9D600B8C1AD /* LICENSE.chipmunk.txt */,
 				DC663FE10F83B2A2000B3E49 /* README.chipmunk.txt */,
 				DCF473540F62C70800448FB1 /* src */,
 			);
@@ -531,6 +527,7 @@
 		DCF473710F62C70800448FB1 /* TouchJSON */ = {
 			isa = PBXGroup;
 			children = (
+				DC0588A50FA4CA3C00B8C1AD /* LICENSE.TouchJSON.txt */,
 				DCF473720F62C70800448FB1 /* CDataScanner.h */,
 				DCF473730F62C70800448FB1 /* CDataScanner.m */,
 				DCF473740F62C70800448FB1 /* Extensions */,
@@ -571,6 +568,7 @@
 			isa = PBXGroup;
 			children = (
 				DCF473870F62C70800448FB1 /* fps_images.png */,
+				DC05886B0FA4C73300B8C1AD /* cocos2d-iphone.xcclassmodel */,
 			);
 			path = Resources;
 			sourceTree = &quot;&lt;group&gt;&quot;;
@@ -580,8 +578,6 @@
 			children = (
 				DCF472FD0F62C70800448FB1 /* CocosNode.h */,
 				DCF472FE0F62C70800448FB1 /* CocosNode.m */,
-				DC663FFC0F83B38E000B3E49 /* CocosNodeExtras.h */,
-				DC663FFD0F83B38E000B3E49 /* CocosNodeExtras.m */,
 				DCF472F20F62C70800448FB1 /* AtlasNode.h */,
 				DCF472F30F62C70800448FB1 /* AtlasNode.m */,
 				DC663FA60F83B1AE000B3E49 /* AtlasSprite.h */,
@@ -707,9 +703,11 @@
 				DCF473D00F62C70800448FB1 /* LICENSE in Resources */,
 				DCF473D10F62C70800448FB1 /* README in Resources */,
 				DCF473D20F62C70800448FB1 /* fps_images.png in Resources */,
-				DC663FAD0F83B23A000B3E49 /* README.experimental in Resources */,
-				DC663FE20F83B2A2000B3E49 /* LICENSE.chipmunk in Resources */,
 				DC663FE30F83B2A2000B3E49 /* README.chipmunk.txt in Resources */,
+				DC05886C0FA4C73300B8C1AD /* cocos2d-iphone.xcclassmodel in Resources */,
+				DC0588A20FA4C9D600B8C1AD /* LICENSE.chipmunk.txt in Resources */,
+				DC0588A40FA4CA2000B8C1AD /* README.experimental.txt in Resources */,
+				DC0588A60FA4CA3C00B8C1AD /* LICENSE.TouchJSON.txt in Resources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -760,12 +758,6 @@
 				DCF473AC0F62C70800448FB1 /* TiledGridAction.m in Sources */,
 				DCF473AD0F62C70800448FB1 /* TileMapAtlas.m in Sources */,
 				DCF473AE0F62C70800448FB1 /* Transition.m in Sources */,
-				DCF473AF0F62C70800448FB1 /* cocoslive.m in Sources */,
-				DCF473B00F62C70800448FB1 /* ScoreServerPost.m in Sources */,
-				DCF473B10F62C70800448FB1 /* ScoreServerRequest.m in Sources */,
-				DCF473B30F62C70800448FB1 /* MotionStreak.m in Sources */,
-				DCF473B50F62C70800448FB1 /* Ribbon.m in Sources */,
-				DCF473B60F62C70800448FB1 /* StreakTest.m in Sources */,
 				DCF473BA0F62C70800448FB1 /* chipmunk.c in Sources */,
 				DCF473BC0F62C70800448FB1 /* cpArbiter.c in Sources */,
 				DCF473BD0F62C70800448FB1 /* cpArray.c in Sources */,
@@ -789,10 +781,14 @@
 				DCF473CF0F62C70800448FB1 /* CJSONSerializer.m in Sources */,
 				DC663FAA0F83B1AE000B3E49 /* AtlasSprite.m in Sources */,
 				DC663FAB0F83B1AE000B3E49 /* AtlasSpriteManager.m in Sources */,
-				DC663FD60F83B258000B3E49 /* PASoundListener.m in Sources */,
-				DC663FD70F83B258000B3E49 /* PASoundMgr.m in Sources */,
-				DC663FD80F83B258000B3E49 /* PASoundSource.m in Sources */,
-				DC663FFE0F83B38E000B3E49 /* CocosNodeExtras.m in Sources */,
+				DC0588730FA4C76300B8C1AD /* cocoslive.m in Sources */,
+				DC0588740FA4C76300B8C1AD /* ScoreServerPost.m in Sources */,
+				DC0588750FA4C76300B8C1AD /* ScoreServerRequest.m in Sources */,
+				DC05887D0FA4C78F00B8C1AD /* MotionStreak.m in Sources */,
+				DC05887F0FA4C78F00B8C1AD /* Ribbon.m in Sources */,
+				DC0588800FA4C78F00B8C1AD /* StreakTest.m in Sources */,
+				DC0588980FA4C95E00B8C1AD /* FileUtils.m in Sources */,
+				DC05889B0FA4C96A00B8C1AD /* CGPointExtension.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};</diff>
      <filename>___PROJECTNAME___.xcodeproj/project.pbxproj</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>Support/Cocos2d/cocos2d/CocosNodeExtras.h</filename>
    </removed>
    <removed>
      <filename>Support/Cocos2d/cocos2d/CocosNodeExtras.m</filename>
    </removed>
    <removed>
      <filename>Support/Cocos2d/experimental/README.experimental</filename>
    </removed>
    <removed>
      <filename>Support/Cocos2d/experimental/sound-engine/MyOpenALSupport.h</filename>
    </removed>
    <removed>
      <filename>Support/Cocos2d/experimental/sound-engine/PASoundListener.h</filename>
    </removed>
    <removed>
      <filename>Support/Cocos2d/experimental/sound-engine/PASoundListener.m</filename>
    </removed>
    <removed>
      <filename>Support/Cocos2d/experimental/sound-engine/PASoundMgr.h</filename>
    </removed>
    <removed>
      <filename>Support/Cocos2d/experimental/sound-engine/PASoundMgr.m</filename>
    </removed>
    <removed>
      <filename>Support/Cocos2d/experimental/sound-engine/PASoundSource.h</filename>
    </removed>
    <removed>
      <filename>Support/Cocos2d/experimental/sound-engine/PASoundSource.m</filename>
    </removed>
    <removed>
      <filename>Support/Cocos2d/external/Chipmunk/LICENSE.chipmunk</filename>
    </removed>
    <removed>
      <filename>Support/Cocos2d/external/TouchJSON/LICENSE.TouchJSON</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>15979580c9eb5c19305c780f6c93a37117867ba5</id>
    </parent>
  </parents>
  <author>
    <name>Stephen Celis</name>
    <email>stephen@stephencelis.com</email>
  </author>
  <url>http://github.com/stephencelis/cocos2d-application/commit/bddbc05c92c6ab19b10ba8a1fa190ed5994b7739</url>
  <id>bddbc05c92c6ab19b10ba8a1fa190ed5994b7739</id>
  <committed-date>2009-04-26T10:04:35-07:00</committed-date>
  <authored-date>2009-04-26T10:02:13-07:00</authored-date>
  <message>Updating template for version 0.7.2.</message>
  <tree>65aff6945cd50ae162dde0d63b0c805986f04c4e</tree>
  <committer>
    <name>Stephen Celis</name>
    <email>stephen@stephencelis.com</email>
  </committer>
</commit>
