-/* xscreensaver, Copyright (c) 1992, 1994, 1996, 1998, 2001
+/* xscreensaver, Copyright (c) 1992, 1994, 1996, 1998, 2001, 2005
* Jamie Zawinski <jwz@jwz.org>
*
* Permission to use, copy, modify, distribute, and sell this software and its
p->fuse = ((((random () % 500) + 500) * abs (p->dy / g)) / 1000);
p->primary = True;
+ /* cope with small windows -- those constants assume big windows. */
+ {
+ int div = 1000000 / ylim;
+ if (div > 1)
+ p->fuse /= div;
+ }
+
if (! mono_p)
{
hsv_to_rgb (random () % 360, 1.0, 1.0,
p->y = parent->y;
v=random () % PI_2000;
p->dx =(sin_cache[v]) + parent->dx;
- p->dy =(cos_cache[v]) + parent->dx;
+ p->dy =(cos_cache[v]) + parent->dy;
p->decay = (random () % 50) - 60;
p->size = (parent->size * 2) / 3;
p->fuse = 0;