Commits

Alex Szpakowski committed f1cfbea

Removed some ParticleSystem methods which existed but did nothing since version 0.5.0 or earlier

Comments (0)

Files changed (4)

src/modules/graphics/opengl/ParticleSystem.cpp

 
 Colorf colorToFloat(const Color &c)
 {
-	return Colorf((GLfloat)c.r/255.0f, (GLfloat)c.g/255.0f, (GLfloat)c.b/255.0f, (GLfloat)c.a/255.0f);
+	return Colorf((float)c.r/255.0f, (float)c.g/255.0f, (float)c.b/255.0f, (float)c.a/255.0f);
 }
 
 float calculate_variation(float inner, float outer, float var)
 	, particleLifeMax(0)
 	, direction(0)
 	, spread(0)
-	, relative(false)
 	, speedMin(0)
 	, speedMax(0)
 	, linearAccelerationMin(0, 0)
 	return spread;
 }
 
-void ParticleSystem::setRelativeDirection(bool relative)
-{
-	this->relative = relative;
-}
-
-bool ParticleSystem::isRelativeDirection() const
-{
-	return relative;
-}
-
 void ParticleSystem::setSpeed(float speed)
 {
 	speedMin = speedMax = speed;

src/modules/graphics/opengl/ParticleSystem.h

 	void getParticleLifetime(float *min, float *max) const;
 
 	/**
-	 * Sets the position of the center of the emitter and the direction (if set to relative).
+	 * Sets the position of the center of the emitter.
 	 * Used to move the emitter without changing the position of already existing particles.
 	 * @param x The x-coordinate.
 	 * @param y The y-coordinate.
 	float getSpread() const;
 
 	/**
-	 * Sets whether the direction should be relative to the particle emitter's movement. Used in conjunction with setPosition.
-	 * @param relative Whether to have relative direction.
-	 **/
-	void setRelativeDirection(bool relative);
-
-	/**
-	 * Returns whether the direction is relative to the particle emitter's
-	 * movement.
-	 **/
-	bool isRelativeDirection() const;
-
-	/**
 	 * Sets the speed of the particles.
 	 * @param speed The speed.
 	 **/
 	float direction;
 	float spread;
 
-	// Whether the direction should be relative to the emitter's movement.
-	bool relative;
-
 	// The speed.
 	float speedMin;
 	float speedMax;

src/modules/graphics/opengl/wrap_ParticleSystem.cpp

 	return 1;
 }
 
-int w_ParticleSystem_setRelativeDirection(lua_State *L)
-{
-	ParticleSystem *t = luax_checkparticlesystem(L, 1);
-	bool arg1 = (bool)luax_toboolean(L, 2);
-	t->setRelativeDirection(arg1);
-	return 0;
-}
-
-int w_ParticleSystem_isRelativeDirection(lua_State *L)
-{
-	ParticleSystem *t = luax_checkparticlesystem(L, 1);
-	luax_pushboolean(L, t->isRelativeDirection());
-	return 1;
-}
-
 int w_ParticleSystem_setSpeed(lua_State *L)
 {
 	ParticleSystem *t = luax_checkparticlesystem(L, 1);
 	{ "getDirection", w_ParticleSystem_getDirection },
 	{ "setSpread", w_ParticleSystem_setSpread },
 	{ "getSpread", w_ParticleSystem_getSpread },
-	{ "setRelativeDirection", w_ParticleSystem_setRelativeDirection },
-	{ "isRelativeDirection", w_ParticleSystem_isRelativeDirection },
 	{ "setSpeed", w_ParticleSystem_setSpeed },
 	{ "getSpeed", w_ParticleSystem_getSpeed },
 	{ "setLinearAcceleration", w_ParticleSystem_setLinearAcceleration },

src/modules/graphics/opengl/wrap_ParticleSystem.h

 int w_ParticleSystem_getDirection(lua_State *L);
 int w_ParticleSystem_setSpread(lua_State *L);
 int w_ParticleSystem_getSpread(lua_State *L);
-int w_ParticleSystem_setRelativeDirection(lua_State *L);
-int w_ParticleSystem_isRelativeDirection(lua_State *L);
 int w_ParticleSystem_setSpeed(lua_State *L);
 int w_ParticleSystem_getSpeed(lua_State *L);
 int w_ParticleSystem_setLinearAcceleration(lua_State *L);