mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +02:00
Removed some ParticleSystem methods which existed but did nothing since version 0.5.0 or earlier
This commit is contained in:
@@ -44,7 +44,7 @@ love::math::RandomGenerator rng;
|
||||
|
||||
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)
|
||||
@@ -93,7 +93,6 @@ ParticleSystem::ParticleSystem(Image *image, uint32 size)
|
||||
, particleLifeMax(0)
|
||||
, direction(0)
|
||||
, spread(0)
|
||||
, relative(false)
|
||||
, speedMin(0)
|
||||
, speedMax(0)
|
||||
, linearAccelerationMin(0, 0)
|
||||
@@ -475,16 +474,6 @@ float ParticleSystem::getSpread() const
|
||||
return spread;
|
||||
}
|
||||
|
||||
void ParticleSystem::setRelativeDirection(bool relative)
|
||||
{
|
||||
this->relative = relative;
|
||||
}
|
||||
|
||||
bool ParticleSystem::isRelativeDirection() const
|
||||
{
|
||||
return relative;
|
||||
}
|
||||
|
||||
void ParticleSystem::setSpeed(float speed)
|
||||
{
|
||||
speedMin = speedMax = speed;
|
||||
|
||||
@@ -157,7 +157,7 @@ public:
|
||||
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.
|
||||
@@ -214,18 +214,6 @@ public:
|
||||
**/
|
||||
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.
|
||||
@@ -579,9 +567,6 @@ protected:
|
||||
float direction;
|
||||
float spread;
|
||||
|
||||
// Whether the direction should be relative to the emitter's movement.
|
||||
bool relative;
|
||||
|
||||
// The speed.
|
||||
float speedMin;
|
||||
float speedMax;
|
||||
|
||||
@@ -237,21 +237,6 @@ int w_ParticleSystem_getSpread(lua_State *L)
|
||||
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);
|
||||
@@ -647,8 +632,6 @@ static const luaL_Reg functions[] =
|
||||
{ "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 },
|
||||
|
||||
@@ -54,8 +54,6 @@ int w_ParticleSystem_setDirection(lua_State *L);
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user