object/explosion.[ch]pp: Added the "hurt" and "push" members.
[supertux.git] / src / object / cloud_particle_system.cpp
index ace29ee..2cbbca2 100644 (file)
@@ -33,10 +33,10 @@ CloudParticleSystem::CloudParticleSystem() :
   // create some random clouds
   for(size_t i=0; i<15; ++i) {
     CloudParticle* particle = new CloudParticle;
-    particle->pos.x = systemRandom.rand(static_cast<int>(virtual_width));
-    particle->pos.y = systemRandom.rand(static_cast<int>(virtual_height));
+    particle->pos.x = graphicsRandom.rand(static_cast<int>(virtual_width));
+    particle->pos.y = graphicsRandom.rand(static_cast<int>(virtual_height));
     particle->texture = cloudimage;
-    particle->speed = -systemRandom.randf(25.0, 54.0);
+    particle->speed = -graphicsRandom.randf(25.0, 54.0);
 
     particles.push_back(particle);
   }
@@ -45,7 +45,7 @@ CloudParticleSystem::CloudParticleSystem() :
 void
 CloudParticleSystem::parse(const Reader& reader)
 {
-  reader.get("z-pos", z_pos);
+  z_pos = reader_get_layer (reader, /* default = */ LAYER_BACKGROUND1);
 }
 
 CloudParticleSystem::~CloudParticleSystem()