make supertux accepts normal paths on the commandline
[supertux.git] / src / particlesystem.cpp
index baa812e..b82152a 100644 (file)
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 
+#include <config.h>
+
 #include <iostream>
 #include <cmath>
 
 #include "particlesystem.h"
-#include "globals.h"
-#include "lispreader.h"
-#include "lispwriter.h"
-#include "screen/drawing_context.h"
+#include "app/globals.h"
+#include "utils/lispreader.h"
+#include "utils/lispwriter.h"
+#include "video/drawing_context.h"
 
 ParticleSystem::ParticleSystem()
 {
@@ -86,8 +88,9 @@ SnowParticleSystem::SnowParticleSystem()
         int snowsize = rand() % 3;
         particle->texture = snowimages[snowsize];
         do {
-            particle->speed = snowsize/60.0 + (float(rand()%10)/300.0);
-        } while(particle->speed < 0.01);
+            particle->speed = snowsize*.2 + (float(rand()%10)*.4);
+        } while(particle->speed < 1);
+        particle->speed *= 10; // gravity
 
         particles.push_back(particle);
     }
@@ -138,7 +141,7 @@ CloudParticleSystem::CloudParticleSystem()
         particle->pos.x = rand() % int(virtual_width);
         particle->pos.y = rand() % int(virtual_height);
         particle->texture = cloudimage;
-        particle->speed = -float(250 + rand() % 200) / 1000.0;
+        particle->speed = -float(25 + rand() % 30);
 
         particles.push_back(particle);
     }