X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fobject%2Frain_particle_system.cpp;h=4beda1c9cc9829b7fd8f5171c0e56c8c9e53de6e;hb=b88dc6c0a778a019bf0b1f28c2cc9d624d9bbdbd;hp=5c5e9d9f1610358d67e265015c5399d676614ced;hpb=cee739d4820fb000a217996ffadc74bc58ed582a;p=supertux.git diff --git a/src/object/rain_particle_system.cpp b/src/object/rain_particle_system.cpp index 5c5e9d9f1..4beda1c9c 100644 --- a/src/object/rain_particle_system.cpp +++ b/src/object/rain_particle_system.cpp @@ -32,12 +32,12 @@ RainParticleSystem::RainParticleSystem() size_t raindropcount = size_t(virtual_width/6.0); for(size_t i=0; ipos.x = systemRandom.rand(int(virtual_width)); - particle->pos.y = systemRandom.rand(int(virtual_height)); - int rainsize = systemRandom.rand(2); - particle->texture = rainimages[rainsize].get(); + particle->pos.x = graphicsRandom.rand(int(virtual_width)); + particle->pos.y = graphicsRandom.rand(int(virtual_height)); + int rainsize = graphicsRandom.rand(2); + particle->texture = rainimages[rainsize]; do { - particle->speed = (rainsize+1)*45 + systemRandom.randf(3.6); + particle->speed = (rainsize+1)*45 + graphicsRandom.randf(3.6); } while(particle->speed < 1); particle->speed *= 10; // gravity @@ -48,7 +48,7 @@ RainParticleSystem::RainParticleSystem() void RainParticleSystem::parse(const Reader& reader) { - reader.get("z-pos", z_pos); + z_pos = reader_get_layer (reader, /* default = */ LAYER_BACKGROUND1); } RainParticleSystem::~RainParticleSystem() @@ -84,7 +84,7 @@ void RainParticleSystem::update(float elapsed_time) Sector::current()->add_object(new RainSplash(Vector(splash_x, splash_y),vertical)); } */ } - int new_x = systemRandom.rand(int(virtual_width)) + int(abs_x); + int new_x = graphicsRandom.rand(int(virtual_width)) + int(abs_x); int new_y = 0; //FIXME: Don't move particles over solid tiles particle->pos.x = new_x;