- snowimages[0] = new Surface(datadir+"/images/shared/snow0.png", true);
- snowimages[1] = new Surface(datadir+"/images/shared/snow1.png", true);
- snowimages[2] = new Surface(datadir+"/images/shared/snow2.png", true);
-
- virtual_width = screen->w * 2;
-
- // create some random snowflakes
- size_t snowflakecount = size_t(virtual_width/10.0);
- for(size_t i=0; i<snowflakecount; ++i) {
- SnowParticle* particle = new SnowParticle;
- particle->pos.x = rand() % int(virtual_width);
- particle->pos.y = rand() % screen->h;
- int snowsize = rand() % 3;
- particle->texture = snowimages[snowsize];
- do {
- particle->speed = snowsize*.2 + (float(rand()%10)*.4);
- } while(particle->speed < 1);
- particle->speed *= 10; // gravity
-
- particles.push_back(particle);
- }
+ snowimages[0] = new Surface("images/objects/particles/snow2.png");
+ snowimages[1] = new Surface("images/objects/particles/snow1.png");
+ snowimages[2] = new Surface("images/objects/particles/snow0.png");
+
+ virtual_width = SCREEN_WIDTH * 2;
+
+ // create some random snowflakes
+ size_t snowflakecount = size_t(virtual_width/10.0);
+ for(size_t i=0; i<snowflakecount; ++i) {
+ SnowParticle* particle = new SnowParticle;
+ int snowsize = systemRandom.rand(3);
+
+ particle->pos.x = systemRandom.randf(virtual_width);
+ particle->pos.y = systemRandom.randf(SCREEN_HEIGHT);
+ particle->anchorx = particle->pos.x + (systemRandom.randf(-0.5, 0.5) * 16);
+ particle->drift_speed = systemRandom.randf(-0.5, 0.5) * 0.3;
+ particle->wobble = 0.0;
+
+ particle->texture = snowimages[snowsize];
+
+ particle->speed = 1 + (2 - snowsize)/2 + systemRandom.randf(1.8);
+ particle->speed *= 20; // gravity
+
+ particles.push_back(particle);
+ }