Cleaned up exception handling code when creating new fonts, spritebatches, and shaders

This commit is contained in:
Alex Szpakowski
2013-02-14 21:49:11 -04:00
parent e1779897ab
commit 1945b7975d
3 changed files with 21 additions and 42 deletions
@@ -63,6 +63,7 @@ ParticleSystem::ParticleSystem(Image *sprite, unsigned int buffer)
, pLast(0)
, pEnd(0)
, particleVerts(0)
, sprite(sprite)
, active(true)
, emissionRate(0)
, emitCounter(0)
@@ -91,11 +92,10 @@ ParticleSystem::ParticleSystem(Image *sprite, unsigned int buffer)
, offsetX(sprite->getWidth()*0.5f)
, offsetY(sprite->getHeight()*0.5f)
{
this->sprite = sprite;
sprite->retain();
sizes.push_back(1.0f);
colors.push_back(Colorf(1.0f, 1.0f, 1.0f, 1.0f));
setBufferSize(buffer);
sprite->retain();
}
ParticleSystem::~ParticleSystem()