Renamed ParticleSystem:count, Channel:count, and all getNum* functions to get*Count (issue #602)

This commit is contained in:
Alex Szpakowski
2013-05-03 04:04:44 -03:00
parent 3bf43dadd8
commit 4c616e409b
26 changed files with 73 additions and 73 deletions
@@ -525,7 +525,7 @@ std::vector<Color> ParticleSystem::getColor() const
return ncolors;
}
int ParticleSystem::count() const
int ParticleSystem::getCount() const
{
return (int)(pLast - pStart);
}
@@ -587,8 +587,8 @@ void ParticleSystem::draw(float x, float y, float angle, float sx, float sy, flo
{
if (image == 0) return; // just in case of failure
int numParticles = count();
if (numParticles == 0) return; // don't bother if there's nothing to do
int num = getCount();
if (num == 0) return; // don't bother if there's nothing to do
Color curcolor = gl.getColor();
@@ -602,7 +602,7 @@ void ParticleSystem::draw(float x, float y, float angle, float sx, float sy, flo
const vertex *tVerts;
// set the vertex data for each particle (transformation, texcoords, color)
for (int i = 0; i < numParticles; i++)
for (int i = 0; i < num; i++)
{
particle *p = pStart + i;
@@ -638,7 +638,7 @@ void ParticleSystem::draw(float x, float y, float angle, float sx, float sy, flo
glVertexPointer(2, GL_FLOAT, sizeof(vertex), (GLvoid *)&particleVerts[0].x);
glTexCoordPointer(2, GL_FLOAT, sizeof(vertex), (GLvoid *)&particleVerts[0].s);
glDrawArrays(GL_QUADS, 0, numParticles*4);
glDrawArrays(GL_QUADS, 0, num*4);
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
glDisableClientState(GL_VERTEX_ARRAY);
+1 -1
View File
@@ -435,7 +435,7 @@ public:
/**
* Returns the amount of particles that are currently active in the system.
**/
int count() const;
int getCount() const;
/**
* Starts/resumes the particle emitter.
@@ -529,10 +529,10 @@ int w_ParticleSystem_getColors(lua_State *L)
return colors.size();
}
int w_ParticleSystem_count(lua_State *L)
int w_ParticleSystem_getCount(lua_State *L)
{
ParticleSystem *t = luax_checkparticlesystem(L, 1);
lua_pushnumber(L, t->count());
lua_pushnumber(L, t->getCount());
return 1;
}
@@ -647,7 +647,7 @@ static const luaL_Reg functions[] =
{ "getColors", w_ParticleSystem_getColors },
{ "setOffset", w_ParticleSystem_setOffset },
{ "getOffset", w_ParticleSystem_getOffset },
{ "count", w_ParticleSystem_count },
{ "getCount", w_ParticleSystem_getCount },
{ "start", w_ParticleSystem_start },
{ "stop", w_ParticleSystem_stop },
{ "pause", w_ParticleSystem_pause },
@@ -78,7 +78,7 @@ int w_ParticleSystem_setColors(lua_State *L);
int w_ParticleSystem_getColors(lua_State *L);
int w_ParticleSystem_setOffset(lua_State *L);
int w_ParticleSystem_getOffset(lua_State *L);
int w_ParticleSystem_count(lua_State *L);
int w_ParticleSystem_getCount(lua_State *L);
int w_ParticleSystem_start(lua_State *L);
int w_ParticleSystem_stop(lua_State *L);
int w_ParticleSystem_pause(lua_State *L);