<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>Resources/Images/snow.png</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -5,6 +5,7 @@ version 0.7.2 - xxx
  . Menu: an empty menu can be crated (issue #277)
  . Particles: Use by default fire.pvr (issue #276)
  . Particles: resetSystem actually resets the system (issue #252)
+ . Particles: texture is a property (issue #282)
  . SoundSupport: supports vorbis codec (issue #XXX)      &lt;------------- XXX CREATE ISSUE XXX
  . TextureAtlas: fixed colorarray memory leak (issue #272)
  . TileMapAtlas: supports fullpath (issue #220)</diff>
      <filename>CHANGELOG</filename>
    </modified>
    <modified>
      <diff></diff>
      <filename>Resources/Images/stars.png</filename>
    </modified>
    <modified>
      <diff>@@ -410,6 +410,7 @@
 		50851BF60F35FB0F00978029 /* ccExceptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 50851BF40F35FB0F00978029 /* ccExceptions.h */; };
 		50851C3A0F35FE7D00978029 /* UIColor-OpenGL.h in Headers */ = {isa = PBXBuildFile; fileRef = 50851C380F35FE7D00978029 /* UIColor-OpenGL.h */; };
 		50851C3B0F35FE7D00978029 /* UIColor-OpenGL.m in Sources */ = {isa = PBXBuildFile; fileRef = 50851C390F35FE7D00978029 /* UIColor-OpenGL.m */; };
+		5085BFAE0F7D67FF008DBA21 /* snow.png in Resources */ = {isa = PBXBuildFile; fileRef = 5085BFAD0F7D67FF008DBA21 /* snow.png */; };
 		508D48F20E1C76890091E768 /* libChipmunk.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 50B2C4D10E100AEA00AE9530 /* libChipmunk.a */; };
 		509A79970F6188420032F449 /* AtlasSprite.h in Headers */ = {isa = PBXBuildFile; fileRef = 509A79950F6188420032F449 /* AtlasSprite.h */; };
 		509A79980F6188420032F449 /* AtlasSprite.m in Sources */ = {isa = PBXBuildFile; fileRef = 509A79960F6188420032F449 /* AtlasSprite.m */; };
@@ -1225,6 +1226,7 @@
 		50851BF40F35FB0F00978029 /* ccExceptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ccExceptions.h; sourceTree = &quot;&lt;group&gt;&quot;; };
 		50851C380F35FE7D00978029 /* UIColor-OpenGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = &quot;UIColor-OpenGL.h&quot;; sourceTree = &quot;&lt;group&gt;&quot;; };
 		50851C390F35FE7D00978029 /* UIColor-OpenGL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = &quot;UIColor-OpenGL.m&quot;; sourceTree = &quot;&lt;group&gt;&quot;; };
+		5085BFAD0F7D67FF008DBA21 /* snow.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = snow.png; sourceTree = &quot;&lt;group&gt;&quot;; };
 		509A79950F6188420032F449 /* AtlasSprite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AtlasSprite.h; sourceTree = &quot;&lt;group&gt;&quot;; };
 		509A79960F6188420032F449 /* AtlasSprite.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AtlasSprite.m; sourceTree = &quot;&lt;group&gt;&quot;; };
 		509A79990F6188500032F449 /* AtlasSpriteManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AtlasSpriteManager.h; sourceTree = &quot;&lt;group&gt;&quot;; };
@@ -1939,11 +1941,11 @@
 		29B97317FDCFA39411CA2CEA /* Resources */ = {
 			isa = PBXGroup;
 			children = (
-				8EDF3E8D0F6BD8CD00F54643 /* sfx */,
 				50B2CB2B0E10EE4A00AE9530 /* Info.plist */,
 				50B2CEA70E12A58900AE9530 /* ChipmunkDemo-Info.plist */,
 				50B2CB240E10EE4A00AE9530 /* Default.png */,
 				50B2CB250E10EE4A00AE9530 /* Icon.png */,
+				8EDF3E8D0F6BD8CD00F54643 /* sfx */,
 				50B2CB260E10EE4A00AE9530 /* Images */,
 			);
 			name = Resources;
@@ -2329,10 +2331,11 @@
 		50B2CB260E10EE4A00AE9530 /* Images */ = {
 			isa = PBXGroup;
 			children = (
+				50E675CD0F65857D003DAA90 /* sprites_test */,
+				5085BFAD0F7D67FF008DBA21 /* snow.png */,
 				502AACF20F79715D001E3F87 /* fire.pvr */,
 				8EDF3FD90F6BE3F400F54643 /* listener-marker.png */,
 				8EDF3FDA0F6BE3F400F54643 /* source-marker.png */,
-				50E675CD0F65857D003DAA90 /* sprites_test */,
 				50E676A60F658B68003DAA90 /* grossinis_sister1.pvr */,
 				50E676960F6587FD003DAA90 /* spritesheet1.pvr */,
 				50E675060F65628C003DAA90 /* spritesheet1.png */,
@@ -3860,6 +3863,7 @@
 				50405A200E32A15500213FEF /* smoke.png in Resources */,
 				501CD1730E99873000B86F68 /* fps_images.png in Resources */,
 				502AACF30F79715E001E3F87 /* fire.pvr in Resources */,
+				5085BFAE0F7D67FF008DBA21 /* snow.png in Resources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};</diff>
      <filename>cocos2d-iphone.xcodeproj/project.pbxproj</filename>
    </modified>
    <modified>
      <diff>@@ -172,6 +172,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;</diff>
      <filename>cocos2d/Particle.h</filename>
    </modified>
    <modified>
      <diff>@@ -47,6 +47,7 @@
 @synthesize totalParticles;
 @synthesize size, sizeVar;
 @synthesize gravity;
+@synthesize texture;
 
 -(id) init {
 	NSException* myException = [NSException
@@ -129,8 +130,8 @@
 	cpVect 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() );</diff>
      <filename>cocos2d/Particle.m</filename>
    </modified>
    <modified>
      <diff>@@ -21,6 +21,7 @@
 //
 // ParticleFireworks
 //
+#pragma mark Fireworks
 @implementation ParticleFireworks
 -(id) init
 {
@@ -84,8 +85,7 @@
 	size = 8.0f;
 	sizeVar = 2.0f;
 
-	texture = [[TextureMgr sharedTextureMgr] addImage: @&quot;fire.pvr&quot;];
-	[texture retain];
+	self.texture = [[TextureMgr sharedTextureMgr] addImage: @&quot;stars.png&quot;];
 
 	// additive
 	blendAdditive = NO;
@@ -97,6 +97,7 @@
 //
 // ParticleFire
 //
+#pragma mark Fire
 @implementation ParticleFire
 -(id) init
 {
@@ -125,7 +126,7 @@
 	
 	// emitter position
 	position.x = 160;
-	position.y = 60;
+	position.y = 100;
 	posVar.x = 40;
 	posVar.y = 20;
 	
@@ -162,8 +163,7 @@
 	endColorVar.b = 0.0f;
 	endColorVar.a = 0.0f;
 	
-	texture = [[TextureMgr sharedTextureMgr] addImage: @&quot;fire.pvr&quot;];
-	[texture retain];
+	self.texture = [[TextureMgr sharedTextureMgr] addImage: @&quot;fire.pvr&quot;];
 	
 	// additive
 	blendAdditive = YES;
@@ -175,6 +175,7 @@
 //
 // ParticleSun
 //
+#pragma mark Sun
 @implementation ParticleSun
 -(id) init
 {
@@ -243,8 +244,7 @@
 	endColorVar.b = 0.0f;
 	endColorVar.a = 0.0f;
 	
-	texture = [[TextureMgr sharedTextureMgr] addImage: @&quot;fire.pvr&quot;];
-	[texture retain];
+	self.texture = [[TextureMgr sharedTextureMgr] addImage: @&quot;fire.pvr&quot;];
 	
 	return self;
 }
@@ -253,6 +253,7 @@
 //
 // ParticleGalaxy
 //
+#pragma mark Galaxy
 @implementation ParticleGalaxy
 -(id) init
 {
@@ -322,8 +323,7 @@
 	endColorVar.b = 0.0f;
 	endColorVar.a = 0.0f;
 	
-	texture = [[TextureMgr sharedTextureMgr] addImage: @&quot;fire.pvr&quot;];
-	[texture retain];
+	self.texture = [[TextureMgr sharedTextureMgr] addImage: @&quot;fire.pvr&quot;];
 
 	// additive
 	blendAdditive = YES;
@@ -335,6 +335,7 @@
 //
 // ParticleFlower
 //
+#pragma mark Flower
 @implementation ParticleFlower
 -(id) init
 {
@@ -404,8 +405,7 @@
 	endColorVar.b = 0.0f;
 	endColorVar.a = 0.0f;
 	
-	texture = [[TextureMgr sharedTextureMgr] addImage: @&quot;fire.pvr&quot;];
-	[texture retain];
+	self.texture = [[TextureMgr sharedTextureMgr] addImage: @&quot;stars.png&quot;];
 
 	// additive
 	blendAdditive = YES;
@@ -417,6 +417,7 @@
 //
 // ParticleMeteor
 //
+#pragma mark Meteor
 @implementation ParticleMeteor
 -(id) init
 {
@@ -486,8 +487,7 @@
 	endColorVar.b = 0.0f;
 	endColorVar.a = 0.0f;
 	
-	texture = [[TextureMgr sharedTextureMgr] addImage: @&quot;fire.pvr&quot;];
-	[texture retain];
+	self.texture = [[TextureMgr sharedTextureMgr] addImage: @&quot;fire.pvr&quot;];
 	
 	// additive
 	blendAdditive = YES;
@@ -499,6 +499,7 @@
 //
 // ParticleSpiral
 //
+#pragma mark Spiral
 @implementation ParticleSpiral
 -(id) init
 {
@@ -568,8 +569,7 @@
 	endColorVar.b = 0.5f;
 	endColorVar.a = 0.0f;
 	
-	texture = [[TextureMgr sharedTextureMgr] addImage: @&quot;fire.pvr&quot;];
-	[texture retain];
+	self.texture = [[TextureMgr sharedTextureMgr] addImage: @&quot;fire.pvr&quot;];
 
 	// additive
 	blendAdditive = NO;
@@ -581,6 +581,7 @@
 //
 // ParticleExplosion
 //
+#pragma mark Explosion
 @implementation ParticleExplosion
 -(id) init
 {
@@ -650,11 +651,10 @@
 	endColorVar.b = 0.5f;
 	endColorVar.a = 0.0f;
 	
-	texture = [[TextureMgr sharedTextureMgr] addImage: @&quot;fire.pvr&quot;];
-	[texture retain];
+	self.texture = [[TextureMgr sharedTextureMgr] addImage: @&quot;stars.png&quot;];
 
 	// additive
-	blendAdditive = NO;
+	blendAdditive = YES;
 	
 	return self;
 }
@@ -663,6 +663,7 @@
 //
 // ParticleSmoke
 //
+#pragma mark Smoke
 @implementation ParticleSmoke
 -(id) init
 {
@@ -691,7 +692,7 @@
 	
 	// emitter position
 	position.x = 160;
-	position.y = 0;
+	position.y = 100;
 	posVar.x = 20;
 	posVar.y = 0;
 	
@@ -728,8 +729,7 @@
 	endColorVar.b = 0.0f;
 	endColorVar.a = 0.0f;
 	
-	texture = [[TextureMgr sharedTextureMgr] addImage: @&quot;fire.pvr&quot;];
-	[texture retain];
+	self.texture = [[TextureMgr sharedTextureMgr] addImage: @&quot;fire.pvr&quot;];
 	
 	// additive
 	blendAdditive = NO;
@@ -738,6 +738,7 @@
 }
 @end
 
+#pragma mark Snow
 @implementation ParticleSnow
 -(id) init
 {
@@ -774,12 +775,12 @@
 	
 	// emitter position
 	position.x = [[Director sharedDirector] winSize].width / 2;
-	position.y = [[Director sharedDirector] winSize].height + 10;
+	position.y = [[Director sharedDirector] winSize].height - 100;
 	posVar.x = [[Director sharedDirector] winSize].width / 2;
 	posVar.y = 0;
 	
 	// life of particles
-	life = 45;
+	life = 25;
 	lifeVar = 15;
 	
 	// size, in pixels
@@ -790,26 +791,25 @@
 	emissionRate = 10;
 	
 	// color of particles
-	startColor.r = 1.0f;
-	startColor.g = 1.0f;
-	startColor.b = 1.0f;
+	startColor.r = 0.9f;
+	startColor.g = 0.9f;
+	startColor.b = 0.9f;
 	startColor.a = 1.0f;
 	startColorVar.r = 0.0f;
 	startColorVar.g = 0.0f;
-	startColorVar.b = 0.0f;
+	startColorVar.b = 0.1f;
 	startColorVar.a = 0.0f;
-	endColor.r = 1.0f;
-	endColor.g = 1.0f;
-	endColor.b = 1.0f;
+	endColor.r = 0.9f;
+	endColor.g = 0.9f;
+	endColor.b = 0.9f;
 	endColor.a = 0.0f;
 	endColorVar.r = 0.0f;
 	endColorVar.g = 0.0f;
-	endColorVar.b = 0.0f;
-	endColorVar.a = 0.0f;
-	
-	texture = [[TextureMgr sharedTextureMgr] addImage: @&quot;fire.pvr&quot;];
-	[texture retain];
+	endColorVar.b = 0.1f;
+	endColorVar.a = 0.5f;
 	
+	self.texture = [[TextureMgr sharedTextureMgr] addImage: @&quot;snow.png&quot;];
+
 	// additive
 	blendAdditive = NO;
 	
@@ -817,6 +817,7 @@
 }
 @end
 
+#pragma mark Rain
 @implementation ParticleRain
 -(id) init
 {
@@ -853,7 +854,7 @@
 	
 	// emitter position
 	position.x = [[Director sharedDirector] winSize].width / 2;
-	position.y = [[Director sharedDirector] winSize].height;
+	position.y = [[Director sharedDirector] winSize].height - 100;
 	posVar.x = [[Director sharedDirector] winSize].width / 2;
 	posVar.y = 0;
 	
@@ -886,8 +887,7 @@
 	endColorVar.b = 0.0f;
 	endColorVar.a = 0.0f;
 	
-	texture = [[TextureMgr sharedTextureMgr] addImage: @&quot;fire.pvr&quot;];
-	[texture retain];
+	self.texture = [[TextureMgr sharedTextureMgr] addImage: @&quot;fire.pvr&quot;];
 	
 	// additive
 	blendAdditive = NO;</diff>
      <filename>cocos2d/ParticleSystems.m</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>e24b7bb0fcdebfe8c9d46bb89d1c3f7d70c4d4c0</id>
    </parent>
  </parents>
  <author>
    <name>ricardoquesada</name>
    <email>ricardoquesada@79afc9a6-2f50-0410-804d-6f1bdedaafc9</email>
  </author>
  <url>http://github.com/nullstyle/cocos2d-iphone/commit/67537536b09bbebd60b3d2f096423ee0c6d29460</url>
  <id>67537536b09bbebd60b3d2f096423ee0c6d29460</id>
  <committed-date>2009-03-27T13:50:53-07:00</committed-date>
  <authored-date>2009-03-27T13:50:53-07:00</authored-date>
  <message>fixed issue #282

git-svn-id: http://cocos2d-iphone.googlecode.com/svn/trunk@735 79afc9a6-2f50-0410-804d-6f1bdedaafc9</message>
  <tree>f96a736b8a9a334c43d7ed8c5cc0ad10c57595a3</tree>
  <committer>
    <name>ricardoquesada</name>
    <email>ricardoquesada@79afc9a6-2f50-0410-804d-6f1bdedaafc9</email>
  </committer>
</commit>
