kugelblitz electrifies water on contact - electrified water is baaaaaaad
[supertux.git] / src / object / particlesystem.cpp
index 3dc2bf6..5edb5a4 100644 (file)
 #include <iostream>
 #include <cmath>
 
-#include "particlesystem.h"
-#include "video/drawing_context.h"
-#include "lisp/parser.h"
-#include "lisp/lisp.h"
-#include "lisp/writer.h"
-#include "resources.h"
-#include "main.h"
+#include "particlesystem.hpp"
+#include "video/drawing_context.hpp"
+#include "lisp/parser.hpp"
+#include "lisp/lisp.hpp"
+#include "lisp/writer.hpp"
+#include "resources.hpp"
+#include "main.hpp"
 
 ParticleSystem::ParticleSystem()
 {
@@ -73,9 +73,9 @@ void ParticleSystem::draw(DrawingContext& context)
 
 SnowParticleSystem::SnowParticleSystem()
 {
-    snowimages[0] = new Surface(datadir+"/images/objects/particles/snow0.png", true);
-    snowimages[1] = new Surface(datadir+"/images/objects/particles/snow1.png", true);
-    snowimages[2] = new Surface(datadir+"/images/objects/particles/snow2.png", true);
+    snowimages[0] = new Surface("images/objects/particles/snow0.png", true);
+    snowimages[1] = new Surface("images/objects/particles/snow1.png", true);
+    snowimages[2] = new Surface("images/objects/particles/snow2.png", true);
 
     virtual_width = SCREEN_WIDTH * 2;
 
@@ -129,14 +129,16 @@ void SnowParticleSystem::update(float elapsed_time)
     }
 }
 
+//FIXME: Sometimes both ghosts have the same image
+//       Ghosts don't change their movement pattern - not random
 GhostParticleSystem::GhostParticleSystem()
 {
-    ghosts[0] = new Surface(datadir+"/images/objects/particles/ghost0.png", true);
-    ghosts[1] = new Surface(datadir+"/images/objects/particles/ghost1.png", true);
+    ghosts[0] = new Surface("images/objects/particles/ghost0.png", true);
+    ghosts[1] = new Surface("images/objects/particles/ghost1.png", true);
 
     virtual_width = SCREEN_WIDTH * 2;
 
-    // create some random snowflakes
+    // create two ghosts
     size_t ghostcount = 2;
     for(size_t i=0; i<ghostcount; ++i) {
         GhostParticle* particle = new GhostParticle;
@@ -188,7 +190,7 @@ void GhostParticleSystem::update(float elapsed_time)
 
 CloudParticleSystem::CloudParticleSystem()
 {
-    cloudimage = new Surface(datadir + "/images/objects/particles/cloud.png", true);
+    cloudimage = new Surface("images/objects/particles/cloud.png", true);
 
     virtual_width = 2000.0;