X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fgoop.c;h=4028fb3c7e069799c5a0e27f10b3e9ce295f0a9b;hb=c1b9b55ad8d59dc05ef55e316aebf5863e7dfa56;hp=4241950c0c386dc43a4cef014fb2358cf6c69a84;hpb=49f5b54f312fe4ac2e9bc47581a72451bd0e8439;p=xscreensaver diff --git a/hacks/goop.c b/hacks/goop.c index 4241950c..4028fb3c 100644 --- a/hacks/goop.c +++ b/hacks/goop.c @@ -1,4 +1,4 @@ -/* xscreensaver, Copyright (c) 1997, 2006 Jamie Zawinski +/* xscreensaver, Copyright (c) 1997-2008 Jamie Zawinski * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -258,9 +258,11 @@ make_layer (Display *dpy, Window window, int width, int height, int nblobs) blob_max = (width < height ? width : height) / 2; blob_min = (blob_max * 2) / 3; - for (i = 0; i < layer->nblobs; i++) + for (i = 0; i < layer->nblobs; i++){ + int j = blob_max - blob_min; layer->blobs[i] = make_blob (dpy, width, height, - (random() % (blob_max-blob_min)) + blob_min); + (j ? random() % j : 0) + blob_min); + } layer->pixmap = XCreatePixmap (dpy, window, width, height, 1); layer->gc = XCreateGC (dpy, layer->pixmap, 0, &gcv); @@ -564,8 +566,8 @@ static const char *goop_defaults [] = { "*delay: 12000", "*additive: true", "*mode: transparent", - "*count: 0", - "*planes: 0", + "*count: 1", + "*planes: 12", "*thickness: 5", "*torque: 0.0075", "*elasticity: 0.9",