From f5a394a5051384a930d635da22ccafc6beb1cb84 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 10 Jan 2010 17:19:24 +0200 Subject: Change code style --- src/particleemitter.cpp | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'src/particleemitter.cpp') diff --git a/src/particleemitter.cpp b/src/particleemitter.cpp index d4a56bfd..885f25d4 100644 --- a/src/particleemitter.cpp +++ b/src/particleemitter.cpp @@ -380,19 +380,18 @@ ParticleEmitter::readParticleEmitterProp(xmlNodePtr propertyNode, T def) retval.set((T) XML::getFloatProperty(propertyNode, "min", (double) def), (T) XML::getFloatProperty(propertyNode, "max", (double) def)); - std::string change = XML::getProperty(propertyNode, "change-func", "none"); - T amplitude = (T) XML::getFloatProperty(propertyNode, "change-amplitude", 0.0); - int period = XML::getProperty(propertyNode, "change-period", 0); - int phase = XML::getProperty(propertyNode, "change-phase", 0); - if (change == "saw" || change == "sawtooth") { - retval.setFunction(FUNC_SAW, amplitude, period, phase); - } else if (change == "sine" || change == "sinewave") { - retval.setFunction(FUNC_SINE, amplitude, period, phase); - } else if (change == "triangle") { - retval.setFunction(FUNC_TRIANGLE, amplitude, period, phase); - } else if (change == "square"){ - retval.setFunction(FUNC_SQUARE, amplitude, period, phase); - } + std::string change = XML::getProperty(propertyNode, "change-func", "none"); + T amplitude = (T) XML::getFloatProperty(propertyNode, "change-amplitude", 0.0); + int period = XML::getProperty(propertyNode, "change-period", 0); + int phase = XML::getProperty(propertyNode, "change-phase", 0); + if (change == "saw" || change == "sawtooth") + retval.setFunction(FUNC_SAW, amplitude, period, phase); + else if (change == "sine" || change == "sinewave") + retval.setFunction(FUNC_SINE, amplitude, period, phase); + else if (change == "triangle") + retval.setFunction(FUNC_TRIANGLE, amplitude, period, phase); + else if (change == "square") + retval.setFunction(FUNC_SQUARE, amplitude, period, phase); return retval; } -- cgit v1.2.3-70-g09d2