summaryrefslogtreecommitdiff
path: root/src/particleemitter.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-04-12 18:39:00 +0300
committerAndrei Karas <akaras@inbox.ru>2013-04-12 18:39:00 +0300
commit351821c1f18f9285be58df0a05339936311f6490 (patch)
tree47a60cad4f61f63c5ac2faf98dcae24760d7fe11 /src/particleemitter.cpp
parente50632a83a3c679cffd372656277a304d5d853f8 (diff)
downloadmv-351821c1f18f9285be58df0a05339936311f6490.tar.gz
mv-351821c1f18f9285be58df0a05339936311f6490.tar.bz2
mv-351821c1f18f9285be58df0a05339936311f6490.tar.xz
mv-351821c1f18f9285be58df0a05339936311f6490.zip
first part of style fixed after cpplint checks.
Diffstat (limited to 'src/particleemitter.cpp')
-rw-r--r--src/particleemitter.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/particleemitter.cpp b/src/particleemitter.cpp
index 7666fb063..1ae439e97 100644
--- a/src/particleemitter.cpp
+++ b/src/particleemitter.cpp
@@ -85,7 +85,6 @@ ParticleEmitter::ParticleEmitter(const XmlNodePtr emitterNode,
}
else if (name == "position-y")
{
-
mParticlePosY = readParticleEmitterProp(propertyNode, 0.0f);
mParticlePosY.minVal *= SIN45;
mParticlePosY.maxVal *= SIN45;
@@ -141,7 +140,7 @@ ParticleEmitter::ParticleEmitter(const XmlNodePtr emitterNode,
{
mParticleGravity = readParticleEmitterProp(propertyNode, 0.0f);
}
- else if (name == "randomnes" || name == "randomness") // legacy bug
+ else if (name == "randomnes" || name == "randomness") // legacy bug
{
mParticleRandomness = readParticleEmitterProp(propertyNode, 0);
}
@@ -213,8 +212,7 @@ ParticleEmitter::ParticleEmitter(const XmlNodePtr emitterNode,
ImageSet *const imageset = ResourceManager::getInstance()
->getImageSet(XML::getProperty(propertyNode, "imageset", ""),
XML::getProperty(propertyNode, "width", 0),
- XML::getProperty(propertyNode, "height", 0)
- );
+ XML::getProperty(propertyNode, "height", 0));
if (!imageset)
{
@@ -285,15 +283,14 @@ ParticleEmitter::ParticleEmitter(const XmlNodePtr emitterNode,
{
mParticleRotation.addTerminator(rand);
}
- } // for frameNode
+ } // for frameNode
}
else if (xmlNameEqual(propertyNode, "animation"))
{
ImageSet *const imageset = ResourceManager::getInstance()
->getImageSet(XML::getProperty(propertyNode, "imageset", ""),
XML::getProperty(propertyNode, "width", 0),
- XML::getProperty(propertyNode, "height", 0)
- );
+ XML::getProperty(propertyNode, "height", 0));
if (!imageset)
{
@@ -364,7 +361,7 @@ ParticleEmitter::ParticleEmitter(const XmlNodePtr emitterNode,
{
mParticleAnimation.addTerminator(rand);
}
- } // for frameNode
+ } // for frameNode
}
else if (xmlNameEqual(propertyNode, "deatheffect"))
{
@@ -590,7 +587,7 @@ std::list<Particle *> ParticleEmitter::createParticles(const int tick)
void ParticleEmitter::adjustSize(const int w, const int h)
{
if (w == 0 || h == 0)
- return; // new dimensions are illegal
+ return; // new dimensions are illegal
// calculate the old rectangle
const int oldArea = static_cast<int>(
@@ -598,8 +595,8 @@ void ParticleEmitter::adjustSize(const int w, const int h)
mParticlePosX.maxVal - mParticlePosY.minVal);
if (oldArea == 0)
{
- //when the effect has no dimension it is
- //not designed to be resizeable
+ // when the effect has no dimension it is
+ // not designed to be resizeable
return;
}